From 9a8d749697e14ad1dc979f1391e96b45b774efb0 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Mon, 30 Oct 2023 12:22:01 +0000 Subject: [PATCH] deploy to github pages 0c50ff12ef9398a57010e86f4ecdb834154c5ee6 --- css/app.810d9d88.css | 1 + css/app.cab76851.css | 1 - index.html | 2 +- js/app.61c0046a.js | 2 ++ js/app.61c0046a.js.map | 1 + js/app.c01019f7.js | 2 -- js/app.c01019f7.js.map | 1 - service-worker.js.map | 2 +- 8 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 css/app.810d9d88.css delete mode 100644 css/app.cab76851.css create mode 100644 js/app.61c0046a.js create mode 100644 js/app.61c0046a.js.map delete mode 100644 js/app.c01019f7.js delete mode 100644 js/app.c01019f7.js.map diff --git a/css/app.810d9d88.css b/css/app.810d9d88.css new file mode 100644 index 00000000..2c513d0d --- /dev/null +++ b/css/app.810d9d88.css @@ -0,0 +1 @@ +.message[data-v-2231702e]{max-width:500px}.message+.message[data-v-2231702e]{margin-top:15px}.message-container[data-v-2231702e]{min-width:50px;display:flex;align-items:center;padding:10px;font-size:13px;overflow:hidden;border-radius:2px;box-shadow:0 1px 8px rgba(0,0,0,.15);background:#fff;pointer-events:all;position:relative}.message-container .icons[data-v-2231702e]{display:flex;align-items:center;margin-right:10px}.message-container .title[data-v-2231702e]{font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-container .content[data-v-2231702e]{width:100%}.message-container .description[data-v-2231702e]{line-height:1.5;color:#41464b}.message-container .title+.description[data-v-2231702e]{margin-top:5px}.message-container .control[data-v-2231702e]{position:relative;height:100%;margin-left:10px}.message-container .close-btn[data-v-2231702e]{font-size:15px;color:#666;display:flex;align-items:center;cursor:pointer}.message-container .close-btn[data-v-2231702e]:hover{color:#d14424}.message-fade-enter-active[data-v-2231702e]{animation:message-fade-in-down-2231702e .3s}.message-fade-leave-active[data-v-2231702e]{animation:message-fade-out-2231702e .3s}@keyframes message-fade-in-down-2231702e{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes message-fade-out-2231702e{0%{opacity:1;margin-top:0}to{opacity:0;margin-top:-45px}}.hotkey-doc[data-v-a0322054]{height:100%;overflow:auto;font-size:12px;margin:0 -15px;padding:0 15px 15px}.title[data-v-a0322054]{font-size:14px;font-weight:700;border-bottom:1px solid #e5e5e5;padding:25px 0 5px 0}.title[data-v-a0322054]:first-child{padding-top:0}.hotkey-item[data-v-a0322054]{border-bottom:1px solid #e5e5e5;padding:15px 0 5px 0;display:flex;align-items:center}.label[data-v-a0322054]{width:140px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.input[data-v-64bedb34]{display:none}.fullscreen-spin[data-v-a5c6b41c]{top:0;bottom:0;left:0;right:0;z-index:100;background-color:hsla(0,0%,95%,.7)}.fullscreen-spin[data-v-a5c6b41c],.spin[data-v-a5c6b41c]{position:fixed;display:flex;justify-content:center;align-items:center}.spin[data-v-a5c6b41c]{width:200px;height:200px;top:50%;left:50%;margin-top:-100px;margin-left:-100px;flex-direction:column}.spinner[data-v-a5c6b41c]{width:36px;height:36px;border:3px solid #d14424;border-top-color:transparent;border-radius:50%;animation:spinner-a5c6b41c .8s linear infinite}.text[data-v-a5c6b41c]{margin-top:20px;color:#d14424}@keyframes spinner-a5c6b41c{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.drawer[data-v-749dadac]{height:100%;position:fixed;top:0;bottom:0;z-index:5000;background:#fff;display:flex;flex-direction:column}.drawer.left[data-v-749dadac]{left:0;box-shadow:3px 0 6px -4px rgba(0,0,0,.12),9px 0 28px 8px rgba(0,0,0,.05)}.drawer.right[data-v-749dadac]{right:0;box-shadow:-3px 0 6px -4px rgba(0,0,0,.12),-9px 0 28px 8px rgba(0,0,0,.05)}.header[data-v-749dadac]{height:50px;padding:0 15px;position:relative;display:flex;align-items:center}.header .close-btn[data-v-749dadac]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;position:absolute;top:15px;right:15px;cursor:pointer}.content[data-v-749dadac]{padding:0 15px;overflow:auto;flex:1}.drawer-slide-right-enter-active[data-v-749dadac]{animation:drawer-slide-right-enter-749dadac .25s ease both}.drawer-slide-right-leave-active[data-v-749dadac]{animation:drawer-slide-right-leave-749dadac .25s ease both}.drawer-slide-left-enter-active[data-v-749dadac]{animation:drawer-slide-left-enter-749dadac .25s ease both}.drawer-slide-left-leave-active[data-v-749dadac]{animation:drawer-slide-left-leave-749dadac .25s ease both}@keyframes drawer-slide-right-enter-749dadac{0%{transform:translateX(100%)}}@keyframes drawer-slide-right-leave-749dadac{to{transform:translateX(100%)}}@keyframes drawer-slide-left-enter-749dadac{0%{transform:translateX(-100%)}}@keyframes drawer-slide-left-leave-749dadac{to{transform:translateX(-100%)}}.input[data-v-a97ba0dc]{background-color:#fff;border:1px solid #d9d9d9;padding:0 5px;border-radius:2px;transition:border-color .25s;font-size:13px;display:flex}.input input[data-v-a97ba0dc]{min-width:0;height:30px;outline:0;border:0;line-height:30px;vertical-align:top;color:#41464b;padding:0 5px;flex:1;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.input input[data-v-a97ba0dc]::-moz-placeholder{color:#bfbfbf}.input input[data-v-a97ba0dc]::placeholder{color:#bfbfbf}.input.focused[data-v-a97ba0dc],.input[data-v-a97ba0dc]:not(.disabled):hover{border-color:#d14424}.input.disabled[data-v-a97ba0dc]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.input .prefix[data-v-a97ba0dc],.input .suffix[data-v-a97ba0dc]{display:flex;justify-content:center;align-items:center;line-height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.popover.center[data-v-70fabe9a]{display:flex;justify-content:center;align-items:center}.popover-content[data-v-70fabe9a]{background-color:#fff;padding:10px;border:1px solid #eee;box-shadow:3px 3px 3px rgba(0,0,0,.15);border-radius:2px;font-size:13px}.tippy-box[data-theme~=popover]{border:0;outline:0}.popover-menu-item[data-v-2f137c4f]{min-width:80px;padding:6px 10px;border-radius:2px;font-size:13px;cursor:pointer}.popover-menu-item.center[data-v-2f137c4f]{text-align:center}.popover-menu-item[data-v-2f137c4f]:hover{background-color:#f1f1f1}.popover-menu-item+.popover-menu-item[data-v-2f137c4f]{margin-top:2px}.editor-header[data-v-2394d37c]{background-color:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-bottom:1px solid #eee;display:flex;justify-content:space-between;padding:0 5px}.left[data-v-2394d37c],.menu-item[data-v-2394d37c],.right[data-v-2394d37c]{display:flex;justify-content:center;align-items:center}.menu-item[data-v-2394d37c]{height:30px;font-size:14px;padding:0 10px;border-radius:2px;cursor:pointer}.menu-item .icon[data-v-2394d37c]{font-size:18px;color:#666}.menu-item[data-v-2394d37c]:hover{background-color:#f1f1f1}.group-menu-item[data-v-2394d37c]{height:30px;display:flex;margin:0 8px;padding:0 2px;border-radius:2px}.group-menu-item[data-v-2394d37c]:hover{background-color:#f1f1f1}.group-menu-item .menu-item[data-v-2394d37c]{padding:0 3px}.group-menu-item .arrow-btn[data-v-2394d37c]{display:flex;justify-content:center;align-items:center;cursor:pointer}.title[data-v-2394d37c]{height:32px;margin-left:2px;font-size:13px}.title .title-input[data-v-2394d37c]{width:200px;height:100%;padding-left:0;padding-right:0}.title .title-text[data-v-2394d37c]{min-width:20px;max-width:400px;line-height:32px;padding:0 6px;border-radius:2px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.title .title-text[data-v-2394d37c]:hover{background-color:#f1f1f1}.github-link[data-v-2394d37c]{display:inline-block;height:30px}svg[data-v-11836cf8],svg[data-v-35e36256],svg[data-v-6e021ee2]{overflow:visible;position:absolute;z-index:2;top:0;left:0}.image-clip-handler[data-v-5984406b]{width:100%;height:100%;position:relative}.image-clip-handler .bottom-img[data-v-5984406b]{top:0;left:0;width:100%;height:100%;opacity:.5}.image-clip-handler img[data-v-5984406b]{width:100%;height:100%}.image-clip-handler .top-image-content[data-v-5984406b]{position:absolute;overflow:hidden}.image-clip-handler .top-image-content img[data-v-5984406b]{position:absolute}.operate[data-v-5984406b]{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.clip-point[data-v-5984406b]{position:absolute;width:16px;height:16px}.clip-point svg[data-v-5984406b]{overflow:visible}.clip-point.left-top[data-v-5984406b]{left:0;top:0}.clip-point.right-top[data-v-5984406b]{left:100%;top:0;transform:rotate(90deg);transform-origin:0 0}.clip-point.left-bottom[data-v-5984406b]{left:0;top:100%;transform:rotate(-90deg);transform-origin:0 0}.clip-point.right-bottom[data-v-5984406b]{left:100%;top:100%;transform:rotate(180deg);transform-origin:0 0}.clip-point.top[data-v-5984406b]{left:50%;top:0;margin-left:-8px}.clip-point.bottom[data-v-5984406b]{left:50%;bottom:0;margin-left:-8px;transform:rotate(180deg)}.clip-point.left[data-v-5984406b]{left:0;top:50%;margin-top:-8px;transform:rotate(-90deg)}.clip-point.right[data-v-5984406b]{right:0;top:50%;margin-top:-8px;transform:rotate(90deg)}.clip-point.bottom.rotate-135[data-v-5984406b],.clip-point.left-bottom.rotate-90[data-v-5984406b],.clip-point.left-top.rotate-0[data-v-5984406b],.clip-point.left.rotate-45[data-v-5984406b],.clip-point.right-bottom.rotate-0[data-v-5984406b],.clip-point.right-top.rotate-90[data-v-5984406b],.clip-point.right.rotate-45[data-v-5984406b],.clip-point.top.rotate-135[data-v-5984406b]{cursor:nwse-resize}.clip-point.bottom.rotate-0[data-v-5984406b],.clip-point.left-bottom.rotate-135[data-v-5984406b],.clip-point.left-top.rotate-45[data-v-5984406b],.clip-point.left.rotate-90[data-v-5984406b],.clip-point.right-bottom.rotate-45[data-v-5984406b],.clip-point.right-top.rotate-135[data-v-5984406b],.clip-point.right.rotate-90[data-v-5984406b],.clip-point.top.rotate-0[data-v-5984406b]{cursor:ns-resize}.clip-point.bottom.rotate-45[data-v-5984406b],.clip-point.left-bottom.rotate-0[data-v-5984406b],.clip-point.left-top.rotate-90[data-v-5984406b],.clip-point.left.rotate-135[data-v-5984406b],.clip-point.right-bottom.rotate-90[data-v-5984406b],.clip-point.right-top.rotate-0[data-v-5984406b],.clip-point.right.rotate-135[data-v-5984406b],.clip-point.top.rotate-45[data-v-5984406b]{cursor:nesw-resize}.clip-point.bottom.rotate-90[data-v-5984406b],.clip-point.left-bottom.rotate-45[data-v-5984406b],.clip-point.left-top.rotate-135[data-v-5984406b],.clip-point.left.rotate-0[data-v-5984406b],.clip-point.right-bottom.rotate-135[data-v-5984406b],.clip-point.right-top.rotate-45[data-v-5984406b],.clip-point.right.rotate-0[data-v-5984406b],.clip-point.top.rotate-90[data-v-5984406b]{cursor:ew-resize}.editable-element-image[data-v-1156b3e1]{position:absolute}.editable-element-image.lock .element-content[data-v-1156b3e1]{cursor:default}.rotate-wrapper[data-v-1156b3e1]{width:100%;height:100%}.element-content[data-v-1156b3e1]{width:100%;height:100%;position:relative;cursor:move}.element-content .image-content[data-v-1156b3e1]{width:100%;height:100%;overflow:hidden;position:relative}.element-content img[data-v-1156b3e1]{position:absolute}.color-mask[data-v-1156b3e1]{position:absolute;top:0;bottom:0;left:0;right:0}svg[data-v-efb76626]{overflow:visible;position:absolute;top:0;left:0}.prosemirror-editor[data-v-3608adca]{cursor:text}.prosemirror-editor.format-painter[data-v-3608adca]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTcuMzUuMDEyLS4wNjYuOTk4YTUuMjcxIDUuMjcxIDAgMCAwLTEuMTg0LjA2IDMuOCAzLjggMCAwIDAtLjkzMy40NzJjLS40NC4zNTYtLjc4My44MTEtLjk5OCAxLjMyNGwuMDE4LS4wMzZ2NS4xMmgxLjA0di45OGgtMS4wNGwtLjAwMiA0LjE1Yy4xODcuNDI2LjQ2LjgxLjc5MSAxLjExN2wuMTc1LjE1MmMuMjkzLjIwOC42MTUuMzczLjg5LjQ3Mi40MS4wODIuODMuMTEyIDEuMjQ5LjA5bC4wNTcuOTk5YTYuMDYzIDYuMDYzIDAgMCAxLTEuNTg4LS4xMjkgNC44MzYgNC44MzYgMCAwIDEtMS4yNS0uNjQ3IDQuNDYzIDQuNDYzIDAgMCAxLS44MzgtLjg4M2MtLjIyNC4zMzItLjUuNjQyLS44MjQuOTI3YTQuMTEgNC4xMSAwIDAgMS0xLjMwNS42MzNBNi4xMjYgNi4xMjYgMCAwIDEgMCAxNS45MDlsLjA2OC0uOTk3Yy40MjQuMDI2Ljg1LS4wMDEgMS4yMTctLjA3LjMzNi0uMDk5LjY1MS0uMjU0Ljg5NC0uNDMuNDMtLjM4Ljc2NS0uODQ3Ljk4Mi0xLjM2OGwtLjAwNS4wMTRWOC45M0gyLjExNXYtLjk4aDEuMDRWMi44NjJhMy43NyAzLjc3IDAgMCAwLS43NzQtMS4xNjdsLS4xNjUtLjE1NmEzLjA2NCAzLjA2NCAwIDAgMC0uODgtLjQ0OEE1LjA2MiA1LjA2MiAwIDAgMCAuMDY3IDEuMDFMMCAuMDEyYTYuMTQgNi4xNCAwIDAgMSAxLjU5Mi4xMWMuNDUzLjEzNS44NzcuMzQ1IDEuMjkuNjUuMy4yNjUuNTY1LjU2NC43ODcuODkuMjMzLS4zMzEuNTItLjYzNC44NTMtLjkwNGE0LjgzNSA0LjgzNSAwIDAgMSAxLjMtLjY0OEE2LjE1NSA2LjE1NSAwIDAgMSA3LjM1LjAxMnoiIGZpbGw9IiMwRDBEMEQiLz48cGF0aCBkPSJtMTcuMzUgMTQuNSA0LjUtNC41LTYtNmMtMiAyLTMgMi01LjUgMi41LjQgMy4yIDQuODMzIDYuNjY3IDcgOHptNC41ODgtNC40OTNhLjMuMyAwIDAgMCAuNDI0IDBsLjY4LS42OGExLjUgMS41IDAgMCAwIDAtMi4xMjJMMjEuNjkgNS44NTNsMi4wMjUtMS41ODNhMS42MjkgMS42MjkgMCAxIDAtMi4yNzktMi4yOTZsLTEuNjAzIDIuMDIyLTEuMzU3LTEuMzU3YTEuNSAxLjUgMCAwIDAtMi4xMjEgMGwtLjY4LjY4YS4zLjMgMCAwIDAgMCAuNDI1bDYuMjYzIDYuMjYzeiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xNS44OTIgMy45NjJzLTEuMDMgMS4yMDItMi40OTQgMS44OWMtMS4wMDYuNDc0LTIuMTguNTg2LTIuNzM0LjYyNy0uMi4wMTUtLjM0NC4yMS0uMjc2LjM5OS4yOTIuODIgMS4xMTIgMi44IDIuNjU4IDQuMzQ2IDIuMTI2IDIuMTI3IDMuNjU4IDIuOTY4IDQuMTQyIDMuMjAzLjEuMDQ4LjIxNC4wMy4yOTgtLjA0Mi4zODYtLjMyNSAxLjUtMS4yNzcgMi4yMS0xLjk4Ni44OTItLjg4OSAyLjE4Ny0yLjQ0NyAyLjE4Ny0yLjQ0N20uNDc5LjA1NWEuMy4zIDAgMCAxLS40MjQgMGwtNi4yNjQtNi4yNjNhLjMuMyAwIDAgMSAwLS40MjVsLjY4LS42OGExLjUgMS41IDAgMCAxIDIuMTIyIDBsMS4zNTcgMS4zNTcgMS42MDMtMi4wMjJhMS42MjkgMS42MjkgMCAxIDEgMi4yOCAyLjI5NkwyMS42OSA1Ljg1M2wxLjM1MiAxLjM1MmExLjUgMS41IDAgMCAxIDAgMi4xMjJsLS42OC42OHoiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) 2 5,default!important}.editable-element-text[data-v-2a1e49ba]{position:absolute}.editable-element-text.lock .element-content[data-v-2a1e49ba]{cursor:default}.rotate-wrapper[data-v-2a1e49ba]{width:100%;height:100%}.element-content[data-v-2a1e49ba]{position:relative;padding:10px;line-height:1.5;word-break:break-word;cursor:move}.element-content .text[data-v-2a1e49ba]{position:relative}.element-content[data-v-2a1e49ba] a{cursor:text}.drag-handler[data-v-2a1e49ba]{height:10px;position:absolute;left:0;right:0}.drag-handler.top[data-v-2a1e49ba]{top:0}.drag-handler.bottom[data-v-2a1e49ba]{bottom:0}.editable-element-shape[data-v-5d988de2]{position:absolute;pointer-events:none}.editable-element-shape.lock .element-content[data-v-5d988de2]{cursor:default}.editable-element-shape.format-painter .element-content[data-v-5d988de2]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNzUgMTMuNzY0VjEuNDIxYS4zLjMgMCAwIDEgLjQ0OC0uMjZsMTAuOTEgNi4xOTdhLjMuMyAwIDAgMS0uMTE2LjU1OWwtNC4xOTYuNDQyIDIuNTgyIDQuNDcyYS4zLjMgMCAwIDEtLjExLjQxbC0zLjE4NCAxLjgzOGEuMy4zIDAgMCAxLS40MS0uMTFsLTIuNTgxLTQuNDcyLTIuODEgMy40NTZhLjMuMyAwIDAgMS0uNTMzLS4xODl6IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJtMjYgMTQuNSA0LjUtNC41LTYtNmMtMiAyLTMgMi01LjUgMi41LjQgMy4yIDQuODMzIDYuNjY3IDcgOHptNC41ODgtNC40OTRhLjMuMyAwIDAgMCAuNDI0IDBsLjY4LS42OGExLjUgMS41IDAgMCAwIDAtMi4xMjFMMzAuMzQgNS44NTJsMi4wMjYtMS41ODJhMS42MjkgMS42MjkgMCAxIDAtMi4yOC0yLjI5NmwtMS42MDMgMi4wMjEtMS4zNTctMS4zNTZhMS41IDEuNSAwIDAgMC0yLjEyIDBsLS42ODEuNjhhLjMuMyAwIDAgMCAwIC40MjRsNi4yNjMgNi4yNjN6IiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTI0LjU0MyAzLjk2MXMtMS4wMyAxLjIwMi0yLjQ5NCAxLjg5MWMtMS4wMDYuNDc0LTIuMTgxLjU4NS0yLjczNC42MjctLjIuMDE0LS4zNDQuMjA5LS4yNzcuMzk4LjI5My44MiAxLjExMiAyLjgwMSAyLjY1OCA0LjM0NyAyLjEyNiAyLjEyNiAzLjY1OSAyLjk2OCA0LjE0MiAzLjIwMi4xLjA0OC4yMTUuMDMuMjk5LS4wNDEuMzg1LS4zMjYgMS41LTEuMjc3IDIuMjEtMS45ODYuODkxLS44OSAyLjE4Ni0yLjQ0OCAyLjE4Ni0yLjQ0OG0uNDguMDU1YS4zLjMgMCAwIDEtLjQyNSAwbC02LjI2My02LjI2M2EuMy4zIDAgMCAxIDAtLjQyNGwuNjgtLjY4YTEuNSAxLjUgMCAwIDEgMi4xMjIgMGwxLjM1NiAxLjM1NiAxLjYwNC0yLjAyMWExLjYyOSAxLjYyOSAwIDEgMSAyLjI3OSAyLjI5NkwzMC4zNCA1Ljg1MmwxLjM1MyAxLjM1M2ExLjUgMS41IDAgMCAxIDAgMi4xMjFsLS42OC42OHoiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) 2 5,default!important}.rotate-wrapper[data-v-5d988de2]{width:100%;height:100%}.element-content[data-v-5d988de2]{width:100%;height:100%;position:relative;cursor:move}.element-content svg[data-v-5d988de2]{transform-origin:0 0;overflow:visible}.element-content .shape-path[data-v-5d988de2]{pointer-events:all}.shape-text[data-v-5d988de2]{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;padding:10px;line-height:1.2;word-break:break-word;pointer-events:none}.shape-text.editable[data-v-5d988de2]{pointer-events:all}.shape-text.top[data-v-5d988de2]{justify-content:flex-start}.shape-text.middle[data-v-5d988de2]{justify-content:center}.shape-text.bottom[data-v-5d988de2]{justify-content:flex-end}.editable-element-shape[data-v-16512454]{position:absolute;pointer-events:none}.editable-element-shape.lock .line-path[data-v-16512454],.editable-element-shape.lock .line-point[data-v-16512454]{cursor:default}.element-content[data-v-16512454]{width:100%;height:100%;position:relative}.element-content svg[data-v-16512454]{transform-origin:0 0;overflow:visible}.line-path[data-v-16512454],.line-point[data-v-16512454]{pointer-events:all;cursor:move}.chart[data-v-ae2a96a6]{display:flex}.chart-content[data-v-ae2a96a6]{transform-origin:0 0}.chart-content{--theme-color-1:#666;--theme-color-2:#666;--theme-color-3:#666;--theme-color-4:#666;--theme-color-5:#666;--theme-color-6:#666;--theme-color-7:#666;--theme-color-8:#666;--theme-color-9:#666;--theme-color-10:#666;--grid-color:rgba(0,0,0,.4)}.chart-content .ct-series-a .ct-line,.chart-content .ct-series-a .ct-point{stroke:var(--theme-color-1)}.chart-content .ct-series-a .ct-area{fill:var(--theme-color-1)}.chart-content .ct-series-a .ct-bar{stroke:var(--theme-color-1)}.chart-content .ct-series-a .ct-slice-pie{fill:var(--theme-color-1)}.chart-content .ct-series-a .ct-slice-donut{stroke:var(--theme-color-1)}.chart-content .ct-series-b .ct-line,.chart-content .ct-series-b .ct-point{stroke:var(--theme-color-2)}.chart-content .ct-series-b .ct-area{fill:var(--theme-color-2)}.chart-content .ct-series-b .ct-bar{stroke:var(--theme-color-2)}.chart-content .ct-series-b .ct-slice-pie{fill:var(--theme-color-2)}.chart-content .ct-series-b .ct-slice-donut{stroke:var(--theme-color-2)}.chart-content .ct-series-c .ct-line,.chart-content .ct-series-c .ct-point{stroke:var(--theme-color-3)}.chart-content .ct-series-c .ct-area{fill:var(--theme-color-3)}.chart-content .ct-series-c .ct-bar{stroke:var(--theme-color-3)}.chart-content .ct-series-c .ct-slice-pie{fill:var(--theme-color-3)}.chart-content .ct-series-c .ct-slice-donut{stroke:var(--theme-color-3)}.chart-content .ct-series-d .ct-line,.chart-content .ct-series-d .ct-point{stroke:var(--theme-color-4)}.chart-content .ct-series-d .ct-area{fill:var(--theme-color-4)}.chart-content .ct-series-d .ct-bar{stroke:var(--theme-color-4)}.chart-content .ct-series-d .ct-slice-pie{fill:var(--theme-color-4)}.chart-content .ct-series-d .ct-slice-donut{stroke:var(--theme-color-4)}.chart-content .ct-series-e .ct-line,.chart-content .ct-series-e .ct-point{stroke:var(--theme-color-5)}.chart-content .ct-series-e .ct-area{fill:var(--theme-color-5)}.chart-content .ct-series-e .ct-bar{stroke:var(--theme-color-5)}.chart-content .ct-series-e .ct-slice-pie{fill:var(--theme-color-5)}.chart-content .ct-series-e .ct-slice-donut{stroke:var(--theme-color-5)}.chart-content .ct-series-f .ct-line,.chart-content .ct-series-f .ct-point{stroke:var(--theme-color-6)}.chart-content .ct-series-f .ct-area{fill:var(--theme-color-6)}.chart-content .ct-series-f .ct-bar{stroke:var(--theme-color-6)}.chart-content .ct-series-f .ct-slice-pie{fill:var(--theme-color-6)}.chart-content .ct-series-f .ct-slice-donut{stroke:var(--theme-color-6)}.chart-content .ct-series-g .ct-line,.chart-content .ct-series-g .ct-point{stroke:var(--theme-color-7)}.chart-content .ct-series-g .ct-area{fill:var(--theme-color-7)}.chart-content .ct-series-g .ct-bar{stroke:var(--theme-color-7)}.chart-content .ct-series-g .ct-slice-pie{fill:var(--theme-color-7)}.chart-content .ct-series-g .ct-slice-donut{stroke:var(--theme-color-7)}.chart-content .ct-series-h .ct-line,.chart-content .ct-series-h .ct-point{stroke:var(--theme-color-8)}.chart-content .ct-series-h .ct-area{fill:var(--theme-color-8)}.chart-content .ct-series-h .ct-bar{stroke:var(--theme-color-8)}.chart-content .ct-series-h .ct-slice-pie{fill:var(--theme-color-8)}.chart-content .ct-series-h .ct-slice-donut{stroke:var(--theme-color-8)}.chart-content .ct-series-i .ct-line,.chart-content .ct-series-i .ct-point{stroke:var(--theme-color-9)}.chart-content .ct-series-i .ct-area{fill:var(--theme-color-9)}.chart-content .ct-series-i .ct-bar{stroke:var(--theme-color-9)}.chart-content .ct-series-i .ct-slice-pie{fill:var(--theme-color-9)}.chart-content .ct-series-i .ct-slice-donut{stroke:var(--theme-color-9)}.chart-content .ct-grid{stroke:var(--grid-color)}.chart-content .ct-label{fill:var(--grid-color);color:var(--grid-color)}.legends{height:20px;justify-content:center;font-size:14px}.legend,.legends{display:flex;align-items:center}.legend+.legend{margin-left:10px}.legend .block{width:10px;height:10px;margin-right:5px}.editable-element-chart[data-v-6fc3de39]{position:absolute}.editable-element-chart.lock .element-content[data-v-6fc3de39]{cursor:default}.rotate-wrapper[data-v-6fc3de39]{width:100%;height:100%}.element-content[data-v-6fc3de39]{width:100%;height:100%;overflow:hidden;cursor:move}.custom-textarea[data-v-7a7222ac]{border:0;outline:0;-webkit-user-modify:read-write-plaintext-only}.editable-table[data-v-0236a619],table[data-v-0236a619]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}table[data-v-0236a619]{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;border:0;word-wrap:break-word;--themeColor:$themeColor;--subThemeColor1:$themeColor;--subThemeColor2:$themeColor}table.theme[data-v-0236a619]{background-color:#fff}table.theme tr:nth-child(2n) .cell[data-v-0236a619]{background-color:var(--subThemeColor1)}table.theme tr:nth-child(odd) .cell[data-v-0236a619]{background-color:var(--subThemeColor2)}table.theme.col-footer tr .cell[data-v-0236a619]:last-child,table.theme.col-header tr .cell[data-v-0236a619]:first-child,table.theme.row-footer tr:last-child .cell[data-v-0236a619],table.theme.row-header tr:first-child .cell[data-v-0236a619]{background-color:var(--themeColor)}table .cell[data-v-0236a619]{position:relative;white-space:normal;word-wrap:break-word;vertical-align:middle;font-size:14px;background-clip:padding-box;cursor:default}table .cell.selected[data-v-0236a619]:after{content:"";width:100%;height:100%;position:absolute;top:0;left:0;background-color:hsla(0,0%,40%,.4)}table .cell-text[data-v-0236a619]{padding:5px;line-height:1.5;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:text}table .cell-text.active[data-v-0236a619]{-webkit-user-select:text;-moz-user-select:text;user-select:text}.drag-line[data-v-0236a619]{position:absolute;top:0;bottom:0;width:3px;background-color:#d14424;margin-left:-1px;opacity:0;z-index:2;cursor:col-resize}.editable-element-table[data-v-742a731e]{position:absolute}.editable-element-table.lock .element-content[data-v-742a731e]{cursor:default}.rotate-wrapper[data-v-742a731e]{width:100%;height:100%}.element-content[data-v-742a731e]{width:100%;height:100%;position:relative;cursor:move}.table-mask[data-v-742a731e]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .2s}.table-mask .mask-tip[data-v-742a731e]{position:absolute;top:5px;left:5px;background-color:rgba(0,0,0,.5);color:#fff;padding:6px 12px;font-size:12px;transform-origin:0 0}.table-mask[data-v-742a731e]:hover:not(.lock){opacity:.9}.editable-element-latex[data-v-35c33b80]{position:absolute}.editable-element-latex.lock .element-content[data-v-35c33b80]{cursor:default}.rotate-wrapper[data-v-35c33b80]{width:100%;height:100%}.element-content[data-v-35c33b80]{width:100%;height:100%;position:relative;cursor:move}.element-content svg[data-v-35c33b80]{transform-origin:0 0;overflow:visible}.video-player[data-v-e55352ca]{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1;transform-origin:0 0}.video-player.hide-controller[data-v-e55352ca]{cursor:none}.video-player.hide-controller .controller-mask[data-v-e55352ca],.video-player.hide-controller .controller[data-v-e55352ca]{opacity:0;transform:translateY(100%)}.video-wrap[data-v-e55352ca]{position:relative;background:#000;font-size:0;width:100%;height:100%}.video-wrap .video[data-v-e55352ca]{width:100%;height:100%}.controller-mask[data-v-e55352ca]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%;position:absolute;bottom:0;transition:all .3s ease}.controller[data-v-e55352ca]{position:absolute;bottom:0;left:0;right:0;height:41px;padding:0 20px;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:all .3s ease}.controller .bar-wrap[data-v-e55352ca]{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:calc(100% - 40px);height:3px}.controller .bar-wrap:hover .bar .played .thumb[data-v-e55352ca]{transform:scale(1)}.controller .bar-wrap .bar-time[data-v-e55352ca]{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.controller .bar-wrap .bar-time.hidden[data-v-e55352ca]{opacity:0}.controller .bar-wrap .bar[data-v-e55352ca]{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.controller .bar-wrap .bar .loaded[data-v-e55352ca]{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;transition:all .5s ease;will-change:width}.controller .bar-wrap .bar .played[data-v-e55352ca]{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width;background-color:#fff}.controller .bar-wrap .bar .played .thumb[data-v-e55352ca]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons[data-v-e55352ca]{height:38px;position:absolute;bottom:0;display:flex;align-items:center}.controller .icons.icons-right[data-v-e55352ca]{right:15px}.controller .icons .time[data-v-e55352ca]{line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.controller .icons .icon[data-v-e55352ca]{width:40px;height:100%;position:relative;cursor:pointer;display:flex;align-items:center;font-size:20px}.controller .icons .icon.play-icon[data-v-e55352ca]{font-size:26px}.controller .icons .icon .icon-content[data-v-e55352ca]{transition:all .2s ease-in-out;opacity:.8;color:#fff}.controller .icons .icon.loop-icon[data-v-e55352ca]{font-size:12px}.controller .icons .icon.loop-icon .icon-content[data-v-e55352ca]{opacity:.5}.controller .icons .icon.speed-icon[data-v-e55352ca]{font-size:12px;position:relative}.controller .icons .icon .speed-menu[data-v-e55352ca]{width:70px;position:absolute;bottom:30px;left:-23px;background-color:#22211b;padding:5px 0;color:#ddd}.controller .icons .icon .speed-menu .speed-menu-item[data-v-e55352ca]{padding:8px 0;text-align:center}.controller .icons .icon .speed-menu .speed-menu-item[data-v-e55352ca]:hover{background-color:#393833;color:#fff}.controller .icons .icon .speed-menu .speed-menu-item.active[data-v-e55352ca]{font-weight:700;color:#fff}.controller .icons .icon.active .icon-content[data-v-e55352ca],.controller .icons .icon:hover .icon-content[data-v-e55352ca]{opacity:1}.controller .icons .volume[data-v-e55352ca]{height:100%;position:relative;cursor:pointer;display:flex;align-items:center}.controller .icons .volume:hover .volume-bar-wrap .volume-bar[data-v-e55352ca]{width:45px}.controller .icons .volume:hover .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{transform:scale(1)}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar[data-v-e55352ca]{width:45px}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{transform:scale(1)}.controller .icons .volume-bar-wrap[data-v-e55352ca]{display:inline-block;margin:0 15px 0 -5px;vertical-align:middle;height:100%}.controller .icons .volume-bar[data-v-e55352ca]{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.controller .icons .volume-bar .volume-bar-inner[data-v-e55352ca]{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width;background-color:#fff}.controller .icons .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons .loop[data-v-e55352ca]{display:inline-block;height:100%}.bezel[data-v-e55352ca]{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.bezel .bezel-icon[data-v-e55352ca]{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.5);border-radius:50%;opacity:0;pointer-events:none;font-size:40px}.bezel .bezel-icon.bezel-transition[data-v-e55352ca]{animation:bezel-hide-e55352ca .5s linear}@keyframes bezel-hide-e55352ca{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.load-error[data-v-e55352ca]{position:absolute;left:0;right:0;top:0;bottom:0;font-size:15px;color:#fff;pointer-events:none;display:flex;justify-content:center;align-items:center}.editable-element-video[data-v-5dc89f2a]{position:absolute}.editable-element-video.lock .handler-border[data-v-5dc89f2a]{cursor:default}.rotate-wrapper[data-v-5dc89f2a]{width:100%;height:100%}.element-content[data-v-5dc89f2a]{width:100%;height:100%;position:relative}.handler-border[data-v-5dc89f2a]{position:absolute;cursor:move}.handler-border.t[data-v-5dc89f2a]{width:100%;height:20px;top:0;left:0}.handler-border.b[data-v-5dc89f2a]{width:100%;height:5px;bottom:0;left:0}.handler-border.l[data-v-5dc89f2a]{width:10px;height:100%;left:0;top:0}.handler-border.r[data-v-5dc89f2a]{width:10px;height:100%;right:0;top:0}.audio-player[data-v-44037f56]{width:280px;height:50px;position:relative;line-height:1;transform-origin:0 0;background:#000}.audio-player[data-v-44037f56],.controller[data-v-44037f56]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.controller[data-v-44037f56]{position:absolute;bottom:0;left:0;right:0;height:41px;padding:0 20px;transition:all .3s ease}.controller .bar-wrap[data-v-44037f56]{padding:5px 0;cursor:pointer;position:absolute;bottom:35px;width:calc(100% - 40px);height:3px}.controller .bar-wrap:hover .bar .played .thumb[data-v-44037f56]{transform:scale(1)}.controller .bar-wrap .bar-time[data-v-44037f56]{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.controller .bar-wrap .bar-time.hidden[data-v-44037f56]{opacity:0}.controller .bar-wrap .bar[data-v-44037f56]{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.controller .bar-wrap .bar .loaded[data-v-44037f56]{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;transition:all .5s ease;will-change:width}.controller .bar-wrap .bar .played[data-v-44037f56]{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width;background-color:#fff}.controller .bar-wrap .bar .played .thumb[data-v-44037f56]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons[data-v-44037f56]{height:38px;position:absolute;bottom:0;left:14px;display:flex;align-items:center}.controller .icons .icon[data-v-44037f56]{width:36px;height:100%;position:relative;cursor:pointer;display:flex;align-items:center;font-size:20px}.controller .icons .icon.play-icon[data-v-44037f56]{font-size:26px}.controller .icons .icon .icon-content[data-v-44037f56]{transition:all .2s ease-in-out;opacity:.8;color:#fff}.controller .icons .icon.active .icon-content[data-v-44037f56],.controller .icons .icon:hover .icon-content[data-v-44037f56]{opacity:1}.controller .icons .volume[data-v-44037f56]{height:100%;position:relative;cursor:pointer;display:flex;align-items:center}.controller .icons .volume:hover .volume-bar-wrap .volume-bar[data-v-44037f56]{width:45px}.controller .icons .volume:hover .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{transform:scale(1)}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar[data-v-44037f56]{width:45px}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{transform:scale(1)}.controller .icons .volume-bar-wrap[data-v-44037f56]{display:inline-block;margin:0 15px 0 -5px;vertical-align:middle;height:100%}.controller .icons .volume-bar[data-v-44037f56]{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.controller .icons .volume-bar .volume-bar-inner[data-v-44037f56]{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width;background-color:#fff}.controller .icons .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .time[data-v-44037f56]{height:38px;position:absolute;right:20px;bottom:0;display:flex;align-items:center;line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.controller .time .ptime[data-v-44037f56]{margin-right:2px}.controller .time .dtime[data-v-44037f56]{margin-left:2px}.editable-element-audio[data-v-53bdc956]{position:absolute}.editable-element-audio.lock .audio-icon[data-v-53bdc956]{cursor:default}.rotate-wrapper[data-v-53bdc956]{width:100%;height:100%}.element-content[data-v-53bdc956]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.audio-icon[data-v-53bdc956]{cursor:move}.audio-player[data-v-53bdc956]{position:absolute}.mouse-selection[data-v-2c5e1d42]{position:absolute;background-color:rgba(209,68,36,.1);border:1px solid #d14424;z-index:200}.mouse-selection.quadrant-1[data-v-2c5e1d42]{transform-origin:50% 0;transform:rotate(180deg)}.mouse-selection.quadrant-2[data-v-2c5e1d42]{transform-origin:0 0;transform:rotate(180deg)}.mouse-selection.quadrant-3[data-v-2c5e1d42]{transform-origin:0 50%;transform:rotate(180deg)}.mouse-selection.quadrant-4[data-v-2c5e1d42]{transform-origin:0 0;transform:rotate(0deg)}.grid-lines[data-v-05484a24]{width:100%;height:100%;overflow:visible;z-index:999;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.viewport-background[data-v-b6b18502]{width:100%;height:100%;background-position:50%;position:absolute}.alignment-line[data-v-ed6fc00a]{position:absolute;z-index:100}.alignment-line .line[data-v-ed6fc00a]{width:0;height:0;border:0 dashed #d14424}.alignment-line .line.vertical[data-v-ed6fc00a]{transform:translateY(-.5px);border-left-width:1px}.alignment-line .line.horizontal[data-v-ed6fc00a]{transform:translateX(-.5px);border-top-width:1px}.ruler[data-v-2963c74c]{font-size:12px}.h[data-v-2963c74c]{position:absolute;background-color:#fff;border:1px solid #eee;height:20px;top:5px;display:flex;justify-content:space-between;align-items:center;overflow:hidden}.h .ruler-marker-100[data-v-2963c74c]{height:100%;width:10%;line-height:20px;text-align:right;flex-shrink:0;padding-right:5px;position:relative}.h .ruler-marker-100.hide span[data-v-2963c74c],.h .ruler-marker-100.omit[data-v-2963c74c]:before{display:none}.h .ruler-marker-100[data-v-2963c74c]:not(:last-child):after{content:"";width:.1px;height:12px;position:absolute;right:0;bottom:0;background-color:#999}.h .ruler-marker-100[data-v-2963c74c]:before{content:"";width:.1px;height:8px;position:absolute;right:50%;bottom:0;background-color:#999}.v[data-v-2963c74c]{position:absolute;background-color:#fff;border:1px solid #eee;width:20px;left:5px;overflow:hidden}.v .ruler-marker-100[data-v-2963c74c]{width:100%;line-height:20px;text-align:right;padding-bottom:5px;position:relative;writing-mode:vertical-rl}.v .ruler-marker-100.hide span[data-v-2963c74c],.v .ruler-marker-100.omit[data-v-2963c74c]:before{display:none}.v .ruler-marker-100[data-v-2963c74c]:not(:last-child):after{content:"";height:.1px;width:12px;position:absolute;bottom:0;right:0;background-color:#999}.v .ruler-marker-100[data-v-2963c74c]:before{content:"";height:.1px;width:8px;position:absolute;bottom:50%;right:0;background-color:#999}.element-create-selection[data-v-85b0bbaa]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;cursor:crosshair}.element-create-selection svg[data-v-85b0bbaa]{overflow:visible}.selection[data-v-85b0bbaa]{position:absolute;opacity:.8}.selection[data-v-85b0bbaa]:not(.line){border:1px solid #d14424}.shape-create-canvas[data-v-224f36be]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;cursor:crosshair}.shape-create-canvas svg[data-v-224f36be]{width:100%;height:100%;overflow:visible}.resize-handler[data-v-1e66197f]{position:absolute;width:10px;height:10px;left:0;top:0;margin:-5px 0 0 -5px;border:1px solid #d14424;background-color:#fff;border-radius:1px;cursor:pointer}.resize-handler.bottom.rotate-135[data-v-1e66197f],.resize-handler.left-bottom.rotate-90[data-v-1e66197f],.resize-handler.left-top.rotate-0[data-v-1e66197f],.resize-handler.left.rotate-45[data-v-1e66197f],.resize-handler.right-bottom.rotate-0[data-v-1e66197f],.resize-handler.right-top.rotate-90[data-v-1e66197f],.resize-handler.right.rotate-45[data-v-1e66197f],.resize-handler.top.rotate-135[data-v-1e66197f]{cursor:nwse-resize}.resize-handler.bottom.rotate-0[data-v-1e66197f],.resize-handler.left-bottom.rotate-135[data-v-1e66197f],.resize-handler.left-top.rotate-45[data-v-1e66197f],.resize-handler.left.rotate-90[data-v-1e66197f],.resize-handler.right-bottom.rotate-45[data-v-1e66197f],.resize-handler.right-top.rotate-135[data-v-1e66197f],.resize-handler.right.rotate-90[data-v-1e66197f],.resize-handler.top.rotate-0[data-v-1e66197f]{cursor:ns-resize}.resize-handler.bottom.rotate-45[data-v-1e66197f],.resize-handler.left-bottom.rotate-0[data-v-1e66197f],.resize-handler.left-top.rotate-90[data-v-1e66197f],.resize-handler.left.rotate-135[data-v-1e66197f],.resize-handler.right-bottom.rotate-90[data-v-1e66197f],.resize-handler.right-top.rotate-0[data-v-1e66197f],.resize-handler.right.rotate-135[data-v-1e66197f],.resize-handler.top.rotate-45[data-v-1e66197f]{cursor:nesw-resize}.resize-handler.bottom.rotate-90[data-v-1e66197f],.resize-handler.left-bottom.rotate-45[data-v-1e66197f],.resize-handler.left-top.rotate-135[data-v-1e66197f],.resize-handler.left.rotate-0[data-v-1e66197f],.resize-handler.right-bottom.rotate-135[data-v-1e66197f],.resize-handler.right-top.rotate-45[data-v-1e66197f],.resize-handler.right.rotate-0[data-v-1e66197f],.resize-handler.top.rotate-90[data-v-1e66197f]{cursor:ew-resize}.border-line[data-v-8346cf6c]{position:absolute;width:0;height:0;left:0;top:0;border:0 dashed #d14424}.border-line.top[data-v-8346cf6c]{border-top-width:1px}.border-line.bottom[data-v-8346cf6c]{border-bottom-width:1px}.border-line.left[data-v-8346cf6c]{border-left-width:1px}.border-line.right[data-v-8346cf6c]{border-right-width:1px}.border-line.wide[data-v-8346cf6c]:before{content:"";position:absolute;background:transparent;cursor:move}.border-line.wide.top[data-v-8346cf6c]:before{top:-8px;left:-8px;width:calc(100% + 16px);height:16px}.border-line.wide.bottom[data-v-8346cf6c]:before{bottom:-8px;left:-8px;width:calc(100% + 16px);height:16px}.border-line.wide.left[data-v-8346cf6c]:before{top:-8px;left:-8px;width:16px;height:calc(100% + 16px)}.border-line.wide.right[data-v-8346cf6c]:before{top:-8px;right:-8px;width:16px;height:calc(100% + 16px)}.multi-select-operate[data-v-97dc9b9a]{position:absolute;top:0;left:0;z-index:101}.rotate-handler[data-v-b99d8dae]{position:absolute;width:10px;height:10px;top:-25px;margin-left:-5px;border:1px solid #d14424;background-color:#fff;border-radius:1px;cursor:grab}.rotate-handler[data-v-b99d8dae]:active{cursor:grabbing}.image-element-operate.cliping[data-v-7bcad5a9]{visibility:hidden}.operate-keypoint-handler[data-v-52dcdbf8]{position:absolute;width:10px;height:10px;left:0;top:0;margin:-5px 0 0 -5px;border:1px solid #d14424;background-color:#ffe873;border-radius:1px}svg[data-v-3aa5cc44]{position:absolute;left:0;top:0;pointer-events:none;transform-origin:0 0}.anchor-line[data-v-3aa5cc44]{stroke-width:1px;stroke-dasharray:5 5;opacity:.5}.divider.horizontal[data-v-6b66cde8]{width:100%;margin:24px 0;border-block-start:1px solid rgba(5,5,5,.06)}.divider.vertical[data-v-6b66cde8]{position:relative;height:1em;display:inline-block;margin:0 8px;border-inline-start:1px solid rgba(5,5,5,.06)}.link-handler[data-v-316c4664]{height:30px;position:absolute;left:0;font-size:12px;padding:0 10px;background-color:#fff;box-shadow:3px 3px 3px rgba(0,0,0,.15);display:flex;align-items:center;color:#d14424}.link[data-v-316c4664]{max-width:300px;margin-right:20px;word-break:keep-all;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.btns[data-v-316c4664]{display:flex;align-items:center}.btns .btn[data-v-316c4664]{word-break:keep-all;cursor:pointer}.operate[data-v-5ec1ff35]{position:absolute;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.operate.multi-select[data-v-5ec1ff35]{opacity:.2}.animation-index[data-v-5ec1ff35]{position:absolute;top:0;left:-24px;font-size:12px}.animation-index .index-item[data-v-5ec1ff35]{width:18px;height:18px;background-color:#fff;color:#d14424;border:1px solid #d14424;display:flex;justify-content:center;align-items:center}.animation-index .index-item+.index-item[data-v-5ec1ff35]{margin-top:5px}.base-element-image[data-v-24fef706]{position:absolute}.rotate-wrapper[data-v-24fef706]{width:100%;height:100%}.element-content[data-v-24fef706]{width:100%;height:100%;position:relative}.element-content .image-content[data-v-24fef706]{width:100%;height:100%;overflow:hidden;position:relative}.element-content img[data-v-24fef706]{position:absolute}.color-mask[data-v-24fef706]{position:absolute;top:0;bottom:0;left:0;right:0}.base-element-text[data-v-52a206f2]{position:absolute}.rotate-wrapper[data-v-52a206f2]{width:100%;height:100%}.element-content[data-v-52a206f2]{position:relative;padding:10px;line-height:1.5;word-break:break-word}.element-content .text[data-v-52a206f2]{position:relative}.base-element-shape[data-v-b13f8fa8]{position:absolute}.rotate-wrapper[data-v-b13f8fa8]{width:100%;height:100%}.element-content[data-v-b13f8fa8]{width:100%;height:100%;position:relative}.element-content svg[data-v-b13f8fa8]{transform-origin:0 0;overflow:visible}.shape-text[data-v-b13f8fa8]{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;padding:10px;line-height:1.2;word-break:break-word}.shape-text.top[data-v-b13f8fa8]{justify-content:flex-start}.shape-text.middle[data-v-b13f8fa8]{justify-content:center}.shape-text.bottom[data-v-b13f8fa8]{justify-content:flex-end}.base-element-line[data-v-443e2f82]{position:absolute}.element-content[data-v-443e2f82]{width:100%;height:100%;position:relative}.element-content svg[data-v-443e2f82]{transform-origin:0 0;overflow:visible}.base-element-chart[data-v-7c03d68d]{position:absolute}.element-content[data-v-7c03d68d],.rotate-wrapper[data-v-7c03d68d]{width:100%;height:100%}.static-table[data-v-5d949d4d],table[data-v-5d949d4d]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}table[data-v-5d949d4d]{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;border:0;word-wrap:break-word;--themeColor:$themeColor;--subThemeColor1:$themeColor;--subThemeColor2:$themeColor}table.theme[data-v-5d949d4d]{background-color:#fff}table.theme tr:nth-child(2n) .cell[data-v-5d949d4d]{background-color:var(--subThemeColor1)}table.theme tr:nth-child(odd) .cell[data-v-5d949d4d]{background-color:var(--subThemeColor2)}table.theme.col-footer tr .cell[data-v-5d949d4d]:last-child,table.theme.col-header tr .cell[data-v-5d949d4d]:first-child,table.theme.row-footer tr:last-child .cell[data-v-5d949d4d],table.theme.row-header tr:first-child .cell[data-v-5d949d4d]{background-color:var(--themeColor)}table .cell[data-v-5d949d4d]{position:relative;white-space:normal;word-wrap:break-word;vertical-align:middle;background-clip:padding-box}table .cell-text[data-v-5d949d4d]{padding:5px;line-height:1.5}.base-element-table[data-v-3eff7eba]{position:absolute}.rotate-wrapper[data-v-3eff7eba]{width:100%;height:100%}.element-content[data-v-3eff7eba]{width:100%;height:100%;position:relative}.base-element-latex[data-v-1587280d]{position:absolute}.rotate-wrapper[data-v-1587280d]{width:100%;height:100%}.element-content[data-v-1587280d]{width:100%;height:100%;position:relative}.element-content svg[data-v-1587280d]{transform-origin:0 0;overflow:visible}.base-element-video[data-v-09436dde]{position:absolute}.rotate-wrapper[data-v-09436dde]{width:100%;height:100%}.element-content[data-v-09436dde]{width:100%;height:100%;background-color:#000;background-position:50%;background-size:contain;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.icon[data-v-09436dde]{font-size:140px;color:#aaa}.base-element-audio[data-v-5da834d7]{position:absolute}.rotate-wrapper[data-v-5da834d7]{width:100%;height:100%}.element-content[data-v-5da834d7]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.audio-icon[data-v-5da834d7]{cursor:move}.thumbnail-slide[data-v-43dcaa52]{background-color:#fff;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none}.elements[data-v-43dcaa52]{transform-origin:0 0}.background[data-v-43dcaa52]{width:100%;height:100%;background-position:50%;position:absolute}.placeholder[data-v-43dcaa52]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.tabs[data-v-5e3d7626]{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1}.tabs[data-v-5e3d7626]:not(.card){font-size:13px;align-items:center;justify-content:flex-start;border-bottom:1px solid #eee}.tabs:not(.card).space-around[data-v-5e3d7626]{justify-content:space-around}.tabs:not(.card).space-between[data-v-5e3d7626]{justify-content:space-between}.tabs:not(.card) .tab[data-v-5e3d7626]{text-align:center;border-bottom:2px solid transparent;padding:8px 10px;cursor:pointer}.tabs:not(.card) .tab.active[data-v-5e3d7626]{border-bottom:2px solid var(--color,#d14424)}.tabs.card[data-v-5e3d7626]{height:40px;font-size:12px;flex-shrink:0}.tabs.card .tab[data-v-5e3d7626]{flex:1;display:flex;justify-content:center;align-items:center;background-color:#f9f9f9;border-bottom:1px solid #eee;cursor:pointer}.tabs.card .tab.active[data-v-5e3d7626]{background-color:transparent;border-bottom-color:transparent}.tabs.card .tab+.tab[data-v-5e3d7626]{border-left:1px solid #eee}.button[data-v-52c90330]{height:32px;line-height:32px;outline:0;font-size:13px;padding:0 15px;text-align:center;color:#41464b;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none;letter-spacing:1px;cursor:pointer}.button.small[data-v-52c90330]{height:24px;line-height:24px;padding:0 7px;letter-spacing:0}.button.default[data-v-52c90330]{background-color:#fff;border:1px solid #d9d9d9;color:#41464b}.button.default[data-v-52c90330]:hover{color:#d14424;border-color:#d14424}.button.primary[data-v-52c90330]{background-color:#d14424;border:1px solid #d14424;color:#fff}.button.primary[data-v-52c90330]:hover{background-color:#de6949;border-color:#de6949}.button.checkbox[data-v-52c90330],.button.radio[data-v-52c90330]{background-color:#fff;border:1px solid #d9d9d9;color:#41464b}.button.checkbox[data-v-52c90330]:not(.checked):hover,.button.radio[data-v-52c90330]:not(.checked):hover{color:#d14424}.button.checked[data-v-52c90330]{color:#fff;background-color:#d14424;border-color:#d14424}.button.checked[data-v-52c90330]:hover{background-color:#de6949;border-color:#de6949}.button.disabled[data-v-52c90330]{background-color:#f5f5f5;border:1px solid #d9d9d9;color:#b7b7b7;cursor:default}.select[data-v-5bf3b141]{width:100%;height:32px;padding-right:32px;border-radius:2px;transition:border-color .25s;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#fff;border:1px solid #d9d9d9;position:relative;cursor:pointer}.select[data-v-5bf3b141]:not(.disabled):hover{border-color:#d14424}.select.disabled[data-v-5bf3b141]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7;cursor:default}.select .selector[data-v-5bf3b141]{min-width:50px;height:30px;line-height:30px;padding-left:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.options[data-v-5bf3b141]{max-height:260px;padding:5px;overflow:auto;text-align:left;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.option[data-v-5bf3b141]{height:32px;line-height:32px;padding:0 5px;border-radius:2px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.option.disabled[data-v-5bf3b141]{color:#b7b7b7;cursor:default}.option[data-v-5bf3b141]:not(.disabled,.selected):hover{background-color:hsla(0,0%,40%,.05)}.option.selected[data-v-5bf3b141]{background-color:rgba(209,68,36,.05)}.icon[data-v-5bf3b141]{width:32px;height:30px;color:#bfbfbf;position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center}.link-dialog[data-v-cc39ee16]{font-size:13px;line-height:1.675}.input[data-v-cc39ee16]{width:100%;height:32px}.preview[data-v-cc39ee16]{margin-top:12px}.thumbnail[data-v-cc39ee16]{border:1px solid rgba(209,68,36,.15);margin-top:5px}.btns[data-v-cc39ee16]{margin-top:20px;text-align:right}.mask[data-v-fea8edcc],.modal[data-v-fea8edcc]{top:0;left:0;width:100%;height:100%;z-index:5000}.modal[data-v-fea8edcc]{position:fixed;display:flex;justify-content:center;align-items:center;outline:0;border:0}.mask[data-v-fea8edcc]{position:absolute;background:rgba(0,0,0,.25)}.modal-content[data-v-fea8edcc]{z-index:5001;padding:20px;background:#fff;border-radius:2px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.2);position:relative}.close-btn[data-v-fea8edcc]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;position:absolute;top:16px;right:16px;cursor:pointer}.modal-fade-enter-active[data-v-fea8edcc]{animation:modal-fade-enter-fea8edcc .25s ease-in both}.modal-fade-leave-active[data-v-fea8edcc]{animation:modal-fade-leave-fea8edcc .25s ease-out both}.modal-zoom-enter-active[data-v-fea8edcc]{animation:modal-zoom-enter-fea8edcc .25s cubic-bezier(.4,0,0,1.5) both}.modal-zoom-leave-active[data-v-fea8edcc]{animation:modal-zoom-leave-fea8edcc .25s both}@keyframes modal-fade-enter-fea8edcc{0%{opacity:0}}@keyframes modal-fade-leave-fea8edcc{to{opacity:0}}@keyframes modal-zoom-enter-fea8edcc{0%{transform:scale3d(.3,.3,.3)}}@keyframes modal-zoom-leave-fea8edcc{to{transform:scale3d(.3,.3,.3)}}.canvas[data-v-ce64755c]{height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;background-color:#f9f9f9;position:relative}.drag-mask[data-v-ce64755c]{cursor:grab;position:absolute;top:0;right:0;bottom:0;left:0}.viewport-wrapper[data-v-ce64755c]{position:absolute;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.viewport[data-v-ce64755c]{position:absolute;top:0;left:0;transform-origin:0 0}.shape-item-thumbnail[data-v-8603ad34]{position:relative;cursor:pointer}.shape-content[data-v-8603ad34]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center}.shape-content:hover .shape-path[data-v-8603ad34]:not(.outlined){stroke:#d14424}.shape-content:hover .shape-path.outlined[data-v-8603ad34]{fill:#d14424}.shape-content svg[data-v-8603ad34]:not(:root){overflow:visible}.shape-pool[data-v-8b994b42]{width:340px;max-height:520px;overflow:auto;margin-top:-12px;margin-bottom:-12px;margin-right:-12px;padding-right:12px;padding-top:12px}.category-name[data-v-8b994b42]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:2px 0 2px 10px}.shape-list[data-v-8b994b42]{display:flex;flex-wrap:wrap;align-content:flex-start;margin-bottom:10px}.shape-item[data-v-8b994b42]{width:8%;margin-bottom:2.22222%;height:0;padding-bottom:8%;flex-shrink:0}.shape-item[data-v-8b994b42]:not(:nth-child(10n)){margin-right:2.22222%}.line-pool[data-v-554824b6]{width:220px;overflow:auto;margin-bottom:-12px;margin-right:-12px;padding-right:12px}.category-name[data-v-554824b6]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:2px 0 2px 10px}.line-list[data-v-554824b6]{display:flex;flex-wrap:wrap;align-content:flex-start;margin-bottom:10px}.line-item[data-v-554824b6]{width:19%;margin-bottom:1.25%;height:0;padding-bottom:19%;flex-shrink:0;position:relative;cursor:pointer}.line-item[data-v-554824b6]:not(:nth-child(5n)){margin-right:1.25%}.line-content[data-v-554824b6]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;color:#999}.line-content[data-v-554824b6]:hover{color:#d14424}.line-content svg[data-v-554824b6]:not(:root){overflow:visible}.chart-pool[data-v-398f5699]{width:200px;margin-bottom:-5px;display:flex;flex-wrap:wrap;align-content:flex-start}.chart-item[data-v-398f5699]{width:19%;margin-bottom:1.25%;height:0;padding-bottom:19%;flex-shrink:0;position:relative;cursor:pointer}.chart-item[data-v-398f5699]:not(:nth-child(5n)){margin-right:1.25%}.chart-content[data-v-398f5699]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;color:#999}.chart-content[data-v-398f5699]:hover{color:#d14424}.number-input[data-v-268948c2]{background-color:#fff;border:1px solid #d9d9d9;padding:0 0 0 5px;border-radius:2px;transition:border-color .25s;font-size:13px;display:inline-flex}.number-input .input-wrap[data-v-268948c2]{flex:1;color:#41464b;padding:0 0 0 5px;position:relative}.number-input:not(.disabled) .input-wrap:hover .handlers[data-v-268948c2]{opacity:1}.number-input .handlers[data-v-268948c2]{width:20px;position:absolute;top:0;bottom:0;right:0;display:flex;flex-direction:column;font-size:6px;color:#999;opacity:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:opacity .25s}.number-input .handlers .handler[data-v-268948c2]{width:100%;height:50%;display:flex;justify-content:center;align-items:center;border-left:1px solid #d9d9d9;cursor:pointer}.number-input .handlers .handler+.handler[data-v-268948c2]{border-top:1px solid #d9d9d9}.number-input .handlers .handler[data-v-268948c2]:hover{color:#d14424}.number-input input[data-v-268948c2]{width:100%;min-width:0;padding:0;height:30px;line-height:30px;outline:0;border:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.number-input input[data-v-268948c2]::-moz-placeholder{color:#bfbfbf}.number-input input[data-v-268948c2]::placeholder{color:#bfbfbf}.number-input.focused[data-v-268948c2],.number-input[data-v-268948c2]:not(.disabled):hover{border-color:#d14424}.number-input.disabled[data-v-268948c2]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.number-input .prefix[data-v-268948c2],.number-input .suffix[data-v-268948c2]{display:flex;justify-content:center;align-items:center;line-height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.table-generator[data-v-372c6730]{width:100%;margin-top:-12px}.title[data-v-372c6730]{height:28px;line-height:28px;background-color:#ededed;margin:0 -12px 12px -12px;padding:0 14px;font-size:12px;display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none}.title .right[data-v-372c6730]{cursor:pointer}.title .right[data-v-372c6730]:hover{color:#d14424}table[data-v-372c6730]{border-collapse:separate}td[data-v-372c6730]{width:23px;height:23px;line-height:23px;border:2px solid #fff;background-color:#f7f7f7}.cell[data-v-372c6730]{width:100%;height:100%;border:1px solid #dcdcdc}.cell.active[data-v-372c6730]{background-color:rgba(209,68,36,.1);border-color:#d14424}.custom[data-v-372c6730]{width:230px}.custom .row[data-v-372c6730]{display:flex;align-items:center}.custom .row+.row[data-v-372c6730]{margin-top:10px}.btns[data-v-372c6730]{margin-top:10px;text-align:right}.btns .btn[data-v-372c6730]{margin-left:10px}.media-input[data-v-35a1214c]{width:480px}.btns[data-v-35a1214c]{margin-top:10px;text-align:right}svg[data-v-567417d3]{overflow:hidden}.textarea[data-v-326ac8a0]{outline:0;width:100%;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;padding:10px;transition:border-color .25s;box-sizing:border-box;line-height:1.675;resize:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.textarea[data-v-326ac8a0]:focus{border-color:#d14424;background-color:#fff}.textarea.resizable[data-v-326ac8a0]{resize:vertical}.textarea.disabled[data-v-326ac8a0]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.textarea[data-v-326ac8a0]::-moz-placeholder{color:#bfbfbf}.textarea[data-v-326ac8a0]::placeholder{color:#bfbfbf}.latex-editor[data-v-46e48b5e]{height:560px}.container[data-v-46e48b5e]{height:calc(100% - 50px);display:flex}.left[data-v-46e48b5e]{width:540px;height:100%;display:flex;flex-direction:column;flex-shrink:0}.input-area[data-v-46e48b5e]{flex:1}.input-area textarea[data-v-46e48b5e]{height:100%!important;border-color:#eee!important;padding:10px!important}.input-area textarea[data-v-46e48b5e]:focus{box-shadow:none!important}.preview[data-v-46e48b5e]{height:160px;display:flex;justify-content:center;align-items:center;text-align:center;margin-top:20px;border:1px solid #eee;-webkit-user-select:none;-moz-user-select:none;user-select:none}.placeholder[data-v-46e48b5e]{color:#888;font-size:13px}.preview-content[data-v-46e48b5e]{width:100%;height:100%;padding:10px;display:flex;justify-content:center;align-items:center}.right[data-v-46e48b5e]{width:280px;height:100%;margin-left:20px;border:1px solid #eee;background-color:#fff;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}.content[data-v-46e48b5e]{height:calc(100% - 40px);font-size:13px}.formula[data-v-46e48b5e]{height:100%;padding:12px;overflow:auto;overflow:overlay}.formula-item+.formula-item[data-v-46e48b5e]{margin-top:10px}.formula-item .formula-title[data-v-46e48b5e]{margin-bottom:5px}.formula-item .formula-item-content[data-v-46e48b5e]{height:60px;padding:5px;display:flex;align-items:center;background-color:#f9f9f9;cursor:pointer}.symbol[data-v-46e48b5e]{height:100%;display:flex;flex-direction:column}.symbol-pool[data-v-46e48b5e]{display:flex;flex-wrap:wrap;flex:1;padding:12px;overflow:auto;overflow:overlay}.symbol-item[data-v-46e48b5e]{display:flex;justify-content:center;align-items:center}.symbol-item[data-v-46e48b5e]:hover{background-color:#f9f9f9;cursor:pointer}.footer[data-v-46e48b5e]{height:50px;display:flex;justify-content:flex-end;align-items:flex-end}.footer .btn[data-v-46e48b5e]{margin-left:10px}.canvas-tool[data-v-7e81f183]{position:relative;border-bottom:1px solid #eee;background-color:#fff;display:flex;justify-content:space-between;padding:0 10px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.left-handler[data-v-7e81f183]{display:flex;align-items:center}.add-element-handler[data-v-7e81f183]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex}.add-element-handler .handler-item[data-v-7e81f183]{width:32px}.add-element-handler .handler-item[data-v-7e81f183]:not(.group-btn):hover{background-color:#f1f1f1}.add-element-handler .handler-item.active[data-v-7e81f183]{color:#d14424}.add-element-handler .handler-item.group-btn[data-v-7e81f183]{width:auto;margin-right:4px}.add-element-handler .handler-item.group-btn[data-v-7e81f183]:hover{background-color:#f3f3f3}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183],.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]{height:100%;display:flex;justify-content:center;align-items:center}.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]{width:26px;padding:0 2px}.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]:hover{background-color:#e9e9e9}.add-element-handler .handler-item.group-btn .icon.active[data-v-7e81f183]{color:#d14424}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183]{font-size:12px}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183]:hover{background-color:#e9e9e9}.handler-item[data-v-7e81f183]{height:24px;font-size:14px;margin:0 2px;display:flex;justify-content:center;align-items:center;border-radius:2px;overflow:hidden;cursor:pointer}.handler-item.disable[data-v-7e81f183]{opacity:.5}.left-handler .handler-item[data-v-7e81f183],.right-handler .handler-item[data-v-7e81f183]{padding:0 8px}.left-handler .handler-item.active[data-v-7e81f183],.left-handler .handler-item[data-v-7e81f183]:not(.disable):hover,.right-handler .handler-item.active[data-v-7e81f183],.right-handler .handler-item[data-v-7e81f183]:not(.disable):hover{background-color:#f1f1f1}.right-handler[data-v-7e81f183]{display:flex;align-items:center}.right-handler .text[data-v-7e81f183]{display:inline-block;width:40px;text-align:center;cursor:pointer}.right-handler .viewport-size[data-v-7e81f183]{font-size:13px}@media screen and (width <= 1024px){.text[data-v-7e81f183]{display:none}}@media screen and (width <= 1000px){.left-handler[data-v-7e81f183],.right-handler[data-v-7e81f183]{display:none}}.layout-pool[data-v-8ee3e590]{width:394px;height:500px;padding:2px;margin-right:-12px;padding-right:12px;overflow:auto;display:flex;flex-wrap:wrap;align-content:flex-start}.layout-item[data-v-8ee3e590]{width:48%;margin-bottom:4%}.layout-item[data-v-8ee3e590]:not(:nth-child(2n)){margin-right:4%}.layout-item[data-v-8ee3e590]:last-child,.layout-item[data-v-8ee3e590]:nth-last-child(2){margin-bottom:0}.layout-item .thumbnail[data-v-8ee3e590]{outline:1px solid #eee;cursor:pointer}.layout-item .thumbnail[data-v-8ee3e590]:hover{outline-color:#d14424}.thumbnails[data-v-d525da14]{border-right:1px solid #eee;background-color:#fff;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}.add-slide[data-v-d525da14]{height:40px;font-size:12px;display:flex;flex-shrink:0;border-bottom:1px solid #eee;cursor:pointer}.add-slide .btn[data-v-d525da14]{flex:1;display:flex;justify-content:center;align-items:center}.add-slide .btn[data-v-d525da14]:hover{background-color:#f9f9f9}.add-slide .select-btn[data-v-d525da14]{width:30px;height:100%;display:flex;justify-content:center;align-items:center;border-left:1px solid #eee}.add-slide .select-btn[data-v-d525da14]:hover{background-color:#f9f9f9}.add-slide .icon[data-v-d525da14]{margin-right:3px;font-size:14px}.thumbnail-list[data-v-d525da14]{padding:5px 0;flex:1;overflow:auto}.thumbnail-item[data-v-d525da14]{display:flex;justify-content:center;align-items:center;padding:5px 0}.thumbnail-item .thumbnail[data-v-d525da14]{outline:1px solid rgba(209,68,36,.15)}.thumbnail-item.active .label[data-v-d525da14]{color:#d14424}.thumbnail-item.active .thumbnail[data-v-d525da14],.thumbnail-item.selected .thumbnail[data-v-d525da14]{outline-color:#d14424}.label[data-v-d525da14]{font-size:12px;color:#999;width:20px;cursor:grab}.label.offset-left[data-v-d525da14]{position:relative;left:-4px}.label[data-v-d525da14]:active{cursor:grabbing}.page-number[data-v-d525da14]{height:40px;font-size:12px;border-top:1px solid #eee;line-height:40px;text-align:center;color:#666}.slider[data-v-563bd2a0]{width:100%;height:12px;padding:4px 0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.slider.disabled .track[data-v-563bd2a0]{background-color:#b4b4b4}.slider.disabled .thumb[data-v-563bd2a0]{outline:2px solid #b4b4b4}.slider[data-v-563bd2a0]:not(.disabled){cursor:pointer}.slider:not(.disabled) .bar[data-v-563bd2a0]:hover{background-color:#f0f0f0}.slider:not(.disabled) .track[data-v-563bd2a0]:hover{background-color:#de6949}.slider:not(.disabled) .thumb[data-v-563bd2a0]:active,.slider:not(.disabled) .thumb[data-v-563bd2a0]:hover{outline:4px solid #d14424}.bar[data-v-563bd2a0]{width:calc(100% - 10px);margin-left:5px;height:4px;border-radius:2px;position:relative;background-color:#f5f5f5;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:background-color .2s}.track[data-v-563bd2a0]{position:absolute;top:0;left:0;height:100%;background-color:#d14424;transition:background-color .2s}.thumb[data-v-563bd2a0]{position:absolute;top:50%;left:0;width:10px;height:10px;background-color:#fff;outline:2px solid #d14424;transform:translate(-50%,-50%);border-radius:50%;z-index:100}.thumb[data-v-563bd2a0]:active:after,.thumb[data-v-563bd2a0]:active:before,.thumb[data-v-563bd2a0]:hover:after,.thumb[data-v-563bd2a0]:hover:before{display:block}.thumb[data-v-563bd2a0]:before{content:attr(data-tooltip);min-width:28px;bottom:24px;background-color:#262626;text-align:center;color:#fff;border-radius:2px;padding:6px 5px;font-size:12px}.thumb[data-v-563bd2a0]:after,.thumb[data-v-563bd2a0]:before{display:none;position:absolute;left:50%;transform:translateX(-50%)}.thumb[data-v-563bd2a0]:after{content:"";bottom:15px;border:5px solid transparent;border-top-color:#262626}.row[data-v-03715c20]{width:100%;display:flex;align-items:center;margin-bottom:10px}.color-btn[data-v-7fa73bdc]{width:100%;display:flex!important;align-items:center;justify-content:center;padding:0!important}.color-block[data-v-7fa73bdc]{height:20px;margin-left:8px;flex:1;outline:1px dashed hsla(0,0%,40%,.12);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAEBJREFUOE9jfPbs2X8GIoCkpCQRqhgYGEcNxBlOo2GIM2iGQLL5//8/UTnl+fPnxOWUUQNxhtNoGOLOKYM+2QAAh2Nq10DwkukAAAAASUVORK5CYII=)}.content[data-v-7fa73bdc]{width:100%;height:100%}.color-btn-icon[data-v-7fa73bdc]{width:32px;font-size:13px;color:#bfbfbf}.checkerboard[data-v-fa191ace]{background-size:contain}.alpha-checkboard-wrap[data-v-84628bc8],.alpha[data-v-84628bc8],.checkerboard[data-v-fa191ace]{position:absolute;top:0;right:0;bottom:0;left:0}.alpha-checkboard-wrap[data-v-84628bc8]{overflow:hidden}.alpha-gradient[data-v-84628bc8]{position:absolute;top:0;right:0;bottom:0;left:0}.alpha-container[data-v-84628bc8]{cursor:pointer;position:relative;z-index:2;height:100%;margin:0 3px}.alpha-pointer[data-v-84628bc8]{z-index:2;position:absolute}.alpha-picker[data-v-84628bc8]{cursor:pointer;width:4px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;margin-top:1px;transform:translateX(-2px)}.hue[data-v-5711e710]{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);position:absolute;top:0;right:0;bottom:0;left:0}.hue-container[data-v-5711e710]{cursor:pointer;margin:0 2px;position:relative;height:100%}.hue-pointer[data-v-5711e710]{z-index:2;position:absolute;top:0}.hue-picker[data-v-5711e710]{cursor:pointer;margin-top:1px;width:4px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;transform:translateX(-2px)}.saturation-black[data-v-c79c0446],.saturation-white[data-v-c79c0446],.saturation[data-v-c79c0446]{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer}.saturation-white[data-v-c79c0446]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-c79c0446]{background:linear-gradient(0deg,#000,transparent)}.saturation-pointer[data-v-c79c0446]{cursor:pointer;position:absolute}.saturation-circle[data-v-c79c0446]{width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);border-radius:50%;transform:translate(-2px,-2px)}.editable-input[data-v-eb50f8e8]{width:100%;position:relative;overflow:hidden;text-align:center;font-size:14px}.editable-input[data-v-eb50f8e8]:after{content:"#";position:absolute;left:0;top:50%;transform:translateY(-50%);color:#999}.input-content[data-v-eb50f8e8]{width:100%;padding:3px;border:0;border-bottom:1px solid #ddd;outline:none;text-align:center}.input-label[data-v-eb50f8e8]{text-transform:capitalize}.color-picker[data-v-fec0b01a]{position:relative;width:240px;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-bottom:-10px}.picker-saturation-wrap[data-v-fec0b01a]{width:100%;padding-bottom:50%;position:relative;overflow:hidden}.picker-controls[data-v-fec0b01a]{display:flex}.picker-sliders[data-v-fec0b01a]{padding:4px 0;flex:1}.picker-hue-wrap[data-v-fec0b01a]{position:relative;height:10px}.picker-alpha-wrap[data-v-fec0b01a]{position:relative;height:10px;margin-top:4px;overflow:hidden}.picker-color-wrap[data-v-fec0b01a]{width:24px;height:24px;position:relative;margin-top:4px;margin-right:4px;outline:1px dashed hsla(0,0%,40%,.12)}.picker-color-wrap .checkerboard[data-v-fec0b01a]{background-size:auto}.picker-current-color[data-v-fec0b01a]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.picker-field[data-v-fec0b01a]{display:flex;margin-bottom:8px}.picker-field .transparent[data-v-fec0b01a]{width:24px;height:24px;margin-top:4px;margin-left:8px;position:relative;cursor:pointer}.picker-field .transparent[data-v-fec0b01a]:after{content:"";width:26px;height:2px;position:absolute;top:11px;left:-1px;transform:rotate(-45deg);background-color:red}.picker-field .transparent .checkerboard[data-v-fec0b01a]{background-size:auto}.picker-field .straw[data-v-fec0b01a]{width:24px;height:24px;margin-top:4px;margin-left:8px;display:flex;justify-content:center;align-items:center;font-size:20px;background-color:#f5f5f5;outline:1px solid #f1f1f1;cursor:pointer}.picker-field .input[data-v-fec0b01a]{flex:1}.picker-presets[data-v-fec0b01a]{display:flex;flex-wrap:wrap;align-content:flex-start}.picker-presets-color[data-v-fec0b01a]{width:7%;margin-bottom:3.33333%;height:0;padding-bottom:7%;flex-shrink:0;position:relative;cursor:pointer}.picker-presets-color[data-v-fec0b01a]:not(:nth-child(10n)){margin-right:3.33333%}.picker-presets-color.alpha[data-v-fec0b01a]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADBJREFUOE9jfPbs2X8GPEBSUhKfNAPjqAHDIgz+//+PNx08f/4cfzoYNYCBceiHAQC5flV5JzgrxQAAAABJRU5ErkJggg==)}.picker-presets-color-content[data-v-fec0b01a]{position:absolute;top:0;right:0;bottom:0;left:0}.picker-gradient-presets[data-v-fec0b01a]{display:flex;flex-wrap:wrap;align-content:flex-start}.picker-gradient-col[data-v-fec0b01a]{width:7%;margin-bottom:3.33333%;display:flex;flex-direction:column}.picker-gradient-col[data-v-fec0b01a]:not(:nth-child(10n)){margin-right:3.33333%}.picker-gradient-color[data-v-fec0b01a]{width:100%;height:16px;position:relative;cursor:pointer}.recent-colors-title[data-v-fec0b01a]{font-size:12px;margin-bottom:4px}.switch[data-v-0566b060]{height:20px;display:inline-block;cursor:pointer}.switch:not(.disabled).active .switch-core[data-v-0566b060]{border-color:#d14424;background-color:#d14424}.switch:not(.disabled).active .switch-core[data-v-0566b060]:after{left:100%;margin-left:-17px}.switch.disabled[data-v-0566b060]{cursor:default}.switch.disabled .switch-core[data-v-0566b060]:after{background-color:#f5f5f5}.switch-core[data-v-0566b060]{margin:0;display:inline-block;position:relative;width:40px;height:20px;border:1px solid #d9d9d9;outline:none;border-radius:10px;box-sizing:border-box;background:#d9d9d9;transition:border-color .3s,background-color .3s;vertical-align:middle}.switch-core[data-v-0566b060]:after{content:"";position:absolute;top:1px;left:1px;border-radius:100%;transition:all .3s;width:16px;height:16px;background-color:#fff}.row[data-v-36e0c182]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-36e0c182]{text-align:right}.row[data-v-5507f822]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-5507f822]{text-align:right}.text-color-btn[data-v-37449800]{width:100%;display:flex!important;flex-direction:column;justify-content:center;align-items:center;padding:0}.text-color-block[data-v-37449800]{width:17px;height:4px;margin-top:1px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAACdJREFUGFdjfPbs2X8GBgYGSUlJEMXAiCHw//9/sIrnz59DVKALAADNxxVfaiODNQAAAABJRU5ErkJggg==)}.text-color-block .text-color-block-content[data-v-37449800]{width:100%;height:100%}.button-group[data-v-4db942e2]{display:flex;align-items:center}.button-group[data-v-4db942e2] button.button{border-radius:0;border-left-width:1px;border-right-width:0;display:inline-block}.button-group[data-v-4db942e2]:not(.passive) button.button:not(:last-child,.radio,.checkbox):hover{position:relative}.button-group[data-v-4db942e2]:not(.passive) button.button:not(:last-child,.radio,.checkbox):hover:after{content:"";width:1px;height:calc(100% + 2px);background-color:#d14424;position:absolute;top:-1px;right:-1px}.button-group[data-v-4db942e2]:not(.passive) button.button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.button-group[data-v-4db942e2]:not(.passive) button.button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.button-group.passive[data-v-4db942e2] button.button:not(.last,.radio,.checkbox):hover{position:relative}.button-group.passive[data-v-4db942e2] button.button:not(.last,.radio,.checkbox):hover:after{content:"";width:1px;height:calc(100% + 2px);background-color:#d14424;position:absolute;top:-1px;right:-1px}.button-group.passive[data-v-4db942e2] button.button.first{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.button-group.passive[data-v-4db942e2] button.button.last{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.select-group[data-v-d2acb09c]{display:flex;align-items:center}.select-group[data-v-d2acb09c] .select-wrap .select{border-radius:0;border-left-width:0;border-right-width:0}.select-group[data-v-d2acb09c] .select-wrap+.select-wrap .select{border-left-width:1px}.select-group[data-v-d2acb09c] .select-wrap:hover+.select-wrap .select{border-left-color:#d14424}.select-group[data-v-d2acb09c] .select-wrap:first-child .select{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.select-group[data-v-d2acb09c] .select-wrap:last-child .select{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.text-style-panel[data-v-478ca737]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-478ca737]{width:100%;display:flex;align-items:center;margin-bottom:10px}.preset-style[data-v-478ca737]{display:flex;flex-wrap:wrap;margin-bottom:10px}.preset-style-item[data-v-478ca737]{width:50%;height:50px;border:1px solid #d6d6d6;box-sizing:border-box;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer;transition:all .2s}.preset-style-item[data-v-478ca737]:hover{border-color:#d14424;color:#d14424;z-index:1}.preset-style-item[data-v-478ca737]:nth-child(2n){margin-left:-1px}.preset-style-item[data-v-478ca737]:nth-child(n+3){margin-top:-1px}.font-size-btn[data-v-478ca737]{padding:0}.link-popover[data-v-478ca737]{width:240px}.link-popover .btns[data-v-478ca737]{margin-top:10px;text-align:right}.list-wrap[data-v-478ca737]{width:176px;color:#666;padding:8px;margin:-12px;display:flex;flex-wrap:wrap;align-content:flex-start}.list[data-v-478ca737]{background-color:#f9f9f9;padding:4px 4px 4px 20px;cursor:pointer}.list[data-v-478ca737]:not(:nth-child(3n)){margin-right:8px}.list[data-v-478ca737]:nth-child(4),.list[data-v-478ca737]:nth-child(5),.list[data-v-478ca737]:nth-child(6){margin-top:8px}.list[data-v-478ca737]:hover{color:#d14424}.list:hover span[data-v-478ca737]{background-color:#d14424}.list-item[data-v-478ca737]{width:24px;height:12px;position:relative;font-size:12px;top:-5px}.list-item span[data-v-478ca737]{width:100%;height:2px;display:inline-block;position:absolute;top:10px;background-color:#666}.popover-btn[data-v-478ca737]{padding:0 3px}.row[data-v-2c8acf3c],.row[data-v-7571b056]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-2c8acf3c]{text-align:right}.filter[data-v-2c8acf3c]{font-size:12px}.filter-item[data-v-2c8acf3c]{padding:6px 0;display:flex;justify-content:center;align-items:center}.filter-item .name[data-v-2c8acf3c]{width:60px}.filter-item .filter-slider[data-v-2c8acf3c]{flex:1;margin:0 6px}.row[data-v-0ae0ff99]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-0ae0ff99]{text-align:right}.row[data-v-2e186970]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-2e186970]{text-align:right}.origin-image[data-v-2e186970]{height:100px;background-size:contain;background-repeat:no-repeat;background-position:50%;background-color:#f9f9f9;margin-bottom:10px}.full-width-btn[data-v-2e186970]{width:100%;margin-bottom:10px}.btn-icon[data-v-2e186970]{margin-right:3px}.clip[data-v-2e186970]{width:260px;font-size:12px}.clip .title[data-v-2e186970]{margin-bottom:5px}.shape-clip[data-v-2e186970]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-content:flex-start}.shape-clip-item[data-v-2e186970]{display:flex;justify-content:center;align-items:center;cursor:pointer;width:16%;margin-bottom:5%}.shape-clip-item[data-v-2e186970]:not(:nth-child(5n)){margin-right:5%}.shape-clip-item:hover .shape[data-v-2e186970]{background-color:#ccc}.shape-clip-item .shape[data-v-2e186970]{width:40px;height:40px;background-color:#e1e1e1}.popover-btn[data-v-2e186970]{padding:0 3px}.shape-style-panel[data-v-0674f2cf]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-0674f2cf]{width:100%;display:flex;align-items:center;margin-bottom:10px}.font-size-btn[data-v-0674f2cf]{padding:0}.title[data-v-0674f2cf]{display:flex;justify-content:space-between;margin-bottom:10px}.shape-pool[data-v-0674f2cf]{width:235px;height:150px;overflow:auto;padding:5px;padding-right:10px;border:1px solid #eee;margin-bottom:20px}.shape-list[data-v-0674f2cf]{display:flex;flex-wrap:wrap;align-content:flex-start}.shape-item[data-v-0674f2cf]{width:14%;margin-bottom:3.2%;height:0;padding-bottom:14%;flex-shrink:0}.shape-item[data-v-0674f2cf]:not(:nth-child(6n)){margin-right:3.2%}.row[data-v-ae80032c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.line-btn[data-v-ae80032c]{display:flex;align-items:center;justify-content:space-between;padding:0!important}.line-btn .line-wrapper[data-v-ae80032c]{margin-left:8px}.line-wrapper[data-v-ae80032c]{overflow:visible}.line-btn-icon[data-v-ae80032c]{width:30px;font-size:12px;margin-top:2px;color:#bfbfbf}.preset-point-style[data-v-ae80032c]{padding:0 10px}.preset-point-style+.preset-point-style[data-v-ae80032c]{margin-top:10px}.chart-data-editor[data-v-f7b59928]{width:600px;position:relative}.editor-content[data-v-f7b59928]{width:100%;height:360px;position:relative;border-right:1px solid #ccc;border-bottom:1px solid #ccc;overflow:auto;overflow:overlay}.range-box[data-v-f7b59928]{position:absolute;top:0;left:0;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.temp-range[data-v-f7b59928]{width:0;height:0;position:absolute;top:0;left:0;background-color:hsla(0,0%,53%,.3)}.range-line[data-v-f7b59928]{width:0;height:0;position:absolute;left:0;top:0;border:0 solid #d14424}.range-line.t[data-v-f7b59928]{border-top-width:1px}.range-line.b[data-v-f7b59928]{border-bottom-width:1px}.range-line.l[data-v-f7b59928]{border-left-width:1px}.range-line.r[data-v-f7b59928]{border-right-width:1px}.resizable[data-v-f7b59928]{position:absolute;width:12px;height:12px;left:0;top:0;margin:-9px 0 0 -9px;cursor:nwse-resize}.resizable[data-v-f7b59928]:after{content:"";position:absolute;width:4px;height:12px;right:0;top:0;background-color:#d14424}.resizable[data-v-f7b59928]:before{content:"";position:absolute;width:12px;height:4px;right:0;bottom:0;background-color:#d14424}table[data-v-f7b59928]{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;table-layout:fixed}table td[data-v-f7b59928]{text-align:center;border:1px solid #ccc;vertical-align:middle;width:100px;height:32px}table td.head[data-v-f7b59928]{background-color:rgba(209,68,36,.1)}table .item[data-v-f7b59928]{width:100%;height:100%;border:0;outline:0;font-size:13px;text-align:center;background-color:transparent}table .item.selected[data-v-f7b59928]{background-color:rgba(209,68,36,.02)}.btns[data-v-f7b59928]{margin-top:10px;display:flex;justify-content:space-between}.checkbox[data-v-26bf4835]{height:20px;display:flex;align-items:center;cursor:pointer}.checkbox:not(.disabled).checked .checkbox-input[data-v-26bf4835]{background-color:#d14424;border-color:#d14424}.checkbox:not(.disabled).checked .checkbox-input[data-v-26bf4835]:after{transform:rotate(45deg) scaleY(1)}.checkbox:not(.disabled).checked .checkbox-label[data-v-26bf4835]{color:#d14424}.checkbox.disabled[data-v-26bf4835]{color:#b7b7b7;cursor:default}.checkbox.disabled .checkbox-input[data-v-26bf4835]{background-color:#f5f5f5}.checkbox-input[data-v-26bf4835]{display:inline-block;position:relative;border:1px solid #d9d9d9;border-radius:2px;width:16px;height:16px;background-color:#fff;vertical-align:middle;transition:border-color .15s cubic-bezier(.71,-.46,.29,1.46),background-color .15s cubic-bezier(.71,-.46,.29,1.46);z-index:1}.checkbox-input[data-v-26bf4835]:after{content:"";border:2px solid #fff;border-left:0;border-top:0;height:9px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:6px;transition:transform .15s ease-in .05s;transform-origin:center}.checkbox-original[data-v-26bf4835]{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.checkbox-label[data-v-26bf4835]{margin-left:5px;line-height:20px;font-size:13px}.chart-style-panel[data-v-45827db6],.checkbox-label[data-v-26bf4835]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-45827db6]{width:100%;display:flex;align-items:center;margin-bottom:10px}.full-width-btn[data-v-45827db6]{width:100%}.btn-icon[data-v-45827db6]{margin-right:3px}.color-btn-wrap[data-v-45827db6]{position:relative}.delete-color-btn[data-v-45827db6]{position:absolute;width:30px;right:2px;top:2px;bottom:2px;display:flex;justify-content:center;align-items:center;background-color:#fff;cursor:pointer}.preset-themes[data-v-45827db6]{width:250px;margin-bottom:-10px;display:flex;flex-wrap:wrap;align-content:flex-start}.preset-theme[data-v-45827db6]{display:flex;cursor:pointer;width:48%;margin-bottom:4%}.preset-theme[data-v-45827db6]:not(:nth-child(2n)){margin-right:4%}.preset-theme-color[data-v-45827db6]{width:20px;height:20px}.preset-theme-color.select[data-v-45827db6]{transform:scale(1.2);transition:transform .1s}.row[data-v-e5523cbc]{width:100%;display:flex;align-items:center;margin-bottom:10px}.theme-switch[data-v-e5523cbc]{margin-bottom:18px}.switch-wrapper[data-v-e5523cbc]{text-align:right}.set-count[data-v-e5523cbc]{display:flex;justify-content:center;align-items:center}.set-count .btn[data-v-e5523cbc]{padding:0 8px}.set-count .count-text[data-v-e5523cbc]{flex:1;text-align:center;margin:0 8px}.row[data-v-3a5ca316],.row[data-v-b3551c8c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.background-image-wrapper[data-v-b3551c8c],.title[data-v-b3551c8c]{margin-bottom:10px}.background-image[data-v-b3551c8c]{height:0;padding-bottom:56.25%;border:1px dashed #eee;border-radius:2px;position:relative;transition:all .2s}.background-image[data-v-b3551c8c]:hover{border-color:#d14424;color:#d14424}.background-image .content[data-v-b3551c8c]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-position:50%;background-size:contain;background-repeat:no-repeat;cursor:pointer}.switch-row[data-v-b3551c8c]{height:32px}.switch-wrapper[data-v-b3551c8c]{text-align:right}.row[data-v-32517bcf]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-row[data-v-32517bcf]{height:32px}.switch-wrapper[data-v-32517bcf]{text-align:right}.row[data-v-80f1bc4e]{width:100%;display:flex;align-items:center;margin-bottom:10px}.font-size-btn[data-v-80f1bc4e]{padding:0}.row[data-v-a2bcea28]{width:100%;display:flex;align-items:center;margin-bottom:10px}.title[data-v-a2bcea28]{margin-bottom:10px}.label[data-v-a2bcea28]{text-align:center}.btn-icon[data-v-a2bcea28]{margin-right:3px}.icon-btn[data-v-a2bcea28]{cursor:pointer}.text-btn[data-v-a2bcea28]{height:30px;line-height:30px;text-align:center;cursor:pointer}.text-btn[data-v-a2bcea28]:hover{background-color:#efefef;border-radius:2px}.element-animation-panel[data-v-270c5d30]{height:100%;display:flex;flex-direction:column}.element-animation[data-v-270c5d30]{height:32px;display:flex;align-items:center}.element-animation-btn[data-v-270c5d30]{width:100%}.config-item[data-v-270c5d30]{display:flex;align-items:center}.config-item+.config-item[data-v-270c5d30]{margin-top:5px}.tip[data-v-270c5d30]{height:32px;display:flex;justify-content:center;align-items:center;font-style:italic}.animation-pool[data-v-270c5d30]{width:400px;height:500px;overflow-y:auto;overflow-x:hidden;font-size:12px;margin-right:-10px;padding-right:5px;position:relative}.animation-pool .mask[data-v-270c5d30]{position:absolute;top:0;right:0;bottom:0;left:0}.animation-pool.in .type-title[data-v-270c5d30]{border-left-color:#68a490;background-color:rgba(104,164,144,.15)}.animation-pool.out .type-title[data-v-270c5d30]{border-left-color:#d86344;background-color:rgba(216,99,68,.15)}.animation-pool.attention .type-title[data-v-270c5d30]{border-left-color:#e8b76a;background-color:hsla(37,73%,66%,.15)}.pool-type[data-v-270c5d30]:not(:last-child){margin-bottom:5px}.type-title[data-v-270c5d30]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:4px 0 4px 10px}.pool-item-wrapper[data-v-270c5d30]{display:flex;flex-wrap:wrap;align-content:flex-start}.pool-item[data-v-270c5d30]{width:24%;margin-bottom:1.33333%;margin-bottom:5px;height:40px;line-height:40px;text-align:center;cursor:pointer}.pool-item[data-v-270c5d30]:not(:nth-child(4n)){margin-right:1.33333%}.animation-box[data-v-270c5d30]{background-color:#f9f9f9;border-radius:2px}.animation-sequence[data-v-270c5d30]{flex:1;padding-right:12px;margin-right:-12px;overflow:auto;overflow:overlay}.sequence-item[data-v-270c5d30]{border:1px solid #eee;padding:8px;border-radius:2px;margin-bottom:8px;transition:all .5s}.sequence-item.in.active[data-v-270c5d30]{border-color:#68a490}.sequence-item.out.active[data-v-270c5d30]{border-color:#d86344}.sequence-item.attention.active[data-v-270c5d30]{border-color:#e8b76a}.sequence-item.active[data-v-270c5d30]{height:auto}.sequence-item .sequence-content[data-v-270c5d30]{display:flex;align-items:center;cursor:grab}.sequence-item .sequence-content[data-v-270c5d30]:active{cursor:grabbing}.sequence-item .sequence-content .index[data-v-270c5d30]{flex:1}.sequence-item .sequence-content .text[data-v-270c5d30]{flex:6}.sequence-item .sequence-content .handler[data-v-270c5d30]{flex:2;font-size:15px;text-align:right}.sequence-item .sequence-content .handler-btn[data-v-270c5d30]{margin-left:8px;cursor:pointer}.slide-design-panel[data-v-475ddcb8]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-475ddcb8]{width:100%;display:flex;align-items:center;margin-bottom:10px}.background-image-wrapper[data-v-475ddcb8],.title[data-v-475ddcb8]{margin-bottom:10px}.background-image[data-v-475ddcb8]{height:0;padding-bottom:56.25%;border:1px dashed #eee;border-radius:2px;position:relative;transition:all .2s}.background-image[data-v-475ddcb8]:hover{border-color:#d14424;color:#d14424}.background-image .content[data-v-475ddcb8]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-position:50%;background-size:contain;background-repeat:no-repeat;cursor:pointer}.theme-list[data-v-475ddcb8]{display:flex;flex-wrap:wrap;align-content:flex-start}.theme-item[data-v-475ddcb8]{width:48%;margin-bottom:4%;padding-bottom:30%;border-radius:2px;position:relative;cursor:pointer}.theme-item[data-v-475ddcb8]:not(:nth-child(2n)){margin-right:4%}.theme-item .theme-item-content[data-v-475ddcb8]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;justify-content:center;padding:8px;border:1px solid #eee;border-radius:2px}.theme-item .text[data-v-475ddcb8]{font-size:16px}.theme-item .colors[data-v-475ddcb8]{display:flex}.theme-item .color-block[data-v-475ddcb8]{margin-top:8px;width:12px;height:12px;margin-right:2px}.theme-item:hover .btns[data-v-475ddcb8]{display:flex}.theme-item .btns[data-v-475ddcb8]{position:absolute;top:0;right:0;bottom:0;left:0;flex-direction:column;justify-content:center;align-items:center;display:none;background-color:rgba(0,0,0,.25)}.theme-item .btn[data-v-475ddcb8]{width:72px;padding:5px 0;text-align:center;background-color:#d14424;color:#fff;font-size:12px;border-radius:2px}.theme-item .btn[data-v-475ddcb8]:hover{background-color:#de6949}.theme-item .btn+.btn[data-v-475ddcb8]{margin-top:5px}.animation-pool[data-v-da618e26]{display:flex;flex-wrap:wrap;margin-bottom:10px}.animation-item[data-v-da618e26]{width:50%;height:100px;border:1px solid #d6d6d6;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:20px 0 15px 0;position:relative;cursor:pointer}.animation-item.active[data-v-da618e26]{border-color:#d14424;z-index:1}.animation-item[data-v-da618e26]:nth-child(2n){margin-left:-1px}.animation-item[data-v-da618e26]:nth-child(n+3){margin-top:-1px}.animation-block[data-v-da618e26]{width:64px;height:36px;background:#666;position:relative;overflow:hidden}.animation-block.fade[data-v-da618e26]:hover:after{animation:fade-da618e26 .3s linear}.animation-block.fade[data-v-da618e26]:hover:after,.animation-block.slideX[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.slideX[data-v-da618e26]:hover:after{animation:slideX-da618e26 .3s linear}.animation-block.slideY[data-v-da618e26]:hover:after{animation:slideY-da618e26 .3s linear}.animation-block.slideX3D[data-v-da618e26]:hover:after,.animation-block.slideY[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.slideX3D[data-v-da618e26]:hover:after{animation:slideX3D-da618e26 .3s linear}.animation-block.slideY3D[data-v-da618e26]:hover:after{animation:slideY3D-da618e26 .3s linear}.animation-block.rotate[data-v-da618e26]:hover:after,.animation-block.slideY3D[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.rotate[data-v-da618e26]:hover:after{transform-origin:0 0;animation:rotate-da618e26 .3s linear}.animation-block.scaleY[data-v-da618e26]:hover:after{animation:scaleY-da618e26 .3s linear}.animation-block.scaleX[data-v-da618e26]:hover:after,.animation-block.scaleY[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.scaleX[data-v-da618e26]:hover:after{animation:scaleX-da618e26 .3s linear}.animation-block.scale[data-v-da618e26]:hover:after{animation:scale-da618e26 .3s linear}.animation-block.scaleReverse[data-v-da618e26]:hover:after,.animation-block.scale[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.scaleReverse[data-v-da618e26]:hover:after{animation:scaleReverse-da618e26 .3s linear}.animation-text[data-v-da618e26]{font-size:12px;color:#333;text-align:center}@keyframes fade-da618e26{0%{opacity:0}to{opacity:1}}@keyframes slideX-da618e26{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideY-da618e26{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideX3D-da618e26{0%{transform:translateX(100%) scale(.5)}to{transform:translateX(0)}}@keyframes slideY3D-da618e26{0%{transform:translateY(100%) scale(.5)}to{transform:translateY(0)}}@keyframes rotate-da618e26{0%{transform:rotate(-90deg)}to{transform:rotate(0)}}@keyframes scaleY-da618e26{0%{transform:scaleY(.1)}to{transform:scaleY(1)}}@keyframes scaleX-da618e26{0%{transform:scaleX(.1)}to{transform:scaleY(1)}}@keyframes scale-da618e26{0%{transform:scale(.25)}to{transform:scale(1)}}@keyframes scaleReverse-da618e26{0%{transform:scale(2)}to{transform:scale(1)}}.row[data-v-e95a4c6c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.symbol-panel[data-v-2bb5f257]{height:100%;display:flex;flex-direction:column}.symbol-panel .pool[data-v-2bb5f257]{padding:5px 12px;margin:0 -12px;flex:1;font-size:18px;overflow:auto;overflow:overlay;display:flex;flex-wrap:wrap;align-content:flex-start}.symbol-panel .symbol-item[data-v-2bb5f257]{width:18%;margin-bottom:2.5%;height:0;padding-bottom:18%;position:relative;cursor:pointer;border:1px solid #eee}.symbol-panel .symbol-item[data-v-2bb5f257]:not(:nth-child(5n)){margin-right:2.5%}.symbol-panel .symbol-item[data-v-2bb5f257]:hover{color:#d14424}.symbol-panel .symbol-item .symbol[data-v-2bb5f257]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-color:#fff}.toolbar[data-v-6c9ece83]{border-left:1px solid #eee;background-color:#fff;display:flex;flex-direction:column}.content[data-v-6c9ece83]{padding:12px;font-size:13px;overflow:auto;overflow:overlay}.prosemirror-editor[data-v-159c016f]{cursor:text}.prosemirror-editor[data-v-159c016f] .ProseMirror{font-size:12px;overflow:auto;padding:8px;line-height:1.5}.prosemirror-editor[data-v-159c016f] .ProseMirror>p[data-placeholder]:before{content:attr(data-placeholder);pointer-events:none;position:absolute;font-size:12px;color:hsla(0,0%,40%,.5)}.menu[data-v-159c016f]{display:flex;background-color:#fff;padding:5px;border-radius:2px;box-shadow:0 0 20px 0 rgba(0,0,0,.15)}.menu button[data-v-159c016f]{outline:0;border:0;background-color:#fff;padding:3px;border-radius:2px;font-size:15px;margin:0 3px;cursor:pointer}.menu button.active[data-v-159c016f],.menu button[data-v-159c016f]:hover{background-color:#d14424;color:#fff}.remark[data-v-458a41b9]{position:relative;border-top:1px solid #eee}.resize-handler[data-v-458a41b9]{height:7px;position:absolute;top:-3px;left:0;right:0;cursor:n-resize;z-index:2}.export-img-dialog[data-v-1df3f398]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.thumbnails-view[data-v-1df3f398],.thumbnails-view[data-v-1df3f398]:after{position:absolute;top:0;right:0;bottom:0;left:0}.thumbnails-view[data-v-1df3f398]:after{content:"";background-color:#fff}.configs[data-v-1df3f398]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center;z-index:1}.configs .row[data-v-1df3f398]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-1df3f398]{width:100px;position:relative}.configs .title[data-v-1df3f398]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-1df3f398]{flex:1}.btns[data-v-1df3f398]{width:300px;height:100px;display:flex;justify-content:center;align-items:center;z-index:1}.btns .export[data-v-1df3f398]{flex:1}.btns .close[data-v-1df3f398]{width:100px;margin-left:10px}.export-json-dialog[data-v-6a7223ca]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.preview[data-v-6a7223ca]{width:100%;height:calc(100% - 100px);background-color:#f9f9f9;color:#0451a5;overflow:auto}pre[data-v-6a7223ca]{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.btns[data-v-6a7223ca]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-6a7223ca]{flex:1}.btns .close[data-v-6a7223ca]{width:100px;margin-left:10px}[data-v-6a7223ca]::-webkit-scrollbar{width:10px;height:10px;background-color:#f9f9f9}[data-v-6a7223ca]::-webkit-scrollbar-thumb{background-color:#c1c1c1}.export-pdf-dialog[data-v-1668f898]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.thumbnails-view[data-v-1668f898],.thumbnails-view[data-v-1668f898]:after{position:absolute;top:0;right:0;bottom:0;left:0}.thumbnails-view[data-v-1668f898]:after{content:"";background-color:#fff}.thumbnail.break-page[data-v-1668f898]{-moz-column-break-after:page;break-after:page}.configs[data-v-1668f898]{width:300px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center;z-index:1}.configs .row[data-v-1668f898]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-1668f898]{width:100px}.configs .config-item[data-v-1668f898]{flex:1}.configs .tip[data-v-1668f898]{font-size:12px;color:#aaa;line-height:1.8;margin-top:25px}.btns[data-v-1668f898]{width:300px;height:100px;display:flex;justify-content:center;align-items:center;z-index:1}.btns .export[data-v-1668f898]{flex:1}.btns .close[data-v-1668f898]{width:100px;margin-left:10px}.export-pptx-dialog[data-v-265d4b60]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.configs[data-v-265d4b60]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center}.configs .row[data-v-265d4b60]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-265d4b60]{width:100px;position:relative}.configs .title[data-v-265d4b60]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-265d4b60]{flex:1}.configs .tip[data-v-265d4b60]{font-size:12px;color:#aaa;line-height:1.8;margin-top:10px}.btns[data-v-265d4b60]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-265d4b60]{flex:1}.btns .close[data-v-265d4b60]{width:100px;margin-left:10px}.export-pptist-dialog[data-v-26422ed7]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.configs[data-v-26422ed7]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center}.configs .row[data-v-26422ed7]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-26422ed7]{width:100px;position:relative}.configs .title[data-v-26422ed7]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-26422ed7]{flex:1}.configs .tip[data-v-26422ed7]{font-size:12px;color:#aaa;line-height:1.8;margin-top:25px}.btns[data-v-26422ed7]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-26422ed7]{flex:1}.btns .close[data-v-26422ed7]{width:100px;margin-left:10px}.export-dialog[data-v-b20137f0]{margin:-20px}.content[data-v-b20137f0]{height:460px;padding:12px;font-size:13px;overflow:auto;overflow:overlay}.moveable-panel[data-v-fc791e00]{position:fixed;background-color:#fff;box-shadow:0 2px 12px 0 rgba(56,56,56,.15);border:1px solid #eee;border-radius:2px;display:flex;flex-direction:column;z-index:999}.header[data-v-fc791e00]{height:40px;display:flex;align-items:center;border-bottom:1px solid #f0f0f0;cursor:move}.title[data-v-fc791e00]{flex:1;font-size:13px;padding-left:10px}.close-btn[data-v-fc791e00]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;color:#666;font-size:12px;cursor:pointer}.content[data-v-fc791e00]{flex:1;padding:10px;overflow:auto}.select-panel[data-v-15470598]{height:100%;font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.handler[data-v-15470598]{height:24px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}.handler .icon-btns[data-v-15470598]{height:100%;flex:1;display:flex;align-items:center;justify-content:flex-end}.handler .icon-btn[data-v-15470598]{width:16px;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer}.handler .icon-btn[data-v-15470598]:hover{color:#d14424}.element-list[data-v-15470598]{height:calc(100% - 32px);padding-right:10px;margin-right:-10px;overflow:auto}.item[data-v-15470598]{padding:5px;font-size:12px;border-radius:2px;display:flex;align-items:center;cursor:pointer}.item.active[data-v-15470598]{background-color:rgba(209,68,36,.1)}.item.group-active[data-v-15470598]{background-color:rgba(209,68,36,.2)}.item[data-v-15470598]:hover{background-color:rgba(209,68,36,.25)}.item .name[data-v-15470598]{height:18px;line-height:18px;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.item .icons[data-v-15470598]{width:20px;display:flex;align-items:center;justify-content:center;margin-left:5px}.group-els[data-v-15470598]{padding:5px 0}.group-els .group-title[data-v-15470598]{margin-bottom:5px;padding:0 5px}.group-els .item[data-v-15470598]{margin-left:15px}.input[data-v-15470598]{width:100%;height:16px;border:0;outline:0;padding-left:0;padding-right:0;flex:1;font-size:12px;background-color:transparent}.search-panel[data-v-4a78162c]{font-size:13px}.content[data-v-4a78162c]{display:flex;flex-direction:column;justify-content:space-between}.input[data-v-4a78162c]{margin-top:10px}.count[data-v-4a78162c]{margin-right:8px}.count[data-v-4a78162c],.ignore-case[data-v-4a78162c]{font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ignore-case[data-v-4a78162c]{cursor:pointer}.ignore-case.active[data-v-4a78162c]{color:#d14424}.next-btn[data-v-4a78162c]{width:22px;height:100%;display:flex;justify-content:center;align-items:center;margin:0!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.next-btn[data-v-4a78162c]:hover{color:#d14424}.footer[data-v-4a78162c]{display:flex;justify-content:flex-end;align-items:center;margin-top:10px}.close-btn[data-v-4a78162c]{width:32px;height:32px;position:absolute;top:8px;right:3px;display:flex;justify-content:center;align-items:center;color:#666;font-size:12px;cursor:pointer}.pptist-editor[data-v-1e00f97b]{height:100%}.layout-header[data-v-1e00f97b]{height:40px}.layout-content[data-v-1e00f97b]{height:calc(100% - 40px);display:flex}.layout-content-left[data-v-1e00f97b]{width:160px;height:100%;flex-shrink:0}.layout-content-center[data-v-1e00f97b]{width:calc(100% - 420px)}.layout-content-center .center-top[data-v-1e00f97b]{height:40px}.layout-content-right[data-v-1e00f97b]{width:260px;height:100%}.screen-element-video[data-v-76bf5b3f]{position:absolute}.element-content[data-v-76bf5b3f],.rotate-wrapper[data-v-76bf5b3f]{width:100%;height:100%}.screen-element-audio[data-v-adf39436]{position:absolute}.rotate-wrapper[data-v-adf39436]{width:100%;height:100%}.element-content[data-v-adf39436]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.element-content:hover .audio-player[data-v-adf39436]{display:block}.audio-icon[data-v-adf39436]{cursor:pointer}.audio-player[data-v-adf39436]{position:absolute;display:none}.link[data-v-2139723a]{cursor:pointer}.screen-slide[data-v-016af5da]{position:absolute;top:0;left:0;transform-origin:0 0;overflow:hidden}.background[data-v-016af5da]{width:100%;height:100%;background-position:50%;position:absolute}.screen-slide-list[data-v-552b63d2]{background:#1d1d1d;position:relative;width:100%;height:100%}.slide-item[data-v-552b63d2]{position:absolute;top:0;left:0;width:100%;height:100%}.slide-item.current[data-v-552b63d2]{z-index:2}.slide-item.hide[data-v-552b63d2]{opacity:0}.slide-item.turning-mode-no.before[data-v-552b63d2]{transform:translateY(-100%)}.slide-item.turning-mode-no.after[data-v-552b63d2]{transform:translateY(100%)}.slide-item.turning-mode-fade[data-v-552b63d2]{transition:opacity .75s}.slide-item.turning-mode-fade.after[data-v-552b63d2],.slide-item.turning-mode-fade.before[data-v-552b63d2]{pointer-events:none;opacity:0}.slide-item.turning-mode-slideX[data-v-552b63d2]{transition:transform .35s}.slide-item.turning-mode-slideX.before[data-v-552b63d2]{transform:translateX(-100%)}.slide-item.turning-mode-slideX.after[data-v-552b63d2]{transform:translateX(100%)}.slide-item.turning-mode-slideY[data-v-552b63d2]{transition:transform .35s}.slide-item.turning-mode-slideY.before[data-v-552b63d2]{transform:translateY(-100%)}.slide-item.turning-mode-slideY.after[data-v-552b63d2]{transform:translateY(100%)}.slide-item.turning-mode-slideX3D[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-slideX3D.before[data-v-552b63d2]{transform:translateX(-100%) scale(.5)}.slide-item.turning-mode-slideX3D.after[data-v-552b63d2]{transform:translateX(100%) scale(.5)}.slide-item.turning-mode-slideY3D[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-slideY3D.before[data-v-552b63d2]{transform:translateY(-100%) scale(.5)}.slide-item.turning-mode-slideY3D.after[data-v-552b63d2]{transform:translateY(100%) scale(.5)}.slide-item.turning-mode-rotate[data-v-552b63d2]{transition:transform .5s;transform-origin:0 0}.slide-item.turning-mode-rotate.before[data-v-552b63d2]{transform:rotate(90deg)}.slide-item.turning-mode-rotate.after[data-v-552b63d2]{transform:rotate(-90deg)}.slide-item.turning-mode-scaleY[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleY.after[data-v-552b63d2],.slide-item.turning-mode-scaleY.before[data-v-552b63d2]{transform:scaleY(.1)}.slide-item.turning-mode-scaleX[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleX.after[data-v-552b63d2],.slide-item.turning-mode-scaleX.before[data-v-552b63d2]{transform:scaleX(.1)}.slide-item.turning-mode-scale[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scale.after[data-v-552b63d2],.slide-item.turning-mode-scale.before[data-v-552b63d2]{transform:scale(.25)}.slide-item.turning-mode-scaleReverse[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleReverse.after[data-v-552b63d2],.slide-item.turning-mode-scaleReverse.before[data-v-552b63d2]{transform:scale(2)}.slide-content[data-v-552b63d2]{background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center}.slide-thumbnails[data-v-15912b32]{width:100%;height:100%;position:fixed;top:0;left:0;background-color:#1a1a1a;z-index:99}.return-button[data-v-15912b32]{height:60px;padding:20px 30px 0}.return-button .icon[data-v-15912b32]{color:#fff;font-size:36px;cursor:pointer}.return-button .icon[data-v-15912b32]:hover{color:#d14424}.slide-thumbnails-content[data-v-15912b32]{height:calc(100% - 100px);padding:20px 30px 30px 30px;display:flex;flex-wrap:wrap;align-content:flex-start;overflow:auto;overflow:overlay}.slide-thumbnails-content .thumbnail[data-v-15912b32]{width:150px;outline:2px solid #aaa;margin-right:12px;margin-bottom:12px}.slide-thumbnails-content .thumbnail[data-v-15912b32]:hover{outline-color:#d14424}.slide-thumbnails-content .thumbnail.active[data-v-15912b32]{outline-width:3px;outline-color:#d14424}.writing-board[data-v-d8027742]{z-index:8;cursor:none;position:absolute;top:0;right:0;bottom:0;left:0}.blackboard[data-v-d8027742]{width:100%;height:100%;background-color:#0f392b}.canvas[data-v-d8027742]{position:absolute;top:0;left:0}.eraser[data-v-d8027742],.pen[data-v-d8027742]{pointer-events:none;position:absolute;z-index:9}.eraser .icon[data-v-d8027742],.pen .icon[data-v-d8027742]{filter:drop-shadow(2px 2px 2px #555)}.eraser[data-v-d8027742]{display:flex;justify-content:center;align-items:center;border-radius:50%;border:4px solid rgba(85,85,85,.15);color:rgba(85,85,85,.75)}.writing-board-tool[data-v-92cd0b5a]{font-size:12px;z-index:10;position:absolute;top:0;right:0;bottom:0;left:0}.writing-board-tool .writing-board-wrap[data-v-92cd0b5a]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.writing-board-tool .tools[data-v-92cd0b5a]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-between}.writing-board-tool .tool-content[data-v-92cd0b5a]{display:flex;align-items:center}.writing-board-tool .btn[data-v-92cd0b5a]{padding:5px 10px;cursor:pointer}.writing-board-tool .btn[data-v-92cd0b5a]:hover{color:#d14424}.writing-board-tool .btn.active[data-v-92cd0b5a]{background-color:rgba(209,68,36,.5);color:#fff}.writing-board-tool .icon[data-v-92cd0b5a]{font-size:20px}.writing-board-tool .colors[data-v-92cd0b5a]{display:flex;padding:0 10px}.writing-board-tool .color[data-v-92cd0b5a]{width:16px;height:16px;border-radius:2px;cursor:pointer}.writing-board-tool .color[data-v-92cd0b5a]:hover{transform:scale(1.15)}.writing-board-tool .color.active[data-v-92cd0b5a]{transform:scale(1.3)}.writing-board-tool .color+.color[data-v-92cd0b5a]{margin-left:8px}.size[data-v-92cd0b5a]{width:200px;display:flex;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:13px}.size .label[data-v-92cd0b5a]{width:70px}.size .size-slider[data-v-92cd0b5a]{flex:1}.countdown-timer[data-v-83a589f0]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.header[data-v-83a589f0]{height:16px;font-size:13px;margin-bottom:16px;display:flex;align-items:center}.header .text-btn[data-v-83a589f0]{margin-right:8px;cursor:pointer}.header .text-btn.active[data-v-83a589f0],.header .text-btn[data-v-83a589f0]:hover{color:#d14424}.content[data-v-83a589f0]{display:flex;justify-content:space-between;padding:0 5px}.timer[data-v-83a589f0]{width:54px;height:54px;border-radius:50%;background-color:rgba(209,68,36,.05);font-size:22px;overflow:hidden}.timer input[data-v-83a589f0]{width:100%;height:100%;border:0;outline:0;background-color:transparent;text-align:center}.colon[data-v-83a589f0]{height:54px;line-height:54px;font-size:22px}.icon-btn[data-v-83a589f0]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.pause[data-v-83a589f0],.play[data-v-83a589f0]{font-size:17px}.reset[data-v-83a589f0]{font-size:12px}.close-btn[data-v-83a589f0]{position:absolute;top:0;right:0;padding:10px;cursor:pointer}.base-view[data-v-e9c1efea]{width:100%;height:100%}.base-view.laser-pen[data-v-e9c1efea]{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAACCJJREFUWIXtmLuO3MYShv/qZl9IzqwXo2BkSAtsIK+z8wwOBcOJ9C56Cr2LlThQcgBnfofVBnswXlgTaLHaIdk3dtcJOKOzd8n2MeDABRDDgKz/m+pudv0N/BN/Luj/kYSZJQBxJR8DKESU/2zuPwTIzAKnpxqHhxUuLir0vYSUAkS0ewA5F7Rtxv7+iNPTEYeHkYjKXwrIzHK9XtultRohaKSkkFIVhqGCEAIxTvm0ZpRSTNOMUGqEUgnGxLX3cblc+t9T2S8GXK1W9dP53OLiwoLZhMtLQ4CiGBVKkchZIOcpn5QMKQuEyKx1YiCZvb0AooD9ff/rZuMPDg7cl+hWn3uAmQWABut1g/PzOnZdTd5bMY6aQtAIQQGQGEd5bYirKgPIZExiY2IKIbK1XpeinzaN2s7b4XPD/iAgM0ucn7fYbNrQ963Juaauq8k5i3E01PcG46iQs0TO1wGlzJAyo6oS2jagqgLGUQNQwTllvJeYzwUz9w8N+b2AzCxwft6i72fBuZkYhnbcbBqKsSbvazhnEIJBzqrEqGQpAlO1AaKShShC6wQpE4UQUNcBKenReyXm8yoIIYwQtNXq7qvkQxVssNm0wbmZuLiYUQgtnGtps2ngfQ3vLaVkEKOmGKcqMtMWkEnKTFonaB3Z+4AQPFmreD6vSAghxpECAFMKY7EoALovBlytVjXW6yb0fSuGoaUQWrq8nKHvW/R9S943xbmavJ+qmNIO8FMFIWXert7A1gYxjprHsSLmaTHt7UF0HYdSilmv82q1ynctnFuAzCzx8aPF+Xltcq7HzaaBcy36vsUwzKjrZhiGRgxDA+8tUjIUgkbOEqVMgEIUkjLDmAjvgwjBI6WKxlHybp5KyVRKMcaMGIb0dLFIzBxvzsdbgOv12i69t7HrpgURY02bTYO+b6nrZui6qZLONdz3jTg5ORDHx0f48OExQpgBAIzp8OjRez46Oi7Pnq1ot5BKETQVgYmosJRj6rrEQNJCxLX3EUB/LyAzC3z8qOGcIe8tOWdpmm81ed9gGJpdJdF1rXz79jucnX1za454P8fZ2ZzOzr6Rx8fvyvPnP38afiEKVVXmqhrJ+wSlIqoqYj73S2s1M7urC0ZcS3x6qhGCDpeXBuOoMY4Gzhl4b4tzNYahgXMNuq4Vb978cCfczTg7+0a8efMDuq6Fcw2GoSnO1fDewjmDcTQYx0kzBI3TU3319euAh4cVUlIEKApBU98bhGAoJSO8N/Dect834u3b73B+/vVn4XZxfv61ePv2O+77Bt5b4b2hlKbcfW8oBE2AQkoKh4fXRvU64MVFhZQqilEhBLX9CCvEqLer1YiTk4MvqtxdlTw5OcAWDDFq5DxphDBtmSlNzcddgMws0fcyDEOFUiQAiZxliVGVGFVJSXEImo6Pj3433Dbo+PiIQ9AlJbXLi5wnrVIm7b6X223wOiAAASkFhBDIWWAcJXKWshQhcpYiZ0k5S3z48PhO9ZcvgV9+ma6XL+8m/PDhMW1ziW1u5Cy3WpO2lOIq11VAAhEhRkLO0z0RgVmAefotRXz6lNyMV6+AxWK6Xr26GzCEGXZb4i7nTifnSXv6Tn7qssTdmf4+cRWQwczQmiHldM/MICogmn6FKDDmzj0Tr18D5+fT9fr13WrGdBCiXMu505Fy0mZmTJYBwPUPdUHOBaUUSFlQVRlS5rzbtqTMJGXGo0fvcXY2vyX+44/T9VA8evSepcy8zcdCFDG1ZBlSTto5FwC3P9RElNG22TTNCCEygAwps9A6Ca2TUCqRMZGPjo4fprg/+OjomIyJQqm0ywspJy0hJu22zVf34+tzcH9/hFIja51gTEJVJUiZoHWEMQFKhfLs2QpPnrz73XRPnrwrz56toFSAMQFaR0g5aRiTWOsEpUbs749XX7u51Y1QKjGQ2JjIbRtgTGClQrE2wFpPbTuU589/xmLx2xfDLRa/lefPf6a2HWCtL9YG3oJy2wY2JjKQoFTC6ekDgIeHEcZEs7cXUFURVTV1wtZ6UdcOTTOgrgfMZn158eKnL6rkkyfvyosXP2E261HXA5pmEHXtYK1HXU9WoKomTWMiDg/j1devbStEVN6/fx+XRIGt9RhHjZQ0Wat4HCsax//1fEQlf//9v8XJyTF9rt1q2+mPtW2PphnY2gHWOrbWcV17ttaDKKy9j4/398u9gACwXC49Pn7UuhQNQI3eT206s2DadptCFEiZqaoS/+tfvnz77X/oRsPKUmYyJpJSAdZ6NM2Aphl4Pu/QND3P5wO0dmo2c5jNHPb3/fKrr/xNnluARJRXq5V/2jQqOKfE1kPsPC8zM1VVLkqNwpiAEAxbq+hGy89SZtq2/MXaIOrasbUDmqZH2/Zo257bdghSOtM07tfNxh/s799yd3d6koODA8fM0ngvw9bgYG9vatOJClfVSFUVYe3UldxhmiBlxtY0kVLTlLHW8Xw+oG17NqYvs1lv6rrHcjkcEN1p5B9ydQPmc2GEoABAdB1TKYWlnDph5wJvbSdPpwvXbCcLUXhrO2FMQF0HttZBa8dtO5TZrDdt26FtewDDfRD3AhJRYeYemKxh2Bqc1HVTm17Xn4y7yFnyDeMurhh33hp3rmuvZjMXpHSmrqehXiz6h04XHjxZIKLMzB0Wi2LW64xhSAwkVFXEOGpo/dmjD2yPPlBVka31mM2caRqH5XLAnz362FUSQLdarfLTxSJpISLmcx8uLw217R8/PLpnzt3S/5KHdvG3Pn67Afr3PMB8APgvOwL+J/5s/BeEBm1u1Gu4+QAAAABJRU5ErkJggg==) 20 20,default!important}.tools-left[data-v-e9c1efea]{position:fixed;bottom:8px;left:8px;font-size:25px;color:#666;z-index:10}.tools-left .tool-btn[data-v-e9c1efea]{opacity:.35;cursor:pointer}.tools-left .tool-btn[data-v-e9c1efea]:hover{opacity:.9}.tools-left .tool-btn+.tool-btn[data-v-e9c1efea]{margin-left:8px}.tools-right[data-v-e9c1efea]{height:66px;position:fixed;bottom:-66px;right:0;z-index:5;padding:8px;transition:bottom .2s}.tools-right.visible[data-v-e9c1efea]{bottom:0}.tools-right[data-v-e9c1efea]:after{content:"";width:100%;height:66px;position:absolute;left:0;top:-66px}.tools-right .content[data-v-e9c1efea]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;border-radius:2px;font-size:25px;background-color:#fff;color:#41464b;padding:8px 10px;box-shadow:0 2px 12px 0 rgba(56,56,56,.2);border:1px solid #e2e6ed}.tools-right .tool-btn[data-v-e9c1efea]{cursor:pointer}.tools-right .tool-btn.active[data-v-e9c1efea],.tools-right .tool-btn[data-v-e9c1efea]:hover{color:#d14424}.tools-right .tool-btn+.tool-btn[data-v-e9c1efea]{margin-left:15px}.tools-right .page-number[data-v-e9c1efea]{font-size:13px;padding:8px 12px;cursor:pointer}.presenter-view[data-v-0fc2d7b2]{width:100%;height:100%;display:flex}.toolbar[data-v-0fc2d7b2]{width:70px;height:100%;background-color:#fff;border-right:1px solid #eee;font-size:12px;margin:20px 0}.toolbar .tool-btn[data-v-0fc2d7b2]{display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:pointer}.toolbar .tool-btn+.tool-btn[data-v-0fc2d7b2]{margin-top:22px}.toolbar .tool-btn.active[data-v-0fc2d7b2],.toolbar .tool-btn[data-v-0fc2d7b2]:hover{color:#d14424}.toolbar .divider[data-v-0fc2d7b2]{width:70%;margin:24px 15%!important}.toolbar .tool-icon[data-v-0fc2d7b2]{margin-bottom:8px;font-size:22px}.content[data-v-0fc2d7b2]{width:calc(100% - 430px);height:100%;background-color:#1d1d1d}.slide-list-wrap[data-v-0fc2d7b2]{height:calc(100% - 190px);margin:20px;overflow:hidden;position:relative}.slide-list-wrap.laser-pen[data-v-0fc2d7b2]{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAACCJJREFUWIXtmLuO3MYShv/qZl9IzqwXo2BkSAtsIK+z8wwOBcOJ9C56Cr2LlThQcgBnfofVBnswXlgTaLHaIdk3dtcJOKOzd8n2MeDABRDDgKz/m+pudv0N/BN/Luj/kYSZJQBxJR8DKESU/2zuPwTIzAKnpxqHhxUuLir0vYSUAkS0ewA5F7Rtxv7+iNPTEYeHkYjKXwrIzHK9XtultRohaKSkkFIVhqGCEAIxTvm0ZpRSTNOMUGqEUgnGxLX3cblc+t9T2S8GXK1W9dP53OLiwoLZhMtLQ4CiGBVKkchZIOcpn5QMKQuEyKx1YiCZvb0AooD9ff/rZuMPDg7cl+hWn3uAmQWABut1g/PzOnZdTd5bMY6aQtAIQQGQGEd5bYirKgPIZExiY2IKIbK1XpeinzaN2s7b4XPD/iAgM0ucn7fYbNrQ963Juaauq8k5i3E01PcG46iQs0TO1wGlzJAyo6oS2jagqgLGUQNQwTllvJeYzwUz9w8N+b2AzCxwft6i72fBuZkYhnbcbBqKsSbvazhnEIJBzqrEqGQpAlO1AaKShShC6wQpE4UQUNcBKenReyXm8yoIIYwQtNXq7qvkQxVssNm0wbmZuLiYUQgtnGtps2ngfQ3vLaVkEKOmGKcqMtMWkEnKTFonaB3Z+4AQPFmreD6vSAghxpECAFMKY7EoALovBlytVjXW6yb0fSuGoaUQWrq8nKHvW/R9S943xbmavJ+qmNIO8FMFIWXert7A1gYxjprHsSLmaTHt7UF0HYdSilmv82q1ynctnFuAzCzx8aPF+Xltcq7HzaaBcy36vsUwzKjrZhiGRgxDA+8tUjIUgkbOEqVMgEIUkjLDmAjvgwjBI6WKxlHybp5KyVRKMcaMGIb0dLFIzBxvzsdbgOv12i69t7HrpgURY02bTYO+b6nrZui6qZLONdz3jTg5ORDHx0f48OExQpgBAIzp8OjRez46Oi7Pnq1ot5BKETQVgYmosJRj6rrEQNJCxLX3EUB/LyAzC3z8qOGcIe8tOWdpmm81ed9gGJpdJdF1rXz79jucnX1za454P8fZ2ZzOzr6Rx8fvyvPnP38afiEKVVXmqhrJ+wSlIqoqYj73S2s1M7urC0ZcS3x6qhGCDpeXBuOoMY4Gzhl4b4tzNYahgXMNuq4Vb978cCfczTg7+0a8efMDuq6Fcw2GoSnO1fDewjmDcTQYx0kzBI3TU3319euAh4cVUlIEKApBU98bhGAoJSO8N/Dect834u3b73B+/vVn4XZxfv61ePv2O+77Bt5b4b2hlKbcfW8oBE2AQkoKh4fXRvU64MVFhZQqilEhBLX9CCvEqLer1YiTk4MvqtxdlTw5OcAWDDFq5DxphDBtmSlNzcddgMws0fcyDEOFUiQAiZxliVGVGFVJSXEImo6Pj3433Dbo+PiIQ9AlJbXLi5wnrVIm7b6X223wOiAAASkFhBDIWWAcJXKWshQhcpYiZ0k5S3z48PhO9ZcvgV9+ma6XL+8m/PDhMW1ziW1u5Cy3WpO2lOIq11VAAhEhRkLO0z0RgVmAefotRXz6lNyMV6+AxWK6Xr26GzCEGXZb4i7nTifnSXv6Tn7qssTdmf4+cRWQwczQmiHldM/MICogmn6FKDDmzj0Tr18D5+fT9fr13WrGdBCiXMu505Fy0mZmTJYBwPUPdUHOBaUUSFlQVRlS5rzbtqTMJGXGo0fvcXY2vyX+44/T9VA8evSepcy8zcdCFDG1ZBlSTto5FwC3P9RElNG22TTNCCEygAwps9A6Ca2TUCqRMZGPjo4fprg/+OjomIyJQqm0ywspJy0hJu22zVf34+tzcH9/hFIja51gTEJVJUiZoHWEMQFKhfLs2QpPnrz73XRPnrwrz56toFSAMQFaR0g5aRiTWOsEpUbs749XX7u51Y1QKjGQ2JjIbRtgTGClQrE2wFpPbTuU589/xmLx2xfDLRa/lefPf6a2HWCtL9YG3oJy2wY2JjKQoFTC6ekDgIeHEcZEs7cXUFURVTV1wtZ6UdcOTTOgrgfMZn158eKnL6rkkyfvyosXP2E261HXA5pmEHXtYK1HXU9WoKomTWMiDg/j1devbStEVN6/fx+XRIGt9RhHjZQ0Wat4HCsax//1fEQlf//9v8XJyTF9rt1q2+mPtW2PphnY2gHWOrbWcV17ttaDKKy9j4/398u9gACwXC49Pn7UuhQNQI3eT206s2DadptCFEiZqaoS/+tfvnz77X/oRsPKUmYyJpJSAdZ6NM2Aphl4Pu/QND3P5wO0dmo2c5jNHPb3/fKrr/xNnluARJRXq5V/2jQqOKfE1kPsPC8zM1VVLkqNwpiAEAxbq+hGy89SZtq2/MXaIOrasbUDmqZH2/Zo257bdghSOtM07tfNxh/s799yd3d6koODA8fM0ngvw9bgYG9vatOJClfVSFUVYe3UldxhmiBlxtY0kVLTlLHW8Xw+oG17NqYvs1lv6rrHcjkcEN1p5B9ydQPmc2GEoABAdB1TKYWlnDph5wJvbSdPpwvXbCcLUXhrO2FMQF0HttZBa8dtO5TZrDdt26FtewDDfRD3AhJRYeYemKxh2Bqc1HVTm17Xn4y7yFnyDeMurhh33hp3rmuvZjMXpHSmrqehXiz6h04XHjxZIKLMzB0Wi2LW64xhSAwkVFXEOGpo/dmjD2yPPlBVka31mM2caRqH5XLAnz362FUSQLdarfLTxSJpISLmcx8uLw217R8/PLpnzt3S/5KHdvG3Pn67Afr3PMB8APgvOwL+J/5s/BeEBm1u1Gu4+QAAAABJRU5ErkJggg==) 20 20,default!important}.thumbnails[data-v-0fc2d7b2]{height:150px;padding:15px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;border-top:1px solid #3a3a3a}.thumbnail[data-v-0fc2d7b2]{display:inline-block;outline:2px solid #aaa}.thumbnail+.thumbnail[data-v-0fc2d7b2]{margin-left:10px}.thumbnail[data-v-0fc2d7b2]:hover{outline-color:#d14424}.thumbnail.active[data-v-0fc2d7b2]{outline-width:3px;outline-color:#d14424}.remark[data-v-0fc2d7b2]{width:360px;height:100%;position:relative;background-color:#2a2a2a;border-left:1px solid #3a3a3a;color:#fff}.remark .header[data-v-0fc2d7b2]{height:60px;padding:0 20px;display:flex;justify-content:space-between;align-items:center;font-size:18px;border-bottom:1px solid #3a3a3a}.remark .remark-content[data-v-0fc2d7b2]{height:calc(100% - 60px);padding:20px;line-height:1.5;overflow:auto;overflow:overlay}.remark .remark-scale[data-v-0fc2d7b2]{position:absolute;right:5px;bottom:5px;font-size:22px;display:flex}.remark .scale-btn[data-v-0fc2d7b2]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.remark .scale-btn.disable[data-v-0fc2d7b2]{color:#666;cursor:no-drop}.remark .scale-btn[data-v-0fc2d7b2]:not(.disable):hover{background-color:#333}[data-v-0fc2d7b2]::-webkit-scrollbar{width:0;height:0}.pptist-screen[data-v-6bf3d190]{width:100%;height:100%}.mobile-operate[data-v-fd451ff6]{position:absolute;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.mobile-thumbnails[data-v-2c80920e]{padding:10px;white-space:nowrap;overflow-x:auto;overflow-y:hidden}.thumbnail-item[data-v-2c80920e]{position:relative;display:inline-block;outline:2px solid #aaa}.thumbnail-item+.thumbnail-item[data-v-2c80920e]{margin-left:10px}.thumbnail-item.active[data-v-2c80920e]{outline-color:#d14424}.thumbnail-item.active .label[data-v-2c80920e]{background-color:#d14424}.thumbnail-item .label[data-v-2c80920e]{min-width:20px;height:14px;line-height:14px;position:absolute;right:-1px;top:-1px;color:#fff;background-color:#aaa;z-index:1;font-size:12px;text-align:center;padding:0 5px}.sortable-chosen[data-v-2c80920e]{top:-5px}[data-v-2c80920e]::-webkit-scrollbar{width:0;height:0}.slide-toolbar[data-v-24150aba]{height:230px;background-color:#fff;box-shadow:0 0 15px 0 rgba(0,0,0,.1);display:flex;flex-direction:column;position:relative;z-index:2}.remark[data-v-24150aba]{position:relative;flex:1;border-bottom:1px solid #eee;line-height:1.5}.remark textarea[data-v-24150aba]{width:100%;height:100%;overflow-y:auto;resize:none;border:0;outline:0;padding:8px 10px;font-size:12px;box-sizing:border-box;position:absolute;top:0;right:0;bottom:0;left:0}.toolbar[data-v-24150aba]{height:90px;border-bottom:1px solid #eee;padding:10px}.row[data-v-24150aba]{width:100%;display:flex;align-items:center;margin-bottom:5px}.row .icon[data-v-24150aba]{margin-right:3px}.element-toolbar[data-v-f3d1ac70]{width:100%;height:240px;position:absolute;z-index:99;bottom:0;left:0;background-color:#fff;box-shadow:0 0 15px 0 rgba(0,0,0,.1);display:flex;flex-direction:column;animation:slideInUp-f3d1ac70 .15s}@keyframes slideInUp-f3d1ac70{0%{transform:translateY(100%)}to{transform:translateY(0)}}.content[data-v-f3d1ac70]{padding:10px;flex:1;overflow:auto}.row[data-v-f3d1ac70]{width:100%;display:flex;align-items:center;margin-bottom:10px}.row .icon[data-v-f3d1ac70]{margin-right:3px}.row-block[data-v-f3d1ac70]{margin-bottom:10px;background-color:#f9f9f9;border-radius:2px;padding:10px}.label[data-v-f3d1ac70]{font-size:13px;margin-bottom:20px;margin-left:6px}.colors[data-v-f3d1ac70]{display:flex;flex-wrap:wrap;align-content:flex-start}.color[data-v-f3d1ac70]{width:12%;margin-bottom:.57143%;padding-bottom:5px;display:flex;justify-content:center;align-items:center}.color[data-v-f3d1ac70]:not(:nth-child(8n)){margin-right:.57143%}.color .color-block[data-v-f3d1ac70]{width:30px;height:30px;border-radius:50%}.mobile-editor-header[data-v-5c34ab81]{height:50px;background-color:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 18px;font-size:13px;box-shadow:0 0 15px 0 rgba(0,0,0,.1);position:relative;z-index:2}.history[data-v-5c34ab81]{display:flex;justify-content:center;align-items:center}.history-item[data-v-5c34ab81]{margin-right:20px}.history-item.disable[data-v-5c34ab81]{opacity:.5}.mobile-editor[data-v-3756d058]{height:100%;position:relative;background-color:#f9f9f9}.content[data-v-3756d058]{height:calc(100% - 280px);display:flex;justify-content:center;align-items:center}.viewport[data-v-3756d058]{transform-origin:0 0}.viewport-wrapper[data-v-3756d058]{position:relative;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.background[data-v-3756d058]{width:100%;height:100%;background-position:50%;position:absolute}.mobile-player[data-v-62f26eba]{transform-origin:0 0;background-color:#1d1d1d;position:relative}.screen-slide-list[data-v-62f26eba]{position:relative;width:100%;height:100%}.slide-item[data-v-62f26eba]{position:absolute;top:0;left:0;width:100%;height:100%}.slide-item.current[data-v-62f26eba]{z-index:2}.slide-item.hide[data-v-62f26eba]{opacity:0}.slide-item.turning-mode-no.before[data-v-62f26eba]{transform:translateY(-100%)}.slide-item.turning-mode-no.after[data-v-62f26eba]{transform:translateY(100%)}.slide-item.turning-mode-fade[data-v-62f26eba]{transition:opacity .75s}.slide-item.turning-mode-fade.after[data-v-62f26eba],.slide-item.turning-mode-fade.before[data-v-62f26eba]{pointer-events:none;opacity:0}.slide-item.turning-mode-slideX[data-v-62f26eba]{transition:transform .35s}.slide-item.turning-mode-slideX.before[data-v-62f26eba]{transform:translateX(-100%)}.slide-item.turning-mode-slideX.after[data-v-62f26eba]{transform:translateX(100%)}.slide-item.turning-mode-slideY[data-v-62f26eba]{transition:transform .35s}.slide-item.turning-mode-slideY.before[data-v-62f26eba]{transform:translateY(-100%)}.slide-item.turning-mode-slideY.after[data-v-62f26eba]{transform:translateY(100%)}.slide-content[data-v-62f26eba]{background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center}.header[data-v-62f26eba]{width:100%;height:40px;line-height:40px;padding:0 15px;position:absolute;top:0;left:0;z-index:99;background-color:rgba(29,29,29,.7);text-align:right;font-size:13px;color:#fff;animation:slideInDown-62f26eba .15s}.header .back[data-v-62f26eba]{height:100%}.thumbnails[data-v-62f26eba]{width:100%;position:absolute;bottom:0;left:0;z-index:99;background-color:rgba(29,29,29,.7);overflow:auto!important;animation:slideInUp-62f26eba .15s}@keyframes slideInUp-62f26eba{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInDown-62f26eba{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.mobile-preview[data-v-53dd42dc]{height:100%;background-color:#f9f9f9}.thumbnail-list[data-v-53dd42dc]{height:calc(100% - 50px);padding:10px;overflow:auto}.thumbnail-item[data-v-53dd42dc]{display:flex;justify-content:center;align-items:center;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.thumbnail-item+.thumbnail-item[data-v-53dd42dc]{margin-top:10px}.menu[data-v-53dd42dc]{height:50px;position:relative;box-shadow:0 -2px 4px 0 rgba(51,51,51,.05);background:#fff;display:flex;justify-content:center;align-items:center}.menu .menu-item[data-v-53dd42dc]{width:50%;height:100%;display:flex;justify-content:center;align-items:center;font-size:13px}.menu .menu-item .icon[data-v-53dd42dc]{margin-right:8px;font-size:18px}#app,.mobile[data-v-9826ff08]{height:100%}.ProseMirror,.ProseMirror-static{outline:0;border:0;font-size:20px;word-break:break-word;white-space:normal}.ProseMirror-static:not(.ProseMirror-static),.ProseMirror:not(.ProseMirror-static){-webkit-user-select:text;-moz-user-select:text;user-select:text}.ProseMirror ::-moz-selection,.ProseMirror-static ::-moz-selection{background-color:rgba(209,68,36,.25);color:inherit}.ProseMirror ::selection,.ProseMirror-static ::selection{background-color:rgba(209,68,36,.25);color:inherit}.ProseMirror p,.ProseMirror-static p{margin-top:var(--paragraphSpace)}.ProseMirror p:first-child,.ProseMirror-static p:first-child{margin-top:0}.ProseMirror ul,.ProseMirror-static ul{list-style-type:disc;padding-inline-start:20px}.ProseMirror ul li,.ProseMirror-static ul li{list-style-type:inherit;padding:2px 0}.ProseMirror ol,.ProseMirror-static ol{list-style-type:decimal;padding-inline-start:20px}.ProseMirror ol li,.ProseMirror-static ol li{list-style-type:inherit;padding:2px 0}.ProseMirror code,.ProseMirror-static code{background-color:#eee;padding:2px 6px;margin:0 1px;border-radius:4px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.ProseMirror sup,.ProseMirror-static sup{vertical-align:super;font-size:smaller}.ProseMirror sub,.ProseMirror-static sub{vertical-align:sub;font-size:smaller}.ProseMirror blockquote,.ProseMirror-static blockquote{overflow:hidden;padding-right:1.2em;padding-left:1.2em;margin-left:0;margin-right:0;font-style:italic;border-left:4px solid #ddd}.ProseMirror [data-indent="1"],.ProseMirror-static [data-indent="1"]{padding-left:20px}.ProseMirror [data-indent="2"],.ProseMirror-static [data-indent="2"]{padding-left:40px}.ProseMirror [data-indent="3"],.ProseMirror-static [data-indent="3"]{padding-left:60px}.ProseMirror [data-indent="4"],.ProseMirror-static [data-indent="4"]{padding-left:80px}.ProseMirror [data-indent="5"],.ProseMirror-static [data-indent="5"]{padding-left:100px}.ProseMirror [data-indent="6"],.ProseMirror-static [data-indent="6"]{padding-left:120px}.ProseMirror [data-indent="7"],.ProseMirror-static [data-indent="7"]{padding-left:140px}.ProseMirror [data-indent="8"],.ProseMirror-static [data-indent="8"]{padding-left:160px}.ProseMirror-selectednode{outline:none!important}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;box-sizing:border-box}:after,:before{box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,html{width:100%;height:100%;overflow:hidden;background-color:#fff;color:#41464b}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}a{text-decoration:none;color:#d14424}img{vertical-align:middle;border-style:none}hr{box-sizing:content-box;height:0;overflow:visible}mark.active{background-color:#ff9632}button,input,optgroup,select,textarea{color:inherit}button,input{overflow:visible}button,select{text-transform:none}textarea{overflow:auto;resize:vertical}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}::-webkit-scrollbar{width:5px;height:5px;background-color:transparent}::-webkit-scrollbar-thumb{background-color:#c1c1c1}@font-face{font-display:swap;font-family:仓耳小丸子;src:url(../fonts/%E4%BB%93%E8%80%B3%E5%B0%8F%E4%B8%B8%E5%AD%90.64a7acb4.woff2) format("woff2")}@font-face{font-display:swap;font-family:优设标题黑;src:url(../fonts/%E4%BC%98%E8%AE%BE%E6%A0%87%E9%A2%98%E9%BB%91.df0c1330.woff2) format("woff2")}@font-face{font-display:swap;font-family:字制区喜脉体;src:url(../fonts/%E5%AD%97%E5%88%B6%E5%8C%BA%E5%96%9C%E8%84%89%E4%BD%93.cb8f58a4.woff2) format("woff2")}@font-face{font-display:swap;font-family:峰广明锐体;src:url(../fonts/%E5%B3%B0%E5%B9%BF%E6%98%8E%E9%94%90%E4%BD%93.8c45ca35.woff2) format("woff2")}@font-face{font-display:swap;font-family:得意黑;src:url(../fonts/%E5%BE%97%E6%84%8F%E9%BB%91.7caef6f6.woff2) format("woff2")}@font-face{font-display:swap;font-family:摄图摩登小方体;src:url(../fonts/%E6%91%84%E5%9B%BE%E6%91%A9%E7%99%BB%E5%B0%8F%E6%96%B9%E4%BD%93.7d229dc8.woff2) format("woff2")}@font-face{font-display:swap;font-family:站酷快乐体;src:url(../fonts/%E7%AB%99%E9%85%B7%E5%BF%AB%E4%B9%90%E4%BD%93.8fd3ebd9.woff2) format("woff2")}@font-face{font-display:swap;font-family:素材集市康康体;src:url(../fonts/%E7%B4%A0%E6%9D%90%E9%9B%86%E5%B8%82%E5%BA%B7%E5%BA%B7%E4%BD%93.ceb20972.woff2) format("woff2")}@font-face{font-display:swap;font-family:素材集市酷方体;src:url(../fonts/%E7%B4%A0%E6%9D%90%E9%9B%86%E5%B8%82%E9%85%B7%E6%96%B9%E4%BD%93.42328465.woff2) format("woff2")}@font-face{font-display:swap;font-family:途牛类圆体;src:url(../fonts/%E9%80%94%E7%89%9B%E7%B1%BB%E5%9C%86%E4%BD%93.a94398b6.woff2) format("woff2")}@font-face{font-display:swap;font-family:锐字真言体;src:url(../fonts/%E9%94%90%E5%AD%97%E7%9C%9F%E8%A8%80%E4%BD%93.487089ad.woff2) format("woff2")}.menu-content[data-v-77e74b43]{width:170px;padding:5px 0;background:#fff;border:1px solid #eee;box-shadow:3px 3px 3px rgba(0,0,0,.15);border-radius:2px;list-style:none;margin:0}.menu-item[data-v-77e74b43]{padding:0 20px;color:#555;font-size:12px;transition:all .1s;white-space:nowrap;height:30px;line-height:30px;background-color:#fff;cursor:pointer}.menu-item:not(.disable):hover>.menu-item-content>.sub-menu[data-v-77e74b43]{display:block}.menu-item:not(.disable):hover>.has-children.has-handler[data-v-77e74b43]:after{transform:scale(1)}.menu-item[data-v-77e74b43]:hover:not(.disable){background-color:rgba(209,68,36,.2)}.menu-item.divider[data-v-77e74b43]{height:1px;overflow:hidden;margin:5px;background-color:#e5e5e5;line-height:0;padding:0}.menu-item.disable[data-v-77e74b43]{color:#b1b1b1;cursor:no-drop}.menu-item-content[data-v-77e74b43]{display:flex;align-items:center;justify-content:space-between;position:relative}.menu-item-content.has-children[data-v-77e74b43]:before{content:"";display:inline-block;width:8px;height:8px;border-width:1px;border-style:solid;border-color:#666 #666 transparent transparent;position:absolute;right:0;top:50%;transform:translateY(-50%) rotate(45deg)}.menu-item-content.has-children.has-handler[data-v-77e74b43]:after{content:"";display:inline-block;width:1px;height:24px;background-color:#f1f1f1;position:absolute;right:18px;top:3px;transform:scale(0);transition:transform .2s}.menu-item-content .sub-text[data-v-77e74b43]{opacity:.6}.menu-item-content .sub-menu[data-v-77e74b43]{width:120px;position:absolute;display:none;left:112%;top:-6px}.mask{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:9998}.contextmenu{position:fixed;z-index:9999;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box[data-theme~=tooltip]{background-color:#262626;color:#fff;border-radius:2px;padding:8px;font-size:12px;line-height:1.5}.tippy-box[data-theme~=tooltip] .tippy-arrow{width:12px;height:12px;color:#262626}.tippy-box[data-theme~=tooltip] .tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-box[data-theme~=tooltip][data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-theme~=tooltip][data-placement^=top]>.tippy-arrow:before{bottom:-5px;left:0;border-width:6px 6px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-theme~=tooltip][data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-theme~=tooltip][data-placement^=bottom]>.tippy-arrow:before{top:-5px;left:0;border-width:0 6px 6px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-theme~=tooltip][data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-theme~=tooltip][data-placement^=left]>.tippy-arrow:before{border-width:6px 0 6px 6px;border-left-color:initial;right:-5px;transform-origin:center left}.tippy-box[data-theme~=tooltip][data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-theme~=tooltip][data-placement^=right]>.tippy-arrow:before{left:-5px;border-width:6px 6px 6px 0;border-right-color:initial;transform-origin:center right} \ No newline at end of file diff --git a/css/app.cab76851.css b/css/app.cab76851.css deleted file mode 100644 index 4f17012a..00000000 --- a/css/app.cab76851.css +++ /dev/null @@ -1 +0,0 @@ -.message[data-v-2231702e]{max-width:500px}.message+.message[data-v-2231702e]{margin-top:15px}.message-container[data-v-2231702e]{min-width:50px;display:flex;align-items:center;padding:10px;font-size:13px;overflow:hidden;border-radius:2px;box-shadow:0 1px 8px rgba(0,0,0,.15);background:#fff;pointer-events:all;position:relative}.message-container .icons[data-v-2231702e]{display:flex;align-items:center;margin-right:10px}.message-container .title[data-v-2231702e]{font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-container .content[data-v-2231702e]{width:100%}.message-container .description[data-v-2231702e]{line-height:1.5;color:#41464b}.message-container .title+.description[data-v-2231702e]{margin-top:5px}.message-container .control[data-v-2231702e]{position:relative;height:100%;margin-left:10px}.message-container .close-btn[data-v-2231702e]{font-size:15px;color:#666;display:flex;align-items:center;cursor:pointer}.message-container .close-btn[data-v-2231702e]:hover{color:#d14424}.message-fade-enter-active[data-v-2231702e]{animation:message-fade-in-down-2231702e .3s}.message-fade-leave-active[data-v-2231702e]{animation:message-fade-out-2231702e .3s}@keyframes message-fade-in-down-2231702e{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes message-fade-out-2231702e{0%{opacity:1;margin-top:0}to{opacity:0;margin-top:-45px}}.hotkey-doc[data-v-a0322054]{height:100%;overflow:auto;font-size:12px;margin:0 -15px;padding:0 15px 15px}.title[data-v-a0322054]{font-size:14px;font-weight:700;border-bottom:1px solid #e5e5e5;padding:25px 0 5px 0}.title[data-v-a0322054]:first-child{padding-top:0}.hotkey-item[data-v-a0322054]{border-bottom:1px solid #e5e5e5;padding:15px 0 5px 0;display:flex;align-items:center}.label[data-v-a0322054]{width:140px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.input[data-v-64bedb34]{display:none}.fullscreen-spin[data-v-a5c6b41c]{top:0;bottom:0;left:0;right:0;z-index:100;background-color:hsla(0,0%,95%,.7)}.fullscreen-spin[data-v-a5c6b41c],.spin[data-v-a5c6b41c]{position:fixed;display:flex;justify-content:center;align-items:center}.spin[data-v-a5c6b41c]{width:200px;height:200px;top:50%;left:50%;margin-top:-100px;margin-left:-100px;flex-direction:column}.spinner[data-v-a5c6b41c]{width:36px;height:36px;border:3px solid #d14424;border-top-color:transparent;border-radius:50%;animation:spinner-a5c6b41c .8s linear infinite}.text[data-v-a5c6b41c]{margin-top:20px;color:#d14424}@keyframes spinner-a5c6b41c{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.drawer[data-v-749dadac]{height:100%;position:fixed;top:0;bottom:0;z-index:5000;background:#fff;display:flex;flex-direction:column}.drawer.left[data-v-749dadac]{left:0;box-shadow:3px 0 6px -4px rgba(0,0,0,.12),9px 0 28px 8px rgba(0,0,0,.05)}.drawer.right[data-v-749dadac]{right:0;box-shadow:-3px 0 6px -4px rgba(0,0,0,.12),-9px 0 28px 8px rgba(0,0,0,.05)}.header[data-v-749dadac]{height:50px;padding:0 15px;position:relative;display:flex;align-items:center}.header .close-btn[data-v-749dadac]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;position:absolute;top:15px;right:15px;cursor:pointer}.content[data-v-749dadac]{padding:0 15px;overflow:auto;flex:1}.drawer-slide-right-enter-active[data-v-749dadac]{animation:drawer-slide-right-enter-749dadac .25s ease both}.drawer-slide-right-leave-active[data-v-749dadac]{animation:drawer-slide-right-leave-749dadac .25s ease both}.drawer-slide-left-enter-active[data-v-749dadac]{animation:drawer-slide-left-enter-749dadac .25s ease both}.drawer-slide-left-leave-active[data-v-749dadac]{animation:drawer-slide-left-leave-749dadac .25s ease both}@keyframes drawer-slide-right-enter-749dadac{0%{transform:translateX(100%)}}@keyframes drawer-slide-right-leave-749dadac{to{transform:translateX(100%)}}@keyframes drawer-slide-left-enter-749dadac{0%{transform:translateX(-100%)}}@keyframes drawer-slide-left-leave-749dadac{to{transform:translateX(-100%)}}.input[data-v-a97ba0dc]{background-color:#fff;border:1px solid #d9d9d9;padding:0 5px;border-radius:2px;transition:border-color .25s;font-size:13px;display:flex}.input input[data-v-a97ba0dc]{min-width:0;height:30px;outline:0;border:0;line-height:30px;vertical-align:top;color:#41464b;padding:0 5px;flex:1;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.input input[data-v-a97ba0dc]::-moz-placeholder{color:#bfbfbf}.input input[data-v-a97ba0dc]::placeholder{color:#bfbfbf}.input.focused[data-v-a97ba0dc],.input[data-v-a97ba0dc]:not(.disabled):hover{border-color:#d14424}.input.disabled[data-v-a97ba0dc]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.input .prefix[data-v-a97ba0dc],.input .suffix[data-v-a97ba0dc]{display:flex;justify-content:center;align-items:center;line-height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.popover.center[data-v-70fabe9a]{display:flex;justify-content:center;align-items:center}.popover-content[data-v-70fabe9a]{background-color:#fff;padding:10px;border:1px solid #eee;box-shadow:3px 3px 3px rgba(0,0,0,.15);border-radius:2px;font-size:13px}.tippy-box[data-theme~=popover]{border:0;outline:0}.popover-menu-item[data-v-2f137c4f]{min-width:80px;padding:6px 10px;border-radius:2px;font-size:13px;cursor:pointer}.popover-menu-item.center[data-v-2f137c4f]{text-align:center}.popover-menu-item[data-v-2f137c4f]:hover{background-color:#f1f1f1}.popover-menu-item+.popover-menu-item[data-v-2f137c4f]{margin-top:2px}.editor-header[data-v-2394d37c]{background-color:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-bottom:1px solid #eee;display:flex;justify-content:space-between;padding:0 5px}.left[data-v-2394d37c],.menu-item[data-v-2394d37c],.right[data-v-2394d37c]{display:flex;justify-content:center;align-items:center}.menu-item[data-v-2394d37c]{height:30px;font-size:14px;padding:0 10px;border-radius:2px;cursor:pointer}.menu-item .icon[data-v-2394d37c]{font-size:18px;color:#666}.menu-item[data-v-2394d37c]:hover{background-color:#f1f1f1}.group-menu-item[data-v-2394d37c]{height:30px;display:flex;margin:0 8px;padding:0 2px;border-radius:2px}.group-menu-item[data-v-2394d37c]:hover{background-color:#f1f1f1}.group-menu-item .menu-item[data-v-2394d37c]{padding:0 3px}.group-menu-item .arrow-btn[data-v-2394d37c]{display:flex;justify-content:center;align-items:center;cursor:pointer}.title[data-v-2394d37c]{height:32px;margin-left:2px;font-size:13px}.title .title-input[data-v-2394d37c]{width:200px;height:100%;padding-left:0;padding-right:0}.title .title-text[data-v-2394d37c]{min-width:20px;max-width:400px;line-height:32px;padding:0 6px;border-radius:2px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.title .title-text[data-v-2394d37c]:hover{background-color:#f1f1f1}.github-link[data-v-2394d37c]{display:inline-block;height:30px}svg[data-v-11836cf8],svg[data-v-35e36256],svg[data-v-6e021ee2]{overflow:visible;position:absolute;z-index:2;top:0;left:0}.image-clip-handler[data-v-5984406b]{width:100%;height:100%;position:relative}.image-clip-handler .bottom-img[data-v-5984406b]{top:0;left:0;width:100%;height:100%;opacity:.5}.image-clip-handler img[data-v-5984406b]{width:100%;height:100%}.image-clip-handler .top-image-content[data-v-5984406b]{position:absolute;overflow:hidden}.image-clip-handler .top-image-content img[data-v-5984406b]{position:absolute}.operate[data-v-5984406b]{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.clip-point[data-v-5984406b]{position:absolute;width:16px;height:16px}.clip-point svg[data-v-5984406b]{overflow:visible}.clip-point.left-top[data-v-5984406b]{left:0;top:0}.clip-point.right-top[data-v-5984406b]{left:100%;top:0;transform:rotate(90deg);transform-origin:0 0}.clip-point.left-bottom[data-v-5984406b]{left:0;top:100%;transform:rotate(-90deg);transform-origin:0 0}.clip-point.right-bottom[data-v-5984406b]{left:100%;top:100%;transform:rotate(180deg);transform-origin:0 0}.clip-point.top[data-v-5984406b]{left:50%;top:0;margin-left:-8px}.clip-point.bottom[data-v-5984406b]{left:50%;bottom:0;margin-left:-8px;transform:rotate(180deg)}.clip-point.left[data-v-5984406b]{left:0;top:50%;margin-top:-8px;transform:rotate(-90deg)}.clip-point.right[data-v-5984406b]{right:0;top:50%;margin-top:-8px;transform:rotate(90deg)}.clip-point.bottom.rotate-135[data-v-5984406b],.clip-point.left-bottom.rotate-90[data-v-5984406b],.clip-point.left-top.rotate-0[data-v-5984406b],.clip-point.left.rotate-45[data-v-5984406b],.clip-point.right-bottom.rotate-0[data-v-5984406b],.clip-point.right-top.rotate-90[data-v-5984406b],.clip-point.right.rotate-45[data-v-5984406b],.clip-point.top.rotate-135[data-v-5984406b]{cursor:nwse-resize}.clip-point.bottom.rotate-0[data-v-5984406b],.clip-point.left-bottom.rotate-135[data-v-5984406b],.clip-point.left-top.rotate-45[data-v-5984406b],.clip-point.left.rotate-90[data-v-5984406b],.clip-point.right-bottom.rotate-45[data-v-5984406b],.clip-point.right-top.rotate-135[data-v-5984406b],.clip-point.right.rotate-90[data-v-5984406b],.clip-point.top.rotate-0[data-v-5984406b]{cursor:ns-resize}.clip-point.bottom.rotate-45[data-v-5984406b],.clip-point.left-bottom.rotate-0[data-v-5984406b],.clip-point.left-top.rotate-90[data-v-5984406b],.clip-point.left.rotate-135[data-v-5984406b],.clip-point.right-bottom.rotate-90[data-v-5984406b],.clip-point.right-top.rotate-0[data-v-5984406b],.clip-point.right.rotate-135[data-v-5984406b],.clip-point.top.rotate-45[data-v-5984406b]{cursor:nesw-resize}.clip-point.bottom.rotate-90[data-v-5984406b],.clip-point.left-bottom.rotate-45[data-v-5984406b],.clip-point.left-top.rotate-135[data-v-5984406b],.clip-point.left.rotate-0[data-v-5984406b],.clip-point.right-bottom.rotate-135[data-v-5984406b],.clip-point.right-top.rotate-45[data-v-5984406b],.clip-point.right.rotate-0[data-v-5984406b],.clip-point.top.rotate-90[data-v-5984406b]{cursor:ew-resize}.editable-element-image[data-v-1156b3e1]{position:absolute}.editable-element-image.lock .element-content[data-v-1156b3e1]{cursor:default}.rotate-wrapper[data-v-1156b3e1]{width:100%;height:100%}.element-content[data-v-1156b3e1]{width:100%;height:100%;position:relative;cursor:move}.element-content .image-content[data-v-1156b3e1]{width:100%;height:100%;overflow:hidden;position:relative}.element-content img[data-v-1156b3e1]{position:absolute}.color-mask[data-v-1156b3e1]{position:absolute;top:0;bottom:0;left:0;right:0}svg[data-v-efb76626]{overflow:visible;position:absolute;top:0;left:0}.prosemirror-editor[data-v-3608adca]{cursor:text}.prosemirror-editor.format-painter[data-v-3608adca]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTcuMzUuMDEyLS4wNjYuOTk4YTUuMjcxIDUuMjcxIDAgMCAwLTEuMTg0LjA2IDMuOCAzLjggMCAwIDAtLjkzMy40NzJjLS40NC4zNTYtLjc4My44MTEtLjk5OCAxLjMyNGwuMDE4LS4wMzZ2NS4xMmgxLjA0di45OGgtMS4wNGwtLjAwMiA0LjE1Yy4xODcuNDI2LjQ2LjgxLjc5MSAxLjExN2wuMTc1LjE1MmMuMjkzLjIwOC42MTUuMzczLjg5LjQ3Mi40MS4wODIuODMuMTEyIDEuMjQ5LjA5bC4wNTcuOTk5YTYuMDYzIDYuMDYzIDAgMCAxLTEuNTg4LS4xMjkgNC44MzYgNC44MzYgMCAwIDEtMS4yNS0uNjQ3IDQuNDYzIDQuNDYzIDAgMCAxLS44MzgtLjg4M2MtLjIyNC4zMzItLjUuNjQyLS44MjQuOTI3YTQuMTEgNC4xMSAwIDAgMS0xLjMwNS42MzNBNi4xMjYgNi4xMjYgMCAwIDEgMCAxNS45MDlsLjA2OC0uOTk3Yy40MjQuMDI2Ljg1LS4wMDEgMS4yMTctLjA3LjMzNi0uMDk5LjY1MS0uMjU0Ljg5NC0uNDMuNDMtLjM4Ljc2NS0uODQ3Ljk4Mi0xLjM2OGwtLjAwNS4wMTRWOC45M0gyLjExNXYtLjk4aDEuMDRWMi44NjJhMy43NyAzLjc3IDAgMCAwLS43NzQtMS4xNjdsLS4xNjUtLjE1NmEzLjA2NCAzLjA2NCAwIDAgMC0uODgtLjQ0OEE1LjA2MiA1LjA2MiAwIDAgMCAuMDY3IDEuMDFMMCAuMDEyYTYuMTQgNi4xNCAwIDAgMSAxLjU5Mi4xMWMuNDUzLjEzNS44NzcuMzQ1IDEuMjkuNjUuMy4yNjUuNTY1LjU2NC43ODcuODkuMjMzLS4zMzEuNTItLjYzNC44NTMtLjkwNGE0LjgzNSA0LjgzNSAwIDAgMSAxLjMtLjY0OEE2LjE1NSA2LjE1NSAwIDAgMSA3LjM1LjAxMnoiIGZpbGw9IiMwRDBEMEQiLz48cGF0aCBkPSJtMTcuMzUgMTQuNSA0LjUtNC41LTYtNmMtMiAyLTMgMi01LjUgMi41LjQgMy4yIDQuODMzIDYuNjY3IDcgOHptNC41ODgtNC40OTNhLjMuMyAwIDAgMCAuNDI0IDBsLjY4LS42OGExLjUgMS41IDAgMCAwIDAtMi4xMjJMMjEuNjkgNS44NTNsMi4wMjUtMS41ODNhMS42MjkgMS42MjkgMCAxIDAtMi4yNzktMi4yOTZsLTEuNjAzIDIuMDIyLTEuMzU3LTEuMzU3YTEuNSAxLjUgMCAwIDAtMi4xMjEgMGwtLjY4LjY4YS4zLjMgMCAwIDAgMCAuNDI1bDYuMjYzIDYuMjYzeiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xNS44OTIgMy45NjJzLTEuMDMgMS4yMDItMi40OTQgMS44OWMtMS4wMDYuNDc0LTIuMTguNTg2LTIuNzM0LjYyNy0uMi4wMTUtLjM0NC4yMS0uMjc2LjM5OS4yOTIuODIgMS4xMTIgMi44IDIuNjU4IDQuMzQ2IDIuMTI2IDIuMTI3IDMuNjU4IDIuOTY4IDQuMTQyIDMuMjAzLjEuMDQ4LjIxNC4wMy4yOTgtLjA0Mi4zODYtLjMyNSAxLjUtMS4yNzcgMi4yMS0xLjk4Ni44OTItLjg4OSAyLjE4Ny0yLjQ0NyAyLjE4Ny0yLjQ0N20uNDc5LjA1NWEuMy4zIDAgMCAxLS40MjQgMGwtNi4yNjQtNi4yNjNhLjMuMyAwIDAgMSAwLS40MjVsLjY4LS42OGExLjUgMS41IDAgMCAxIDIuMTIyIDBsMS4zNTcgMS4zNTcgMS42MDMtMi4wMjJhMS42MjkgMS42MjkgMCAxIDEgMi4yOCAyLjI5NkwyMS42OSA1Ljg1M2wxLjM1MiAxLjM1MmExLjUgMS41IDAgMCAxIDAgMi4xMjJsLS42OC42OHoiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) 2 5,default!important}.editable-element-text[data-v-2a1e49ba]{position:absolute}.editable-element-text.lock .element-content[data-v-2a1e49ba]{cursor:default}.rotate-wrapper[data-v-2a1e49ba]{width:100%;height:100%}.element-content[data-v-2a1e49ba]{position:relative;padding:10px;line-height:1.5;word-break:break-word;cursor:move}.element-content .text[data-v-2a1e49ba]{position:relative}.element-content[data-v-2a1e49ba] a{cursor:text}.drag-handler[data-v-2a1e49ba]{height:10px;position:absolute;left:0;right:0}.drag-handler.top[data-v-2a1e49ba]{top:0}.drag-handler.bottom[data-v-2a1e49ba]{bottom:0}.editable-element-shape[data-v-50bec549]{position:absolute;pointer-events:none}.editable-element-shape.lock .element-content[data-v-50bec549]{cursor:default}.editable-element-shape.format-painter .element-content[data-v-50bec549]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNzUgMTMuNzY0VjEuNDIxYS4zLjMgMCAwIDEgLjQ0OC0uMjZsMTAuOTEgNi4xOTdhLjMuMyAwIDAgMS0uMTE2LjU1OWwtNC4xOTYuNDQyIDIuNTgyIDQuNDcyYS4zLjMgMCAwIDEtLjExLjQxbC0zLjE4NCAxLjgzOGEuMy4zIDAgMCAxLS40MS0uMTFsLTIuNTgxLTQuNDcyLTIuODEgMy40NTZhLjMuMyAwIDAgMS0uNTMzLS4xODl6IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJtMjYgMTQuNSA0LjUtNC41LTYtNmMtMiAyLTMgMi01LjUgMi41LjQgMy4yIDQuODMzIDYuNjY3IDcgOHptNC41ODgtNC40OTRhLjMuMyAwIDAgMCAuNDI0IDBsLjY4LS42OGExLjUgMS41IDAgMCAwIDAtMi4xMjFMMzAuMzQgNS44NTJsMi4wMjYtMS41ODJhMS42MjkgMS42MjkgMCAxIDAtMi4yOC0yLjI5NmwtMS42MDMgMi4wMjEtMS4zNTctMS4zNTZhMS41IDEuNSAwIDAgMC0yLjEyIDBsLS42ODEuNjhhLjMuMyAwIDAgMCAwIC40MjRsNi4yNjMgNi4yNjN6IiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTI0LjU0MyAzLjk2MXMtMS4wMyAxLjIwMi0yLjQ5NCAxLjg5MWMtMS4wMDYuNDc0LTIuMTgxLjU4NS0yLjczNC42MjctLjIuMDE0LS4zNDQuMjA5LS4yNzcuMzk4LjI5My44MiAxLjExMiAyLjgwMSAyLjY1OCA0LjM0NyAyLjEyNiAyLjEyNiAzLjY1OSAyLjk2OCA0LjE0MiAzLjIwMi4xLjA0OC4yMTUuMDMuMjk5LS4wNDEuMzg1LS4zMjYgMS41LTEuMjc3IDIuMjEtMS45ODYuODkxLS44OSAyLjE4Ni0yLjQ0OCAyLjE4Ni0yLjQ0OG0uNDguMDU1YS4zLjMgMCAwIDEtLjQyNSAwbC02LjI2My02LjI2M2EuMy4zIDAgMCAxIDAtLjQyNGwuNjgtLjY4YTEuNSAxLjUgMCAwIDEgMi4xMjIgMGwxLjM1NiAxLjM1NiAxLjYwNC0yLjAyMWExLjYyOSAxLjYyOSAwIDEgMSAyLjI3OSAyLjI5NkwzMC4zNCA1Ljg1MmwxLjM1MyAxLjM1M2ExLjUgMS41IDAgMCAxIDAgMi4xMjFsLS42OC42OHoiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) 2 5,default!important}.rotate-wrapper[data-v-50bec549]{width:100%;height:100%}.element-content[data-v-50bec549]{width:100%;height:100%;position:relative;cursor:move}.element-content svg[data-v-50bec549]{transform-origin:0 0;overflow:visible}.element-content .shape-path[data-v-50bec549]{pointer-events:all}.shape-text[data-v-50bec549]{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;padding:10px;line-height:1.2;word-break:break-word;pointer-events:none}.shape-text.editable[data-v-50bec549]{pointer-events:all}.shape-text.top[data-v-50bec549]{justify-content:flex-start}.shape-text.middle[data-v-50bec549]{justify-content:center}.shape-text.bottom[data-v-50bec549]{justify-content:flex-end}.editable-element-shape[data-v-16512454]{position:absolute;pointer-events:none}.editable-element-shape.lock .line-path[data-v-16512454],.editable-element-shape.lock .line-point[data-v-16512454]{cursor:default}.element-content[data-v-16512454]{width:100%;height:100%;position:relative}.element-content svg[data-v-16512454]{transform-origin:0 0;overflow:visible}.line-path[data-v-16512454],.line-point[data-v-16512454]{pointer-events:all;cursor:move}.chart[data-v-ae2a96a6]{display:flex}.chart-content[data-v-ae2a96a6]{transform-origin:0 0}.chart-content{--theme-color-1:#666;--theme-color-2:#666;--theme-color-3:#666;--theme-color-4:#666;--theme-color-5:#666;--theme-color-6:#666;--theme-color-7:#666;--theme-color-8:#666;--theme-color-9:#666;--theme-color-10:#666;--grid-color:rgba(0,0,0,.4)}.chart-content .ct-series-a .ct-line,.chart-content .ct-series-a .ct-point{stroke:var(--theme-color-1)}.chart-content .ct-series-a .ct-area{fill:var(--theme-color-1)}.chart-content .ct-series-a .ct-bar{stroke:var(--theme-color-1)}.chart-content .ct-series-a .ct-slice-pie{fill:var(--theme-color-1)}.chart-content .ct-series-a .ct-slice-donut{stroke:var(--theme-color-1)}.chart-content .ct-series-b .ct-line,.chart-content .ct-series-b .ct-point{stroke:var(--theme-color-2)}.chart-content .ct-series-b .ct-area{fill:var(--theme-color-2)}.chart-content .ct-series-b .ct-bar{stroke:var(--theme-color-2)}.chart-content .ct-series-b .ct-slice-pie{fill:var(--theme-color-2)}.chart-content .ct-series-b .ct-slice-donut{stroke:var(--theme-color-2)}.chart-content .ct-series-c .ct-line,.chart-content .ct-series-c .ct-point{stroke:var(--theme-color-3)}.chart-content .ct-series-c .ct-area{fill:var(--theme-color-3)}.chart-content .ct-series-c .ct-bar{stroke:var(--theme-color-3)}.chart-content .ct-series-c .ct-slice-pie{fill:var(--theme-color-3)}.chart-content .ct-series-c .ct-slice-donut{stroke:var(--theme-color-3)}.chart-content .ct-series-d .ct-line,.chart-content .ct-series-d .ct-point{stroke:var(--theme-color-4)}.chart-content .ct-series-d .ct-area{fill:var(--theme-color-4)}.chart-content .ct-series-d .ct-bar{stroke:var(--theme-color-4)}.chart-content .ct-series-d .ct-slice-pie{fill:var(--theme-color-4)}.chart-content .ct-series-d .ct-slice-donut{stroke:var(--theme-color-4)}.chart-content .ct-series-e .ct-line,.chart-content .ct-series-e .ct-point{stroke:var(--theme-color-5)}.chart-content .ct-series-e .ct-area{fill:var(--theme-color-5)}.chart-content .ct-series-e .ct-bar{stroke:var(--theme-color-5)}.chart-content .ct-series-e .ct-slice-pie{fill:var(--theme-color-5)}.chart-content .ct-series-e .ct-slice-donut{stroke:var(--theme-color-5)}.chart-content .ct-series-f .ct-line,.chart-content .ct-series-f .ct-point{stroke:var(--theme-color-6)}.chart-content .ct-series-f .ct-area{fill:var(--theme-color-6)}.chart-content .ct-series-f .ct-bar{stroke:var(--theme-color-6)}.chart-content .ct-series-f .ct-slice-pie{fill:var(--theme-color-6)}.chart-content .ct-series-f .ct-slice-donut{stroke:var(--theme-color-6)}.chart-content .ct-series-g .ct-line,.chart-content .ct-series-g .ct-point{stroke:var(--theme-color-7)}.chart-content .ct-series-g .ct-area{fill:var(--theme-color-7)}.chart-content .ct-series-g .ct-bar{stroke:var(--theme-color-7)}.chart-content .ct-series-g .ct-slice-pie{fill:var(--theme-color-7)}.chart-content .ct-series-g .ct-slice-donut{stroke:var(--theme-color-7)}.chart-content .ct-series-h .ct-line,.chart-content .ct-series-h .ct-point{stroke:var(--theme-color-8)}.chart-content .ct-series-h .ct-area{fill:var(--theme-color-8)}.chart-content .ct-series-h .ct-bar{stroke:var(--theme-color-8)}.chart-content .ct-series-h .ct-slice-pie{fill:var(--theme-color-8)}.chart-content .ct-series-h .ct-slice-donut{stroke:var(--theme-color-8)}.chart-content .ct-series-i .ct-line,.chart-content .ct-series-i .ct-point{stroke:var(--theme-color-9)}.chart-content .ct-series-i .ct-area{fill:var(--theme-color-9)}.chart-content .ct-series-i .ct-bar{stroke:var(--theme-color-9)}.chart-content .ct-series-i .ct-slice-pie{fill:var(--theme-color-9)}.chart-content .ct-series-i .ct-slice-donut{stroke:var(--theme-color-9)}.chart-content .ct-grid{stroke:var(--grid-color)}.chart-content .ct-label{fill:var(--grid-color);color:var(--grid-color)}.legends{height:20px;justify-content:center;font-size:14px}.legend,.legends{display:flex;align-items:center}.legend+.legend{margin-left:10px}.legend .block{width:10px;height:10px;margin-right:5px}.editable-element-chart[data-v-6fc3de39]{position:absolute}.editable-element-chart.lock .element-content[data-v-6fc3de39]{cursor:default}.rotate-wrapper[data-v-6fc3de39]{width:100%;height:100%}.element-content[data-v-6fc3de39]{width:100%;height:100%;overflow:hidden;cursor:move}.custom-textarea[data-v-7a7222ac]{border:0;outline:0;-webkit-user-modify:read-write-plaintext-only}.editable-table[data-v-0236a619],table[data-v-0236a619]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}table[data-v-0236a619]{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;border:0;word-wrap:break-word;--themeColor:$themeColor;--subThemeColor1:$themeColor;--subThemeColor2:$themeColor}table.theme[data-v-0236a619]{background-color:#fff}table.theme tr:nth-child(2n) .cell[data-v-0236a619]{background-color:var(--subThemeColor1)}table.theme tr:nth-child(odd) .cell[data-v-0236a619]{background-color:var(--subThemeColor2)}table.theme.col-footer tr .cell[data-v-0236a619]:last-child,table.theme.col-header tr .cell[data-v-0236a619]:first-child,table.theme.row-footer tr:last-child .cell[data-v-0236a619],table.theme.row-header tr:first-child .cell[data-v-0236a619]{background-color:var(--themeColor)}table .cell[data-v-0236a619]{position:relative;white-space:normal;word-wrap:break-word;vertical-align:middle;font-size:14px;background-clip:padding-box;cursor:default}table .cell.selected[data-v-0236a619]:after{content:"";width:100%;height:100%;position:absolute;top:0;left:0;background-color:hsla(0,0%,40%,.4)}table .cell-text[data-v-0236a619]{padding:5px;line-height:1.5;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:text}table .cell-text.active[data-v-0236a619]{-webkit-user-select:text;-moz-user-select:text;user-select:text}.drag-line[data-v-0236a619]{position:absolute;top:0;bottom:0;width:3px;background-color:#d14424;margin-left:-1px;opacity:0;z-index:2;cursor:col-resize}.editable-element-table[data-v-742a731e]{position:absolute}.editable-element-table.lock .element-content[data-v-742a731e]{cursor:default}.rotate-wrapper[data-v-742a731e]{width:100%;height:100%}.element-content[data-v-742a731e]{width:100%;height:100%;position:relative;cursor:move}.table-mask[data-v-742a731e]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .2s}.table-mask .mask-tip[data-v-742a731e]{position:absolute;top:5px;left:5px;background-color:rgba(0,0,0,.5);color:#fff;padding:6px 12px;font-size:12px;transform-origin:0 0}.table-mask[data-v-742a731e]:hover:not(.lock){opacity:.9}.editable-element-latex[data-v-35c33b80]{position:absolute}.editable-element-latex.lock .element-content[data-v-35c33b80]{cursor:default}.rotate-wrapper[data-v-35c33b80]{width:100%;height:100%}.element-content[data-v-35c33b80]{width:100%;height:100%;position:relative;cursor:move}.element-content svg[data-v-35c33b80]{transform-origin:0 0;overflow:visible}.video-player[data-v-e55352ca]{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1;transform-origin:0 0}.video-player.hide-controller[data-v-e55352ca]{cursor:none}.video-player.hide-controller .controller-mask[data-v-e55352ca],.video-player.hide-controller .controller[data-v-e55352ca]{opacity:0;transform:translateY(100%)}.video-wrap[data-v-e55352ca]{position:relative;background:#000;font-size:0;width:100%;height:100%}.video-wrap .video[data-v-e55352ca]{width:100%;height:100%}.controller-mask[data-v-e55352ca]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%;position:absolute;bottom:0;transition:all .3s ease}.controller[data-v-e55352ca]{position:absolute;bottom:0;left:0;right:0;height:41px;padding:0 20px;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:all .3s ease}.controller .bar-wrap[data-v-e55352ca]{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:calc(100% - 40px);height:3px}.controller .bar-wrap:hover .bar .played .thumb[data-v-e55352ca]{transform:scale(1)}.controller .bar-wrap .bar-time[data-v-e55352ca]{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.controller .bar-wrap .bar-time.hidden[data-v-e55352ca]{opacity:0}.controller .bar-wrap .bar[data-v-e55352ca]{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.controller .bar-wrap .bar .loaded[data-v-e55352ca]{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;transition:all .5s ease;will-change:width}.controller .bar-wrap .bar .played[data-v-e55352ca]{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width;background-color:#fff}.controller .bar-wrap .bar .played .thumb[data-v-e55352ca]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons[data-v-e55352ca]{height:38px;position:absolute;bottom:0;display:flex;align-items:center}.controller .icons.icons-right[data-v-e55352ca]{right:15px}.controller .icons .time[data-v-e55352ca]{line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.controller .icons .icon[data-v-e55352ca]{width:40px;height:100%;position:relative;cursor:pointer;display:flex;align-items:center;font-size:20px}.controller .icons .icon.play-icon[data-v-e55352ca]{font-size:26px}.controller .icons .icon .icon-content[data-v-e55352ca]{transition:all .2s ease-in-out;opacity:.8;color:#fff}.controller .icons .icon.loop-icon[data-v-e55352ca]{font-size:12px}.controller .icons .icon.loop-icon .icon-content[data-v-e55352ca]{opacity:.5}.controller .icons .icon.speed-icon[data-v-e55352ca]{font-size:12px;position:relative}.controller .icons .icon .speed-menu[data-v-e55352ca]{width:70px;position:absolute;bottom:30px;left:-23px;background-color:#22211b;padding:5px 0;color:#ddd}.controller .icons .icon .speed-menu .speed-menu-item[data-v-e55352ca]{padding:8px 0;text-align:center}.controller .icons .icon .speed-menu .speed-menu-item[data-v-e55352ca]:hover{background-color:#393833;color:#fff}.controller .icons .icon .speed-menu .speed-menu-item.active[data-v-e55352ca]{font-weight:700;color:#fff}.controller .icons .icon.active .icon-content[data-v-e55352ca],.controller .icons .icon:hover .icon-content[data-v-e55352ca]{opacity:1}.controller .icons .volume[data-v-e55352ca]{height:100%;position:relative;cursor:pointer;display:flex;align-items:center}.controller .icons .volume:hover .volume-bar-wrap .volume-bar[data-v-e55352ca]{width:45px}.controller .icons .volume:hover .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{transform:scale(1)}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar[data-v-e55352ca]{width:45px}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{transform:scale(1)}.controller .icons .volume-bar-wrap[data-v-e55352ca]{display:inline-block;margin:0 15px 0 -5px;vertical-align:middle;height:100%}.controller .icons .volume-bar[data-v-e55352ca]{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.controller .icons .volume-bar .volume-bar-inner[data-v-e55352ca]{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width;background-color:#fff}.controller .icons .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons .loop[data-v-e55352ca]{display:inline-block;height:100%}.bezel[data-v-e55352ca]{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.bezel .bezel-icon[data-v-e55352ca]{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.5);border-radius:50%;opacity:0;pointer-events:none;font-size:40px}.bezel .bezel-icon.bezel-transition[data-v-e55352ca]{animation:bezel-hide-e55352ca .5s linear}@keyframes bezel-hide-e55352ca{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.load-error[data-v-e55352ca]{position:absolute;left:0;right:0;top:0;bottom:0;font-size:15px;color:#fff;pointer-events:none;display:flex;justify-content:center;align-items:center}.editable-element-video[data-v-5dc89f2a]{position:absolute}.editable-element-video.lock .handler-border[data-v-5dc89f2a]{cursor:default}.rotate-wrapper[data-v-5dc89f2a]{width:100%;height:100%}.element-content[data-v-5dc89f2a]{width:100%;height:100%;position:relative}.handler-border[data-v-5dc89f2a]{position:absolute;cursor:move}.handler-border.t[data-v-5dc89f2a]{width:100%;height:20px;top:0;left:0}.handler-border.b[data-v-5dc89f2a]{width:100%;height:5px;bottom:0;left:0}.handler-border.l[data-v-5dc89f2a]{width:10px;height:100%;left:0;top:0}.handler-border.r[data-v-5dc89f2a]{width:10px;height:100%;right:0;top:0}.audio-player[data-v-44037f56]{width:280px;height:50px;position:relative;line-height:1;transform-origin:0 0;background:#000}.audio-player[data-v-44037f56],.controller[data-v-44037f56]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.controller[data-v-44037f56]{position:absolute;bottom:0;left:0;right:0;height:41px;padding:0 20px;transition:all .3s ease}.controller .bar-wrap[data-v-44037f56]{padding:5px 0;cursor:pointer;position:absolute;bottom:35px;width:calc(100% - 40px);height:3px}.controller .bar-wrap:hover .bar .played .thumb[data-v-44037f56]{transform:scale(1)}.controller .bar-wrap .bar-time[data-v-44037f56]{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.controller .bar-wrap .bar-time.hidden[data-v-44037f56]{opacity:0}.controller .bar-wrap .bar[data-v-44037f56]{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.controller .bar-wrap .bar .loaded[data-v-44037f56]{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;transition:all .5s ease;will-change:width}.controller .bar-wrap .bar .played[data-v-44037f56]{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width;background-color:#fff}.controller .bar-wrap .bar .played .thumb[data-v-44037f56]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons[data-v-44037f56]{height:38px;position:absolute;bottom:0;left:14px;display:flex;align-items:center}.controller .icons .icon[data-v-44037f56]{width:36px;height:100%;position:relative;cursor:pointer;display:flex;align-items:center;font-size:20px}.controller .icons .icon.play-icon[data-v-44037f56]{font-size:26px}.controller .icons .icon .icon-content[data-v-44037f56]{transition:all .2s ease-in-out;opacity:.8;color:#fff}.controller .icons .icon.active .icon-content[data-v-44037f56],.controller .icons .icon:hover .icon-content[data-v-44037f56]{opacity:1}.controller .icons .volume[data-v-44037f56]{height:100%;position:relative;cursor:pointer;display:flex;align-items:center}.controller .icons .volume:hover .volume-bar-wrap .volume-bar[data-v-44037f56]{width:45px}.controller .icons .volume:hover .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{transform:scale(1)}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar[data-v-44037f56]{width:45px}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{transform:scale(1)}.controller .icons .volume-bar-wrap[data-v-44037f56]{display:inline-block;margin:0 15px 0 -5px;vertical-align:middle;height:100%}.controller .icons .volume-bar[data-v-44037f56]{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.controller .icons .volume-bar .volume-bar-inner[data-v-44037f56]{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width;background-color:#fff}.controller .icons .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .time[data-v-44037f56]{height:38px;position:absolute;right:20px;bottom:0;display:flex;align-items:center;line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.controller .time .ptime[data-v-44037f56]{margin-right:2px}.controller .time .dtime[data-v-44037f56]{margin-left:2px}.editable-element-audio[data-v-53bdc956]{position:absolute}.editable-element-audio.lock .audio-icon[data-v-53bdc956]{cursor:default}.rotate-wrapper[data-v-53bdc956]{width:100%;height:100%}.element-content[data-v-53bdc956]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.audio-icon[data-v-53bdc956]{cursor:move}.audio-player[data-v-53bdc956]{position:absolute}.mouse-selection[data-v-2c5e1d42]{position:absolute;background-color:rgba(209,68,36,.1);border:1px solid #d14424;z-index:200}.mouse-selection.quadrant-1[data-v-2c5e1d42]{transform-origin:50% 0;transform:rotate(180deg)}.mouse-selection.quadrant-2[data-v-2c5e1d42]{transform-origin:0 0;transform:rotate(180deg)}.mouse-selection.quadrant-3[data-v-2c5e1d42]{transform-origin:0 50%;transform:rotate(180deg)}.mouse-selection.quadrant-4[data-v-2c5e1d42]{transform-origin:0 0;transform:rotate(0deg)}.grid-lines[data-v-05484a24]{width:100%;height:100%;overflow:visible;z-index:999;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.viewport-background[data-v-b6b18502]{width:100%;height:100%;background-position:50%;position:absolute}.alignment-line[data-v-ed6fc00a]{position:absolute;z-index:100}.alignment-line .line[data-v-ed6fc00a]{width:0;height:0;border:0 dashed #d14424}.alignment-line .line.vertical[data-v-ed6fc00a]{transform:translateY(-.5px);border-left-width:1px}.alignment-line .line.horizontal[data-v-ed6fc00a]{transform:translateX(-.5px);border-top-width:1px}.ruler[data-v-2963c74c]{font-size:12px}.h[data-v-2963c74c]{position:absolute;background-color:#fff;border:1px solid #eee;height:20px;top:5px;display:flex;justify-content:space-between;align-items:center;overflow:hidden}.h .ruler-marker-100[data-v-2963c74c]{height:100%;width:10%;line-height:20px;text-align:right;flex-shrink:0;padding-right:5px;position:relative}.h .ruler-marker-100.hide span[data-v-2963c74c],.h .ruler-marker-100.omit[data-v-2963c74c]:before{display:none}.h .ruler-marker-100[data-v-2963c74c]:not(:last-child):after{content:"";width:.1px;height:12px;position:absolute;right:0;bottom:0;background-color:#999}.h .ruler-marker-100[data-v-2963c74c]:before{content:"";width:.1px;height:8px;position:absolute;right:50%;bottom:0;background-color:#999}.v[data-v-2963c74c]{position:absolute;background-color:#fff;border:1px solid #eee;width:20px;left:5px;overflow:hidden}.v .ruler-marker-100[data-v-2963c74c]{width:100%;line-height:20px;text-align:right;padding-bottom:5px;position:relative;writing-mode:vertical-rl}.v .ruler-marker-100.hide span[data-v-2963c74c],.v .ruler-marker-100.omit[data-v-2963c74c]:before{display:none}.v .ruler-marker-100[data-v-2963c74c]:not(:last-child):after{content:"";height:.1px;width:12px;position:absolute;bottom:0;right:0;background-color:#999}.v .ruler-marker-100[data-v-2963c74c]:before{content:"";height:.1px;width:8px;position:absolute;bottom:50%;right:0;background-color:#999}.element-create-selection[data-v-85b0bbaa]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;cursor:crosshair}.element-create-selection svg[data-v-85b0bbaa]{overflow:visible}.selection[data-v-85b0bbaa]{position:absolute;opacity:.8}.selection[data-v-85b0bbaa]:not(.line){border:1px solid #d14424}.shape-create-canvas[data-v-224f36be]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;cursor:crosshair}.shape-create-canvas svg[data-v-224f36be]{width:100%;height:100%;overflow:visible}.resize-handler[data-v-1e66197f]{position:absolute;width:10px;height:10px;left:0;top:0;margin:-5px 0 0 -5px;border:1px solid #d14424;background-color:#fff;border-radius:1px;cursor:pointer}.resize-handler.bottom.rotate-135[data-v-1e66197f],.resize-handler.left-bottom.rotate-90[data-v-1e66197f],.resize-handler.left-top.rotate-0[data-v-1e66197f],.resize-handler.left.rotate-45[data-v-1e66197f],.resize-handler.right-bottom.rotate-0[data-v-1e66197f],.resize-handler.right-top.rotate-90[data-v-1e66197f],.resize-handler.right.rotate-45[data-v-1e66197f],.resize-handler.top.rotate-135[data-v-1e66197f]{cursor:nwse-resize}.resize-handler.bottom.rotate-0[data-v-1e66197f],.resize-handler.left-bottom.rotate-135[data-v-1e66197f],.resize-handler.left-top.rotate-45[data-v-1e66197f],.resize-handler.left.rotate-90[data-v-1e66197f],.resize-handler.right-bottom.rotate-45[data-v-1e66197f],.resize-handler.right-top.rotate-135[data-v-1e66197f],.resize-handler.right.rotate-90[data-v-1e66197f],.resize-handler.top.rotate-0[data-v-1e66197f]{cursor:ns-resize}.resize-handler.bottom.rotate-45[data-v-1e66197f],.resize-handler.left-bottom.rotate-0[data-v-1e66197f],.resize-handler.left-top.rotate-90[data-v-1e66197f],.resize-handler.left.rotate-135[data-v-1e66197f],.resize-handler.right-bottom.rotate-90[data-v-1e66197f],.resize-handler.right-top.rotate-0[data-v-1e66197f],.resize-handler.right.rotate-135[data-v-1e66197f],.resize-handler.top.rotate-45[data-v-1e66197f]{cursor:nesw-resize}.resize-handler.bottom.rotate-90[data-v-1e66197f],.resize-handler.left-bottom.rotate-45[data-v-1e66197f],.resize-handler.left-top.rotate-135[data-v-1e66197f],.resize-handler.left.rotate-0[data-v-1e66197f],.resize-handler.right-bottom.rotate-135[data-v-1e66197f],.resize-handler.right-top.rotate-45[data-v-1e66197f],.resize-handler.right.rotate-0[data-v-1e66197f],.resize-handler.top.rotate-90[data-v-1e66197f]{cursor:ew-resize}.border-line[data-v-8346cf6c]{position:absolute;width:0;height:0;left:0;top:0;border:0 dashed #d14424}.border-line.top[data-v-8346cf6c]{border-top-width:1px}.border-line.bottom[data-v-8346cf6c]{border-bottom-width:1px}.border-line.left[data-v-8346cf6c]{border-left-width:1px}.border-line.right[data-v-8346cf6c]{border-right-width:1px}.border-line.wide[data-v-8346cf6c]:before{content:"";position:absolute;background:transparent;cursor:move}.border-line.wide.top[data-v-8346cf6c]:before{top:-8px;left:-8px;width:calc(100% + 16px);height:16px}.border-line.wide.bottom[data-v-8346cf6c]:before{bottom:-8px;left:-8px;width:calc(100% + 16px);height:16px}.border-line.wide.left[data-v-8346cf6c]:before{top:-8px;left:-8px;width:16px;height:calc(100% + 16px)}.border-line.wide.right[data-v-8346cf6c]:before{top:-8px;right:-8px;width:16px;height:calc(100% + 16px)}.multi-select-operate[data-v-97dc9b9a]{position:absolute;top:0;left:0;z-index:101}.rotate-handler[data-v-b99d8dae]{position:absolute;width:10px;height:10px;top:-25px;margin-left:-5px;border:1px solid #d14424;background-color:#fff;border-radius:1px;cursor:grab}.rotate-handler[data-v-b99d8dae]:active{cursor:grabbing}.image-element-operate.cliping[data-v-7bcad5a9]{visibility:hidden}.operate-keypoint-handler[data-v-d1eb5d90]{position:absolute;width:10px;height:10px;left:0;top:0;margin:-5px 0 0 -5px;border:1px solid #d14424;background-color:#ffe873;border-radius:1px}svg[data-v-3aa5cc44]{position:absolute;left:0;top:0;pointer-events:none;transform-origin:0 0}.anchor-line[data-v-3aa5cc44]{stroke-width:1px;stroke-dasharray:5 5;opacity:.5}.divider.horizontal[data-v-6b66cde8]{width:100%;margin:24px 0;border-block-start:1px solid rgba(5,5,5,.06)}.divider.vertical[data-v-6b66cde8]{position:relative;height:1em;display:inline-block;margin:0 8px;border-inline-start:1px solid rgba(5,5,5,.06)}.link-handler[data-v-316c4664]{height:30px;position:absolute;left:0;font-size:12px;padding:0 10px;background-color:#fff;box-shadow:3px 3px 3px rgba(0,0,0,.15);display:flex;align-items:center;color:#d14424}.link[data-v-316c4664]{max-width:300px;margin-right:20px;word-break:keep-all;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.btns[data-v-316c4664]{display:flex;align-items:center}.btns .btn[data-v-316c4664]{word-break:keep-all;cursor:pointer}.operate[data-v-5ec1ff35]{position:absolute;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.operate.multi-select[data-v-5ec1ff35]{opacity:.2}.animation-index[data-v-5ec1ff35]{position:absolute;top:0;left:-24px;font-size:12px}.animation-index .index-item[data-v-5ec1ff35]{width:18px;height:18px;background-color:#fff;color:#d14424;border:1px solid #d14424;display:flex;justify-content:center;align-items:center}.animation-index .index-item+.index-item[data-v-5ec1ff35]{margin-top:5px}.base-element-image[data-v-24fef706]{position:absolute}.rotate-wrapper[data-v-24fef706]{width:100%;height:100%}.element-content[data-v-24fef706]{width:100%;height:100%;position:relative}.element-content .image-content[data-v-24fef706]{width:100%;height:100%;overflow:hidden;position:relative}.element-content img[data-v-24fef706]{position:absolute}.color-mask[data-v-24fef706]{position:absolute;top:0;bottom:0;left:0;right:0}.base-element-text[data-v-52a206f2]{position:absolute}.rotate-wrapper[data-v-52a206f2]{width:100%;height:100%}.element-content[data-v-52a206f2]{position:relative;padding:10px;line-height:1.5;word-break:break-word}.element-content .text[data-v-52a206f2]{position:relative}.base-element-shape[data-v-b13f8fa8]{position:absolute}.rotate-wrapper[data-v-b13f8fa8]{width:100%;height:100%}.element-content[data-v-b13f8fa8]{width:100%;height:100%;position:relative}.element-content svg[data-v-b13f8fa8]{transform-origin:0 0;overflow:visible}.shape-text[data-v-b13f8fa8]{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;padding:10px;line-height:1.2;word-break:break-word}.shape-text.top[data-v-b13f8fa8]{justify-content:flex-start}.shape-text.middle[data-v-b13f8fa8]{justify-content:center}.shape-text.bottom[data-v-b13f8fa8]{justify-content:flex-end}.base-element-line[data-v-443e2f82]{position:absolute}.element-content[data-v-443e2f82]{width:100%;height:100%;position:relative}.element-content svg[data-v-443e2f82]{transform-origin:0 0;overflow:visible}.base-element-chart[data-v-7c03d68d]{position:absolute}.element-content[data-v-7c03d68d],.rotate-wrapper[data-v-7c03d68d]{width:100%;height:100%}.static-table[data-v-5d949d4d],table[data-v-5d949d4d]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}table[data-v-5d949d4d]{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;border:0;word-wrap:break-word;--themeColor:$themeColor;--subThemeColor1:$themeColor;--subThemeColor2:$themeColor}table.theme[data-v-5d949d4d]{background-color:#fff}table.theme tr:nth-child(2n) .cell[data-v-5d949d4d]{background-color:var(--subThemeColor1)}table.theme tr:nth-child(odd) .cell[data-v-5d949d4d]{background-color:var(--subThemeColor2)}table.theme.col-footer tr .cell[data-v-5d949d4d]:last-child,table.theme.col-header tr .cell[data-v-5d949d4d]:first-child,table.theme.row-footer tr:last-child .cell[data-v-5d949d4d],table.theme.row-header tr:first-child .cell[data-v-5d949d4d]{background-color:var(--themeColor)}table .cell[data-v-5d949d4d]{position:relative;white-space:normal;word-wrap:break-word;vertical-align:middle;background-clip:padding-box}table .cell-text[data-v-5d949d4d]{padding:5px;line-height:1.5}.base-element-table[data-v-3eff7eba]{position:absolute}.rotate-wrapper[data-v-3eff7eba]{width:100%;height:100%}.element-content[data-v-3eff7eba]{width:100%;height:100%;position:relative}.base-element-latex[data-v-1587280d]{position:absolute}.rotate-wrapper[data-v-1587280d]{width:100%;height:100%}.element-content[data-v-1587280d]{width:100%;height:100%;position:relative}.element-content svg[data-v-1587280d]{transform-origin:0 0;overflow:visible}.base-element-video[data-v-09436dde]{position:absolute}.rotate-wrapper[data-v-09436dde]{width:100%;height:100%}.element-content[data-v-09436dde]{width:100%;height:100%;background-color:#000;background-position:50%;background-size:contain;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.icon[data-v-09436dde]{font-size:140px;color:#aaa}.base-element-audio[data-v-5da834d7]{position:absolute}.rotate-wrapper[data-v-5da834d7]{width:100%;height:100%}.element-content[data-v-5da834d7]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.audio-icon[data-v-5da834d7]{cursor:move}.thumbnail-slide[data-v-43dcaa52]{background-color:#fff;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none}.elements[data-v-43dcaa52]{transform-origin:0 0}.background[data-v-43dcaa52]{width:100%;height:100%;background-position:50%;position:absolute}.placeholder[data-v-43dcaa52]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.tabs[data-v-5e3d7626]{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1}.tabs[data-v-5e3d7626]:not(.card){font-size:13px;align-items:center;justify-content:flex-start;border-bottom:1px solid #eee}.tabs:not(.card).space-around[data-v-5e3d7626]{justify-content:space-around}.tabs:not(.card).space-between[data-v-5e3d7626]{justify-content:space-between}.tabs:not(.card) .tab[data-v-5e3d7626]{text-align:center;border-bottom:2px solid transparent;padding:8px 10px;cursor:pointer}.tabs:not(.card) .tab.active[data-v-5e3d7626]{border-bottom:2px solid var(--color,#d14424)}.tabs.card[data-v-5e3d7626]{height:40px;font-size:12px;flex-shrink:0}.tabs.card .tab[data-v-5e3d7626]{flex:1;display:flex;justify-content:center;align-items:center;background-color:#f9f9f9;border-bottom:1px solid #eee;cursor:pointer}.tabs.card .tab.active[data-v-5e3d7626]{background-color:transparent;border-bottom-color:transparent}.tabs.card .tab+.tab[data-v-5e3d7626]{border-left:1px solid #eee}.button[data-v-52c90330]{height:32px;line-height:32px;outline:0;font-size:13px;padding:0 15px;text-align:center;color:#41464b;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none;letter-spacing:1px;cursor:pointer}.button.small[data-v-52c90330]{height:24px;line-height:24px;padding:0 7px;letter-spacing:0}.button.default[data-v-52c90330]{background-color:#fff;border:1px solid #d9d9d9;color:#41464b}.button.default[data-v-52c90330]:hover{color:#d14424;border-color:#d14424}.button.primary[data-v-52c90330]{background-color:#d14424;border:1px solid #d14424;color:#fff}.button.primary[data-v-52c90330]:hover{background-color:#de6949;border-color:#de6949}.button.checkbox[data-v-52c90330],.button.radio[data-v-52c90330]{background-color:#fff;border:1px solid #d9d9d9;color:#41464b}.button.checkbox[data-v-52c90330]:not(.checked):hover,.button.radio[data-v-52c90330]:not(.checked):hover{color:#d14424}.button.checked[data-v-52c90330]{color:#fff;background-color:#d14424;border-color:#d14424}.button.checked[data-v-52c90330]:hover{background-color:#de6949;border-color:#de6949}.button.disabled[data-v-52c90330]{background-color:#f5f5f5;border:1px solid #d9d9d9;color:#b7b7b7;cursor:default}.select[data-v-5bf3b141]{width:100%;height:32px;padding-right:32px;border-radius:2px;transition:border-color .25s;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#fff;border:1px solid #d9d9d9;position:relative;cursor:pointer}.select[data-v-5bf3b141]:not(.disabled):hover{border-color:#d14424}.select.disabled[data-v-5bf3b141]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7;cursor:default}.select .selector[data-v-5bf3b141]{min-width:50px;height:30px;line-height:30px;padding-left:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.options[data-v-5bf3b141]{max-height:260px;padding:5px;overflow:auto;text-align:left;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.option[data-v-5bf3b141]{height:32px;line-height:32px;padding:0 5px;border-radius:2px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.option.disabled[data-v-5bf3b141]{color:#b7b7b7;cursor:default}.option[data-v-5bf3b141]:not(.disabled,.selected):hover{background-color:hsla(0,0%,40%,.05)}.option.selected[data-v-5bf3b141]{background-color:rgba(209,68,36,.05)}.icon[data-v-5bf3b141]{width:32px;height:30px;color:#bfbfbf;position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center}.link-dialog[data-v-cc39ee16]{font-size:13px;line-height:1.675}.input[data-v-cc39ee16]{width:100%;height:32px}.preview[data-v-cc39ee16]{margin-top:12px}.thumbnail[data-v-cc39ee16]{border:1px solid rgba(209,68,36,.15);margin-top:5px}.btns[data-v-cc39ee16]{margin-top:20px;text-align:right}.mask[data-v-fea8edcc],.modal[data-v-fea8edcc]{top:0;left:0;width:100%;height:100%;z-index:5000}.modal[data-v-fea8edcc]{position:fixed;display:flex;justify-content:center;align-items:center;outline:0;border:0}.mask[data-v-fea8edcc]{position:absolute;background:rgba(0,0,0,.25)}.modal-content[data-v-fea8edcc]{z-index:5001;padding:20px;background:#fff;border-radius:2px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.2);position:relative}.close-btn[data-v-fea8edcc]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;position:absolute;top:16px;right:16px;cursor:pointer}.modal-fade-enter-active[data-v-fea8edcc]{animation:modal-fade-enter-fea8edcc .25s ease-in both}.modal-fade-leave-active[data-v-fea8edcc]{animation:modal-fade-leave-fea8edcc .25s ease-out both}.modal-zoom-enter-active[data-v-fea8edcc]{animation:modal-zoom-enter-fea8edcc .25s cubic-bezier(.4,0,0,1.5) both}.modal-zoom-leave-active[data-v-fea8edcc]{animation:modal-zoom-leave-fea8edcc .25s both}@keyframes modal-fade-enter-fea8edcc{0%{opacity:0}}@keyframes modal-fade-leave-fea8edcc{to{opacity:0}}@keyframes modal-zoom-enter-fea8edcc{0%{transform:scale3d(.3,.3,.3)}}@keyframes modal-zoom-leave-fea8edcc{to{transform:scale3d(.3,.3,.3)}}.canvas[data-v-ce64755c]{height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;background-color:#f9f9f9;position:relative}.drag-mask[data-v-ce64755c]{cursor:grab;position:absolute;top:0;right:0;bottom:0;left:0}.viewport-wrapper[data-v-ce64755c]{position:absolute;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.viewport[data-v-ce64755c]{position:absolute;top:0;left:0;transform-origin:0 0}.shape-item-thumbnail[data-v-8603ad34]{position:relative;cursor:pointer}.shape-content[data-v-8603ad34]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center}.shape-content:hover .shape-path[data-v-8603ad34]:not(.outlined){stroke:#d14424}.shape-content:hover .shape-path.outlined[data-v-8603ad34]{fill:#d14424}.shape-content svg[data-v-8603ad34]:not(:root){overflow:visible}.shape-pool[data-v-8b994b42]{width:340px;max-height:520px;overflow:auto;margin-top:-12px;margin-bottom:-12px;margin-right:-12px;padding-right:12px;padding-top:12px}.category-name[data-v-8b994b42]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:2px 0 2px 10px}.shape-list[data-v-8b994b42]{display:flex;flex-wrap:wrap;align-content:flex-start;margin-bottom:10px}.shape-item[data-v-8b994b42]{width:8%;margin-bottom:2.22222%;height:0;padding-bottom:8%;flex-shrink:0}.shape-item[data-v-8b994b42]:not(:nth-child(10n)){margin-right:2.22222%}.line-pool[data-v-554824b6]{width:220px;overflow:auto;margin-bottom:-12px;margin-right:-12px;padding-right:12px}.category-name[data-v-554824b6]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:2px 0 2px 10px}.line-list[data-v-554824b6]{display:flex;flex-wrap:wrap;align-content:flex-start;margin-bottom:10px}.line-item[data-v-554824b6]{width:19%;margin-bottom:1.25%;height:0;padding-bottom:19%;flex-shrink:0;position:relative;cursor:pointer}.line-item[data-v-554824b6]:not(:nth-child(5n)){margin-right:1.25%}.line-content[data-v-554824b6]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;color:#999}.line-content[data-v-554824b6]:hover{color:#d14424}.line-content svg[data-v-554824b6]:not(:root){overflow:visible}.chart-pool[data-v-398f5699]{width:200px;margin-bottom:-5px;display:flex;flex-wrap:wrap;align-content:flex-start}.chart-item[data-v-398f5699]{width:19%;margin-bottom:1.25%;height:0;padding-bottom:19%;flex-shrink:0;position:relative;cursor:pointer}.chart-item[data-v-398f5699]:not(:nth-child(5n)){margin-right:1.25%}.chart-content[data-v-398f5699]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;color:#999}.chart-content[data-v-398f5699]:hover{color:#d14424}.number-input[data-v-268948c2]{background-color:#fff;border:1px solid #d9d9d9;padding:0 0 0 5px;border-radius:2px;transition:border-color .25s;font-size:13px;display:inline-flex}.number-input .input-wrap[data-v-268948c2]{flex:1;color:#41464b;padding:0 0 0 5px;position:relative}.number-input:not(.disabled) .input-wrap:hover .handlers[data-v-268948c2]{opacity:1}.number-input .handlers[data-v-268948c2]{width:20px;position:absolute;top:0;bottom:0;right:0;display:flex;flex-direction:column;font-size:6px;color:#999;opacity:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:opacity .25s}.number-input .handlers .handler[data-v-268948c2]{width:100%;height:50%;display:flex;justify-content:center;align-items:center;border-left:1px solid #d9d9d9;cursor:pointer}.number-input .handlers .handler+.handler[data-v-268948c2]{border-top:1px solid #d9d9d9}.number-input .handlers .handler[data-v-268948c2]:hover{color:#d14424}.number-input input[data-v-268948c2]{width:100%;min-width:0;padding:0;height:30px;line-height:30px;outline:0;border:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.number-input input[data-v-268948c2]::-moz-placeholder{color:#bfbfbf}.number-input input[data-v-268948c2]::placeholder{color:#bfbfbf}.number-input.focused[data-v-268948c2],.number-input[data-v-268948c2]:not(.disabled):hover{border-color:#d14424}.number-input.disabled[data-v-268948c2]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.number-input .prefix[data-v-268948c2],.number-input .suffix[data-v-268948c2]{display:flex;justify-content:center;align-items:center;line-height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.table-generator[data-v-372c6730]{width:100%;margin-top:-12px}.title[data-v-372c6730]{height:28px;line-height:28px;background-color:#ededed;margin:0 -12px 12px -12px;padding:0 14px;font-size:12px;display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none}.title .right[data-v-372c6730]{cursor:pointer}.title .right[data-v-372c6730]:hover{color:#d14424}table[data-v-372c6730]{border-collapse:separate}td[data-v-372c6730]{width:23px;height:23px;line-height:23px;border:2px solid #fff;background-color:#f7f7f7}.cell[data-v-372c6730]{width:100%;height:100%;border:1px solid #dcdcdc}.cell.active[data-v-372c6730]{background-color:rgba(209,68,36,.1);border-color:#d14424}.custom[data-v-372c6730]{width:230px}.custom .row[data-v-372c6730]{display:flex;align-items:center}.custom .row+.row[data-v-372c6730]{margin-top:10px}.btns[data-v-372c6730]{margin-top:10px;text-align:right}.btns .btn[data-v-372c6730]{margin-left:10px}.media-input[data-v-35a1214c]{width:480px}.btns[data-v-35a1214c]{margin-top:10px;text-align:right}svg[data-v-567417d3]{overflow:hidden}.textarea[data-v-326ac8a0]{outline:0;width:100%;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;padding:10px;transition:border-color .25s;box-sizing:border-box;line-height:1.675;resize:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.textarea[data-v-326ac8a0]:focus{border-color:#d14424;background-color:#fff}.textarea.resizable[data-v-326ac8a0]{resize:vertical}.textarea.disabled[data-v-326ac8a0]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.textarea[data-v-326ac8a0]::-moz-placeholder{color:#bfbfbf}.textarea[data-v-326ac8a0]::placeholder{color:#bfbfbf}.latex-editor[data-v-46e48b5e]{height:560px}.container[data-v-46e48b5e]{height:calc(100% - 50px);display:flex}.left[data-v-46e48b5e]{width:540px;height:100%;display:flex;flex-direction:column;flex-shrink:0}.input-area[data-v-46e48b5e]{flex:1}.input-area textarea[data-v-46e48b5e]{height:100%!important;border-color:#eee!important;padding:10px!important}.input-area textarea[data-v-46e48b5e]:focus{box-shadow:none!important}.preview[data-v-46e48b5e]{height:160px;display:flex;justify-content:center;align-items:center;text-align:center;margin-top:20px;border:1px solid #eee;-webkit-user-select:none;-moz-user-select:none;user-select:none}.placeholder[data-v-46e48b5e]{color:#888;font-size:13px}.preview-content[data-v-46e48b5e]{width:100%;height:100%;padding:10px;display:flex;justify-content:center;align-items:center}.right[data-v-46e48b5e]{width:280px;height:100%;margin-left:20px;border:1px solid #eee;background-color:#fff;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}.content[data-v-46e48b5e]{height:calc(100% - 40px);font-size:13px}.formula[data-v-46e48b5e]{height:100%;padding:12px;overflow:auto;overflow:overlay}.formula-item+.formula-item[data-v-46e48b5e]{margin-top:10px}.formula-item .formula-title[data-v-46e48b5e]{margin-bottom:5px}.formula-item .formula-item-content[data-v-46e48b5e]{height:60px;padding:5px;display:flex;align-items:center;background-color:#f9f9f9;cursor:pointer}.symbol[data-v-46e48b5e]{height:100%;display:flex;flex-direction:column}.symbol-pool[data-v-46e48b5e]{display:flex;flex-wrap:wrap;flex:1;padding:12px;overflow:auto;overflow:overlay}.symbol-item[data-v-46e48b5e]{display:flex;justify-content:center;align-items:center}.symbol-item[data-v-46e48b5e]:hover{background-color:#f9f9f9;cursor:pointer}.footer[data-v-46e48b5e]{height:50px;display:flex;justify-content:flex-end;align-items:flex-end}.footer .btn[data-v-46e48b5e]{margin-left:10px}.canvas-tool[data-v-75f4dda6]{position:relative;border-bottom:1px solid #eee;background-color:#fff;display:flex;justify-content:space-between;padding:0 10px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.left-handler[data-v-75f4dda6]{display:flex;align-items:center}.add-element-handler[data-v-75f4dda6]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex}.add-element-handler .handler-item[data-v-75f4dda6]{width:32px}.add-element-handler .handler-item[data-v-75f4dda6]:not(.group-btn):hover{background-color:#f1f1f1}.add-element-handler .handler-item.active[data-v-75f4dda6]{color:#d14424}.add-element-handler .handler-item.group-btn[data-v-75f4dda6]{width:auto;margin-right:4px}.add-element-handler .handler-item.group-btn[data-v-75f4dda6]:hover{background-color:#f3f3f3}.add-element-handler .handler-item.group-btn .arrow[data-v-75f4dda6],.add-element-handler .handler-item.group-btn .icon[data-v-75f4dda6]{height:100%;display:flex;justify-content:center;align-items:center}.add-element-handler .handler-item.group-btn .icon[data-v-75f4dda6]{width:26px;padding:0 2px}.add-element-handler .handler-item.group-btn .icon[data-v-75f4dda6]:hover{background-color:#e9e9e9}.add-element-handler .handler-item.group-btn .icon.active[data-v-75f4dda6]{color:#d14424}.add-element-handler .handler-item.group-btn .arrow[data-v-75f4dda6]{font-size:12px}.add-element-handler .handler-item.group-btn .arrow[data-v-75f4dda6]:hover{background-color:#e9e9e9}.handler-item[data-v-75f4dda6]{height:24px;font-size:14px;margin:0 2px;display:flex;justify-content:center;align-items:center;border-radius:2px;overflow:hidden;cursor:pointer}.handler-item.disable[data-v-75f4dda6]{opacity:.5}.left-handler .handler-item[data-v-75f4dda6],.right-handler .handler-item[data-v-75f4dda6]{padding:0 8px}.left-handler .handler-item[data-v-75f4dda6]:not(.disable):hover,.right-handler .handler-item[data-v-75f4dda6]:not(.disable):hover{background-color:#f1f1f1}.right-handler[data-v-75f4dda6]{display:flex;align-items:center}.right-handler .text[data-v-75f4dda6]{display:inline-block;width:40px;text-align:center;cursor:pointer}.right-handler .viewport-size[data-v-75f4dda6]{font-size:13px}@media screen and (width <= 1024px){.text[data-v-75f4dda6]{display:none}}@media screen and (width <= 1000px){.left-handler[data-v-75f4dda6],.right-handler[data-v-75f4dda6]{display:none}}.layout-pool[data-v-8ee3e590]{width:394px;height:500px;padding:2px;margin-right:-12px;padding-right:12px;overflow:auto;display:flex;flex-wrap:wrap;align-content:flex-start}.layout-item[data-v-8ee3e590]{width:48%;margin-bottom:4%}.layout-item[data-v-8ee3e590]:not(:nth-child(2n)){margin-right:4%}.layout-item[data-v-8ee3e590]:last-child,.layout-item[data-v-8ee3e590]:nth-last-child(2){margin-bottom:0}.layout-item .thumbnail[data-v-8ee3e590]{outline:1px solid #eee;cursor:pointer}.layout-item .thumbnail[data-v-8ee3e590]:hover{outline-color:#d14424}.thumbnails[data-v-d525da14]{border-right:1px solid #eee;background-color:#fff;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}.add-slide[data-v-d525da14]{height:40px;font-size:12px;display:flex;flex-shrink:0;border-bottom:1px solid #eee;cursor:pointer}.add-slide .btn[data-v-d525da14]{flex:1;display:flex;justify-content:center;align-items:center}.add-slide .btn[data-v-d525da14]:hover{background-color:#f9f9f9}.add-slide .select-btn[data-v-d525da14]{width:30px;height:100%;display:flex;justify-content:center;align-items:center;border-left:1px solid #eee}.add-slide .select-btn[data-v-d525da14]:hover{background-color:#f9f9f9}.add-slide .icon[data-v-d525da14]{margin-right:3px;font-size:14px}.thumbnail-list[data-v-d525da14]{padding:5px 0;flex:1;overflow:auto}.thumbnail-item[data-v-d525da14]{display:flex;justify-content:center;align-items:center;padding:5px 0}.thumbnail-item .thumbnail[data-v-d525da14]{outline:1px solid rgba(209,68,36,.15)}.thumbnail-item.active .label[data-v-d525da14]{color:#d14424}.thumbnail-item.active .thumbnail[data-v-d525da14],.thumbnail-item.selected .thumbnail[data-v-d525da14]{outline-color:#d14424}.label[data-v-d525da14]{font-size:12px;color:#999;width:20px;cursor:grab}.label.offset-left[data-v-d525da14]{position:relative;left:-4px}.label[data-v-d525da14]:active{cursor:grabbing}.page-number[data-v-d525da14]{height:40px;font-size:12px;border-top:1px solid #eee;line-height:40px;text-align:center;color:#666}.slider[data-v-563bd2a0]{width:100%;height:12px;padding:4px 0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.slider.disabled .track[data-v-563bd2a0]{background-color:#b4b4b4}.slider.disabled .thumb[data-v-563bd2a0]{outline:2px solid #b4b4b4}.slider[data-v-563bd2a0]:not(.disabled){cursor:pointer}.slider:not(.disabled) .bar[data-v-563bd2a0]:hover{background-color:#f0f0f0}.slider:not(.disabled) .track[data-v-563bd2a0]:hover{background-color:#de6949}.slider:not(.disabled) .thumb[data-v-563bd2a0]:active,.slider:not(.disabled) .thumb[data-v-563bd2a0]:hover{outline:4px solid #d14424}.bar[data-v-563bd2a0]{width:calc(100% - 10px);margin-left:5px;height:4px;border-radius:2px;position:relative;background-color:#f5f5f5;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:background-color .2s}.track[data-v-563bd2a0]{position:absolute;top:0;left:0;height:100%;background-color:#d14424;transition:background-color .2s}.thumb[data-v-563bd2a0]{position:absolute;top:50%;left:0;width:10px;height:10px;background-color:#fff;outline:2px solid #d14424;transform:translate(-50%,-50%);border-radius:50%;z-index:100}.thumb[data-v-563bd2a0]:active:after,.thumb[data-v-563bd2a0]:active:before,.thumb[data-v-563bd2a0]:hover:after,.thumb[data-v-563bd2a0]:hover:before{display:block}.thumb[data-v-563bd2a0]:before{content:attr(data-tooltip);min-width:28px;bottom:24px;background-color:#262626;text-align:center;color:#fff;border-radius:2px;padding:6px 5px;font-size:12px}.thumb[data-v-563bd2a0]:after,.thumb[data-v-563bd2a0]:before{display:none;position:absolute;left:50%;transform:translateX(-50%)}.thumb[data-v-563bd2a0]:after{content:"";bottom:15px;border:5px solid transparent;border-top-color:#262626}.row[data-v-03715c20]{width:100%;display:flex;align-items:center;margin-bottom:10px}.color-btn[data-v-7fa73bdc]{width:100%;display:flex!important;align-items:center;justify-content:center;padding:0!important}.color-block[data-v-7fa73bdc]{height:20px;margin-left:8px;flex:1;outline:1px dashed hsla(0,0%,40%,.12);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAEBJREFUOE9jfPbs2X8GIoCkpCQRqhgYGEcNxBlOo2GIM2iGQLL5//8/UTnl+fPnxOWUUQNxhtNoGOLOKYM+2QAAh2Nq10DwkukAAAAASUVORK5CYII=)}.content[data-v-7fa73bdc]{width:100%;height:100%}.color-btn-icon[data-v-7fa73bdc]{width:32px;font-size:13px;color:#bfbfbf}.checkerboard[data-v-fa191ace]{background-size:contain}.alpha-checkboard-wrap[data-v-84628bc8],.alpha[data-v-84628bc8],.checkerboard[data-v-fa191ace]{position:absolute;top:0;right:0;bottom:0;left:0}.alpha-checkboard-wrap[data-v-84628bc8]{overflow:hidden}.alpha-gradient[data-v-84628bc8]{position:absolute;top:0;right:0;bottom:0;left:0}.alpha-container[data-v-84628bc8]{cursor:pointer;position:relative;z-index:2;height:100%;margin:0 3px}.alpha-pointer[data-v-84628bc8]{z-index:2;position:absolute}.alpha-picker[data-v-84628bc8]{cursor:pointer;width:4px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;margin-top:1px;transform:translateX(-2px)}.hue[data-v-5711e710]{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);position:absolute;top:0;right:0;bottom:0;left:0}.hue-container[data-v-5711e710]{cursor:pointer;margin:0 2px;position:relative;height:100%}.hue-pointer[data-v-5711e710]{z-index:2;position:absolute;top:0}.hue-picker[data-v-5711e710]{cursor:pointer;margin-top:1px;width:4px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;transform:translateX(-2px)}.saturation-black[data-v-c79c0446],.saturation-white[data-v-c79c0446],.saturation[data-v-c79c0446]{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer}.saturation-white[data-v-c79c0446]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-c79c0446]{background:linear-gradient(0deg,#000,transparent)}.saturation-pointer[data-v-c79c0446]{cursor:pointer;position:absolute}.saturation-circle[data-v-c79c0446]{width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);border-radius:50%;transform:translate(-2px,-2px)}.editable-input[data-v-eb50f8e8]{width:100%;position:relative;overflow:hidden;text-align:center;font-size:14px}.editable-input[data-v-eb50f8e8]:after{content:"#";position:absolute;left:0;top:50%;transform:translateY(-50%);color:#999}.input-content[data-v-eb50f8e8]{width:100%;padding:3px;border:0;border-bottom:1px solid #ddd;outline:none;text-align:center}.input-label[data-v-eb50f8e8]{text-transform:capitalize}.color-picker[data-v-fec0b01a]{position:relative;width:240px;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-bottom:-10px}.picker-saturation-wrap[data-v-fec0b01a]{width:100%;padding-bottom:50%;position:relative;overflow:hidden}.picker-controls[data-v-fec0b01a]{display:flex}.picker-sliders[data-v-fec0b01a]{padding:4px 0;flex:1}.picker-hue-wrap[data-v-fec0b01a]{position:relative;height:10px}.picker-alpha-wrap[data-v-fec0b01a]{position:relative;height:10px;margin-top:4px;overflow:hidden}.picker-color-wrap[data-v-fec0b01a]{width:24px;height:24px;position:relative;margin-top:4px;margin-right:4px;outline:1px dashed hsla(0,0%,40%,.12)}.picker-color-wrap .checkerboard[data-v-fec0b01a]{background-size:auto}.picker-current-color[data-v-fec0b01a]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.picker-field[data-v-fec0b01a]{display:flex;margin-bottom:8px}.picker-field .transparent[data-v-fec0b01a]{width:24px;height:24px;margin-top:4px;margin-left:8px;position:relative;cursor:pointer}.picker-field .transparent[data-v-fec0b01a]:after{content:"";width:26px;height:2px;position:absolute;top:11px;left:-1px;transform:rotate(-45deg);background-color:red}.picker-field .transparent .checkerboard[data-v-fec0b01a]{background-size:auto}.picker-field .straw[data-v-fec0b01a]{width:24px;height:24px;margin-top:4px;margin-left:8px;display:flex;justify-content:center;align-items:center;font-size:20px;background-color:#f5f5f5;outline:1px solid #f1f1f1;cursor:pointer}.picker-field .input[data-v-fec0b01a]{flex:1}.picker-presets[data-v-fec0b01a]{display:flex;flex-wrap:wrap;align-content:flex-start}.picker-presets-color[data-v-fec0b01a]{width:7%;margin-bottom:3.33333%;height:0;padding-bottom:7%;flex-shrink:0;position:relative;cursor:pointer}.picker-presets-color[data-v-fec0b01a]:not(:nth-child(10n)){margin-right:3.33333%}.picker-presets-color.alpha[data-v-fec0b01a]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADBJREFUOE9jfPbs2X8GPEBSUhKfNAPjqAHDIgz+//+PNx08f/4cfzoYNYCBceiHAQC5flV5JzgrxQAAAABJRU5ErkJggg==)}.picker-presets-color-content[data-v-fec0b01a]{position:absolute;top:0;right:0;bottom:0;left:0}.picker-gradient-presets[data-v-fec0b01a]{display:flex;flex-wrap:wrap;align-content:flex-start}.picker-gradient-col[data-v-fec0b01a]{width:7%;margin-bottom:3.33333%;display:flex;flex-direction:column}.picker-gradient-col[data-v-fec0b01a]:not(:nth-child(10n)){margin-right:3.33333%}.picker-gradient-color[data-v-fec0b01a]{width:100%;height:16px;position:relative;cursor:pointer}.recent-colors-title[data-v-fec0b01a]{font-size:12px;margin-bottom:4px}.switch[data-v-0566b060]{height:20px;display:inline-block;cursor:pointer}.switch:not(.disabled).active .switch-core[data-v-0566b060]{border-color:#d14424;background-color:#d14424}.switch:not(.disabled).active .switch-core[data-v-0566b060]:after{left:100%;margin-left:-17px}.switch.disabled[data-v-0566b060]{cursor:default}.switch.disabled .switch-core[data-v-0566b060]:after{background-color:#f5f5f5}.switch-core[data-v-0566b060]{margin:0;display:inline-block;position:relative;width:40px;height:20px;border:1px solid #d9d9d9;outline:none;border-radius:10px;box-sizing:border-box;background:#d9d9d9;transition:border-color .3s,background-color .3s;vertical-align:middle}.switch-core[data-v-0566b060]:after{content:"";position:absolute;top:1px;left:1px;border-radius:100%;transition:all .3s;width:16px;height:16px;background-color:#fff}.row[data-v-36e0c182]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-36e0c182]{text-align:right}.row[data-v-5507f822]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-5507f822]{text-align:right}.text-color-btn[data-v-37449800]{width:100%;display:flex!important;flex-direction:column;justify-content:center;align-items:center;padding:0}.text-color-block[data-v-37449800]{width:17px;height:4px;margin-top:1px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAACdJREFUGFdjfPbs2X8GBgYGSUlJEMXAiCHw//9/sIrnz59DVKALAADNxxVfaiODNQAAAABJRU5ErkJggg==)}.text-color-block .text-color-block-content[data-v-37449800]{width:100%;height:100%}.button-group[data-v-4db942e2]{display:flex;align-items:center}.button-group[data-v-4db942e2] button.button{border-radius:0;border-left-width:1px;border-right-width:0;display:inline-block}.button-group[data-v-4db942e2]:not(.passive) button.button:not(:last-child,.radio,.checkbox):hover{position:relative}.button-group[data-v-4db942e2]:not(.passive) button.button:not(:last-child,.radio,.checkbox):hover:after{content:"";width:1px;height:calc(100% + 2px);background-color:#d14424;position:absolute;top:-1px;right:-1px}.button-group[data-v-4db942e2]:not(.passive) button.button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.button-group[data-v-4db942e2]:not(.passive) button.button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.button-group.passive[data-v-4db942e2] button.button:not(.last,.radio,.checkbox):hover{position:relative}.button-group.passive[data-v-4db942e2] button.button:not(.last,.radio,.checkbox):hover:after{content:"";width:1px;height:calc(100% + 2px);background-color:#d14424;position:absolute;top:-1px;right:-1px}.button-group.passive[data-v-4db942e2] button.button.first{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.button-group.passive[data-v-4db942e2] button.button.last{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.select-group[data-v-d2acb09c]{display:flex;align-items:center}.select-group[data-v-d2acb09c] .select-wrap .select{border-radius:0;border-left-width:0;border-right-width:0}.select-group[data-v-d2acb09c] .select-wrap+.select-wrap .select{border-left-width:1px}.select-group[data-v-d2acb09c] .select-wrap:hover+.select-wrap .select{border-left-color:#d14424}.select-group[data-v-d2acb09c] .select-wrap:first-child .select{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.select-group[data-v-d2acb09c] .select-wrap:last-child .select{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.text-style-panel[data-v-478ca737]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-478ca737]{width:100%;display:flex;align-items:center;margin-bottom:10px}.preset-style[data-v-478ca737]{display:flex;flex-wrap:wrap;margin-bottom:10px}.preset-style-item[data-v-478ca737]{width:50%;height:50px;border:1px solid #d6d6d6;box-sizing:border-box;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer;transition:all .2s}.preset-style-item[data-v-478ca737]:hover{border-color:#d14424;color:#d14424;z-index:1}.preset-style-item[data-v-478ca737]:nth-child(2n){margin-left:-1px}.preset-style-item[data-v-478ca737]:nth-child(n+3){margin-top:-1px}.font-size-btn[data-v-478ca737]{padding:0}.link-popover[data-v-478ca737]{width:240px}.link-popover .btns[data-v-478ca737]{margin-top:10px;text-align:right}.list-wrap[data-v-478ca737]{width:176px;color:#666;padding:8px;margin:-12px;display:flex;flex-wrap:wrap;align-content:flex-start}.list[data-v-478ca737]{background-color:#f9f9f9;padding:4px 4px 4px 20px;cursor:pointer}.list[data-v-478ca737]:not(:nth-child(3n)){margin-right:8px}.list[data-v-478ca737]:nth-child(4),.list[data-v-478ca737]:nth-child(5),.list[data-v-478ca737]:nth-child(6){margin-top:8px}.list[data-v-478ca737]:hover{color:#d14424}.list:hover span[data-v-478ca737]{background-color:#d14424}.list-item[data-v-478ca737]{width:24px;height:12px;position:relative;font-size:12px;top:-5px}.list-item span[data-v-478ca737]{width:100%;height:2px;display:inline-block;position:absolute;top:10px;background-color:#666}.popover-btn[data-v-478ca737]{padding:0 3px}.row[data-v-2c8acf3c],.row[data-v-7571b056]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-2c8acf3c]{text-align:right}.filter[data-v-2c8acf3c]{font-size:12px}.filter-item[data-v-2c8acf3c]{padding:6px 0;display:flex;justify-content:center;align-items:center}.filter-item .name[data-v-2c8acf3c]{width:60px}.filter-item .filter-slider[data-v-2c8acf3c]{flex:1;margin:0 6px}.row[data-v-0ae0ff99]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-0ae0ff99]{text-align:right}.row[data-v-2e186970]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-2e186970]{text-align:right}.origin-image[data-v-2e186970]{height:100px;background-size:contain;background-repeat:no-repeat;background-position:50%;background-color:#f9f9f9;margin-bottom:10px}.full-width-btn[data-v-2e186970]{width:100%;margin-bottom:10px}.btn-icon[data-v-2e186970]{margin-right:3px}.clip[data-v-2e186970]{width:260px;font-size:12px}.clip .title[data-v-2e186970]{margin-bottom:5px}.shape-clip[data-v-2e186970]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-content:flex-start}.shape-clip-item[data-v-2e186970]{display:flex;justify-content:center;align-items:center;cursor:pointer;width:16%;margin-bottom:5%}.shape-clip-item[data-v-2e186970]:not(:nth-child(5n)){margin-right:5%}.shape-clip-item:hover .shape[data-v-2e186970]{background-color:#ccc}.shape-clip-item .shape[data-v-2e186970]{width:40px;height:40px;background-color:#e1e1e1}.popover-btn[data-v-2e186970]{padding:0 3px}.shape-style-panel[data-v-0674f2cf]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-0674f2cf]{width:100%;display:flex;align-items:center;margin-bottom:10px}.font-size-btn[data-v-0674f2cf]{padding:0}.title[data-v-0674f2cf]{display:flex;justify-content:space-between;margin-bottom:10px}.shape-pool[data-v-0674f2cf]{width:235px;height:150px;overflow:auto;padding:5px;padding-right:10px;border:1px solid #eee;margin-bottom:20px}.shape-list[data-v-0674f2cf]{display:flex;flex-wrap:wrap;align-content:flex-start}.shape-item[data-v-0674f2cf]{width:14%;margin-bottom:3.2%;height:0;padding-bottom:14%;flex-shrink:0}.shape-item[data-v-0674f2cf]:not(:nth-child(6n)){margin-right:3.2%}.row[data-v-ae80032c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.line-btn[data-v-ae80032c]{display:flex;align-items:center;justify-content:space-between;padding:0!important}.line-btn .line-wrapper[data-v-ae80032c]{margin-left:8px}.line-wrapper[data-v-ae80032c]{overflow:visible}.line-btn-icon[data-v-ae80032c]{width:30px;font-size:12px;margin-top:2px;color:#bfbfbf}.preset-point-style[data-v-ae80032c]{padding:0 10px}.preset-point-style+.preset-point-style[data-v-ae80032c]{margin-top:10px}.chart-data-editor[data-v-f7b59928]{width:600px;position:relative}.editor-content[data-v-f7b59928]{width:100%;height:360px;position:relative;border-right:1px solid #ccc;border-bottom:1px solid #ccc;overflow:auto;overflow:overlay}.range-box[data-v-f7b59928]{position:absolute;top:0;left:0;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.temp-range[data-v-f7b59928]{width:0;height:0;position:absolute;top:0;left:0;background-color:hsla(0,0%,53%,.3)}.range-line[data-v-f7b59928]{width:0;height:0;position:absolute;left:0;top:0;border:0 solid #d14424}.range-line.t[data-v-f7b59928]{border-top-width:1px}.range-line.b[data-v-f7b59928]{border-bottom-width:1px}.range-line.l[data-v-f7b59928]{border-left-width:1px}.range-line.r[data-v-f7b59928]{border-right-width:1px}.resizable[data-v-f7b59928]{position:absolute;width:12px;height:12px;left:0;top:0;margin:-9px 0 0 -9px;cursor:nwse-resize}.resizable[data-v-f7b59928]:after{content:"";position:absolute;width:4px;height:12px;right:0;top:0;background-color:#d14424}.resizable[data-v-f7b59928]:before{content:"";position:absolute;width:12px;height:4px;right:0;bottom:0;background-color:#d14424}table[data-v-f7b59928]{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;table-layout:fixed}table td[data-v-f7b59928]{text-align:center;border:1px solid #ccc;vertical-align:middle;width:100px;height:32px}table td.head[data-v-f7b59928]{background-color:rgba(209,68,36,.1)}table .item[data-v-f7b59928]{width:100%;height:100%;border:0;outline:0;font-size:13px;text-align:center;background-color:transparent}table .item.selected[data-v-f7b59928]{background-color:rgba(209,68,36,.02)}.btns[data-v-f7b59928]{margin-top:10px;display:flex;justify-content:space-between}.checkbox[data-v-26bf4835]{height:20px;display:flex;align-items:center;cursor:pointer}.checkbox:not(.disabled).checked .checkbox-input[data-v-26bf4835]{background-color:#d14424;border-color:#d14424}.checkbox:not(.disabled).checked .checkbox-input[data-v-26bf4835]:after{transform:rotate(45deg) scaleY(1)}.checkbox:not(.disabled).checked .checkbox-label[data-v-26bf4835]{color:#d14424}.checkbox.disabled[data-v-26bf4835]{color:#b7b7b7;cursor:default}.checkbox.disabled .checkbox-input[data-v-26bf4835]{background-color:#f5f5f5}.checkbox-input[data-v-26bf4835]{display:inline-block;position:relative;border:1px solid #d9d9d9;border-radius:2px;width:16px;height:16px;background-color:#fff;vertical-align:middle;transition:border-color .15s cubic-bezier(.71,-.46,.29,1.46),background-color .15s cubic-bezier(.71,-.46,.29,1.46);z-index:1}.checkbox-input[data-v-26bf4835]:after{content:"";border:2px solid #fff;border-left:0;border-top:0;height:9px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:6px;transition:transform .15s ease-in .05s;transform-origin:center}.checkbox-original[data-v-26bf4835]{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.checkbox-label[data-v-26bf4835]{margin-left:5px;line-height:20px;font-size:13px}.chart-style-panel[data-v-45827db6],.checkbox-label[data-v-26bf4835]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-45827db6]{width:100%;display:flex;align-items:center;margin-bottom:10px}.full-width-btn[data-v-45827db6]{width:100%}.btn-icon[data-v-45827db6]{margin-right:3px}.color-btn-wrap[data-v-45827db6]{position:relative}.delete-color-btn[data-v-45827db6]{position:absolute;width:30px;right:2px;top:2px;bottom:2px;display:flex;justify-content:center;align-items:center;background-color:#fff;cursor:pointer}.preset-themes[data-v-45827db6]{width:250px;margin-bottom:-10px;display:flex;flex-wrap:wrap;align-content:flex-start}.preset-theme[data-v-45827db6]{display:flex;cursor:pointer;width:48%;margin-bottom:4%}.preset-theme[data-v-45827db6]:not(:nth-child(2n)){margin-right:4%}.preset-theme-color[data-v-45827db6]{width:20px;height:20px}.preset-theme-color.select[data-v-45827db6]{transform:scale(1.2);transition:transform .1s}.row[data-v-e5523cbc]{width:100%;display:flex;align-items:center;margin-bottom:10px}.theme-switch[data-v-e5523cbc]{margin-bottom:18px}.switch-wrapper[data-v-e5523cbc]{text-align:right}.set-count[data-v-e5523cbc]{display:flex;justify-content:center;align-items:center}.set-count .btn[data-v-e5523cbc]{padding:0 8px}.set-count .count-text[data-v-e5523cbc]{flex:1;text-align:center;margin:0 8px}.row[data-v-3a5ca316],.row[data-v-b3551c8c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.background-image-wrapper[data-v-b3551c8c],.title[data-v-b3551c8c]{margin-bottom:10px}.background-image[data-v-b3551c8c]{height:0;padding-bottom:56.25%;border:1px dashed #eee;border-radius:2px;position:relative;transition:all .2s}.background-image[data-v-b3551c8c]:hover{border-color:#d14424;color:#d14424}.background-image .content[data-v-b3551c8c]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-position:50%;background-size:contain;background-repeat:no-repeat;cursor:pointer}.switch-row[data-v-b3551c8c]{height:32px}.switch-wrapper[data-v-b3551c8c]{text-align:right}.row[data-v-32517bcf]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-row[data-v-32517bcf]{height:32px}.switch-wrapper[data-v-32517bcf]{text-align:right}.row[data-v-80f1bc4e]{width:100%;display:flex;align-items:center;margin-bottom:10px}.font-size-btn[data-v-80f1bc4e]{padding:0}.row[data-v-a2bcea28]{width:100%;display:flex;align-items:center;margin-bottom:10px}.title[data-v-a2bcea28]{margin-bottom:10px}.label[data-v-a2bcea28]{text-align:center}.btn-icon[data-v-a2bcea28]{margin-right:3px}.icon-btn[data-v-a2bcea28]{cursor:pointer}.text-btn[data-v-a2bcea28]{height:30px;line-height:30px;text-align:center;cursor:pointer}.text-btn[data-v-a2bcea28]:hover{background-color:#efefef;border-radius:2px}.element-animation-panel[data-v-2455b3a4]{height:100%;display:flex;flex-direction:column}.element-animation[data-v-2455b3a4]{height:32px;display:flex;align-items:center}.element-animation-btn[data-v-2455b3a4]{width:100%}.config-item[data-v-2455b3a4]{display:flex;align-items:center}.config-item+.config-item[data-v-2455b3a4]{margin-top:5px}.tip[data-v-2455b3a4]{height:32px;display:flex;justify-content:center;align-items:center;font-style:italic}.animation-pool[data-v-2455b3a4]{width:400px;height:500px;overflow-y:auto;overflow-x:hidden;font-size:12px;margin-right:-10px;padding-right:5px;position:relative}.animation-pool .mask[data-v-2455b3a4]{position:absolute;top:0;right:0;bottom:0;left:0}.animation-pool.in .type-title[data-v-2455b3a4]{border-left-color:#68a490;background-color:rgba(104,164,144,.15)}.animation-pool.out .type-title[data-v-2455b3a4]{border-left-color:#d86344;background-color:rgba(216,99,68,.15)}.animation-pool.attention .type-title[data-v-2455b3a4]{border-left-color:#e8b76a;background-color:hsla(37,73%,66%,.15)}.pool-type[data-v-2455b3a4]:not(:last-child){margin-bottom:5px}.type-title[data-v-2455b3a4]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:4px 0 4px 10px}.pool-item-wrapper[data-v-2455b3a4]{display:flex;flex-wrap:wrap;align-content:flex-start}.pool-item[data-v-2455b3a4]{width:24%;margin-bottom:1.33333%;margin-bottom:5px;height:40px;line-height:40px;text-align:center;cursor:pointer}.pool-item[data-v-2455b3a4]:not(:nth-child(4n)){margin-right:1.33333%}.animation-box[data-v-2455b3a4]{background-color:#f9f9f9;border-radius:2px}.animation-sequence[data-v-2455b3a4]{flex:1;padding-right:12px;margin-right:-12px;overflow:auto;overflow:overlay}.sequence-item[data-v-2455b3a4]{border:1px solid #eee;padding:8px;border-radius:2px;margin-bottom:8px;transition:all .5s}.sequence-item.in.active[data-v-2455b3a4]{border-color:#68a490}.sequence-item.out.active[data-v-2455b3a4]{border-color:#d86344}.sequence-item.attention.active[data-v-2455b3a4]{border-color:#e8b76a}.sequence-item.active[data-v-2455b3a4]{height:auto}.sequence-item .sequence-content[data-v-2455b3a4]{display:flex;align-items:center;cursor:grab}.sequence-item .sequence-content[data-v-2455b3a4]:active{cursor:grabbing}.sequence-item .sequence-content .index[data-v-2455b3a4]{flex:1}.sequence-item .sequence-content .text[data-v-2455b3a4]{flex:6}.sequence-item .sequence-content .handler[data-v-2455b3a4]{flex:2;font-size:15px;text-align:right}.sequence-item .sequence-content .handler-btn[data-v-2455b3a4]{margin-left:8px;cursor:pointer}.slide-design-panel[data-v-475ddcb8]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-475ddcb8]{width:100%;display:flex;align-items:center;margin-bottom:10px}.background-image-wrapper[data-v-475ddcb8],.title[data-v-475ddcb8]{margin-bottom:10px}.background-image[data-v-475ddcb8]{height:0;padding-bottom:56.25%;border:1px dashed #eee;border-radius:2px;position:relative;transition:all .2s}.background-image[data-v-475ddcb8]:hover{border-color:#d14424;color:#d14424}.background-image .content[data-v-475ddcb8]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-position:50%;background-size:contain;background-repeat:no-repeat;cursor:pointer}.theme-list[data-v-475ddcb8]{display:flex;flex-wrap:wrap;align-content:flex-start}.theme-item[data-v-475ddcb8]{width:48%;margin-bottom:4%;padding-bottom:30%;border-radius:2px;position:relative;cursor:pointer}.theme-item[data-v-475ddcb8]:not(:nth-child(2n)){margin-right:4%}.theme-item .theme-item-content[data-v-475ddcb8]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;justify-content:center;padding:8px;border:1px solid #eee;border-radius:2px}.theme-item .text[data-v-475ddcb8]{font-size:16px}.theme-item .colors[data-v-475ddcb8]{display:flex}.theme-item .color-block[data-v-475ddcb8]{margin-top:8px;width:12px;height:12px;margin-right:2px}.theme-item:hover .btns[data-v-475ddcb8]{display:flex}.theme-item .btns[data-v-475ddcb8]{position:absolute;top:0;right:0;bottom:0;left:0;flex-direction:column;justify-content:center;align-items:center;display:none;background-color:rgba(0,0,0,.25)}.theme-item .btn[data-v-475ddcb8]{width:72px;padding:5px 0;text-align:center;background-color:#d14424;color:#fff;font-size:12px;border-radius:2px}.theme-item .btn[data-v-475ddcb8]:hover{background-color:#de6949}.theme-item .btn+.btn[data-v-475ddcb8]{margin-top:5px}.animation-pool[data-v-da618e26]{display:flex;flex-wrap:wrap;margin-bottom:10px}.animation-item[data-v-da618e26]{width:50%;height:100px;border:1px solid #d6d6d6;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:20px 0 15px 0;position:relative;cursor:pointer}.animation-item.active[data-v-da618e26]{border-color:#d14424;z-index:1}.animation-item[data-v-da618e26]:nth-child(2n){margin-left:-1px}.animation-item[data-v-da618e26]:nth-child(n+3){margin-top:-1px}.animation-block[data-v-da618e26]{width:64px;height:36px;background:#666;position:relative;overflow:hidden}.animation-block.fade[data-v-da618e26]:hover:after{animation:fade-da618e26 .3s linear}.animation-block.fade[data-v-da618e26]:hover:after,.animation-block.slideX[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.slideX[data-v-da618e26]:hover:after{animation:slideX-da618e26 .3s linear}.animation-block.slideY[data-v-da618e26]:hover:after{animation:slideY-da618e26 .3s linear}.animation-block.slideX3D[data-v-da618e26]:hover:after,.animation-block.slideY[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.slideX3D[data-v-da618e26]:hover:after{animation:slideX3D-da618e26 .3s linear}.animation-block.slideY3D[data-v-da618e26]:hover:after{animation:slideY3D-da618e26 .3s linear}.animation-block.rotate[data-v-da618e26]:hover:after,.animation-block.slideY3D[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.rotate[data-v-da618e26]:hover:after{transform-origin:0 0;animation:rotate-da618e26 .3s linear}.animation-block.scaleY[data-v-da618e26]:hover:after{animation:scaleY-da618e26 .3s linear}.animation-block.scaleX[data-v-da618e26]:hover:after,.animation-block.scaleY[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.scaleX[data-v-da618e26]:hover:after{animation:scaleX-da618e26 .3s linear}.animation-block.scale[data-v-da618e26]:hover:after{animation:scale-da618e26 .3s linear}.animation-block.scaleReverse[data-v-da618e26]:hover:after,.animation-block.scale[data-v-da618e26]:hover:after{content:"Slide";width:100%;height:100%;position:absolute;left:0;top:0;background-color:#d9dadb;display:flex;justify-content:center;align-items:center}.animation-block.scaleReverse[data-v-da618e26]:hover:after{animation:scaleReverse-da618e26 .3s linear}.animation-text[data-v-da618e26]{font-size:12px;color:#333;text-align:center}@keyframes fade-da618e26{0%{opacity:0}to{opacity:1}}@keyframes slideX-da618e26{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideY-da618e26{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideX3D-da618e26{0%{transform:translateX(100%) scale(.5)}to{transform:translateX(0)}}@keyframes slideY3D-da618e26{0%{transform:translateY(100%) scale(.5)}to{transform:translateY(0)}}@keyframes rotate-da618e26{0%{transform:rotate(-90deg)}to{transform:rotate(0)}}@keyframes scaleY-da618e26{0%{transform:scaleY(.1)}to{transform:scaleY(1)}}@keyframes scaleX-da618e26{0%{transform:scaleX(.1)}to{transform:scaleY(1)}}@keyframes scale-da618e26{0%{transform:scale(.25)}to{transform:scale(1)}}@keyframes scaleReverse-da618e26{0%{transform:scale(2)}to{transform:scale(1)}}.row[data-v-e95a4c6c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.symbol-panel[data-v-2bb5f257]{height:100%;display:flex;flex-direction:column}.symbol-panel .pool[data-v-2bb5f257]{padding:5px 12px;margin:0 -12px;flex:1;font-size:18px;overflow:auto;overflow:overlay;display:flex;flex-wrap:wrap;align-content:flex-start}.symbol-panel .symbol-item[data-v-2bb5f257]{width:18%;margin-bottom:2.5%;height:0;padding-bottom:18%;position:relative;cursor:pointer;border:1px solid #eee}.symbol-panel .symbol-item[data-v-2bb5f257]:not(:nth-child(5n)){margin-right:2.5%}.symbol-panel .symbol-item[data-v-2bb5f257]:hover{color:#d14424}.symbol-panel .symbol-item .symbol[data-v-2bb5f257]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-color:#fff}.toolbar[data-v-6c9ece83]{border-left:1px solid #eee;background-color:#fff;display:flex;flex-direction:column}.content[data-v-6c9ece83]{padding:12px;font-size:13px;overflow:auto;overflow:overlay}.remark[data-v-d996ff36]{position:relative;border-top:1px solid #eee}.remark textarea[data-v-d996ff36]{width:100%;height:100%;overflow-y:auto;resize:none;border:0;outline:0;padding:8px;font-size:12px;background-color:transparent;box-sizing:border-box;line-height:1.5;position:absolute;top:0;right:0;bottom:0;left:0}.resize-handler[data-v-d996ff36]{height:7px;position:absolute;top:-3px;left:0;right:0;cursor:n-resize;z-index:2}.export-img-dialog[data-v-1df3f398]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.thumbnails-view[data-v-1df3f398],.thumbnails-view[data-v-1df3f398]:after{position:absolute;top:0;right:0;bottom:0;left:0}.thumbnails-view[data-v-1df3f398]:after{content:"";background-color:#fff}.configs[data-v-1df3f398]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center;z-index:1}.configs .row[data-v-1df3f398]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-1df3f398]{width:100px;position:relative}.configs .title[data-v-1df3f398]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-1df3f398]{flex:1}.btns[data-v-1df3f398]{width:300px;height:100px;display:flex;justify-content:center;align-items:center;z-index:1}.btns .export[data-v-1df3f398]{flex:1}.btns .close[data-v-1df3f398]{width:100px;margin-left:10px}.export-json-dialog[data-v-6a7223ca]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.preview[data-v-6a7223ca]{width:100%;height:calc(100% - 100px);background-color:#f9f9f9;color:#0451a5;overflow:auto}pre[data-v-6a7223ca]{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.btns[data-v-6a7223ca]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-6a7223ca]{flex:1}.btns .close[data-v-6a7223ca]{width:100px;margin-left:10px}[data-v-6a7223ca]::-webkit-scrollbar{width:10px;height:10px;background-color:#f9f9f9}[data-v-6a7223ca]::-webkit-scrollbar-thumb{background-color:#c1c1c1}.export-pdf-dialog[data-v-1668f898]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.thumbnails-view[data-v-1668f898],.thumbnails-view[data-v-1668f898]:after{position:absolute;top:0;right:0;bottom:0;left:0}.thumbnails-view[data-v-1668f898]:after{content:"";background-color:#fff}.thumbnail.break-page[data-v-1668f898]{-moz-column-break-after:page;break-after:page}.configs[data-v-1668f898]{width:300px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center;z-index:1}.configs .row[data-v-1668f898]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-1668f898]{width:100px}.configs .config-item[data-v-1668f898]{flex:1}.configs .tip[data-v-1668f898]{font-size:12px;color:#aaa;line-height:1.8;margin-top:25px}.btns[data-v-1668f898]{width:300px;height:100px;display:flex;justify-content:center;align-items:center;z-index:1}.btns .export[data-v-1668f898]{flex:1}.btns .close[data-v-1668f898]{width:100px;margin-left:10px}.export-pptx-dialog[data-v-265d4b60]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.configs[data-v-265d4b60]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center}.configs .row[data-v-265d4b60]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-265d4b60]{width:100px;position:relative}.configs .title[data-v-265d4b60]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-265d4b60]{flex:1}.configs .tip[data-v-265d4b60]{font-size:12px;color:#aaa;line-height:1.8;margin-top:10px}.btns[data-v-265d4b60]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-265d4b60]{flex:1}.btns .close[data-v-265d4b60]{width:100px;margin-left:10px}.export-pptist-dialog[data-v-26422ed7]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.configs[data-v-26422ed7]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center}.configs .row[data-v-26422ed7]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-26422ed7]{width:100px;position:relative}.configs .title[data-v-26422ed7]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-26422ed7]{flex:1}.configs .tip[data-v-26422ed7]{font-size:12px;color:#aaa;line-height:1.8;margin-top:25px}.btns[data-v-26422ed7]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-26422ed7]{flex:1}.btns .close[data-v-26422ed7]{width:100px;margin-left:10px}.export-dialog[data-v-b20137f0]{margin:-20px}.content[data-v-b20137f0]{height:460px;padding:12px;font-size:13px;overflow:auto;overflow:overlay}.moveable-panel[data-v-fc791e00]{position:fixed;background-color:#fff;box-shadow:0 2px 12px 0 rgba(56,56,56,.15);border:1px solid #eee;border-radius:2px;display:flex;flex-direction:column;z-index:999}.header[data-v-fc791e00]{height:40px;display:flex;align-items:center;border-bottom:1px solid #f0f0f0;cursor:move}.title[data-v-fc791e00]{flex:1;font-size:13px;padding-left:10px}.close-btn[data-v-fc791e00]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;color:#666;font-size:12px;cursor:pointer}.content[data-v-fc791e00]{flex:1;padding:10px;overflow:auto}.select-panel[data-v-15470598]{height:100%;font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.handler[data-v-15470598]{height:24px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}.handler .icon-btns[data-v-15470598]{height:100%;flex:1;display:flex;align-items:center;justify-content:flex-end}.handler .icon-btn[data-v-15470598]{width:16px;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer}.handler .icon-btn[data-v-15470598]:hover{color:#d14424}.element-list[data-v-15470598]{height:calc(100% - 32px);padding-right:10px;margin-right:-10px;overflow:auto}.item[data-v-15470598]{padding:5px;font-size:12px;border-radius:2px;display:flex;align-items:center;cursor:pointer}.item.active[data-v-15470598]{background-color:rgba(209,68,36,.1)}.item.group-active[data-v-15470598]{background-color:rgba(209,68,36,.2)}.item[data-v-15470598]:hover{background-color:rgba(209,68,36,.25)}.item .name[data-v-15470598]{height:18px;line-height:18px;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.item .icons[data-v-15470598]{width:20px;display:flex;align-items:center;justify-content:center;margin-left:5px}.group-els[data-v-15470598]{padding:5px 0}.group-els .group-title[data-v-15470598]{margin-bottom:5px;padding:0 5px}.group-els .item[data-v-15470598]{margin-left:15px}.input[data-v-15470598]{width:100%;height:16px;border:0;outline:0;padding-left:0;padding-right:0;flex:1;font-size:12px;background-color:transparent}.search-panel[data-v-43ff4a2e]{font-size:13px}.content[data-v-43ff4a2e]{display:flex;flex-direction:column;justify-content:space-between}.input[data-v-43ff4a2e]{margin-top:10px}.count[data-v-43ff4a2e]{font-size:12px;margin-right:8px}.count[data-v-43ff4a2e],.next-btn[data-v-43ff4a2e]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.next-btn[data-v-43ff4a2e]{width:22px;height:100%;display:flex;justify-content:center;align-items:center;margin:0!important;cursor:pointer}.next-btn[data-v-43ff4a2e]:hover{color:#d14424}.footer[data-v-43ff4a2e]{display:flex;justify-content:flex-end;align-items:center;margin-top:10px}.close-btn[data-v-43ff4a2e]{width:32px;height:32px;position:absolute;top:8px;right:3px;display:flex;justify-content:center;align-items:center;color:#666;font-size:12px;cursor:pointer}.pptist-editor[data-v-1e00f97b]{height:100%}.layout-header[data-v-1e00f97b]{height:40px}.layout-content[data-v-1e00f97b]{height:calc(100% - 40px);display:flex}.layout-content-left[data-v-1e00f97b]{width:160px;height:100%;flex-shrink:0}.layout-content-center[data-v-1e00f97b]{width:calc(100% - 420px)}.layout-content-center .center-top[data-v-1e00f97b]{height:40px}.layout-content-right[data-v-1e00f97b]{width:260px;height:100%}.screen-element-video[data-v-a7e738aa]{position:absolute}.element-content[data-v-a7e738aa],.rotate-wrapper[data-v-a7e738aa]{width:100%;height:100%}.screen-element-audio[data-v-7a9a13d6]{position:absolute}.rotate-wrapper[data-v-7a9a13d6]{width:100%;height:100%}.element-content[data-v-7a9a13d6]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.element-content:hover .audio-player[data-v-7a9a13d6]{display:block}.audio-icon[data-v-7a9a13d6]{cursor:pointer}.audio-player[data-v-7a9a13d6]{position:absolute;display:none}.link[data-v-69b7fb9e]{cursor:pointer}.screen-slide[data-v-016af5da]{position:absolute;top:0;left:0;transform-origin:0 0;overflow:hidden}.background[data-v-016af5da]{width:100%;height:100%;background-position:50%;position:absolute}.screen-slide-list[data-v-552b63d2]{background:#1d1d1d;position:relative;width:100%;height:100%}.slide-item[data-v-552b63d2]{position:absolute;top:0;left:0;width:100%;height:100%}.slide-item.current[data-v-552b63d2]{z-index:2}.slide-item.hide[data-v-552b63d2]{opacity:0}.slide-item.turning-mode-no.before[data-v-552b63d2]{transform:translateY(-100%)}.slide-item.turning-mode-no.after[data-v-552b63d2]{transform:translateY(100%)}.slide-item.turning-mode-fade[data-v-552b63d2]{transition:opacity .75s}.slide-item.turning-mode-fade.after[data-v-552b63d2],.slide-item.turning-mode-fade.before[data-v-552b63d2]{pointer-events:none;opacity:0}.slide-item.turning-mode-slideX[data-v-552b63d2]{transition:transform .35s}.slide-item.turning-mode-slideX.before[data-v-552b63d2]{transform:translateX(-100%)}.slide-item.turning-mode-slideX.after[data-v-552b63d2]{transform:translateX(100%)}.slide-item.turning-mode-slideY[data-v-552b63d2]{transition:transform .35s}.slide-item.turning-mode-slideY.before[data-v-552b63d2]{transform:translateY(-100%)}.slide-item.turning-mode-slideY.after[data-v-552b63d2]{transform:translateY(100%)}.slide-item.turning-mode-slideX3D[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-slideX3D.before[data-v-552b63d2]{transform:translateX(-100%) scale(.5)}.slide-item.turning-mode-slideX3D.after[data-v-552b63d2]{transform:translateX(100%) scale(.5)}.slide-item.turning-mode-slideY3D[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-slideY3D.before[data-v-552b63d2]{transform:translateY(-100%) scale(.5)}.slide-item.turning-mode-slideY3D.after[data-v-552b63d2]{transform:translateY(100%) scale(.5)}.slide-item.turning-mode-rotate[data-v-552b63d2]{transition:transform .5s;transform-origin:0 0}.slide-item.turning-mode-rotate.before[data-v-552b63d2]{transform:rotate(90deg)}.slide-item.turning-mode-rotate.after[data-v-552b63d2]{transform:rotate(-90deg)}.slide-item.turning-mode-scaleY[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleY.after[data-v-552b63d2],.slide-item.turning-mode-scaleY.before[data-v-552b63d2]{transform:scaleY(.1)}.slide-item.turning-mode-scaleX[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleX.after[data-v-552b63d2],.slide-item.turning-mode-scaleX.before[data-v-552b63d2]{transform:scaleX(.1)}.slide-item.turning-mode-scale[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scale.after[data-v-552b63d2],.slide-item.turning-mode-scale.before[data-v-552b63d2]{transform:scale(.25)}.slide-item.turning-mode-scaleReverse[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleReverse.after[data-v-552b63d2],.slide-item.turning-mode-scaleReverse.before[data-v-552b63d2]{transform:scale(2)}.slide-content[data-v-552b63d2]{background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center}.slide-thumbnails[data-v-15912b32]{width:100%;height:100%;position:fixed;top:0;left:0;background-color:#1a1a1a;z-index:99}.return-button[data-v-15912b32]{height:60px;padding:20px 30px 0}.return-button .icon[data-v-15912b32]{color:#fff;font-size:36px;cursor:pointer}.return-button .icon[data-v-15912b32]:hover{color:#d14424}.slide-thumbnails-content[data-v-15912b32]{height:calc(100% - 100px);padding:20px 30px 30px 30px;display:flex;flex-wrap:wrap;align-content:flex-start;overflow:auto;overflow:overlay}.slide-thumbnails-content .thumbnail[data-v-15912b32]{width:150px;outline:2px solid #aaa;margin-right:12px;margin-bottom:12px}.slide-thumbnails-content .thumbnail[data-v-15912b32]:hover{outline-color:#d14424}.slide-thumbnails-content .thumbnail.active[data-v-15912b32]{outline-width:3px;outline-color:#d14424}.writing-board[data-v-d8027742]{z-index:8;cursor:none;position:absolute;top:0;right:0;bottom:0;left:0}.blackboard[data-v-d8027742]{width:100%;height:100%;background-color:#0f392b}.canvas[data-v-d8027742]{position:absolute;top:0;left:0}.eraser[data-v-d8027742],.pen[data-v-d8027742]{pointer-events:none;position:absolute;z-index:9}.eraser .icon[data-v-d8027742],.pen .icon[data-v-d8027742]{filter:drop-shadow(2px 2px 2px #555)}.eraser[data-v-d8027742]{display:flex;justify-content:center;align-items:center;border-radius:50%;border:4px solid rgba(85,85,85,.15);color:rgba(85,85,85,.75)}.writing-board-tool[data-v-fc2e4b2c]{font-size:12px;z-index:10;position:absolute;top:0;right:0;bottom:0;left:0}.writing-board-tool .writing-board-wrap[data-v-fc2e4b2c]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.writing-board-tool .tools[data-v-fc2e4b2c]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-between}.writing-board-tool .tool-content[data-v-fc2e4b2c]{display:flex;align-items:center}.writing-board-tool .btn[data-v-fc2e4b2c]{padding:5px 10px;cursor:pointer}.writing-board-tool .btn[data-v-fc2e4b2c]:hover{color:#d14424}.writing-board-tool .btn.active[data-v-fc2e4b2c]{background-color:rgba(209,68,36,.5);color:#fff}.writing-board-tool .icon[data-v-fc2e4b2c]{font-size:20px}.writing-board-tool .colors[data-v-fc2e4b2c]{display:flex;padding:0 10px}.writing-board-tool .color[data-v-fc2e4b2c]{width:16px;height:16px;border-radius:2px;cursor:pointer}.writing-board-tool .color[data-v-fc2e4b2c]:hover{transform:scale(1.15)}.writing-board-tool .color.active[data-v-fc2e4b2c]{transform:scale(1.3)}.writing-board-tool .color+.color[data-v-fc2e4b2c]{margin-left:8px}.size[data-v-fc2e4b2c]{width:200px;display:flex;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:13px}.size .label[data-v-fc2e4b2c]{width:70px}.size .size-slider[data-v-fc2e4b2c]{flex:1}.countdown-timer[data-v-83a589f0]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.header[data-v-83a589f0]{height:16px;font-size:13px;margin-bottom:16px;display:flex;align-items:center}.header .text-btn[data-v-83a589f0]{margin-right:8px;cursor:pointer}.header .text-btn.active[data-v-83a589f0],.header .text-btn[data-v-83a589f0]:hover{color:#d14424}.content[data-v-83a589f0]{display:flex;justify-content:space-between;padding:0 5px}.timer[data-v-83a589f0]{width:54px;height:54px;border-radius:50%;background-color:rgba(209,68,36,.05);font-size:22px;overflow:hidden}.timer input[data-v-83a589f0]{width:100%;height:100%;border:0;outline:0;background-color:transparent;text-align:center}.colon[data-v-83a589f0]{height:54px;line-height:54px;font-size:22px}.icon-btn[data-v-83a589f0]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.pause[data-v-83a589f0],.play[data-v-83a589f0]{font-size:17px}.reset[data-v-83a589f0]{font-size:12px}.close-btn[data-v-83a589f0]{position:absolute;top:0;right:0;padding:10px;cursor:pointer}.base-view[data-v-e9c1efea]{width:100%;height:100%}.base-view.laser-pen[data-v-e9c1efea]{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAACCJJREFUWIXtmLuO3MYShv/qZl9IzqwXo2BkSAtsIK+z8wwOBcOJ9C56Cr2LlThQcgBnfofVBnswXlgTaLHaIdk3dtcJOKOzd8n2MeDABRDDgKz/m+pudv0N/BN/Luj/kYSZJQBxJR8DKESU/2zuPwTIzAKnpxqHhxUuLir0vYSUAkS0ewA5F7Rtxv7+iNPTEYeHkYjKXwrIzHK9XtultRohaKSkkFIVhqGCEAIxTvm0ZpRSTNOMUGqEUgnGxLX3cblc+t9T2S8GXK1W9dP53OLiwoLZhMtLQ4CiGBVKkchZIOcpn5QMKQuEyKx1YiCZvb0AooD9ff/rZuMPDg7cl+hWn3uAmQWABut1g/PzOnZdTd5bMY6aQtAIQQGQGEd5bYirKgPIZExiY2IKIbK1XpeinzaN2s7b4XPD/iAgM0ucn7fYbNrQ963Juaauq8k5i3E01PcG46iQs0TO1wGlzJAyo6oS2jagqgLGUQNQwTllvJeYzwUz9w8N+b2AzCxwft6i72fBuZkYhnbcbBqKsSbvazhnEIJBzqrEqGQpAlO1AaKShShC6wQpE4UQUNcBKenReyXm8yoIIYwQtNXq7qvkQxVssNm0wbmZuLiYUQgtnGtps2ngfQ3vLaVkEKOmGKcqMtMWkEnKTFonaB3Z+4AQPFmreD6vSAghxpECAFMKY7EoALovBlytVjXW6yb0fSuGoaUQWrq8nKHvW/R9S943xbmavJ+qmNIO8FMFIWXert7A1gYxjprHsSLmaTHt7UF0HYdSilmv82q1ynctnFuAzCzx8aPF+Xltcq7HzaaBcy36vsUwzKjrZhiGRgxDA+8tUjIUgkbOEqVMgEIUkjLDmAjvgwjBI6WKxlHybp5KyVRKMcaMGIb0dLFIzBxvzsdbgOv12i69t7HrpgURY02bTYO+b6nrZui6qZLONdz3jTg5ORDHx0f48OExQpgBAIzp8OjRez46Oi7Pnq1ot5BKETQVgYmosJRj6rrEQNJCxLX3EUB/LyAzC3z8qOGcIe8tOWdpmm81ed9gGJpdJdF1rXz79jucnX1za454P8fZ2ZzOzr6Rx8fvyvPnP38afiEKVVXmqhrJ+wSlIqoqYj73S2s1M7urC0ZcS3x6qhGCDpeXBuOoMY4Gzhl4b4tzNYahgXMNuq4Vb978cCfczTg7+0a8efMDuq6Fcw2GoSnO1fDewjmDcTQYx0kzBI3TU3319euAh4cVUlIEKApBU98bhGAoJSO8N/Dect834u3b73B+/vVn4XZxfv61ePv2O+77Bt5b4b2hlKbcfW8oBE2AQkoKh4fXRvU64MVFhZQqilEhBLX9CCvEqLer1YiTk4MvqtxdlTw5OcAWDDFq5DxphDBtmSlNzcddgMws0fcyDEOFUiQAiZxliVGVGFVJSXEImo6Pj3433Dbo+PiIQ9AlJbXLi5wnrVIm7b6X223wOiAAASkFhBDIWWAcJXKWshQhcpYiZ0k5S3z48PhO9ZcvgV9+ma6XL+8m/PDhMW1ziW1u5Cy3WpO2lOIq11VAAhEhRkLO0z0RgVmAefotRXz6lNyMV6+AxWK6Xr26GzCEGXZb4i7nTifnSXv6Tn7qssTdmf4+cRWQwczQmiHldM/MICogmn6FKDDmzj0Tr18D5+fT9fr13WrGdBCiXMu505Fy0mZmTJYBwPUPdUHOBaUUSFlQVRlS5rzbtqTMJGXGo0fvcXY2vyX+44/T9VA8evSepcy8zcdCFDG1ZBlSTto5FwC3P9RElNG22TTNCCEygAwps9A6Ca2TUCqRMZGPjo4fprg/+OjomIyJQqm0ywspJy0hJu22zVf34+tzcH9/hFIja51gTEJVJUiZoHWEMQFKhfLs2QpPnrz73XRPnrwrz56toFSAMQFaR0g5aRiTWOsEpUbs749XX7u51Y1QKjGQ2JjIbRtgTGClQrE2wFpPbTuU589/xmLx2xfDLRa/lefPf6a2HWCtL9YG3oJy2wY2JjKQoFTC6ekDgIeHEcZEs7cXUFURVTV1wtZ6UdcOTTOgrgfMZn158eKnL6rkkyfvyosXP2E261HXA5pmEHXtYK1HXU9WoKomTWMiDg/j1devbStEVN6/fx+XRIGt9RhHjZQ0Wat4HCsax//1fEQlf//9v8XJyTF9rt1q2+mPtW2PphnY2gHWOrbWcV17ttaDKKy9j4/398u9gACwXC49Pn7UuhQNQI3eT206s2DadptCFEiZqaoS/+tfvnz77X/oRsPKUmYyJpJSAdZ6NM2Aphl4Pu/QND3P5wO0dmo2c5jNHPb3/fKrr/xNnluARJRXq5V/2jQqOKfE1kPsPC8zM1VVLkqNwpiAEAxbq+hGy89SZtq2/MXaIOrasbUDmqZH2/Zo257bdghSOtM07tfNxh/s799yd3d6koODA8fM0ngvw9bgYG9vatOJClfVSFUVYe3UldxhmiBlxtY0kVLTlLHW8Xw+oG17NqYvs1lv6rrHcjkcEN1p5B9ydQPmc2GEoABAdB1TKYWlnDph5wJvbSdPpwvXbCcLUXhrO2FMQF0HttZBa8dtO5TZrDdt26FtewDDfRD3AhJRYeYemKxh2Bqc1HVTm17Xn4y7yFnyDeMurhh33hp3rmuvZjMXpHSmrqehXiz6h04XHjxZIKLMzB0Wi2LW64xhSAwkVFXEOGpo/dmjD2yPPlBVka31mM2caRqH5XLAnz362FUSQLdarfLTxSJpISLmcx8uLw217R8/PLpnzt3S/5KHdvG3Pn67Afr3PMB8APgvOwL+J/5s/BeEBm1u1Gu4+QAAAABJRU5ErkJggg==) 20 20,default!important}.tools-left[data-v-e9c1efea]{position:fixed;bottom:8px;left:8px;font-size:25px;color:#666;z-index:10}.tools-left .tool-btn[data-v-e9c1efea]{opacity:.35;cursor:pointer}.tools-left .tool-btn[data-v-e9c1efea]:hover{opacity:.9}.tools-left .tool-btn+.tool-btn[data-v-e9c1efea]{margin-left:8px}.tools-right[data-v-e9c1efea]{height:66px;position:fixed;bottom:-66px;right:0;z-index:5;padding:8px;transition:bottom .2s}.tools-right.visible[data-v-e9c1efea]{bottom:0}.tools-right[data-v-e9c1efea]:after{content:"";width:100%;height:66px;position:absolute;left:0;top:-66px}.tools-right .content[data-v-e9c1efea]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;border-radius:2px;font-size:25px;background-color:#fff;color:#41464b;padding:8px 10px;box-shadow:0 2px 12px 0 rgba(56,56,56,.2);border:1px solid #e2e6ed}.tools-right .tool-btn[data-v-e9c1efea]{cursor:pointer}.tools-right .tool-btn.active[data-v-e9c1efea],.tools-right .tool-btn[data-v-e9c1efea]:hover{color:#d14424}.tools-right .tool-btn+.tool-btn[data-v-e9c1efea]{margin-left:15px}.tools-right .page-number[data-v-e9c1efea]{font-size:13px;padding:8px 12px;cursor:pointer}.presenter-view[data-v-0fc2d7b2]{width:100%;height:100%;display:flex}.toolbar[data-v-0fc2d7b2]{width:70px;height:100%;background-color:#fff;border-right:1px solid #eee;font-size:12px;margin:20px 0}.toolbar .tool-btn[data-v-0fc2d7b2]{display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:pointer}.toolbar .tool-btn+.tool-btn[data-v-0fc2d7b2]{margin-top:22px}.toolbar .tool-btn.active[data-v-0fc2d7b2],.toolbar .tool-btn[data-v-0fc2d7b2]:hover{color:#d14424}.toolbar .divider[data-v-0fc2d7b2]{width:70%;margin:24px 15%!important}.toolbar .tool-icon[data-v-0fc2d7b2]{margin-bottom:8px;font-size:22px}.content[data-v-0fc2d7b2]{width:calc(100% - 430px);height:100%;background-color:#1d1d1d}.slide-list-wrap[data-v-0fc2d7b2]{height:calc(100% - 190px);margin:20px;overflow:hidden;position:relative}.slide-list-wrap.laser-pen[data-v-0fc2d7b2]{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAACCJJREFUWIXtmLuO3MYShv/qZl9IzqwXo2BkSAtsIK+z8wwOBcOJ9C56Cr2LlThQcgBnfofVBnswXlgTaLHaIdk3dtcJOKOzd8n2MeDABRDDgKz/m+pudv0N/BN/Luj/kYSZJQBxJR8DKESU/2zuPwTIzAKnpxqHhxUuLir0vYSUAkS0ewA5F7Rtxv7+iNPTEYeHkYjKXwrIzHK9XtultRohaKSkkFIVhqGCEAIxTvm0ZpRSTNOMUGqEUgnGxLX3cblc+t9T2S8GXK1W9dP53OLiwoLZhMtLQ4CiGBVKkchZIOcpn5QMKQuEyKx1YiCZvb0AooD9ff/rZuMPDg7cl+hWn3uAmQWABut1g/PzOnZdTd5bMY6aQtAIQQGQGEd5bYirKgPIZExiY2IKIbK1XpeinzaN2s7b4XPD/iAgM0ucn7fYbNrQ963Juaauq8k5i3E01PcG46iQs0TO1wGlzJAyo6oS2jagqgLGUQNQwTllvJeYzwUz9w8N+b2AzCxwft6i72fBuZkYhnbcbBqKsSbvazhnEIJBzqrEqGQpAlO1AaKShShC6wQpE4UQUNcBKenReyXm8yoIIYwQtNXq7qvkQxVssNm0wbmZuLiYUQgtnGtps2ngfQ3vLaVkEKOmGKcqMtMWkEnKTFonaB3Z+4AQPFmreD6vSAghxpECAFMKY7EoALovBlytVjXW6yb0fSuGoaUQWrq8nKHvW/R9S943xbmavJ+qmNIO8FMFIWXert7A1gYxjprHsSLmaTHt7UF0HYdSilmv82q1ynctnFuAzCzx8aPF+Xltcq7HzaaBcy36vsUwzKjrZhiGRgxDA+8tUjIUgkbOEqVMgEIUkjLDmAjvgwjBI6WKxlHybp5KyVRKMcaMGIb0dLFIzBxvzsdbgOv12i69t7HrpgURY02bTYO+b6nrZui6qZLONdz3jTg5ORDHx0f48OExQpgBAIzp8OjRez46Oi7Pnq1ot5BKETQVgYmosJRj6rrEQNJCxLX3EUB/LyAzC3z8qOGcIe8tOWdpmm81ed9gGJpdJdF1rXz79jucnX1za454P8fZ2ZzOzr6Rx8fvyvPnP38afiEKVVXmqhrJ+wSlIqoqYj73S2s1M7urC0ZcS3x6qhGCDpeXBuOoMY4Gzhl4b4tzNYahgXMNuq4Vb978cCfczTg7+0a8efMDuq6Fcw2GoSnO1fDewjmDcTQYx0kzBI3TU3319euAh4cVUlIEKApBU98bhGAoJSO8N/Dect834u3b73B+/vVn4XZxfv61ePv2O+77Bt5b4b2hlKbcfW8oBE2AQkoKh4fXRvU64MVFhZQqilEhBLX9CCvEqLer1YiTk4MvqtxdlTw5OcAWDDFq5DxphDBtmSlNzcddgMws0fcyDEOFUiQAiZxliVGVGFVJSXEImo6Pj3433Dbo+PiIQ9AlJbXLi5wnrVIm7b6X223wOiAAASkFhBDIWWAcJXKWshQhcpYiZ0k5S3z48PhO9ZcvgV9+ma6XL+8m/PDhMW1ziW1u5Cy3WpO2lOIq11VAAhEhRkLO0z0RgVmAefotRXz6lNyMV6+AxWK6Xr26GzCEGXZb4i7nTifnSXv6Tn7qssTdmf4+cRWQwczQmiHldM/MICogmn6FKDDmzj0Tr18D5+fT9fr13WrGdBCiXMu505Fy0mZmTJYBwPUPdUHOBaUUSFlQVRlS5rzbtqTMJGXGo0fvcXY2vyX+44/T9VA8evSepcy8zcdCFDG1ZBlSTto5FwC3P9RElNG22TTNCCEygAwps9A6Ca2TUCqRMZGPjo4fprg/+OjomIyJQqm0ywspJy0hJu22zVf34+tzcH9/hFIja51gTEJVJUiZoHWEMQFKhfLs2QpPnrz73XRPnrwrz56toFSAMQFaR0g5aRiTWOsEpUbs749XX7u51Y1QKjGQ2JjIbRtgTGClQrE2wFpPbTuU589/xmLx2xfDLRa/lefPf6a2HWCtL9YG3oJy2wY2JjKQoFTC6ekDgIeHEcZEs7cXUFURVTV1wtZ6UdcOTTOgrgfMZn158eKnL6rkkyfvyosXP2E261HXA5pmEHXtYK1HXU9WoKomTWMiDg/j1devbStEVN6/fx+XRIGt9RhHjZQ0Wat4HCsax//1fEQlf//9v8XJyTF9rt1q2+mPtW2PphnY2gHWOrbWcV17ttaDKKy9j4/398u9gACwXC49Pn7UuhQNQI3eT206s2DadptCFEiZqaoS/+tfvnz77X/oRsPKUmYyJpJSAdZ6NM2Aphl4Pu/QND3P5wO0dmo2c5jNHPb3/fKrr/xNnluARJRXq5V/2jQqOKfE1kPsPC8zM1VVLkqNwpiAEAxbq+hGy89SZtq2/MXaIOrasbUDmqZH2/Zo257bdghSOtM07tfNxh/s799yd3d6koODA8fM0ngvw9bgYG9vatOJClfVSFUVYe3UldxhmiBlxtY0kVLTlLHW8Xw+oG17NqYvs1lv6rrHcjkcEN1p5B9ydQPmc2GEoABAdB1TKYWlnDph5wJvbSdPpwvXbCcLUXhrO2FMQF0HttZBa8dtO5TZrDdt26FtewDDfRD3AhJRYeYemKxh2Bqc1HVTm17Xn4y7yFnyDeMurhh33hp3rmuvZjMXpHSmrqehXiz6h04XHjxZIKLMzB0Wi2LW64xhSAwkVFXEOGpo/dmjD2yPPlBVka31mM2caRqH5XLAnz362FUSQLdarfLTxSJpISLmcx8uLw217R8/PLpnzt3S/5KHdvG3Pn67Afr3PMB8APgvOwL+J/5s/BeEBm1u1Gu4+QAAAABJRU5ErkJggg==) 20 20,default!important}.thumbnails[data-v-0fc2d7b2]{height:150px;padding:15px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;border-top:1px solid #3a3a3a}.thumbnail[data-v-0fc2d7b2]{display:inline-block;outline:2px solid #aaa}.thumbnail+.thumbnail[data-v-0fc2d7b2]{margin-left:10px}.thumbnail[data-v-0fc2d7b2]:hover{outline-color:#d14424}.thumbnail.active[data-v-0fc2d7b2]{outline-width:3px;outline-color:#d14424}.remark[data-v-0fc2d7b2]{width:360px;height:100%;position:relative;background-color:#2a2a2a;border-left:1px solid #3a3a3a;color:#fff}.remark .header[data-v-0fc2d7b2]{height:60px;padding:0 20px;display:flex;justify-content:space-between;align-items:center;font-size:18px;border-bottom:1px solid #3a3a3a}.remark .remark-content[data-v-0fc2d7b2]{height:calc(100% - 60px);padding:20px;line-height:1.5;overflow:auto;overflow:overlay}.remark .remark-scale[data-v-0fc2d7b2]{position:absolute;right:5px;bottom:5px;font-size:22px;display:flex}.remark .scale-btn[data-v-0fc2d7b2]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.remark .scale-btn.disable[data-v-0fc2d7b2]{color:#666;cursor:no-drop}.remark .scale-btn[data-v-0fc2d7b2]:not(.disable):hover{background-color:#333}[data-v-0fc2d7b2]::-webkit-scrollbar{width:0;height:0}.pptist-screen[data-v-6bf3d190]{width:100%;height:100%}.mobile-operate[data-v-fd451ff6]{position:absolute;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.mobile-thumbnails[data-v-2c80920e]{padding:10px;white-space:nowrap;overflow-x:auto;overflow-y:hidden}.thumbnail-item[data-v-2c80920e]{position:relative;display:inline-block;outline:2px solid #aaa}.thumbnail-item+.thumbnail-item[data-v-2c80920e]{margin-left:10px}.thumbnail-item.active[data-v-2c80920e]{outline-color:#d14424}.thumbnail-item.active .label[data-v-2c80920e]{background-color:#d14424}.thumbnail-item .label[data-v-2c80920e]{min-width:20px;height:14px;line-height:14px;position:absolute;right:-1px;top:-1px;color:#fff;background-color:#aaa;z-index:1;font-size:12px;text-align:center;padding:0 5px}.sortable-chosen[data-v-2c80920e]{top:-5px}[data-v-2c80920e]::-webkit-scrollbar{width:0;height:0}.slide-toolbar[data-v-24150aba]{height:230px;background-color:#fff;box-shadow:0 0 15px 0 rgba(0,0,0,.1);display:flex;flex-direction:column;position:relative;z-index:2}.remark[data-v-24150aba]{position:relative;flex:1;border-bottom:1px solid #eee;line-height:1.5}.remark textarea[data-v-24150aba]{width:100%;height:100%;overflow-y:auto;resize:none;border:0;outline:0;padding:8px 10px;font-size:12px;box-sizing:border-box;position:absolute;top:0;right:0;bottom:0;left:0}.toolbar[data-v-24150aba]{height:90px;border-bottom:1px solid #eee;padding:10px}.row[data-v-24150aba]{width:100%;display:flex;align-items:center;margin-bottom:5px}.row .icon[data-v-24150aba]{margin-right:3px}.element-toolbar[data-v-f3d1ac70]{width:100%;height:240px;position:absolute;z-index:99;bottom:0;left:0;background-color:#fff;box-shadow:0 0 15px 0 rgba(0,0,0,.1);display:flex;flex-direction:column;animation:slideInUp-f3d1ac70 .15s}@keyframes slideInUp-f3d1ac70{0%{transform:translateY(100%)}to{transform:translateY(0)}}.content[data-v-f3d1ac70]{padding:10px;flex:1;overflow:auto}.row[data-v-f3d1ac70]{width:100%;display:flex;align-items:center;margin-bottom:10px}.row .icon[data-v-f3d1ac70]{margin-right:3px}.row-block[data-v-f3d1ac70]{margin-bottom:10px;background-color:#f9f9f9;border-radius:2px;padding:10px}.label[data-v-f3d1ac70]{font-size:13px;margin-bottom:20px;margin-left:6px}.colors[data-v-f3d1ac70]{display:flex;flex-wrap:wrap;align-content:flex-start}.color[data-v-f3d1ac70]{width:12%;margin-bottom:.57143%;padding-bottom:5px;display:flex;justify-content:center;align-items:center}.color[data-v-f3d1ac70]:not(:nth-child(8n)){margin-right:.57143%}.color .color-block[data-v-f3d1ac70]{width:30px;height:30px;border-radius:50%}.mobile-editor-header[data-v-5c34ab81]{height:50px;background-color:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 18px;font-size:13px;box-shadow:0 0 15px 0 rgba(0,0,0,.1);position:relative;z-index:2}.history[data-v-5c34ab81]{display:flex;justify-content:center;align-items:center}.history-item[data-v-5c34ab81]{margin-right:20px}.history-item.disable[data-v-5c34ab81]{opacity:.5}.mobile-editor[data-v-3756d058]{height:100%;position:relative;background-color:#f9f9f9}.content[data-v-3756d058]{height:calc(100% - 280px);display:flex;justify-content:center;align-items:center}.viewport[data-v-3756d058]{transform-origin:0 0}.viewport-wrapper[data-v-3756d058]{position:relative;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.background[data-v-3756d058]{width:100%;height:100%;background-position:50%;position:absolute}.mobile-player[data-v-62f26eba]{transform-origin:0 0;background-color:#1d1d1d;position:relative}.screen-slide-list[data-v-62f26eba]{position:relative;width:100%;height:100%}.slide-item[data-v-62f26eba]{position:absolute;top:0;left:0;width:100%;height:100%}.slide-item.current[data-v-62f26eba]{z-index:2}.slide-item.hide[data-v-62f26eba]{opacity:0}.slide-item.turning-mode-no.before[data-v-62f26eba]{transform:translateY(-100%)}.slide-item.turning-mode-no.after[data-v-62f26eba]{transform:translateY(100%)}.slide-item.turning-mode-fade[data-v-62f26eba]{transition:opacity .75s}.slide-item.turning-mode-fade.after[data-v-62f26eba],.slide-item.turning-mode-fade.before[data-v-62f26eba]{pointer-events:none;opacity:0}.slide-item.turning-mode-slideX[data-v-62f26eba]{transition:transform .35s}.slide-item.turning-mode-slideX.before[data-v-62f26eba]{transform:translateX(-100%)}.slide-item.turning-mode-slideX.after[data-v-62f26eba]{transform:translateX(100%)}.slide-item.turning-mode-slideY[data-v-62f26eba]{transition:transform .35s}.slide-item.turning-mode-slideY.before[data-v-62f26eba]{transform:translateY(-100%)}.slide-item.turning-mode-slideY.after[data-v-62f26eba]{transform:translateY(100%)}.slide-content[data-v-62f26eba]{background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center}.header[data-v-62f26eba]{width:100%;height:40px;line-height:40px;padding:0 15px;position:absolute;top:0;left:0;z-index:99;background-color:rgba(29,29,29,.7);text-align:right;font-size:13px;color:#fff;animation:slideInDown-62f26eba .15s}.header .back[data-v-62f26eba]{height:100%}.thumbnails[data-v-62f26eba]{width:100%;position:absolute;bottom:0;left:0;z-index:99;background-color:rgba(29,29,29,.7);overflow:auto!important;animation:slideInUp-62f26eba .15s}@keyframes slideInUp-62f26eba{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInDown-62f26eba{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.mobile-preview[data-v-53dd42dc]{height:100%;background-color:#f9f9f9}.thumbnail-list[data-v-53dd42dc]{height:calc(100% - 50px);padding:10px;overflow:auto}.thumbnail-item[data-v-53dd42dc]{display:flex;justify-content:center;align-items:center;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.thumbnail-item+.thumbnail-item[data-v-53dd42dc]{margin-top:10px}.menu[data-v-53dd42dc]{height:50px;position:relative;box-shadow:0 -2px 4px 0 rgba(51,51,51,.05);background:#fff;display:flex;justify-content:center;align-items:center}.menu .menu-item[data-v-53dd42dc]{width:50%;height:100%;display:flex;justify-content:center;align-items:center;font-size:13px}.menu .menu-item .icon[data-v-53dd42dc]{margin-right:8px;font-size:18px}#app,.mobile[data-v-9826ff08]{height:100%}.ProseMirror,.ProseMirror-static{outline:0;border:0;font-size:20px;word-break:break-word;white-space:normal}.ProseMirror-static:not(.ProseMirror-static),.ProseMirror:not(.ProseMirror-static){-webkit-user-select:text;-moz-user-select:text;user-select:text}.ProseMirror ::-moz-selection,.ProseMirror-static ::-moz-selection{background-color:rgba(209,68,36,.25);color:inherit}.ProseMirror ::selection,.ProseMirror-static ::selection{background-color:rgba(209,68,36,.25);color:inherit}.ProseMirror p,.ProseMirror-static p{margin-top:var(--paragraphSpace)}.ProseMirror p:first-child,.ProseMirror-static p:first-child{margin-top:0}.ProseMirror ul,.ProseMirror-static ul{list-style-type:disc;padding-inline-start:20px}.ProseMirror ul li,.ProseMirror-static ul li{list-style-type:inherit;padding:2px 0}.ProseMirror ol,.ProseMirror-static ol{list-style-type:decimal;padding-inline-start:20px}.ProseMirror ol li,.ProseMirror-static ol li{list-style-type:inherit;padding:2px 0}.ProseMirror code,.ProseMirror-static code{background-color:#eee;padding:2px 6px;margin:0 1px;border-radius:4px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.ProseMirror sup,.ProseMirror-static sup{vertical-align:super;font-size:smaller}.ProseMirror sub,.ProseMirror-static sub{vertical-align:sub;font-size:smaller}.ProseMirror blockquote,.ProseMirror-static blockquote{overflow:hidden;padding-right:1.2em;padding-left:1.2em;margin-left:0;margin-right:0;font-style:italic;border-left:4px solid #ddd}.ProseMirror [data-indent="1"],.ProseMirror-static [data-indent="1"]{padding-left:20px}.ProseMirror [data-indent="2"],.ProseMirror-static [data-indent="2"]{padding-left:40px}.ProseMirror [data-indent="3"],.ProseMirror-static [data-indent="3"]{padding-left:60px}.ProseMirror [data-indent="4"],.ProseMirror-static [data-indent="4"]{padding-left:80px}.ProseMirror [data-indent="5"],.ProseMirror-static [data-indent="5"]{padding-left:100px}.ProseMirror [data-indent="6"],.ProseMirror-static [data-indent="6"]{padding-left:120px}.ProseMirror [data-indent="7"],.ProseMirror-static [data-indent="7"]{padding-left:140px}.ProseMirror [data-indent="8"],.ProseMirror-static [data-indent="8"]{padding-left:160px}.ProseMirror-selectednode{outline:none!important}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;box-sizing:border-box}:after,:before{box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,html{width:100%;height:100%;overflow:hidden;background-color:#fff;color:#41464b}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}a{text-decoration:none;color:#d14424}img{vertical-align:middle;border-style:none}hr{box-sizing:content-box;height:0;overflow:visible}mark.active{background-color:#ff9632}button,input,optgroup,select,textarea{color:inherit}button,input{overflow:visible}button,select{text-transform:none}textarea{overflow:auto;resize:vertical}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}::-webkit-scrollbar{width:5px;height:5px;background-color:transparent}::-webkit-scrollbar-thumb{background-color:#c1c1c1}@font-face{font-display:swap;font-family:仓耳小丸子;src:url(../fonts/%E4%BB%93%E8%80%B3%E5%B0%8F%E4%B8%B8%E5%AD%90.64a7acb4.woff2) format("woff2")}@font-face{font-display:swap;font-family:优设标题黑;src:url(../fonts/%E4%BC%98%E8%AE%BE%E6%A0%87%E9%A2%98%E9%BB%91.df0c1330.woff2) format("woff2")}@font-face{font-display:swap;font-family:字制区喜脉体;src:url(../fonts/%E5%AD%97%E5%88%B6%E5%8C%BA%E5%96%9C%E8%84%89%E4%BD%93.cb8f58a4.woff2) format("woff2")}@font-face{font-display:swap;font-family:峰广明锐体;src:url(../fonts/%E5%B3%B0%E5%B9%BF%E6%98%8E%E9%94%90%E4%BD%93.8c45ca35.woff2) format("woff2")}@font-face{font-display:swap;font-family:得意黑;src:url(../fonts/%E5%BE%97%E6%84%8F%E9%BB%91.7caef6f6.woff2) format("woff2")}@font-face{font-display:swap;font-family:摄图摩登小方体;src:url(../fonts/%E6%91%84%E5%9B%BE%E6%91%A9%E7%99%BB%E5%B0%8F%E6%96%B9%E4%BD%93.7d229dc8.woff2) format("woff2")}@font-face{font-display:swap;font-family:站酷快乐体;src:url(../fonts/%E7%AB%99%E9%85%B7%E5%BF%AB%E4%B9%90%E4%BD%93.8fd3ebd9.woff2) format("woff2")}@font-face{font-display:swap;font-family:素材集市康康体;src:url(../fonts/%E7%B4%A0%E6%9D%90%E9%9B%86%E5%B8%82%E5%BA%B7%E5%BA%B7%E4%BD%93.ceb20972.woff2) format("woff2")}@font-face{font-display:swap;font-family:素材集市酷方体;src:url(../fonts/%E7%B4%A0%E6%9D%90%E9%9B%86%E5%B8%82%E9%85%B7%E6%96%B9%E4%BD%93.42328465.woff2) format("woff2")}@font-face{font-display:swap;font-family:途牛类圆体;src:url(../fonts/%E9%80%94%E7%89%9B%E7%B1%BB%E5%9C%86%E4%BD%93.a94398b6.woff2) format("woff2")}@font-face{font-display:swap;font-family:锐字真言体;src:url(../fonts/%E9%94%90%E5%AD%97%E7%9C%9F%E8%A8%80%E4%BD%93.487089ad.woff2) format("woff2")}.menu-content[data-v-77e74b43]{width:170px;padding:5px 0;background:#fff;border:1px solid #eee;box-shadow:3px 3px 3px rgba(0,0,0,.15);border-radius:2px;list-style:none;margin:0}.menu-item[data-v-77e74b43]{padding:0 20px;color:#555;font-size:12px;transition:all .1s;white-space:nowrap;height:30px;line-height:30px;background-color:#fff;cursor:pointer}.menu-item:not(.disable):hover>.menu-item-content>.sub-menu[data-v-77e74b43]{display:block}.menu-item:not(.disable):hover>.has-children.has-handler[data-v-77e74b43]:after{transform:scale(1)}.menu-item[data-v-77e74b43]:hover:not(.disable){background-color:rgba(209,68,36,.2)}.menu-item.divider[data-v-77e74b43]{height:1px;overflow:hidden;margin:5px;background-color:#e5e5e5;line-height:0;padding:0}.menu-item.disable[data-v-77e74b43]{color:#b1b1b1;cursor:no-drop}.menu-item-content[data-v-77e74b43]{display:flex;align-items:center;justify-content:space-between;position:relative}.menu-item-content.has-children[data-v-77e74b43]:before{content:"";display:inline-block;width:8px;height:8px;border-width:1px;border-style:solid;border-color:#666 #666 transparent transparent;position:absolute;right:0;top:50%;transform:translateY(-50%) rotate(45deg)}.menu-item-content.has-children.has-handler[data-v-77e74b43]:after{content:"";display:inline-block;width:1px;height:24px;background-color:#f1f1f1;position:absolute;right:18px;top:3px;transform:scale(0);transition:transform .2s}.menu-item-content .sub-text[data-v-77e74b43]{opacity:.6}.menu-item-content .sub-menu[data-v-77e74b43]{width:120px;position:absolute;display:none;left:112%;top:-6px}.mask{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:9998}.contextmenu{position:fixed;z-index:9999;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box[data-theme~=tooltip]{background-color:#262626;color:#fff;border-radius:2px;padding:8px;font-size:12px;line-height:1.5}.tippy-box[data-theme~=tooltip] .tippy-arrow{width:12px;height:12px;color:#262626}.tippy-box[data-theme~=tooltip] .tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-box[data-theme~=tooltip][data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-theme~=tooltip][data-placement^=top]>.tippy-arrow:before{bottom:-5px;left:0;border-width:6px 6px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-theme~=tooltip][data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-theme~=tooltip][data-placement^=bottom]>.tippy-arrow:before{top:-5px;left:0;border-width:0 6px 6px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-theme~=tooltip][data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-theme~=tooltip][data-placement^=left]>.tippy-arrow:before{border-width:6px 0 6px 6px;border-left-color:initial;right:-5px;transform-origin:center left}.tippy-box[data-theme~=tooltip][data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-theme~=tooltip][data-placement^=right]>.tippy-arrow:before{left:-5px;border-width:6px 6px 6px 0;border-right-color:initial;transform-origin:center right} \ No newline at end of file diff --git a/index.html b/index.html index 3c3c6e99..dda37e15 100644 --- a/index.html +++ b/index.html @@ -30,4 +30,4 @@ 100% { transform: rotate(360deg); } - }
正在加载中,请稍等 ...
\ No newline at end of file + }
正在加载中,请稍等 ...
\ No newline at end of file diff --git a/js/app.61c0046a.js b/js/app.61c0046a.js new file mode 100644 index 00000000..343dc609 --- /dev/null +++ b/js/app.61c0046a.js @@ -0,0 +1,2 @@ +(function(){var e={2180:function(e,t,l){"use strict";var a,n=l(9963),o=l(9876),i=(l(7658),l(6252)),s=l(2262),r=l(3416);(function(e){e["SYMBOL"]="symbol",e["EL_ANIMATION"]="elAnimation",e["EL_STYLE"]="elStyle",e["EL_POSITION"]="elPosition",e["SLIDE_DESIGN"]="slideDesign",e["SLIDE_ANIMATION"]="slideAnimation",e["MULTI_POSITION"]="multiPosition"})(a||(a={}));var u=l(5804);const c=e=>{const{empty:t}=e.state.selection;t&&(0,u.td)(e.state,e.dispatch)},d=(e,t,l)=>{if(l)e.dispatch(e.state.tr.addMark(l.from,l.to,t));else{const{$from:l,$to:a}=e.state.selection;e.dispatch(e.state.tr.addMark(l.pos,a.pos,t))}},p=(e,t,l,a)=>{let n=t;const o=e=>e.type===a;let i=null,s=null,r=null;while(n<=l){const t=e.nodeAt(n);if(!t||!t.marks)return null;const l=t.marks.find(o);if(!l)return null;if(i&&l!==i)return null;s=s||t,i=i||l,r=t,n++}let u=t,c=l,d=0;n=t-1;while(n>d){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==i)break;u=n,s=t,n--}n=l+1,d=e.nodeSize-2;while(nArray.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,m=(e,t)=>{for(let l=e.depth;l>0;l--){const a=e.node(l);if(t(a))return{pos:l>0?e.before(l):0,start:e.start(l),depth:l,node:a}}},h=e=>t=>m(t.$from,e),f=e=>t=>h((t=>v(e,t)))(t),g=(e,t)=>{const l=t.schema.nodes[e];return!!f(l)(t.selection)},y=e=>{const{selection:t,doc:l}=e.state,{from:a}=t;let n=l.nodeAt(a)||l.nodeAt(a-1);return n?.lastChild&&(n=n.lastChild),n?.marks||[]},w=(e,t,l)=>{for(const a of e)if(a.type.name===t&&a.attrs[l])return a.attrs[l];return null},x=(e,t)=>{for(const l of e)if(l.type.name===t)return!0;return!1},k=(e,t)=>{const{from:l,$from:a,to:n,empty:o}=e.selection;return o?t.isInSet(e.storedMarks||a.marks()):e.doc.rangeHasMark(l,n,t)},b=(e,t)=>{const{selection:l,doc:a}=e.state,{from:n,to:o}=l;let i=!0,s="";return a.nodesBetween(n,o,(e=>(i&&e.attrs[t]&&(i=!1,s=e.attrs[t]),i))),s},_={color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",align:"left"},I=(e,t={})=>{const l={..._,...t},a=y(e),n=x(a,"strong"),o=x(a,"em"),i=x(a,"underline"),s=x(a,"strikethrough"),r=x(a,"superscript"),u=x(a,"subscript"),c=x(a,"code"),d=w(a,"forecolor","color")||l.color,p=w(a,"backcolor","backcolor")||l.backcolor,v=w(a,"fontsize","fontsize")||l.fontsize,m=w(a,"fontname","fontname")||l.fontname,h=w(a,"link","href")||"",f=b(e,"align")||l.align,k=g("bullet_list",e.state),I=g("ordered_list",e.state),S=g("blockquote",e.state);return{bold:n,em:o,underline:i,strikethrough:s,superscript:r,subscript:u,code:c,color:d,backcolor:p,fontsize:v,fontname:m,link:h,align:f,bulletList:k,orderedList:I,blockquote:S}},S=e=>{const t=y(e),l=w(t,"fontsize","fontsize")||_.fontsize;return parseInt(l)},C={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},L=[{label:"Arial",value:"Arial"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"宋体",value:"SimSun"},{label:"黑体",value:"SimHei"},{label:"楷体",value:"KaiTi"},{label:"新宋体",value:"NSimSun"},{label:"仿宋",value:"FangSong"},{label:"苹方",value:"PingFang SC"},{label:"华文黑体",value:"STHeiti"},{label:"华文楷体",value:"STKaiti"},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangSong"},{label:"华文中宋",value:"STZhongSong"},{label:"华文琥珀",value:"STHupo"},{label:"华文新魏",value:"STXinwei"},{label:"华文隶书",value:"STLiti"},{label:"华文行楷",value:"STXingkai"},{label:"冬青黑体",value:"Hiragino Sans GB"},{label:"兰亭黑",value:"Lantinghei SC"},{label:"偏偏体",value:"Hanzipen SC"},{label:"手札体",value:"Hannotate SC"},{label:"宋体",value:"Songti SC"},{label:"娃娃体",value:"Wawati SC"},{label:"行楷",value:"Xingkai SC"},{label:"圆体",value:"Yuanti SC"},{label:"华文细黑",value:"STXihei"},{label:"幼圆",value:"YouYuan"},{label:"隶书",value:"LiSu"}],E=[{label:"得意黑",value:"得意黑"},{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}],T=e=>{if("string"!==typeof e)return!1;const t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;const l=100,a=100,n=100,o="a",i=document.createElement("canvas"),s=i.getContext("2d",{willReadFrequently:!0});if(!s)return!1;i.width=a,i.height=n,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";const r=e=>{s.clearRect(0,0,a,n),s.font=`${l}px ${e}, ${t}`,s.fillText(o,a/2,n/2);const i=s.getImageData(0,0,a,n).data;return[].slice.call(i).filter((e=>0!==e))};return r(t).join("")!==r(e).join("")};var M=l(7234),U=l(6486);const W=[{id:"test-slide-1",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"idn7Mx",left:355,top:65.25,width:585,height:188,lineHeight:1.2,content:"

PPTIST

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

基于 Vue 3.x + TypeScript 的在线演示文稿应用

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"#5b9bd5",style:"solid",width:2}],background:{type:"solid",color:"#ffffff"}},{id:"test-slide-2",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"

在此处添加标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"#5b9bd5",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"#fff"}},{id:"test-slide-3",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"

感谢观看

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333",wordSpace:5}],background:{type:"solid",color:"#fff"}}],D={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff"},H=[{id:"template",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"AkIh3E",left:355,top:95.11111111111111,width:585,height:116,lineHeight:1.2,content:"

输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:6},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

请在此处输入副标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"{{themeColor}}",style:"solid",width:2}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"{{themeColor}}",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"

感谢观看

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:5}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"MZVO1kkj",elements:[{type:"shape",id:"cql0h8",left:0,top:0,width:352.59259259259255,height:562.5,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"_RTaF4",left:171.4814814814814,top:100.13888888888887,width:362.22222222222223,height:362.22222222222223,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"rgba(255,255,255,0)",fixedRatio:!1,rotate:0,outline:{width:10,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"UZfo8N",left:216.66666666666663,top:145.32407407407408,width:271.85185185185185,height:271.85185185185185,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0,text:{content:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"ysqtBg",left:561.4814814814814,top:100.1388888888889,width:359.25925925925924,height:80,content:"

在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"lXsoHa",left:572.5925925925925,top:202.3611111111111,width:257.77777777777777,height:260,content:"
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",lineHeight:2,fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"EBBnTr",left:360.5996472663139,top:141.8496472663139,width:278.80070546737215,height:278.80070546737215,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:0,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"gDIWDH",left:456.4373897707231,top:98.287037037037,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"DUWT7E",left:317.037037037037,top:237.68738977072314,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"pbhn38",left:456.43738977072303,top:377.08774250440916,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"CvMKrO",left:595.8377425044091,top:237.6873897707231,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"adudHB",left:402.962962962963,top:39.39814814814815,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"9UpDwg",left:402.962962962963,top:473.1018518518518,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"GERdpB",left:111.48148148148151,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"G5qoho",left:691.1111111111111,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"shape",id:"vdZcI6",left:415.18518518518516,top:196.4351851851852,width:169.62962962962962,height:169.62962962962962,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"tYUmrx",left:156.66666666666683,top:149.02777777777771,width:264.4444444444445,height:264.4444444444445,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"0GVHf8",left:342.2222222222223,top:217.17592592592587,width:128.14814814814812,height:128.14814814814812,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0},{type:"text",id:"BO33Sv",left:378.8888888888889,top:235.24999999999994,width:464.4444444444444,height:92,content:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Hj7ttp",left:69.35185185185185,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"FmKMNB",left:69.35185185185185,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"rI7ZeO",left:510.64814814814815,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"KspwGc",left:510.64814814814815,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Rx63Jo",left:69.35185185185179,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"ulyuzE",left:69.35185185185179,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"kr35Ca",left:510.6481481481481,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"BNQSpC",left:510.6481481481481,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Vr38Nu",left:69.35185185185185,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"

3.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"IwKRSu",left:69.35185185185185,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"0Opr1v",left:510.64814814814815,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"

4.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"4L9Uzz",left:510.64814814814815,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"GdEGxg",left:134.53703703703704,top:127.25,width:152.77777777777777,height:308,lineHeight:1.8,content:"

请在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:8,fill:"{{themeColor}}"},{type:"text",id:"y5sAfw",left:332.8703703703704,top:127.25,width:532.5925925925926,height:50,content:"

请在此处输入内容1

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"VeuocM",left:332.8703703703704,top:212.0648148148148,width:532.5925925925926,height:50,content:"

请在此处输入内容2

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"RyFWQe",left:332.8703703703704,top:296.8796296296296,width:532.5925925925926,height:50,content:"

请在此处输入内容3

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Q56viI",left:332.8703703703704,top:381.69444444444446,width:532.5925925925926,height:50,content:"

请在此处输入内容4

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"SUWirT",left:73.8888888888889,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"YjzN1M",left:148.70370370370372,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"fS09I7",left:527.5925925925926,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"qCnfB1",left:602.4074074074074,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"difAAT",left:73.8888888888889,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"EUlvMo",left:148.70370370370372,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"US_9jB",left:527.5925925925926,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"243MnQ",left:602.4074074074074,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"Y_KUj0",left:73.8888888888889,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

5

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"9GglMe",left:148.70370370370372,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"eSInje",left:527.5925925925926,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

6

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"0S3yUg",left:602.4074074074074,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}}],F=(0,o.Q_)("slides",{state:()=>({title:"未命名演示文稿",theme:D,slides:W,slideIndex:0,viewportRatio:.5625}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id));return t.animations.filter((e=>a.includes(e.elId)))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id)),n=t.animations.filter((e=>a.includes(e.elId))),o=[];for(const i of n)if("click"!==i.trigger&&o.length){if("meantime"===i.trigger){const e=o[o.length-1];e.animations=e.animations.filter((e=>e.elId!==i.elId)),e.animations.push(i),o[o.length-1]=e}else if("auto"===i.trigger){const e=o[o.length-1];e.autoNext=!0,o[o.length-1]=e,o.push({animations:[i],autoNext:!1})}}else o.push({animations:[i],autoNext:!1});return o},layouts(e){const{themeColor:t,fontColor:l,fontName:a,backgroundColor:n}=e.theme,o=(0,M.Z)(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",i=JSON.stringify(H).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",a).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",o);return JSON.parse(i)}},actions:{setTitle(e){this.title=e||"未命名演示文稿"},setTheme(e){this.theme={...this.theme,...e}},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},addSlide(e){const t=Array.isArray(e)?e:[e],l=this.slideIndex+1;this.slides.splice(l,0,...t),this.slideIndex=l},updateSlide(e){const t=this.slideIndex;this.slides[t]={...this.slides[t],...e}},deleteSlide(e){const t=Array.isArray(e)?e:[e],l=[];for(let o=0;oe.id===t[o]));l.push(e)}let a=Math.min(...l);const n=this.slides.length-t.length-1;a>n&&(a=n),this.slideIndex=a,this.slides=this.slides.filter((e=>!t.includes(e.id)))},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=[...l,...t];this.slides[this.slideIndex].elements=a},deleteElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=l.filter((e=>!t.includes(e.id)));this.slides[this.slideIndex].elements=a},updateElement(e){const{id:t,props:l,slideId:a}=e,n="string"===typeof t?[t]:t,o=a?this.slides.findIndex((e=>e.id===a)):this.slideIndex,i=this.slides[o],s=i.elements.map((e=>n.includes(e.id)?{...e,...l}:e));this.slides[o].elements=s},removeElementProps(e){const{id:t,propName:l}=e,a="string"===typeof l?[l]:l,n=this.slideIndex,o=this.slides[n],i=o.elements.map((e=>e.id===t?(0,U.omit)(e,a):e));this.slides[n].elements=i}}}),A=(0,r.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),Z=A(10),$=(0,o.Q_)("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,creatingCustomShape:!1,availableFonts:L,toolbarState:a.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:C,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:Z,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1}),getters:{activeElementList(e){const t=F(),l=t.currentSlide;return l&&l.elements?l.elements.filter((t=>e.activeElementIdList.includes(t.id))):[]},handleElement(e){const t=F(),l=t.currentSlide;return l&&l.elements&&l.elements.find((t=>e.handleElementId===t.id))||null}},actions:{setActiveElementIdList(e){1===e.length?this.handleElementId=e[0]:this.handleElementId="",this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setHiddenElementIdList(e){this.hiddenElementIdList=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setCreatingCustomShapeState(e){this.creatingCustomShape=e},setAvailableFonts(){this.availableFonts=L.filter((e=>T(e.value)))},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e},setTextFormatPainter(e){this.textFormatPainter=e},setShapeFormatPainter(e){this.shapeFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e}}});var O=l(7327),R=l(8134);const P="PPTIST_DISCARDED_DB",z="PPTist",B=async()=>{const e=(new Date).getTime(),t=localStorage.getItem(P),l=t?JSON.parse(t):[],a=await R.Z.getDatabaseNames(),n=a.filter((t=>{if(-1===t.indexOf(z))return!1;const[a,n,o]=t.split("_");return a!==z||!n||!o||(!!l.includes(n)||e-+o>=432e5)}));for(const o of n)R.Z.delete(o);localStorage.removeItem(P)};class N extends R.Z{constructor(){super(`${z}_${Z}_${(new Date).getTime()}`),(0,O.Z)(this,"snapshots",void 0),(0,O.Z)(this,"writingBoardImgs",void 0),this.version(1).stores({snapshots:"++id",writingBoardImgs:"++id"}),this.snapshots=this.table("snapshots"),this.writingBoardImgs=this.table("writingBoardImgs")}}const j=new N,Y=(0,o.Q_)("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor=0&&this.snapshotCursoro&&(l.push(t[0]),n--),n>=2&&j.snapshots.update(t[n-2],{index:e.slideIndex}),await j.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=F(),t=$(),l=this.snapshotCursor-1,a=await j.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=F(),t=$(),l=this.snapshotCursor+1,a=await j.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])}}}),V=(0,o.Q_)("keyboard",{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),J=(0,o.Q_)("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),q=(e,t)=>(0,U.padStart)(""+e,t,"0"),X=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);var G,K,Q,ee,te,le,ae=l(3577);(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(G||(G={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(K||(K={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(Q||(Q={})),function(e){e["LEFT_TOP"]="left-top",e["TOP"]="top",e["RIGHT_TOP"]="right-top",e["LEFT"]="left",e["RIGHT"]="right",e["LEFT_BOTTOM"]="left-bottom",e["BOTTOM"]="bottom",e["RIGHT_BOTTOM"]="right-bottom"}(ee||(ee={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(te||(te={})),function(e){e["C"]="C",e["X"]="X",e["Z"]="Z",e["Y"]="Y",e["A"]="A",e["G"]="G",e["L"]="L",e["F"]="F",e["D"]="D",e["B"]="B",e["P"]="P",e["MINUS"]="-",e["EQUAL"]="=",e["DIGIT_0"]="0",e["DELETE"]="DELETE",e["UP"]="ARROWUP",e["DOWN"]="ARROWDOWN",e["LEFT"]="ARROWLEFT",e["RIGHT"]="ARROWRIGHT",e["ENTER"]="ENTER",e["SPACE"]=" ",e["TAB"]="TAB",e["BACKSPACE"]="BACKSPACE",e["ESC"]="ESCAPE",e["PAGEUP"]="PAGEUP",e["PAGEDOWN"]="PAGEDOWN",e["F5"]="F5"}(le||(le={}));const ne=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"粘贴为纯文本",value:"Ctrl + Shift + V"},{label:"快速复制粘贴",value:"Ctrl + D"},{label:"全选",value:"Ctrl + A"},{label:"撤销",value:"Ctrl + Z"},{label:"恢复",value:"Ctrl + Y"},{label:"删除",value:"Delete / Backspace"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"打开搜索替换",value:"Ctrl + F"},{label:"打印",value:"Ctrl + P"},{label:"关闭弹窗",value:"ESC"}]},{type:"幻灯片放映",children:[{label:"从头开始放映幻灯片",value:"F5"},{label:"从当前开始放映幻灯片",value:"Shift + F5"},{label:"切换上一页",value:"↑ / ← / PgUp"},{label:"切换下一页",value:"↓ / → / PgDown"},{label:"切换下一页",value:"Enter / Space"},{label:"退出放映",value:"ESC"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"移动画布",value:"Space + 鼠标拖拽"},{label:"缩放画布",value:"Ctrl + 鼠标滚轮"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"使画布适应当前屏幕",value:"Ctrl + 0"},{label:"上一页(未选中元素)",value:"↑ / ←"},{label:"下一页(未选中元素)",value:"↓ / →"},{label:"上一页",value:"鼠标上滚 / PgUp"},{label:"下一页",value:"鼠标下滚 / PgDown"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"切换焦点元素",value:"Tab"},{label:"确认图片裁剪",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"图表数据编辑",children:[{label:"聚焦到下一行",value:"Enter"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"行内代码",value:"Ctrl + E"},{label:"上角标",value:"Ctrl + ;"},{label:"下角标",value:"Ctrl + '"},{label:"选中段落",value:"ESC"}]}];var oe=l(2152),ie=l.n(oe),se=l(1354),re=l.n(se);const ue="pptist",ce=e=>re().AES.encrypt(e,ue).toString(),de=e=>{const t=re().AES.decrypt(e,ue);return t.toString(re().enc.Utf8)},pe=e=>new Promise(((t,l)=>{const a=document.createElement("button"),n=new(ie())(a,{text:()=>e,action:()=>"copy",container:document.body});n.on("success",(e=>{n.destroy(),t(e)})),n.on("error",(e=>{n.destroy(),l(e)})),document.body.appendChild(a),a.click(),document.body.removeChild(a)})),ve=()=>new Promise(((e,t)=>{navigator.clipboard?.readText?navigator.clipboard.readText().then((l=>(l||t("剪贴板为空或者不包含文本"),e(l)))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")})),me=e=>{let t;try{t=JSON.parse(de(e))}catch{t=e}return t},he=e=>{const t=e.split("\r\n");""===t[t.length-1]&&t.pop();let l=-1;const a=[];for(const n in t){if(a[n]=t[n].split("\t"),1===a[n].length)return null;if(-1===l)l=a[n].length;else if(l!==a[n].length)return null}return a},fe=e=>{const{left:t,top:l,width:a,height:n,rotate:o=0}=e,i=Math.sqrt(Math.pow(a,2)+Math.pow(n,2))/2,s=180*Math.atan(n/a)/Math.PI,r=(180-o-s)*Math.PI/180,u=(s-o)*Math.PI/180,c=t+a/2,d=l+n/2,p=[c+i*Math.cos(r),c+i*Math.cos(u),c-i*Math.cos(r),c-i*Math.cos(u)],v=[d-i*Math.sin(r),d-i*Math.sin(u),d+i*Math.sin(r),d+i*Math.sin(u)];return{xRange:[Math.min(...p),Math.max(...p)],yRange:[Math.min(...v),Math.max(...v)]}},ge=e=>{const{xRange:t,yRange:l}=fe({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:a,yRange:n}=fe({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:a[0]-t[0],offsetY:n[0]-l[0]}},ye=e=>{let t,l,a,n;if("line"===e.type)t=e.left,l=e.left+Math.max(e.start[0],e.end[0]),a=e.top,n=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:o,top:i,width:s,height:r,rotate:u}=e,{xRange:c,yRange:d}=fe({left:o,top:i,width:s,height:r,rotate:u});t=c[0],l=c[1],a=d[0],n=d[1]}else t=e.left,l=e.left+e.width,a=e.top,n=e.top+e.height;return{minX:t,maxX:l,minY:a,maxY:n}},we=e=>{const t=[],l=[],a=[],n=[];e.forEach((e=>{const{minX:o,maxX:i,minY:s,maxY:r}=ye(e);t.push(o),l.push(s),a.push(i),n.push(r)}));const o=Math.min(...t),i=Math.max(...a),s=Math.min(...l),r=Math.max(...n);return{minX:o,maxX:i,minY:s,maxY:r}},xe=e=>{const t=[];return e.forEach((e=>{const l=t.findIndex((t=>t.value===e.value));if(-1===l)t.push(e);else{const a=t[l],n=Math.min(a.range[0],e.range[0]),o=Math.max(a.range[1],e.range[1]),i=[n,o],s={value:e.value,range:i};t[l]=s}})),t},ke=e=>{const t={};for(const l of e)t[l.id]=(0,r.x0)(10);return t},be=e=>{const t={},l={};for(const a of e){const e=a.groupId;e&&!t[e]&&(t[e]=(0,r.x0)(10)),l[a.id]=(0,r.x0)(10)}return{groupIdMap:t,elIdMap:l}},_e=e=>{const t=(0,M.Z)(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Ie=e=>{const t=e.start.join(","),l=e.end.join(",");if(e.broken){const a=e.broken.join(",");return`M${t} L${a} L${l}`}if(e.curve){const a=e.curve.join(",");return`M${t} Q${a} ${l}`}if(e.cubic){const[a,n]=e.cubic,o=a.join(","),i=n.join(",");return`M${t} C${o} ${i} ${l}`}return`M${t} L${l}`};var Se=l(6108),Ce=l(1061),Le=l(8261),Ee=l(9512),Te=l(2025),Me=l(9872),Ue=l(1321),We=l(2696),De=l(3271),He=l(9015),Fe=l(5761),Ae=l(7559),Ze=l(4023),$e=l(4141),Oe=l(5010),Re=l(6492),Pe=l(1094),ze=l(2677),Be=l(683),Ne=l(7259),je=l(1258),Ye=l(9978),Ve=l(597),Je=l(85),qe=l(6071),Xe=l(2489),Ge=l(9925),Ke=l(5361),Qe=l(3185),et=l(139),tt=l(8461),lt=l(2882),at=l(3862),nt=l(3764),ot=l(9371),it=l(9912),st=l(3935),rt=l(3735),ut=l(3542),ct=l(7537),dt=l(5314),pt=l(3325),vt=l(3275),mt=l(3317),ht=l(7712),ft=l(9370),gt=l(2778),yt=l(4422),wt=l(4957),xt=l(7872),kt=l(5356),bt=l(8684),_t=l(9577),It=l(887),St=l(6866),Ct=l(509),Lt=l(7606),Et=l(4412),Tt=l(8814),Mt=l(2057),Ut=l(6048),Wt=l(5114),Dt=l(9917),Ht=l(7747),Ft=l(7425),At=l(6717),Zt=l(6302),$t=l(3060),Ot=l(7107),Rt=l(2100),Pt=l(5460),zt=l(5268),Bt=l(1432),Nt=l(5193),jt=l(4566),Yt=l(7091),Vt=l(9602),Jt=l(4891),qt=l(4012),Xt=l(3681),Gt=l(1440),Kt=l(3482),Qt=l(646),el=l(8e3),tl=l(4628),ll=l(9141),al=l(1060),nl=l(8389),ol=l(3467),il=l(6935),sl=l(3590),rl=l(6453),ul=l(5957),cl=l(4467),dl=l(5547),pl=l(5650),vl=l(2790),ml=l(5620),hl=l(3339),fl=l(4666),gl=l(5215),yl=l(904),wl=l(3650),xl=l(4296),kl=l(6519),bl=l(4790),_l=l(3260),Il=l(2146),Sl=l(6755),Cl=l(2849),Ll=l(6940),El=l(6116),Tl=l(5741),Ml=l(2939),Ul=l(9524),Wl=l(6135),Dl=l(6821),Hl=l(6149);const Fl={IconPlayOne:Hl.Z,IconFullScreenPlay:Dl.Z,IconLock:Wl.Z,IconUnlock:Ul.Z,IconPpt:Ml.Z,IconFormat:Tl.Z,IconPicture:El.Z,IconFullScreen:Ll.Z,IconList:Cl.Z,IconOrderedList:Sl.Z,IconFlipVertically:Il.Z,IconFlipHorizontally:_l.Z,IconFontSize:bl.Z,IconCode:kl.Z,IconTextBold:xl.Z,IconTextItalic:wl.Z,IconTextUnderline:yl.Z,IconStrikethrough:gl.Z,IconEdit:fl.Z,IconQuote:hl.Z,IconBackgroundColor:ml.Z,IconGroup:vl.Z,IconUngroup:pl.Z,IconBack:dl.Z,IconNext:cl.Z,IconFullwidth:ul.Z,IconAlignTop:rl.Z,IconAlignLeft:sl.Z,IconAlignRight:il.Z,IconAlignBottom:ol.Z,IconAlignVertically:nl.Z,IconAlignHorizontally:al.Z,IconBringToFront:ll.Z,IconSendToBack:tl.Z,IconAlignTextLeft:el.Z,IconAlignTextRight:Qt.Z,IconAlignTextCenter:Kt.Z,IconAlignTextBoth:Gt.Z,IconRowHeight:Xt.Z,IconWrite:qt.Z,IconInsertTable:Jt.Z,IconAddText:Vt.Z,IconFill:Yt.Z,IconTailoring:jt.Z,IconEffects:Nt.Z,IconColorFilter:Bt.Z,IconUp:zt.Z,IconDown:Pt.Z,IconPlus:Rt.Z,IconMinus:Ot.Z,IconConnection:$t.Z,IconBringToFrontOne:Zt.Z,IconSentToBack:At.Z,IconGithub:Ft.Z,IconChartProportion:Ht.Z,IconChartHistogram:Dt.Z,IconChartHistogramOne:Wt.Z,IconChartLineArea:Ut.Z,IconChartRing:Mt.Z,IconChartScatter:Tt.Z,IconChartLine:Et.Z,IconChartPie:Lt.Z,IconText:Ct.Z,IconRotate:St.Z,IconLeftTwo:It.Z,IconRightTwo:_t.Z,IconPlatte:bt.Z,IconClose:kt.Z,IconCloseSmall:xt.Z,IconUndo:wt.Z,IconTransform:yt.Z,IconClick:gt.Z,IconTheme:ft.Z,IconArrowCircleLeft:ht.Z,IconGraphicDesign:mt.Z,IconLogout:vt.Z,IconErase:pt.Z,IconClear:dt.Z,IconAlignTextTopOne:ct.Z,IconAlignTextBottomOne:ut.Z,IconAlignTextMiddleOne:rt.Z,IconPause:st.Z,IconVolumeMute:it.Z,IconVolumeNotice:ot.Z,IconVolumeSmall:nt.Z,IconVideoTwo:at.Z,IconFormula:lt.Z,IconLinkOne:tt.Z,IconFullScreenOne:et.Z,IconOffScreenOne:Qe.Z,IconPower:Ke.Z,IconListView:Ge.Z,IconMagic:Xe.Z,IconHighLight:qe.Z,IconDownload:Je.Z,IconIndentLeft:Ve.Z,IconIndentRight:Ye.Z,IconVerticalSpacingBetweenItems:je.Z,IconCopy:Ne.Z,IconDelete:Be.Z,IconSquare:ze.Z,IconRound:Pe.Z,IconNeedle:Re.Z,IconTextRotationNone:Oe.Z,IconTextRotationDown:$e.Z,IconFormatBrush:Ze.Z,IconPreviewOpen:Ae.Z,IconPreviewClose:Fe.Z,IconStopwatchStart:He.Z,IconSearch:De.Z,IconLeft:We.Z,IconRight:Ue.Z,IconMoveOne:Me.Z,IconHamburgerButton:Te.Z,IconAttention:Ee.Z,IconCheckOne:Le.Z,IconCloseOne:Ce.Z,IconInfo:Se.Z};var Al={install(e){for(const t of Object.keys(Fl))e.component(t,Fl[t])}};const Zl=["id"],$l={class:"icons"},Ol={class:"content"},Rl={key:0,class:"title"},Pl={class:"description"},zl={key:0,class:"control"};var Bl=(0,i.aZ)({__name:"Message",props:{id:{},message:{},type:{default:"success"},title:{default:""},duration:{default:3e3},closable:{type:Boolean,default:!1}},emits:["close","destroy"],setup(e,{expose:t,emit:l}){const a=e,{IconAttention:o,IconCheckOne:r,IconCloseOne:u,IconInfo:c,IconCloseSmall:d}=Fl,p=(0,s.iH)(!0),v=(0,s.iH)(null),m=()=>{a.duration<=0||(v.value=setTimeout(f,a.duration))},h=()=>{v.value&&clearTimeout(v.value)},f=()=>p.value=!1;return(0,i.wF)((()=>{h()})),(0,i.bv)((()=>{m()})),t({close:f}),(e,t)=>((0,i.wg)(),(0,i.j4)(n.uT,{name:"message-fade",appear:"",mode:"in-out",onBeforeLeave:t[3]||(t[3]=e=>l("close")),onAfterLeave:t[4]||(t[4]=e=>l("destroy"))},{default:(0,i.w5)((()=>[p.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"message",id:e.id},[(0,i._)("div",{class:"message-container",onMouseenter:t[1]||(t[1]=e=>h()),onMouseleave:t[2]||(t[2]=e=>m())},[(0,i._)("div",$l,["warning"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(o),{key:0,theme:"filled",size:"18",fill:"#faad14"})):(0,i.kq)("",!0),"success"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(r),{key:1,theme:"filled",size:"18",fill:"#52c41a"})):(0,i.kq)("",!0),"error"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(u),{key:2,theme:"filled",size:"18",fill:"#ff4d4f"})):(0,i.kq)("",!0),"info"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(c),{key:3,theme:"filled",size:"18",fill:"#1677ff"})):(0,i.kq)("",!0)]),(0,i._)("div",Ol,[e.title?((0,i.wg)(),(0,i.iD)("div",Rl,(0,ae.zw)(e.title),1)):(0,i.kq)("",!0),(0,i._)("div",Pl,(0,ae.zw)(e.message),1)]),e.closable?((0,i.wg)(),(0,i.iD)("div",zl,[(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>f())},[(0,i.Wm)((0,s.SU)(d))])])):(0,i.kq)("",!0)],32)],8,Zl)):(0,i.kq)("",!0)])),_:1}))}}),Nl=l(3744);const jl=(0,Nl.Z)(Bl,[["__scopeId","data-v-2231702e"]]);var Yl=jl;const Vl=[];let Jl=null,ql=0;const Xl={duration:3e3},Gl=e=>{const t="message-"+ql++,l={...Xl,...e,id:t};Jl||(Jl=document.createElement("div"),Jl.className="message-wrap",Jl.style.cssText="\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n ",document.body.appendChild(Jl));const a=(0,i.Wm)(Yl,l,null),o=document.createElement("div");a.appContext=e.ctx||Gl._context||null,a.props.onClose=e.onClose,a.props.onDestroy=()=>{Jl&&Jl.childNodes.length<=1&&(Jl.remove(),Jl=null),(0,n.sY)(null,o)},(0,n.sY)(a,o),Jl.appendChild(o.firstElementChild);const s={id:t,close:()=>a?.component?.exposed?.close()};return Vl.push(s),s};Gl.success=(e,t)=>Gl({...t,type:"success",message:e}),Gl.info=(e,t)=>Gl({...t,type:"info",message:e}),Gl.warning=(e,t)=>Gl({...t,type:"warning",message:e}),Gl.error=(e,t)=>Gl({...t,type:"error",message:e}),Gl.closeAll=function(){for(let e=Vl.length-1;e>=0;e--)Vl[e].close()};var Kl=Gl;const Ql=e=>{const t=e.replace(/[\n\r]+/g,"
"),l=t.split("
");let a="";for(const n of l)n&&(a+=`
${n}
`);return a},ea=e=>new Promise((t=>{const l=document.createElement("img");l.src=e,l.style.opacity="0",document.body.appendChild(l),l.onload=()=>{const e=l.clientWidth,a=l.clientHeight;l.onload=null,l.onerror=null,document.body.removeChild(l),t({width:e,height:a})},l.onerror=()=>{l.onload=null,l.onerror=null}})),ta=e=>new Promise((t=>{const l=new FileReader;l.addEventListener("load",(()=>{t(l.result)})),l.readAsDataURL(e)})),la=1e3;var aa,na;(function(e){e["ROUND_RECT"]="roundRect",e["ROUND_RECT_DIAGONAL"]="roundRectDiagonal",e["ROUND_RECT_SINGLE"]="roundRectSingle",e["ROUND_RECT_SAMESIDE"]="roundRectSameSide",e["CUT_RECT_DIAGONAL"]="cutRectDiagonal",e["CUT_RECT_SINGLE"]="cutRectSingle",e["CUT_RECT_SAMESIDE"]="cutRectSameSide",e["CUT_ROUND_RECT"]="cutRoundRect",e["MESSAGE"]="message",e["ROUND_MESSAGE"]="roundMessage",e["L"]="L",e["RING_RECT"]="ringRect",e["PLUS"]="plus",e["TRIANGLE"]="triangle",e["PARALLELOGRAM_LEFT"]="parallelogramLeft",e["PARALLELOGRAM_RIGHT"]="parallelogramRight",e["TRAPEZOID"]="trapezoid",e["BULLET"]="bullet",e["INDICATOR"]="indicator"})(aa||(aa={})),function(e){e["TEXT"]="text",e["IMAGE"]="image",e["SHAPE"]="shape",e["LINE"]="line",e["CHART"]="chart",e["TABLE"]="table",e["LATEX"]="latex",e["VIDEO"]="video",e["AUDIO"]="audio"}(na||(na={}));const oa={[aa.ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L ${a} ${t} Q 0 ${t} 0 ${t-a} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t-a} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L ${a} ${t} Z`}},[aa.CUT_RECT_SINGLE]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} Z`}},[aa.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:.2,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} L ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[aa.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:.125,range:[0,1],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e} 0 L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[aa.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} Q 0 0 ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[aa.CUT_ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.MESSAGE]:{formula:(e,t)=>{const l=.2*e,a=.2*t;return`M 0 0 L ${e} 0 L ${e} ${t-a} L ${e/2} ${t-a} L ${e/2-l} ${t} L ${e/2-l} ${t-a} L 0 ${t-a} Z`}},[aa.ROUND_MESSAGE]:{formula:(e,t)=>{const l=.125*Math.min(e,t),a=.2*e,n=.2*t;return`M 0 ${l} Q 0 0 ${l} 0 L ${e-l} 0 Q ${e} 0 ${e} ${l} L ${e} ${t-l-n} Q ${e} ${t-n} ${e-l} ${t-n} L ${e/2} ${t-n} L ${e/2-a} ${t} L ${e/2-a} ${t-n} L ${l} ${t-n} Q 0 ${t-n} 0 ${t-l-n} L 0 ${l} Z`}},[aa.L]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-a} L ${a} ${t-a} L ${a} 0 Z`}},[aa.RING_RECT]:{editable:!0,defaultValue:.25,range:[.1,.45],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${a} ${a} L ${a} ${t-a} L ${e-a} ${t-a} L ${e-a} ${a} Z`}},[aa.PLUS]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"center",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${e/2-a/2} 0 L ${e/2-a/2} ${t/2-a/2} L 0 ${t/2-a/2} L 0 ${t/2+a/2} L ${e/2-a/2} ${t/2+a/2} L ${e/2-a/2} ${t} L ${e/2+a/2} ${t} L ${e/2+a/2} ${t/2+a/2} L ${e} ${t/2+a/2} L ${e} ${t/2-a/2} L ${e/2+a/2} ${t/2-a/2} L ${e/2+a/2} 0 Z`}},[aa.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L 0 ${t} L ${e} ${t} Z`}},[aa.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e} 0 L ${e-a} ${t} L 0 ${t} Z`}},[aa.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M 0 0 L ${e-a} 0 L ${e} ${t} L ${a} ${t} Z`}},[aa.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${t} L 0 ${t} Z`}},[aa.BULLET]:{editable:!0,defaultValue:.2,range:[0,1],relative:"top",getBaseSize:(e,t)=>t,formula:(e,t,l)=>{const a=t*l;return`M ${e/2} 0 L 0 ${a} L 0 ${t} L ${e} ${t} L ${e} ${a} Z`}},[aa.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${e} ${t/2} L ${e-a} 0 L 0 0 L ${a} ${t/2} L 0 ${t} L ${e-a} ${t} Z`}}},ia=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",pptxShapeType:"rect"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:aa.ROUND_RECT,pptxShapeType:"roundRect"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:aa.CUT_RECT_SINGLE,pptxShapeType:"snip1Rect"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:aa.CUT_RECT_SAMESIDE,pptxShapeType:"snip2SameRect"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:aa.CUT_RECT_DIAGONAL,pptxShapeType:"snip2DiagRect"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:aa.CUT_ROUND_RECT,pptxShapeType:"snipRoundRect"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:aa.ROUND_RECT_SINGLE,pptxShapeType:"round1Rect"},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:aa.ROUND_RECT_SAMESIDE,pptxShapeType:"round2SameRect"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:aa.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"},{viewBox:[200,200],path:"M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z",title:"任意多边形"}]},{type:"常用形状",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",pptxShapeType:"ellipse"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:aa.TRIANGLE,pptxShapeType:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:aa.PARALLELOGRAM_LEFT,pptxShapeType:"parallelogram"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:aa.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:aa.TRAPEZOID,pptxShapeType:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z",pptxShapeType:"diamond"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:aa.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:aa.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z",pptxShapeType:"pie"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z",pptxShapeType:"chord"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z",pptxShapeType:"teardrop"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z",pptxShapeType:"pentagon"},{viewBox:[200,200],path:"M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z",pptxShapeType:"hexagon"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z",pptxShapeType:"octagon"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:aa.L},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:aa.RING_RECT},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:aa.PLUS},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:aa.MESSAGE},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:aa.ROUND_MESSAGE},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z",pptxShapeType:"star4"},{viewBox:[1024,1024],path:"M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z",pptxShapeType:"star5",special:!0},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z",pptxShapeType:"star6"},{viewBox:[200,200],path:"M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z"},{viewBox:[200,200],path:"M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z"}]},{type:"箭头",children:[{viewBox:[200,200],path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z",pptxShapeType:"upArrow"},{viewBox:[200,200],path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z",pptxShapeType:"downArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z",pptxShapeType:"leftArrow"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"rightArrow"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z",pptxShapeType:"upDownArrow"},{viewBox:[200,200],path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z",pptxShapeType:"leftRightArrow"},{viewBox:[200,200],path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"notchedRightArrow"},{viewBox:[200,200],path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z"},{viewBox:[200,200],path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z",pptxShapeType:"chevron"},{viewBox:[200,200],path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:[200,200],path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z",pptxShapeType:"homePlate"},{viewBox:[200,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",children:[{viewBox:[1024,1024],path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z",special:!0},{viewBox:[1024,1024],path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z",special:!0},{viewBox:[1024,1024],path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z",special:!0},{viewBox:[1024,1024],path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z",special:!0},{viewBox:[1024,1024],path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z",special:!0},{viewBox:[1024,1024],path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z",special:!0},{viewBox:[1024,1024],path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z",special:!0},{viewBox:[1024,1024],path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z",special:!0},{viewBox:[1024,1024],path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z",special:!0},{viewBox:[1024,1024],path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z",special:!0},{viewBox:[1024,1024],path:"M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z",special:!0},{viewBox:[1024,1024],path:"M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z",special:!0},{viewBox:[1024,1024],path:"M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z",special:!0},{viewBox:[1024,1024],path:"M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0}]}],sa={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var ra=()=>{const e=Y(),t=(0,U.debounce)((function(){e.addSnapshot()}),300,{trailing:!0}),l=(0,U.throttle)((function(){e.reDo()}),100,{leading:!0,trailing:!1}),a=(0,U.throttle)((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:a}},ua=()=>{const e=$(),t=F(),{creatingElement:l}=(0,o.Jk)(e),{theme:a,viewportRatio:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=ra(),s=(a,n)=>{t.addElement(a),e.setActiveElementIdList([a.id]),l.value&&e.setCreatingElement(null),setTimeout((()=>{e.setEditorareaFocus(!0)}),0),n&&n(),i()},u=e=>{ea(e).then((({width:t,height:l})=>{const a=l/t;ala?(t=la,l=t*a):l>la*n.value&&(l=la*n.value,t=l/a),s({type:"image",id:(0,r.x0)(10),src:e,width:t,height:l,left:(la-t)/2,top:(la*n.value-l)/2,fixedRatio:!0,rotate:0})}))},c=e=>{const t={type:"chart",id:(0,r.x0)(10),chartType:sa[e],left:300,top:81.25,width:400,height:400,rotate:0,themeColor:[a.value.themeColor],gridColor:a.value.fontColor,data:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1"],series:[[12,19,5,2,18]]}},l={..."bar"===e?{horizontalBars:!1,stackBars:!1}:{},..."horizontalBar"===e?{horizontalBars:!0,stackBars:!1}:{},..."line"===e?{showLine:!0,lineSmooth:!0,showArea:!1}:{},..."area"===e?{showLine:!0,lineSmooth:!0,showArea:!0}:{},..."scatter"===e?{showLine:!1,lineSmooth:!0,showArea:!1}:{},..."pie"===e?{donut:!1}:{},..."ring"===e?{donut:!0}:{}};s({...t,options:l})},d=(e,t)=>{const l={fontname:a.value.fontName,color:a.value.fontColor},o=[];for(let a=0;a{const{left:l,top:n,width:o,height:i}=e,u=t?.content||"",c=t?.vertical||!1,d=(0,r.x0)(10);s({type:"text",id:d,left:l,top:n,width:o,height:i,content:u,rotate:0,defaultFontName:a.value.fontName,defaultColor:a.value.fontColor,vertical:c},(()=>{setTimeout((()=>{const e=document.querySelector(`#editable-element-${d} .ProseMirror`);e&&e.focus()}),0)}))},v=(e,t)=>{const{left:l,top:n,width:o,height:i}=e,u={type:"shape",id:(0,r.x0)(10),left:l,top:n,width:o,height:i,viewBox:t.viewBox,path:t.path,fill:a.value.themeColor,fixedRatio:!1,rotate:0};if(t.special&&(u.special=!0),t.pathFormula){u.pathFormula=t.pathFormula,u.viewBox=[o,i];const e=oa[t.pathFormula];"editable"in e?(u.path=e.formula(o,i,e.defaultValue),u.keypoint=e.defaultValue):u.path=e.formula(o,i)}s(u)},m=(e,t)=>{const{left:l,top:n,start:o,end:i}=e,u={type:"line",id:(0,r.x0)(10),left:l,top:n,start:o,end:i,points:t.points,color:a.value.themeColor,style:t.style,width:2};t.isBroken&&(u.broken=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCurve&&(u.curve=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCubic&&(u.cubic=[[(o[0]+i[0])/2,(o[1]+i[1])/2],[(o[0]+i[0])/2,(o[1]+i[1])/2]]),s(u)},h=e=>{s({type:"latex",id:(0,r.x0)(10),width:e.w,height:e.h,rotate:0,left:(la-e.w)/2,top:(la*n.value-e.h)/2,path:e.path,latex:e.latex,color:a.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},f=e=>{s({type:"video",id:(0,r.x0)(10),width:500,height:300,rotate:0,left:(la-500)/2,top:(la*n.value-300)/2,src:e,autoplay:!1})},g=e=>{s({type:"audio",id:(0,r.x0)(10),width:50,height:50,rotate:0,left:(la-50)/2,top:(la*n.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:a.value.themeColor,src:e})};return{createImageElement:u,createChartElement:c,createTableElement:d,createTextElement:p,createShapeElement:v,createLineElement:m,createLatexElement:h,createVideoElement:f,createAudioElement:g}},ca=()=>{const e=$(),t=F(),{currentSlide:l,slides:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=ra(),s=a=>{const{groupIdMap:o,elIdMap:i}=be(a),s=a[0];let r,u=0;do{r=l.value.elements.find((e=>{if(e.type!==s.type)return!1;const{minX:t,maxX:l,minY:a,maxY:n}=ye(e),{minX:o,maxX:i,minY:r,maxY:c}=ye({...s,left:s.left+u,top:s.top+u});return t===o&&l===i&&a===r&&n===c})),r&&(u+=10)}while(r);for(const e of a)e.id=i[e.id],e.left=e.left+u,e.top=e.top+u,e.groupId&&(e.groupId=o[e.groupId]);t.addElement(a),e.setActiveElementIdList(Object.values(i)),n()},u=e=>{const l=ke(e),a=e.map((e=>{const{groupIdMap:t,elIdMap:a}=be(e.elements);for(const n of e.elements)n.id=a[n.id],n.groupId&&(n.groupId=t[n.groupId]),n.link&&"slide"===n.link.type&&(l[n.link.target]?n.link.target=l[n.link.target]:delete n.link);if(e.animations)for(const l of e.animations)l.id=(0,r.x0)(10),l.elId=a[l.elId];return{...e,id:l[e.id]}}));t.addSlide(a),n()},c=(0,i.Fl)((()=>!(a.value.length>1)&&!(a.value[0].elements.length>0)));return{addElementsFromData:s,addSlidesFromData:u,isEmptySlide:c}},da=()=>{const{createTextElement:e}=ua(),{addElementsFromData:t,addSlidesFromData:l}=ca(),a=t=>{e({left:0,top:0,width:600,height:50},{content:t})},n=(e,n)=>{const o=n?.onlySlide||!1,i=n?.onlyElements||!1,s=me(e);if("object"===typeof s){const{type:e,data:a}=s;"elements"!==e||o?"slides"!==e||i||l(a):t(a)}else if(!i&&!o){const e=Ql(s);a(e)}};return{pasteTextClipboardData:n}},pa=()=>{const e=$(),t=F(),{selectedSlidesIndex:l,activeElementIdList:a}=(0,o.Jk)(e),{currentSlide:n,slides:s,theme:u,slideIndex:c}=(0,o.Jk)(t),d=(0,i.Fl)((()=>[...l.value,c.value])),p=(0,i.Fl)((()=>s.value.filter(((e,t)=>d.value.includes(t))))),v=(0,i.Fl)((()=>p.value.map((e=>e.id)))),{pasteTextClipboardData:m}=da(),{addSlidesFromData:h}=ca(),{addHistorySnapshot:f}=ra(),g=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([l])},y=l=>{l===le.UP&&c.value>0?(a.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(c.value-1)):l===le.DOWN&&c.value{const t=ce(JSON.stringify({type:"slides",data:p.value}));pe(t).then((()=>{e.setThumbnailsFocus(!0)}))},x=()=>{ve().then((e=>{m(e,{onlySlide:!0})})).catch((e=>Kl.warning(e)))},k=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),f()},b=l=>{const{groupIdMap:a,elIdMap:n}=be(l.elements);for(const e of l.elements)e.id=n[e.id],e.groupId&&(e.groupId=a[e.groupId]);const o={...l,id:(0,r.x0)(10)};e.setActiveElementIdList([]),t.addSlide(o),f()},_=()=>{const e=JSON.parse(JSON.stringify(n.value));h([e])},I=(l=v.value)=>{s.value.length===l.length?g():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),f()},S=()=>{const e=[...v.value];w(),I(e)},C=()=>{const t=Array.from(Array(s.value.length),((e,t)=>t));e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},L=(e,l)=>{if(l===e)return;const a=JSON.parse(JSON.stringify(s.value)),n=a[l];a.splice(l,1),a.splice(e,0,n),t.setSlides(a),t.updateSlideIndex(e)};return{resetSlides:g,updateSlideIndex:y,copySlide:w,pasteSlide:x,createSlide:k,createSlideByTemplate:b,copyAndPasteSlide:_,deleteSlide:I,cutSlide:S,selectAllSlide:C,sortSlides:L}},va=()=>{const e=$(),t=F(),{activeElementIdList:l}=(0,o.Jk)(e),{currentSlide:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=ra(),i=()=>{const o=JSON.parse(JSON.stringify(a.value.elements));for(const e of o)l.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:o}),e.setActiveElementIdList([]),n()},s=l=>{const o=JSON.parse(JSON.stringify(a.value.elements));if(l.groupId){const a=[];for(const e of o)e.groupId===l.groupId&&(e.lock=!1,a.push(e.id));t.updateSlide({elements:o}),e.setActiveElementIdList(a)}else{for(const e of o)if(e.id===l.id){e.lock=!1;break}t.updateSlide({elements:o}),e.setActiveElementIdList([l.id])}n()};return{lockElement:i,unlockElement:s}},ma=()=>{const e=$(),t=F(),{activeElementIdList:l,activeGroupElementId:a}=(0,o.Jk)(e),{currentSlide:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=ra(),s=()=>{if(!l.value.length)return;let o=[];o=a.value?n.value.elements.filter((e=>e.id!==a.value)):n.value.elements.filter((e=>!l.value.includes(e.id))),e.setActiveElementIdList([]),t.updateSlide({elements:o}),i()},r=()=>{n.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),i())};return{deleteElement:s,deleteAllElements:r}},ha=()=>{const e=$(),t=F(),{activeElementIdList:l,activeElementList:a,handleElementId:n}=(0,o.Jk)(e),{currentSlide:s}=(0,o.Jk)(t),{addHistorySnapshot:u}=ra(),c=(0,i.Fl)((()=>{if(a.value.length<2)return!1;const e=a.value[0].groupId;if(!e)return!0;const t=a.value.every((t=>(t.groupId&&t.groupId)===e));return!t})),d=()=>{if(!a.value.length)return;let e=JSON.parse(JSON.stringify(s.value.elements));const n=(0,r.x0)(10),o=[];for(const t of e)l.value.includes(t.id)&&(t.groupId=n,o.push(t));const i=e.findIndex((e=>e.id===o[o.length-1].id)),c=o.map((e=>e.id));e=e.filter((e=>!c.includes(e.id)));const d=i-o.length+1;e.splice(d,0,...o),t.updateSlide({elements:e}),u()},p=()=>{if(!a.value.length)return;const o=a.value.some((e=>e.groupId));if(!o)return;const i=JSON.parse(JSON.stringify(s.value.elements));for(const e of i)l.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:i});const r=n.value?[n.value]:[];e.setActiveElementIdList(r),u()};return{canCombine:c,combineElements:d,uncombineElements:p}},fa=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(e),{pasteTextClipboardData:a}=da(),{deleteElement:n}=ma(),i=()=>{if(!t.value.length)return;const a=ce(JSON.stringify({type:"elements",data:l.value}));pe(a).then((()=>{e.setEditorareaFocus(!0)}))},s=()=>{i(),n()},r=()=>{ve().then((e=>{a(e)})).catch((e=>Kl.warning(e)))},u=()=>{i(),r()};return{copyElement:i,cutElement:s,pasteElement:r,quickCopyElement:u}},ga=()=>{const e=$(),{currentSlide:t}=(0,o.Jk)(F()),{hiddenElementIdList:l}=(0,o.Jk)(e),a=()=>{const a=t.value.elements.filter((e=>!e.lock&&!l.value.includes(e.id))),n=a.map((e=>e.id));e.setActiveElementIdList(n)};return{selectAllElement:a}},ya=()=>{const e=F(),{activeElementIdList:t,activeGroupElementId:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=(o,i=1)=>{let s=[];const r=e=>{let{left:t,top:l}=e;switch(o){case le.LEFT:t-=i;break;case le.RIGHT:t+=i;break;case le.UP:l-=i;break;case le.DOWN:l+=i;break;default:break}return{...e,left:t,top:l}};s=l.value?a.value.elements.map((e=>l.value===e.id?r(e):e)):a.value.elements.map((e=>t.value.includes(e.id)?r(e):e)),e.updateSlide({elements:s}),n()};return{moveElement:i}},wa=(l(541),()=>{const e=F(),{currentSlide:t}=(0,o.Jk)(e),{addHistorySnapshot:l}=ra(),a=(e,t)=>({minLevel:e.findIndex((e=>e.id===t[0].id)),maxLevel:e.findIndex((e=>e.id===t[t.length-1].id))}),n=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return;const s=l[i+1],r=l.splice(o,n.length);if(s.groupId){const e=l.filter((e=>e.groupId===s.groupId));l.splice(o+e.length,0,...r)}else l.splice(o+1,0,...r)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return;const n=l[a+1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a+e.length,0,o)}else l.splice(a+1,0,o)}return l},i=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l[o-1],s=l.splice(o,n.length);if(i.groupId){const e=l.filter((e=>e.groupId===i.groupId));l.splice(o-e.length,0,...s)}else l.splice(o-1,0,...s)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;const n=l[a-1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a-e.length,0,o)}else l.splice(a-1,0,o)}return l},s=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return null;const s=l.splice(o,n.length);l.push(...s)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return null;l.splice(a,1),l.push(t)}return l},r=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l.splice(o,n.length);l.unshift(...i)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;l.splice(a,1),l.unshift(t)}return l},u=(a,o)=>{let u;o===G.UP?u=n(t.value.elements,a):o===G.DOWN?u=i(t.value.elements,a):o===G.TOP?u=s(t.value.elements,a):o===G.BOTTOM&&(u=r(t.value.elements,a)),u&&(e.updateSlide({elements:u}),l())};return{orderElement:u}});const xa=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},ka=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},ba=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var _a=()=>{const e=J(),t=F(),l=()=>{xa(),e.setScreening(!0)},a=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),ba()&&ka()};return{enterScreening:l,enterScreeningFromStart:a,exitScreening:n}},Ia=()=>{const e=$(),{canvasPercentage:t,canvasScale:l,canvasDragged:a}=(0,o.Jk)(e),n=(0,i.Fl)((()=>Math.round(100*l.value)+"%")),s=l=>{let a=t.value;const n=5,o=200,i=30;"+"===l&&a<=o&&(a+=n),"-"===l&&a>=i&&(a-=n),e.setCanvasPercentage(a)},r=a=>{const n=Math.round(a/l.value*t.value)/100;e.setCanvasPercentage(n)},u=()=>{e.setCanvasPercentage(90),a&&e.setCanvasDragged(!1)};return{canvasScalePercentage:n,setCanvasScalePercentage:r,scaleCanvas:s,resetCanvas:u}},Sa=()=>{const e=$(),t=V(),{activeElementIdList:l,disableHotkeys:a,handleElement:n,handleElementId:s,editorAreaFocus:r,thumbnailsFocus:u,showSearchPanel:c}=(0,o.Jk)(e),{currentSlide:d}=(0,o.Jk)(F()),{ctrlKeyState:p,shiftKeyState:v,spaceKeyState:m}=(0,o.Jk)(t),{updateSlideIndex:h,copySlide:f,createSlide:g,deleteSlide:y,cutSlide:w,copyAndPasteSlide:x,selectAllSlide:k}=pa(),{combineElements:b,uncombineElements:_}=ha(),{deleteElement:I}=ma(),{lockElement:S}=va(),{copyElement:C,cutElement:L,quickCopyElement:E}=fa(),{selectAllElement:T}=ga(),{moveElement:M}=ya(),{orderElement:U}=wa(),{redo:W,undo:D}=ra(),{enterScreening:H,enterScreeningFromStart:A}=_a(),{scaleCanvas:Z,resetCanvas:O}=Ia(),R=()=>{l.value.length?C():u.value&&f()},P=()=>{l.value.length?L():u.value&&w()},z=()=>{l.value.length?E():u.value&&x()},B=()=>{r.value&&T(),u.value&&k()},N=()=>{r.value&&S()},j=()=>{r.value&&b()},Y=()=>{r.value&&_()},J=()=>{l.value.length?I():u.value&&y()},q=e=>{l.value.length?M(e):e!==le.UP&&e!==le.DOWN||h(e)},X=e=>{e===le.PAGEUP?h(le.UP):e===le.PAGEDOWN&&h(le.DOWN)},K=e=>{n.value&&U(n.value,e)},Q=()=>{u.value&&g()},ee=()=>{if(!d.value.elements.length)return;if(!s.value){const t=d.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=d.value.elements.findIndex((e=>e.id===s.value)),l=t>=d.value.elements.length-1?0:t+1,a=d.value.elements[l].id;e.setActiveElementIdList([a])},te=l=>{const{ctrlKey:n,shiftKey:o,altKey:i,metaKey:s}=l,d=n||s,m=l.key.toUpperCase();if(d&&!p.value&&t.setCtrlKeyState(!0),o&&!v.value&&t.setShiftKeyState(!0),a.value||m!==le.SPACE||t.setSpaceKeyState(!0),d&&m===le.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(o&&m===le.F5)return l.preventDefault(),H(),void t.setShiftKeyState(!1);if(m===le.F5)return l.preventDefault(),void A();if(n&&m===le.F)return l.preventDefault(),void e.setSearchPanelState(!c.value);if(r.value||u.value){if(d&&m===le.C){if(a.value)return;l.preventDefault(),R()}if(d&&m===le.X){if(a.value)return;l.preventDefault(),P()}if(d&&m===le.D){if(a.value)return;l.preventDefault(),z()}if(d&&m===le.Z){if(a.value)return;l.preventDefault(),D()}if(d&&m===le.Y){if(a.value)return;l.preventDefault(),W()}if(d&&m===le.A){if(a.value)return;l.preventDefault(),B()}if(d&&m===le.L){if(a.value)return;l.preventDefault(),N()}if(!o&&d&&m===le.G){if(a.value)return;l.preventDefault(),j()}if(o&&d&&m===le.G){if(a.value)return;l.preventDefault(),Y()}if(i&&m===le.F){if(a.value)return;l.preventDefault(),K(G.TOP)}if(i&&m===le.B){if(a.value)return;l.preventDefault(),K(G.BOTTOM)}if(m===le.DELETE||m===le.BACKSPACE){if(a.value)return;l.preventDefault(),J()}if(m===le.UP){if(a.value)return;l.preventDefault(),q(le.UP)}if(m===le.DOWN){if(a.value)return;l.preventDefault(),q(le.DOWN)}if(m===le.LEFT){if(a.value)return;l.preventDefault(),q(le.LEFT)}if(m===le.RIGHT){if(a.value)return;l.preventDefault(),q(le.RIGHT)}if(m===le.PAGEUP){if(a.value)return;l.preventDefault(),X(le.PAGEUP)}if(m===le.PAGEDOWN){if(a.value)return;l.preventDefault(),X(le.PAGEDOWN)}if(m===le.ENTER){if(a.value)return;l.preventDefault(),Q()}if(m===le.MINUS){if(a.value)return;l.preventDefault(),Z("-")}if(m===le.EQUAL){if(a.value)return;l.preventDefault(),Z("+")}if(m===le.DIGIT_0){if(a.value)return;l.preventDefault(),O()}if(m===le.TAB){if(a.value)return;l.preventDefault(),ee()}}},ae=()=>{p.value&&t.setCtrlKeyState(!1),v.value&&t.setShiftKeyState(!1),m.value&&t.setSpaceKeyState(!1)};(0,i.bv)((()=>{document.addEventListener("keydown",te),document.addEventListener("keyup",ae),window.addEventListener("blur",ae)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",te),document.removeEventListener("keyup",ae),window.removeEventListener("blur",ae)}))},Ca=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=(0,o.Jk)($()),{pasteTextClipboardData:a}=da(),{createImageElement:n}=ua(),s=e=>{ta(e).then((e=>n(e)))},r=n=>{if(!e.value&&!t.value)return;if(l.value)return;if(!n.clipboardData)return;const o=n.clipboardData.items,i=o[0];if(i){for(const e of o)if("file"===e.kind&&-1!==e.type.indexOf("image")){const t=e.getAsFile();return void(t&&s(t))}"string"===i.kind&&"text/plain"===i.type&&i.getAsString((e=>a(e)))}};(0,i.bv)((()=>{document.addEventListener("paste",r)})),(0,i.Ah)((()=>{document.removeEventListener("paste",r)}))},La=l(7536),Ea=()=>{const e=F(),{theme:t}=(0,o.Jk)(F()),{addSlidesFromData:l,isEmptySlide:a}=ca(),n=(0,s.iH)(!1),i=(t,n=!1)=>{const o=t[0],i=new FileReader;i.addEventListener("load",(()=>{try{const t=JSON.parse(de(i.result));n||a.value?e.setSlides(t):l(t)}catch{Kl.error("无法正确读取 / 解析该文件")}})),i.readAsText(o)},u=e=>{let t=[0,0],l=[0,0];return e.isFlipV||e.isFlipH?e.isFlipV&&e.isFlipH?(t=[e.width,e.height],l=[0,0]):e.isFlipV&&!e.isFlipH?(t=[0,e.height],l=[e.width,0]):(t=[e.width,0],l=[0,e.height]):(t=[0,0],l=[e.width,e.height]),{type:"line",id:(0,r.x0)(10),width:e.borderWidth||1,left:e.left,top:e.top,start:t,end:l,style:e.borderType,color:e.borderColor,points:["","straightConnector1"===e.shapType?"arrow":""]}},c=o=>{const i=o[0];if(!i)return;n.value=!0;const s=[];for(const e of ia)s.push(...e.children);const c=new FileReader;c.onload=async o=>{const i=await(0,La.Q)(o.target.result),c=i.size.width,d=la/c,p=[];for(const e of i.slides){const{type:l,value:a}=e.fill;let n;n="image"===l?{type:"image",image:a.picBase64,imageSize:"cover"}:"gradient"===l?{type:"gradient",gradientType:"linear",gradientColor:[a.colors[0],a.colors[1]],gradientRotate:a.rot}:{type:"solid",color:a};const o={id:(0,r.x0)(10),elements:[],background:n},i=e=>{for(const l of e)if(l.width=l.width*d,l.height=l.height*d,l.left=l.left*d,l.top=l.top*d,"text"===l.type)o.elements.push({type:"text",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,rotate:l.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:l.content,lineHeight:1,outline:{color:l.borderColor,width:l.borderWidth,style:l.borderType},fill:l.fillColor});else if("image"===l.type)o.elements.push({type:"image",id:(0,r.x0)(10),src:l.src,width:l.width,height:l.height,left:l.left,top:l.top,fixedRatio:!0,rotate:l.rotate});else if("shape"===l.type)if("line"===l.shapType||"straightConnector1"===l.shapType){const e=u(l);o.elements.push(e)}else{const e=s.find((e=>e.pptxShapeType===l.shapType)),a={type:"shape",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:l.fillColor||"none",fixedRatio:!1,rotate:l.rotate,outline:{color:l.borderColor,width:l.borderWidth,style:l.borderType},text:{content:l.content,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:"middle"}};if(e&&(a.path=e.path,a.viewBox=e.viewBox,e.pathFormula)){a.pathFormula=e.pathFormula,a.viewBox=[l.width,l.height];const t=oa[e.pathFormula];"editable"in t?(a.path=t.formula(l.width,l.height,t.defaultValue),a.keypoint=t.defaultValue):a.path=t.formula(l.width,l.height)}o.elements.push(a)}else if("table"===l.type){const e=l.data.length,a=l.data[0].length,n={fontname:t.value.fontName,color:t.value.fontColor},i=[];for(let t=0;te+"")),a=["系列1"],n=[l.data[1]]):(e=Object.values(l.data[0].xlabels),a=l.data.map((e=>e.key)),n=l.data.map((e=>e.values.map((e=>e.y)))));let i={},s="bar";"barChart"===l.chartType&&(s="bar"),"stackedBarChart"===l.chartType?(s="bar",i={stackBars:!0}):"lineChart"===l.chartType?s="line":"areaChart"===l.chartType?(s="line",i={showArea:!0}):"scatterChart"===l.chartType?(s="line",i={showLine:!1}):"pieChart"!==l.chartType&&"pie3DChart"!==l.chartType||(s="pie"),o.elements.push({type:"chart",id:(0,r.x0)(10),chartType:s,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,themeColor:[t.value.themeColor],gridColor:t.value.fontColor,data:{labels:e,legends:a,series:n},options:i})}else if("group"===l.type){const e=l.elements.map((e=>({...e,left:e.left+l.left,top:e.top+l.top})));i(e)}};i(e.elements),p.push(o)}a.value?e.setSlides(p):l(p),n.value=!1},c.readAsArrayBuffer(i)};return{importSpecificFile:i,importPPTXFile:c,exporting:n}};const Ta={class:"hotkey-doc"},Ma={class:"title"},Ua={class:"label"},Wa={class:"value"};var Da=(0,i.aZ)({__name:"HotkeyDoc",setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ta,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ne),(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.type},[(0,i._)("div",Ma,(0,ae.zw)(e.type),1),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"hotkey-item",key:e.label},[(0,i._)("div",Ua,(0,ae.zw)(e.label),1),(0,i._)("div",Wa,(0,ae.zw)(e.value),1)])))),128))],64)))),128))]))}});const Ha=(0,Nl.Z)(Da,[["__scopeId","data-v-a0322054"]]);var Fa=Ha;const Aa=["accept"];var Za=(0,i.aZ)({__name:"FileInput",props:{accept:{default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=(0,s.iH)(),a=()=>{l.value&&(l.value.value="",l.value.click())},n=e=>{const l=e.target.files;l&&t("change",l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"file-input",onClick:t[1]||(t[1]=e=>a())},[(0,i.WI)(e.$slots,"default"),(0,i._)("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:l,accept:e.accept,onChange:t[0]||(t[0]=e=>n(e))},null,40,Aa)]))}});const $a=(0,Nl.Z)(Za,[["__scopeId","data-v-64bedb34"]]);var Oa=$a;const Ra=e=>((0,i.dD)("data-v-a5c6b41c"),e=e(),(0,i.Cn)(),e),Pa={key:0,class:"fullscreen-spin"},za={class:"spin"},Ba=Ra((()=>(0,i._)("div",{class:"spinner"},null,-1))),Na={class:"text"};var ja=(0,i.aZ)({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{default:""}},setup(e){return(e,t)=>e.loading?((0,i.wg)(),(0,i.iD)("div",Pa,[(0,i._)("div",za,[Ba,(0,i._)("div",Na,(0,ae.zw)(e.tip),1)])])):(0,i.kq)("",!0)}});const Ya=(0,Nl.Z)(ja,[["__scopeId","data-v-a5c6b41c"]]);var Va=Ya;const Ja={class:"header"};var qa=(0,i.aZ)({__name:"Drawer",props:{visible:{type:Boolean},width:{default:320},contentStyle:{},placement:{default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(!1),o=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));return(e,s)=>{const r=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:`drawer-slide-${e.placement}`,onAfterLeave:s[1]||(s[1]=e=>a.value=!1),onBeforeEnter:s[2]||(s[2]=e=>a.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:(0,ae.C_)(["drawer",e.placement]),style:(0,ae.j5)({width:l.width+"px"})},[(0,i._)("div",Ja,[(0,i.WI)(e.$slots,"title"),(0,i._)("span",{class:"close-btn",onClick:s[0]||(s[0]=e=>t("update:visible",!1))},[(0,i.Wm)(r)])]),a.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"content",style:(0,ae.j5)(o.value)},[(0,i.WI)(e.$slots,"default")],4)):(0,i.kq)("",!0)],6),[[n.F8,e.visible]])])),_:3},8,["name"])])}}});const Xa=(0,Nl.Z)(qa,[["__scopeId","data-v-749dadac"]]);var Ga=Xa;const Ka={class:"prefix"},Qa=["disabled","value","placeholder"],en={class:"suffix"};var tn=(0,i.aZ)({__name:"Input",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{expose:t,emit:l}){const a=(0,s.iH)(!1),o=e=>{l("update:value",e.target.value)},r=e=>{a.value=!1,l("blur",e)},u=e=>{a.value=!0,l("focus",e)},c=(0,s.iH)(),d=()=>{c.value&&c.value.focus()};return t({focus:d}),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["input",{disabled:e.disabled,focused:a.value}])},[(0,i._)("span",Ka,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("input",{type:"text",ref_key:"inputRef",ref:c,disabled:e.disabled,value:e.value,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>o(e)),onFocus:t[1]||(t[1]=e=>u(e)),onBlur:t[2]||(t[2]=e=>r(e)),onChange:t[3]||(t[3]=e=>l("change",e)),onKeydown:t[4]||(t[4]=(0,n.D2)((e=>l("enter",e)),["enter"]))},null,40,Qa),(0,i._)("span",en,[(0,i.WI)(e.$slots,"suffix")])],2))}});const ln=(0,Nl.Z)(tn,[["__scopeId","data-v-a97ba0dc"]]);var an=ln,nn=l(6488),on=(l(8627),(0,i.aZ)({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(),n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(!1),u=(0,i.Fl)((()=>l.contentStyle||{}));return(0,i.YP)((()=>l.value),(()=>{a.value&&(l.value?a.value.show():a.value.hide())})),(0,i.bv)((()=>{a.value=(0,nn.ZP)(n.value,{content:o.value,allowHTML:!0,trigger:l.trigger,placement:l.placement,interactive:!0,appendTo:l.appendTo||document.body,maxWidth:"none",offset:[0,8],duration:200,animation:"scale",theme:"popover",onShow(){r.value=!0},onShown(){l.value||t("update:value",!0)},onHidden(){l.value&&t("update:value",!1),r.value=!1}})})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["popover",{center:e.center}]),ref_key:"triggerRef",ref:n},[(0,i._)("div",{class:"popover-content",style:(0,ae.j5)(u.value),ref_key:"contentRef",ref:o},[r.value?(0,i.WI)(e.$slots,"content",{key:0}):(0,i.kq)("",!0)],4),(0,i.WI)(e.$slots,"default")],2))}}));const sn=(0,Nl.Z)(on,[["__scopeId","data-v-70fabe9a"]]);var rn=sn,un=(0,i.aZ)({__name:"PopoverMenuItem",props:{center:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["popover-menu-item",{center:e.center}]),onClick:l[0]||(l[0]=e=>t("click"))},[(0,i.WI)(e.$slots,"default")],2))}});const cn=(0,Nl.Z)(un,[["__scopeId","data-v-2f137c4f"]]);var dn=cn;const pn={class:"editor-header"},vn={class:"left"},mn={class:"menu-item"},hn={class:"title"},fn=["title"],gn={class:"right"},yn={class:"group-menu-item"},wn={class:"arrow-btn"},xn={class:"github-link",href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},kn={class:"menu-item"};var bn=(0,i.aZ)({__name:"index",setup(e){const t=$(),l=F(),{title:a}=(0,o.Jk)(l),{enterScreening:n,enterScreeningFromStart:r}=_a(),{importSpecificFile:u,importPPTXFile:c,exporting:d}=Ea(),{resetSlides:p}=pa(),v=(0,s.iH)(!1),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(),g=(0,s.iH)(""),y=()=>{g.value=a.value,h.value=!0,(0,i.Y3)((()=>f.value?.focus()))},w=()=>{l.setTitle(g.value),h.value=!1},x=e=>{window.open(e),v.value=!1},k=e=>{t.setDialogForExport(e),v.value=!1};return(e,t)=>{const l=(0,i.up)("IconHamburgerButton"),o=(0,i.up)("IconPpt"),b=(0,i.up)("IconDown"),_=(0,i.up)("IconDownload"),I=(0,i.up)("IconGithub"),S=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",pn,[(0,i._)("div",vn,[(0,i.Wm)(rn,{trigger:"click",placement:"bottom-start",value:v.value,"onUpdate:value":t[7]||(t[7]=e=>v.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Oa,{accept:".pptist",onChange:t[0]||(t[0]=e=>{(0,s.SU)(u)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptist 文件")])),_:1})])),_:1}),(0,i.Wm)(Oa,{accept:"application/vnd.openxmlformats-officedocument.presentationml.presentation",onChange:t[1]||(t[1]=e=>{(0,s.SU)(c)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptx 文件(测试版)")])),_:1})])),_:1}),(0,i.Wm)(dn,{onClick:t[2]||(t[2]=e=>k("pptx"))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出文件")])),_:1}),(0,i.Wm)(dn,{onClick:t[3]||(t[3]=e=>{(0,s.SU)(p)(),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Uk)("重置幻灯片")])),_:1}),(0,i.Wm)(dn,{onClick:t[4]||(t[4]=e=>x("https://github.com/pipipi-pikachu/PPTist/issues"))},{default:(0,i.w5)((()=>[(0,i.Uk)("意见反馈")])),_:1}),(0,i.Wm)(dn,{onClick:t[5]||(t[5]=e=>x("https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md"))},{default:(0,i.w5)((()=>[(0,i.Uk)("常见问题")])),_:1}),(0,i.Wm)(dn,{onClick:t[6]||(t[6]=e=>{v.value=!1,m.value=!0})},{default:(0,i.w5)((()=>[(0,i.Uk)("快捷键")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",mn,[(0,i.Wm)(l,{class:"icon"})])])),_:1},8,["value"]),(0,i._)("div",hn,[h.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"title-input",ref_key:"titleInputRef",ref:f,value:g.value,"onUpdate:value":t[8]||(t[8]=e=>g.value=e),onBlur:t[9]||(t[9]=e=>w())},null,8,["value"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"title-text",onClick:t[10]||(t[10]=e=>y()),title:(0,s.SU)(a)},(0,ae.zw)((0,s.SU)(a)),9,fn))])]),(0,i._)("div",gn,[(0,i._)("div",yn,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[11]||(t[11]=e=>(0,s.SU)(n)())},[(0,i.Wm)(o,{class:"icon"})])),[[S,"幻灯片放映"]]),(0,i.Wm)(rn,{trigger:"click",center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:t[12]||(t[12]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从头开始")])),_:1}),(0,i.Wm)(dn,{onClick:t[13]||(t[13]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从当前页开始")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",wn,[(0,i.Wm)(b,{class:"arrow"})])])),_:1})]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[14]||(t[14]=e=>k("pptx"))},[(0,i.Wm)(_,{class:"icon"})])),[[S,"导出"]]),(0,i._)("a",xn,[(0,i._)("div",kn,[(0,i.Wm)(I,{class:"icon"})])])]),(0,i.Wm)(Ga,{width:320,visible:m.value,"onUpdate:visible":t[15]||(t[15]=e=>m.value=e),placement:"right"},{default:(0,i.w5)((()=>[(0,i.Wm)(Fa)])),_:1},8,["visible"]),(0,i.Wm)(Va,{loading:(0,s.SU)(d),tip:"正在导入..."},null,8,["loading"])])}}});const _n=(0,Nl.Z)(bn,[["__scopeId","data-v-2394d37c"]]);var In=_n;const Sn=Symbol(),Cn=Symbol(),Ln=Symbol(),En=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var Tn=e=>{const t=(0,s.iH)(0),l=(0,s.iH)(0),a=$(),{canvasPercentage:n,canvasDragged:r}=(0,o.Jk)(a),{viewportRatio:u}=(0,o.Jk)(F()),c=()=>{if(!e.value)return;const o=e.value.clientWidth,i=e.value.clientHeight;if(i/o>u.value){const e=o*(n.value/100);a.setCanvasScale(e/la),t.value=(o-e)/2,l.value=(i-e*u.value)/2}else{const e=i*(n.value/100);a.setCanvasScale(e/(la*u.value)),t.value=(o-e/u.value)/2,l.value=(i-e)/2}},d=(n,o)=>{if(!e.value)return;const i=e.value.clientWidth,s=e.value.clientHeight,r=i*(n/100),c=i*(o/100),d=s*(n/100),p=s*(o/100);s/i>u.value?a.setCanvasScale(r/la):a.setCanvasScale(d/(la*u.value)),t.value=t.value-(r-c)/2,l.value=l.value-(d-p)/2};(0,i.YP)(n,d),(0,i.YP)(u,c),(0,i.YP)(r,(()=>{r.value||c()}));const p=(0,i.Fl)((()=>({width:la,height:la*u.value,left:t.value,top:l.value}))),v=new ResizeObserver(c);(0,i.bv)((()=>{e.value&&v.observe(e.value)})),(0,i.Ah)((()=>{e.value&&v.unobserve(e.value)}));const m=e=>{let n=!0;const o=e.pageX,i=e.pageY,s=t.value,r=l.value;document.onmousemove=e=>{if(!n)return;const a=e.pageX,u=e.pageY;t.value=s+(a-o),l.value=r+(u-i)},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,a.setCanvasDragged(!0)}};return{viewportStyles:p,dragViewport:m}},Mn=(e,t)=>{const l=$(),{canvasScale:a,hiddenElementIdList:n}=(0,o.Jk)(l),i=(0,s.iH)(!1),r=(0,s.iH)(1),u=(0,s.iH)({top:0,left:0,width:0,height:0}),c=o=>{if(!t.value)return;let s=!0;const c=t.value.getBoundingClientRect(),d=5,p=o.pageX,v=o.pageY,m=(p-c.x)/a.value,h=(v-c.y)/a.value;u.value={top:h,left:m,width:0,height:0},i.value=!1,r.value=4,document.onmousemove=e=>{if(!s)return;const t=e.pageX,l=e.pageY,n=(t-p)/a.value,o=(l-v)/a.value,c=Math.abs(n),m=Math.abs(o);if(c0&&o>0?h=4:n<0&&o<0?h=2:n>0&&o<0?h=1:n<0&&o>0&&(h=3),u.value={...u.value,width:c,height:m},i.value=!0,r.value=h},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,s=!1;let t=[];for(let l=0;lo&&pi&&mo-s&&pi-c&&mo&&pi-c&&mo-s&&pi&&m{if(l.groupId){const a=t.map((e=>e.id)),n=e.value.filter((e=>e.groupId===l.groupId));return n.every((e=>a.includes(e.id)))}return!0}));const a=t.map((e=>e.id));l.setActiveElementIdList(a),i.value=!1}};return{mouseSelection:u,mouseSelectionVisible:i,mouseSelectionQuadrant:r,updateMouseSelection:c}},Un=e=>{const{disableHotkeys:t}=(0,o.Jk)($()),{createImageElement:l,createTextElement:a}=ua(),n=e=>{if(!e.dataTransfer||0===e.dataTransfer.items.length)return;const n=e.dataTransfer.items[0];if("file"===n.kind&&-1!==n.type.indexOf("image")){const e=n.getAsFile();e&&ta(e).then((e=>l(e)))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString((e=>{if(t.value)return;const l=Ql(e);a({left:0,top:0,width:600,height:50},{content:l})}))};(0,i.bv)((()=>{e.value&&e.value.addEventListener("drop",n),document.ondragleave=e=>e.preventDefault(),document.ondrop=e=>e.preventDefault(),document.ondragenter=e=>e.preventDefault(),document.ondragover=e=>e.preventDefault()})),(0,i.Ah)((()=>{e.value&&e.value.removeEventListener("drop",n),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null}))};const Wn=(e,t)=>{const l=Math.atan2(e,t),a=180/Math.PI*l;return a};var Dn=(e,t,l)=>{const a=F(),{addHistorySnapshot:n}=ra(),o=(o,i)=>{const s=!(o instanceof MouseEvent);if(s&&(!o.changedTouches||!o.changedTouches[0]))return;let r=!0,u=0;const c=i.rotate||0,d=i.left,p=i.top,v=i.width,m=i.height,h=d+v/2,f=p+m/2;if(!t.value)return;const g=t.value.getBoundingClientRect(),y=t=>{if(!r)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=(a-g.left)/l.value,s=(n-g.top)/l.value,c=o-h,d=f-s;u=Wn(c,d);const p=5;Math.abs(u)<=p?u=0:u>0&&Math.abs(u-45)<=p?u-=u-45:u<0&&Math.abs(u+45)<=p?u-=u+45:u>0&&Math.abs(u-90)<=p?u-=u-90:u<0&&Math.abs(u+90)<=p?u-=u+90:u>0&&Math.abs(u-135)<=p?u-=u-135:u<0&&Math.abs(u+135)<=p?u-=u+135:u>0&&Math.abs(u-180)<=p?u-=u-180:u<0&&Math.abs(u+180)<=p&&(u-=u+180),e.value=e.value.map((e=>i.id===e.id?{...e,rotate:u}:e))},w=()=>{r=!1,document.onmousemove=null,document.onmouseup=null,c!==u&&(a.updateSlide({elements:e.value}),n())};s?(document.ontouchmove=y,document.ontouchend=w):(document.onmousemove=y,document.onmouseup=w)};return{rotateElement:o}};const Hn={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},Fn={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20,latex:20},An=(e,t)=>{const{left:l,top:a,width:n,height:o}=e,i=Math.sqrt(Math.pow(n,2)+Math.pow(o,2))/2,s=180*Math.atan(o/n)/Math.PI,r=(180-t-s)*Math.PI/180,u=(s-t)*Math.PI/180,c=(90-t)*Math.PI/180,d=t*Math.PI/180,p=n/2,v=o/2,m=l+p,h=a+v,f={left:m+i*Math.cos(r),top:h-i*Math.sin(r)},g={left:m+v*Math.cos(c),top:h-v*Math.sin(c)},y={left:m+i*Math.cos(u),top:h-i*Math.sin(u)},w={left:m+p*Math.cos(d),top:h+p*Math.sin(d)},x={left:m-i*Math.cos(r),top:h+i*Math.sin(r)},k={left:m-v*Math.sin(d),top:h+v*Math.cos(d)},b={left:m-i*Math.cos(u),top:h+i*Math.sin(u)},_={left:m-p*Math.cos(d),top:h-p*Math.sin(d)};return{leftTopPoint:f,topPoint:g,rightTopPoint:y,rightPoint:w,rightBottomPoint:x,bottomPoint:k,leftBottomPoint:b,leftPoint:_}},Zn=(e,t)=>{const l={[ee.RIGHT_BOTTOM]:t.leftTopPoint,[ee.LEFT_BOTTOM]:t.rightTopPoint,[ee.LEFT_TOP]:t.rightBottomPoint,[ee.RIGHT_TOP]:t.leftBottomPoint,[ee.TOP]:t.bottomPoint,[ee.BOTTOM]:t.topPoint,[ee.LEFT]:t.rightPoint,[ee.RIGHT]:t.leftPoint};return l[e]};var $n,On,Rn=(e,t,l)=>{const a=$(),n=F(),{activeElementIdList:i,activeGroupElementId:s}=(0,o.Jk)(a),{viewportRatio:r}=(0,o.Jk)(n),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(V()),{addHistorySnapshot:c}=ra(),d=(o,d,p)=>{const v=!(o instanceof MouseEvent);if(v&&(!o.changedTouches||!o.changedTouches[0]))return;let m=!0;a.setScalingState(!0);const h=d.left,f=d.top,g=d.width,y=d.height,w="table"===d.type?d.cellMinHeight:0,x="rotate"in d&&d.rotate?d.rotate:0,k=Math.PI*x/180,b=u.value||"fixedRatio"in d&&d.fixedRatio,_=g/y,I=v?o.changedTouches[0].pageX:o.pageX,S=v?o.changedTouches[0].pageY:o.pageY,C=Fn[d.type]||20,L=e=>e{const a=5,n=[];let o=!1,i=!1;const s={offsetX:0,offsetY:0};if(l||0===l)for(let t=0;t{if(!m)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=a-I,i=n-S;let s=g,r=y,u=h,c=f;if(x){const e=(Math.cos(k)*o+Math.sin(k)*i)/l.value;let t=(Math.cos(k)*i-Math.sin(k)*o)/l.value;b&&(p!==ee.RIGHT_BOTTOM&&p!==ee.LEFT_TOP||(t=e/_),p!==ee.LEFT_BOTTOM&&p!==ee.RIGHT_TOP||(t=-e/_)),p===ee.RIGHT_BOTTOM?(s=L(g+e),r=L(y+t)):p===ee.LEFT_BOTTOM?(s=L(g-e),r=L(y+t),u=h-(s-g)):p===ee.LEFT_TOP?(s=L(g-e),r=L(y-t),u=h-(s-g),c=f-(r-y)):p===ee.RIGHT_TOP?(s=L(g+e),r=L(y-t),c=f-(r-y)):p===ee.TOP?(r=L(y-t),c=f-(r-y)):p===ee.BOTTOM?r=L(y+t):p===ee.LEFT?(s=L(g-e),u=h-(s-g)):p===ee.RIGHT&&(s=L(g+e));const a=An({width:s,height:r,left:u,top:c},x),n=Zn(p,a),d=n.left,v=n.top,m=d-T,w=v-M;u-=m,c-=w}else{let e=o/l.value,t=i/l.value;if(b&&(p!==ee.RIGHT_BOTTOM&&p!==ee.LEFT_TOP||(t=e/_),p!==ee.LEFT_BOTTOM&&p!==ee.RIGHT_TOP||(t=-e/_)),p===ee.RIGHT_BOTTOM){const{offsetX:l,offsetY:a}=D(h+g+e,f+y+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g+e),r=L(y+t)}else if(p===ee.LEFT_BOTTOM){const{offsetX:l,offsetY:a}=D(h+e,f+y+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g-e),r=L(y+t),u=h-(s-g)}else if(p===ee.LEFT_TOP){const{offsetX:l,offsetY:a}=D(h+e,f+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g-e),r=L(y-t),u=h-(s-g),c=f-(r-y)}else if(p===ee.RIGHT_TOP){const{offsetX:l,offsetY:a}=D(h+g+e,f+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g+e),r=L(y-t),c=f-(r-y)}else if(p===ee.LEFT){const{offsetX:t}=D(h+e,null);e-=t,s=L(g-e),u=h-(s-g)}else if(p===ee.RIGHT){const{offsetX:t}=D(h+g+e,null);e-=t,s=L(g+e)}else if(p===ee.TOP){const{offsetY:e}=D(null,f+t);t-=e,r=L(y-t),c=f-(r-y)}else if(p===ee.BOTTOM){const{offsetY:e}=D(null,f+y+t);t-=e,r=L(y+t)}}e.value=e.value.map((e=>{if(d.id!==e.id)return e;if("shape"===e.type&&"pathFormula"in e&&e.pathFormula){const t=oa[e.pathFormula];let l="";return l="editable"in t?t.formula(s,r,e.keypoint):t.formula(s,r),{...e,left:u,top:c,width:s,height:r,viewBox:[s,r],path:l}}if("table"===e.type){let t=w+(r-y)/e.data.length;return t=t<36?36:t,t===w?{...e,left:u,width:s}:{...e,left:u,top:c,width:s,height:r,cellMinHeight:t<36?36:t}}return{...e,left:u,top:c,width:s,height:r}}))},F=l=>{m=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const o=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,i=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;I===o&&S===i||(n.updateSlide({elements:e.value}),a.setScalingState(!1),c())};v?(document.ontouchmove=H,document.ontouchend=F):(document.onmousemove=H,document.onmouseup=F)},p=(t,a,o)=>{let s=!0;const{minX:r,maxX:d,minY:p,maxY:v}=a,m=d-r,h=v-p,f=m/h,g=t.pageX,y=t.pageY,w=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!s)return;const a=t.pageX,n=t.pageY,c=(a-g)/l.value;let x=(n-y)/l.value;u.value&&(o!==ee.RIGHT_BOTTOM&&o!==ee.LEFT_TOP||(x=c/f),o!==ee.LEFT_BOTTOM&&o!==ee.RIGHT_TOP||(x=-c/f));let k=r,b=d,_=p,I=v;o===ee.RIGHT_BOTTOM?(b=d+c,I=v+x):o===ee.LEFT_BOTTOM?(k=r+c,I=v+x):o===ee.LEFT_TOP?(k=r+c,_=p+x):o===ee.RIGHT_TOP?(b=d+c,_=p+x):o===ee.TOP?_=p+x:o===ee.BOTTOM?I=v+x:o===ee.LEFT?k=r+c:o===ee.RIGHT&&(b=d+c);const S=b-k,C=I-_;let L=S/m,E=C/h;L<=0&&(L=0),E<=0&&(E=0),e.value=e.value.map((e=>{if(("image"===e.type||"shape"===e.type)&&i.value.includes(e.id)){const t=w.find((t=>t.id===e.id));return{...e,width:t.width*L,height:t.height*E,left:k+(t.left-r)*L,top:_+(t.top-p)*E}}return e}))},document.onmouseup=t=>{s=!1,document.onmousemove=null,document.onmouseup=null,g===t.pageX&&y===t.pageY||(n.updateSlide({elements:e.value}),c())}};return{scaleElement:d,scaleMultiElement:p}},Pn=(e,t)=>{const l=$(),{activeElementIdList:a,activeGroupElementId:n,handleElementId:i,editorAreaFocus:s}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(o,u,c=!0)=>{if(s.value||l.setEditorareaFocus(!0),a.value.includes(u.id)){if(r.value){let t=[];if(u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=a.value.filter((e=>!l.includes(e)))}else t=a.value.filter((e=>e!==u.id));t.length>0&&l.setActiveElementIdList(t)}else if(i.value!==u.id)l.setHandleElementId(u.id);else if(n.value!==u.id){const e=o instanceof MouseEvent?o.pageX:o.changedTouches[0].pageX,t=o instanceof MouseEvent?o.pageY:o.changedTouches[0].pageY;o.target.onmouseup=a=>{const n=a.pageX,o=a.pageY;e===n&&t===o&&(l.setActiveGroupElementId(u.id),a.target.onmouseup=null)}}}else{let t=[];if(t=r.value?[...a.value,u.id]:[u.id],u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=[...t,...l]}l.setActiveElementIdList((0,U.uniq)(t)),l.setHandleElementId(u.id)}c&&t(o,u)};return{selectElement:u}},zn=(e,t,l)=>{const a=F(),{activeElementIdList:n,activeGroupElementId:i}=(0,o.Jk)($()),{shiftKeyState:s}=(0,o.Jk)(V()),{viewportRatio:r}=(0,o.Jk)(a),{addHistorySnapshot:u}=ra(),c=(o,c)=>{const d=!(o instanceof MouseEvent);if(d&&(!o.changedTouches||!o.changedTouches[0]))return;if(!n.value.includes(c.id))return;let p=!0;const v=la,m=la*r.value,h=5,f=JSON.parse(JSON.stringify(e.value)),g=f.filter((e=>n.value.includes(e.id))),y=c.left,w=c.top,x=c.width,k="height"in c&&c.height?c.height:0,b="rotate"in c&&c.rotate?c.rotate:0,_=d?o.changedTouches[0].pageX:o.pageX,I=d?o.changedTouches[0].pageY:o.pageY;let S=null;const C=c.id===i.value;let L=[],E=[];for(const t of e.value){if("line"===t.type)continue;if(C&&t.id===c.id)continue;if(!C&&n.value.includes(t.id))continue;let e,l,a,o;if("rotate"in t&&t.rotate){const{xRange:n,yRange:i}=fe({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=n[0],l=i[0],a=n[1]-n[0],o=i[1]-i[0]}else e=t.left,l=t.top,a=t.width,o=t.height;const i=e+a,s=l+o,r=l+o/2,u=e+a/2,d={value:l,range:[e,i]},p={value:s,range:[e,i]},v={value:r,range:[e,i]},m={value:e,range:[l,s]},h={value:i,range:[l,s]},f={value:u,range:[l,s]};L.push(d,p,v),E.push(m,h,f)}const T={value:0,range:[0,v]},M={value:m,range:[0,v]},U={value:m/2,range:[0,v]},W={value:0,range:[0,m]},D={value:v,range:[0,m]},H={value:v/2,range:[0,m]};L.push(T,M,U),E.push(W,D,H),L=xe(L),E=xe(E);const F=a=>{const o=a instanceof MouseEvent?a.pageX:a.changedTouches[0].pageX,i=a instanceof MouseEvent?a.pageY:a.changedTouches[0].pageY;if(!1!==S&&(S=Math.abs(_-o)Math.abs(u)&&(u=0),Math.abs(r)e.id===c.id?{...e,left:T,top:M}:e));else{const t=e.value.find((e=>e.id===c.id));if(!t)return;e.value=e.value.map((e=>n.value.includes(e.id)?e.id===c.id?{...e,left:T,top:M}:{...e,left:e.left+(T-t.left),top:e.top+(M-t.top)}:e))}},A=l=>{p=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const n=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,o=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;_===n&&I===o||(a.updateSlide({elements:e.value}),u())};d?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)};return{dragElement:c}},Bn=e=>{const t=F(),{canvasScale:l}=(0,o.Jk)($()),{addHistorySnapshot:a}=ra(),n=(n,o,i)=>{let s=!0;const r=8,u=n.pageX,c=n.pageY,d=[];for(let t=0;t{if(!s)return;const a=t.pageX,n=t.pageY,p=(a-u)/l.value,v=(n-c)/l.value;let m=o.left+o.start[0],h=o.top+o.start[1],f=o.left+o.end[0],g=o.top+o.end[1];const y=o.broken||o.curve||[0,0];let w=o.left+y[0],x=o.top+y[1];const[k,b]=o.cubic||[[0,0],[0,0]];let _=o.left+k[0],I=o.top+k[1],S=o.left+b[0],C=o.top+b[1];if(i===te.START){m+=p,h+=v,Math.abs(m-f)f&&(U[0]=T-L,W[0]=0),h>g&&(U[1]=M-E,W[1]=0),e.value=e.value.map((e=>{if(e.id===o.id){const t={...e,left:L,top:E,start:U,end:W};return i===te.START||i===te.END?(o.broken&&(t.broken=[(U[0]+W[0])/2,(U[1]+W[1])/2]),o.curve&&(t.curve=[(U[0]+W[0])/2,(U[1]+W[1])/2]),o.cubic&&(t.cubic=[[(U[0]+W[0])/2,(U[1]+W[1])/2],[(U[0]+W[0])/2,(U[1]+W[1])/2]])):i===te.C?(o.broken&&(t.broken=[w-L,x-E]),o.curve&&(t.curve=[w-L,x-E])):o.cubic&&(t.cubic=[[_-L,I-E],[S-L,C-E]]),t}return e}))},document.onmouseup=l=>{s=!1,document.onmousemove=null,document.onmouseup=null;const n=l.pageX,o=l.pageY;u===n&&c===o||(t.updateSlide({elements:e.value}),a())}};return{dragLineElement:n}},Nn=(e,t)=>{const l=F(),{addHistorySnapshot:a}=ra(),n=(n,o)=>{const i=!(n instanceof MouseEvent);if(i&&(!n.changedTouches||!n.changedTouches[0]))return;let s=!0;const r=i?n.changedTouches[0].pageX:n.pageX,u=i?n.changedTouches[0].pageY:n.pageY,c=oa[o.pathFormula];let d=null;if("editable"in c){const e=c.getBaseSize(o.width,o.height),t=e*o.keypoint,[l,a]=c.range,n=c.relative;d={baseSize:e,originPos:t,min:l,max:a,relative:n}}const p=l=>{if(!s)return;const a=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,n=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY,i=(a-r)/t.value,p=(n-u)/t.value;e.value=e.value.map((e=>{if(e.id===o.id&&d){const{baseSize:t,originPos:l,min:a,max:n,relative:o}=d,s=e;let r=0;return"left"===o&&(r=(l+i)/t),"right"===o&&(r=(l-i)/t),"center"===o&&(r=(l-2*i)/t),"top"===o&&(r=(l+p)/t),"bottom"===o&&(r=(l-p)/t),rn&&(r=n),{...e,keypoint:r,path:c.formula(s.width,s.height,r)}}return e}))},v=t=>{s=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const n=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,o=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;r===n&&u===o||(l.updateSlide({elements:e.value}),a())};i?(document.ontouchmove=p,document.ontouchend=v):(document.onmousemove=p,document.onmouseup=v)};return{moveShapeKeypoint:n}},jn=e=>{const t=$(),{canvasScale:l,creatingElement:a}=(0,o.Jk)(t),n=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value;return{left:m,top:h,width:f,height:g}},i=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value,y=[i===c?0:f,s===p?0:g],w=[r===c?0:f,u===p?0:g];return{left:m,top:h,start:y,end:w}},{createTextElement:s,createShapeElement:r,createLineElement:u}=ua(),c=e=>{if(!a.value)return;const l=a.value.type;if("text"===l){const t=n(e);t&&s(t,{vertical:a.value.vertical})}else if("shape"===l){const t=n(e);t&&r(t,a.value.data)}else if("line"===l){const t=i(e);t&&u(t,a.value.data)}t.setCreatingElement(null)};return{formatCreateSelection:n,insertElementFromCreateSelection:c}},Yn=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(e),{addHistorySnapshot:i}=ra(),s=o=>{const s=la,r=la*n.value,{minX:u,maxX:c,minY:d,maxY:p}=we(l.value),v=JSON.parse(JSON.stringify(a.value.elements));for(const e of v)if(t.value.includes(e.id)){if(o===K.CENTER){const t=d+(p-d)/2-r/2,l=u+(c-u)/2-s/2;e.top=e.top-t,e.left=e.left-l}if(o===K.TOP){const t=d-0;e.top=e.top-t}else if(o===K.VERTICAL){const t=d+(p-d)/2-r/2;e.top=e.top-t}else if(o===K.BOTTOM){const t=p-r;e.top=e.top-t}else if(o===K.LEFT){const t=u-0;e.left=e.left-t}else if(o===K.HORIZONTAL){const t=u+(c-u)/2-s/2;e.left=e.left-t}else if(o===K.RIGHT){const t=c-s;e.left=e.left-t}}e.updateSlide({elements:v}),i()};return{alignElementToCanvas:s}},Vn=e=>{const t=(0,i.Fl)((()=>{if(e.value){const{h:t,v:l,blur:a,color:n}=e.value;return`${t}px ${l}px ${a}px ${n}`}return""}));return{shadowStyle:t}},Jn=(e,t)=>{const l=(0,i.Fl)((()=>{let l="";return e.value&&t.value?l="rotateX(180deg) rotateY(180deg)":t.value?l="rotateX(180deg)":e.value&&(l="rotateY(180deg)"),l}));return{flipStyle:l}};(function(e){e["RECT"]="rect",e["ELLIPSE"]="ellipse",e["POLYGON"]="polygon"})($n||($n={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(On||(On={}));const qn={rect:{name:"矩形",type:$n.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:$n.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:$n.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L ${.2*e} ${t} L 0 ${.8*t} Z`},roundRect:{name:"圆角矩形",type:$n.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:$n.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:$n.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${.5*e} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:$n.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${.5*e} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:$n.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:"菱形",type:$n.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.5*t} L ${.5*e} ${t} L 0 ${.5*t} Z`},pentagon:{name:"五边形",type:$n.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:$n.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${.2*e} 0 L ${.8*e} 0 L ${e} ${.5*t} L ${.8*e} ${t} L ${.2*e} ${t} L 0 ${.5*t} Z`},heptagon:{name:"七边形",type:$n.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${.5*e} 0 L ${.9*e} ${.2*t} L ${e} ${.6*t} L ${.75*e} ${t} L ${.25*e} ${t} L 0 ${.6*t} L ${.1*e} ${.2*t} Z`},octagon:{name:"八边形",type:$n.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${.3*e} 0 L ${.7*e} 0 L ${e} ${.3*t} L ${e} ${.7*t} L ${.7*e} ${t} L ${.3*e} ${t} L 0 ${.7*t} L 0 ${.3*t} Z`},chevron:{name:"V形",type:$n.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} L ${.25*e} ${.5*t} L 0 0 Z`},point:{name:"点",type:$n.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:$n.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${.2*t} L ${.6*e} ${.2*t} L ${.6*e} 0 L ${e} ${.5*t} L ${.6*e} ${t} L ${.6*e} ${.8*t} L 0 ${.8*t} Z`},parallelogram:{name:"平行四边形",type:$n.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${.3*e} 0 L ${e} 0 L ${.7*e} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:$n.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${.3*e} ${t} L ${e} ${t} L ${.7*e} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:$n.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${.25*e} 0 L ${.75*e} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:$n.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${.75*e} ${t} L ${.25*e} ${t} Z`}};var Xn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return qn.rect;const t=e.value.shape||$n.RECT;return qn[t]})),l=(0,i.Fl)((()=>{if(!e.value)return{top:"0",left:"0",width:"100%",height:"100%"};const[t,l]=e.value.range,a=(l[0]-t[0])/100,n=(l[1]-t[1])/100,o=t[0]/a,i=t[1]/n;return{left:-o+"%",top:-i+"%",width:100/a+"%",height:100/n+"%"}}));return{clipShape:t,imgPosition:l}},Gn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return"";let t="";const l=Object.keys(e.value);for(const a of l)t+=`${a}(${e.value[a]}) `;return t}));return{filter:t}},Kn=e=>{const t=(0,i.Fl)((()=>e.value?.width??0)),l=(0,i.Fl)((()=>e.value?.style||"solid")),a=(0,i.Fl)((()=>e.value?.color||"#d14424")),n=(0,i.Fl)((()=>{if("dashed"!==l.value)return"0 0";const e=t.value;return e<=6?`${4.5*e} ${2*e}`:`${4*e} ${1.5*e}`}));return{outlineWidth:t,outlineStyle:l,outlineColor:a,strokeDashArray:n}};const Qn=["width","height"],eo=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var to=(0,i.aZ)({__name:"ImageRectOutline",props:{width:{},height:{},outline:{},radius:{default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,eo)],8,Qn)):(0,i.kq)("",!0)}});const lo=(0,Nl.Z)(to,[["__scopeId","data-v-35e36256"]]);var ao=lo;const no=["width","height"],oo=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var io=(0,i.aZ)({__name:"ImageEllipseOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,oo)],8,no)):(0,i.kq)("",!0)}});const so=(0,Nl.Z)(io,[["__scopeId","data-v-11836cf8"]]);var ro=so;const uo=["width","height"],co=["d","stroke","stroke-width","stroke-dasharray"];var po=(0,i.aZ)({__name:"ImagePolygonOutline",props:{width:{},height:{},createPath:{type:Function},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,co)],8,uo)):(0,i.kq)("",!0)}});const vo=(0,Nl.Z)(po,[["__scopeId","data-v-6e021ee2"]]);var mo=vo;const ho={class:"image-outline"};var fo=(0,i.aZ)({__name:"index",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:a}=Xn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ho,["rect"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(ao,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:(0,s.SU)(a).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(ro,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(mo,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:(0,s.SU)(a).createPath},null,8,["width","height","outline","createPath"])):(0,i.kq)("",!0)]))}});const go=fo;var yo=go;const wo=e=>((0,i.dD)("data-v-5984406b"),e=e(),(0,i.Cn)(),e),xo=["src"],ko=["src"],bo=["onMousedown"],_o=wo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})],-1))),Io=[_o],So=["onMousedown"],Co=wo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1))),Lo=[Co];var Eo=(0,i.aZ)({__name:"ImageClipHandler",props:{src:{},clipPath:{},width:{},height:{},top:{},left:{},rotate:{},clipData:{}},emits:["clip"],setup(e,{emit:t}){const l=e,{canvasScale:a}=(0,o.Jk)($()),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(0,s.iH)({top:"0",left:"0"}),c=(0,s.iH)(!1),d=(0,s.iH)(null),p=()=>{const[e,t]=l.clipData?l.clipData.range:[[0,0],[100,100]],a=(t[0]-e[0])/100,n=(t[1]-e[1])/100,o=e[0]/a,i=e[1]/n;return{widthScale:a,heightScale:n,left:o,top:i}},v=(0,i.Fl)((()=>{const{widthScale:e,heightScale:t,left:l,top:a}=p();return{left:-l,top:-a,width:100/e,height:100/t}})),m=(0,i.Fl)((()=>({top:v.value.top+"%",left:v.value.left+"%",width:v.value.width+"%",height:v.value.height+"%"}))),h=(0,s.iH)({top:0,left:0,width:0,height:0}),f=(0,i.Fl)((()=>{const{top:e,left:t,width:l,height:a}=h.value;return{top:e+"%",left:t+"%",width:l+"%",height:a+"%"}})),g=(0,i.Fl)((()=>{const e=v.value.width,t=v.value.height,{top:l,left:a,width:n,height:o}=h.value;return{left:100/n*-a+"%",top:100/o*-l+"%",width:e/n*100+"%",height:t/o*100+"%"}})),y=()=>{const{left:e,top:t}=p();h.value={left:e,top:t,width:100,height:100},u.value={top:-t+"%",left:-e+"%"}},w=()=>{if(c.value)return;if(!d.value)return void t("clip",null);const{left:e,top:a}=p(),n={left:(h.value.left-e)/100*l.width,top:(h.value.top-a)/100*l.height,width:(h.value.width-100)/100*l.width,height:(h.value.height-100)/100*l.height},o={range:d.value,position:n};t("clip",o)},x=e=>{const t=e.key.toUpperCase();t===le.ENTER&&w()};(0,i.bv)((()=>{y(),document.addEventListener("keydown",x)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",x)}));const k=()=>{const e={left:parseInt(g.value.left),top:parseInt(g.value.top),width:parseInt(g.value.width),height:parseInt(g.value.height)},t=100/e.width,l=100/e.height,a=[-e.left*t,-e.top*l],n=[100*t+a[0],100*l+a[1]];d.value=[a,n]},b=e=>{c.value=!0;let t=!0;const n=e.pageX,o=e.pageY,i=v.value,s={...h.value};document.onmousemove=e=>{if(!t)return;const r=e.pageX,u=e.pageY;let c=(r-n)/a.value/l.width*100,d=(u-o)/a.value/l.height*100;l.rotate>45&&l.rotate<135&&(c=(u-o)/a.value/l.width*100,d=-(r-n)/a.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(c=-c,d=-d),l.rotate>-135&&l.rotate<-45&&(c=-(u-o)/a.value/l.width*100,d=(r-n)/a.value/l.height*100);let p=s.left+c,v=s.top+d;p<0?p=0:p+s.width>i.width&&(p=i.width-s.width),v<0?v=0:v+s.height>i.height&&(v=i.height-s.height),h.value={...h.value,left:p,top:v}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,k(),setTimeout((()=>{c.value=!1}),0)}},_=(e,t)=>{c.value=!0;let n=!0;const o=50/l.width*100,i=50/l.height*100,s=e.pageX,u=e.pageY,d=v.value,p={...h.value},m=h.value.width/h.value.height;document.onmousemove=e=>{if(!n)return;const c=e.pageX,v=e.pageY;let f,g,y,w,x=(c-s)/a.value/l.width*100,k=(v-u)/a.value/l.height*100;l.rotate>45&&l.rotate<135&&(x=(v-u)/a.value/l.width*100,k=-(c-s)/a.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(x=-x,k=-k),l.rotate>-135&&l.rotate<-45&&(x=-(v-u)/a.value/l.width*100,k=(c-s)/a.value/l.height*100),r.value&&(t!==ee.RIGHT_BOTTOM&&t!==ee.LEFT_TOP||(k=x/m),t!==ee.LEFT_BOTTOM&&t!==ee.RIGHT_TOP||(k=-x/m)),t===ee.LEFT_TOP?(p.left+x<0&&(x=-p.left),p.top+k<0&&(k=-p.top),p.width-xd.width&&(x=d.width-(p.left+p.width)),p.top+k<0&&(k=-p.top),p.width+xd.height&&(k=d.height-(p.top+p.height)),p.width-xd.width&&(x=d.width-(p.left+p.width)),p.top+p.height+k>d.height&&(k=d.height-(p.top+p.height)),p.width+xd.height&&(k=d.height-(p.top+p.height)),p.height+kd.width&&(x=d.width-(p.left+p.width)),p.width+x{n=!1,document.onmousemove=null,document.onmouseup=null,k(),setTimeout((()=>c.value=!1),0)}},I=(0,i.Fl)((()=>{const e="rotate-",t=l.rotate;return t>-22.5&&t<=22.5?e+0:t>22.5&&t<=67.5?e+45:t>67.5&&t<=112.5?e+90:t>112.5&&t<=157.5?e+135:t>157.5||t<=-157.5?e+0:t>-157.5&&t<=-112.5?e+45:t>-112.5&&t<=-67.5?e+90:t>-67.5&&t<=-22.5?e+135:e+0})),S=[ee.LEFT_TOP,ee.RIGHT_TOP,ee.LEFT_BOTTOM,ee.RIGHT_BOTTOM],C=[ee.TOP,ee.BOTTOM,ee.LEFT,ee.RIGHT];return(e,t)=>{const l=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"image-clip-handler",style:(0,ae.j5)(u.value)},[(0,i._)("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:(0,ae.j5)(m.value)},null,12,xo),(0,i._)("div",{class:"top-image-content",style:(0,ae.j5)({...f.value,clipPath:e.clipPath})},[(0,i._)("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:(0,ae.j5)(g.value)},null,12,ko)],4),(0,i._)("div",{class:"operate",style:(0,ae.j5)(f.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>b(e)),["stop"]))},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(S,(e=>(0,i._)("div",{class:(0,ae.C_)(["clip-point",e,I.value]),key:e,onMousedown:(0,n.iM)((t=>_(t,e)),["stop"])},Io,42,bo))),64)),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,ae.C_)(["clip-point",e,I.value]),key:e,onMousedown:(0,n.iM)((t=>_(t,e)),["stop"])},Lo,42,So))),64))],36)],4)),[[l,w]])}}});const To=(0,Nl.Z)(Eo,[["__scopeId","data-v-5984406b"]]);var Mo=To;const Uo=["src"];var Wo=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{clipingImageElementId:r}=(0,o.Jk)(l),u=(0,i.Fl)((()=>r.value===t.elementInfo.id)),{addHistorySnapshot:c}=ra(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Vn(d),v=(0,i.Fl)((()=>t.elementInfo.flipH)),m=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:h}=Jn(v,m),f=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:g,imgPosition:y}=Xn(f),w=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:x}=Gn(w),k=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},b=e=>{if(l.setClipingImageElementId(""),!e)return;const{range:n,position:o}=e,i=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},s=t.elementInfo.left+o.left,r=t.elementInfo.top+o.top,u=t.elementInfo.width+o.width,d=t.elementInfo.height+o.height;let p=0,v=0;if(t.elementInfo.rotate){const e=s+u/2-(t.elementInfo.left+t.elementInfo.width/2),l=-(r+d/2-(t.elementInfo.top+t.elementInfo.height/2)),a=-t.elementInfo.rotate*Math.PI/180,n=e*Math.cos(a)-l*Math.sin(a),o=e*Math.sin(a)+l*Math.cos(a);p=n-e,v=-(o-l)}const m={clip:{...i,range:n},left:s+p,top:r+v,width:u,height:d};a.updateElement({id:t.elementInfo.id,props:m}),c()};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-image",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[u.value?((0,i.wg)(),(0,i.j4)(Mo,{key:0,src:e.elementInfo.src,clipData:e.elementInfo.clip,width:e.elementInfo.width,height:e.elementInfo.height,top:e.elementInfo.top,left:e.elementInfo.left,rotate:e.elementInfo.rotate,clipPath:(0,s.SU)(g).style,onClip:t[0]||(t[0]=e=>b(e))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:1,class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(p)?`drop-shadow(${(0,s.SU)(p)})`:"",transform:(0,s.SU)(h)}),onMousedown:t[2]||(t[2]=e=>k(e)),onTouchstart:t[3]||(t[3]=e=>k(e))},[(0,i.Wm)(yo,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,ae.j5)({clipPath:(0,s.SU)(g).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,ae.j5)({top:(0,s.SU)(y).top,left:(0,s.SU)(y).left,width:(0,s.SU)(y).width,height:(0,s.SU)(y).height,filter:(0,s.SU)(x)}),onDragstart:t[1]||(t[1]=(0,n.iM)((()=>{}),["prevent"])),alt:""},null,44,Uo),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,ae.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],36)),[[l,e.contextmenus]])],4)],6)}}});const Do=(0,Nl.Z)(Wo,[["__scopeId","data-v-1156b3e1"]]);var Ho=Do;const Fo=["width","height"],Ao=["d","stroke","stroke-width","stroke-dasharray"];var Zo=(0,i.aZ)({__name:"ElementOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,Ao)],8,Fo)):(0,i.kq)("",!0)}});const $o=(0,Nl.Z)(Zo,[["__scopeId","data-v-efb76626"]]);var Oo=$o,Ro=l(2376),Po=l(4348),zo=l(2806),Bo=l(728),No=l(8463),jo=l(4251),Yo=l(915),Vo=l(3833),Jo=l(6912);const qo=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",u.MI),l("Alt-ArrowDown",u.Ig),l("Mod-z",No.Yw),l("Mod-y",No.KX),l("Backspace",Jo.dU),l("Escape",u.N0),l("Mod-b",(0,u.w9)(e.marks.strong)),l("Mod-i",(0,u.w9)(e.marks.em)),l("Mod-u",(0,u.w9)(e.marks.underline)),l("Mod-d",(0,u.w9)(e.marks.strikethrough)),l("Mod-e",(0,u.w9)(e.marks.code)),l("Mod-;",(0,u.w9)(e.marks.superscript)),l("Mod-'",(0,u.w9)(e.marks.subscript)),l("Enter",(0,u.QF)((0,Vo.s6)(e.nodes.list_item),u.QK,u.mD,u.X0,u.$j)),l("Mod-[",(0,Vo.IB)(e.nodes.list_item)),l("Mod-]",(0,Vo.bw)(e.nodes.list_item)),l("Tab",(0,Vo.bw)(e.nodes.list_item)),t},Xo=e=>(0,Jo.S0)(/^\s*>\s$/,e),Go=e=>(0,Jo.S0)(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),Ko=e=>(0,Jo.S0)(/^\s*([-+*])\s$/,e),Qo=()=>{const e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new Jo.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(`${t[2]} `,l,a),i=n.marks.code.create();return o.addMark(l,l+t[2].length,i)}))},ei=()=>{const e=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new Jo.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(t[0],l,a),i=n.marks.link.create({href:t[0],title:t[0]});return o.addMark(l,l+t[0].length,i)}))},ti=e=>{const t=[...Jo.yR,Jo.LH,Jo.pR];return t.push(Xo(e.nodes.blockquote)),t.push(Go(e.nodes.ordered_list)),t.push(Ko(e.nodes.bullet_list)),t.push(Qo()),t.push(ei()),(0,Jo.Hw)({rules:t})},li=e=>"paragraph"===e.type.name&&2===e.nodeSize,ai=e=>new Ro.Sy({props:{decorations(t){const{$from:l}=t.selection;if(li(l.parent)){const a=Po.p.node(l.before(),l.after(),{"data-placeholder":e});return Po.EH.create(t.doc,[a])}}}}),ni=(e,t)=>{const l=t?.placeholder,a=[ti(e),(0,Bo.h)(qo(e)),(0,Bo.h)(u.YR),(0,jo.q)(),(0,Yo.d)(),(0,No.m8)()];return l&&a.push(ai(l)),a};var oi=l(4073);const ii={attrs:{order:{default:1},listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const t=(e.hasAttribute("start")?e.getAttribute("start"):1)||1,l={order:+t},{listStyleType:a}=e.style;return a&&(l["listStyleType"]=a),l}}],toDOM:e=>{const{order:t,listStyleType:l}=e.attrs;let a="";l&&(a+=`list-style-type: ${l};`);const n={style:a};return 1!==t&&(n["start"]=t),["ol",n,0]}},si={attrs:{listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const{listStyleType:t}=e.style;return t?{listStyleType:t}:{}}}],toDOM:e=>{const{listStyleType:t}=e.attrs;let l="";return t&&(l+=`list-style-type: ${t};`),["ul",{style:l},0]}},ri={...Vo.qb,content:"paragraph block*",group:"block"},ui={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t,textIndent:l}=e.style;let a=e.getAttribute("align")||t||"";a=/(left|right|center|justify)/.test(a)?a:"";let n=0;l&&(/em/.test(l)?n=parseInt(l):/px/.test(l)&&(n=Math.floor(parseInt(l)/20),n||(n=1)));const o=+(e.getAttribute("data-indent")||0);return{align:a,indent:o,textIndent:n}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:l,textIndent:a}=e.attrs;let n="";t&&"left"!==t&&(n+=`text-align: ${t};`),a&&(n+=`text-indent: ${20*a}px;`);const o={style:n};return l&&(o["data-indent"]=l),["p",o,0]}},{doc:ci,blockquote:di,text:pi}=oi.nodes;var vi={doc:ci,paragraph:ui,blockquote:di,text:pi,ordered_list:ii,bullet_list:si,list_item:ri};const mi={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},hi={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},fi={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e&&null},{style:"text-decoration-line",getAttrs:e=>"line-through"===e&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},gi={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e&&null},{style:"text-decoration-line",getAttrs:e=>"underline"===e&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},yi={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let l="";return t&&(l+=`color: ${t};`),["span",{style:l},0]}},wi={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let l="";return t&&(l+=`background-color: ${t};`),["span",{style:l},0]}},xi={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let l="";return t&&(l+=`font-size: ${t};`),["span",{style:l},0]}},ki={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&"string"===typeof e?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let l="";return t&&(l+=`font-family: ${t};`),["span",{style:l},0]}},bi={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),l=e.getAttribute("title");return{href:t,title:l}}}],toDOM:e=>["a",e.attrs,0]},_i={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:e=>{const t=e.dataset.index;return{index:t}}}],toDOM:e=>["mark",{"data-index":e.attrs.index},0]},{em:Ii,strong:Si,code:Ci}=oi.marks;var Li={em:Ii,strong:Si,fontsize:xi,fontname:ki,code:Ci,forecolor:yi,backcolor:wi,subscript:mi,superscript:hi,strikethrough:fi,underline:gi,link:bi,mark:_i};const Ei=vi,Ti=Li,Mi=new zo.V_({nodes:Ei,marks:Ti}),Ui=e=>{const t=`
${e}
`,l=new window.DOMParser,a=l.parseFromString(t,"text/html").body.firstElementChild;return zo.aw.fromSchema(Mi).parse(a)},Wi=(e,t,l,a)=>new Po.tk(e,{state:Ro.yy.create({doc:Ui(t),plugins:ni(Mi,a)}),...l});var Di,Hi=l(9391);(function(e){e["RICH_TEXT_COMMAND"]="RICH_TEXT_COMMAND",e["OPEN_CHART_DATA_EDITOR"]="OPEN_CHART_DATA_EDITOR",e["OPEN_LATEX_EDITOR"]="OPEN_LATEX_EDITOR"})(Di||(Di={}));const Fi=(0,Hi.Z)();var Ai=Fi;const Zi=(e,t,l)=>{const{selection:a,doc:n}=e;if(!a||!n)return e;const{from:o,to:i}=a,{nodes:s}=t,r=s.blockquote,u=s.list_item,c=s.paragraph,d=[];l=l||"";const p=new Set([r,u,c]);return n.nodesBetween(o,i,((e,t)=>{const a=e.type,n=e.attrs.align||"";return n!==l&&p.has(a)&&d.push({node:e,pos:t,nodeType:a}),!0})),d.length?(d.forEach((t=>{const{node:a,pos:n,nodeType:o}=t;let{attrs:i}=a;i=l?{...i,align:l}:{...i,align:null},e=e.setNodeMarkup(n,o,i,a.marks)})),e):e},$i=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Zi(l.tr.setSelection(n),a,t);e.dispatch(o)},Oi=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,Ri=(e,t,l)=>(a,n)=>{const{schema:o,selection:i}=a,{$from:s,$to:r}=i,u=s.blockRange(r);if(!u)return!1;const c=h((e=>Oi(e,o)))(i);if(u.depth>=1&&c&&u.depth-c.depth<=1){if(c.node.type===e&&!l)return(0,Vo.IB)(t)(a,n);if(Oi(c.node,o)&&e.validContent(c.node.content)){const{tr:t}=a;if(l){const a={...c.node.attrs,listStyleType:l};t.setNodeMarkup(c.pos,e,a)}else t.setNodeMarkup(c.pos,e);return n&&n(t),!1}}return l?(0,Vo.KI)(e,{listStyleType:l})(a,n):(0,Vo.KI)(e)(a,n)};function Pi(e,t,l,a){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const o=0,i=8;let s=(n.attrs[a]||0)+l;if(si&&(s=i),s===n.attrs[a])return e;const r={...n.attrs,[a]:s};return e.setNodeMarkup(t,n.type,r,n.marks)}const zi=(e,t,l,a)=>{const{selection:n,doc:o}=e;if(!n||!o)return e;if(!(n instanceof Ro.Bs||n instanceof Ro.C1))return e;const{from:i,to:s}=n;return o.nodesBetween(i,s,((n,o)=>{const i=n.type;return"paragraph"===i.name||"blockquote"===i.name?(e=Pi(e,o,l,a),!1):!Oi(n,t)})),e},Bi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=zi(l.tr.setSelection(n),a,t,"indent");return!!o.docChanged&&(e.dispatch(o),!0)},Ni=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=zi(l.tr.setSelection(n),a,t,"textIndent");return!!o.docChanged&&(e.dispatch(o),!0)};var ji=(0,i.aZ)({__name:"ProsemirrorEditor",props:{elementId:{},defaultColor:{},defaultFontName:{},value:{},editable:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:l}){const a=e,n=$(),{handleElementId:r,textFormatPainter:v}=(0,o.Jk)(n),m=(0,s.iH)();let h;const f=(0,U.debounce)((function(){l("update",h.dom.innerHTML)}),300,{trailing:!0}),y=()=>{n.setDisableHotkeysState(!0),l("focus")},w=()=>{n.setDisableHotkeysState(!1),l("blur")},x=(0,U.debounce)((function(){const e=I(h,{color:a.defaultColor,fontname:a.defaultFontName});n.setRichtextAttrs(e)}),30,{trailing:!0}),b=()=>{f(),x()},_=(0,i.Fl)((()=>a.value));(0,i.YP)(_,(()=>{if(!h)return;if(h.hasFocus())return;const{doc:e,tr:t}=h.state;h.dispatch(t.replaceRangeWith(0,e.content.size,Ui(_.value)))})),(0,i.YP)((()=>a.editable),(()=>{h.setProps({editable:()=>a.editable})}));const C=()=>h.focus();t({focus:C});const L=({target:e,action:t})=>{if(!e&&r.value!==a.elementId)return;if(e&&e!==a.elementId)return;const l="command"in t?[t]:t;for(const a of l)if("fontname"===a.command&&a.value){const e=h.state.schema.marks.fontname.create({fontname:a.value});c(h),d(h,e)}else if("fontsize"===a.command&&a.value){const e=h.state.schema.marks.fontsize.create({fontsize:a.value});c(h),d(h,e)}else if("fontsize-add"===a.command){const e=a.value?+a.value:2;c(h);const t=S(h)+e+"px",l=h.state.schema.marks.fontsize.create({fontsize:t});d(h,l)}else if("fontsize-reduce"===a.command){const e=a.value?+a.value:2;c(h);let t=S(h)-e;t<12&&(t=12);const l=h.state.schema.marks.fontsize.create({fontsize:t+"px"});d(h,l)}else if("color"===a.command&&a.value){const e=h.state.schema.marks.forecolor.create({color:a.value});c(h),d(h,e)}else if("backcolor"===a.command&&a.value){const e=h.state.schema.marks.backcolor.create({backcolor:a.value});c(h),d(h,e)}else if("bold"===a.command)c(h),(0,u.w9)(h.state.schema.marks.strong)(h.state,h.dispatch);else if("em"===a.command)c(h),(0,u.w9)(h.state.schema.marks.em)(h.state,h.dispatch);else if("underline"===a.command)c(h),(0,u.w9)(h.state.schema.marks.underline)(h.state,h.dispatch);else if("strikethrough"===a.command)c(h),(0,u.w9)(h.state.schema.marks.strikethrough)(h.state,h.dispatch);else if("subscript"===a.command)(0,u.w9)(h.state.schema.marks.subscript)(h.state,h.dispatch);else if("superscript"===a.command)(0,u.w9)(h.state.schema.marks.superscript)(h.state,h.dispatch);else if("blockquote"===a.command){const e=g("blockquote",h.state);e?(0,u.xb)(h.state,h.dispatch):(0,u.ym)(h.state.schema.nodes.blockquote)(h.state,h.dispatch)}else if("code"===a.command)(0,u.w9)(h.state.schema.marks.code)(h.state,h.dispatch);else if("align"===a.command&&a.value)$i(h,a.value);else if("indent"===a.command&&a.value)Bi(h,+a.value);else if("textIndent"===a.command&&a.value)Ni(h,+a.value);else if("bulletList"===a.command){const e=a.value||"",{bullet_list:t,list_item:l}=h.state.schema.nodes;Ri(t,l,e)(h.state,h.dispatch)}else if("orderedList"===a.command){const e=a.value||"",{ordered_list:t,list_item:l}=h.state.schema.nodes;Ri(t,l,e)(h.state,h.dispatch)}else if("clear"===a.command){c(h);const{$from:e,$to:t}=h.state.selection;h.dispatch(h.state.tr.removeMark(e.pos,t.pos))}else if("link"===a.command){const e=h.state.schema.marks.link,{from:t,to:l}=h.state.selection,n=p(h.state.doc,t,l,e);if(n)if(a.value){const e=h.state.schema.marks.link.create({href:a.value,title:a.value});d(h,e,{from:n.from.pos,to:n.to.pos+1})}else h.dispatch(h.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(k(h.state,e))if(a.value){const e=h.state.schema.marks.link.create({href:a.value,title:a.value});d(h,e)}else(0,u.w9)(e)(h.state,h.dispatch);else a.value&&(c(h),(0,u.w9)(e,{href:a.value,title:a.value})(h.state,h.dispatch))}else"insert"===a.command&&a.value&&h.dispatch(h.state.tr.insertText(a.value));h.focus(),f(),x()},E=()=>{if(!v.value)return;const{keep:e,...t}=v.value,l=[{command:"clear"}];for(const a of Object.keys(t)){const e=a,t=v.value[a];!0===t?l.push({command:e}):t&&l.push({command:e,value:t})}L({action:l}),e||n.setTextFormatPainter(null)};return(0,i.bv)((()=>{h=Wi(m.value,_.value,{handleDOMEvents:{focus:y,blur:w,keydown:b,click:x,mouseup:E},editable:()=>a.editable}),a.autoFocus&&h.focus()})),(0,i.Ah)((()=>{h&&h.destroy()})),Ai.on(Di.RICH_TEXT_COMMAND,L),(0,i.Ah)((()=>{Ai.off(Di.RICH_TEXT_COMMAND,L)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["prosemirror-editor",{"format-painter":(0,s.SU)(v)}]),ref_key:"editorViewRef",ref:m,onMousedown:t[0]||(t[0]=e=>l("mousedown",e))},null,34))}});const Yi=(0,Nl.Z)(ji,[["__scopeId","data-v-3608adca"]]);var Vi=Yi;const Ji=e=>((0,i.dD)("data-v-2a1e49ba"),e=e(),(0,i.Cn)(),e),qi=Ji((()=>(0,i._)("div",{class:"drag-handler top"},null,-1))),Xi=Ji((()=>(0,i._)("div",{class:"drag-handler bottom"},null,-1)));var Gi=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{handleElementId:n,isScaling:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=ra(),c=(0,s.iH)(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Vn(d),v=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},m=(0,s.iH)(-1),h=(0,s.iH)(-1);(0,i.YP)(r,(()=>{n.value===t.elementInfo.id&&(r.value||(t.elementInfo.vertical||-1===m.value||(a.updateElement({id:t.elementInfo.id,props:{height:m.value}}),m.value=-1),t.elementInfo.vertical&&-1!==h.value&&(a.updateElement({id:t.elementInfo.id,props:{width:h.value}}),h.value=-1)))}));const f=e=>{const l=e[0].contentRect;if(!c.value)return;const n=l.height+20,o=l.width+20;t.elementInfo.vertical||t.elementInfo.height===n||(r.value?m.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(r.value?h.value=o:a.updateElement({id:t.elementInfo.id,props:{width:o}}))},g=new ResizeObserver(f);(0,i.bv)((()=>{c.value&&g.observe(c.value)})),(0,i.Ah)((()=>{c.value&&g.unobserve(c.value)}));const y=e=>{a.updateElement({id:t.elementInfo.id,props:{content:e}}),u()},w=(0,U.debounce)((function(){const e=t.elementInfo.content.replaceAll(/<[^>]+>/g,"");e||a.deleteElement(t.elementInfo.id)}),300,{trailing:!0}),x=(0,i.Fl)((()=>n.value===t.elementInfo.id));return(0,i.YP)(x,(()=>{x.value||w()})),(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-text",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",ref_key:"elementRef",ref:c,style:(0,ae.j5)({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,s.SU)(p),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"}),onMousedown:t[2]||(t[2]=e=>v(e)),onTouchstart:t[3]||(t[3]=e=>v(e))},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Vi,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:(0,ae.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),onUpdate:t[0]||(t[0]=e=>y(e)),onMousedown:t[1]||(t[1]=e=>v(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),qi,Xi],36)),[[l,e.contextmenus]])],4)],6)}}});const Ki=(0,Nl.Z)(Gi,[["__scopeId","data-v-2a1e49ba"]]);var Qi=Ki;const es=["id","gradientTransform"],ts=["stop-color"],ls=["stop-color"],as=["id"],ns=["stop-color"],os=["stop-color"];var is=(0,i.aZ)({__name:"GradientDefs",props:{id:{},type:{},color1:{},color2:{},rotate:{default:0}},setup(e){return(e,t)=>"linear"===e.type?((0,i.wg)(),(0,i.iD)("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ts),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,ls)],8,es)):((0,i.wg)(),(0,i.iD)("radialGradient",{key:1,id:e.id},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ns),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,os)],8,as))}});const ss=is;var rs=ss;const us=["width","height"],cs={key:0},ds=["transform"],ps=["d","fill","stroke","stroke-width","stroke-dasharray"];var vs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{handleElementId:n,shapeFormatPainter:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=ra(),c=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},d=()=>{if(!r.value)return;const{keep:e,...n}=r.value;a.updateElement({id:t.elementInfo.id,props:n}),u(),e||l.setShapeFormatPainter(null)},p=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:v,outlineColor:m,strokeDashArray:h}=Kn(p),f=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:g}=Vn(f),y=(0,i.Fl)((()=>t.elementInfo.flipH)),w=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:x}=Jn(y,w),k=(0,s.iH)(!1);(0,i.YP)(n,(()=>{n.value!==t.elementInfo.id&&k.value&&(k.value=!1)}));const b=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e})),_=e=>{const l={...b.value,content:e};a.updateElement({id:t.elementInfo.id,props:{text:l}}),u()},I=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(a.removeElementProps({id:t.elementInfo.id,propName:"text"}),u())},S=(0,s.iH)(),C=()=>{k.value=!0,(0,i.Y3)((()=>S.value&&S.value.focus()))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-shape",{lock:e.elementInfo.lock,"format-painter":(0,s.SU)(r)}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,ae.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(g)?`drop-shadow(${(0,s.SU)(g)})`:"",transform:(0,s.SU)(x),color:b.value.defaultColor,fontFamily:b.value.defaultFontName}),onMousedown:t[3]||(t[3]=e=>c(e)),onMouseup:t[4]||(t[4]=e=>d()),onTouchstart:t[5]||(t[5]=e=>c(e)),onDblclick:t[6]||(t[6]=e=>C())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",cs,[(0,i.Wm)(rs,{id:`editabel-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#editabel-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(m),"stroke-width":(0,s.SU)(v),"stroke-dasharray":(0,s.SU)(h)},null,8,ps)],8,ds)],8,us)),(0,i._)("div",{class:(0,ae.C_)(["shape-text",[b.value.align,{editable:k.value||b.value.content}]])},[k.value||b.value.content?((0,i.wg)(),(0,i.j4)(Vi,{key:0,ref_key:"prosemirrorEditorRef",ref:S,elementId:e.elementInfo.id,defaultColor:b.value.defaultColor,defaultFontName:b.value.defaultFontName,editable:!e.elementInfo.lock,value:b.value.content,onUpdate:t[0]||(t[0]=e=>_(e)),onBlur:t[1]||(t[1]=e=>I()),onMousedown:t[2]||(t[2]=e=>c(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):(0,i.kq)("",!0)],2)],36)),[[l,e.contextmenus]])],4)],6)}}});const ms=(0,Nl.Z)(vs,[["__scopeId","data-v-5d988de2"]]);var hs=ms;const fs=["id","markerWidth","markerHeight","refX","refY"],gs=["d","fill","transform"];var ys=(0,i.aZ)({__name:"LinePointMarker",props:{id:{},position:{},type:{},baseSize:{},color:{}},setup(e){const t=e,l={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},a={"arrow-start":180,"arrow-end":0},n=(0,i.Fl)((()=>l[t.type])),o=(0,i.Fl)((()=>a[`${t.type}-${t.position}`]||0)),s=(0,i.Fl)((()=>t.baseSize<2?2:t.baseSize));return(e,t)=>((0,i.wg)(),(0,i.iD)("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*s.value,markerHeight:3*s.value,refX:1.5*s.value,refY:1.5*s.value},[(0,i._)("path",{d:n.value,fill:e.color,transform:`scale(${.3*s.value}, ${.3*s.value}) rotate(${o.value}, 5, 5)`},null,8,gs)],8,fs))}});const ws=ys;var xs=ws;const ks=["width","height"],bs=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],_s=["d"];var Is=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:n}=Vn(a),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),r=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),u=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),c=(0,i.Fl)((()=>Ie(t.elementInfo)));return(e,t)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(n)?`drop-shadow(${(0,s.SU)(n)})`:""}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e))},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:o.value,height:r.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(xs,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(xs,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-point",d:c.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":u.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,bs),(0,i.wy)((0,i._)("path",{class:"line-path",d:c.value,stroke:"transparent","stroke-width":"20",fill:"none"},null,8,_s),[[a,e.contextmenus]])],8,ks))],36)],6)}}});const Ss=(0,Nl.Z)(Is,[["__scopeId","data-v-16512454"]]);var Cs=Ss,Ls=l(7678),Es=(l(4991),(0,i.aZ)({__name:"Chart",props:{width:{},height:{},type:{},data:{},themeColor:{},legends:{},options:{},gridColor:{},legend:{}},setup(e){const t=e,l=(0,s.iH)(),a=(0,i.f3)(Sn)||(0,s.iH)(1);let n;const o=(0,i.Fl)((()=>t.legend?t.height-20:t.height)),r=()=>({...t.data,series:t.data.series[0]}),u=()=>{const e=t.options||{};return{...e,width:t.width*a.value,height:o.value*a.value}},c=()=>{if(!l.value)return;const e=u();"bar"===t.type&&(n=new Ls.vz(l.value,t.data,e)),"line"===t.type&&(n=new Ls.wW(l.value,t.data,e)),"pie"===t.type&&(n=new Ls.uc(l.value,r(),e))},d=()=>{if(!n)return void c();const e=u(),l="pie"===t.type?r():t.data;n.update(l,e)};(0,i.YP)([()=>t.width,()=>t.height,()=>t.data,()=>t.options,a],d),(0,i.bv)(c);const p=(0,i.Fl)((()=>{let e=[];if(t.themeColor.length>=10)e=t.themeColor;else if(1===t.themeColor.length)e=(0,M.Z)(t.themeColor[0]).analogous(10).map((e=>e.toRgbString()));else{const l=t.themeColor.length,a=(0,M.Z)(t.themeColor[l-1]).analogous(11-l).map((e=>e.toRgbString()));e=[...t.themeColor.slice(0,l-1),...a]}return e})),v=()=>{if(l.value)for(let e=0;e<10;e++)l.value.style.setProperty(`--theme-color-${e+1}`,p.value[e])};(0,i.YP)(p,v),(0,i.bv)(v);const m=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return(0,i.YP)((()=>t.gridColor),m),(0,i.bv)(m),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"chart",style:(0,ae.j5)({flexDirection:"top"===e.legend?"column-reverse":"column"})},[(0,i._)("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:(0,ae.j5)({width:e.width+"px",height:o.value+"px",transform:`scale(${1/(0,s.SU)(a)})`})},null,4),e.legend?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"legends",style:(0,ae.j5)({transform:`scale(${1/(0,s.SU)(a)})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.legends,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"legend",key:l,style:(0,ae.j5)({color:e.gridColor})},[(0,i._)("div",{class:"block",style:(0,ae.j5)({backgroundColor:p.value[l]})},null,4),(0,i.Uk)(" "+(0,ae.zw)(t),1)],4)))),128))],4)):(0,i.kq)("",!0)],4))}}));const Ts=(0,Nl.Z)(Es,[["__scopeId","data-v-ae2a96a6"]]);var Ms=Ts,Us=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Ai.emit(Di.OPEN_CHART_DATA_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-chart",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,ae.j5)({backgroundColor:e.elementInfo.fill}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Ms,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||""},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend"])],36)),[[n,e.contextmenus]])],4)],6)}}});const Ws=(0,Nl.Z)(Us,[["__scopeId","data-v-6fc3de39"]]);var Ds=Ws;const Hs=e=>{if(!e)return{};const{bold:t,em:l,underline:a,strikethrough:n,color:o,backcolor:i,fontsize:s,fontname:r,align:u}=e;let c=`${a?"underline":""} ${n?"line-through":""}`;return" "===c&&(c="none"),{fontWeight:t?"bold":"normal",fontStyle:l?"italic":"normal",textDecoration:c,color:o||"#000",backgroundColor:i||"",fontSize:s||"14px",fontFamily:r||"微软雅黑",textAlign:u||"left"}},Fs=e=>e.replace(/\n/g,"
").replace(/ /g," ");var As=e=>{const t=(0,i.Fl)((()=>{const t=[];for(let l=0;l1||n.rowspan>1)for(let a=l;a{const t=(0,s.iH)(["",""]);return(0,i.YP)((()=>e.value),(()=>{e.value&&(t.value=_e(e.value.color))}),{immediate:!0}),{subThemeColor:t}};const $s=["innerHTML"];var Os=(0,i.aZ)({__name:"CustomTextarea",props:{value:{default:""}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(),n=(0,s.iH)(""),o=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{o.value||(n.value=l.value,a.value&&(a.value.innerHTML=l.value))}),{immediate:!0});const r=()=>{if(!a.value)return;const e=a.value.innerHTML;t("updateValue",e)},u=()=>{o.value=!0,a.value&&(a.value.onpaste=e=>{if(e.preventDefault(),!e.clipboardData)return;const l=e.clipboardData.items[0];l&&"string"===l.kind&&"text/plain"===l.type&&l.getAsString((e=>{const l=me(e);if("object"===typeof l)return;const n=he(e);if(n)return t("insertExcelData",n),void(a.value&&(a.value.innerHTML=n[0][0]));document.execCommand("insertText",!1,e)}))})},c=()=>{o.value=!1,a.value&&(a.value.onpaste=null)};return(0,i.Jd)((()=>{a.value&&(a.value.onpaste=null)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"custom-textarea",ref_key:"textareaRef",ref:a,contenteditable:!0,onFocus:t[0]||(t[0]=e=>u()),onBlur:t[1]||(t[1]=e=>c()),onInput:t[2]||(t[2]=e=>r()),innerHTML:n.value},null,40,$s))}});const Rs=(0,Nl.Z)(Os,[["__scopeId","data-v-7a7222ac"]]);var Ps=Rs;const zs={key:0,class:"handler"},Bs=["onMousedown"],Ns=["width"],js=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],Ys=["innerHTML"];var Vs=(0,i.aZ)({__name:"EditableTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,{canvasScale:a}=(0,o.Jk)($()),u=(0,s.iH)(!1),c=(0,s.iH)([]),d=(0,s.iH)([]),p=(0,i.Fl)({get(){return l.data},set(e){t("change",e)}}),v=(0,i.Fl)((()=>l.theme)),{subThemeColor:m}=Zs(v),h=(0,s.iH)([]),f=(0,i.Fl)((()=>h.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>l.colWidths,()=>l.width],(()=>{h.value=l.colWidths.map((e=>e*l.width))}),{immediate:!0});const g=()=>{c.value=[],d.value=[]};(0,i.YP)((()=>l.editable),(()=>{l.editable||g()}));const y=(0,i.Fl)((()=>{const e=[];for(let t=1;te+t));e.push(l)}return e})),w=(0,i.Fl)((()=>l.data)),{hideCells:x}=As(w),k=(0,i.Fl)((()=>{if(!c.value.length)return[];const[e,t]=c.value;if(!d.value.length)return[`${e}_${t}`];const[l,a]=d.value;if(e===l&&t===a)return[`${e}_${t}`];const n=[],o=Math.min(e,l),i=Math.min(t,a),s=Math.max(e,l),r=Math.max(t,a);for(let u=0;u=o&&u<=s&&t>=i&&t<=r&&n.push(`${u}_${t}`)}return n}));(0,i.YP)(k,((e,l)=>{(0,U.isEqual)(e,l)||t("changeSelectedCells",k.value)}));const b=(0,i.Fl)((()=>k.value.length>1?null:k.value[0])),_=()=>u.value=!1,I=(e,t,l)=>{0===e.button&&(d.value=[],u.value=!0,c.value=[t,l])},S=(e,t)=>{u.value&&(d.value=[e,t])};(0,i.bv)((()=>{document.addEventListener("mouseup",_)})),(0,i.Ah)((()=>{document.removeEventListener("mouseup",_)}));const C=(e,t)=>x.value.includes(`${e}_${t}`),L=e=>{const t=p.value.length-1;c.value=[0,e],d.value=[t,e]},E=e=>{const t=p.value[e].length-1;c.value=[e,0],d.value=[e,t]},T=()=>{const e=p.value.length-1,t=p.value[e].length-1;c.value=[0,0],d.value=[e,t]},M=e=>{const t=JSON.parse(JSON.stringify(p.value)),l=p.value[e],a=[];for(let n=0;n=0;l--)if(!C(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),p.value=t},W=e=>{const l=JSON.parse(JSON.stringify(p.value)),a=[];for(let t=0;t=0;a--)if(!C(t,a)){l[t][a].colspan=l[t][a].colspan-1;break}p.value=l.map((t=>(t.splice(e,1),t))),h.value.splice(e,1),t("changeColWidths",h.value)},D=e=>{const t=JSON.parse(JSON.stringify(p.value)),l=[];for(let a=0;a{p.value=p.value.map((t=>{const l={colspan:1,rowspan:1,text:"",id:(0,r.x0)(10)};return t.splice(e,0,l),t})),h.value.splice(e,0,100),t("changeColWidths",h.value)},F=(e,l)=>{let a=JSON.parse(JSON.stringify(p.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let l=0;l{const t=[];for(let a=0;a{const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.min(t,a),i=Math.max(e,l),s=Math.max(t,a),r=JSON.parse(JSON.stringify(p.value));r[n][o].rowspan=i-n+1,r[n][o].colspan=s-o+1,p.value=r,g()},Z=(e,t)=>{const l=JSON.parse(JSON.stringify(p.value));l[e][t].rowspan=1,l[e][t].colspan=1,p.value=l,g()},O=(e,l)=>{g();let n=!0;const o=h.value[l],i=e.pageX,s=50;document.onmousemove=e=>{if(!n)return;const t=(e.pageX-i)/a.value,r=o+t{n=!1,document.onmousemove=null,document.onmouseup=null,t("changeColWidths",h.value)}},R=()=>{const e=JSON.parse(JSON.stringify(p.value));for(let t=0;t{const e=(t,l)=>p.value[t]?p.value[t][l]?C(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;d.value=[];const t=c.value[0],l=c.value[1]+1,a=e(t,l);a?c.value=a:(D(t+1),c.value=[t+1,0]),(0,i.Y3)((()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()}))},z=e=>{if(!l.editable||!k.value.length)return;const t=e.key.toUpperCase();if(k.value.length<2){if(t===le.TAB&&(e.preventDefault(),P()),e.ctrlKey&&t===le.UP){e.preventDefault();const t=+k.value[0].split("_")[0];D(t)}if(e.ctrlKey&&t===le.DOWN){e.preventDefault();const t=+k.value[0].split("_")[0];D(t+1)}if(e.ctrlKey&&t===le.LEFT){e.preventDefault();const t=+k.value[0].split("_")[1];H(t)}if(e.ctrlKey&&t===le.RIGHT){e.preventDefault();const t=+k.value[0].split("_")[1];H(t+1)}}else t===le.DELETE&&R()};(0,i.bv)((()=>{document.addEventListener("keydown",z)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",z)}));const B=(0,U.debounce)((function(e,l,a){p.value[l][a].text=e,t("change",p.value)}),300,{trailing:!0}),N=(e,l,a)=>{const n=e.length,o=e[0].length;let s=0,r=0;l+n>p.value.length&&(s=l+n-p.value.length),a+o>p.value[0].length&&(r=a+o-p.value[0].length),(s||r)&&F(s,r),(0,i.Y3)((()=>{for(let t=0;t{const e=[];for(let t=0;t{const e=j(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},V=(e,t)=>{const l=k.value.length>1,a=p.value[e][t],n=l,o=!l&&(a.rowspan>1||a.colspan>1);return{canMerge:n,canSplit:o}},J=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],a=+t.split("_")[1];k.value.includes(`${l}_${a}`)||(c.value=[l,a],d.value=[]);const{canMerge:n,canSplit:o}=V(l,a),{canDeleteRow:i,canDeleteCol:s}=Y();return[{text:"插入列",children:[{text:"到左侧",handler:()=>H(a)},{text:"到右侧",handler:()=>H(a+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>D(l)},{text:"到下方",handler:()=>D(l+1)}]},{text:"删除列",disable:!s,handler:()=>W(a)},{text:"删除行",disable:!i,handler:()=>M(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:A},{text:"取消合并单元格",disable:!o,handler:()=>Z(l,a)},{divider:!0},{text:"选中当前列",handler:()=>L(a)},{text:"选中当前行",handler:()=>E(l)},{text:"选中全部单元格",handler:T}]};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:"editable-table",style:(0,ae.j5)({width:f.value+"px"})},[e.editable?((0,i.wg)(),(0,i.iD)("div",zs,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"drag-line",key:t,style:(0,ae.j5)({left:e+"px"}),onMousedown:e=>O(e,t)},null,44,Bs)))),128))])):(0,i.kq)("",!0),(0,i._)("table",{class:(0,ae.C_)({theme:v.value,"row-header":v.value?.rowHeader,"row-footer":v.value?.rowFooter,"col-header":v.value?.colHeader,"col-footer":v.value?.colFooter}),style:(0,ae.j5)(`--themeColor: ${v.value?.color}; --subThemeColor1: ${(0,s.SU)(m)[0]}; --subThemeColor2: ${(0,s.SU)(m)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(h.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,Ns)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,((t,a)=>((0,i.wg)(),(0,i.iD)("tr",{key:a,style:(0,ae.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,o)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:(0,ae.C_)(["cell",{selected:k.value.includes(`${a}_${o}`)&&k.value.length>1,active:b.value===`${a}_${o}`}]),style:(0,ae.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)(Hs)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${a}_${o}`,onMousedown:e=>I(e,a,o),onMouseenter:e=>S(a,o)},[b.value===`${a}_${o}`?((0,i.wg)(),(0,i.j4)(Ps,{key:0,class:(0,ae.C_)(["cell-text",{active:b.value===`${a}_${o}`}]),style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),value:t.text,onUpdateValue:e=>(0,s.SU)(B)(e,a,o),onInsertExcelData:e=>N(e,a,o)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"cell-text",style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Fs)(t.text)},null,12,Ys))],46,js)),[[n.F8,!(0,s.SU)(x).includes(`${a}_${o}`)],[l,e=>J(e)]]))),128))],4)))),128))])],6)],4)}}});const Js=(0,Nl.Z)(Vs,[["__scopeId","data-v-0236a619"]]);var qs=Js;const Xs={class:"element-content"};var Gs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{canvasScale:r,handleElementId:u,isScaling:c}=(0,o.Jk)(l),d=(0,s.iH)(),{addHistorySnapshot:p}=ra(),v=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},m=(0,s.iH)(!1);(0,i.YP)(u,(()=>{u.value!==t.elementInfo.id&&(m.value=!1)})),(0,i.YP)(m,(()=>{l.setDisableHotkeysState(m.value)}));const h=()=>{t.elementInfo.lock||(m.value=!0)},f=(0,s.iH)(-1);(0,i.YP)(c,(()=>{u.value===t.elementInfo.id&&(c.value&&(m.value=!1),c.value||-1===f.value||(a.updateElement({id:t.elementInfo.id,props:{height:f.value}}),f.value=-1))}));const g=e=>{const l=e[0].contentRect;if(!d.value)return;const n=l.height;t.elementInfo.height!==n&&(c.value?f.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}}))},y=new ResizeObserver(g);(0,i.bv)((()=>{d.value&&y.observe(d.value)})),(0,i.Ah)((()=>{d.value&&y.unobserve(d.value)}));const w=e=>{a.updateElement({id:t.elementInfo.id,props:{data:e}}),p()},x=e=>{const l=e.reduce(((e,t)=>e+t)),n=e.map((e=>e/l));a.updateElement({id:t.elementInfo.id,props:{width:l,colWidths:n}}),p()},k=e=>{(0,i.Y3)((()=>l.setSelectedTableCells(e)))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:d,style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",Xs,[(0,i.Wm)(qs,{onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:m.value,onChange:t[1]||(t[1]=e=>w(e)),onChangeColWidths:t[2]||(t[2]=e=>x(e)),onChangeSelectedCells:t[3]||(t[3]=e=>k(e))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!m.value||e.elementInfo.lock?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:t[4]||(t[4]=e=>h()),onMousedown:t[5]||(t[5]=e=>v(e)),onTouchstart:t[6]||(t[6]=e=>v(e))},[(0,s.SU)(u)===e.elementInfo.id?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"mask-tip",style:(0,ae.j5)({transform:`scale(${1/(0,s.SU)(r)})`})},"双击编辑",4)):(0,i.kq)("",!0)],34)):(0,i.kq)("",!0)])),[[l,e.contextmenus]])],4)],6)}}});const Ks=(0,Nl.Z)(Gs,[["__scopeId","data-v-742a731e"]]);var Qs=Ks;const er=["width","height","stroke","stroke-width"],tr=["transform"],lr=["d"];var ar=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Ai.emit(Di.OPEN_LATEX_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-latex",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,lr)],8,tr)],8,er))],32)),[[n,e.contextmenus]])],4)],6)}}});const nr=(0,Nl.Z)(ar,[["__scopeId","data-v-35c33b80"]]);var or=nr,ir=(e,t)=>{(0,i.bv)((()=>{if(!t.value)return;let l="normal";if(/m3u8(#|\?|$)/i.exec(e)?l="hls":/.flv(#|\?|$)/i.exec(e)&&(l="flv"),t.value&&"hls"===l&&(t.value.canPlayType("application/x-mpegURL")||t.value.canPlayType("application/vnd.apple.mpegURL"))&&(l="normal"),"hls"===l){const l=window.Hls;if(l&&l.isSupported()){const a=new l;a.loadSource(e),a.attachMedia(t.value)}}else if("flv"===l){const l=window.flvjs;if(l&&l.isSupported()){const a=l.createPlayer({type:"flv",url:e});a.attachMediaElement(t.value),a.load()}}}))};const sr=e=>((0,i.dD)("data-v-e55352ca"),e=e(),(0,i.Cn)(),e),rr={key:0,class:"load-error"},ur=["src","autoplay","poster"],cr={class:"bezel"},dr=sr((()=>(0,i._)("div",{class:"controller-mask"},null,-1))),pr={class:"controller"},vr={class:"icons icons-left"},mr={class:"icon-content"},hr={class:"volume"},fr={class:"icon-content"},gr=sr((()=>(0,i._)("span",{class:"thumb"},null,-1))),yr=[gr],wr={class:"time"},xr={class:"ptime"},kr={class:"dtime"},br={class:"icons icons-right"},_r={class:"speed"},Ir={class:"icon speed-icon"},Sr=["onClick"],Cr={class:"icon-content"},Lr={class:"bar"},Er=sr((()=>(0,i._)("span",{class:"thumb"},null,-1))),Tr=[Er];var Mr=(0,i.aZ)({__name:"index",props:{width:{},height:{},src:{},poster:{default:""},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e){const t=e,l=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(.5),c=(0,s.iH)(!0),d=(0,s.iH)(0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(1),g=(0,s.iH)(!1),y=(0,s.iH)("00:00"),w=(0,s.iH)("0"),x=(0,i.Fl)((()=>l(d.value))),k=(0,i.Fl)((()=>l(p.value))),b=(0,i.Fl)((()=>d.value/p.value*100+"%")),_=(0,i.Fl)((()=>v.value/p.value*100+"%")),I=(0,i.Fl)((()=>100*u.value+"%")),S=(0,s.iH)(!1),C=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],L=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,p.value),n.value.currentTime=e,d.value=e)},E=()=>{n.value&&(c.value=!1,n.value.play(),h.value=!0)},T=()=>{n.value&&(c.value=!0,n.value.pause(),h.value=!0)},M=()=>{c.value?E():T()},U=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,1),n.value.volume=e,u.value=e,n.value.muted&&0!==e&&(n.value.muted=!1))},W=e=>{n.value&&(n.value.playbackRate=e),f.value=e},D=()=>{p.value=n.value?.duration||0},H=()=>{d.value=n.value?.currentTime||0},F=()=>{m.value?(L(0),E()):T()},A=()=>{v.value=n.value?.buffered.length?n.value.buffered.end(n.value.buffered.length-1):0},Z=(0,s.iH)(!1),$=()=>Z.value=!0,O=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i},R=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i,document.removeEventListener("mousemove",O),document.removeEventListener("touchmove",O),document.removeEventListener("mouseup",R),document.removeEventListener("touchend",R)},P=()=>{document.addEventListener("mousemove",O),document.addEventListener("touchmove",O),document.addEventListener("mouseup",R),document.addEventListener("touchend",R)},z=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-a(r.value))/45;U(l)},B=()=>{document.removeEventListener("mousemove",z),document.removeEventListener("touchmove",z),document.removeEventListener("mouseup",B),document.removeEventListener("touchend",B)},N=()=>{document.addEventListener("mousemove",z),document.addEventListener("touchmove",z),document.addEventListener("mouseup",B),document.addEventListener("touchend",B)},j=e=>{if(!r.value)return;const t=(e.clientX-a(r.value))/45;U(t)},Y=e=>{if(p.value&&o.value){const t=o.value.getBoundingClientRect().left,a=e.clientX-t;if(a<0||a>o.value.offsetWidth)return;const n=p.value*(a/o.value.offsetWidth);w.value=a-(n>=3600?25:20)+"px",y.value=l(n),g.value=!0}},V=()=>{n.value&&(n.value.muted?(n.value.muted=!1,U(.5)):(n.value.muted=!0,U(0)))},J=()=>{m.value=!m.value},q=(0,s.iH)(-1),X=(0,s.iH)(!1),G=()=>{X.value=!1,clearTimeout(q.value),q.value=setTimeout((()=>{n.value?.played.length&&(X.value=!0)}),3e3)};return ir(t.src,n),(e,t)=>{const l=(0,i.up)("IconPause"),a=(0,i.up)("IconPlayOne"),s=(0,i.up)("IconVolumeMute"),d=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["video-player",{"hide-controller":X.value}]),style:(0,ae.j5)({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:t[22]||(t[22]=e=>G()),onClick:t[23]||(t[23]=e=>G())},[(0,i._)("div",{class:"video-wrap",onClick:t[8]||(t[8]=e=>M())},[Z.value?((0,i.wg)(),(0,i.iD)("div",rr,"视频加载失败")):(0,i.kq)("",!0),(0,i._)("video",{class:"video",ref_key:"videoRef",ref:n,src:e.src,autoplay:e.autoplay,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:t[0]||(t[0]=e=>D()),onTimeupdate:t[1]||(t[1]=e=>H()),onEnded:t[2]||(t[2]=e=>F()),onProgress:t[3]||(t[3]=e=>A()),onPlay:t[4]||(t[4]=e=>{G(),c.value=!1}),onPause:t[5]||(t[5]=e=>G()),onError:t[6]||(t[6]=e=>$())},null,40,ur),(0,i._)("div",cr,[(0,i._)("span",{class:(0,ae.C_)(["bezel-icon",{"bezel-transition":h.value}]),onAnimationend:t[7]||(t[7]=e=>h.value=!1)},[c.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))],34)])]),dr,(0,i._)("div",pr,[(0,i._)("div",vr,[(0,i._)("div",{class:"icon play-icon",onClick:t[9]||(t[9]=e=>M())},[(0,i._)("span",mr,[c.value?((0,i.wg)(),(0,i.j4)(a,{key:0})):((0,i.wg)(),(0,i.j4)(l,{key:1}))])]),(0,i._)("div",hr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[10]||(t[10]=e=>V())},[(0,i._)("span",fr,[0===u.value?((0,i.wg)(),(0,i.j4)(s,{key:0})):1===u.value?((0,i.wg)(),(0,i.j4)(d,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[11]||(t[11]=e=>N()),onTouchstart:t[12]||(t[12]=e=>N()),onClick:t[13]||(t[13]=e=>j(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[(0,i._)("div",{class:"volume-bar-inner",style:(0,ae.j5)({width:I.value})},yr,4)],512)],32)]),(0,i._)("span",wr,[(0,i._)("span",xr,(0,ae.zw)(x.value),1),(0,i.Uk)(" / "),(0,i._)("span",kr,(0,ae.zw)(k.value),1)])]),(0,i._)("div",br,[(0,i._)("div",_r,[(0,i._)("div",Ir,[(0,i._)("span",{class:"icon-content",onClick:t[14]||(t[14]=e=>S.value=!S.value)},(0,ae.zw)(1===f.value?"倍速":f.value+"x"),1),S.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"speed-menu",onMouseleave:t[15]||(t[15]=e=>S.value=!1)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,ae.C_)(["speed-menu-item",{active:e.value===f.value}]),key:e.label,onClick:t=>W(e.value)},(0,ae.zw)(e.label),11,Sr))),64))],32)):(0,i.kq)("",!0)])]),(0,i._)("div",{class:"loop",onClick:t[16]||(t[16]=e=>J())},[(0,i._)("div",{class:(0,ae.C_)(["icon loop-icon",{active:m.value}])},[(0,i._)("span",Cr,"循环"+(0,ae.zw)(m.value?"开":"关"),1)],2)])]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:o,onMousedown:t[17]||(t[17]=e=>P()),onTouchstart:t[18]||(t[18]=e=>P()),onMousemove:t[19]||(t[19]=e=>Y(e)),onMouseenter:t[20]||(t[20]=e=>g.value=!0),onMouseleave:t[21]||(t[21]=e=>g.value=!1)},[(0,i._)("div",{class:(0,ae.C_)(["bar-time",{hidden:!g.value}]),style:(0,ae.j5)({left:w.value})},(0,ae.zw)(y.value),7),(0,i._)("div",Lr,[(0,i._)("div",{class:"loaded",style:(0,ae.j5)({width:_.value})},null,4),(0,i._)("div",{class:"played",style:(0,ae.j5)({width:b.value})},Tr,4)])],544)])],38)}}});const Ur=(0,Nl.Z)(Mr,[["__scopeId","data-v-e55352ca"]]);var Wr=Ur,Dr=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-video",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[2]||(t[2]=e=>a(e,!1)),onTouchstart:t[3]||(t[3]=e=>a(e,!1))},[(0,i.Wm)(Wr,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","scale"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(["t","b","l","r"],(e=>(0,i._)("div",{class:(0,ae.C_)(["handler-border",e]),key:e,onMousedown:t[0]||(t[0]=e=>a(e)),onTouchstart:t[1]||(t[1]=e=>a(e))},null,34))),64))],32)),[[n,e.contextmenus]])],4)],6)}}});const Hr=(0,Nl.Z)(Dr,[["__scopeId","data-v-5dc89f2a"]]);var Fr=Hr;const Ar=e=>((0,i.dD)("data-v-44037f56"),e=e(),(0,i.Cn)(),e),Zr=["src","autoplay"],$r={class:"controller"},Or={class:"icons"},Rr={class:"icon-content"},Pr={class:"volume"},zr={class:"icon-content"},Br=Ar((()=>(0,i._)("span",{class:"thumb"},null,-1))),Nr=[Br],jr={class:"time"},Yr={class:"ptime"},Vr={class:"dtime"},Jr={class:"bar"},qr=Ar((()=>(0,i._)("span",{class:"thumb"},null,-1))),Xr=[qr];var Gr=(0,i.aZ)({__name:"AudioPlayer",props:{src:{},loop:{type:Boolean},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e,{expose:t}){const l=e,a=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},n=e=>e.getBoundingClientRect().left,o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(),c=(0,s.iH)(.5),d=(0,s.iH)(!0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(0),h=(0,s.iH)(!1),f=(0,s.iH)("00:00"),g=(0,s.iH)("0"),y=(0,i.Fl)((()=>a(p.value))),w=(0,i.Fl)((()=>a(v.value))),x=(0,i.Fl)((()=>p.value/v.value*100+"%")),k=(0,i.Fl)((()=>m.value/v.value*100+"%")),b=(0,i.Fl)((()=>100*c.value+"%")),_=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,v.value),o.value.currentTime=e,p.value=e)},I=()=>{o.value&&(d.value=!1,o.value.play())},S=()=>{o.value&&(d.value=!0,o.value.pause())},C=()=>{d.value?I():S()},L=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,1),o.value.volume=e,c.value=e,o.value.muted&&0!==e&&(o.value.muted=!1))},E=()=>{v.value=o.value?.duration||0},T=()=>{p.value=o.value?.currentTime||0},M=()=>{d.value=!1},U=()=>{l.loop?(_(0),I()):S()},W=()=>{m.value=o.value?.buffered.length?o.value.buffered.end(o.value.buffered.length-1):0},D=()=>Kl.error("视频加载失败"),H=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a},F=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a,document.removeEventListener("mousemove",H),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",F),document.removeEventListener("touchend",F)},A=()=>{document.addEventListener("mousemove",H),document.addEventListener("touchmove",H),document.addEventListener("mouseup",F),document.addEventListener("touchend",F)},Z=e=>{if(!u.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-n(u.value))/45;L(l)},$=()=>{document.removeEventListener("mousemove",Z),document.removeEventListener("touchmove",Z),document.removeEventListener("mouseup",$),document.removeEventListener("touchend",$)},O=()=>{document.addEventListener("mousemove",Z),document.addEventListener("touchmove",Z),document.addEventListener("mouseup",$),document.addEventListener("touchend",$)},R=e=>{if(!u.value)return;const t=(e.clientX-n(u.value))/45;L(t)},P=e=>{if(v.value&&r.value){const t=r.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>r.value.offsetWidth)return;const n=v.value*(l/r.value.offsetWidth);g.value=l-(n>=3600?25:20)+"px",f.value=a(n),h.value=!0}},z=()=>{o.value&&(o.value.muted?(o.value.muted=!1,L(.5)):(o.value.muted=!0,L(0)))};return t({toggle:C}),(e,t)=>{const l=(0,i.up)("IconPlayOne"),a=(0,i.up)("IconPause"),n=(0,i.up)("IconVolumeMute"),s=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:"audio-player",style:(0,ae.j5)({transform:`scale(${1/e.scale})`})},[(0,i._)("audio",{class:"audio",ref_key:"audioRef",ref:o,src:e.src,autoplay:e.autoplay,onDurationchange:t[0]||(t[0]=e=>E()),onTimeupdate:t[1]||(t[1]=e=>T()),onPlay:t[2]||(t[2]=e=>M()),onEnded:t[3]||(t[3]=e=>U()),onProgress:t[4]||(t[4]=e=>W()),onError:t[5]||(t[5]=e=>D())},null,40,Zr),(0,i._)("div",$r,[(0,i._)("div",Or,[(0,i._)("div",{class:"icon play-icon",onClick:t[6]||(t[6]=e=>C())},[(0,i._)("span",Rr,[d.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))])]),(0,i._)("div",Pr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[7]||(t[7]=e=>z())},[(0,i._)("span",zr,[0===c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):1===c.value?((0,i.wg)(),(0,i.j4)(s,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[8]||(t[8]=e=>O()),onTouchstart:t[9]||(t[9]=e=>O()),onClick:t[10]||(t[10]=e=>R(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:u},[(0,i._)("div",{class:"volume-bar-inner",style:(0,ae.j5)({width:b.value})},Nr,4)],512)],32)])]),(0,i._)("span",jr,[(0,i._)("span",Yr,(0,ae.zw)(y.value),1),(0,i.Uk)(" / "),(0,i._)("span",Vr,(0,ae.zw)(w.value),1)]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:r,onMousedown:t[11]||(t[11]=e=>A()),onTouchstart:t[12]||(t[12]=e=>A()),onMousemove:t[13]||(t[13]=e=>P(e)),onMouseenter:t[14]||(t[14]=e=>h.value=!0),onMouseleave:t[15]||(t[15]=e=>h.value=!1)},[(0,i._)("div",{class:(0,ae.C_)(["bar-time",{hidden:!h.value}]),style:(0,ae.j5)({left:g.value})},(0,ae.zw)(f.value),7),(0,i._)("div",Jr,[(0,i._)("div",{class:"loaded",style:(0,ae.j5)({width:k.value})},null,4),(0,i._)("div",{class:"played",style:(0,ae.j5)({width:x.value})},Xr,4)])],544)])],4)}}});const Kr=(0,Nl.Z)(Gr,[["__scopeId","data-v-44037f56"]]);var Qr=Kr,eu=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:a}=(0,o.Jk)($()),{viewportRatio:r}=(0,o.Jk)(F()),u=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),c=(0,i.Fl)((()=>{const e=la,a=la*r.value,n=280/l.value,o=50/l.value,i=t.elementInfo.width,s=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=s;return u+n>=e&&(d=i-n),c+s+o>=a&&(p=-o),{left:d+"px",top:p+"px"}})),d=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))};return(e,t)=>{const o=(0,i.up)("IconVolumeNotice"),r=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-audio",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[1]||(t[1]=e=>d(e)),onTouchstart:t[2]||(t[2]=e=>d(e))},[(0,i.Wm)(o,{class:"audio-icon",style:(0,ae.j5)({fontSize:u.value,color:e.elementInfo.color})},null,8,["style"]),(0,s.SU)(a)===e.elementInfo.id?((0,i.wg)(),(0,i.j4)(Qr,{key:0,class:"audio-player",style:(0,ae.j5)({...c.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:(0,s.SU)(l),onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["style","src","loop","scale"])):(0,i.kq)("",!0)],32)),[[r,e.contextmenus]])],4)],6)}}});const tu=(0,Nl.Z)(eu,[["__scopeId","data-v-53bdc956"]]);var lu=tu;const au=["id"];var nu=(0,i.aZ)({__name:"EditableElement",props:{elementInfo:{},elementIndex:{},isMultiSelect:{type:Boolean},selectElement:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Ho,[na.TEXT]:Qi,[na.SHAPE]:hs,[na.LINE]:Cs,[na.CHART]:Ds,[na.TABLE]:Qs,[na.LATEX]:or,[na.VIDEO]:Fr,[na.AUDIO]:lu};return e[t.elementInfo.type]||null})),{orderElement:a}=wa(),{alignElementToCanvas:n}=Yn(),{combineElements:o,uncombineElements:s}=ha(),{deleteElement:r}=ma(),{lockElement:u,unlockElement:c}=va(),{copyElement:d,pasteElement:p,cutElement:v}=fa(),{selectAllElement:m}=ga(),h=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>c(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:v},{text:"复制",subText:"Ctrl + C",handler:d},{text:"粘贴",subText:"Ctrl + V",handler:p},{divider:!0},{text:"水平居中",handler:()=>n(K.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>n(K.CENTER)},{text:"水平居中",handler:()=>n(K.HORIZONTAL)},{text:"左对齐",handler:()=>n(K.LEFT)},{text:"右对齐",handler:()=>n(K.RIGHT)}]},{text:"垂直居中",handler:()=>n(K.VERTICAL),children:[{text:"水平垂直居中",handler:()=>n(K.CENTER)},{text:"垂直居中",handler:()=>n(K.VERTICAL)},{text:"顶部对齐",handler:()=>n(K.TOP)},{text:"底部对齐",handler:()=>n(K.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,G.TOP),children:[{text:"置于顶层",handler:()=>a(t.elementInfo,G.TOP)},{text:"上移一层",handler:()=>a(t.elementInfo,G.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,G.BOTTOM),children:[{text:"置于底层",handler:()=>a(t.elementInfo,G.BOTTOM)},{text:"下移一层",handler:()=>a(t.elementInfo,G.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?s:o,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:m},{text:"锁定",subText:"Ctrl + L",handler:u},{text:"删除",subText:"Delete",handler:r}];return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:h},null,8,["elementInfo","selectElement"]))],12,au))}});const ou=nu;var iu=ou,su=(0,i.aZ)({__name:"MouseSelection",props:{top:{},left:{},width:{},height:{},quadrant:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(`mouse-selection quadrant-${e.quadrant}`),style:(0,ae.j5)({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});const ru=(0,Nl.Z)(su,[["__scopeId","data-v-2c5e1d42"]]);var uu=ru;const cu={class:"grid-lines"},du=["d","stroke"];var pu=(0,i.aZ)({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=(0,o.Jk)($()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(F()),r=(0,i.Fl)((()=>a.value?.background)),u=(0,i.Fl)((()=>{const e=r.value?.color||"#fff",t=["#000","#fff"];return M.Z.mostReadable(e,t,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()})),c=(0,i.Fl)((()=>{const e=la,t=la*n.value;let a="";for(let n=0;n<=Math.floor(t/l.value);n++)a+=`M0 ${n*l.value} L${e} ${n*l.value} `;for(let n=0;n<=Math.floor(e/l.value);n++)a+=`M${n*l.value} 0 L${n*l.value} ${t} `;return a}));return(e,l)=>((0,i.wg)(),(0,i.iD)("svg",cu,[(0,i._)("path",{style:(0,ae.j5)({transform:`scale(${(0,s.SU)(t)})`}),d:c.value,fill:"none",stroke:u.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,du)]))}});const vu=(0,Nl.Z)(pu,[["__scopeId","data-v-05484a24"]]);var mu=vu,hu=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:t,color:l,image:a,imageSize:n,gradientColor:o,gradientRotate:i,gradientType:s}=e.value;if("solid"===t)return{backgroundColor:l};if("image"===t)return a?"repeat"===n?{backgroundImage:`url(${a}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${a}`,backgroundRepeat:"no-repeat",backgroundSize:n||"cover"}:{backgroundColor:"#fff"};if("gradient"===t){const e=i||0,t=o?o[0]:"#fff",l=o?o[1]:"#fff";return"radial"===s?{backgroundImage:`radial-gradient(${t}, ${l}`}:{backgroundImage:`linear-gradient(${e}deg, ${t}, ${l}`}}return{backgroundColor:"#fff"}}));return{backgroundStyle:t}},fu=(0,i.aZ)({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=(0,o.Jk)($()),{currentSlide:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>l.value?.background)),{backgroundStyle:n}=hu(a);return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"viewport-background",style:(0,ae.j5)((0,s.SU)(n))},[(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(mu,{key:0})):(0,i.kq)("",!0)],4))}});const gu=(0,Nl.Z)(fu,[["__scopeId","data-v-b6b18502"]]);var yu=gu,wu=(0,i.aZ)({__name:"AlignmentLine",props:{type:{},axis:{},length:{},canvasScale:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.axis.x*t.canvasScale+"px")),a=(0,i.Fl)((()=>t.axis.y*t.canvasScale+"px")),n=(0,i.Fl)((()=>"vertical"===t.type?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"alignment-line",style:(0,ae.j5)({left:l.value,top:a.value})},[(0,i._)("div",{class:(0,ae.C_)(["line",e.type]),style:(0,ae.j5)(n.value)},null,6)],4))}});const xu=(0,Nl.Z)(wu,[["__scopeId","data-v-ed6fc00a"]]);var ku=xu;const bu={class:"ruler"};var _u=(0,i.aZ)({__name:"Ruler",props:{viewportStyles:{}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.viewportStyles.width*l.value/10));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",bu,[(0,i._)("div",{class:"h",style:(0,ae.j5)({width:e.viewportStyles.width*(0,s.SU)(l)+"px",left:e.viewportStyles.left+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,ae.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:`marker-100-${e}`},[(0,i._)("span",null,(0,ae.zw)(e),1)],2))),64))],4),(0,i._)("div",{class:"v",style:(0,ae.j5)({height:e.viewportStyles.height*(0,s.SU)(l)+"px",top:e.viewportStyles.top+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,ae.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:e,style:(0,ae.j5)({height:a.value+"px"})},[(0,i._)("span",null,(0,ae.zw)(e),1)],6))),64))],4)]))}});const Iu=(0,Nl.Z)(_u,[["__scopeId","data-v-2963c74c"]]);var Su=Iu;const Cu=["width","height"],Lu=["d"];var Eu=(0,i.aZ)({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=$(),{creatingElement:a}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(0,s.iH)(),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!d.value)return;const{x:e,y:t}=d.value.getBoundingClientRect();p.value={x:e,y:t}}));const v=e=>{let n=!0;const o=e.pageX,i=e.pageY;u.value=[o,i],document.onmousemove=e=>{if(!a.value||!n)return;let t=e.pageX,l=e.pageY;if(r.value){const e=t-o,n=l-i,s=Math.abs(e),r=Math.abs(n);if("shape"===a.value.type){const a=n>0&&e<0||n<0&&e>0;s>r?l=a?i-e:i+e:t=a?o-n:o+n}else"line"===a.value.type&&(s>r?l=i:t=o)}c.value=[t,l]},document.onmouseup=e=>{if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout((()=>l.setCreatingElement(null)),0);n=!1;const s=e.pageX,r=e.pageY,d=30;if("line"===a.value?.type&&(Math.abs(s-o)>=d||Math.abs(r-i)>=d))t("created",{start:u.value,end:c.value});else if("line"!==a.value?.type&&Math.abs(s-o)>=d&&Math.abs(r-i)>=d)t("created",{start:u.value,end:c.value});else{const e=200,l=Math.min(s,o),a=Math.min(r,i),n=Math.max(s,o),u=Math.max(r,i),c=n-l>=d?n-l:e,p=u-a>=d?u-a:e;t("created",{start:[l,a],end:[l+c,a+p]})}}},m=(0,i.Fl)((()=>{if(!u.value||!c.value)return null;if(!a.value||"line"!==a.value.type)return null;const[e,t]=u.value,[l,n]=c.value,o=Math.min(e,l),i=Math.max(e,l),s=Math.min(t,n),r=Math.max(t,n),d=i-o>=24?i-o:24,p=r-s>=24?r-s:24,v=e===o?0:i-o,m=t===s?0:r-s,h=l===o?0:i-o,f=n===s?0:r-s,g=`M${v}, ${m} L${h}, ${f}`;return{svgWidth:d,svgHeight:p,startX:v,startY:m,endX:h,endY:f,path:g}})),h=(0,i.Fl)((()=>{if(!u.value||!c.value)return{};const[e,t]=u.value,[l,a]=c.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),r=o-n,d=s-i;return{left:n-p.value.x+"px",top:i-p.value.y+"px",width:r+"px",height:d+"px"}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"element-create-selection",ref_key:"selectionRef",ref:d,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>v(e)),["stop"])),onContextmenu:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop","prevent"]))},[u.value&&c.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["selection",(0,s.SU)(a)?.type]),style:(0,ae.j5)(h.value)},["line"===(0,s.SU)(a)?.type&&m.value?((0,i.wg)(),(0,i.iD)("svg",{key:0,overflow:"visible",width:m.value.svgWidth,height:m.value.svgHeight},[(0,i._)("path",{d:m.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,Lu)],8,Cu)):(0,i.kq)("",!0)],6)):(0,i.kq)("",!0)],544))}});const Tu=(0,Nl.Z)(Eu,[["__scopeId","data-v-85b0bbaa"]]);var Mu=Tu;const Uu={overflow:"visible"},Wu=["d","fill"];var Du=(0,i.aZ)({__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const l=$(),{ctrlOrShiftKeyActive:a}=(0,o.Jk)(V()),r=(0,s.iH)(),u=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!r.value)return;const{x:e,y:t}=r.value.getBoundingClientRect();u.value={x:e,y:t}}));const c=(0,s.iH)(),d=(0,s.iH)([]),p=(0,s.iH)(!1),v=e=>{let t=e.pageX-u.value.x,l=e.pageY-u.value.y;if(a.value&&d.value.length){const[e,a]=d.value[d.value.length-1];Math.abs(e-t)-Math.abs(a-l)>0?l=a:t=e}return{pageX:t,pageY:l}},m=e=>{const{pageX:t,pageY:l}=v(e);if(c.value=[t,l],d.value.length>=2){const[e,a]=d.value[0];Math.abs(e-t)<5&&Math.abs(a-l)<5?p.value=!0:p.value=!1}else p.value=!1},h=(0,i.Fl)((()=>{let e="";for(let t=0;t{const{pageX:l,pageY:a}=v(e);if(p.value){const e=d.value.map((e=>e[0])),l=d.value.map((e=>e[1])),a=Math.min(...e),n=Math.min(...l),o=Math.max(...e),i=Math.max(...l),s=d.value.map((e=>[e[0]-a,e[1]-n]));let r="";for(let t=0;t{l.setCreatingCustomShapeState(!1)},y=e=>{const t=e.key.toUpperCase();t===le.ESC&&g()};return(0,i.bv)((()=>{Kl.success("点击开始绘制任意多边形,首尾闭合完成绘制,按 ESC 键或鼠标右键关闭"),document.addEventListener("keydown",y)})),(0,i.Ah)((()=>document.removeEventListener("keydown",y))),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:r,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>f(e)),["stop"])),onMousemove:t[1]||(t[1]=e=>m(e)),onContextmenu:t[2]||(t[2]=(0,n.iM)((e=>g()),["stop","prevent"]))},[((0,i.wg)(),(0,i.iD)("svg",Uu,[(0,i._)("path",{d:h.value,stroke:"#d14424",fill:p.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,Wu)]))],544))}});const Hu=(0,Nl.Z)(Du,[["__scopeId","data-v-224f36be"]]);var Fu=Hu,Au=(e,t)=>{const l=(0,i.Fl)((()=>[{direction:ee.LEFT_TOP,style:{}},{direction:ee.TOP,style:{left:e.value/2+"px"}},{direction:ee.RIGHT_TOP,style:{left:e.value+"px"}},{direction:ee.LEFT,style:{top:t.value/2+"px"}},{direction:ee.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:ee.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:ee.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:ee.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}])),a=(0,i.Fl)((()=>[{direction:ee.LEFT,style:{top:t.value/2+"px"}},{direction:ee.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}])),n=(0,i.Fl)((()=>[{direction:ee.TOP,style:{left:e.value/2+"px"}},{direction:ee.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}])),o=(0,i.Fl)((()=>[{type:Q.T,style:{width:e.value+"px"}},{type:Q.B,style:{top:t.value+"px",width:e.value+"px"}},{type:Q.L,style:{height:t.value+"px"}},{type:Q.R,style:{left:e.value+"px",height:t.value+"px"}}]));return{resizeHandlers:l,textElementResizeHandlers:a,verticalTextElementResizeHandlers:n,borderLines:o}},Zu=(0,i.aZ)({__name:"ResizeHandler",props:{type:{},rotate:{default:0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e="rotate-",l=t.rotate;return l>-22.5&&l<=22.5?e+0:l>22.5&&l<=67.5?e+45:l>67.5&&l<=112.5?e+90:l>112.5&&l<=157.5?e+135:l>157.5||l<=-157.5?e+0:l>-157.5&&l<=-112.5?e+45:l>-112.5&&l<=-67.5?e+90:l>-67.5&&l<=-22.5?e+135:e+0}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["resize-handler",l.value,e.type])},null,2))}});const $u=(0,Nl.Z)(Zu,[["__scopeId","data-v-1e66197f"]]);var Ou=$u,Ru=(0,i.aZ)({__name:"BorderLine",props:{type:{},isWide:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["border-line",e.type,{wide:e.isWide}])},null,2))}});const Pu=(0,Nl.Z)(Ru,[["__scopeId","data-v-8346cf6c"]]);var zu=Pu,Bu=(0,i.aZ)({__name:"MultiSelectOperate",props:{elementList:{},scaleMultiElement:{type:Function}},setup(e){const t=e,{activeElementIdList:l,canvasScale:a}=(0,o.Jk)($()),r=(0,i.Fl)((()=>t.elementList.filter((e=>l.value.includes(e.id))))),u=(0,s.iH)({minX:0,maxX:0,minY:0,maxY:0}),c=(0,i.Fl)((()=>(u.value.maxX-u.value.minX)*a.value)),d=(0,i.Fl)((()=>(u.value.maxY-u.value.minY)*a.value)),{resizeHandlers:p,borderLines:v}=Au(c,d),m=()=>{const{minX:e,maxX:t,minY:l,maxY:a}=we(r.value);u.value={minX:e,maxX:t,minY:l,maxY:a}};(0,i.m0)(m);const h=(0,i.Fl)((()=>r.value.some((e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"multi-select-operate",style:(0,ae.j5)({left:u.value.minX*(0,s.SU)(a)+"px",top:u.value.minY*(0,s.SU)(a)+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),(e=>((0,i.wg)(),(0,i.j4)(zu,{key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),h.value?(0,i.kq)("",!0):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:0},(0,i.Ko)((0,s.SU)(p),(t=>((0,i.wg)(),(0,i.j4)(Ou,{key:t.direction,type:t.direction,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleMultiElement(l,u.value,t.direction)),["stop"])},null,8,["type","style","onMousedown"])))),128))],4))}});const Nu=(0,Nl.Z)(Bu,[["__scopeId","data-v-97dc9b9a"]]);var ju=Nu;const Yu={class:"rotate-handler"};function Vu(e,t){return(0,i.wg)(),(0,i.iD)("div",Yu)}const Ju={},qu=(0,Nl.Z)(Ju,[["render",Vu],["__scopeId","data-v-b99d8dae"]]);var Xu=qu;const Gu={inheritAttrs:!1};var Ku=(0,i.aZ)({...Gu,__name:"ImageElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:a}=(0,o.Jk)($()),r=(0,i.Fl)((()=>a.value===t.elementInfo.id)),u=(0,i.Fl)((()=>t.elementInfo.width*l.value)),c=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:d,borderLines:p}=Au(u,c);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["image-element-operate",{cliping:r.value}])},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(p),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Ou,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Xu,{class:"operate-rotate-handler",style:(0,ae.j5)({left:u.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)],2))}});const Qu=(0,Nl.Z)(Ku,[["__scopeId","data-v-7bcad5a9"]]);var ec=Qu;const tc={class:"text-element-operate"},lc={inheritAttrs:!1};var ac=(0,i.aZ)({...lc,__name:"TextElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{textElementResizeHandlers:u,verticalTextElementResizeHandlers:c,borderLines:d}=Au(a,r),p=(0,i.Fl)((()=>t.elementInfo.vertical?c.value:u.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",tc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(t=>((0,i.wg)(),(0,i.j4)(Ou,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Xu,{class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const nc=ac;var oc=nc;const ic={class:"shape-element-operate"},sc={inheritAttrs:!1};var rc=(0,i.aZ)({...sc,__name:"ShapeElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},moveShapeKeypoint:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Au(a,r),d=(0,i.Fl)((()=>{if(!t.elementInfo.pathFormula||void 0===t.elementInfo.keypoint)return{};const e=oa[t.elementInfo.pathFormula];if("editable"in e){const a=e.getBaseSize(t.elementInfo.width,t.elementInfo.height)*t.elementInfo.keypoint;if("left"===e.relative)return{left:a*l.value+"px"};if("right"===e.relative)return{left:(t.elementInfo.width-a)*l.value+"px"};if("center"===e.relative)return{left:(t.elementInfo.width-a)/2*l.value+"px"};if("top"===e.relative)return{top:a*l.value+"px"};if("bottom"===e.relative)return{top:(t.elementInfo.height-a)*l.value+"px"}}return{}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ic,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Ou,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Xu,{class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]),void 0!==e.elementInfo.keypoint?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"operate-keypoint-handler",style:(0,ae.j5)(d.value),onMousedown:t[1]||(t[1]=(0,n.iM)((t=>e.moveShapeKeypoint(t,e.elementInfo)),["stop"]))},null,36)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)]))}});const uc=(0,Nl.Z)(rc,[["__scopeId","data-v-52dcdbf8"]]);var cc=uc;const dc={class:"line-element-operate"},pc=["width","height","stroke"],vc={key:0},mc=["x1","y1","x2","y2"],hc=["x1","y1","x2","y2"],fc=["x1","y1","x2","y2"],gc=["x1","y1","x2","y2"],yc={inheritAttrs:!1};var wc=(0,i.aZ)({...yc,__name:"LineElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},dragLineElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0]))),r=(0,i.Fl)((()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1]))),u=(0,i.Fl)((()=>{const e=[{handler:te.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:te.END,style:{left:t.elementInfo.end[0]*l.value+"px",top:t.elementInfo.end[1]*l.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken){const a=t.elementInfo.curve||t.elementInfo.broken;e.push({handler:te.C,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}})}else if(t.elementInfo.cubic){const[a,n]=t.elementInfo.cubic;e.push({handler:te.C1,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}}),e.push({handler:te.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",dc,[e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(t=>((0,i.wg)(),(0,i.j4)(Ou,{class:"operate-resize-handler",key:t.handler,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.dragLineElement(l,e.elementInfo,t.handler)),["stop"])},null,8,["style","onMousedown"])))),128)),((0,i.wg)(),(0,i.iD)("svg",{width:a.value||1,height:r.value||1,stroke:e.elementInfo.color,overflow:"visible",style:(0,ae.j5)({transform:`scale(${(0,s.SU)(l)})`})},[e.elementInfo.curve?((0,i.wg)(),(0,i.iD)("g",vc,[(0,i._)("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,mc),(0,i._)("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,hc)])):(0,i.kq)("",!0),e.elementInfo.cubic?((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)(e.elementInfo.cubic,((t,l)=>((0,i.wg)(),(0,i.iD)("g",{key:l},[0===l?((0,i.wg)(),(0,i.iD)("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:t[0],y2:t[1]},null,8,fc)):(0,i.kq)("",!0),1===l?((0,i.wg)(),(0,i.iD)("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:t[0],y2:t[1]},null,8,gc)):(0,i.kq)("",!0)])))),128)):(0,i.kq)("",!0)],12,pc))],64)):(0,i.kq)("",!0)]))}});const xc=(0,Nl.Z)(wc,[["__scopeId","data-v-3aa5cc44"]]);var kc=xc;const bc={class:"table-element-operate"},_c={inheritAttrs:!1};var Ic=(0,i.aZ)({..._c,__name:"TableElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.outline.width||1)),r=(0,i.Fl)((()=>(t.elementInfo.width+a.value)*l.value)),u=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:c,borderLines:d}=Au(r,u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",bc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(t=>((0,i.wg)(),(0,i.j4)(Ou,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Xu,{class:"operate-rotate-handler",style:(0,ae.j5)({left:r.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const Sc=Ic;var Cc=Sc;const Lc={class:"common-element-operate"},Ec={inheritAttrs:!1};var Tc=(0,i.aZ)({...Ec,__name:"CommonElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Au(a,r),d=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Lc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Ou,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),d.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Xu,{key:0,class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)]))}});const Mc=Tc;var Uc=Mc,Wc=()=>{const e=F(),{addHistorySnapshot:t}=ra(),l=(l,a)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===a.type&&!n.test(a.target))return Kl.error("不是正确的网页链接地址"),!1;if("slide"===a.type&&!a.target)return Kl.error("请先选择链接目标"),!1;const o={link:a};return e.updateElement({id:l.id,props:o}),t(),!0},a=l=>{e.removeElementProps({id:l.id,propName:"link"}),t()};return{setLink:l,removeLink:a}},Dc=(0,i.aZ)({__name:"Divider",props:{type:{default:"horizontal"},margin:{default:0}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["divider",e.type]),style:(0,ae.j5)({margin:"horizontal"===e.type?`${e.margin||24}px 0`:`0 ${e.margin||8}px`})},null,6))}});const Hc=(0,Nl.Z)(Dc,[["__scopeId","data-v-6b66cde8"]]);var Fc=Hc;const Ac=["href"],Zc={class:"btns"};var $c=(0,i.aZ)({__name:"LinkHandler",props:{elementInfo:{},link:{},openLinkDialog:{type:Function}},setup(e){const t=e,l=$(),a=F(),{canvasScale:n}=(0,o.Jk)(l),{slides:r}=(0,o.Jk)(a),{removeLink:u}=Wc(),c=(0,i.Fl)((()=>"line"===t.elementInfo.type?0:t.elementInfo.height)),d=e=>{const t=r.value.findIndex((t=>t.id===e));-1!==t&&(l.setActiveElementIdList([]),a.updateSlideIndex(t))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"link-handler",style:(0,ae.j5)({top:c.value*(0,s.SU)(n)+10+"px"})},["web"===e.link.type?((0,i.wg)(),(0,i.iD)("a",{key:0,class:"link",href:e.link.target,target:"_blank"},(0,ae.zw)(e.link.target),9,Ac)):((0,i.wg)(),(0,i.iD)("a",{key:1,class:"link",onClick:t[0]||(t[0]=t=>d(e.link.target))},"幻灯片页面 "+(0,ae.zw)(e.link.target),1)),(0,i._)("div",Zc,[(0,i._)("div",{class:"btn",onClick:t[1]||(t[1]=t=>e.openLinkDialog())},"更换"),(0,i.Wm)(Fc,{type:"vertical"}),(0,i._)("div",{class:"btn",onClick:t[2]||(t[2]=t=>(0,s.SU)(u)(e.elementInfo))},"移除")])],4))}});const Oc=(0,Nl.Z)($c,[["__scopeId","data-v-316c4664"]]);var Rc=Oc;const Pc={key:1,class:"animation-index"};var zc=(0,i.aZ)({__name:"index",props:{elementInfo:{},isSelected:{type:Boolean},isActive:{type:Boolean},isActiveGroupElement:{type:Boolean},isMultiSelect:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},dragLineElement:{type:Function},moveShapeKeypoint:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,{canvasScale:l,toolbarState:a}=(0,o.Jk)($()),{formatedAnimations:r}=(0,o.Jk)(F()),u=(0,i.Fl)((()=>{const e={[na.IMAGE]:ec,[na.TEXT]:oc,[na.SHAPE]:cc,[na.LINE]:kc,[na.TABLE]:Cc,[na.CHART]:Uc,[na.LATEX]:Uc,[na.VIDEO]:Uc,[na.AUDIO]:Uc};return e[t.elementInfo.type]||null})),c=(0,i.Fl)((()=>{const e=[];for(let l=0;le.elId));a.includes(t.elementInfo.id)&&e.push(l)}return e})),d=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),p=(0,i.Fl)((()=>"height"in t.elementInfo?t.elementInfo.height:0));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:(0,ae.j5)({top:e.elementInfo.top*(0,s.SU)(l)+"px",left:e.elementInfo.left*(0,s.SU)(l)+"px",transform:`rotate(${d.value}deg)`,transformOrigin:`${e.elementInfo.width*(0,s.SU)(l)/2}px ${p.value*(0,s.SU)(l)/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.j4)((0,i.LL)(u.value),{key:0,elementInfo:e.elementInfo,handlerVisible:!e.elementInfo.lock&&(e.isActiveGroupElement||!e.isMultiSelect),rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement,moveShapeKeypoint:e.moveShapeKeypoint},null,8,["elementInfo","handlerVisible","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])):(0,i.kq)("",!0),"elAnimation"===(0,s.SU)(a)&&c.value.length?((0,i.wg)(),(0,i.iD)("div",Pc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"index-item",key:e},(0,ae.zw)(e+1),1)))),128))])):(0,i.kq)("",!0),e.isActive&&e.elementInfo.link?((0,i.wg)(),(0,i.j4)(Rc,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):(0,i.kq)("",!0)],6))}});const Bc=(0,Nl.Z)(zc,[["__scopeId","data-v-5ec1ff35"]]);var Nc=Bc;const jc=["src"];var Yc=(0,i.aZ)({__name:"BaseImageElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l),n=(0,i.Fl)((()=>t.elementInfo.flipH)),o=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:r}=Jn(n,o),u=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:c,imgPosition:d}=Xn(u),p=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:v}=Gn(p);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-image",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:"",transform:(0,s.SU)(r)})},[(0,i.Wm)(yo,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,ae.j5)({clipPath:(0,s.SU)(c).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,ae.j5)({top:(0,s.SU)(d).top,left:(0,s.SU)(d).left,width:(0,s.SU)(d).width,height:(0,s.SU)(d).height,filter:(0,s.SU)(v)}),alt:""},null,12,jc),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,ae.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],4)],4)],4))}});const Vc=(0,Nl.Z)(Yc,[["__scopeId","data-v-24fef706"]]);var Jc=Vc;const qc=["innerHTML"];var Xc=(0,i.aZ)({__name:"BaseTextElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-text",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,s.SU)(a),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i._)("div",{class:"text ProseMirror-static",style:(0,ae.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,12,qc)],4)],4)],4))}});const Gc=(0,Nl.Z)(Xc,[["__scopeId","data-v-52a206f2"]]);var Kc=Gc;const Qc=["width","height"],ed={key:0},td=["transform"],ld=["d","fill","stroke","stroke-width","stroke-dasharray"],ad=["innerHTML"];var nd=(0,i.aZ)({__name:"BaseShapeElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:a,outlineColor:n,strokeDashArray:o}=Kn(l),r=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:u}=Vn(r),c=(0,i.Fl)((()=>t.elementInfo.flipH)),d=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:p}=Jn(c,d),v=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-shape",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(u)?`drop-shadow(${(0,s.SU)(u)})`:"",transform:(0,s.SU)(p),color:v.value.defaultColor,fontFamily:v.value.defaultFontName})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",ed,[(0,i.Wm)(rs,{id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#base-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(n),"stroke-width":(0,s.SU)(a),"stroke-dasharray":(0,s.SU)(o)},null,8,ld)],8,td)],8,Qc)),(0,i._)("div",{class:(0,ae.C_)(["shape-text",v.value.align])},[(0,i._)("div",{class:"ProseMirror-static",innerHTML:v.value.content},null,8,ad)],2)],4)],4)],4))}});const od=(0,Nl.Z)(nd,[["__scopeId","data-v-b13f8fa8"]]);var id=od;const sd=["width","height"],rd=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var ud=(0,i.aZ)({__name:"BaseLineElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l),n=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),r=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),u=(0,i.Fl)((()=>Ie(t.elementInfo)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-line",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:""})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:n.value,height:o.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(xs,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(xs,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0)]),(0,i._)("path",{d:u.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":r.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,rd)],8,sd))],4)],4))}});const cd=(0,Nl.Z)(ud,[["__scopeId","data-v-443e2f82"]]);var dd=cd,pd=(0,i.aZ)({__name:"BaseChartElement",props:{elementInfo:{}},setup(e){const t=(0,i.f3)(Sn)||(0,s.iH)(1),l=(0,i.Fl)((()=>t.value<1)),a=(0,i.Fl)((()=>l.value?1/t.value:1));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-chart",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({backgroundColor:e.elementInfo.fill})},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Ms,{width:e.elementInfo.width*a.value,height:e.elementInfo.height*a.value,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||"",style:(0,ae.j5)({zoom:1/a.value})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});const vd=(0,Nl.Z)(pd,[["__scopeId","data-v-7c03d68d"]]);var md=vd;const hd=["width"],fd=["rowspan","colspan"],gd=["innerHTML"];var yd=(0,i.aZ)({__name:"StaticTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},setup(e){const t=e,l=(0,s.iH)([]),a=(0,i.Fl)((()=>l.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>t.colWidths,()=>t.width],(()=>{l.value=t.colWidths.map((e=>e*t.width))}),{immediate:!0});const o=(0,i.Fl)((()=>t.data)),{hideCells:r}=As(o),u=(0,i.Fl)((()=>t.theme)),{subThemeColor:c}=Zs(u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"static-table",style:(0,ae.j5)({width:a.value+"px"})},[(0,i._)("table",{class:(0,ae.C_)({theme:u.value,"row-header":u.value?.rowHeader,"row-footer":u.value?.rowFooter,"col-header":u.value?.colHeader,"col-footer":u.value?.colFooter}),style:(0,ae.j5)(`--themeColor: ${u.value?.color}; --subThemeColor1: ${(0,s.SU)(c)[0]}; --subThemeColor2: ${(0,s.SU)(c)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,hd)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.data,((t,l)=>((0,i.wg)(),(0,i.iD)("tr",{key:l,style:(0,ae.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,a)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:"cell",style:(0,ae.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)(Hs)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[(0,i._)("div",{class:"cell-text",style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Fs)(t.text)},null,12,gd)],12,fd)),[[n.F8,!(0,s.SU)(r).includes(`${l}_${a}`)]]))),128))],4)))),128))])],6)],4))}});const wd=(0,Nl.Z)(yd,[["__scopeId","data-v-5d949d4d"]]);var xd=wd;const kd={class:"element-content"};var bd=(0,i.aZ)({__name:"BaseTableElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-table",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",kd,[(0,i.Wm)(xd,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}});const _d=(0,Nl.Z)(bd,[["__scopeId","data-v-3eff7eba"]]);var Id=_d;const Sd={class:"element-content"},Cd=["width","height","stroke","stroke-width"],Ld=["transform"],Ed=["d"];var Td=(0,i.aZ)({__name:"BaseLatexElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-latex",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Sd,[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,Ed)],8,Ld)],8,Cd))])],4)],4))}});const Md=(0,Nl.Z)(Td,[["__scopeId","data-v-1587280d"]]);var Ud=Md,Wd=(0,i.aZ)({__name:"BaseVideoElement",props:{elementInfo:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlayOne");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-video",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[(0,i.Wm)(l,{class:"icon"})],4)],4)],4)}}});const Dd=(0,Nl.Z)(Wd,[["__scopeId","data-v-09436dde"]]);var Hd=Dd;const Fd={class:"element-content"};var Ad=(0,i.aZ)({__name:"BaseAudioElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"));return(e,t)=>{const a=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Fd,[(0,i.Wm)(a,{class:"audio-icon",style:(0,ae.j5)({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});const Zd=(0,Nl.Z)(Ad,[["__scopeId","data-v-5da834d7"]]);var $d=Zd,Od=(0,i.aZ)({__name:"ThumbnailElement",props:{elementInfo:{},elementIndex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Jc,[na.TEXT]:Kc,[na.SHAPE]:id,[na.LINE]:dd,[na.CHART]:md,[na.TABLE]:Id,[na.LATEX]:Ud,[na.VIDEO]:Hd,[na.AUDIO]:$d};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["base-element",`base-element-${e.elementInfo.id}`]),style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const Rd=Od;var Pd=Rd;const zd={key:1,class:"placeholder"};var Bd=(0,i.aZ)({__name:"index",props:{slide:{},size:{},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=hu(a),r=(0,i.Fl)((()=>t.size/la));return(0,i.JJ)(Sn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-slide",style:(0,ae.j5)({width:e.size+"px",height:e.size*(0,s.SU)(l)+"px"})},[e.visible?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"elements",style:(0,ae.j5)({width:(0,s.SU)(la)+"px",height:(0,s.SU)(la)*(0,s.SU)(l)+"px",transform:`scale(${r.value})`})},[(0,i._)("div",{class:"background",style:(0,ae.j5)((0,s.SU)(n))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((e,t)=>((0,i.wg)(),(0,i.j4)(Pd,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"])))),128))],4)):((0,i.wg)(),(0,i.iD)("div",zd,"加载中 ..."))],4))}});const Nd=(0,Nl.Z)(Bd,[["__scopeId","data-v-43dcaa52"]]);var jd=Nd;const Yd=["onClick"];var Vd=(0,i.aZ)({__name:"Tabs",props:{value:{},tabs:{},card:{type:Boolean,default:!1},tabsStyle:{},tabStyle:{},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:(0,ae.j5)(e.tabsStyle||{})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.tabs,(l=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["tab",{active:l.key===e.value}]),key:l.key,style:(0,ae.j5)({...e.tabStyle||{},"--color":l.color}),onClick:e=>t("update:value",l.key)},(0,ae.zw)(l.label),15,Yd)))),128))],6))}});const Jd=(0,Nl.Z)(Vd,[["__scopeId","data-v-5e3d7626"]]);var qd=Jd,Xd=(0,i.aZ)({__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"default"},size:{default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const l=e,a=()=>{l.disabled||t("click")};return(e,t)=>((0,i.wg)(),(0,i.iD)("button",{class:(0,ae.C_)(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&"default"===e.type,primary:!e.disabled&&"primary"===e.type,checkbox:!e.disabled&&"checkbox"===e.type,radio:!e.disabled&&"radio"===e.type,small:"small"===e.size,first:e.first,last:e.last}]),onClick:t[0]||(t[0]=e=>a())},[(0,i.WI)(e.$slots,"default")],2))}});const Gd=(0,Nl.Z)(Xd,[["__scopeId","data-v-52c90330"]]);var Kd=Gd;const Qd={key:0,class:"select-wrap"},ep={class:"selector"},tp={class:"icon"},lp=["onClick"],ap={class:"selector"},np={class:"icon"};var op=(0,i.aZ)({__name:"Select",props:{value:{},options:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.options.find((e=>e.value===l.value))?.label||l.value)),n=(0,s.iH)(!1),o=(0,s.iH)(),r=(0,s.iH)(0),u=()=>{o.value&&(r.value=o.value.clientWidth)},c=new ResizeObserver(u);(0,i.bv)((()=>{o.value&&c.observe(o.value)})),(0,i.Ah)((()=>{o.value&&c.unobserve(o.value)}));const d=e=>{e.disabled||(t("update:value",e.value),n.value=!1)};return(e,t)=>{const l=(0,i.up)("IconDown");return e.disabled?((0,i.wg)(),(0,i.iD)("div",Qd,[(0,i._)("div",{class:"select disabled",ref_key:"selectRef",ref:o},[(0,i._)("div",ep,(0,ae.zw)(e.value),1),(0,i._)("div",tp,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])):((0,i.wg)(),(0,i.j4)(rn,{key:1,class:"select-wrap",trigger:"click",value:n.value,"onUpdate:value":t[0]||(t[0]=e=>n.value=e),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:(0,i.w5)((()=>[(0,i._)("div",{class:"options",style:(0,ae.j5)({width:r.value+2+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.options,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["option",{disabled:t.disabled,selected:t.value===e.value}]),key:t.value,onClick:e=>d(t)},(0,ae.zw)(t.label),11,lp)))),128))],4)])),default:(0,i.w5)((()=>[(0,i._)("div",{class:"select",ref_key:"selectRef",ref:o},[(0,i._)("div",ap,(0,ae.zw)(a.value),1),(0,i._)("div",np,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])),_:3},8,["value","contentStyle"]))}}});const ip=(0,Nl.Z)(op,[["__scopeId","data-v-5bf3b141"]]);var sp=ip;const rp=e=>((0,i.dD)("data-v-cc39ee16"),e=e(),(0,i.Cn)(),e),up={class:"link-dialog"},cp={key:2,class:"preview"},dp=rp((()=>(0,i._)("div",null,"预览:",-1))),pp={class:"btns"};var vp=(0,i.aZ)({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){const{handleElement:l}=(0,o.Jk)($()),{slides:a,currentSlide:n}=(0,o.Jk)(F()),r=(0,s.iH)("web"),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,i.Fl)((()=>a.value.map(((e,t)=>({label:`幻灯片 ${t+1}`,value:e.id,disabled:n.value.id===e.id})))));c.value=a.value.find((e=>e.id!==n.value.id))?.id||"";const p=(0,i.Fl)((()=>c.value&&a.value.find((e=>e.id===c.value))||null)),v=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:m}=Wc();(0,i.bv)((()=>{l.value?.link&&("web"===l.value.link.type?u.value=l.value.link.target:"slide"===l.value.link.type&&(c.value=l.value.link.target),r.value=l.value.link.type)}));const h=()=>{const e={type:r.value,target:"web"===r.value?u.value:c.value};if(l.value){const a=m(l.value,e);a?t("close"):u.value=""}};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",up,[(0,i.Wm)(qd,{tabs:v,value:r.value,"onUpdate:value":l[0]||(l[0]=e=>r.value=e),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),"web"===r.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"input",value:u.value,"onUpdate:value":l[1]||(l[1]=e=>u.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):(0,i.kq)("",!0),"slide"===r.value?((0,i.wg)(),(0,i.j4)(sp,{key:1,class:"input",value:c.value,"onUpdate:value":l[2]||(l[2]=e=>c.value=e),options:d.value},null,8,["value","options"])):(0,i.kq)("",!0),"slide"===r.value&&p.value?((0,i.wg)(),(0,i.iD)("div",cp,[dp,(0,i.Wm)(jd,{class:"thumbnail",slide:p.value,size:500},null,8,["slide"])])):(0,i.kq)("",!0),(0,i._)("div",pp,[(0,i.Wm)(Kd,{onClick:l[3]||(l[3]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Kd,{type:"primary",onClick:l[4]||(l[4]=e=>h())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])]))}});const mp=(0,Nl.Z)(vp,[["__scopeId","data-v-cc39ee16"]]);var hp=mp,fp=(0,i.aZ)({__name:"Modal",props:{visible:{type:Boolean},width:{default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{}},emits:["update:visible","closed"],setup(e,{emit:t}){const l=e,{IconClose:a}=Fl,o=(0,s.iH)(),r=(0,s.iH)(!1),u=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));(0,i.YP)((()=>l.visible),(()=>{l.visible&&(0,i.Y3)((()=>o.value.focus()))}));const c=()=>{t("update:visible",!1),t("closed")},d=()=>{l.visible&&l.closeOnEsc&&c()},p=()=>{l.closeOnClickMask&&c()};return(e,t)=>((0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:"modal-fade"},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal",ref_key:"modalRef",ref:o,tabindex:"-1",onKeyup:t[4]||(t[4]=(0,n.D2)((e=>d()),["esc"]))},[(0,i._)("div",{class:"mask",onClick:t[0]||(t[0]=e=>p())}),(0,i.Wm)(n.uT,{name:"modal-zoom",onAfterLeave:t[2]||(t[2]=e=>r.value=!1),onBeforeEnter:t[3]||(t[3]=e=>r.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal-content",style:(0,ae.j5)(u.value)},[e.closeButton?((0,i.wg)(),(0,i.iD)("span",{key:0,class:"close-btn",onClick:t[1]||(t[1]=e=>c())},[(0,i.Wm)((0,s.SU)(a))])):(0,i.kq)("",!0),r.value?(0,i.WI)(e.$slots,"default",{key:1}):(0,i.kq)("",!0)],4),[[n.F8,e.visible]])])),_:3})],544),[[n.F8,e.visible]])])),_:3})]))}});const gp=(0,Nl.Z)(fp,[["__scopeId","data-v-fea8edcc"]]);var yp=gp;const wp={class:"operates"},xp={key:2,class:"drag-mask"};var kp=(0,i.aZ)({__name:"index",setup(e){const t=$(),{activeElementIdList:l,activeGroupElementId:a,handleElementId:r,hiddenElementIdList:u,editorAreaFocus:c,gridLineSize:d,showRuler:p,creatingElement:v,creatingCustomShape:m,canvasScale:h,textFormatPainter:f}=(0,o.Jk)(t),{currentSlide:g}=(0,o.Jk)(F()),{ctrlKeyState:y,spaceKeyState:w}=(0,o.Jk)(V()),x=(0,s.iH)(),k=(0,s.iH)([]),b=(0,s.iH)(!1),_=()=>b.value=!0;(0,i.YP)(r,(()=>{t.setActiveGroupElementId("")}));const I=(0,s.iH)([]),S=()=>{I.value=g.value?JSON.parse(JSON.stringify(g.value.elements)):[]};(0,i.m0)(S);const C=(0,s.iH)(),{dragViewport:L,viewportStyles:E}=Tn(C);Un(C);const{mouseSelection:T,mouseSelectionVisible:M,mouseSelectionQuadrant:W,updateMouseSelection:D}=Mn(I,x),{dragElement:H}=zn(I,k,h),{dragLineElement:A}=Bn(I),{selectElement:Z}=Pn(I,H),{scaleElement:O,scaleMultiElement:R}=Rn(I,k,h),{rotateElement:P}=Dn(I,x,h),{moveShapeKeypoint:z}=Nn(I,h),{selectAllElement:B}=ga(),{deleteAllElements:N}=ma(),{pasteElement:j}=fa(),{enterScreeningFromStart:Y}=_a(),{updateSlideIndex:J}=pa(),{createTextElement:q,createShapeElement:X}=ua();(0,i.bv)((()=>{l.value.length&&(0,i.Y3)((()=>t.setActiveElementIdList([])))}));const G=e=>{l.value.length&&t.setActiveElementIdList([]),w.value?L(e):D(e),c.value||t.setEditorareaFocus(!0),f.value&&t.setTextFormatPainter(null),En()},K=e=>{if(l.value.length||v.value||m.value)return;if(!x.value)return;const t=x.value.getBoundingClientRect(),a=(e.pageX-t.x)/h.value,n=(e.pageY-t.y)/h.value;q({left:a,top:n,width:200/h.value,height:0})};(0,i.Ah)((()=>{f.value&&t.setTextFormatPainter(null)}));const Q=()=>{c.value&&t.setEditorareaFocus(!1)},{scaleCanvas:ee}=Ia(),te=(0,U.throttle)(ee,100,{leading:!0,trailing:!1}),ne=(0,U.throttle)(J,300,{leading:!0,trailing:!1}),oe=e=>{e.preventDefault(),y.value?e.deltaY>0?te("-"):e.deltaY<0&&te("+"):e.deltaY>0?ne(le.DOWN):e.deltaY<0&&ne(le.UP)},ie=()=>{t.setRulerState(!p.value)},{insertElementFromCreateSelection:se,formatCreateSelection:re}=jn(x),ue=e=>{const{start:l,end:a,path:n,viewBox:o}=e,i=re({start:l,end:a});i&&X(i,{path:n,viewBox:o}),t.setCreatingCustomShapeState(!1)},ce=()=>[{text:"粘贴",subText:"Ctrl + V",handler:j},{text:"全选",subText:"Ctrl + A",handler:B},{text:"标尺",subText:p.value?"√":"",handler:ie},{text:"网格线",handler:()=>t.setGridLineSize(d.value?0:50),children:[{text:"无",subText:0===d.value?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:25===d.value?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:50===d.value?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:100===d.value?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:"重置当前页",handler:N},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:Y}];return(0,i.JJ)(Sn,h),(e,t)=>{const o=(0,i.Q2)("contextmenu"),c=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"canvas",ref_key:"canvasRef",ref:C,onWheel:t[4]||(t[4]=e=>oe(e)),onMousedown:t[5]||(t[5]=e=>G(e)),onDblclick:t[6]||(t[6]=e=>K(e))},[(0,s.SU)(v)?((0,i.wg)(),(0,i.j4)(Mu,{key:0,onCreated:t[0]||(t[0]=e=>(0,s.SU)(se)(e))})):(0,i.kq)("",!0),(0,s.SU)(m)?((0,i.wg)(),(0,i.j4)(Fu,{key:1,onCreated:t[1]||(t[1]=e=>ue(e))})):(0,i.kq)("",!0),(0,i._)("div",{class:"viewport-wrapper",style:(0,ae.j5)({width:(0,s.SU)(E).width*(0,s.SU)(h)+"px",height:(0,s.SU)(E).height*(0,s.SU)(h)+"px",left:(0,s.SU)(E).left+"px",top:(0,s.SU)(E).top+"px"})},[(0,i._)("div",wp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(k.value,((e,t)=>((0,i.wg)(),(0,i.j4)(ku,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:(0,s.SU)(h)},null,8,["type","axis","length","canvasScale"])))),128)),(0,s.SU)(l).length>1?((0,i.wg)(),(0,i.j4)(ju,{key:0,elementList:I.value,scaleMultiElement:(0,s.SU)(R)},null,8,["elementList","scaleMultiElement"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,(e=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nc,{key:e.id,elementInfo:e,isSelected:(0,s.SU)(l).includes(e.id),isActive:(0,s.SU)(r)===e.id,isActiveGroupElement:(0,s.SU)(a)===e.id,isMultiSelect:(0,s.SU)(l).length>1,rotateElement:(0,s.SU)(P),scaleElement:(0,s.SU)(O),openLinkDialog:_,dragLineElement:(0,s.SU)(A),moveShapeKeypoint:(0,s.SU)(z)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128)),(0,i.Wm)(yu)]),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:x,style:(0,ae.j5)({transform:`scale(${(0,s.SU)(h)})`})},[(0,s.SU)(M)?((0,i.wg)(),(0,i.j4)(uu,{key:0,top:(0,s.SU)(T).top,left:(0,s.SU)(T).left,width:(0,s.SU)(T).width,height:(0,s.SU)(T).height,quadrant:(0,s.SU)(W)},null,8,["top","left","width","height","quadrant"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,((e,t)=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(iu,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:(0,s.SU)(l).length>1,selectElement:(0,s.SU)(Z),openLinkDialog:_},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128))],4)],4),(0,s.SU)(w)?((0,i.wg)(),(0,i.iD)("div",xp)):(0,i.kq)("",!0),(0,s.SU)(p)?((0,i.wg)(),(0,i.j4)(Su,{key:3,viewportStyles:(0,s.SU)(E)},null,8,["viewportStyles"])):(0,i.kq)("",!0),(0,i.Wm)(yp,{visible:b.value,"onUpdate:visible":t[3]||(t[3]=e=>b.value=e),width:540},{default:(0,i.w5)((()=>[(0,i.Wm)(hp,{onClose:t[2]||(t[2]=e=>b.value=!1)})])),_:1},8,["visible"])],32)),[[o,ce],[c,Q]])}}});const bp=(0,Nl.Z)(kp,[["__scopeId","data-v-ce64755c"]]);var _p=bp;const Ip={class:"shape-item-thumbnail"},Sp={class:"shape-content"},Cp={overflow:"visible",width:"18",height:"18"},Lp=["transform"],Ep=["fill","stroke","d"];var Tp=(0,i.aZ)({__name:"ShapeItemThumbnail",props:{shape:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ip,[(0,i._)("div",Sp,[((0,i.wg)(),(0,i.iD)("svg",Cp,[(0,i._)("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:(0,ae.C_)(["shape-path",{outlined:e.shape.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.shape.outlined?"#999":"transparent",stroke:e.shape.outlined?"transparent":"#999","stroke-width":"2",d:e.shape.path},null,10,Ep)],8,Lp)]))])]))}});const Mp=(0,Nl.Z)(Tp,[["__scopeId","data-v-8603ad34"]]);var Up=Mp;const Wp={class:"shape-pool"},Dp={class:"category-name"},Hp={class:"shape-list"};var Fp=(0,i.aZ)({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Wp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ia),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Dp,(0,ae.zw)(e.type),1),(0,i._)("div",Hp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.j4)(Up,{class:"shape-item",key:t,shape:e,onClick:t=>l(e)},null,8,["shape","onClick"])))),128))])])))),128))]))}});const Ap=(0,Nl.Z)(Fp,[["__scopeId","data-v-8b994b42"]]);var Zp=Ap;const $p=[{type:"直线",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"]}]},{type:"折线、曲线",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0}]}],Op={class:"line-pool"},Rp={class:"category-name"},Pp={class:"line-list"},zp=["onClick"],Bp={overflow:"visible",width:"20",height:"20"},Np=["d","stroke-dasharray","marker-start","marker-end"];var jp=(0,i.aZ)({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Op,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)($p),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Rp,(0,ae.zw)(e.type),1),(0,i._)("div",Pp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"line-item",key:a},[(0,i._)("div",{class:"line-content",onClick:t=>l(e)},[((0,i.wg)(),(0,i.iD)("svg",Bp,[(0,i._)("defs",null,[e.points[0]?((0,i.wg)(),(0,i.j4)(xs,{key:0,class:"line-marker",id:`preset-line-${t}-${a}`,position:"start",type:e.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0),e.points[1]?((0,i.wg)(),(0,i.j4)(xs,{key:1,class:"line-marker",id:`preset-line-${t}-${a}`,position:"end",type:e.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-path",d:e.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":"solid"===e.style?"0, 0":"4, 1","marker-start":e.points[0]?`url(#preset-line-${t}-${a}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${a}-${e.points[1]}-end)`:""},null,8,Np)]))],8,zp)])))),128))])])))),128))]))}});const Yp=(0,Nl.Z)(jp,[["__scopeId","data-v-554824b6"]]);var Vp=Yp;const Jp={class:"chart-pool"},qp=["onClick"];var Xp=(0,i.aZ)({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=["bar","horizontalBar","line","area","scatter","pie","ring"],a=e=>{t("select",e)};return(e,t)=>{const n=(0,i.up)("IconChartLine"),o=(0,i.up)("IconChartHistogram"),s=(0,i.up)("IconChartPie"),r=(0,i.up)("IconChartHistogramOne"),u=(0,i.up)("IconChartLineArea"),c=(0,i.up)("IconChartRing"),d=(0,i.up)("IconChartScatter");return(0,i.wg)(),(0,i.iD)("ul",Jp,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,((e,t)=>(0,i._)("li",{class:"chart-item",key:t},[(0,i._)("div",{class:"chart-content",onClick:t=>a(e)},["line"===e?((0,i.wg)(),(0,i.j4)(n,{key:0,size:"24"})):"bar"===e?((0,i.wg)(),(0,i.j4)(o,{key:1,size:"24"})):"pie"===e?((0,i.wg)(),(0,i.j4)(s,{key:2,size:"24"})):"horizontalBar"===e?((0,i.wg)(),(0,i.j4)(r,{key:3,size:"24"})):"area"===e?((0,i.wg)(),(0,i.j4)(u,{key:4,size:"24"})):"ring"===e?((0,i.wg)(),(0,i.j4)(c,{key:5,size:"24"})):"scatter"===e?((0,i.wg)(),(0,i.j4)(d,{key:6,size:"24"})):(0,i.kq)("",!0)],8,qp)]))),64))])}}});const Gp=(0,Nl.Z)(Xp,[["__scopeId","data-v-398f5699"]]);var Kp=Gp;const Qp=e=>((0,i.dD)("data-v-268948c2"),e=e(),(0,i.Cn)(),e),ev={class:"prefix"},tv={class:"input-wrap"},lv=["disabled","placeholder"],av={class:"handlers"},nv=Qp((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"})],-1))),ov=[nv],iv=Qp((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})],-1))),sv=[iv],rv={class:"suffix"};var uv=(0,i.aZ)({__name:"NumberInput",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""},min:{default:0},max:{default:1/0},step:{default:1}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),o=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{l.value!==a.value&&(a.value=l.value)}),{immediate:!0}),(0,i.YP)(a,(()=>{let e=+a.value;isNaN(e)?e=l.min:e>l.max?e=l.max:e{o.value=!1,t("blur",e)},u=e=>{o.value=!0,t("focus",e)};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["number-input",{disabled:e.disabled,focused:o.value}])},[(0,i._)("span",ev,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("div",tv,[(0,i.wy)((0,i._)("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),placeholder:e.placeholder,onInput:l[1]||(l[1]=e=>t("input",e)),onFocus:l[2]||(l[2]=e=>u(e)),onBlur:l[3]||(l[3]=e=>r(e)),onChange:l[4]||(l[4]=e=>t("change",e)),onKeydown:l[5]||(l[5]=(0,n.D2)((e=>t("enter",e)),["enter"]))},null,40,lv),[[n.nr,a.value]]),(0,i._)("div",av,[(0,i._)("span",{class:"handler",onClick:l[6]||(l[6]=t=>a.value+=e.step)},ov),(0,i._)("span",{class:"handler",onClick:l[7]||(l[7]=t=>a.value-=e.step)},sv)])]),(0,i._)("span",rv,[(0,i.WI)(e.$slots,"suffix")])],2))}});const cv=(0,Nl.Z)(uv,[["__scopeId","data-v-268948c2"]]);var dv=cv;const pv=e=>((0,i.dD)("data-v-372c6730"),e=e(),(0,i.Cn)(),e),vv={class:"table-generator"},mv={class:"title"},hv={class:"lef"},fv=["onMouseenter"],gv={key:1,class:"custom"},yv={class:"row"},wv=pv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"行数:",-1))),xv={class:"row"},kv=pv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"列数:",-1))),bv={class:"btns"};var _v=(0,i.aZ)({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=(0,s.iH)([]),a=(0,s.iH)(3),n=(0,s.iH)(3),o=(0,s.iH)(!1),r=()=>{if(!l.value.length)return;const[e,a]=l.value;t("insert",{row:e,col:a})},u=()=>a.value<1||a.value>20||n.value<1||n.value>20?Kl.warning("行数/列数必须在0~20之间!"):(t("insert",{row:a.value,col:n.value}),void(o.value=!1)),c=()=>{t("close"),o.value=!1};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",vv,[(0,i._)("div",mv,[(0,i._)("div",hv,"表格 "+(0,ae.zw)(l.value.length?`${l.value[0]} x ${l.value[1]}`:""),1),(0,i._)("div",{class:"right",onClick:t[0]||(t[0]=e=>o.value=!o.value)},(0,ae.zw)(o.value?"返回":"自定义"),1)]),o.value?((0,i.wg)(),(0,i.iD)("div",gv,[(0,i._)("div",yv,[wv,(0,i.Wm)(dv,{min:1,max:20,value:a.value,"onUpdate:value":t[3]||(t[3]=e=>a.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",xv,[kv,(0,i.Wm)(dv,{min:1,max:20,value:n.value,"onUpdate:value":t[4]||(t[4]=e=>n.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",bv,[(0,i.Wm)(Kd,{class:"btn",onClick:t[5]||(t[5]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Kd,{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])):((0,i.wg)(),(0,i.iD)("table",{key:0,onMouseleave:t[1]||(t[1]=e=>l.value=[]),onClick:t[2]||(t[2]=e=>r())},[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(t=>(0,i._)("td",{onMouseenter:a=>l.value=[e,t],key:t},[(0,i._)("div",{class:(0,ae.C_)(["cell",{active:l.value.length&&e<=l.value[0]&&t<=l.value[1]}])},null,2)],40,fv))),64))]))),64))])],32))]))}});const Iv=(0,Nl.Z)(_v,[["__scopeId","data-v-372c6730"]]);var Sv=Iv;const Cv={class:"media-input"},Lv={class:"btns"},Ev={class:"btns"};var Tv=(0,i.aZ)({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=(0,s.iH)("video"),a=(0,s.iH)("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),n=(0,s.iH)("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),o=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],r=()=>{if(!a.value)return Kl.error("请先输入正确的视频地址");t("insertVideo",a.value)},u=()=>{if(!n.value)return Kl.error("请先输入正确的音频地址");t("insertAudio",n.value)};return(e,s)=>((0,i.wg)(),(0,i.iD)("div",Cv,[(0,i.Wm)(qd,{tabs:o,value:l.value,"onUpdate:value":s[0]||(s[0]=e=>l.value=e),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),"video"===l.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i.Wm)(an,{value:a.value,"onUpdate:value":s[1]||(s[1]=e=>a.value=e),placeholder:"请输入视频地址,e.g. https://xxx.mp4"},null,8,["value"]),(0,i._)("div",Lv,[(0,i.Wm)(Kd,{onClick:s[2]||(s[2]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Kd,{type:"primary",onClick:s[3]||(s[3]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0),"audio"===l.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(an,{value:n.value,"onUpdate:value":s[4]||(s[4]=e=>n.value=e),placeholder:"请输入音频地址,e.g. https://xxx.mp3"},null,8,["value"]),(0,i._)("div",Ev,[(0,i.Wm)(Kd,{onClick:s[5]||(s[5]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Kd,{type:"primary",onClick:s[6]||(s[6]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Mv=(0,Nl.Z)(Tv,[["__scopeId","data-v-35a1214c"]]);var Uv=Mv,Wv=l(3576);Wv.kh.SUB_SUP_SCALE=.5;const Dv=[{label:"高斯公式",latex:"\\int\\int\\int _ { \\Omega } \\left( \\frac { \\partial {P} } { \\partial {x} } + \\frac { \\partial {Q} } { \\partial {y} } + \\frac { \\partial {R} }{ \\partial {z} } \\right) \\mathrm { d } V = \\oint _ { \\partial \\Omega } ( P \\cos \\alpha + Q \\cos \\beta + R \\cos \\gamma ) \\mathrm{ d} S"},{label:"傅里叶级数",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",latex:"\\lim_ { n \\rightarrow + \\infty } \\sum _ { i = 1 } ^ { n } f \\left[ a + \\frac { i } { n } ( b - a ) \\right] \\frac { b - a } { n } = \\int _ { a } ^ { b } f ( x ) dx"},{label:"三角恒等式1",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],Hv=[{type:"operators",label:"数学",children:[{latex:"\\cdot"},{latex:"\\pm"},{latex:"\\mp"},{latex:"+"},{latex:"-"},{latex:"\\times"},{latex:"\\div"},{latex:"<"},{latex:">"},{latex:"="},{latex:"\\neq\\ne"},{latex:"\\leqq"},{latex:"\\geqq"},{latex:"\\leq"},{latex:"\\geq"},{latex:"\\propto"},{latex:"\\sim"},{latex:"\\equiv"},{latex:"\\dagger"},{latex:"\\ddagger"},{latex:"\\ell"},{latex:"\\#"},{latex:"\\$"},{latex:"\\&"},{latex:"\\%"},{latex:"\\langle\\rangle"},{latex:"()"},{latex:"[]"},{latex:"\\{\\}"},{latex:"||"},{latex:"\\|"},{latex:"\\exists"},{latex:"\\in"},{latex:"\\subset"},{latex:"\\supset"},{latex:"\\cup"},{latex:"\\cap"},{latex:"\\infty"},{latex:"\\partial"},{latex:"\\nabla"},{latex:"\\aleph"},{latex:"\\wp"},{latex:"\\therefore"},{latex:"\\mid"},{latex:"\\sum"},{latex:"\\prod"},{latex:"\\bigoplus"},{latex:"\\bigodot"},{latex:"\\int"},{latex:"\\oint"},{latex:"\\oplus"},{latex:"\\odot"},{latex:"\\perp"},{latex:"\\angle"},{latex:"\\triangle"},{latex:"\\Box"},{latex:"\\rightarrow"},{latex:"\\to"},{latex:"\\leftarrow"},{latex:"\\gets"},{latex:"\\circ"},{latex:"\\bigcirc"},{latex:"\\bullet"},{latex:"\\star"},{latex:"\\diamond"},{latex:"\\ast"},{latex:","},{latex:"."},{latex:";"},{latex:"!"}]},{type:"group",label:"组合",children:[{latex:"\\frac{a}{b}"},{latex:"\\frac{dx}{dx}"},{latex:"\\frac{\\partial a}{\\partial b}"},{latex:"\\sqrt{x}"},{latex:"\\sqrt[n]{x}"},{latex:"x^{n}"},{latex:"x_{n}"},{latex:"x_a^b"},{latex:"\\int_{a}^{b}"},{latex:"\\oint_a^b"},{latex:"\\lim_{a \\rightarrow b}"},{latex:"\\prod_a^b"},{latex:"\\sum_a^b"},{latex:"\\left(\\begin{array}a \\\\ b\\end{array}\\right)"},{latex:"\\begin{bmatrix}a & b \\\\ c & d \\end{bmatrix}"},{latex:"\\begin{cases}a & x = 0 \\\\ b & x > 0\\end{cases}"},{latex:"\\hat{a}"},{latex:"\\breve{a}"},{latex:"\\acute{a}"},{latex:"\\grave{a}"},{latex:"\\tilde{a}"},{latex:"\\bar{a}"},{latex:"\\vec{a}"},{latex:"\\underline{a}"},{latex:"\\overline{a}"},{latex:"\\widehat{ab}"},{latex:"\\overleftarrow{ab}"},{latex:"\\overrightarrow{ab}"}]},{type:"verbatim",label:"函数",children:[{latex:"\\log"},{latex:"\\ln"},{latex:"\\exp"},{latex:"\\mod"},{latex:"\\lim"},{latex:"\\sin"},{latex:"\\cos"},{latex:"\\tan"},{latex:"\\csc"},{latex:"\\sec"},{latex:"\\cot"},{latex:"\\sinh"},{latex:"\\cosh"},{latex:"\\tanh"},{latex:"\\csch"},{latex:"\\sech"},{latex:"\\coth"},{latex:"\\arcsin"},{latex:"\\arccos"},{latex:"\\arctan"},{latex:"\\arccsc"},{latex:"\\arcsec"},{latex:"\\arccot"}]},{type:"greek",label:"希腊字母",children:[{latex:"\\alpha"},{latex:"\\beta"},{latex:"\\gamma"},{latex:"\\delta"},{latex:"\\varepsilon"},{latex:"\\zeta"},{latex:"\\eta"},{latex:"\\vartheta"},{latex:"\\iota"},{latex:"\\kappa"},{latex:"\\lambda"},{latex:"\\mu"},{latex:"\\nu"},{latex:"\\xi"},{latex:"\\omicron"},{latex:"\\pi"},{latex:"\\rho"},{latex:"\\sigma"},{latex:"\\tau"},{latex:"\\upsilon"},{latex:"\\varphi"},{latex:"\\chi"},{latex:"\\psi"},{latex:"\\omega"},{latex:"\\epsilon"},{latex:"\\theta"},{latex:"\\phi"},{latex:"\\varsigma"},{latex:"\\Alpha"},{latex:"\\Beta"},{latex:"\\Gamma"},{latex:"\\Delta"},{latex:"\\Epsilon"},{latex:"\\Zeta"},{latex:"\\Eta"},{latex:"\\Theta"},{latex:"\\Iota"},{latex:"\\Kappa"},{latex:"\\Lambda"},{latex:"\\Mu"},{latex:"\\Nu"},{latex:"\\Xi"},{latex:"\\Omicron"},{latex:"\\Pi"},{latex:"\\Rho"},{latex:"\\Sigma"},{latex:"\\Tau"},{latex:"\\Upsilon"},{latex:"\\Phi"},{latex:"\\Chi"},{latex:"\\Psi"},{latex:"\\Omega"}]}],Fv=["width","height"],Av=["transform"],Zv=["d"];var $v=(0,i.aZ)({__name:"FormulaContent",props:{latex:{},width:{},height:{}},setup(e){const t=e,l=(0,s.iH)({x:0,y:0,w:0,h:0}),a=(0,s.iH)("");(0,i.YP)((()=>t.latex),(()=>{const e=new Wv._q(t.latex);a.value=e.pathd({}),l.value=e.box({})}),{immediate:!0});const n=(0,i.Fl)((()=>{const e=l.value.w+32,a=l.value.h+32;return e>t.width||a>t.height?e/a>t.width/t.height?t.width/e:t.height/a:1}));return(e,t)=>((0,i.wg)(),(0,i.iD)("svg",{class:"formula-content",overflow:"visible",width:l.value.w+32,height:l.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${n.value}, ${n.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[(0,i._)("path",{d:a.value},null,8,Zv)],8,Av)],8,Fv))}});const Ov=(0,Nl.Z)($v,[["__scopeId","data-v-567417d3"]]);var Rv=Ov;const Pv=["innerHTML"];var zv=(0,i.aZ)({__name:"SymbolContent",props:{latex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=new Wv._q(t.latex);return e.svg({SCALE_X:10,SCALE_Y:10})}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-content",innerHTML:l.value},null,8,Pv))}});const Bv=zv;var Nv=Bv;const jv=["disabled","value","rows","placeholder"];var Yv=(0,i.aZ)({__name:"TextArea",props:{value:{},rows:{default:4},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value"],setup(e,{emit:t}){const l=e=>{t("update:value",e.target.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("textarea",{class:(0,ae.C_)(["textarea",{disabled:e.disabled,resizable:e.resizable}]),disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>l(e))},null,42,jv))}});const Vv=(0,Nl.Z)(Yv,[["__scopeId","data-v-326ac8a0"]]);var Jv=Vv;const qv={class:"latex-editor"},Xv={class:"container"},Gv={class:"left"},Kv={class:"input-area"},Qv={class:"preview"},em={key:0,class:"placeholder"},tm={key:1,class:"preview-content"},lm={class:"right"},am={class:"content"},nm={key:0,class:"symbol"},om={class:"symbol-pool"},im=["onClick"],sm={key:1,class:"formula"},rm={class:"formula-title"},um=["onClick"],cm={class:"footer"};var dm=(0,i.aZ)({__name:"index",props:{value:{default:""}},emits:["update","close"],setup(e,{emit:t}){const l=e,a=[{label:"常用符号",key:"symbol"},{label:"预置公式",key:"formula"}],n=Dv,o=Hv.map((e=>({label:e.label,key:e.type}))),r=(0,s.iH)(""),u=(0,s.iH)("symbol"),c=(0,s.iH)(),d=(0,s.iH)(Hv[0].type),p=(0,i.Fl)((()=>{const e=Hv.find((e=>e.type===d.value));return e?.children||[]}));(0,i.bv)((()=>{l.value&&(r.value=l.value)}));const v=()=>{if(!r.value)return Kl.error("公式不能为空");const e=new Wv._q(r.value),l=e.pathd({}),a=e.box({});t("update",{latex:r.value,path:l,w:a.w+32,h:a.h+32})},m=e=>{c.value&&(c.value.focus(),document.execCommand("insertText",!1,e))};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",qv,[(0,i._)("div",Xv,[(0,i._)("div",Gv,[(0,i._)("div",Kv,[(0,i.Wm)(Jv,{value:r.value,"onUpdate:value":l[0]||(l[0]=e=>r.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:c},null,8,["value"])]),(0,i._)("div",Qv,[r.value?((0,i.wg)(),(0,i.iD)("div",tm,[(0,i.Wm)(Rv,{width:518,height:138,latex:r.value},null,8,["latex"])])):((0,i.wg)(),(0,i.iD)("div",em,"公式预览"))])]),(0,i._)("div",lm,[(0,i.Wm)(qd,{tabs:a,value:u.value,"onUpdate:value":l[1]||(l[1]=e=>u.value=e),card:""},null,8,["value"]),(0,i._)("div",am,["symbol"===u.value?((0,i.wg)(),(0,i.iD)("div",nm,[(0,i.Wm)(qd,{tabs:(0,s.SU)(o),value:d.value,"onUpdate:value":l[2]||(l[2]=e=>d.value=e),spaceBetween:"",tabsStyle:{margin:"10px 10px 0"}},null,8,["tabs","value"]),(0,i._)("div",om,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:e.latex,onClick:t=>m(e.latex)},[(0,i.Wm)(Nv,{latex:e.latex},null,8,["latex"])],8,im)))),128))])])):((0,i.wg)(),(0,i.iD)("div",sm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(n),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"formula-item",key:e.label},[(0,i._)("div",rm,(0,ae.zw)(e.label),1),(0,i._)("div",{class:"formula-item-content",onClick:t=>r.value=e.latex},[(0,i.Wm)(Rv,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,um)])))),128))]))])])]),(0,i._)("div",cm,[(0,i.Wm)(Kd,{class:"btn",onClick:l[3]||(l[3]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Kd,{class:"btn",type:"primary",onClick:l[4]||(l[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Uk)("确定")])),_:1})])]))}});const pm=(0,Nl.Z)(dm,[["__scopeId","data-v-46e48b5e"]]);var vm=pm;const mm={class:"canvas-tool"},hm={class:"left-handler"},fm={class:"add-element-handler"},gm={class:"handler-item group-btn"},ym={class:"right-handler"},wm={class:"text"};var xm=(0,i.aZ)({__name:"index",setup(e){const t=$(),{creatingElement:l,creatingCustomShape:a,showSelectPanel:n,showSearchPanel:r}=(0,o.Jk)(t),{canUndo:u,canRedo:c}=(0,o.Jk)(Y()),{redo:d,undo:p}=ra(),{scaleCanvas:v,setCanvasScalePercentage:m,resetCanvas:h,canvasScalePercentage:f}=Ia(),g=[200,150,100,80,50],y=(0,s.iH)(!1),w=e=>{m(e),y.value=!1},{createImageElement:x,createChartElement:k,createTableElement:b,createLatexElement:_,createVideoElement:I,createAudioElement:S}=ua(),C=e=>{const t=e[0];t&&ta(t).then((e=>x(e)))},L=(0,s.iH)(!1),E=(0,s.iH)(!1),T=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},F=e=>{"任意多边形"===e.title?t.setCreatingCustomShapeState(!0):t.setCreatingElement({type:"shape",data:e}),L.value=!1},A=e=>{t.setCreatingElement({type:"line",data:e}),E.value=!1},Z=()=>{t.setSelectPanelState(!n.value)},O=()=>{t.setSearchPanelState(!r.value)};return(e,t)=>{const o=(0,i.up)("IconBack"),m=(0,i.up)("IconNext"),x=(0,i.up)("IconMoveOne"),$=(0,i.up)("IconSearch"),R=(0,i.up)("IconFontSize"),P=(0,i.up)("IconTextRotationNone"),z=(0,i.up)("IconTextRotationDown"),B=(0,i.up)("IconDown"),N=(0,i.up)("IconPicture"),j=(0,i.up)("IconGraphicDesign"),Y=(0,i.up)("IconConnection"),V=(0,i.up)("IconChartProportion"),J=(0,i.up)("IconInsertTable"),q=(0,i.up)("IconFormula"),X=(0,i.up)("IconVideoTwo"),G=(0,i.up)("IconMinus"),K=(0,i.up)("IconPlus"),Q=(0,i.up)("IconFullScreen"),ee=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",mm,[(0,i._)("div",hm,[(0,i.wy)((0,i.Wm)(o,{class:(0,ae.C_)(["handler-item",{disable:!(0,s.SU)(u)}]),onClick:t[0]||(t[0]=e=>(0,s.SU)(p)())},null,8,["class"]),[[ee,"撤销"]]),(0,i.wy)((0,i.Wm)(m,{class:(0,ae.C_)(["handler-item",{disable:!(0,s.SU)(c)}]),onClick:t[1]||(t[1]=e=>(0,s.SU)(d)())},null,8,["class"]),[[ee,"重做"]]),(0,i.Wm)(Fc,{type:"vertical",style:{height:"20px"}}),(0,i.wy)((0,i.Wm)(x,{class:(0,ae.C_)(["handler-item",{active:(0,s.SU)(n)}]),onClick:t[2]||(t[2]=e=>Z())},null,8,["class"]),[[ee,"选择窗格"]]),(0,i.wy)((0,i.Wm)($,{class:(0,ae.C_)(["handler-item",{active:(0,s.SU)(r)}]),onClick:t[3]||(t[3]=e=>O())},null,8,["class"]),[[ee,"查找/替换"]])]),(0,i._)("div",fm,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",gm,[(0,i.Wm)(R,{class:(0,ae.C_)(["icon",{active:"text"===(0,s.SU)(l)?.type}]),onClick:t[4]||(t[4]=e=>H())},null,8,["class"]),(0,i.Wm)(rn,{trigger:"click",value:D.value,"onUpdate:value":t[7]||(t[7]=e=>D.value=e),style:{height:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{center:"",onClick:t[5]||(t[5]=()=>{H(),D.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(P),(0,i.Uk)(" 横向文本框")])),_:1}),(0,i.Wm)(dn,{center:"",onClick:t[6]||(t[6]=()=>{H(!0),D.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(z),(0,i.Uk)(" 竖向文本框")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(B,{class:"arrow"})])),_:1},8,["value"])])),[[ee,"插入文字"]]),(0,i.Wm)(Oa,{onChange:t[8]||(t[8]=e=>C(e))},{default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(N,{class:"handler-item"},null,512),[[ee,"插入图片"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",value:L.value,"onUpdate:value":t[10]||(t[10]=e=>L.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Zp,{onSelect:t[9]||(t[9]=e=>F(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(j,{class:(0,ae.C_)(["handler-item",{active:(0,s.SU)(a)||"shape"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[ee,"插入形状"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:E.value,"onUpdate:value":t[12]||(t[12]=e=>E.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Vp,{onSelect:t[11]||(t[11]=e=>A(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(Y,{class:(0,ae.C_)(["handler-item",{active:"line"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[ee,"插入线条"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:T.value,"onUpdate:value":t[14]||(t[14]=e=>T.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Kp,{onSelect:t[13]||(t[13]=e=>{(0,s.SU)(k)(e),T.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(V,{class:"handler-item"},null,512),[[ee,"插入图表"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:M.value,"onUpdate:value":t[17]||(t[17]=e=>M.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Sv,{onClose:t[15]||(t[15]=e=>M.value=!1),onInsert:t[16]||(t[16]=({row:e,col:t})=>{(0,s.SU)(b)(e,t),M.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(J,{class:"handler-item"},null,512),[[ee,"插入表格"]])])),_:1},8,["value"]),(0,i.wy)((0,i.Wm)(q,{class:"handler-item",onClick:t[18]||(t[18]=e=>W.value=!0)},null,512),[[ee,"插入公式"]]),(0,i.Wm)(rn,{trigger:"click",value:U.value,"onUpdate:value":t[22]||(t[22]=e=>U.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Uv,{onClose:t[19]||(t[19]=e=>U.value=!1),onInsertVideo:t[20]||(t[20]=e=>{(0,s.SU)(I)(e),U.value=!1}),onInsertAudio:t[21]||(t[21]=e=>{(0,s.SU)(S)(e),U.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(X,{class:"handler-item"},null,512),[[ee,"插入音视频"]])])),_:1},8,["value"])]),(0,i._)("div",ym,[(0,i.Wm)(G,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>(0,s.SU)(v)("-"))}),(0,i.Wm)(rn,{trigger:"click",value:y.value,"onUpdate:value":t[24]||(t[24]=e=>y.value=e)},{content:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(g,(e=>(0,i.Wm)(dn,{center:"",key:e,onClick:t=>w(e)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ae.zw)(e)+"%",1)])),_:2},1032,["onClick"]))),64))])),default:(0,i.w5)((()=>[(0,i._)("span",wm,(0,ae.zw)((0,s.SU)(f)),1)])),_:1},8,["value"]),(0,i.Wm)(K,{class:"handler-item viewport-size",onClick:t[25]||(t[25]=e=>(0,s.SU)(v)("+"))}),(0,i.wy)((0,i.Wm)(Q,{class:"handler-item viewport-size-adaptation",onClick:t[26]||(t[26]=e=>(0,s.SU)(h)())},null,512),[[ee,"适应屏幕"]])]),(0,i.Wm)(yp,{visible:W.value,"onUpdate:visible":t[29]||(t[29]=e=>W.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(vm,{onClose:t[27]||(t[27]=e=>W.value=!1),onUpdate:t[28]||(t[28]=e=>{(0,s.SU)(_)(e),W.value=!1})})])),_:1},8,["visible"])])}}});const km=(0,Nl.Z)(xm,[["__scopeId","data-v-7e81f183"]]);var bm=km,_m=()=>{const{slides:e}=(0,o.Jk)(F()),t=(0,s.iH)(null),l=(0,s.iH)(50),a=()=>{e.value.length>l.value?t.value=setTimeout((()=>{l.value=l.value+20,a()}),600):l.value=9999};return(0,i.bv)(a),(0,i.Ah)((()=>{t.value&&clearTimeout(t.value)})),{slidesLoadLimit:l}};const Im={class:"layout-pool"},Sm=["onClick"];var Cm=(0,i.aZ)({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const{layouts:l}=(0,o.Jk)(F()),a=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Im,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"layout-item",key:e.id,onClick:t=>a(e)},[(0,i.Wm)(jd,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,Sm)))),128))]))}});const Lm=(0,Nl.Z)(Cm,[["__scopeId","data-v-8ee3e590"]]);var Em=Lm,Tm=l(9980),Mm=l.n(Tm);const Um={class:"add-slide"},Wm={class:"select-btn"},Dm=["onMousedown"],Hm={class:"page-number"};var Fm=(0,i.aZ)({__name:"index",setup(e){const t=$(),l=F(),a=V(),{selectedSlidesIndex:n,thumbnailsFocus:r}=(0,o.Jk)(t),{slides:u,slideIndex:c}=(0,o.Jk)(l),{ctrlKeyState:d,shiftKeyState:p}=(0,o.Jk)(a),{slidesLoadLimit:v}=_m(),m=(0,i.Fl)((()=>[...n.value,c.value])),h=(0,s.iH)(!1),{copySlide:f,pasteSlide:g,createSlide:y,createSlideByTemplate:w,copyAndPasteSlide:x,deleteSlide:k,cutSlide:b,selectAllSlide:_,sortSlides:I}=pa(),S=e=>{t.setActiveElementIdList([]),c.value!==e&&l.updateSlideIndex(e)},C=(e,l)=>{const a=m.value.length>1;if(!a||!m.value.includes(l)||0===e.button)if(d.value)if(c.value===l){if(!a)return;const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e),S(m.value[0])}else if(m.value.includes(l)){const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e)}else{const e=[...m.value,l];t.updateSelectedSlidesIndex(e),S(l)}else if(p.value){if(c.value===l&&!a)return;let e=Math.min(...m.value),n=l;l{r.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},E=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&I(t,l)},{enterScreening:T,enterScreeningFromStart:M}=_a(),U=()=>[{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{text:"新建页面",subText:"Enter",handler:y},{text:"幻灯片放映",subText:"F5",handler:M}],W=()=>[{text:"剪切",subText:"Ctrl + X",handler:b},{text:"复制",subText:"Ctrl + C",handler:f},{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{divider:!0},{text:"新建页面",subText:"Enter",handler:y},{text:"复制页面",subText:"Ctrl + D",handler:x},{text:"删除页面",subText:"Delete",handler:()=>k()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:T}];return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconDown"),n=(0,i.Q2)("contextmenu"),o=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"thumbnails",onMousedown:t[4]||(t[4]=()=>L(!0))},[(0,i._)("div",Um,[(0,i._)("div",{class:"btn",onClick:t[0]||(t[0]=e=>(0,s.SU)(y)())},[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)("添加幻灯片")]),(0,i.Wm)(rn,{trigger:"click",placement:"bottom-start",value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e),center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(Em,{onSelect:t[1]||(t[1]=e=>{(0,s.SU)(w)(e),h.value=!1})})])),default:(0,i.w5)((()=>[(0,i._)("div",Wm,[(0,i.Wm)(a)])])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(Mm()),{class:"thumbnail-list",modelValue:(0,s.SU)(u),animation:200,scroll:!0,scrollSensitivity:50,onEnd:E,itemKey:"id"},{item:(0,i.w5)((({element:e,index:l})=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail-item",{active:(0,s.SU)(c)===l,selected:m.value.includes(l)}]),onMousedown:e=>C(e,l),onDblclick:t[3]||(t[3]=e=>(0,s.SU)(T)())},[(0,i._)("div",{class:(0,ae.C_)(["label",{"offset-left":l>=99}])},(0,ae.zw)((0,s.SU)(q)(l+1,2)),3),(0,i.Wm)(jd,{class:"thumbnail",slide:e,size:120,visible:l<(0,s.SU)(v)},null,8,["slide","visible"])],42,Dm)),[[n,W]])])),_:1},8,["modelValue"]),(0,i._)("div",Hm,"幻灯片 "+(0,ae.zw)((0,s.SU)(c)+1)+" / "+(0,ae.zw)((0,s.SU)(u).length),1)],32)),[[o,()=>L(!1)],[n,U]])}}});const Am=(0,Nl.Z)(Fm,[["__scopeId","data-v-d525da14"]]);var Zm=Am,$m=()=>{const e=$(),{richTextAttrs:t,textFormatPainter:l}=(0,o.Jk)(e),a=(a=!1)=>{l.value?e.setTextFormatPainter(null):e.setTextFormatPainter({keep:a,bold:t.value.bold,em:t.value.em,underline:t.value.underline,strikethrough:t.value.strikethrough,color:t.value.color,backcolor:t.value.backcolor,fontname:t.value.fontname,fontsize:t.value.fontsize,align:t.value.align})};return{toggleTextFormatPainter:a}},Om=l(8374);const Rm={class:"bar"},Pm=["data-tooltip"],zm=["data-tooltip"],Bm=["data-tooltip"];var Nm=(0,i.aZ)({__name:"Slider",props:{value:{},disabled:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)("end"),d=e=>{let t=e/100*(l.max-l.min);if(l.step>=1)t=Math.fround(t);else{const e=l.step.toString(),a=e.match(/^[0.]*([1-9])/);if(a){const l=a[1],n=e.indexOf(l)-1;if(n>0){const e=Math.pow(10,n);t=Math.fround(t*e)/e}}}return Om.ZP.plus(t,l.min)},p=(0,i.Fl)((()=>d(o.value))),v=(0,i.Fl)((()=>d(r.value))),m=(0,i.Fl)((()=>d(u.value)));(0,i.YP)((()=>l.value),(()=>{l.max!==l.min&&("number"===typeof l.value?o.value=(l.value-l.min)/(l.max-l.min)*100:(r.value=(l.value[0]-l.min)/(l.max-l.min)*100,u.value=(l.value[1]-l.min)/(l.max-l.min)*100))}),{immediate:!0});const h=e=>{if(!n.value)return 0;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let o=(t-a(n.value))/n.value.clientWidth;o=Math.max(o,0),o=Math.min(o,1);let i=100*o;const s=l.step/(l.max-l.min)*100,r=i%s;return r>0&&(r<=s/2?i-=r:i=i-r+s),i},f=e=>{const t=h(e);"start"===c.value?r.value=t:u.value=t},g=e=>{y(e);const a=d(o.value),n=l.value,i="start"===c.value?[a,n[1]]:[n[0],a];i[0]>i[1]&&([i[0],i[1]]=[i[1],i[0]]),t("update:value",i),document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",f),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)},y=e=>{o.value=h(e)},w=e=>{y(e);const l=d(o.value);t("update:value",l),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y),document.removeEventListener("mouseup",w),document.removeEventListener("touchend",w)},x=e=>{if(!l.disabled)if(l.range){const t=h(e);Math.abs(t-r.value)((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:n,onMousedown:t[0]||(t[0]=e=>x(e))},[(0,i._)("div",Rm,[e.range?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",{class:"track",style:(0,ae.j5)({width:u.value-r.value+"%",left:`${r.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${r.value}%`}),"data-tooltip":v.value},null,12,zm),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${u.value}%`}),"data-tooltip":m.value},null,12,Bm)],64)):((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"track",style:(0,ae.j5)({width:`${o.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${o.value}%`}),"data-tooltip":p.value},null,12,Pm)],64))])],34))}});const jm=(0,Nl.Z)(Nm,[["__scopeId","data-v-563bd2a0"]]);var Ym=jm;const Vm=e=>((0,i.dD)("data-v-03715c20"),e=e(),(0,i.Cn)(),e),Jm={class:"element-opacity"},qm={class:"row"},Xm=Vm((()=>(0,i._)("div",{style:{width:"40%"}},"不透明度:",-1)));var Gm=(0,i.aZ)({__name:"ElementOpacity",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(1);(0,i.YP)(l,(()=>{l.value&&(a.value="opacity"in l.value&&void 0!==l.value.opacity?l.value.opacity:1)}),{deep:!0,immediate:!0});const{addHistorySnapshot:n}=ra(),r=e=>{if(!l.value)return;const a={opacity:e};t.updateElement({id:l.value.id,props:a}),n()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Jm,[(0,i._)("div",qm,[Xm,(0,i.Wm)(Ym,{min:0,max:1,step:.1,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>r(e)),style:{width:"60%"}},null,8,["value"])])]))}});const Km=(0,Nl.Z)(Gm,[["__scopeId","data-v-03715c20"]]);var Qm=Km;const eh={class:"color-block"};var th=(0,i.aZ)({__name:"ColorButton",props:{color:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlatte");return(0,i.wg)(),(0,i.j4)(Kd,{class:"color-btn"},{default:(0,i.w5)((()=>[(0,i._)("div",eh,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundColor:e.color})},null,4)]),(0,i.Wm)(l,{class:"color-btn-icon"})])),_:1})}}});const lh=(0,Nl.Z)(th,[["__scopeId","data-v-7fa73bdc"]]);var ah=lh,nh=l(6459),oh=(0,i.aZ)({__name:"Checkboard",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(e){const t=e,l={},a=(e,t,l)=>{const a=document.createElement("canvas");a.width=a.height=2*l;const n=a.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,a.width,a.height),n.fillStyle=t,n.fillRect(0,0,l,l),n.translate(l,l),n.fillRect(0,0,l,l),a.toDataURL()):null},n=(e,t,n)=>{const o=e+","+t+","+n;if(l[o])return l[o];const i=a(e,t,n);return l[o]=i,i},o=(0,i.Fl)((()=>{const e=n(t.white,t.grey,t.size);return{backgroundImage:`url(${e})`}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"checkerboard",style:(0,ae.j5)(o.value)},null,4))}});const ih=(0,Nl.Z)(oh,[["__scopeId","data-v-fa191ace"]]);var sh=ih;const rh=e=>((0,i.dD)("data-v-84628bc8"),e=e(),(0,i.Cn)(),e),uh={class:"alpha"},ch={class:"alpha-checkboard-wrap"},dh=rh((()=>(0,i._)("div",{class:"alpha-picker"},null,-1))),ph=[dh];var vh=(0,i.aZ)({__name:"Alpha",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.value)),n=(0,i.Fl)((()=>{const e=[a.value.r,a.value.g,a.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`})),o=(0,s.iH)(),r=e=>{if(e.preventDefault(),!o.value)return;const l=o.value.clientWidth,n=o.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-n;let s;s=i<0?0:i>l?1:Math.round(100*i/l)/100,a.value.a!==s&&t("colorChange",{r:a.value.r,g:a.value.g,b:a.value.b,a:s})},u=()=>{window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",u)},c=e=>{r(e),window.addEventListener("mousemove",r),window.addEventListener("mouseup",u)};return(0,i.Ah)(u),(e,t)=>((0,i.wg)(),(0,i.iD)("div",uh,[(0,i._)("div",ch,[(0,i.Wm)(sh)]),(0,i._)("div",{class:"alpha-gradient",style:(0,ae.j5)({background:n.value})},null,4),(0,i._)("div",{class:"alpha-container",ref_key:"alphaRef",ref:o,onMousedown:t[0]||(t[0]=e=>c(e))},[(0,i._)("div",{class:"alpha-pointer",style:(0,ae.j5)({left:100*a.value.a+"%"})},ph,4)],544)]))}});const mh=(0,Nl.Z)(vh,[["__scopeId","data-v-84628bc8"]]);var hh=mh;const fh=e=>((0,i.dD)("data-v-5711e710"),e=e(),(0,i.Cn)(),e),gh={class:"hue"},yh=fh((()=>(0,i._)("div",{class:"hue-picker"},null,-1))),wh=[yh];var xh=(0,i.aZ)({__name:"Hue",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),n=(0,s.iH)(""),o=(0,i.Fl)((()=>{const e=(0,M.Z)(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e})),r=(0,i.Fl)((()=>0===o.value.h&&"right"===n.value?"100%":100*o.value.h/360+"%"));(0,i.YP)((()=>l.value),(()=>{const e=(0,M.Z)(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-a.value>0&&(n.value="right"),0!==t&&t-a.value<0&&(n.value="left"),a.value=t}));const u=(0,s.iH)(),c=e=>{if(e.preventDefault(),!u.value)return;const a=u.value.clientWidth,n=u.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-n;let s,r;i<0?s=0:i>a?s=360:(r=100*i/a,s=360*r/100),-1!==l.hue&&o.value.h===s||t("colorChange",{h:s,l:o.value.l,s:o.value.s,a:o.value.a})},d=()=>{window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",d)},p=e=>{c(e),window.addEventListener("mousemove",c),window.addEventListener("mouseup",d)};return(0,i.Ah)(d),(e,t)=>((0,i.wg)(),(0,i.iD)("div",gh,[(0,i._)("div",{class:"hue-container",ref_key:"hueRef",ref:u,onMousedown:t[0]||(t[0]=e=>p(e))},[(0,i._)("div",{class:"hue-pointer",style:(0,ae.j5)({left:r.value})},wh,4)],544)]))}});const kh=(0,Nl.Z)(xh,[["__scopeId","data-v-5711e710"]]);var bh=kh;const _h=e=>((0,i.dD)("data-v-c79c0446"),e=e(),(0,i.Cn)(),e),Ih=_h((()=>(0,i._)("div",{class:"saturation-white"},null,-1))),Sh=_h((()=>(0,i._)("div",{class:"saturation-black"},null,-1))),Ch=_h((()=>(0,i._)("div",{class:"saturation-circle"},null,-1))),Lh=[Ch];var Eh=(0,i.aZ)({__name:"Saturation",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>{const e=(0,M.Z)(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e})),n=(0,i.Fl)((()=>`hsl(${a.value.h}, 100%, 50%)`)),o=(0,i.Fl)((()=>-100*a.value.v+1+100+"%")),r=(0,i.Fl)((()=>100*a.value.s+"%")),u=(0,U.throttle)((function(e){t("colorChange",e)}),20,{leading:!0,trailing:!1}),c=(0,s.iH)(),d=e=>{if(e.preventDefault(),!c.value)return;const t=c.value.clientWidth,l=c.value.clientHeight,n=c.value.getBoundingClientRect().left+window.pageXOffset,o=c.value.getBoundingClientRect().top+window.pageYOffset,i=(0,U.clamp)(e.pageX-n,0,t),s=(0,U.clamp)(e.pageY-o,0,l),r=i/t,d=(0,U.clamp)(-s/l+1,0,1);u({h:a.value.h,s:r,v:d,a:a.value.a})},p=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p)},v=e=>{d(e),window.addEventListener("mousemove",d),window.addEventListener("mouseup",p)};return(0,i.Ah)(p),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"saturation",ref_key:"saturationRef",ref:c,style:(0,ae.j5)({background:n.value}),onMousedown:t[0]||(t[0]=e=>v(e))},[Ih,Sh,(0,i._)("div",{class:"saturation-pointer",style:(0,ae.j5)({top:o.value,left:r.value})},Lh,4)],36))}});const Th=(0,Nl.Z)(Eh,[["__scopeId","data-v-c79c0446"]]);var Mh=Th;const Uh={class:"editable-input"},Wh=["value"];var Dh=(0,i.aZ)({__name:"EditableInput",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>{let e="";return e=l.value.a<1?(0,M.Z)(l.value).toHex8String().toUpperCase():(0,M.Z)(l.value).toHexString().toUpperCase(),e.replace("#","")})),n=e=>{const l=e.target.value;l.length>=6&&t("colorChange",(0,M.Z)(l).toRgb())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Uh,[(0,i._)("input",{class:"input-content",value:a.value,onInput:t[0]||(t[0]=e=>n(e))},null,40,Wh)]))}});const Hh=(0,Nl.Z)(Dh,[["__scopeId","data-v-eb50f8e8"]]);var Fh=Hh;const Ah={class:"color-picker"},Zh={class:"picker-saturation-wrap"},$h={class:"picker-controls"},Oh={class:"picker-color-wrap"},Rh={class:"picker-sliders"},Ph={class:"picker-hue-wrap"},zh={class:"picker-alpha-wrap"},Bh={class:"picker-field"},Nh={class:"picker-presets"},jh=["onClick"],Yh={class:"picker-gradient-presets"},Vh=["onClick"],Jh={class:"picker-presets"},qh=["onClick"],Xh={key:0,class:"recent-colors-title"},Gh={class:"picker-presets"},Kh=["onClick"],Qh="RECENT_COLORS";var ef=(0,i.aZ)({__name:"index",props:{modelValue:{default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],n=(e,t,l)=>{const a=(0,M.Z)(e).toRgb(),n=(0,M.Z)(t).toRgb(),o=(n.r-a.r)/l,i=(n.g-a.g)/l,s=(n.b-a.b)/l,r=[];for(let u=0;u{const e=[];for(const t of a)e.push(n(t[1],t[0],5));return e},r=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],u=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],c=(0,s.iH)(-1),d=(0,s.iH)([]),p=(0,i.Fl)({get(){return(0,M.Z)(l.modelValue).toRgb()},set(e){const l=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;t("update:modelValue",l)}}),v=o(),m=(0,i.Fl)((()=>`rgba(${[p.value.r,p.value.g,p.value.b,p.value.a].join(",")})`)),h=e=>{c.value=(0,M.Z)(e).toHsl().h,t("update:modelValue",e)},f=(0,U.debounce)((function(){const e=(0,M.Z)(p.value).toRgbString();if(!d.value.includes(e)){d.value=[e,...d.value];const t=10;d.value.length>t&&(d.value=d.value.slice(0,t))}}),300,{trailing:!0});(0,i.bv)((()=>{const e=localStorage.getItem(Qh);e&&(d.value=JSON.parse(e))})),(0,i.YP)(d,(()=>{const e=JSON.stringify(d.value);localStorage.setItem(Qh,e)}));const g=e=>{"h"in e?(c.value=e.h,p.value=(0,M.Z)(e).toRgb()):(c.value=(0,M.Z)(e).toHsl().h,p.value=e),f()},y=()=>{const e="EyeDropper"in window;e?w():x()},w=()=>{Kl.success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then((e=>{const t=(0,M.Z)(e.sRGBHex);c.value=t.toHsl().h,p.value=t.toRgb(),f()})).catch((()=>{Kl.success("关闭取色吸管")}))},x=()=>{const e=document.querySelector(".canvas");if(!e)return;const t=document.createElement("div");t.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(t);const l=document.createElement("div");l.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",t.appendChild(l);const{left:a,top:n,width:o,height:i}=e.getBoundingClientRect(),s=e=>(!e.tagName||"FOREIGNOBJECT"!==e.tagName.toUpperCase())&&(!e.classList||!e.classList.contains("operate"));(0,nh.rT)(e,{filter:s,fontEmbedCSS:"",width:o,height:i,canvasWidth:o,canvasHeight:i,pixelRatio:1}).then((e=>{e.style.cssText=`position: absolute; top: ${n}px; left: ${a}px; cursor: crosshair;`,t.style.cursor="default",t.appendChild(e);const o=e.getContext("2d");if(!o)return;let i="";const s=e=>{const t=e.x,s=e.y,r=t-a,u=s-n,[c,d,p,v]=o.getImageData(r,u,1,1).data;i=`rgba(${c}, ${d}, ${p}, ${(v/255).toFixed(2)})`,l.style.left=t+10+"px",l.style.top=s+10+"px",l.style.backgroundColor=i},r=()=>{i="",l.style.left="-100px",l.style.top="-100px",l.style.backgroundColor=""},u=l=>{if(i&&0===l.button){const e=(0,M.Z)(i);c.value=e.toHsl().h,p.value=e.toRgb(),f()}document.body.removeChild(t),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",r),window.removeEventListener("mousedown",u)};e.addEventListener("mousemove",s),e.addEventListener("mouseleave",r),window.addEventListener("mousedown",u)})).catch((()=>{Kl.error("取色吸管初始化失败"),document.body.removeChild(t)}))};return(e,t)=>{const l=(0,i.up)("IconNeedle");return(0,i.wg)(),(0,i.iD)("div",Ah,[(0,i._)("div",Zh,[(0,i.Wm)(Mh,{value:p.value,hue:c.value,onColorChange:t[0]||(t[0]=e=>g(e))},null,8,["value","hue"])]),(0,i._)("div",$h,[(0,i._)("div",Oh,[(0,i._)("div",{class:"picker-current-color",style:(0,ae.j5)({background:m.value})},null,4),(0,i.Wm)(sh)]),(0,i._)("div",Rh,[(0,i._)("div",Ph,[(0,i.Wm)(bh,{value:p.value,hue:c.value,onColorChange:t[1]||(t[1]=e=>g(e))},null,8,["value","hue"])]),(0,i._)("div",zh,[(0,i.Wm)(hh,{value:p.value,onColorChange:t[2]||(t[2]=e=>g(e))},null,8,["value"])])])]),(0,i._)("div",Bh,[(0,i.Wm)(Fh,{class:"input",value:p.value,onColorChange:t[3]||(t[3]=e=>g(e))},null,8,["value"]),(0,i._)("div",{class:"straw",onClick:t[4]||(t[4]=e=>y())},[(0,i.Wm)(l)]),(0,i._)("div",{class:"transparent",onClick:t[5]||(t[5]=e=>h("#00000000"))},[(0,i.Wm)(sh)])]),(0,i._)("div",Nh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(r,(e=>(0,i._)("div",{class:"picker-presets-color",key:e,style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,jh))),64))]),(0,i._)("div",Yh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-col",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-color",key:e,style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,Vh)))),128))])))),128))]),(0,i._)("div",Jh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(u,(e=>(0,i._)("div",{key:e,class:"picker-presets-color",style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,qh))),64))]),d.value.length?((0,i.wg)(),(0,i.iD)("div",Xh,"最近使用:")):(0,i.kq)("",!0),(0,i._)("div",Gh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(d.value,(e=>((0,i.wg)(),(0,i.iD)("div",{key:e,class:"picker-presets-color alpha",onClick:t=>h(e)},[(0,i._)("div",{class:"picker-presets-color-content",style:(0,ae.j5)({background:e})},null,4)],8,Kh)))),128))])])}}});const tf=(0,Nl.Z)(ef,[["__scopeId","data-v-fec0b01a"]]);var lf=tf;const af=e=>((0,i.dD)("data-v-0566b060"),e=e(),(0,i.Cn)(),e),nf=af((()=>(0,i._)("span",{class:"switch-core"},null,-1))),of=[nf];var sf=(0,i.aZ)({__name:"Switch",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=()=>{l.disabled||t("update:value",!l.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("span",{class:(0,ae.C_)(["switch",{active:e.value,disabled:e.disabled}]),onClick:t[0]||(t[0]=e=>a())},of,2))}});const rf=(0,Nl.Z)(sf,[["__scopeId","data-v-0566b060"]]);var uf=rf;const cf=e=>((0,i.dD)("data-v-36e0c182"),e=e(),(0,i.Cn)(),e),df={class:"element-outline"},pf={key:0,class:"row"},vf=cf((()=>(0,i._)("div",{style:{width:"40%"}},"启用边框:",-1))),mf={class:"switch-wrapper",style:{width:"60%"}},hf={class:"row"},ff=cf((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),gf={class:"row"},yf=cf((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),wf={class:"row"},xf=cf((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var kf=(0,i.aZ)({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{l.value&&(a.value="outline"in l.value?l.value.outline:void 0,n.value=!!a.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{if(!l.value)return;const n={outline:{...a.value,...e}};t.updateElement({id:l.value.id,props:n}),r()},c=e=>{if(l.value){if(e){const e={width:2,color:"#000",style:"solid"};t.updateElement({id:l.value.id,props:{outline:e}})}else t.removeElementProps({id:l.value.id,propName:"outline"});r()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",df,[e.fixed?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",pf,[vf,(0,i._)("div",mf,[(0,i.Wm)(uf,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])])),n.value&&a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",hf,[ff,(0,i.Wm)(sp,{style:{width:"60%"},value:a.value.style||"","onUpdate:value":t[1]||(t[1]=e=>u({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",gf,[yf,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:a.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:a.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",wf,[xf,(0,i.Wm)(dv,{value:a.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>u({width:e})),style:{width:"60%"}},null,8,["value"])])],64)):(0,i.kq)("",!0)]))}});const bf=(0,Nl.Z)(kf,[["__scopeId","data-v-36e0c182"]]);var _f=bf;const If=e=>((0,i.dD)("data-v-5507f822"),e=e(),(0,i.Cn)(),e),Sf={class:"element-shadow"},Cf={class:"row"},Lf=If((()=>(0,i._)("div",{style:{width:"40%"}},"启用阴影:",-1))),Ef={class:"switch-wrapper",style:{width:"60%"}},Tf={class:"row"},Mf=If((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Uf={class:"row"},Wf=If((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Df={class:"row"},Hf=If((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Ff={class:"row"},Af=If((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1)));var Zf=(0,i.aZ)({__name:"ElementShadow",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{l.value&&(a.value="shadow"in l.value?l.value.shadow:void 0,n.value=!!a.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{if(!l.value||!a.value)return;const n={...a.value,...e};t.updateElement({id:l.value.id,props:{shadow:n}}),r()},c=e=>{if(l.value){if(e){const e={h:1,v:1,blur:2,color:"#000"};t.updateElement({id:l.value.id,props:{shadow:e}})}else t.removeElementProps({id:l.value.id,propName:"shadow"});r()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Sf,[(0,i._)("div",Cf,[Lf,(0,i._)("div",Ef,[(0,i.Wm)(uf,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),n.value&&a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Tf,[Mf,(0,i.Wm)(Ym,{style:{width:"60%"},min:-10,max:10,step:1,value:a.value.h,"onUpdate:value":t[1]||(t[1]=e=>u({h:e}))},null,8,["value"])]),(0,i._)("div",Uf,[Wf,(0,i.Wm)(Ym,{style:{width:"60%"},min:-10,max:10,step:1,value:a.value.v,"onUpdate:value":t[2]||(t[2]=e=>u({v:e}))},null,8,["value"])]),(0,i._)("div",Df,[Hf,(0,i.Wm)(Ym,{style:{width:"60%"},min:1,max:20,step:1,value:a.value.blur,"onUpdate:value":t[3]||(t[3]=e=>u({blur:e}))},null,8,["value"])]),(0,i._)("div",Ff,[Af,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:a.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:a.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)]))}});const $f=(0,Nl.Z)(Zf,[["__scopeId","data-v-5507f822"]]);var Of=$f;const Rf={class:"text-color-block"};var Pf=(0,i.aZ)({__name:"TextColorButton",props:{color:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(Kd,{class:"text-color-btn"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default"),(0,i._)("div",Rf,[(0,i._)("div",{class:"text-color-block-content",style:(0,ae.j5)({backgroundColor:e.color})},null,4)])])),_:3}))}});const zf=(0,Nl.Z)(Pf,[["__scopeId","data-v-37449800"]]);var Bf=zf,Nf=(0,i.aZ)({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(Kd,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const jf=Nf;var Yf=jf,Vf=(0,i.aZ)({__name:"ButtonGroup",props:{passive:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["button-group",{passive:e.passive}]),ref:"groupRef"},[(0,i.WI)(e.$slots,"default")],2))}});const Jf=(0,Nl.Z)(Vf,[["__scopeId","data-v-4db942e2"]]);var qf=Jf,Xf=(0,i.aZ)({__name:"RadioButton",props:{value:{},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:l}=(0,i.f3)(Ln);return(e,a)=>((0,i.wg)(),(0,i.j4)(Kd,{checked:!e.disabled&&(0,s.SU)(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=t=>!e.disabled&&(0,s.SU)(l)(e.value))},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const Gf=Xf;var Kf=Gf,Qf=(0,i.aZ)({__name:"RadioGroup",props:{value:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>{l.disabled||t("update:value",e)},n=(0,i.Fl)((()=>l.value));return(0,i.JJ)(Ln,{value:n,updateValue:a}),(e,t)=>((0,i.wg)(),(0,i.j4)(qf,{class:"radio-group"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3}))}});const eg=Qf;var tg=eg;const lg={class:"select-group"};function ag(e,t){return(0,i.wg)(),(0,i.iD)("div",lg,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])}const ng={},og=(0,Nl.Z)(ng,[["render",ag],["__scopeId","data-v-d2acb09c"]]);var ig=og;const sg=e=>((0,i.dD)("data-v-478ca737"),e=e(),(0,i.Cn)(),e),rg={class:"text-style-panel"},ug={class:"preset-style"},cg=["onClick"],dg={class:"link-popover"},pg={class:"btns"},vg={class:"row",passive:""},mg={class:"list-wrap"},hg=["onClick"],fg=sg((()=>(0,i._)("span",null,null,-1))),gg=[fg],yg=sg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),wg={class:"list-wrap"},xg=["onClick"],kg=sg((()=>(0,i._)("span",null,null,-1))),bg=[kg],_g={class:"row"},Ig=sg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Sg={class:"row"},Cg=sg((()=>(0,i._)("div",{style:{width:"40%"}},"行间距:",-1))),Lg={class:"row"},Eg=sg((()=>(0,i._)("div",{style:{width:"40%"}},"段间距:",-1))),Tg={class:"row"},Mg=sg((()=>(0,i._)("div",{style:{width:"40%"}},"字间距:",-1))),Ug={class:"row"},Wg=sg((()=>(0,i._)("div",{style:{width:"40%"}},"文本框填充:",-1)));var Dg=(0,i.aZ)({__name:"TextStylePanel",setup(e){const t=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"66px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"40px"},{command:"align",value:"center"}]},{label:"正文",style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:"正文[小]",style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:"注释 1",style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:"注释 2",style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],l=$(),a=F(),{handleElement:n,handleElementId:r,richTextAttrs:u,availableFonts:c,textFormatPainter:d}=(0,o.Jk)(l),{addHistorySnapshot:p}=ra(),{toggleTextFormatPainter:v}=$m(),m=e=>{a.updateElement({id:r.value,props:e}),p()},h=(0,s.iH)(!1),f=(0,s.iH)(!1),g=(0,s.iH)(!1),y=(0,s.iH)(!1),w=(0,s.iH)(["disc","circle","square"]),x=(0,s.iH)(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),k=(0,s.iH)("#000"),b=(0,s.iH)(),_=(0,s.iH)(),I=(0,s.iH)();(0,i.YP)(n,(()=>{n.value&&"text"===n.value.type&&(k.value=n.value.fill||"#fff",b.value=n.value.lineHeight||1.5,_.value=n.value.wordSpace||0,I.value=void 0===n.value.paragraphSpace?5:n.value.paragraphSpace)}),{deep:!0,immediate:!0});const S=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],C=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],L=[0,1,2,3,4,5,6,8,10],T=[0,5,10,15,20,25,30,40,50,80],M=e=>{m({lineHeight:e})},U=e=>{m({paragraphSpace:e})},W=e=>{m({wordSpace:e})},D=e=>{m({fill:e})},H=(e,t)=>{Ai.emit(Di.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},A=e=>{Ai.emit(Di.RICH_TEXT_COMMAND,{action:e})},Z=(0,s.iH)(""),O=(0,s.iH)(!1);(0,i.YP)(u,(()=>O.value=!1));const R=()=>{Z.value=u.value.link},P=e=>{const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!e||!t.test(e))return Kl.error("不是正确的网页链接地址");H("link",e),O.value=!1};return(e,l)=>{const a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),r=(0,i.up)("IconHighLight"),p=(0,i.up)("IconTextBold"),m=(0,i.up)("IconTextItalic"),F=(0,i.up)("IconTextUnderline"),$=(0,i.up)("IconStrikethrough"),z=(0,i.up)("IconCode"),B=(0,i.up)("IconQuote"),N=(0,i.up)("IconFormat"),j=(0,i.up)("IconFormatBrush"),Y=(0,i.up)("IconLinkOne"),V=(0,i.up)("IconAlignTextLeft"),J=(0,i.up)("IconAlignTextCenter"),q=(0,i.up)("IconAlignTextRight"),X=(0,i.up)("IconAlignTextBoth"),G=(0,i.up)("IconList"),K=(0,i.up)("IconDown"),Q=(0,i.up)("IconOrderedList"),ee=(0,i.up)("IconIndentLeft"),te=(0,i.up)("IconIndentRight"),le=(0,i.up)("IconRowHeight"),ne=(0,i.up)("IconVerticalSpacingBetweenItems"),oe=(0,i.up)("IconFullwidth"),ie=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",rg,[(0,i._)("div",ug,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"preset-style-item",key:e.label,style:(0,ae.j5)(e.style),onClick:t=>A(e.cmd)},(0,ae.zw)(e.label),13,cg))),64))]),(0,i.Wm)(Fc),(0,i.Wm)(ig,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(sp,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(u).fontname,"onUpdate:value":l[0]||(l[0]=e=>H("fontname",e)),options:[...(0,s.SU)(c),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(sp,{style:{width:"40%"},value:(0,s.SU)(u).fontsize,"onUpdate:value":l[1]||(l[1]=e=>H("fontsize",e)),options:S.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(qf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(u).color,"onUpdate:modelValue":l[2]||(l[2]=e=>H("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bf,{first:"",color:(0,s.SU)(u).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[ie,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(u).backcolor,"onUpdate:modelValue":l[3]||(l[3]=e=>H("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bf,{color:(0,s.SU)(u).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[ie,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{class:"font-size-btn",style:{width:"20%"},onClick:l[4]||(l[4]=e=>H("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[ie,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:l[5]||(l[5]=e=>H("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[ie,"减小字号"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[6]||(l[6]=e=>H("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1},8,["checked"])),[[ie,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[7]||(l[7]=e=>H("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1},8,["checked"])),[[ie,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[8]||(l[8]=e=>H("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1},8,["checked"])),[[ie,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[9]||(l[9]=e=>H("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1},8,["checked"])),[[ie,"删除线"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).superscript,onClick:l[10]||(l[10]=e=>H("superscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A²")])),_:1},8,["checked"])),[[ie,"上标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).subscript,onClick:l[11]||(l[11]=e=>H("subscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A₂")])),_:1},8,["checked"])),[[ie,"下标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).code,onClick:l[12]||(l[12]=e=>H("code"))},{default:(0,i.w5)((()=>[(0,i.Wm)(z)])),_:1},8,["checked"])),[[ie,"行内代码"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).blockquote,onClick:l[13]||(l[13]=e=>H("blockquote"))},{default:(0,i.w5)((()=>[(0,i.Wm)(B)])),_:1},8,["checked"])),[[ie,"引用"]])])),_:1}),(0,i.Wm)(qf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",style:{flex:"1"},onClick:l[14]||(l[14]=e=>H("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(N)])),_:1})),[[ie,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:l[15]||(l[15]=e=>(0,s.SU)(v)()),onDblclick:l[16]||(l[16]=e=>(0,s.SU)(v)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(j)])),_:1},8,["checked"])),[[ie,"格式刷(双击连续使用)"]]),(0,i.Wm)(rn,{placement:"bottom-end",trigger:"click",value:O.value,"onUpdate:value":l[21]||(l[21]=e=>O.value=e),style:{width:"33.33%"}},{content:(0,i.w5)((()=>[(0,i._)("div",dg,[(0,i.Wm)(an,{value:Z.value,"onUpdate:value":l[17]||(l[17]=e=>Z.value=e),placeholder:"请输入超链接"},null,8,["value"]),(0,i._)("div",pg,[(0,i.Wm)(Kd,{size:"small",disabled:!(0,s.SU)(u).link,onClick:l[18]||(l[18]=e=>P()),style:{"margin-right":"5px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("移除")])),_:1},8,["disabled"]),(0,i.Wm)(Kd,{size:"small",type:"primary",onClick:l[19]||(l[19]=e=>P(Z.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{last:"",style:{width:"100%"},checked:!!(0,s.SU)(u).link,onClick:l[20]||(l[20]=e=>R())},{default:(0,i.w5)((()=>[(0,i.Wm)(Y)])),_:1},8,["checked"])),[[ie,"超链接"]])])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Fc),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[22]||(l[22]=e=>H("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(V)])),_:1})),[[ie,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(J)])),_:1})),[[ie,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(q)])),_:1})),[[ie,"右对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"justify",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(X)])),_:1})),[[ie,"两端对齐"]])])),_:1},8,["value"]),(0,i._)("div",vg,[(0,i.Wm)(qf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{first:"",type:(0,s.SU)(u).bulletList?"primary":"default",style:{flex:"1"},onClick:l[23]||(l[23]=e=>H("bulletList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(G)])),_:1},8,["type"])),[[ie,"项目符号"]]),(0,i.Wm)(rn,{trigger:"click",value:h.value,"onUpdate:value":l[24]||(l[24]=e=>h.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",mg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,ae.j5)({listStyleType:e}),onClick:t=>H("bulletList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},gg))),64))],12,hg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),yg,(0,i.Wm)(qf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{first:"",type:(0,s.SU)(u).orderedList?"primary":"default",style:{flex:"1"},onClick:l[25]||(l[25]=e=>H("orderedList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(Q)])),_:1},8,["type"])),[[ie,"编号"]]),(0,i.Wm)(rn,{trigger:"click",value:f.value,"onUpdate:value":l[26]||(l[26]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",wg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(x.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,ae.j5)({listStyleType:e}),onClick:t=>H("orderedList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},bg))),64))],12,xg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i._)("div",_g,[(0,i.Wm)(qf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{first:"",style:{flex:"1"},onClick:l[27]||(l[27]=e=>H("indent","-1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(ee)])),_:1})),[[ie,"减小段落缩进"]]),(0,i.Wm)(rn,{trigger:"click",value:g.value,"onUpdate:value":l[29]||(l[29]=e=>g.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:l[28]||(l[28]=e=>H("textIndent","-1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("减小首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),Ig,(0,i.Wm)(qf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{first:"",style:{flex:"1"},onClick:l[30]||(l[30]=e=>H("indent","+1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(te)])),_:1})),[[ie,"增大段落缩进"]]),(0,i.Wm)(rn,{trigger:"click",value:y.value,"onUpdate:value":l[32]||(l[32]=e=>y.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:l[31]||(l[31]=e=>H("textIndent","+1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("增大首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i.Wm)(Fc),(0,i._)("div",Sg,[Cg,(0,i.Wm)(sp,{style:{width:"60%"},value:b.value||1,"onUpdate:value":l[33]||(l[33]=e=>M(e)),options:C.map((e=>({label:e+"倍",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(le)])),_:1},8,["value","options"])]),(0,i._)("div",Lg,[Eg,(0,i.Wm)(sp,{style:{width:"60%"},value:I.value||0,"onUpdate:value":l[34]||(l[34]=e=>U(e)),options:T.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ne)])),_:1},8,["value","options"])]),(0,i._)("div",Tg,[Mg,(0,i.Wm)(sp,{style:{width:"60%"},value:_.value||0,"onUpdate:value":l[35]||(l[35]=e=>W(e)),options:L.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(oe)])),_:1},8,["value","options"])]),(0,i._)("div",Ug,[Wg,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:k.value,"onUpdate:modelValue":l[36]||(l[36]=e=>D(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:k.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Fc),(0,i.Wm)(_f),(0,i.Wm)(Fc),(0,i.Wm)(Of),(0,i.Wm)(Fc),(0,i.Wm)(Qm)])}}});const Hg=(0,Nl.Z)(Dg,[["__scopeId","data-v-478ca737"]]);var Fg=Hg;const Ag={class:"element-flip"};var Zg=(0,i.aZ)({__name:"ElementFlip",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(!1),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{!l.value||"image"!==l.value.type&&"shape"!==l.value.type||(a.value=!!l.value.flipH,n.value=!!l.value.flipV)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())};return(e,t)=>{const l=(0,i.up)("IconFlipVertically"),o=(0,i.up)("IconFlipHorizontally");return(0,i.wg)(),(0,i.iD)("div",Ag,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Yf,{style:{flex:"1"},checked:n.value,onClick:t[0]||(t[0]=e=>u({flipV:!n.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(l),(0,i.Uk)(" 垂直翻转")])),_:1},8,["checked"]),(0,i.Wm)(Yf,{style:{flex:"1"},checked:a.value,onClick:t[1]||(t[1]=e=>u({flipH:!a.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(o),(0,i.Uk)(" 水平翻转")])),_:1},8,["checked"])])),_:1})])}}});const $g=(0,Nl.Z)(Zg,[["__scopeId","data-v-7571b056"]]);var Og=$g;const Rg=e=>((0,i.dD)("data-v-2c8acf3c"),e=e(),(0,i.Cn)(),e),Pg={class:"element-filter"},zg={class:"row"},Bg=Rg((()=>(0,i._)("div",{style:{flex:"2"}},"启用滤镜:",-1))),Ng={class:"switch-wrapper",style:{flex:"3"}},jg={key:0,class:"filter"},Yg={class:"name"};var Vg=(0,i.aZ)({__name:"ElementFilter",setup(e){const t=[{label:"模糊",key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:"亮度",key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:"对比度",key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:"灰度",key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:"饱和度",key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:"色相",key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:"不透明度",key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],l=F(),{handleElement:a,handleElementId:n}=(0,o.Jk)($()),r=(0,s.iH)(JSON.parse(JSON.stringify(t))),u=(0,s.iH)(!1),{addHistorySnapshot:c}=ra();(0,i.YP)(a,(()=>{if(!a.value||"image"!==a.value.type)return;const e=a.value.filters;e?(r.value=t.map((t=>{const l=e[t.key];return l?{...t,value:parseInt(l)}:t})),u.value=!0):(r.value=JSON.parse(JSON.stringify(t)),u.value=!1)}),{deep:!0,immediate:!0});const d=(e,t)=>{const o=a.value,i=o.filters||{},s={...i,[e.key]:`${t}${e.unit}`};l.updateElement({id:n.value,props:{filters:s}}),c()},p=e=>{a.value&&(e?l.updateElement({id:a.value.id,props:{filters:{}}}):l.removeElementProps({id:a.value.id,propName:"filters"}),c())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Pg,[(0,i._)("div",zg,[Bg,(0,i._)("div",Ng,[(0,i.Wm)(uf,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["value"])])]),u.value?((0,i.wg)(),(0,i.iD)("div",jg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(r.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"filter-item",key:e.key},[(0,i._)("div",Yg,(0,ae.zw)(e.label),1),(0,i.Wm)(Ym,{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,"onUpdate:value":t=>d(e,t)},null,8,["max","step","value","onUpdate:value"])])))),128))])):(0,i.kq)("",!0)]))}});const Jg=(0,Nl.Z)(Vg,[["__scopeId","data-v-2c8acf3c"]]);var qg=Jg;const Xg=e=>((0,i.dD)("data-v-0ae0ff99"),e=e(),(0,i.Cn)(),e),Gg={class:"element-color-mask"},Kg={class:"row"},Qg=Xg((()=>(0,i._)("div",{style:{width:"40%"}},"着色(蒙版):",-1))),ey={class:"switch-wrapper",style:{width:"60%"}},ty={key:0,class:"row",style:{"margin-top":"15px"}},ly=Xg((()=>(0,i._)("div",{style:{width:"40%"}},"蒙版颜色:",-1))),ay="rgba(226, 83, 77, 0.5)";var ny=(0,i.aZ)({__name:"ElementColorMask",setup(e){const t=F(),{handleElement:l,handleElementId:a}=(0,o.Jk)($()),n=(0,s.iH)(ay),r=(0,s.iH)(!1),{addHistorySnapshot:u}=ra();(0,i.YP)(l,(()=>{l.value&&"image"===l.value.type&&(l.value.colorMask?(n.value=l.value.colorMask,r.value=!0):r.value=!1)}),{deep:!0,immediate:!0});const c=e=>{l.value&&(e?t.updateElement({id:l.value.id,props:{colorMask:ay}}):t.removeElementProps({id:l.value.id,propName:"colorMask"}),u())},d=e=>{t.updateElement({id:a.value,props:{colorMask:e}}),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Gg,[(0,i._)("div",Kg,[Qg,(0,i._)("div",ey,[(0,i.Wm)(uf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),r.value?((0,i.wg)(),(0,i.iD)("div",ty,[ly,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>d(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:n.value},null,8,["color"])])),_:1})])):(0,i.kq)("",!0)]))}});const oy=(0,Nl.Z)(ny,[["__scopeId","data-v-0ae0ff99"]]);var iy=oy;const sy=e=>((0,i.dD)("data-v-2e186970"),e=e(),(0,i.Cn)(),e),ry={class:"image-style-panel"},uy={class:"clip"},cy=sy((()=>(0,i._)("div",{class:"title"},"按形状:",-1))),dy={class:"shape-clip"},py=["onClick"],vy={key:0,class:"title"};var my=(0,i.aZ)({__name:"ImageStylePanel",setup(e){const t=qn,l=[{label:"纵横比(方形)",children:[{key:"1:1",ratio:1}]},{label:"纵横比(纵向)",children:[{key:"2:3",ratio:1.5},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:"纵横比(横向)",children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:.6},{key:"5:4",ratio:.8}]},{children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:.625}]}],a=$(),n=F(),{handleElement:r,handleElementId:u}=(0,o.Jk)(a),{currentSlide:c}=(0,o.Jk)(n),d=r,p=(0,s.iH)(!1),{addHistorySnapshot:v}=ra(),m=()=>{a.setClipingImageElementId(u.value),p.value=!1},h=()=>{const e=r.value,t=e.width,l=e.height,a=e.left,n=e.top,o=e.clip?e.clip.range:[[0,0],[100,100]],i=t/((o[1][0]-o[0][0])/100),s=l/((o[1][1]-o[0][1])/100),u=a-i*(o[0][0]/100),c=n-s*(o[0][1]/100);return{originClipRange:o,originWidth:i,originHeight:s,originLeft:u,originTop:c}},f=(e,t=0)=>{const l=r.value,{originClipRange:a,originWidth:o,originHeight:i,originLeft:s,originTop:c}=h();if(t){const a=i/o,r=0,d=100;let p;if(a>t){const e=(1-t/a)/2*100;p=[[r,e],[d,d-e]]}else{const e=(1-a/t)/2*100;p=[[e,r],[d-e,d]]}n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:p},left:s+o*(p[0][0]/100),top:c+i*(p[0][1]/100),width:o*(p[1][0]-p[0][0])/100,height:i*(p[1][1]-p[0][1])/100}})}else n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:a}}});m(),v()},g=e=>{const t=e[0];t&&(ta(t).then((e=>{const t={src:e};n.updateElement({id:u.value,props:t})})),v())},y=()=>{const e=r.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:a}=h();n.updateElement({id:u.value,props:{left:l,top:a,width:e,height:t}})}n.removeElementProps({id:u.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),v()},w=()=>{const e=r.value,t={...c.value.background,type:"image",image:e.src,imageSize:"cover"};n.updateSlide({background:t}),v()};return(e,a)=>{const n=(0,i.up)("IconTailoring"),o=(0,i.up)("IconDown"),r=(0,i.up)("IconTransform"),u=(0,i.up)("IconUndo"),c=(0,i.up)("IconTheme");return(0,i.wg)(),(0,i.iD)("div",ry,[(0,i._)("div",{class:"origin-image",style:(0,ae.j5)({backgroundImage:`url(${(0,s.SU)(d).src})`})},null,4),(0,i.Wm)(Og),(0,i.Wm)(qf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{first:"",style:{width:"calc(100% / 6 * 5)"},onClick:a[0]||(a[0]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{class:"btn-icon"}),(0,i.Uk)(" 裁剪图片")])),_:1}),(0,i.Wm)(rn,{trigger:"click",value:p.value,"onUpdate:value":a[1]||(a[1]=e=>p.value=e),style:{width:"calc(100% / 6)"}},{content:(0,i.w5)((()=>[(0,i._)("div",uy,[cy,(0,i._)("div",dy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-clip-item",key:t,onClick:e=>f(t)},[(0,i._)("div",{class:"shape",style:(0,ae.j5)({clipPath:e.style})},null,4)],8,py)))),128))]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.label},[e.label?((0,i.wg)(),(0,i.iD)("div",vy,"按"+(0,ae.zw)(e.label)+":",1)):(0,i.kq)("",!0),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},key:e.key,onClick:t=>f("rect",e.ratio)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ae.zw)(e.key),1)])),_:2},1032,["onClick"])))),128))])),_:2},1024)],64)))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{last:"",class:"popover-btn",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Fc),(0,i.Wm)(iy),(0,i.Wm)(Fc),(0,i.Wm)(qg),(0,i.Wm)(Fc),(0,i.Wm)(_f),(0,i.Wm)(Fc),(0,i.Wm)(Of),(0,i.Wm)(Fc),(0,i.Wm)(Oa,{onChange:a[2]||(a[2]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{class:"full-width-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 替换图片")])),_:1})])),_:1}),(0,i.Wm)(Kd,{class:"full-width-btn",onClick:a[3]||(a[3]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(u,{class:"btn-icon"}),(0,i.Uk)(" 重置样式")])),_:1}),(0,i.Wm)(Kd,{class:"full-width-btn",onClick:a[4]||(a[4]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"btn-icon"}),(0,i.Uk)(" 设为背景")])),_:1})])}}});const hy=(0,Nl.Z)(my,[["__scopeId","data-v-2e186970"]]);var fy=hy,gy=()=>{const e=$(),{shapeFormatPainter:t,handleElement:l}=(0,o.Jk)(e),a=(a=!1)=>{const n=l.value;t.value?e.setShapeFormatPainter(null):e.setShapeFormatPainter({keep:a,fill:n.fill,gradient:n.gradient,outline:n.outline,opacity:n.opacity,shadow:n.shadow})};return{toggleShapeFormatPainter:a}};const yy=e=>((0,i.dD)("data-v-0674f2cf"),e=e(),(0,i.Cn)(),e),wy={class:"shape-style-panel"},xy={class:"title"},ky=yy((()=>(0,i._)("span",null,"点击替换形状",-1))),by={class:"shape-pool"},_y={class:"shape-list"},Iy={class:"row"},Sy=yy((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Cy={class:"row"},Ly=yy((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Ey={class:"row"},Ty=yy((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),My={key:0,class:"row"},Uy=yy((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),Wy={class:"row"};var Dy=(0,i.aZ)({__name:"ShapeStylePanel",setup(e){const t=$(),l=F(),{handleElement:a,handleElementId:n,richTextAttrs:r,availableFonts:u,textFormatPainter:c,shapeFormatPainter:d}=(0,o.Jk)(t),p=a,v=(0,s.iH)("#000"),m=(0,s.iH)({type:"linear",rotate:0,color:["#fff","#fff"]}),h=(0,s.iH)("fill"),f=(0,s.iH)("middle");(0,i.YP)(a,(()=>{a.value&&"shape"===a.value.type&&(v.value=a.value.fill||"#fff",m.value=a.value.gradient||{type:"linear",rotate:0,color:[v.value,"#fff"]},h.value=a.value.gradient?"gradient":"fill",f.value=a.value?.text?.align||"middle")}),{deep:!0,immediate:!0});const{addHistorySnapshot:g}=ra(),{toggleTextFormatPainter:y}=$m(),{toggleShapeFormatPainter:w}=gy(),x=e=>{l.updateElement({id:n.value,props:e}),g()},k=e=>{"fill"===e?(l.removeElementProps({id:n.value,propName:"gradient"}),g()):x({gradient:m.value})},b=e=>{if(!m.value)return;const t={...m.value,...e};x({gradient:t})},_=e=>{x({fill:e})},I=e=>{const{width:t,height:l}=a.value,n={viewBox:e.viewBox,path:e.path,special:e.special};if(e.pathFormula){n.pathFormula=e.pathFormula,n.viewBox=[t,l];const a=oa[e.pathFormula];"editable"in a?(n.path=a.formula(t,l,a.defaultValue),n.keypoint=a.defaultValue):n.path=a.formula(t,l)}else n.pathFormula=void 0,n.keypoint=void 0;x(n)},S=e=>{const t=a.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},n=t.text||l;x({text:{...n,align:e}})},C=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],L=(e,t)=>{Ai.emit(Di.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,t)=>{const l=(0,i.up)("IconDown"),a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),g=(0,i.up)("IconHighLight"),x=(0,i.up)("IconTextBold"),T=(0,i.up)("IconTextItalic"),M=(0,i.up)("IconTextUnderline"),U=(0,i.up)("IconStrikethrough"),W=(0,i.up)("IconFormat"),D=(0,i.up)("IconFormatBrush"),H=(0,i.up)("IconAlignTextLeft"),F=(0,i.up)("IconAlignTextCenter"),A=(0,i.up)("IconAlignTextRight"),Z=(0,i.up)("IconAlignTextTopOne"),$=(0,i.up)("IconAlignTextMiddleOne"),O=(0,i.up)("IconAlignTextBottomOne"),R=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",wy,[(0,i._)("div",xy,[ky,(0,i.Wm)(l)]),(0,i._)("div",by,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ia),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",_y,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,["任意多边形"!==e.title?((0,i.wg)(),(0,i.j4)(Up,{class:"shape-item",key:t,shape:e,onClick:t=>I(e)},null,8,["shape","onClick"])):(0,i.kq)("",!0)],64)))),256))])])))),128))]),(0,i._)("div",Iy,[(0,i.Wm)(sp,{style:{flex:"1"},value:h.value,"onUpdate:value":t[0]||(t[0]=e=>k(e)),options:[{label:"纯色填充",value:"fill"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Sy,"fill"===h.value?((0,i.wg)(),(0,i.j4)(rn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:v.value,"onUpdate:modelValue":t[1]||(t[1]=e=>_(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:v.value},null,8,["color"])])),_:1})):((0,i.wg)(),(0,i.j4)(sp,{key:1,style:{flex:"1"},value:m.value.type,"onUpdate:value":t[2]||(t[2]=e=>b({type:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"gradient"===h.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Cy,[Ly,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:m.value.color[0],"onUpdate:modelValue":t[3]||(t[3]=e=>b({color:[e,m.value.color[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:m.value.color[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Ey,[Ty,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:m.value.color[1],"onUpdate:modelValue":t[4]||(t[4]=e=>b({color:[m.value.color[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:m.value.color[1]},null,8,["color"])])),_:1})]),"linear"===m.value.type?((0,i.wg)(),(0,i.iD)("div",My,[Uy,(0,i.Wm)(Ym,{style:{width:"60%"},min:0,max:360,step:15,value:m.value.rotate,"onUpdate:value":t[5]||(t[5]=e=>b({rotate:e}))},null,8,["value"])])):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0),(0,i.Wm)(Og),(0,i.Wm)(Fc),(0,s.SU)(p).text?.content?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(ig,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(sp,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(r).fontname,"onUpdate:value":t[6]||(t[6]=e=>L("fontname",e)),options:[...(0,s.SU)(u),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(sp,{style:{width:"40%"},value:(0,s.SU)(r).fontsize,"onUpdate:value":t[7]||(t[7]=e=>L("fontsize",e)),options:C.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(qf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(r).color,"onUpdate:modelValue":t[8]||(t[8]=e=>L("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bf,{first:"",color:(0,s.SU)(r).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[R,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(r).backcolor,"onUpdate:modelValue":t[9]||(t[9]=e=>L("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bf,{color:(0,s.SU)(r).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["color"])),[[R,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{class:"font-size-btn",style:{width:"20%"},onClick:t[10]||(t[10]=e=>L("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[R,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[11]||(t[11]=e=>L("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[R,"减小字号"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(r).bold,onClick:t[12]||(t[12]=e=>L("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1},8,["checked"])),[[R,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(r).em,onClick:t[13]||(t[13]=e=>L("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["checked"])),[[R,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(r).underline,onClick:t[14]||(t[14]=e=>L("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1},8,["checked"])),[[R,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:(0,s.SU)(r).strikethrough,onClick:t[15]||(t[15]=e=>L("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1},8,["checked"])),[[R,"删除线"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},onClick:t[16]||(t[16]=e=>L("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[R,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:!!(0,s.SU)(c),onClick:t[17]||(t[17]=e=>(0,s.SU)(y)()),onDblclick:t[18]||(t[18]=e=>(0,s.SU)(y)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D)])),_:1},8,["checked"])),[[R,"格式刷(双击连续使用)"]])])),_:1}),(0,i.Wm)(Fc),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:(0,s.SU)(r).align,"onUpdate:value":t[19]||(t[19]=e=>L("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1})),[[R,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1})),[[R,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(A)])),_:1})),[[R,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:f.value,"onUpdate:value":t[20]||(t[20]=e=>S(e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"top",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Z)])),_:1})),[[R,"顶对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"middle",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1})),[[R,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"bottom",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(O)])),_:1})),[[R,"底对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Fc)],64)):(0,i.kq)("",!0),(0,i.Wm)(_f),(0,i.Wm)(Fc),(0,i.Wm)(Of),(0,i.Wm)(Fc),(0,i.Wm)(Qm),(0,i.Wm)(Fc),(0,i._)("div",Wy,[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:t[21]||(t[21]=e=>(0,s.SU)(w)()),onDblclick:t[22]||(t[22]=e=>(0,s.SU)(w)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D),(0,i.Uk)(" 形状格式刷")])),_:1},8,["checked"])),[[R,"双击连续使用"]])])])}}});const Hy=(0,Nl.Z)(Dy,[["__scopeId","data-v-0674f2cf"]]);var Fy=Hy;const Ay=e=>((0,i.dD)("data-v-ae80032c"),e=e(),(0,i.Cn)(),e),Zy={class:"line-style-panel"},$y={class:"row"},Oy=Ay((()=>(0,i._)("div",{style:{width:"40%"}},"线条样式:",-1))),Ry={class:"row"},Py=Ay((()=>(0,i._)("div",{style:{width:"40%"}},"线条颜色:",-1))),zy={class:"row"},By=Ay((()=>(0,i._)("div",{style:{width:"40%"}},"线条宽度:",-1))),Ny={class:"row"},jy=Ay((()=>(0,i._)("div",{style:{width:"40%"}},"起点样式:",-1))),Yy={class:"row"},Vy=Ay((()=>(0,i._)("div",{style:{width:"40%"}},"终点样式:",-1)));var Jy=(0,i.aZ)({__name:"LineStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Zy,[(0,i._)("div",$y,[Oy,(0,i.Wm)(sp,{style:{width:"60%"},value:(0,s.SU)(a).style,"onUpdate:value":t[0]||(t[0]=e=>r({style:e})),options:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",Ry,[Py,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",zy,[By,(0,i.Wm)(dv,{value:(0,s.SU)(a).width,"onUpdate:value":t[2]||(t[2]=e=>r({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",Ny,[jy,(0,i.Wm)(sp,{style:{width:"60%"},value:(0,s.SU)(a).points[0],"onUpdate:value":t[3]||(t[3]=e=>r({points:[e,(0,s.SU)(a).points[1]]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i._)("div",Yy,[Vy,(0,i.Wm)(sp,{style:{width:"60%"},value:(0,s.SU)(a).points[1],"onUpdate:value":t[4]||(t[4]=e=>r({points:[(0,s.SU)(a).points[0],e]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i.Wm)(Fc),(0,i.Wm)(Of)]))}});const qy=(0,Nl.Z)(Jy,[["__scopeId","data-v-ae80032c"]]);var Xy=qy;const Gy={class:"chart-data-editor"},Ky={class:"editor-content"},Qy={class:"range-box"},ew=["id","onFocus","onPaste"],tw={class:"btns"},lw={class:"left"},aw={class:"right"},nw=100,ow=32;var iw=(0,i.aZ)({__name:"ChartDataEditor",props:{data:{}},emits:["save","close"],setup(e,{emit:t}){const l=e,a=(0,s.iH)([0,0]),o=(0,s.iH)({width:0,height:0}),r=(0,s.iH)(null),u=(0,i.Fl)((()=>{const e=a.value[0]*nw,t=a.value[1]*ow;return[{type:"t",style:{width:e+"px"}},{type:"b",style:{top:t+"px",width:e+"px"}},{type:"l",style:{height:t+"px"}},{type:"r",style:{left:e+"px",height:t+"px"}}]})),c=(0,i.Fl)((()=>{const e=a.value[0]*nw,t=a.value[1]*ow;return{left:e+"px",top:t+"px"}})),d=()=>{const e=[],{labels:t,legends:n,series:o}=l.data,i=t.length,s=o.length;e.push(["",...n]);for(let l=0;l{if(!r.value)return;const[e,t]=r.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},v=e=>{const t=e.key.toUpperCase();t===le.ENTER&&p()};(0,i.bv)((()=>{document.addEventListener("keydown",v)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",v)}));const m=()=>{const[e,l]=a.value,n=[],o=[],i=[];for(let t=1;t{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},f=(e,t,l)=>{if(e.preventDefault(),!e.clipboardData)return;const a=e.clipboardData.items[0];a&&"string"===a.kind&&"text/plain"===a.type&&a.getAsString((e=>{const a=me(e);if("object"===typeof a)return;const n=he(e);if(n){const e=t+n.length,a=l+n[0].length;for(let o=t;ot("close"),y=e=>{let t=!0;const l=e.pageX,n=e.pageY,i=a.value[0]*nw,s=a.value[1]*ow;document.onmousemove=e=>{if(!t)return;const a=e.pageX,r=e.pageY,u=a-l,c=r-n,d=i+u,p=s+c;o.value={width:d,height:p}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const i=e.pageX,s=e.pageY;if(l===i&&n===s)return;let r=o.value.width,u=o.value.height;r%nw>.5*nw&&(r+=nw-r%nw),u%ow>.5*ow&&(u+=ow-u%ow);let c=Math.round(u/ow),d=Math.round(r/nw);c<3&&(c=3),d<2&&(d=2),a.value=[d,c],o.value={width:0,height:0}}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Gy,[(0,i._)("div",Ky,[(0,i._)("div",Qy,[(0,i._)("div",{class:"temp-range",style:(0,ae.j5)({width:o.value.width+"px",height:o.value.height+"px"})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["range-line",e.type]),key:e.type,style:(0,ae.j5)(e.style)},null,6)))),128)),(0,i._)("div",{class:"resizable",style:(0,ae.j5)(c.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>y(e)),["stop"]))},null,36)]),(0,i._)("table",null,[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(31,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(7,(t=>(0,i._)("td",{key:t,class:(0,ae.C_)({head:1===t&&e<=a.value[1]||1===e&&t<=a.value[0]})},[(0,i._)("input",{class:(0,ae.C_)(["item",{selected:e<=a.value[1]&&t<=a.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>r.value=[e-1,t-1],onPaste:l=>f(l,e-1,t-1)},null,42,ew)],2))),64))]))),64))])])]),(0,i._)("div",tw,[(0,i._)("div",lw,[(0,i.Wm)(Kd,{class:"btn",onClick:t[1]||(t[1]=e=>h())},{default:(0,i.w5)((()=>[(0,i.Uk)("清空")])),_:1})]),(0,i._)("div",aw,[(0,i.Wm)(Kd,{class:"btn",onClick:t[2]||(t[2]=e=>g())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Kd,{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>m()),style:{"margin-left":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])]))}});const sw=(0,Nl.Z)(iw,[["__scopeId","data-v-f7b59928"]]);var rw=sw;const uw=e=>((0,i.dD)("data-v-26bf4835"),e=e(),(0,i.Cn)(),e),cw=uw((()=>(0,i._)("span",{class:"checkbox-input"},null,-1))),dw=uw((()=>(0,i._)("input",{class:"checkbox-original",type:"checkbox"},null,-1))),pw={class:"checkbox-label"};var vw=(0,i.aZ)({__name:"Checkbox",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>{l.disabled||t("update:value",e.target.checked)};return(e,t)=>((0,i.wg)(),(0,i.iD)("label",{class:(0,ae.C_)(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:t[0]||(t[0]=e=>a(e))},[cw,dw,(0,i._)("span",pw,[(0,i.WI)(e.$slots,"default")])],34))}});const mw=(0,Nl.Z)(vw,[["__scopeId","data-v-26bf4835"]]);var hw=mw;const fw=e=>((0,i.dD)("data-v-45827db6"),e=e(),(0,i.Cn)(),e),gw={class:"chart-style-panel"},yw={class:"row"},ww={class:"row"},xw={key:1,class:"row"},kw={key:2,class:"row"},bw={class:"row"},_w=fw((()=>(0,i._)("div",{style:{width:"40%"}},"图例:",-1))),Iw={class:"row"},Sw=fw((()=>(0,i._)("div",{style:{width:"40%"}},"背景填充:",-1))),Cw={class:"row"},Lw=fw((()=>(0,i._)("div",{style:{width:"40%"}},"网格颜色:",-1))),Ew={style:{width:"40%"}},Tw={class:"color-btn-wrap",style:{width:"100%"}},Mw=["onClick"],Uw={class:"preset-themes"},Ww=["onClick","onMouseenter"];var Dw=(0,i.aZ)({__name:"index",setup(e){const t=[["#d87c7c","#919e8b","#d7ab82","#6e7074","#61a0a8","#efa18d"],["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78"],["#516b91","#59c4e6","#edafda","#93b7e3","#a5e7f0","#cbb0e3"],["#893448","#d95850","#eb8146","#ffb248","#f2d643","#ebdba4"],["#4ea397","#22c3aa","#7bd9a5","#d0648a","#f58db2","#f2b3c9"],["#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463"],["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3"],["#e01f54","#001852","#f5e8c8","#b8d2c7","#c6b38e","#a4d8c2"],["#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8"],["#8a7ca8","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc"]],l=$(),a=F(),{handleElement:r,handleElementId:u}=(0,o.Jk)(l),{theme:c}=(0,o.Jk)(a),d=r,p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)([-1,-1]),{addHistorySnapshot:h}=ra(),f=(0,s.iH)("#000"),g=(0,s.iH)([]),y=(0,s.iH)(""),w=(0,s.iH)(""),x=(0,s.iH)(!0),k=(0,s.iH)(!0),b=(0,s.iH)(!1),_=(0,s.iH)(!1),I=(0,s.iH)(!1),S=(0,s.iH)(!1);(0,i.YP)(r,(()=>{if(r.value&&"chart"===r.value.type){if(f.value=r.value.fill||"#fff",r.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:a,donut:n,stackBars:o}=r.value.options;x.value=!!e,k.value=!!t,b.value=!!l,_.value=!!a,I.value=!!n,S.value=!!o}g.value=r.value.themeColor,y.value=r.value.gridColor||"#333",w.value=r.value.legend||""}}),{deep:!0,immediate:!0});const C=e=>{a.updateElement({id:u.value,props:e}),h()},L=e=>{p.value=!1,C({data:e})},E=e=>{C({fill:e})},T=e=>{const t=r.value,l={...t.options,...e};C({options:l})},M=(e,t)=>{const l={themeColor:g.value.map(((l,a)=>a===t?e:l))};C(l)},U=()=>{const e={themeColor:[...g.value,c.value.themeColor]};C(e)},W=(e,t)=>{const l=e.slice(0,t+1);C({themeColor:l}),v.value=!1},D=e=>{const t={themeColor:g.value.filter(((t,l)=>l!==e))};C(t)},H=e=>{C({gridColor:e})},A=e=>{C({legend:e})},Z=()=>p.value=!0;return Ai.on(Di.OPEN_CHART_DATA_EDITOR,Z),(0,i.Ah)((()=>{Ai.off(Di.OPEN_CHART_DATA_EDITOR,Z)})),(e,l)=>{const a=(0,i.up)("IconEdit"),o=(0,i.up)("IconCloseSmall"),r=(0,i.up)("IconPlus"),u=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",gw,[(0,i.Wm)(Kd,{class:"full-width-btn",onClick:l[0]||(l[0]=e=>p.value=!0)},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 编辑图表数据 ")])),_:1}),(0,i.Wm)(Fc),"line"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",yw,[(0,i.Wm)(hw,{"onUpdate:value":l[1]||(l[1]=e=>T({showArea:e})),value:b.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("面积图样式")])),_:1},8,["value"]),(0,i.Wm)(hw,{"onUpdate:value":l[2]||(l[2]=e=>T({showLine:e})),value:!k.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("散点图样式")])),_:1},8,["value"])]),(0,i._)("div",ww,[(0,i.Wm)(hw,{"onUpdate:value":l[3]||(l[3]=e=>T({lineSmooth:e})),value:x.value},{default:(0,i.w5)((()=>[(0,i.Uk)("使用平滑曲线")])),_:1},8,["value"])])],64)):(0,i.kq)("",!0),"bar"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",xw,[(0,i.Wm)(hw,{"onUpdate:value":l[4]||(l[4]=e=>T({horizontalBars:e})),value:_.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("条形图样式")])),_:1},8,["value"]),(0,i.Wm)(hw,{"onUpdate:value":l[5]||(l[5]=e=>T({stackBars:e})),value:S.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("堆叠样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),"pie"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",kw,[(0,i.Wm)(hw,{"onUpdate:value":l[6]||(l[6]=e=>T({donut:e})),value:I.value},{default:(0,i.w5)((()=>[(0,i.Uk)("环形图样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),(0,i.Wm)(Fc),(0,i._)("div",bw,[_w,(0,i.Wm)(sp,{style:{width:"60%"},value:w.value,"onUpdate:value":l[7]||(l[7]=e=>A(e)),options:[{label:"不显示",value:""},{label:"显示在上方",value:"top"},{label:"显示在下方",value:"bottom"}]},null,8,["value"])]),(0,i.Wm)(Fc),(0,i._)("div",Iw,[Sw,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:f.value,"onUpdate:modelValue":l[8]||(l[8]=e=>E(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:f.value},null,8,["color"])])),_:1})]),(0,i._)("div",Cw,[Lw,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:y.value,"onUpdate:modelValue":l[9]||(l[9]=e=>H(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:y.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Fc),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(g.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"row",key:t},[(0,i._)("div",Ew,(0,ae.zw)(0===t?"主题配色:":""),1),(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:e,"onUpdate:modelValue":e=>M(e,t)},null,8,["modelValue","onUpdate:modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("div",Tw,[(0,i.Wm)(ah,{color:e},null,8,["color"]),0!==t?(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:0,class:"delete-color-btn",onClick:(0,n.iM)((e=>D(t)),["stop"])},[(0,i.Wm)(o)],8,Mw)),[[u,"删除"]]):(0,i.kq)("",!0)])])),_:2},1024)])))),128)),(0,i.Wm)(qf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",open:v.value,"onUpdate:open":l[11]||(l[11]=e=>v.value=e),style:{width:"40%"}},{content:(0,i.w5)((()=>[(0,i._)("div",Uw,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((e,t)=>(0,i._)("div",{class:"preset-theme",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,((a,n)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["preset-theme-color",{select:m.value[0]===t&&n<=m.value[1]}]),key:a,style:(0,ae.j5)({backgroundColor:a}),onClick:t=>W(e,n),onMouseenter:e=>m.value=[t,n],onMouseleave:l[10]||(l[10]=e=>m.value=[-1,-1])},null,46,Ww)))),128))]))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{first:"",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Uk)("推荐主题")])),_:1})])),_:1},8,["open"]),(0,i.Wm)(Kd,{last:"",disabled:g.value.length>=10,style:{width:"60%"},onClick:l[12]||(l[12]=e=>U())},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 添加主题色 ")])),_:1},8,["disabled"])])),_:1}),(0,i.Wm)(Fc),(0,i.Wm)(_f),(0,i.Wm)(yp,{visible:p.value,"onUpdate:visible":l[15]||(l[15]=e=>p.value=e),width:640},{default:(0,i.w5)((()=>[(0,i.Wm)(rw,{data:(0,s.SU)(d).data,onClose:l[13]||(l[13]=e=>p.value=!1),onSave:l[14]||(l[14]=e=>L(e))},null,8,["data"])])),_:1},8,["visible"])])}}});const Hw=(0,Nl.Z)(Dw,[["__scopeId","data-v-45827db6"]]);var Fw=Hw;const Aw=e=>((0,i.dD)("data-v-e5523cbc"),e=e(),(0,i.Cn)(),e),Zw={class:"table-style-panel"},$w={class:"row"},Ow=Aw((()=>(0,i._)("div",{style:{width:"40%"}},"行数:",-1))),Rw={class:"set-count",style:{width:"60%"}},Pw={class:"count-text"},zw={class:"row"},Bw=Aw((()=>(0,i._)("div",{style:{width:"40%"}},"列数:",-1))),Nw={class:"set-count",style:{width:"60%"}},jw={class:"count-text"},Yw={class:"row theme-switch"},Vw=Aw((()=>(0,i._)("div",{style:{width:"40%"}},"启用主题表格:",-1))),Jw={class:"switch-wrapper",style:{width:"60%"}},qw={class:"row"},Xw={class:"row"},Gw={class:"row"},Kw=Aw((()=>(0,i._)("div",{style:{width:"40%"}},"主题颜色:",-1)));var Qw=(0,i.aZ)({__name:"TableStylePanel",setup(e){const t=F(),{handleElement:l,handleElementId:a,selectedTableCells:n,availableFonts:u}=(0,o.Jk)($()),c=(0,i.Fl)((()=>t.theme.themeColor)),d=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],p=(0,s.iH)({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}),v=(0,s.iH)(),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,s.iH)(0);(0,i.YP)(l,(()=>{l.value&&"table"===l.value.type&&(v.value=l.value.theme,m.value=!!v.value,h.value=l.value.data.length,f.value=l.value.data[0].length,g.value=l.value.data.length,y.value=l.value.data[0].length)}),{deep:!0,immediate:!0});const{addHistorySnapshot:w}=ra(),x=()=>{if(!l.value||"table"!==l.value.type)return;let e=0,t=0;if(n.value.length){const l=n.value[0];e=+l.split("_")[0],t=+l.split("_")[1]}const a=l.value.data[e][t].style;p.value=a?{bold:!!a.bold,em:!!a.em,underline:!!a.underline,strikethrough:!!a.strikethrough,color:a.color||"#000",backcolor:a.backcolor||"",fontsize:a.fontsize||"12px",fontname:a.fontname||"微软雅黑",align:a.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}};(0,i.bv)((()=>{n.value.length&&x()})),(0,i.YP)(n,x);const k=e=>{t.updateElement({id:a.value,props:e}),w()},b=e=>{const t=l.value,a=JSON.parse(JSON.stringify(t.data));for(let l=0;l{if(!v.value)return;const t={...v.value,...e};k({theme:t})},I=e=>{if(e){const e={theme:{color:c.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};k(e)}else t.removeElementProps({id:a.value,propName:"theme"}),w()},S=e=>{const t=l.value,a=t.data.length;if(e>a){const l=new Array(f.value).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""}),n=new Array(e-a).fill(l),o=JSON.parse(JSON.stringify(t.data));o.push(...n),k({data:o})}else{const l=t.data.slice(0,e);k({data:l})}},C=e=>{const t=l.value,a=t.data[0].length;let n=t.data,o=t.colWidths.map((e=>e*t.width));if(e>a){n=n.map((t=>{const l=new Array(e-a).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""});return t.push(...l),t}));const t=new Array(e-a).fill(100);o.push(...t)}else n=n.map((t=>t.slice(0,e))),o=o.slice(0,e);const i=o.reduce(((e,t)=>e+t)),s=o.map((e=>e/i)),u={width:i,data:n,colWidths:s};k(u)};return(e,t)=>{const l=(0,i.up)("IconFontSize"),a=(0,i.up)("IconAddText"),n=(0,i.up)("IconText"),o=(0,i.up)("IconFill"),r=(0,i.up)("IconTextBold"),c=(0,i.up)("IconTextItalic"),g=(0,i.up)("IconTextUnderline"),y=(0,i.up)("IconStrikethrough"),w=(0,i.up)("IconAlignTextLeft"),x=(0,i.up)("IconAlignTextCenter"),k=(0,i.up)("IconAlignTextRight"),L=(0,i.up)("IconMinus"),T=(0,i.up)("IconPlus"),M=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Zw,[(0,i.Wm)(ig,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(sp,{style:{width:"50%"},value:p.value.fontname,"onUpdate:value":t[0]||(t[0]=e=>b({fontname:e})),options:[...(0,s.SU)(u),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(l)])),_:1},8,["value","options"]),(0,i.Wm)(sp,{style:{width:"50%"},value:p.value.fontsize,"onUpdate:value":t[1]||(t[1]=e=>b({fontsize:e})),options:d.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(qf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>b({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bf,{first:"",color:p.value.color},{default:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["color"])),[[M,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:p.value.backcolor,"onUpdate:modelValue":t[3]||(t[3]=e=>b({backcolor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bf,{last:"",color:p.value.backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[M,"单元格填充"]])])),_:1})])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:p.value.bold,onClick:t[4]||(t[4]=e=>b({bold:!p.value.bold}))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"])),[[M,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:p.value.em,onClick:t[5]||(t[5]=e=>b({em:!p.value.em}))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])),[[M,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:p.value.underline,onClick:t[6]||(t[6]=e=>b({underline:!p.value.underline}))},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["checked"])),[[M,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{style:{flex:"1"},checked:p.value.strikethrough,onClick:t[7]||(t[7]=e=>b({strikethrough:!p.value.strikethrough}))},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1},8,["checked"])),[[M,"删除线"]])])),_:1}),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:p.value.align,"onUpdate:value":t[8]||(t[8]=e=>b({align:e}))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(w)])),_:1})),[[M,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1})),[[M,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(k)])),_:1})),[[M,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Fc),(0,i.Wm)(_f,{fixed:!0}),(0,i.Wm)(Fc),(0,i._)("div",$w,[Ow,(0,i._)("div",Rw,[(0,i.Wm)(Kd,{class:"btn",disabled:h.value<=1,onClick:t[9]||(t[9]=e=>S(h.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Pw,(0,ae.zw)(h.value),1),(0,i.Wm)(Kd,{class:"btn",disabled:h.value>=30,onClick:t[10]||(t[10]=e=>S(h.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i._)("div",zw,[Bw,(0,i._)("div",Nw,[(0,i.Wm)(Kd,{class:"btn",disabled:f.value<=1,onClick:t[11]||(t[11]=e=>C(f.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",jw,(0,ae.zw)(f.value),1),(0,i.Wm)(Kd,{class:"btn",disabled:f.value>=30,onClick:t[12]||(t[12]=e=>C(f.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i.Wm)(Fc),(0,i._)("div",Yw,[Vw,(0,i._)("div",Jw,[(0,i.Wm)(uf,{value:m.value,"onUpdate:value":t[13]||(t[13]=e=>I(e))},null,8,["value"])])]),v.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",qw,[(0,i.Wm)(hw,{"onUpdate:value":t[14]||(t[14]=e=>_({rowHeader:e})),value:v.value.rowHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("标题行")])),_:1},8,["value"]),(0,i.Wm)(hw,{"onUpdate:value":t[15]||(t[15]=e=>_({rowFooter:e})),value:v.value.rowFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("汇总行")])),_:1},8,["value"])]),(0,i._)("div",Xw,[(0,i.Wm)(hw,{"onUpdate:value":t[16]||(t[16]=e=>_({colHeader:e})),value:v.value.colHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("第一列")])),_:1},8,["value"]),(0,i.Wm)(hw,{"onUpdate:value":t[17]||(t[17]=e=>_({colFooter:e})),value:v.value.colFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("最后一列")])),_:1},8,["value"])]),(0,i._)("div",Gw,[Kw,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:v.value.color,"onUpdate:modelValue":t[18]||(t[18]=e=>_({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:v.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)])}}});const ex=(0,Nl.Z)(Qw,[["__scopeId","data-v-e5523cbc"]]);var tx=ex;const lx=e=>((0,i.dD)("data-v-3a5ca316"),e=e(),(0,i.Cn)(),e),ax={class:"latex-style-panel"},nx={class:"row"},ox={class:"row"},ix=lx((()=>(0,i._)("div",{style:{width:"40%"}},"颜色:",-1))),sx={class:"row"},rx=lx((()=>(0,i._)("div",{style:{width:"40%"}},"粗细:",-1)));var ux=(0,i.aZ)({__name:"LatexStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,n=(0,s.iH)(!1),{addHistorySnapshot:r}=ra(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())},c=e=>{u({path:e.path,latex:e.latex,width:e.w,height:e.h,viewBox:[e.w,e.h]})},d=()=>n.value=!0;return Ai.on(Di.OPEN_LATEX_EDITOR,d),(0,i.Ah)((()=>{Ai.off(Di.OPEN_LATEX_EDITOR,d)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",ax,[(0,i._)("div",nx,[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>n.value=!0)},{default:(0,i.w5)((()=>[(0,i.Uk)("编辑 LaTeX")])),_:1})]),(0,i.Wm)(Fc),(0,i._)("div",ox,[ix,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",sx,[rx,(0,i.Wm)(dv,{min:1,max:3,value:(0,s.SU)(a).strokeWidth,"onUpdate:value":t[2]||(t[2]=e=>u({strokeWidth:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(yp,{visible:n.value,"onUpdate:visible":t[5]||(t[5]=e=>n.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(vm,{value:(0,s.SU)(a).latex,onClose:t[3]||(t[3]=e=>n.value=!1),onUpdate:t[4]||(t[4]=e=>{c(e),n.value=!1})},null,8,["value"])])),_:1},8,["visible"])]))}});const cx=(0,Nl.Z)(ux,[["__scopeId","data-v-3a5ca316"]]);var dx=cx;const px=e=>((0,i.dD)("data-v-b3551c8c"),e=e(),(0,i.Cn)(),e),vx={class:"video-style-panel"},mx=px((()=>(0,i._)("div",{class:"title"},"视频预览封面",-1))),hx={class:"background-image-wrapper"},fx={class:"background-image"},gx={class:"row"},yx={class:"row switch-row"},wx=px((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),xx={class:"switch-wrapper",style:{width:"60%"}};var kx=(0,i.aZ)({__name:"VideoStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())},u=e=>{const t=e[0];t&&ta(t).then((e=>r({poster:e})))};return(e,t)=>{const l=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",vx,[mx,(0,i._)("div",hx,[(0,i.Wm)(Oa,{onChange:t[0]||(t[0]=e=>u(e))},{default:(0,i.w5)((()=>[(0,i._)("div",fx,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundImage:(0,s.SU)(a).poster?`url(${(0,s.SU)(a).poster})`:""})},[(0,i.Wm)(l)],4)])])),_:1})]),(0,i._)("div",gx,[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>r({poster:""}))},{default:(0,i.w5)((()=>[(0,i.Uk)("重置封面")])),_:1})]),(0,i._)("div",yx,[wx,(0,i._)("div",xx,[(0,i.Wm)(uf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[2]||(t[2]=e=>r({autoplay:e}))},null,8,["value"])])])])}}});const bx=(0,Nl.Z)(kx,[["__scopeId","data-v-b3551c8c"]]);var _x=bx;const Ix=e=>((0,i.dD)("data-v-32517bcf"),e=e(),(0,i.Cn)(),e),Sx={class:"audio-style-panel"},Cx={class:"row"},Lx=Ix((()=>(0,i._)("div",{style:{width:"40%"}},"图标颜色:",-1))),Ex={class:"row switch-row"},Tx=Ix((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),Mx={class:"switch-wrapper",style:{width:"60%"}},Ux={class:"row switch-row"},Wx=Ix((()=>(0,i._)("div",{style:{width:"40%"}},"循环播放:",-1))),Dx={class:"switch-wrapper",style:{width:"60%"}};var Hx=(0,i.aZ)({__name:"AudioStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Sx,[(0,i._)("div",Cx,[Lx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[0]||(t[0]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",Ex,[Tx,(0,i._)("div",Mx,[(0,i.Wm)(uf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[1]||(t[1]=e=>r({autoplay:e}))},null,8,["value"])])]),(0,i._)("div",Ux,[Wx,(0,i._)("div",Dx,[(0,i.Wm)(uf,{value:(0,s.SU)(a).loop,"onUpdate:value":t[2]||(t[2]=e=>r({loop:e}))},null,8,["value"])])])]))}});const Fx=(0,Nl.Z)(Hx,[["__scopeId","data-v-32517bcf"]]);var Ax=Fx;const Zx=e=>((0,i.dD)("data-v-80f1bc4e"),e=e(),(0,i.Cn)(),e),$x={class:"multi-style-panel"},Ox={class:"row"},Rx=Zx((()=>(0,i._)("div",{style:{width:"40%"}},"填充颜色:",-1))),Px={class:"row"},zx=Zx((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),Bx={class:"row"},Nx=Zx((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),jx={class:"row"},Yx=Zx((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var Vx=(0,i.aZ)({__name:"MultiStylePanel",setup(e){const t=F(),{richTextAttrs:l,availableFonts:a,activeElementList:n}=(0,o.Jk)($()),{addHistorySnapshot:r}=ra(),u=(e,l)=>{t.updateElement({id:e,props:l}),r()},c=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],d=(0,s.iH)("#fff"),p=(0,s.iH)({width:0,color:"#fff",style:"solid"}),v=e=>{for(const t of n.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||u(t.id,{fill:e}),"table"===t.type){const l=JSON.parse(JSON.stringify(t.data));for(let t=0;t{for(const t of n.value){if("text"===t.type||"image"===t.type||"shape"===t.type||"table"===t.type||"chart"===t.type){const l=t.outline||{width:2,color:"#000",style:"solid"},a={outline:{...l,...e}};u(t.id,a)}"line"===t.type&&u(t.id,e)}p.value={...p.value,...e}},h=(e,t)=>{for(const l of n.value){if(("text"===l.type||"shape"===l.type&&l.text?.content)&&Ai.emit(Di.RICH_TEXT_COMMAND,{target:l.id,action:{command:e,value:t}}),"table"===l.type){const a=JSON.parse(JSON.stringify(l.data));for(let l=0;l{const n=(0,i.up)("IconFontSize"),o=(0,i.up)("IconAddText"),r=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),f=(0,i.up)("IconAlignTextLeft"),g=(0,i.up)("IconAlignTextCenter"),y=(0,i.up)("IconAlignTextRight"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",$x,[(0,i._)("div",Ox,[Rx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=e=>v(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:d.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Fc),(0,i._)("div",Px,[zx,(0,i.Wm)(sp,{style:{width:"60%"},value:p.value.style||"","onUpdate:value":t[1]||(t[1]=e=>m({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",Bx,[Nx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>m({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:p.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",jx,[Yx,(0,i.Wm)(dv,{value:p.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>m({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(Fc),(0,i.Wm)(ig,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(sp,{style:{width:"60%"},value:(0,s.SU)(l).fontname,"onUpdate:value":t[4]||(t[4]=e=>h("fontname",e)),options:[...(0,s.SU)(a),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"]),(0,i.Wm)(sp,{style:{width:"40%"},value:(0,s.SU)(l).fontsize,"onUpdate:value":t[5]||(t[5]=e=>h("fontsize",e)),options:c.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(qf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(l).color,"onUpdate:modelValue":t[6]||(t[6]=e=>h("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bf,{first:"",color:(0,s.SU)(l).color},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[w,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(l).backcolor,"onUpdate:modelValue":t[7]||(t[7]=e=>h("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bf,{color:(0,s.SU)(l).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(u)])),_:1},8,["color"])),[[w,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{class:"font-size-btn",style:{width:"20%"},onClick:t[8]||(t[8]=e=>h("fontsize-add","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("+")])),_:1})),[[w,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[9]||(t[9]=e=>h("fontsize-reduce","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("-")])),_:1})),[[w,"减小字号"]])])),_:1}),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:(0,s.SU)(l).align,"onUpdate:value":t[10]||(t[10]=e=>h("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1})),[[w,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1})),[[w,"右对齐"]])])),_:1},8,["value"])])}}});const Jx=(0,Nl.Z)(Vx,[["__scopeId","data-v-80f1bc4e"]]);var qx=Jx;const Xx={class:"element-style-panel"};var Gx=(0,i.aZ)({__name:"index",setup(e){const t={[na.TEXT]:Fg,[na.IMAGE]:fy,[na.SHAPE]:Fy,[na.LINE]:Xy,[na.CHART]:Fw,[na.TABLE]:tx,[na.LATEX]:dx,[na.VIDEO]:_x,[na.AUDIO]:Ax},{activeElementIdList:l,activeElementList:a,handleElement:n,activeGroupElementId:s}=(0,o.Jk)($()),r=(0,i.Fl)((()=>{if(l.value.length>1){if(!s.value)return qx;const e=a.value.find((e=>e.id===s.value));return e&&t[e.type]||null}return n.value&&t[n.value.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Xx,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value)))]))}});const Kx=Gx;var Qx=Kx;const ek=e=>((0,i.dD)("data-v-a2bcea28"),e=e(),(0,i.Cn)(),e),tk={class:"element-positopn-panel"},lk=ek((()=>(0,i._)("div",{class:"title"},"层级:",-1))),ak=ek((()=>(0,i._)("div",{class:"title"},"对齐:",-1))),nk={class:"row"},ok=ek((()=>(0,i._)("div",{style:{width:"10%"}},null,-1))),ik={key:0,class:"row"},sk={key:1,style:{width:"10%"}},rk={class:"row"},uk=ek((()=>(0,i._)("div",{style:{width:"7%"}},null,-1)));var ck=(0,i.aZ)({__name:"ElementPositionPanel",setup(e){const t=F(),{handleElement:l,handleElementId:a}=(0,o.Jk)($()),n=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)(0),p=(0,s.iH)(!1),v=(0,i.Fl)((()=>l.value&&Fn[l.value.type]||20)),m=(0,i.Fl)((()=>"text"===l.value?.type&&!l.value.vertical)),h=(0,i.Fl)((()=>"text"===l.value?.type&&l.value.vertical));(0,i.YP)(l,(()=>{l.value&&(n.value=(0,U.round)(l.value.left,1),r.value=(0,U.round)(l.value.top,1),p.value="fixedRatio"in l.value&&!!l.value.fixedRatio,"line"!==l.value.type&&(u.value=(0,U.round)(l.value.width,1),c.value=(0,U.round)(l.value.height,1),d.value="rotate"in l.value&&void 0!==l.value.rotate?(0,U.round)(l.value.rotate,1):0))}),{deep:!0,immediate:!0});const{orderElement:f}=wa(),{alignElementToCanvas:g}=Yn(),{addHistorySnapshot:y}=ra(),w=e=>{const l={left:e};t.updateElement({id:a.value,props:l}),y()},x=e=>{const l={top:e};t.updateElement({id:a.value,props:l}),y()},k=(e,t)=>{if(l.value&&"shape"===l.value.type&&"pathFormula"in l.value&&l.value.pathFormula){const a=oa[l.value.pathFormula];let n="";return n="editable"in a?a.formula(e,t,l.value.keypoint):a.formula(e,t),{viewBox:[e,t],path:n}}return null},b=e=>{let l={width:e};const n=k(e,c.value);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},_=e=>{let l={height:e};const n=k(u.value,e);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},I=e=>{const l={rotate:e};t.updateElement({id:a.value,props:l}),y()},S=e=>{const l={fixedRatio:e};t.updateElement({id:a.value,props:l}),y()},C=e=>{let l=45*Math.floor(d.value/45);"+"===e?l+=45:"-"===e&&(l-=45),l<-180&&(l=-180),l>180&&(l=180);const n={rotate:l};t.updateElement({id:a.value,props:n}),y()};return(e,t)=>{const a=(0,i.up)("IconSendToBack"),o=(0,i.up)("IconBringToFrontOne"),y=(0,i.up)("IconBringToFront"),k=(0,i.up)("IconSentToBack"),L=(0,i.up)("IconAlignLeft"),E=(0,i.up)("IconAlignVertically"),T=(0,i.up)("IconAlignRight"),M=(0,i.up)("IconAlignTop"),U=(0,i.up)("IconAlignHorizontally"),W=(0,i.up)("IconAlignBottom"),D=(0,i.up)("IconLock"),H=(0,i.up)("IconUnlock"),F=(0,i.up)("IconRotate"),A=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",tk,[lk,(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"btn-icon"}),(0,i.Uk)(" 置底")])),_:1})])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"btn-icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(k,{class:"btn-icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Fc),ak,(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>(0,s.SU)(g)((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1})),[[A,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:t[5]||(t[5]=e=>(0,s.SU)(g)((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1})),[[A,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>(0,s.SU)(g)((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1})),[[A,"右对齐"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>(0,s.SU)(g)((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1})),[[A,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>(0,s.SU)(g)((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1})),[[A,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:t[9]||(t[9]=e=>(0,s.SU)(g)((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[A,"下对齐"]])])),_:1}),(0,i.Wm)(Fc),(0,i._)("div",nk,[(0,i.Wm)(dv,{step:5,value:n.value,"onUpdate:value":t[10]||(t[10]=e=>w(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 水平: ")])),_:1},8,["value"]),ok,(0,i.Wm)(dv,{step:5,value:r.value,"onUpdate:value":t[11]||(t[11]=e=>x(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 垂直: ")])),_:1},8,["value"])]),"line"!==(0,s.SU)(l).type?((0,i.wg)(),(0,i.iD)("div",ik,[(0,i.Wm)(dv,{min:v.value,max:1500,step:5,disabled:h.value,value:u.value,"onUpdate:value":t[12]||(t[12]=e=>b(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 宽度: ")])),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes((0,s.SU)(l).type)?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[p.value?(0,i.wy)(((0,i.wg)(),(0,i.j4)(D,{key:0,style:{width:"10%"},class:"icon-btn",onClick:t[13]||(t[13]=e=>S(!1))},null,512)),[[A,"解除宽高比锁定"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(H,{key:1,style:{width:"10%"},class:"icon-btn",onClick:t[14]||(t[14]=e=>S(!0))},null,512)),[[A,"宽高比锁定"]])],64)):((0,i.wg)(),(0,i.iD)("div",sk)),(0,i.Wm)(dv,{min:v.value,max:800,step:5,disabled:m.value||"table"===(0,s.SU)(l).type,value:c.value,"onUpdate:value":t[15]||(t[15]=e=>_(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 高度: ")])),_:1},8,["min","disabled","value"])])):(0,i.kq)("",!0),["line","video","audio"].includes((0,s.SU)(l).type)?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(Fc),(0,i._)("div",rk,[(0,i.Wm)(dv,{min:-180,max:180,step:5,value:d.value,"onUpdate:value":t[16]||(t[16]=e=>I(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 旋转: ")])),_:1},8,["value"]),uk,(0,i._)("div",{class:"text-btn",onClick:t[17]||(t[17]=e=>C("-")),style:{width:"24%"}},[(0,i.Wm)(F),(0,i.Uk)(" -45°")]),(0,i._)("div",{class:"text-btn",onClick:t[18]||(t[18]=e=>C("+")),style:{width:"24%"}},[(0,i.Wm)(F,{style:(0,ae.j5)({transform:"rotateY(180deg)"})},null,8,["style"]),(0,i.Uk)(" +45°")])])],64))])}}});const dk=(0,Nl.Z)(ck,[["__scopeId","data-v-a2bcea28"]]);var pk=dk;const vk=1e3,mk="click",hk="animate__",fk=[{type:"bounce",name:"弹跳",children:[{name:"弹入",value:"bounceIn"},{name:"向右弹入",value:"bounceInLeft"},{name:"向左弹入",value:"bounceInRight"},{name:"向上弹入",value:"bounceInUp"},{name:"向下弹入",value:"bounceInDown"}]},{type:"fade",name:"浮现",children:[{name:"浮入",value:"fadeIn"},{name:"向下浮入",value:"fadeInDown"},{name:"向下长距浮入",value:"fadeInDownBig"},{name:"向右浮入",value:"fadeInLeft"},{name:"向右长距浮入",value:"fadeInLeftBig"},{name:"向左浮入",value:"fadeInRight"},{name:"向左长距浮入",value:"fadeInRightBig"},{name:"向上浮入",value:"fadeInUp"},{name:"向上长距浮入",value:"fadeInUpBig"},{name:"从左上浮入",value:"fadeInTopLeft"},{name:"从右上浮入",value:"fadeInTopRight"},{name:"从左下浮入",value:"fadeInBottomLeft"},{name:"从右下浮入",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转进入",value:"rotateIn"},{name:"绕左下进入",value:"rotateInDownLeft"},{name:"绕右下进入",value:"rotateInDownRight"},{name:"绕左上进入",value:"rotateInUpLeft"},{name:"绕右上进入",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"放大进入",value:"zoomIn"},{name:"向下放大进入",value:"zoomInDown"},{name:"从左放大进入",value:"zoomInLeft"},{name:"从右放大进入",value:"zoomInRight"},{name:"向上放大进入",value:"zoomInUp"}]},{type:"slide",name:"滑入",children:[{name:"向下滑入",value:"slideInDown"},{name:"从右滑入",value:"slideInLeft"},{name:"从左滑入",value:"slideInRight"},{name:"向上滑入",value:"slideInUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转进入",value:"flipInX"},{name:"Y轴翻转进入",value:"flipInY"}]},{type:"back",name:"放大滑入",children:[{name:"向下放大滑入",value:"backInDown"},{name:"从左放大滑入",value:"backInLeft"},{name:"从右放大滑入",value:"backInRight"},{name:"向上放大滑入",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",children:[{name:"从右飞入",value:"lightSpeedInRight"},{name:"从左飞入",value:"lightSpeedInLeft"}]}],gk=[{type:"bounce",name:"弹跳",children:[{name:"弹出",value:"bounceOut"},{name:"向左弹出",value:"bounceOutLeft"},{name:"向右弹出",value:"bounceOutRight"},{name:"向上弹出",value:"bounceOutUp"},{name:"向下弹出",value:"bounceOutDown"}]},{type:"fade",name:"浮现",children:[{name:"浮出",value:"fadeOut"},{name:"向下浮出",value:"fadeOutDown"},{name:"向下长距浮出",value:"fadeOutDownBig"},{name:"向左浮出",value:"fadeOutLeft"},{name:"向左长距浮出",value:"fadeOutLeftBig"},{name:"向右浮出",value:"fadeOutRight"},{name:"向右长距浮出",value:"fadeOutRightBig"},{name:"向上浮出",value:"fadeOutUp"},{name:"向上长距浮出",value:"fadeOutUpBig"},{name:"从左上浮出",value:"fadeOutTopLeft"},{name:"从右上浮出",value:"fadeOutTopRight"},{name:"从左下浮出",value:"fadeOutBottomLeft"},{name:"从右下浮出",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转退出",value:"rotateOut"},{name:"绕左下退出",value:"rotateOutDownLeft"},{name:"绕右下退出",value:"rotateOutDownRight"},{name:"绕左上退出",value:"rotateOutUpLeft"},{name:"绕右上退出",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"缩小退出",value:"zoomOut"},{name:"向下缩小退出",value:"zoomOutDown"},{name:"从左缩小退出",value:"zoomOutLeft"},{name:"从右缩小退出",value:"zoomOutRight"},{name:"向上缩小退出",value:"zoomOutUp"}]},{type:"slide",name:"滑出",children:[{name:"向下滑出",value:"slideOutDown"},{name:"从左滑出",value:"slideOutLeft"},{name:"从右滑出",value:"slideOutRight"},{name:"向上滑出",value:"slideOutUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转退出",value:"flipOutX"},{name:"Y轴翻转退出",value:"flipOutY"}]},{type:"back",name:"缩小滑出",children:[{name:"向下缩小滑出",value:"backOutDown"},{name:"从左缩小滑出",value:"backOutLeft"},{name:"从右缩小滑出",value:"backOutRight"},{name:"向上缩小滑出",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",children:[{name:"从右飞出",value:"lightSpeedOutRight"},{name:"从左飞出",value:"lightSpeedOutLeft"}]}],yk=[{type:"shake",name:"晃动",children:[{name:"左右摇晃",value:"shakeX"},{name:"上下摇晃",value:"shakeY"},{name:"摇头",value:"headShake"},{name:"摆动",value:"swing"},{name:"晃动",value:"wobble"},{name:"惊恐",value:"tada"},{name:"果冻",value:"jello"}]},{type:"other",name:"其他",children:[{name:"弹跳",value:"bounce"},{name:"闪烁",value:"flash"},{name:"脉搏",value:"pulse"},{name:"橡皮筋",value:"rubberBand"},{name:"心跳(快)",value:"heartBeat"}]}],wk=[{label:"无",value:"no"},{label:"随机",value:"random"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"},{label:"左右推移(3D)",value:"slideX3D"},{label:"上下推移(3D)",value:"slideY3D"},{label:"淡入淡出",value:"fade"},{label:"旋转",value:"rotate"},{label:"上下展开",value:"scaleY"},{label:"左右展开",value:"scaleX"},{label:"放大",value:"scale"},{label:"缩小",value:"scaleReverse"}],xk=e=>((0,i.dD)("data-v-270c5d30"),e=e(),(0,i.Cn)(),e),kk={class:"element-animation-panel"},bk={key:0,class:"element-animation"},_k={class:"type-title"},Ik={class:"pool-item-wrapper"},Sk=["onMouseenter","onClick"],Ck={key:0,class:"mask"},Lk={key:1,class:"tip"},Ek={class:"sequence-content"},Tk={class:"index"},Mk={class:"text"},Uk={class:"handler"},Wk={key:0,class:"configs"},Dk={class:"config-item"},Hk=xk((()=>(0,i._)("div",{style:{width:"35%"}},"持续时长:",-1))),Fk={class:"config-item"},Ak=xk((()=>(0,i._)("div",{style:{width:"35%"}},"触发方式:",-1))),Zk={class:"config-item"};var $k=(0,i.aZ)({__name:"ElementAnimationPanel",setup(e){const t={};for(const o of fk)for(const e of o.children)t[e.value]=e.name;for(const o of gk)for(const e of o.children)t[e.value]=e.name;for(const o of yk)for(const e of o.children)t[e.value]=e.name;const l=["in","out","attention"],a=F(),{handleElement:n,handleElementId:u}=(0,o.Jk)($()),{currentSlide:c,formatedAnimations:d,currentSlideAnimations:p}=(0,o.Jk)(a),v=[{key:"in",label:"入场",color:"#68a490"},{key:"out",label:"退场",color:"#d86344"},{key:"attention",label:"强调",color:"#e8b76a"}],m=(0,s.iH)("in");(0,i.YP)((()=>u.value),(()=>{f.value=!1}));const h=(0,s.iH)(""),f=(0,s.iH)(!1),{addHistorySnapshot:g}=ra(),y=(0,i.Fl)((()=>{const e=[];for(let l=0;le.id===o.elId));if(!i)continue;const s=Hn[i.type],r=t[o.effect];e.push({...o,index:0===n?l+1:"",elType:s,animationEffect:r})}}return e})),w=(0,i.Fl)((()=>{const e=p.value,t=e.filter((e=>e.elId===u.value));return t||[]})),x=e=>{const t=p.value.filter((t=>t.id!==e));a.updateSlide({animations:t}),g()},k=e=>{const{newIndex:t,oldIndex:l}=e;if(void 0===t||void 0===l||t===l)return;const n=JSON.parse(JSON.stringify(p.value)),o=n[l];n.splice(l,1),n.splice(t,0,o),a.updateSlide({animations:n}),g()},b=(e,t,l)=>{const a=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(a){const e=`${hk}${t}`;document.documentElement.style.setProperty("--animate-duration",`${l}ms`),a.classList.add(`${hk}animated`,e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),a.classList.remove(`${hk}animated`,e)};a.addEventListener("animationend",n,{once:!0})}},_=(e,t)=>{if(t<100||t>5e3)return;const l=p.value.map((l=>l.id===e?{...l,duration:t}:l));a.updateSlide({animations:l}),g()},I=(e,t)=>{const l=p.value.map((l=>l.id===e?{...l,trigger:t}:l));a.updateSlide({animations:l}),g()},S=(e,t)=>{const l=p.value.map((l=>l.id===C.value?{...l,type:e,effect:t}:l));a.updateSlide({animations:l}),f.value=!1,g();const n=p.value.find((e=>e.elId===u.value)),o=n?.duration||vk;setTimeout((()=>{b(u.value,t,o)}),0)},C=(0,s.iH)(""),L=(e,t)=>{if(C.value)return void S(e,t);const l=JSON.parse(JSON.stringify(p.value));l.push({id:(0,r.x0)(10),elId:u.value,type:e,effect:t,duration:vk,trigger:mk}),a.updateSlide({animations:l}),f.value=!1,g(),setTimeout((()=>{b(u.value,t,vk)}),0)},E=(0,s.iH)(!1),T=e=>{e?setTimeout((()=>E.value=!0),600):E.value=!1},M=e=>{f.value=!0,C.value=e,T(!0)},U={in:fk,out:gk,attention:yk};return(e,t)=>{const a=(0,i.up)("IconEffects"),o=(0,i.up)("IconClick"),r=(0,i.up)("IconPlayOne"),u=(0,i.up)("IconCloseSmall"),c=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",kk,[(0,s.SU)(n)?((0,i.wg)(),(0,i.iD)("div",bk,[(0,i.Wm)(rn,{trigger:"click",value:f.value,"onUpdate:value":[t[3]||(t[3]=e=>f.value=e),t[4]||(t[4]=e=>T(e))],style:{width:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(qd,{tabs:v,value:m.value,"onUpdate:value":t[0]||(t[0]=e=>m.value=e),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,null,[m.value===e?((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["animation-pool",e]),key:e},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(U[e],(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-type",key:l.name},[(0,i._)("div",_k,(0,ae.zw)(l.name)+":",1),(0,i._)("div",Ik,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.children,(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-item",key:l.name,onMouseenter:e=>h.value=l.value,onMouseleave:t[1]||(t[1]=e=>h.value=""),onClick:t=>L(e,l.value)},[(0,i._)("div",{class:(0,ae.C_)(["animation-box",[`${(0,s.SU)(hk)}animated`,`${(0,s.SU)(hk)}fast`,h.value===l.value&&`${(0,s.SU)(hk)}${l.value}`]])},(0,ae.zw)(l.name),3)],40,Sk)))),128))])])))),128)),E.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",Ck))],2)):(0,i.kq)("",!0)],64)))),64))])),default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{class:"element-animation-btn",onClick:t[2]||(t[2]=e=>C.value="")},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 添加动画 ")])),_:1})])),_:1},8,["value"])])):((0,i.wg)(),(0,i.iD)("div",Lk,[(0,i.Wm)(o,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 选中画布中的元素添加动画")])),(0,i.Wm)(Fc),(0,i.Wm)((0,s.SU)(Mm()),{class:"animation-sequence",modelValue:y.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:k},{item:(0,i.w5)((({element:e})=>[(0,i._)("div",{class:(0,ae.C_)(["sequence-item",[e.type,{active:(0,s.SU)(n)?.id===e.elId}]])},[(0,i._)("div",Ek,[(0,i._)("div",Tk,(0,ae.zw)(e.index),1),(0,i._)("div",Mk,"【"+(0,ae.zw)(e.elType)+"】"+(0,ae.zw)(e.animationEffect),1),(0,i._)("div",Uk,[(0,i.wy)((0,i.Wm)(r,{class:"handler-btn",onClick:t=>b(e.elId,e.effect,e.duration)},null,8,["onClick"]),[[c,"预览"]]),(0,i.wy)((0,i.Wm)(u,{class:"handler-btn",onClick:t=>x(e.id)},null,8,["onClick"]),[[c,"删除"]])])]),w.value[0]?.elId===e.elId?((0,i.wg)(),(0,i.iD)("div",Wk,[(0,i.Wm)(Fc,{style:{margin:"16px 0"}}),(0,i._)("div",Dk,[Hk,(0,i.Wm)(dv,{min:500,max:3e3,step:500,value:e.duration,"onUpdate:value":t=>_(e.id,t),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),(0,i._)("div",Fk,[Ak,(0,i.Wm)(sp,{value:e.trigger,"onUpdate:value":t=>I(e.id,t),style:{width:"65%"},options:[{label:"主动触发",value:"click"},{label:"与上一动画同时",value:"meantime"},{label:"上一动画之后",value:"auto"}]},null,8,["value","onUpdate:value"])]),(0,i._)("div",Zk,[(0,i.Wm)(Kd,{style:{width:"100%"},onClick:t=>M(e.id)},{default:(0,i.w5)((()=>[(0,i.Uk)("更换动画")])),_:2},1032,["onClick"])])])):(0,i.kq)("",!0)],2)])),_:1},8,["modelValue"])])}}});const Ok=(0,Nl.Z)($k,[["__scopeId","data-v-270c5d30"]]);var Rk=Ok;const Pk=[{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529"]},{background:"#333333",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]}];var zk=()=>{const e=F(),{slides:t,currentSlide:l,theme:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==(0,M.Z)(l.theme.color).getAlpha()){const e=(0,M.Z)(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==(0,M.Z)(l.color).getAlpha()){const e=(0,M.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==(0,M.Z)(l.color).getAlpha()){const e=(0,M.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}}return t},s=(e,t)=>{const l=i(e),a={};if(l.length>t.length){const e=(0,M.Z)(t[0]).analogous(l.length-t.length+10),a=e.map((e=>e.toHexString())).slice(1);t.push(...a)}for(let n=0;n{const l=s(e,t.colors);e.background&&"image"===e.background.type||(e.background={type:"solid",color:t.background});for(const a of e.elements){if("shape"===a.type&&(a.fill=l[(0,M.Z)(a.fill).toRgbString()]||a.fill,a.gradient&&delete a.gradient),"text"===a.type&&(a.fill&&(a.fill=l[(0,M.Z)(a.fill).toRgbString()]||a.fill),a.defaultColor=t.fontColor,a.defaultFontName=t.fontname),"table"===a.type){a.theme&&(a.theme.color=l[(0,M.Z)(a.theme.color).toRgbString()]||a.theme.color);for(const e of a.data)for(const l of e)l.style&&(l.style.color=t.fontColor,l.style.fontname=t.fontname)}"chart"===a.type&&(a.themeColor=[l[(0,M.Z)(a.themeColor[0]).toRgbString()]]||0,a.gridColor=t.fontColor),"line"===a.type&&(a.color=l[(0,M.Z)(a.color).toRgbString()]||a.color),"audio"===a.type&&(a.color=l[(0,M.Z)(a.color).toRgbString()]||a.color),"latex"===a.type&&(a.color=t.fontColor)}},u=t=>{const a=JSON.parse(JSON.stringify(l.value));r(a,t),e.updateSlide({background:a.background,elements:a.elements}),n()},c=l=>{const a=JSON.parse(JSON.stringify(t.value));for(const e of a)r(e,l);e.setTheme({backgroundColor:l.background,themeColor:l.colors[0],fontColor:l.fontColor,fontName:l.fontname}),e.setSlides(a),n()},d=()=>{const l=JSON.parse(JSON.stringify(t.value)),{themeColor:o,backgroundColor:i,fontColor:s,fontName:r}=a.value;for(const e of l){e.background&&"image"===e.background.type||(e.background={type:"solid",color:i});for(const t of e.elements)if("shape"===t.type)t.fill=o;else if("line"===t.type)t.color=o;else if("text"===t.type)t.defaultColor=s,t.defaultFontName=r,t.fill&&(t.fill=o);else if("table"===t.type){t.theme&&(t.theme.color=o);for(const e of t.data)for(const t of e)t.style&&(t.style.color=s,t.style.fontname=r)}else"chart"===t.type?(t.themeColor=[o],t.gridColor=s):"latex"===t.type?t.color=s:"audio"===t.type&&(t.color=o)}e.setSlides(l),n()};return{applyPresetThemeToSingleSlide:u,applyPresetThemeToAllSlides:c,applyThemeToAllSlides:d}};const Bk=e=>((0,i.dD)("data-v-475ddcb8"),e=e(),(0,i.Cn)(),e),Nk={class:"slide-design-panel"},jk=Bk((()=>(0,i._)("div",{class:"title"},"背景填充",-1))),Yk={class:"row"},Vk=Bk((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Jk={key:0,class:"background-image-wrapper"},qk={class:"background-image"},Xk={key:1,class:"background-gradient-wrapper"},Gk={class:"row"},Kk=Bk((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Qk={class:"row"},eb=Bk((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),tb={key:0,class:"row"},lb=Bk((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),ab={class:"row"},nb={class:"row"},ob=Bk((()=>(0,i._)("div",{style:{width:"40%"}},"画布尺寸:",-1))),ib=Bk((()=>(0,i._)("div",{class:"title"},"全局主题",-1))),sb={class:"row"},rb=Bk((()=>(0,i._)("div",{style:{width:"40%"}},"字体:",-1))),ub={class:"row"},cb=Bk((()=>(0,i._)("div",{style:{width:"40%"}},"字体颜色:",-1))),db={class:"row"},pb=Bk((()=>(0,i._)("div",{style:{width:"40%"}},"背景颜色:",-1))),vb={class:"row"},mb=Bk((()=>(0,i._)("div",{style:{width:"40%"}},"主题色:",-1))),hb={class:"row"},fb=Bk((()=>(0,i._)("div",{class:"title"},"预置主题",-1))),gb={class:"theme-list"},yb={class:"theme-item-content"},wb={class:"colors"},xb={class:"btns"},kb=["onClick"],bb=["onClick"];var _b=(0,i.aZ)({__name:"SlideDesignPanel",setup(e){const t=F(),{availableFonts:l}=(0,o.Jk)($()),{slides:a,currentSlide:n,viewportRatio:r,theme:u}=(0,o.Jk)(t),c=(0,i.Fl)((()=>n.value.background?n.value.background:{type:"solid",value:"#fff"})),{addHistorySnapshot:d}=ra(),{applyPresetThemeToSingleSlide:p,applyPresetThemeToAllSlides:v,applyThemeToAllSlides:m}=zk(),h=e=>{if("solid"===e){const e={...c.value,type:"solid",color:c.value.color||"#fff"};t.updateSlide({background:e})}else if("image"===e){const e={...c.value,type:"image",image:c.value.image||"",imageSize:c.value.imageSize||"cover"};t.updateSlide({background:e})}else{const e={...c.value,type:"gradient",gradientType:c.value.gradientType||"linear",gradientColor:c.value.gradientColor||["#fff","#fff"],gradientRotate:c.value.gradientRotate||0};t.updateSlide({background:e})}d()},f=e=>{t.updateSlide({background:{...c.value,...e}}),d()},g=e=>{const t=e[0];t&&ta(t).then((e=>f({image:e})))},y=()=>{const e=a.value.map((e=>({...e,background:n.value.background})));t.setSlides(e),d()},w=e=>{t.setTheme(e)},x=e=>{t.setViewportRatio(e)};return(e,t)=>{const a=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",Nk,[jk,(0,i._)("div",Yk,[(0,i.Wm)(sp,{style:{flex:"1"},value:c.value.type,"onUpdate:value":t[0]||(t[0]=e=>h(e)),options:[{label:"纯色填充",value:"solid"},{label:"图片填充",value:"image"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Vk,"solid"===c.value.type?((0,i.wg)(),(0,i.j4)(rn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:c.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>f({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:c.value.color||"#fff"},null,8,["color"])])),_:1})):"image"===c.value.type?((0,i.wg)(),(0,i.j4)(sp,{key:1,style:{flex:"1"},value:c.value.imageSize||"cover","onUpdate:value":t[2]||(t[2]=e=>f({imageSize:e})),options:[{label:"缩放",value:"contain"},{label:"拼贴",value:"repeat"},{label:"缩放铺满",value:"cover"}]},null,8,["value"])):((0,i.wg)(),(0,i.j4)(sp,{key:2,style:{flex:"1"},value:c.value.gradientType||"","onUpdate:value":t[3]||(t[3]=e=>f({gradientType:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"image"===c.value.type?((0,i.wg)(),(0,i.iD)("div",Jk,[(0,i.Wm)(Oa,{onChange:t[4]||(t[4]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i._)("div",qk,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundImage:`url(${c.value.image})`})},[(0,i.Wm)(a)],4)])])),_:1})])):(0,i.kq)("",!0),"gradient"===c.value.type?((0,i.wg)(),(0,i.iD)("div",Xk,[(0,i._)("div",Gk,[Kk,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:c.value.gradientColor[0],"onUpdate:modelValue":t[5]||(t[5]=e=>f({gradientColor:[e,c.value.gradientColor[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:c.value.gradientColor[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Qk,[eb,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:c.value.gradientColor[1],"onUpdate:modelValue":t[6]||(t[6]=e=>f({gradientColor:[c.value.gradientColor[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:c.value.gradientColor[1]},null,8,["color"])])),_:1})]),"linear"===c.value.gradientType?((0,i.wg)(),(0,i.iD)("div",tb,[lb,(0,i.Wm)(Ym,{min:0,max:360,step:15,value:c.value.gradientRotate||0,"onUpdate:value":t[7]||(t[7]=e=>f({gradientRotate:e})),style:{width:"60%"}},null,8,["value"])])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",ab,[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用背景到全部")])),_:1})]),(0,i.Wm)(Fc),(0,i._)("div",nb,[ob,(0,i.Wm)(sp,{style:{width:"60%"},value:(0,s.SU)(r),"onUpdate:value":t[9]||(t[9]=e=>x(e)),options:[{label:"宽屏 16 : 9",value:.5625},{label:"宽屏 16 : 10",value:.625},{label:"标准 4 : 3",value:.75},{label:"纸张 A3 / A4",value:.70710678}]},null,8,["value"])]),(0,i.Wm)(Fc),ib,(0,i._)("div",sb,[rb,(0,i.Wm)(sp,{style:{width:"60%"},value:(0,s.SU)(u).fontName,"onUpdate:value":t[10]||(t[10]=e=>w({fontName:e})),options:[...(0,s.SU)(l),...(0,s.SU)(E)]},null,8,["value","options"])]),(0,i._)("div",ub,[cb,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(u).fontColor,"onUpdate:modelValue":t[11]||(t[11]=e=>w({fontColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:(0,s.SU)(u).fontColor},null,8,["color"])])),_:1})]),(0,i._)("div",db,[pb,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(u).backgroundColor,"onUpdate:modelValue":t[12]||(t[12]=e=>w({backgroundColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:(0,s.SU)(u).backgroundColor},null,8,["color"])])),_:1})]),(0,i._)("div",vb,[mb,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:(0,s.SU)(u).themeColor,"onUpdate:modelValue":t[13]||(t[13]=e=>w({themeColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ah,{color:(0,s.SU)(u).themeColor},null,8,["color"])])),_:1})]),(0,i._)("div",hb,[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[14]||(t[14]=e=>(0,s.SU)(m)())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用主题到全部")])),_:1})]),(0,i.Wm)(Fc),fb,(0,i._)("div",gb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Pk),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"theme-item",key:t,style:(0,ae.j5)({backgroundColor:e.background,fontFamily:e.fontname})},[(0,i._)("div",yb,[(0,i._)("div",{class:"text",style:(0,ae.j5)({color:e.fontColor})},"文字 Aa",4),(0,i._)("div",wb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.colors,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"color-block",key:t,style:(0,ae.j5)({backgroundColor:e})},null,4)))),128))]),(0,i._)("div",xb,[(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(p)(e)},"应用",8,kb),(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(v)(e)},"应用全局",8,bb)])])],4)))),128))])])}}});const Ib=(0,Nl.Z)(_b,[["__scopeId","data-v-475ddcb8"]]);var Sb=Ib;const Cb={class:"slide-animation-panel"},Lb={class:"animation-pool"},Eb=["onClick"],Tb={class:"animation-text"};var Mb=(0,i.aZ)({__name:"SlideAnimationPanel",setup(e){const t=F(),{slides:l,currentSlide:a}=(0,o.Jk)(t),n=(0,i.Fl)((()=>a.value.turningMode||"slideY")),r=wk,{addHistorySnapshot:u}=ra(),c=e=>{e!==n.value&&(t.updateSlide({turningMode:e}),u())},d=()=>{const e=l.value.map((e=>({...e,turningMode:a.value.turningMode})));t.setSlides(e),Kl.success("已应用到全部"),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Cb,[(0,i._)("div",Lb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["animation-item",{active:n.value===e.value}]),key:e.label,onClick:t=>c(e.value)},[(0,i._)("div",{class:(0,ae.C_)(["animation-block",e.value])},null,2),(0,i._)("div",Tb,(0,ae.zw)(e.label),1)],10,Eb)))),128))]),(0,i.Wm)(Kd,{style:{width:"100%"},onClick:t[0]||(t[0]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用到全部")])),_:1})]))}});const Ub=(0,Nl.Z)(Mb,[["__scopeId","data-v-da618e26"]]);var Wb=Ub,Db=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=o=>{const{minX:i,maxX:s,minY:r,maxY:u}=we(l.value),c=JSON.parse(JSON.stringify(a.value.elements)),d={};for(const e of l.value)if(e.groupId&&!d[e.groupId]){const t=l.value.filter((t=>t.groupId===e.groupId));d[e.groupId]=we(t)}if(o===K.LEFT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minX-i;e.left=e.left-l}else if("rotate"in e&&e.rotate){const{offsetX:t}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=i-t}else e.left=i}));else if(o===K.RIGHT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxX-s;e.left=e.left-l}else{const t="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;if("rotate"in e&&e.rotate){const{offsetX:l}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=s-t+l}else e.left=s-t}}));else if(o===K.TOP)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minY-r;e.top=e.top-l}else if("rotate"in e&&e.rotate){const{offsetY:t}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=r-t}else e.top=r}));else if(o===K.BOTTOM)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxY-u;e.top=e.top-l}else{const t="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;if("rotate"in e&&e.rotate){const{offsetY:l}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=u-t+l}else e.top=u-t}}));else if(o===K.HORIZONTAL){const e=(i+s)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxX+t.minX)/2,n=a-e;l.left=l.left-n}else{const t="line"===l.type?Math.max(l.start[0],l.end[0]):l.width;l.left=e-t/2}}))}else if(o===K.VERTICAL){const e=(r+u)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxY+t.minY)/2,n=a-e;l.top=l.top-n}else{const t="line"===l.type?Math.max(l.start[1],l.end[1]):l.height;l.top=e-t/2}}))}e.updateSlide({elements:c}),n()};return{alignActiveElement:i}},Hb=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),s=(0,i.Fl)((()=>{let e=0;const t=[];for(const a of l.value)a.groupId?t.includes(a.groupId)||(t.push(a.groupId),e+=1):e+=1;return e})),r=()=>{const{minX:o,maxX:i}=we(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minX:t,maxX:l}=ye(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minX:t,maxX:l}=we(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minX:t}=ye(e);h.push({pos:t,el:e})}for(let e=1;e{const{minY:o,maxY:i}=we(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minY:t,maxY:l}=ye(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minY:t,maxY:l}=we(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minY:t}=ye(e);h.push({pos:t,el:e})}for(let e=1;e{t.value?n(e):o(e)};return(e,n)=>{const o=(0,i.up)("IconAlignLeft"),p=(0,i.up)("IconAlignHorizontally"),v=(0,i.up)("IconAlignRight"),m=(0,i.up)("IconAlignTop"),h=(0,i.up)("IconAlignVertically"),f=(0,i.up)("IconAlignBottom"),g=(0,i.up)("IconGroup"),y=(0,i.up)("IconUngroup"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Fb,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:n[0]||(n[0]=e=>d((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:n[1]||(n[1]=e=>d((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1})),[[w,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:n[2]||(n[2]=e=>d((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1})),[[w,"右对齐"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:n[3]||(n[3]=e=>d((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1})),[[w,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:n[4]||(n[4]=e=>d((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(h)])),_:1})),[[w,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kd,{style:{flex:"1"},onClick:n[5]||(n[5]=e=>d((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"下对齐"]])])),_:1}),(0,s.SU)(r)>2?((0,i.wg)(),(0,i.j4)(qf,{key:0,class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:n[6]||(n[6]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Uk)("水平均匀分布")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:n[7]||(n[7]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Uk)("垂直均匀分布")])),_:1})])),_:1})):(0,i.kq)("",!0),(0,i.Wm)(Fc),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{disabled:!(0,s.SU)(t),onClick:n[8]||(n[8]=e=>(0,s.SU)(l)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g,{style:{"margin-right":"3px"}}),(0,i.Uk)("组合")])),_:1},8,["disabled"]),(0,i.Wm)(Kd,{disabled:(0,s.SU)(t),onClick:n[9]||(n[9]=e=>(0,s.SU)(a)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{style:{"margin-right":"3px"}}),(0,i.Uk)("取消组合")])),_:1},8,["disabled"])])),_:1})])}}});const Zb=(0,Nl.Z)(Ab,[["__scopeId","data-v-e95a4c6c"]]);var $b=Zb;const Ob=[{key:"letter",label:"字母",children:["α","β","γ","δ","ϵ","ε","ζ","η","θ","ϑ","ι","κ","λ","μ","ν","ξ","π","ϖ","ρ","ϱ","σ","ς","τ","υ","ϕ","φ","χ","ψ","ω","Γ","Δ","Θ","Λ","Ξ","Π","Σ","Υ","Φ","Ψ","Ω","𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙","𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳","𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩","𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃"]},{key:"number",label:"序号",children:["①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","⑴","⑵","⑶","⑷","⑸","⑹","⑺","⑻","⑼","⑽","⑾","⑿","⒀","⒁","⒂","⒃","⒄","⒅","⒆","⒇","º","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","Ⅰ","Ⅱ","Ⅲ","Ⅳ","Ⅴ","Ⅵ","Ⅶ","Ⅷ","Ⅸ","Ⅹ","Ⅺ","Ⅻ","Ⅼ","Ⅽ","Ⅾ","Ⅿ","ⅰ","ⅱ","ⅲ","ⅳ","ⅴ","ⅵ","ⅶ","ⅷ","ⅸ","ⅹ","ⅺ","ⅻ","ⅼ","ⅽ","ⅾ","ⅿ","ↀ","ↁ","ↂ","㊀","㊁","㊂","㊃","㊄","㊅","㊆","㊇","㊈","㊉","㈠","㈡","㈢","㈣","㈤","㈥","㈦","㈧","㈨","㈩","𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"]},{key:"math",label:"数学",children:["+","-","×","÷","=","~","¬","±","%","°","ǃ","‰","‱","½","⅓","⅔","¼","¾","<",">","l","o","g","l","g","l","n","⨂","⨁","⨄","⨃","⨅","⨆","√","∛","∜","∝","∞","∟","∠","∡","∢","∧","∨","∩","∪","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","∼","∽","∾","∿","≃","≄","≅","≆","≇","≈","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≤","≥","≦","≧","≨","≩","≪","≫","≺","≻","≼","≽","≾","≿","⊀","⊁","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⊓","⊔","⊢","⊣","⊤","⊥","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⊲","⊳","⊴","⊵","⋀","⋁","⋂","⋃","⋉","⋊","⋋","⋌","⟨","⟩","⟪","⟫","⟮","⟯","⧼","⧽","⦰"]},{key:"arrow",label:"箭头",children:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},{key:"graph",label:"图形",children:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],Rb={class:"symbol-panel"},Pb={class:"pool"},zb=["onClick"],Bb={class:"symbol"};var Nb=(0,i.aZ)({__name:"SymbolPanel",setup(e){const t=(0,s.iH)(Ob[0].key),l=(0,i.Fl)((()=>{const e=Ob.find((e=>e.key===t.value));return e?.children||[]})),a=Ob.map((e=>({key:e.key,label:e.label}))),n=e=>{Ai.emit(Di.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,o)=>((0,i.wg)(),(0,i.iD)("div",Rb,[(0,i.Wm)(qd,{tabs:(0,s.SU)(a),value:t.value,"onUpdate:value":o[0]||(o[0]=e=>t.value=e),tabsStyle:{marginBottom:"8px"},spaceBetween:""},null,8,["tabs","value"]),(0,i._)("div",Pb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:t,onClick:t=>n(e)},[(0,i._)("div",Bb,(0,ae.zw)(e),1)],8,zb)))),128))])]))}});const jb=(0,Nl.Z)(Nb,[["__scopeId","data-v-2bb5f257"]]);var Yb=jb;const Vb={class:"toolbar"},Jb={class:"content"};var qb=(0,i.aZ)({__name:"index",setup(e){const t=$(),{activeElementIdList:l,handleElement:n,toolbarState:r}=(0,o.Jk)(t),u=(0,i.Fl)((()=>"text"===n.value?.type?[{label:"样式",key:a.EL_STYLE},{label:"符号",key:a.SYMBOL},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}]:[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}])),c=[{label:"设计",key:a.SLIDE_DESIGN},{label:"切换",key:a.SLIDE_ANIMATION},{label:"动画",key:a.EL_ANIMATION}],d=[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.MULTI_POSITION}],p=e=>{t.setToolbarState(e)},v=(0,i.Fl)((()=>l.value.length?l.value.length>1?d:u.value:c));(0,i.YP)(v,(()=>{const e=v.value.map((e=>e.key));e.includes(r.value)||t.setToolbarState(e[0])}));const m=(0,i.Fl)((()=>{const e={[a.EL_STYLE]:Qx,[a.EL_POSITION]:pk,[a.EL_ANIMATION]:Rk,[a.SLIDE_DESIGN]:Sb,[a.SLIDE_ANIMATION]:Wb,[a.MULTI_POSITION]:$b,[a.SYMBOL]:Yb};return e[r.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Vb,[(0,i.Wm)(qd,{tabs:v.value,value:(0,s.SU)(r),card:"","onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["tabs","value"]),(0,i._)("div",Jb,[((0,i.wg)(),(0,i.j4)((0,i.LL)(m.value)))])]))}});const Xb=(0,Nl.Z)(qb,[["__scopeId","data-v-6c9ece83"]]);var Gb=Xb;const Kb={class:"editor"};var Qb=(0,i.aZ)({__name:"Editor",props:{value:{}},emits:["update"],setup(e,{expose:t,emit:l}){const a=e,n=$(),o=(0,s.iH)();let r;const p=(0,s.iH)(),v=(0,s.iH)(),m=(0,s.iH)(),h=()=>{v.value&&v.value.hide()},f=(0,U.debounce)((function(){l("update",r.dom.innerHTML)}),300,{trailing:!0}),g=()=>{n.setDisableHotkeysState(!0)},y=()=>{n.setDisableHotkeysState(!1)},w=()=>{if(!r)return;const{doc:e,tr:t}=r.state;r.dispatch(t.replaceRangeWith(0,e.content.size,Ui(a.value)))};t({updateTextContent:w});const x=()=>{const e=window.getSelection();if(!e||!e.anchorNode||!e.focusNode||e.isCollapsed||"Caret"===e.type||"None"===e.type)return;const t=e.getRangeAt(0);v.value&&(p.value=I(r),v.value.setProps({getReferenceClientRect:()=>t.getBoundingClientRect()}),v.value.show())},k=()=>{h(),window.getSelection()?.removeAllRanges()},b=(e,t)=>{if("color"===e&&t){const e=r.state.schema.marks.forecolor.create({color:t});c(r),d(r,e)}else if("backcolor"===e&&t){const e=r.state.schema.marks.backcolor.create({backcolor:t});c(r),d(r,e)}else if("bold"===e)c(r),(0,u.w9)(r.state.schema.marks.strong)(r.state,r.dispatch);else if("em"===e)c(r),(0,u.w9)(r.state.schema.marks.em)(r.state,r.dispatch);else if("underline"===e)c(r),(0,u.w9)(r.state.schema.marks.underline)(r.state,r.dispatch);else if("strikethrough"===e)c(r),(0,u.w9)(r.state.schema.marks.strikethrough)(r.state,r.dispatch);else if("clear"===e){c(r);const{$from:e,$to:t}=r.state.selection;r.dispatch(r.state.tr.removeMark(e.pos,t.pos))}r.focus(),f(),p.value=I(r)};return(0,i.bv)((()=>{r=Wi(o.value,a.value,{handleDOMEvents:{focus:g,blur:y,mouseup:x,mousedown:k,input:f}},{placeholder:"点击输入演讲者备注"}),v.value=(0,nn.ZP)(o.value,{duration:0,content:m.value,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",offset:[0,6]})})),(0,i.Ah)((()=>{r&&r.destroy()})),(e,t)=>{const l=(0,i.up)("IconTextBold"),a=(0,i.up)("IconTextItalic"),n=(0,i.up)("IconTextUnderline"),s=(0,i.up)("IconStrikethrough"),r=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),c=(0,i.up)("IconFormat"),d=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",Kb,[(0,i._)("div",{class:"prosemirror-editor",ref_key:"editorViewRef",ref:o},null,512),(0,i._)("div",{class:"menu",ref_key:"menuRef",ref:m},[(0,i._)("button",{class:(0,ae.C_)({active:p.value?.bold}),onClick:t[0]||(t[0]=e=>b("bold"))},[(0,i.Wm)(l)],2),(0,i._)("button",{class:(0,ae.C_)({active:p.value?.em}),onClick:t[1]||(t[1]=e=>b("em"))},[(0,i.Wm)(a)],2),(0,i._)("button",{class:(0,ae.C_)({active:p.value?.underline}),onClick:t[2]||(t[2]=e=>b("underline"))},[(0,i.Wm)(n)],2),(0,i._)("button",{class:(0,ae.C_)({active:p.value?.strikethrough}),onClick:t[3]||(t[3]=e=>b("strikethrough"))},[(0,i.Wm)(s)],2),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:p.value?.color,"onUpdate:modelValue":t[4]||(t[4]=e=>b("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("button",null,[(0,i.Wm)(r)])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(lf,{modelValue:p.value?.backcolor,"onUpdate:modelValue":t[5]||(t[5]=e=>b("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("button",null,[(0,i.Wm)(u)])])),_:1}),(0,i._)("button",{onClick:t[6]||(t[6]=e=>b("clear"))},[(0,i.Wm)(c)])],512)])),[[d,h]])}}});const e_=(0,Nl.Z)(Qb,[["__scopeId","data-v-159c016f"]]);var t_=e_;const l_={class:"remark"};var a_=(0,i.aZ)({__name:"index",props:{height:{}},emits:["update:height"],setup(e,{emit:t}){const l=e,a=F(),{currentSlide:n}=(0,o.Jk)(a),r=(0,s.iH)();(0,i.YP)((()=>n.value.id),(()=>{(0,i.Y3)((()=>{r.value.updateTextContent()}))}),{immediate:!0});const u=(0,i.Fl)((()=>n.value?.remark||"")),c=e=>{a.updateSlide({remark:e})},d=e=>{let a=!0;const n=e.pageY,o=l.height;document.onmousemove=e=>{if(!a)return;const l=e.pageY,i=l-n;let s=-i+o;s<40&&(s=40),s>360&&(s=360),t("update:height",s)},document.onmouseup=()=>{a=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",l_,[(0,i._)("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>d(e))},null,32),(0,i.Wm)(t_,{value:u.value,ref_key:"editorRef",ref:r,onUpdate:t[1]||(t[1]=e=>c(e))},null,8,["value"])]))}});const n_=(0,Nl.Z)(a_,[["__scopeId","data-v-458a41b9"]]);var o_=n_,i_=l(3162),s_=l(3907);const r_=["style","script","template"],u_=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],c_={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},d_=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],p_=(e,t)=>{const l=t-e.position;v_(e,l)},v_=(e,t)=>{e.position=e.position+t},m_=(e,t)=>{const l=!1;while(!l){const l=e.indexOf("<",t);if(-1===l)return l;const a=e.charAt(l+1);if("/"===a||"!"===a||/[A-Za-z0-9]/.test(a))return l;t=l+1}return-1},h_=e=>{const{str:t}=e;let l=m_(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const a=t.slice(e.position,l);p_(e,l),e.tokens.push({type:"text",content:a})},f_=e=>{const{str:t}=e;v_(e,4);let l=t.indexOf("--\x3e",e.position),a=l+3;-1===l&&(l=a=t.length);const n=t.slice(e.position,l);p_(e,a),e.tokens.push({type:"comment",content:n})},g_=e=>{const{str:t}=e,l=t.length;let a=e.position;while(a"===e);if(l)break;a++}let n=a+1;while(n"===e);if(!l)break;n++}p_(e,n);const o=t.slice(a,n);return e.tokens.push({type:"tag",content:o}),o},y_=e=>{const{str:t,tokens:l}=e;let a=e.position,n=null,o=a;const i=[],s=t.length;while(a"===e;if(l){a!==o&&i.push(t.slice(o,a));break}const s=/\s/.test(e);if(s){a!==o&&i.push(t.slice(o,a)),o=a+1,a++;continue}const r="'"===e||'"'===e;r?(n=e,a++):a++}p_(e,a);const r="attribute";for(let u=0;u1){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=i[u+2];if(u+=1,a){const t=e+"="+a;l.push({type:r,content:t}),u+=1;continue}}}if((0,U.endsWith)(e,"=")){const t=i[u+1];if(t&&-1===t.indexOf("=")){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=e.slice(0,-1);l.push({type:r,content:a})}else l.push({type:r,content:e})}},w_=(e,t)=>{const{str:l,tokens:a}=t,n=e.toLowerCase(),o=l.length;let i=t.position;while(i{const{str:t}=e,l=t.charAt(e.position+1),a="/"===l;v_(e,a?2:1),e.tokens.push({type:"tag-start",close:a});const n=g_(e);y_(e);const o=t.charAt(e.position),i="/"===o;return v_(e,i?2:1),e.tokens.push({type:"tag-end",close:i}),n},k_=e=>{const t=e.str,l=t.length;while(e.position{const t={str:e,position:0,tokens:[]};return k_(t),t.tokens},__=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return C_(l),t.children},I_=(e,t)=>{const l=c_[e];if(l){let a=t.length-1;while(a>=0){const n=t[a].tagName;if(n===e)break;if(n&&l.includes(n))return!0;a--}}return!1},S_=(e,t)=>{e.splice(t)},C_=e=>{const{stack:t,tokens:l}=e;let{cursor:a}=e,n=t[t.length-1].children;const o=l.length;while(a-1)if(t[e].tagName===s){n=!0;break}while(a0){if(s===t[e].tagName){S_(t,e);const l=e-1;n=t[l].children;break}e-=1}}const c=[];let d;while(a{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},E_=e=>{const t=e.charAt(0),l=e.length-1,a='"'===t||"'"===t;return a&&t===e.charAt(l)?e.slice(1,l):e},T_=e=>e.map((e=>{const t=L_(e.trim(),"="),l=t[0],a="string"===typeof t[1]?E_(t[1]):null;return{key:l,value:a}})),M_=e=>e.map((e=>{if("element"===e.type){const t=M_(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:T_(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t})),U_=e=>{const t=b_(e),l=__(t);return M_(l)};var W_=l(5851),D_=l(7943);const H_={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},F_=e=>{const t=new W_.OU(e),l=[];for(const a of t.commands){const e=H_[a.type];if(2!==a.type&&16!==a.type||l.push({x:a.x,y:a.y,relative:a.relative,type:e}),32===a.type)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:a.relative,type:e});else if(128===a.type)l.push({x:a.x,y:a.y,curve:{type:"quadratic",x1:a.x1,y1:a.y1},relative:a.relative,type:e});else if(512===a.type){const e=l[l.length-1];if(!["M","L","Q","C"].includes(e.type))continue;const t=(0,D_.Z)({px:e.x,py:e.y,cx:a.x,cy:a.y,rx:a.rX,ry:a.rY,xAxisRotation:a.xRot,largeArcFlag:a.lArcFlag,sweepFlag:a.sweepFlag});for(const a of t)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:!1,type:"C"})}else{if(1!==a.type)continue;l.push({close:!0,type:e})}}return l},A_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Z_="data:image/svg+xml;base64,",$_=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let l=0;l127&&a<2048?(t+=String.fromCharCode(a>>6|192),t+=String.fromCharCode(63&a|128)):(t+=String.fromCharCode(a>>12|224),t+=String.fromCharCode(a>>6&63|128),t+=String.fromCharCode(63&a|128))}return t},O_=e=>{let t,l,a,n,o,i,s,r="",u=0;e=$_(e);while(u>2,o=(3&t)<<4|l>>4,i=(15&l)<<2|a>>6,s=63&a,isNaN(l)?i=s=64:isNaN(a)&&(s=64),r=r+A_.charAt(n)+A_.charAt(o)+A_.charAt(i)+A_.charAt(s);return r},R_=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return Z_+O_(l)},P_=100,z_=.75;var B_=()=>{const e=F(),{slides:t,theme:l,viewportRatio:a,title:n}=(0,o.Jk)(e),i=(0,s.iH)(!1),r=(e,t,l,a=!0)=>{i.value=!0;const o="png"===t?nh.YM:nh.hi,s=e.querySelectorAll("foreignObject [xmlns]");s.forEach((e=>e.removeAttribute("xmlns"))),setTimeout((()=>{const s={quality:l,width:1600};a&&(s.fontEmbedCSS=""),o(e,s).then((e=>{i.value=!1,(0,i_.saveAs)(e,`${n.value}.${t}`)})).catch((()=>{i.value=!1,Kl.error("导出图片失败")}))}),200)},u=e=>{const t=new Blob([ce(JSON.stringify(e))],{type:""});(0,i_.saveAs)(t,`${n.value}.pptist`)},c=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});(0,i_.saveAs)(e,`${n.value}.json`)},d=e=>{const t=(0,M.Z)(e),l=t.getAlpha(),a=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:a}},p=e=>{const t=U_(e);let l=!1,a=0;const n=[],o=(e,t={})=>{for(const i of e){const e="tagName"in i&&["div","li","p"].includes(i.tagName);if(e&&n.length){const e=n[n.length-1];e.options||(e.options={}),e.options.breakLine=!0}const s={...t},r="attributes"in i?i.attributes.find((e=>"style"===e.key)):null;if(r&&r.value){const e=r.value.split(";");for(const t of e){const[e,l]=t.split(": "),[a,n]=[(0,U.trim)(e),(0,U.trim)(l)];a&&n&&(s[a]=n)}}if("tagName"in i){if("em"===i.tagName&&(s["font-style"]="italic"),"strong"===i.tagName&&(s["font-weight"]="bold"),"sup"===i.tagName&&(s["vertical-align"]="super"),"sub"===i.tagName&&(s["vertical-align"]="sub"),"a"===i.tagName){const e=i.attributes.find((e=>"href"===e.key));s["href"]=e?.value||""}if("ul"===i.tagName&&(s["list-type"]="ul"),"ol"===i.tagName&&(s["list-type"]="ol"),"li"===i.tagName&&(l=!0),"p"===i.tagName&&"attributes"in i){const e=i.attributes.find((e=>"data-indent"===e.key));e&&e.value&&(a=+e.value)}}if("tagName"in i&&"br"===i.tagName)n.push({text:"",options:{breakLine:!0}});else if("content"in i){const e=i.content.replace(/ /g," ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,""),t={};s["font-size"]&&(t.fontSize=parseInt(s["font-size"])*z_),s["color"]&&(t.color=d(s["color"]).color),s["background-color"]&&(t.highlight=d(s["background-color"]).color),s["text-decoration-line"]&&(-1!==s["text-decoration-line"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration-line"].indexOf("line-through")&&(t.strike="sngStrike")),s["text-decoration"]&&(-1!==s["text-decoration"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration"].indexOf("line-through")&&(t.strike="sngStrike")),s["vertical-align"]&&("super"===s["vertical-align"]&&(t.superscript=!0),"sub"===s["vertical-align"]&&(t.subscript=!0)),s["text-align"]&&(t.align=s["text-align"]),s["font-weight"]&&(t.bold="bold"===s["font-weight"]),s["font-style"]&&(t.italic="italic"===s["font-style"]),s["font-family"]&&(t.fontFace=s["font-family"]),s["href"]&&(t.hyperlink={url:s["href"]}),l&&"ol"===s["list-type"]&&(t.bullet={type:"number",indent:20*z_},t.paraSpaceBefore=.1,l=!1),l&&"ul"===s["list-type"]&&(t.bullet={indent:20*z_},t.paraSpaceBefore=.1,l=!1),a&&(t.indentLevel=a,a=0),n.push({text:e,options:t})}else"children"in i&&o(i.children,s)}};return o(t),n},v=(e,t={x:1,y:1})=>e.map((e=>{if(void 0!==e.close)return{close:!0};if("M"===e.type)return{x:e.x/P_*t.x,y:e.y/P_*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/P_*t.x,y:e.y/P_*t.y,curve:{type:"cubic",x1:e.curve.x1/P_*t.x,y1:e.curve.y1/P_*t.y,x2:e.curve.x2/P_*t.x,y2:e.curve.y2/P_*t.y}};if("quadratic"===e.curve.type)return{x:e.x/P_*t.x,y:e.y/P_*t.y,curve:{type:"quadratic",x1:e.curve.x1/P_*t.x,y1:e.curve.y1/P_*t.y}}}return{x:e.x/P_*t.x,y:e.y/P_*t.y}})),m=e=>{const t=d(e.color),{h:l,v:a}=e;let n=4,o=45;return 0===l&&0===a?(n=4,o=45):0===l?a>0?(n=a,o=90):(n=-a,o=270):0===a?l>0?(n=l,o=1):(n=-l,o=180):l>0&&a>0?(n=Math.max(l,a),o=45):l>0&&a<0?(n=Math.max(l,-a),o=315):l<0&&a>0?(n=Math.max(-l,a),o=135):l<0&&a<0&&(n=Math.max(-l,-a),o=225),{type:"outer",color:t.color.replace("#",""),opacity:t.alpha,blur:e.blur*z_,offset:n,angle:o}},h=e=>{const t=d(e?.color||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:(e.width||1)*z_,dashType:"solid"===e.style?"solid":"dash"}},f=e=>{const{type:l,target:a}=e;if("web"===l)return{url:a};if("slide"===l){const e=t.value.findIndex((e=>e.id===a));if(-1!==e)return{slide:e+1}}return null},g=(e,t,o)=>{i.value=!0;const s=new s_.Z;if(.625===a.value?s.layout="LAYOUT_16x10":.75===a.value?s.layout="LAYOUT_4x3":.70710678===a.value?(s.defineLayout({name:"A3",width:10,height:7.0710678}),s.layout="A3"):s.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=d(l.value.backgroundColor);s.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=s.addSlide();if(l.background){const t=l.background;if("image"===t.type&&t.image)e.background={data:t.image};else if("solid"===t.type&&t.color){const l=d(t.color);e.background={color:l.color,transparency:100*(1-l.alpha)}}else if("gradient"===t.type&&t.gradientColor){const[l,a]=t.gradientColor,n=M.Z.mix(l,a).toHexString(),o=d(n);e.background={color:o.color,transparency:100*(1-o.alpha)}}}if(l.remark&&e.addNotes(l.remark),l.elements)for(const t of l.elements)if("text"===t.type){const l=p(t.content),a={x:t.left/P_,y:t.top/P_,w:t.width/P_,h:t.height/P_,fontSize:20*z_,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10*z_,paraSpaceBefore:5*z_,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(a.rotate=t.rotate),t.wordSpace&&(a.charSpacing=t.wordSpace*z_),t.lineHeight&&(a.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=d(t.fill),l=void 0===t.opacity?1:t.opacity;a.fill={color:e.color,transparency:100*(1-e.alpha*l)}}t.defaultColor&&(a.color=d(t.defaultColor).color),t.defaultFontName&&(a.fontFace=t.defaultFontName),t.shadow&&(a.shadow=m(t.shadow)),t.outline?.width&&(a.line=h(t.outline)),void 0!==t.opacity&&(a.transparency=100*(1-t.opacity)),void 0!==t.paragraphSpace&&(a.paraSpaceBefore=t.paragraphSpace*z_),t.vertical&&(a.vert="eaVert"),e.addText(l,a)}else if("image"===t.type){const l={path:t.src,x:t.left/P_,y:t.top/P_,w:t.width/P_,h:t.height/P_};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=f(t.link);e&&(l.hyperlink=e)}if(t.filters?.opacity&&(l.transparency=100-parseInt(t.filters?.opacity)),t.clip){"ellipse"===t.clip.shape&&(l.rounding=!0);const[e,a]=t.clip.range,[n,o]=e,[i,s]=a,r=t.width/((i-n)/P_),u=t.height/((s-o)/P_);l.w=r/P_,l.h=u/P_,l.sizing={type:"crop",x:n/P_*r/P_,y:o/P_*u/P_,w:(i-n)/P_*r/P_,h:(s-o)/P_*u/P_}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=R_(l),n={data:a,x:t.left/P_,y:t.top/P_,w:t.width/P_,h:t.height/P_};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else{const l={x:t.width/t.viewBox[0],y:t.height/t.viewBox[1]},a=v(F_(t.path),l),n=d(t.fill),o=void 0===t.opacity?1:t.opacity,i={x:t.left/P_,y:t.top/P_,w:t.width/P_,h:t.height/P_,fill:{color:n.color,transparency:100*(1-n.alpha*o)},points:a};if(t.flipH&&(i.flipH=t.flipH),t.flipV&&(i.flipV=t.flipV),t.shadow&&(i.shadow=m(t.shadow)),t.outline?.width&&(i.line=h(t.outline)),t.rotate&&(i.rotate=t.rotate),t.link){const e=f(t.link);e&&(i.hyperlink=e)}e.addShape("custGeom",i)}if(t.text){const l=p(t.text.content),a={x:t.left/P_,y:t.top/P_,w:t.width/P_,h:t.height/P_,fontSize:20*z_,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5*z_,valign:t.text.align};t.rotate&&(a.rotate=t.rotate),t.text.defaultColor&&(a.color=d(t.text.defaultColor).color),t.text.defaultFontName&&(a.fontFace=t.text.defaultFontName),e.addText(l,a)}}else if("line"===t.type){const l=Ie(t),a=v(F_(l)),{minX:n,maxX:o,minY:i,maxY:s}=ye(t),r=d(t.color),u={x:t.left/P_,y:t.top/P_,w:(o-n)/P_,h:(s-i)/P_,line:{color:r.color,transparency:100*(1-r.alpha),width:t.width*z_,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:a};t.shadow&&(u.shadow=m(t.shadow)),e.addShape("custGeom",u)}else if("chart"===t.type){const l=[];for(let e=0;ed(e).color));else if(1===t.themeColor.length)a=(0,M.Z)(t.themeColor[0]).analogous(10).map((e=>d(e.toHexString()).color));else{const e=t.themeColor.length,l=(0,M.Z)(t.themeColor[e-1]).analogous(11-e).map((e=>e.toHexString()));a=[...t.themeColor.slice(0,e-1),...l].map((e=>d(e).color))}const n={x:t.left/P_,y:t.top/P_,w:t.width/P_,h:t.height/P_,chartColors:"pie"===t.chartType?a:a.slice(0,t.data.series.length)};t.fill&&(n.plotArea={fill:{color:d(t.fill).color}}),t.legend&&(n.showLegend=!0,n.legendPos="top"===t.legend?"t":"b",n.legendColor=d(t.gridColor||"#000000").color,n.legendFontSize=14*z_);let o=s.ChartType.bar;"bar"===t.chartType?(o=s.ChartType.bar,n.barDir=t.options?.horizontalBars?"bar":"col"):"line"===t.chartType?(t.options?.showArea?o=s.ChartType.area:!1===t.options?.showLine?(o=s.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map(((e,t)=>t))}),n.lineSize=0):o=s.ChartType.line,t.options?.lineSmooth&&(n.lineSmooth=!0)):"pie"===t.chartType&&(t.options?.donut?(o=s.ChartType.doughnut,n.holeSize=75):o=s.ChartType.pie),e.addChart(o,l,n)}else if("table"===t.type){const l=[];for(let e=0;e1||n.rowspan>1)for(let a=e;ad(e))));for(let e=0;et.width*e/P_))};t.theme&&(s.fill={color:"#ffffff"}),t.outline.width&&t.outline.color&&(s.border={type:"solid"===t.outline.style?"solid":"dash",pt:t.outline.width*z_,color:d(t.outline.color).color}),e.addTable(a,s)}else if("latex"===t.type){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=R_(l),n={data:a,x:t.left/P_,y:t.top/P_,w:t.width/P_,h:t.height/P_};if(t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else if(!o&&("video"===t.type||"audio"===t.type)){const l={x:t.left/P_,y:t.top/P_,w:t.width/P_,h:t.height/P_,path:t.src,type:t.type};"video"===t.type&&t.poster&&(l.cover=t.poster);const a=t.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);a&&a[1]?l.extn=a[1]:t.ext&&(l.extn=t.ext);const n=["avi","mp4","m4v","mov","wmv"],o=["mp3","m4a","mp4","wav","wma"];l.extn&&[...n,...o].includes(l.extn)&&e.addMedia(l)}}setTimeout((()=>{s.writeFile({fileName:`${n.value}.pptx`}).then((()=>i.value=!1)).catch((()=>{i.value=!1,Kl.error("导出失败")}))}),200)};return{exporting:i,exportImage:r,exportJSON:c,exportSpecificFile:u,exportPPTX:g}};const N_=e=>((0,i.dD)("data-v-1df3f398"),e=e(),(0,i.Cn)(),e),j_={class:"export-img-dialog"},Y_={class:"thumbnails-view"},V_={class:"configs"},J_={class:"row"},q_=N_((()=>(0,i._)("div",{class:"title"},"导出格式:",-1))),X_={class:"row"},G_=N_((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),K_={key:0,class:"row"},Q_=["data-range"],eI={class:"row"},tI=N_((()=>(0,i._)("div",{class:"title"},"图片质量:",-1))),lI={class:"row"},aI=N_((()=>(0,i._)("div",{class:"title"},"忽略在线字体:",-1))),nI={class:"config-item"},oI={class:"btns"};var iI=(0,i.aZ)({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),n=(0,s.iH)(),r=(0,s.iH)("all"),u=(0,s.iH)([1,l.value.length]),c=(0,s.iH)("jpeg"),d=(0,s.iH)(1),p=(0,s.iH)(!0),v=(0,i.Fl)((()=>"all"===r.value?l.value:"current"===r.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=u.value;return t>=l-1&&t<=a-1})))),{exportImage:m,exporting:h}=B_(),f=()=>{n.value&&m(n.value,c.value,d.value,p.value)};return(e,a)=>{const o=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",j_,[(0,i._)("div",Y_,[(0,i._)("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:n},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,(e=>((0,i.wg)(),(0,i.j4)(jd,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"])))),128))],512)]),(0,i._)("div",V_,[(0,i._)("div",J_,[q_,(0,i.Wm)(tg,{class:"config-item",value:c.value,"onUpdate:value":a[0]||(a[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"50%"},value:"jpeg"},{default:(0,i.w5)((()=>[(0,i.Uk)("JPEG")])),_:1}),(0,i.Wm)(Kf,{style:{width:"50%"},value:"png"},{default:(0,i.w5)((()=>[(0,i.Uk)("PNG")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",X_,[G_,(0,i.Wm)(tg,{class:"config-item",value:r.value,"onUpdate:value":a[1]||(a[1]=e=>r.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===r.value?((0,i.wg)(),(0,i.iD)("div",K_,[(0,i._)("div",{class:"title","data-range":`(${u.value[0]} ~ ${u.value[1]})`},"自定义范围:",8,Q_),(0,i.Wm)(Ym,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:u.value,"onUpdate:value":a[2]||(a[2]=e=>u.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",eI,[tI,(0,i.Wm)(Ym,{class:"config-item",min:0,max:1,step:.1,value:d.value,"onUpdate:value":a[3]||(a[3]=e=>d.value=e)},null,8,["value"])]),(0,i._)("div",lI,[aI,(0,i._)("div",nI,[(0,i.wy)((0,i.Wm)(uf,{value:p.value,"onUpdate:value":a[4]||(a[4]=e=>p.value=e)},null,8,["value"]),[[o,"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"]])])])]),(0,i._)("div",oI,[(0,i.Wm)(Kd,{class:"btn export",type:"primary",onClick:a[5]||(a[5]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出图片")])),_:1}),(0,i.Wm)(Kd,{class:"btn close",onClick:a[6]||(a[6]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Va,{loading:(0,s.SU)(h),tip:"正在导出..."},null,8,["loading"])])}}});const sI=(0,Nl.Z)(iI,[["__scopeId","data-v-1df3f398"]]);var rI=sI;const uI={class:"export-json-dialog"},cI={class:"preview"},dI={class:"btns"};var pI=(0,i.aZ)({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const{slides:l}=(0,o.Jk)(F()),{exportJSON:a}=B_();return(e,n)=>((0,i.wg)(),(0,i.iD)("div",uI,[(0,i._)("div",cI,[(0,i._)("pre",null,(0,ae.zw)((0,s.SU)(l)),1)]),(0,i._)("div",dI,[(0,i.Wm)(Kd,{class:"btn export",type:"primary",onClick:n[0]||(n[0]=e=>(0,s.SU)(a)())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 JSON")])),_:1}),(0,i.Wm)(Kd,{class:"btn close",onClick:n[1]||(n[1]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const vI=(0,Nl.Z)(pI,[["__scopeId","data-v-6a7223ca"]]);var mI=vI;const hI=()=>{const e=document.createElement("iframe");return e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.border="0",document.body.appendChild(e),e},fI=(e,t,l)=>{const a="";let n="";const o=document.styleSheets;if(o)for(const d of o)if(d.cssRules)for(const e of d.cssRules)n+=e.cssText;const{width:i,height:s,margin:r}=l,u=`\n \n \n \n `,c=""+t.innerHTML+"";e.open(),e.write(`\n ${a}\n \n ${u}\n ${c}\n \n `),e.close()},gI=(e,t)=>{const l=hI(),a=l.contentWindow;if(!l.contentDocument||!a)return;fI(l.contentDocument,e,t);const n=()=>{a.focus(),a.print()},o=()=>{l.removeEventListener("load",n),a.removeEventListener("afterprint",o),document.body.removeChild(l)};l.addEventListener("load",n),a.addEventListener("afterprint",o)},yI=e=>((0,i.dD)("data-v-1668f898"),e=e(),(0,i.Cn)(),e),wI={class:"export-pdf-dialog"},xI={class:"thumbnails-view"},kI={class:"configs"},bI={class:"row"},_I=yI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),II={class:"row"},SI=yI((()=>(0,i._)("div",{class:"title"},"每页数量:",-1))),CI={class:"row"},LI=yI((()=>(0,i._)("div",{class:"title"},"边缘留白:",-1))),EI={class:"config-item"},TI=yI((()=>(0,i._)("div",{class:"tip"}," 提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1))),MI={class:"btns"};var UI=(0,i.aZ)({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a,viewportRatio:n}=(0,o.Jk)(F()),r=(0,s.iH)(),u=(0,s.iH)("all"),c=(0,s.iH)(1),d=(0,s.iH)(!0),p=()=>{if(!r.value)return;const e={width:1600,height:"all"===u.value?1600*n.value*c.value:1600*n.value,margin:d.value?50:0};gI(r.value,e)};return(e,n)=>((0,i.wg)(),(0,i.iD)("div",wI,[(0,i._)("div",xI,[(0,i._)("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:r},["current"===u.value?((0,i.wg)(),(0,i.j4)(jd,{key:0,class:"thumbnail",slide:(0,s.SU)(a),size:1600},null,8,["slide"])):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.j4)(jd,{class:(0,ae.C_)(["thumbnail",{"break-page":(t+1)%c.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"])))),128))],512)]),(0,i._)("div",kI,[(0,i._)("div",bI,[_I,(0,i.Wm)(tg,{class:"config-item",value:u.value,"onUpdate:value":n[0]||(n[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"50%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Kf,{style:{width:"50%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",II,[SI,(0,i.Wm)(sp,{class:"config-item",value:c.value,"onUpdate:value":n[1]||(n[1]=e=>c.value=e),options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}]},null,8,["value"])]),(0,i._)("div",CI,[LI,(0,i._)("div",EI,[(0,i.Wm)(uf,{value:d.value,"onUpdate:value":n[2]||(n[2]=e=>d.value=e)},null,8,["value"])])]),TI]),(0,i._)("div",MI,[(0,i.Wm)(Kd,{class:"btn export",type:"primary",onClick:n[3]||(n[3]=e=>p())},{default:(0,i.w5)((()=>[(0,i.Uk)("打印 / 导出 PDF")])),_:1}),(0,i.Wm)(Kd,{class:"btn close",onClick:n[4]||(n[4]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const WI=(0,Nl.Z)(UI,[["__scopeId","data-v-1668f898"]]);var DI=WI;const HI=e=>((0,i.dD)("data-v-265d4b60"),e=e(),(0,i.Cn)(),e),FI={class:"export-pptx-dialog"},AI={class:"configs"},ZI={class:"row"},$I=HI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),OI={key:0,class:"row"},RI=["data-range"],PI={class:"row"},zI=HI((()=>(0,i._)("div",{class:"title"},"忽略音频/视频:",-1))),BI={class:"config-item"},NI={class:"row"},jI=HI((()=>(0,i._)("div",{class:"title"},"覆盖默认母版:",-1))),YI={class:"config-item"},VI={key:1,class:"tip"},JI={class:"btns"};var qI=(0,i.aZ)({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),{exportPPTX:n,exporting:r}=B_(),u=(0,s.iH)("all"),c=(0,s.iH)([1,l.value.length]),d=(0,s.iH)(!0),p=(0,s.iH)(!0),v=(0,i.Fl)((()=>"all"===u.value?l.value:"current"===u.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1}))));return(e,a)=>{const o=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",FI,[(0,i._)("div",AI,[(0,i._)("div",ZI,[$I,(0,i.Wm)(tg,{class:"config-item",value:u.value,"onUpdate:value":a[0]||(a[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",OI,[(0,i._)("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},"自定义范围:",8,RI),(0,i.Wm)(Ym,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:c.value,"onUpdate:value":a[1]||(a[1]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",PI,[zI,(0,i._)("div",BI,[(0,i.wy)((0,i.Wm)(uf,{value:p.value,"onUpdate:value":a[2]||(a[2]=e=>p.value=e)},null,8,["value"]),[[o,"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。"]])])]),(0,i._)("div",NI,[jI,(0,i._)("div",YI,[(0,i.Wm)(uf,{value:d.value,"onUpdate:value":a[3]||(a[3]=e=>d.value=e)},null,8,["value"])])]),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",VI," 提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。 "))]),(0,i._)("div",JI,[(0,i.Wm)(Kd,{class:"btn export",type:"primary",onClick:a[4]||(a[4]=e=>(0,s.SU)(n)(v.value,d.value,p.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 PPTX")])),_:1}),(0,i.Wm)(Kd,{class:"btn close",onClick:a[5]||(a[5]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Va,{loading:(0,s.SU)(r),tip:"正在导出..."},null,8,["loading"])])}}});const XI=(0,Nl.Z)(qI,[["__scopeId","data-v-265d4b60"]]);var GI=XI;const KI=e=>((0,i.dD)("data-v-26422ed7"),e=e(),(0,i.Cn)(),e),QI={class:"export-pptist-dialog"},eS={class:"configs"},tS={class:"row"},lS=KI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),aS={key:0,class:"row"},nS=["data-range"],oS=KI((()=>(0,i._)("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1))),iS={class:"btns"};var sS=(0,i.aZ)({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),{exportSpecificFile:n}=B_(),r=(0,s.iH)("all"),u=(0,s.iH)([1,l.value.length]),c=(0,i.Fl)((()=>"all"===r.value?l.value:"current"===r.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=u.value;return t>=l-1&&t<=a-1}))));return(e,a)=>((0,i.wg)(),(0,i.iD)("div",QI,[(0,i._)("div",eS,[(0,i._)("div",tS,[lS,(0,i.Wm)(tg,{class:"config-item",value:r.value,"onUpdate:value":a[0]||(a[0]=e=>r.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===r.value?((0,i.wg)(),(0,i.iD)("div",aS,[(0,i._)("div",{class:"title","data-range":`(${u.value[0]} ~ ${u.value[1]})`},"自定义范围:",8,nS),(0,i.Wm)(Ym,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:u.value,"onUpdate:value":a[1]||(a[1]=e=>u.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),oS]),(0,i._)("div",iS,[(0,i.Wm)(Kd,{class:"btn export",type:"primary",onClick:a[2]||(a[2]=e=>(0,s.SU)(n)(c.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 .pptist 文件")])),_:1}),(0,i.Wm)(Kd,{class:"btn close",onClick:a[3]||(a[3]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const rS=(0,Nl.Z)(sS,[["__scopeId","data-v-26422ed7"]]);var uS=rS;const cS={class:"export-dialog"},dS={class:"content"};var pS=(0,i.aZ)({__name:"index",setup(e){const t=$(),{dialogForExport:l}=(0,o.Jk)(t),a=t.setDialogForExport,n=[{key:"pptist",label:"导出 pptist 文件"},{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],r=(0,i.Fl)((()=>{const e={image:rI,json:mI,pdf:DI,pptx:GI,pptist:uS};return l.value&&e[l.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",cS,[(0,i.Wm)(qd,{tabs:n,value:(0,s.SU)(l),card:"","onUpdate:value":t[0]||(t[0]=e=>(0,s.SU)(a)(e))},null,8,["value"]),(0,i._)("div",dS,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value),{onClose:t[1]||(t[1]=e=>(0,s.SU)(a)(""))},null,32))])]))}});const vS=(0,Nl.Z)(pS,[["__scopeId","data-v-b20137f0"]]);var mS=vS;const hS={class:"title"},fS={class:"content"};var gS=(0,i.aZ)({__name:"MoveablePanel",props:{width:{},height:{},left:{default:10},top:{default:10},title:{default:""},moveable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),n=(0,s.iH)(0),o=(0,s.iH)(),r=(0,i.Fl)((()=>l.height?l.height:o.value?.clientHeight||0));(0,i.bv)((()=>{l.left>=0?a.value=l.left:a.value=document.body.clientWidth+l.left-l.width,l.top>=0?n.value=l.top:n.value=document.body.clientHeight+l.top-r.value}));const u=e=>{if(!l.moveable)return;let t=!0;const o=document.body.clientWidth,i=document.body.clientHeight,s=e.pageX,u=e.pageY,c=a.value,d=n.value;document.onmousemove=e=>{if(!t)return;const p=e.pageX-s,v=e.pageY-u;let m=c+p,h=d+v;m<0&&(m=0),h<0&&(h=0),m+l.width>o&&(m=o-l.width),h+r.value>i&&(h=i-r.value),a.value=m,n.value=h},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,l)=>{const s=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.iD)("div",{class:"moveable-panel",ref_key:"moveablePanelRef",ref:o,style:(0,ae.j5)({width:e.width+"px",height:e.height?e.height+"px":"auto",left:a.value+"px",top:n.value+"px"})},[e.title?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"header",onMousedown:l[1]||(l[1]=e=>u(e))},[(0,i._)("div",hS,(0,ae.zw)(e.title),1),(0,i._)("div",{class:"close-btn",onClick:l[0]||(l[0]=e=>t("close"))},[(0,i.Wm)(s)])],32),(0,i._)("div",fS,[(0,i.WI)(e.$slots,"default")])],64)):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"content",onMousedown:l[2]||(l[2]=e=>u(e))},[(0,i.WI)(e.$slots,"default")],32))],4)}}});const yS=(0,Nl.Z)(gS,[["__scopeId","data-v-fc791e00"]]);var wS=yS;const xS=e=>((0,i.dD)("data-v-15470598"),e=e(),(0,i.Cn)(),e),kS={key:0,class:"handler"},bS={class:"btns"},_S={key:0,class:"icon-btns"},IS={class:"element-list"},SS={key:0,class:"group-els"},CS=xS((()=>(0,i._)("div",{class:"group-title"},"组合",-1))),LS=["onClick","onDblclick"],ES=["id","value","onBlur","onKeydown"],TS={key:1,class:"name"},MS={class:"icons"},US=["onClick","onDblclick"],WS=["id","value","onBlur","onKeydown"],DS={key:1,class:"name"},HS={class:"icons"};var FS=(0,i.aZ)({__name:"SelectPanel",setup(e){const t=F(),l=$(),{currentSlide:a}=(0,o.Jk)(t),{handleElement:r,handleElementId:u,activeElementIdList:c,activeGroupElementId:d,hiddenElementIdList:p}=(0,o.Jk)(l),{orderElement:v}=wa(),m=(0,i.Fl)((()=>{const e=[];for(const t of a.value.elements)if(t.groupId){const l=e[e.length-1];l&&"group"===l.type&&l.id&&l.id===t.groupId?l.elements.push(t):e.push({type:"group",id:t.groupId,elements:[t]})}else e.push(t);return e})),h=(e,t)=>{if(u.value===t)return;if(p.value.includes(t))return;const a=e.elements.map((e=>e.id));l.setActiveElementIdList(a),l.setHandleElementId(t),(0,i.Y3)((()=>l.setActiveGroupElementId(t)))},f=e=>{u.value!==e&&(p.value.includes(e)||l.setActiveElementIdList([e]))},g=e=>{p.value.includes(e)?l.setHiddenElementIdList(p.value.filter((t=>t!==e))):l.setHiddenElementIdList([...p.value,e]),c.value.includes(e)&&l.setActiveElementIdList([])},y=()=>{const e=a.value.elements.map((e=>e.id)),t=p.value.filter((t=>!e.includes(t)));l.setHiddenElementIdList(t)},w=()=>{const e=a.value.elements.map((e=>e.id));l.setHiddenElementIdList([...p.value,...e]),c.value.length&&l.setActiveElementIdList([])},x=(0,s.iH)(""),k=(e,l)=>{const a=e.target.value;t.updateElement({id:l,props:{name:a}}),x.value=""},b=e=>{x.value=e,(0,i.Y3)((()=>{const t=document.querySelector(`#input-${e}`);t.focus()}))},_=()=>{l.setSelectPanelState(!1)};return(e,t)=>{const l=(0,i.up)("IconDown"),o=(0,i.up)("IconUp"),u=(0,i.up)("IconPreviewClose"),I=(0,i.up)("IconPreviewOpen");return(0,i.wg)(),(0,i.j4)(wS,{class:"select-panel",width:200,height:360,title:`选择(${(0,s.SU)(c).length}/${(0,s.SU)(a).elements.length})`,left:-270,top:90,onClose:t[4]||(t[4]=e=>_())},{default:(0,i.w5)((()=>[m.value.length?((0,i.wg)(),(0,i.iD)("div",kS,[(0,i._)("div",bS,[(0,i.Wm)(Kd,{size:"small",style:{"margin-right":"5px"},onClick:t[0]||(t[0]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部显示")])),_:1}),(0,i.Wm)(Kd,{size:"small",onClick:t[1]||(t[1]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部隐藏")])),_:1})]),(0,s.SU)(r)?((0,i.wg)(),(0,i.iD)("div",_S,[(0,i.Wm)(l,{class:"icon-btn",onClick:t[2]||(t[2]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(G).UP))}),(0,i.Wm)(o,{class:"icon-btn",onClick:t[3]||(t[3]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(G).DOWN))})])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",IS,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["group"===e.type?((0,i.wg)(),(0,i.iD)("div",SS,[CS,((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.elements,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["item",{active:(0,s.SU)(c).includes(t.id),"group-active":(0,s.SU)(d).includes(t.id)}]),key:t.id,onClick:l=>h(e,t.id),onDblclick:e=>b(t.id)},[x.value===t.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${t.id}`,value:t.name||(0,s.SU)(Hn)[t.type],class:"input",type:"text",onBlur:e=>k(e,t.id),onKeydown:(0,n.D2)((e=>k(e,t.id)),["enter"])},null,40,ES)):((0,i.wg)(),(0,i.iD)("div",TS,(0,ae.zw)(t.name||(0,s.SU)(Hn)[t.type]),1)),(0,i._)("div",MS,[(0,s.SU)(p).includes(t.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"]))])],42,LS)))),128))])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:(0,ae.C_)(["item",{active:(0,s.SU)(c).includes(e.id)}]),onClick:t=>f(e.id),onDblclick:t=>b(e.id)},[x.value===e.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${e.id}`,value:e.name||(0,s.SU)(Hn)[e.type],class:"input",type:"text",onBlur:t=>k(t,e.id),onKeydown:(0,n.D2)((t=>k(t,e.id)),["enter"])},null,40,WS)):((0,i.wg)(),(0,i.iD)("div",DS,(0,ae.zw)(e.name||(0,s.SU)(Hn)[e.type]),1)),(0,i._)("div",HS,[(0,s.SU)(p).includes(e.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"]))])],42,US))],64)))),128))])])),_:1},8,["title"])}}});const AS=(0,Nl.Z)(FS,[["__scopeId","data-v-15470598"]]);var ZS=AS,$S=()=>{const e=$(),t=F(),{handleElement:l}=(0,o.Jk)(e),{slides:a,slideIndex:n,currentSlide:r}=(0,o.Jk)(t),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,s.iH)([]),p=(0,s.iH)(-1),v=(0,s.iH)("g"),m=()=>{const e=[],t=new RegExp(u.value,v.value),l=/(<([^>]+)>)/g;for(const n of a.value)for(const a of n.elements)if("text"===a.type){const o=a.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("shape"===a.type&&a.text&&a.text.content){const o=a.text.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("table"===a.type)for(let o=0;o{const t=[...e.childNodes],l=[];while(t.length){const e=t.shift();e.nodeType===e.TEXT_NODE?e.wholeText&&l.push(e):t.unshift(...e.childNodes)}return l},f=e=>{let t=0;const l=e.map((e=>{const l=t,a=t+e.wholeText.length;return t=a,{text:e.wholeText,startIdx:l,endIdx:a}}));return l},g=(e,t)=>{const l=new RegExp(t,v.value),a=[];let n=l.exec(e);while(n)a.push(n),n=l.exec(e);return a},y=(e,t,l,a)=>{for(let n=l.length-1;n>=0;n--){const o=l[n],i=o.index,s=i+o[0].length;for(let l=0;l=s)break;let c=e[l];const d=Math.max(0,i-r),p=Math.min(u,s)-r-d;d>0&&(c=c.splitText(d)),p{for(const l of e)l.innerHTML=l.innerHTML.replace(new RegExp(u.value,v.value),(()=>`${u.value}`))},x=()=>{const e=document.querySelectorAll(".editable-element mark");for(const t of e)setTimeout((()=>{const e=t.parentNode,l=t.textContent;e.replaceChild(document.createTextNode(l),t)}),0)},k=()=>{x(),setTimeout((()=>{for(let e=0;ee)).join(""),o=g(n,u.value);y(t,l,o,e)}}}),0)},b=()=>{const e=document.querySelectorAll("mark[data-index]");for(const t of e)setTimeout((()=>{const e=t.dataset.index;void 0!==e&&+e===p.value?t.classList.add("active"):t.classList.remove("active")}),0)},_=()=>{if(-1===p.value)return;const e=d.value[p.value];if(e.slideId===r.value.id)setTimeout(b,0);else{const l=a.value.findIndex((t=>t.id===e.slideId));-1!==l&&t.updateSlideIndex(l)}},I=()=>{if(!u.value)return Kl.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?m():p.value{if(!u.value)return Kl.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?m():p.value>0?p.value-=1:p.value=d.value.length-1,_()},C=()=>{if(!u.value)return;if(-1===p.value)return void I();const e=d.value[p.value];let l=null;if("table"===e.elType){const[t,a]=e.cellIndex;l=document.querySelector(`#editable-element-${e.elId} .cell[data-cell-index="${t}_${a}"] .cell-text`)}else l=document.querySelector(`#editable-element-${e.elId} .ProseMirror`);if(!l)return;const a=document.createElement("div");a.innerHTML=l.innerHTML;let n=!1;const o=a.querySelectorAll("mark[data-index]");for(const t of o){const e=t.parentNode;if(t.classList.contains("active"))n?e.removeChild(t):(e.replaceChild(document.createTextNode(c.value),t),n=!0);else{const l=t.textContent;e.replaceChild(document.createTextNode(l),t)}}if("text"===e.elType){const l={content:a.innerHTML};t.updateElement({id:e.elId,props:l})}else if("shape"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"shape"===l.type&&l.text){const n={text:{...l.text,content:a.innerHTML}};t.updateElement({id:e.elId,props:n})}}else if("table"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"table"===l.type){const n=l.data.map(((t,l)=>l===e.cellIndex[0]?t.map(((t,l)=>l===e.cellIndex[1]?{...t,text:a.innerHTML}:t)):t)),o={data:n};t.updateElement({id:e.elId,props:o})}}d.value.splice(p.value,1),d.value.length?(p.value>d.value.length-1&&(p.value=0),(0,i.Y3)((()=>{k(),_()}))):p.value=-1},L=()=>{if(u.value)if(-1!==p.value){for(let e=0;ee.id===n.slideId));if(!o)continue;const i=o.elements.find((e=>e.id===n.elId));if(!i)continue;const s=document.createElement("div");if("text"===i.type?s.innerHTML=i.content:"shape"===i.type&&(s.innerHTML=i.text?.content||""),"table"===n.elType){const e=i.data.map((e=>e.map((e=>e.text?{...e,text:e.text.replaceAll(u.value,c.value)}:e)))),l={data:e};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}else{const l=h(s),a=f(l),o=a.map((({text:e})=>e)).join(""),i=g(o,u.value);y(l,a,i,e);const d=s.querySelectorAll("mark[data-index]");let p=-1;for(const e of d){const t=+e.dataset.index,l=e.parentNode;t===p?l.removeChild(e):(l.replaceChild(document.createTextNode(c.value),e),p=t)}if("text"===n.elType){const e={content:s.innerHTML};t.updateElement({id:n.elId,slideId:n.slideId,props:e})}else if("shape"===n.elType){const e=r.value.elements.find((e=>e.id===n.elId));if(e&&"shape"===e.type&&e.text){const l={text:{...e.text,content:s.innerHTML}};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}}}}d.value=[],p.value=-1}else I()},E=()=>{p.value=-1,d.value=[],u.value||x()};(0,i.YP)(u,E),(0,i.YP)(n,(()=>{(0,i.Y3)((()=>{k(),setTimeout(b,0)}))})),(0,i.YP)(l,(()=>{l.value&&(p.value=-1,d.value=[],x())})),(0,i.Jd)(x);const T=()=>{v.value="g"===v.value?"gi":"g",E()};return{searchWord:u,replaceWord:c,searchResults:d,searchIndex:p,modifiers:v,searchNext:I,searchPrev:S,replace:C,replaceAll:L,toggleModifiers:T}};const OS={class:"count"},RS={key:1,class:"footer"};var PS=(0,i.aZ)({__name:"SearchPanel",setup(e){const t=$(),{searchWord:l,replaceWord:a,searchResults:o,searchIndex:r,modifiers:u,searchNext:c,searchPrev:d,replace:p,replaceAll:v,toggleModifiers:m}=$S(),h=(0,s.iH)("search"),f=[{key:"search",label:"查找"},{key:"replace",label:"替换"}],g=()=>{t.setSearchPanelState(!1)},y=(0,s.iH)();return(0,i.bv)((()=>{y.value.focus()})),(0,i.YP)(h,(()=>{(0,i.Y3)((()=>{y.value.focus()}))})),(e,t)=>{const w=(0,i.up)("IconClose"),x=(0,i.up)("IconLeft"),k=(0,i.up)("IconRight"),b=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.j4)(wS,{class:"search-panel",width:330,height:0,left:-270,top:90},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>g()),onMousedown:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(w)],32),(0,i.Wm)(qd,{tabs:f,value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e)},null,8,["value"]),(0,i._)("div",{class:(0,ae.C_)(["content",h.value]),onMousedown:t[12]||(t[12]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(an,{class:"input",value:(0,s.SU)(l),"onUpdate:value":t[6]||(t[6]=e=>(0,s.dq)(l)?l.value=e:null),placeholder:"输入查找内容",onEnter:t[7]||(t[7]=e=>(0,s.SU)(c)()),ref_key:"searchInpRef",ref:y},{suffix:(0,i.w5)((()=>[(0,i._)("span",OS,(0,ae.zw)((0,s.SU)(r)+1)+"/"+(0,ae.zw)((0,s.SU)(o).length),1),(0,i.Wm)(Fc,{type:"vertical"}),(0,i.wy)(((0,i.wg)(),(0,i.iD)("span",{class:(0,ae.C_)(["ignore-case",{active:"g"===(0,s.SU)(u)}]),onClick:t[3]||(t[3]=e=>(0,s.SU)(m)())},[(0,i.Uk)("Aa")],2)),[[b,"忽略大小写"]]),(0,i.Wm)(Fc,{type:"vertical"}),(0,i.wy)((0,i.Wm)(x,{class:"next-btn left",onClick:t[4]||(t[4]=e=>(0,s.SU)(d)())},null,512),[[b,"上一个"]]),(0,i.wy)((0,i.Wm)(k,{class:"next-btn right",onClick:t[5]||(t[5]=e=>(0,s.SU)(c)())},null,512),[[b,"下一个"]])])),_:1},8,["value"]),"replace"===h.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"input",value:(0,s.SU)(a),"onUpdate:value":t[8]||(t[8]=e=>(0,s.dq)(a)?a.value=e:null),placeholder:"输入替换内容",onEnter:t[9]||(t[9]=e=>(0,s.SU)(p)())},null,8,["value"])):(0,i.kq)("",!0),"replace"===h.value?((0,i.wg)(),(0,i.iD)("div",RS,[(0,i.Wm)(Kd,{disabled:!(0,s.SU)(l),style:{"margin-left":"5px"},onClick:t[10]||(t[10]=e=>(0,s.SU)(p)())},{default:(0,i.w5)((()=>[(0,i.Uk)("替换")])),_:1},8,["disabled"]),(0,i.Wm)(Kd,{disabled:!(0,s.SU)(l),type:"primary",style:{"margin-left":"5px"},onClick:t[11]||(t[11]=e=>(0,s.SU)(v)())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部替换")])),_:1},8,["disabled"])])):(0,i.kq)("",!0)],34)])),_:1})}}});const zS=(0,Nl.Z)(PS,[["__scopeId","data-v-4a78162c"]]);var BS=zS;const NS={class:"pptist-editor"},jS={class:"layout-content"},YS={class:"layout-content-center"};var VS=(0,i.aZ)({__name:"index",setup(e){const t=$(),{dialogForExport:l,showSelectPanel:a,showSearchPanel:n}=(0,o.Jk)(t),r=()=>t.setDialogForExport(""),u=(0,s.iH)(40);return Sa(),Ca(),(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",NS,[(0,i.Wm)(In,{class:"layout-header"}),(0,i._)("div",jS,[(0,i.Wm)(Zm,{class:"layout-content-left"}),(0,i._)("div",YS,[(0,i.Wm)(bm,{class:"center-top"}),(0,i.Wm)(_p,{class:"center-body",style:(0,ae.j5)({height:`calc(100% - ${u.value+40}px)`})},null,8,["style"]),(0,i.Wm)(o_,{class:"center-bottom",height:u.value,"onUpdate:height":t[0]||(t[0]=e=>u.value=e),style:(0,ae.j5)({height:`${u.value}px`})},null,8,["height","style"])]),(0,i.Wm)(Gb,{class:"layout-content-right"})])]),(0,s.SU)(a)?((0,i.wg)(),(0,i.j4)(ZS,{key:0})):(0,i.kq)("",!0),(0,s.SU)(n)?((0,i.wg)(),(0,i.j4)(BS,{key:1})):(0,i.kq)("",!0),(0,i.Wm)(yp,{visible:!!(0,s.SU)(l),width:680,onClosed:t[1]||(t[1]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Wm)(mS)])),_:1},8,["visible"])],64))}});const JS=(0,Nl.Z)(VS,[["__scopeId","data-v-1e00f97b"]]);var qS=JS,XS=()=>{const e=F(),{slides:t,slideIndex:l,formatedAnimations:a}=(0,o.Jk)(e),n=(0,s.iH)(0),r=(0,s.iH)(!1),u=(0,s.iH)(l.value),c=()=>{if(r.value)return;const{animations:e,autoNext:t}=a.value[n.value];n.value+=1,r.value=!0;let l=0;for(const a of e){const n=document.querySelector(`#screen-element-${a.elId} [class^=base-element-]`);if(!n){l+=1;continue}const o=`${hk}${a.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(hk)&&n.classList.remove(e,`${hk}animated`);n.style.setProperty("--animate-duration",`${a.duration}ms`),n.classList.add(o,`${hk}animated`);const i=()=>{"out"!==a.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(o,`${hk}animated`)),l+=1,l===e.length&&(r.value=!1,t&&c())};n.addEventListener("animationend",i,{once:!0})}},d=()=>{n.value-=1;const{animations:e}=a.value[n.value];for(const t of e){const e=document.querySelector(`#screen-element-${t.elId} [class^=base-element-]`);if(e){e.style.removeProperty("--animate-duration");for(const t of e.classList)-1!==t.indexOf(hk)&&e.classList.remove(t,`${hk}animated`)}}e.every((e=>"attention"===e.type))&&g()},p=(0,s.iH)(0),v=()=>{p.value&&(clearInterval(p.value),p.value=0)};(0,i.Ah)(v);const m=(0,s.iH)(!1),h=e=>{m.value=e},f=(0,U.throttle)((function(e){Kl.success(e)}),1e3,{leading:!0,trailing:!1}),g=()=>{a.value.length&&n.value>0?d():l.value>0?(e.updateSlideIndex(l.value-1),l.value{a.value.length&&n.value{v(),Kl.success("开始自动放映"),p.value=setInterval(y,w.value)},k=e=>{v(),w.value=e,x()},b=(0,U.throttle)((function(e){e.deltaY<0?g():e.deltaY>0&&y()}),500,{leading:!0,trailing:!1}),_=(0,s.iH)(null),I=e=>{_.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},S=e=>{if(!_.value)return;const t=Math.abs(_.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-_.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(_.value=null,l>0?g():y())},C=e=>{const t=e.key.toUpperCase();t===le.UP||t===le.LEFT||t===le.PAGEUP?g():t!==le.DOWN&&t!==le.RIGHT&&t!==le.SPACE&&t!==le.ENTER&&t!==le.PAGEDOWN||y()};(0,i.bv)((()=>document.addEventListener("keydown",C))),(0,i.Ah)((()=>document.removeEventListener("keydown",C)));const L=()=>{e.updateSlideIndex(l.value-1),n.value=0},E=()=>{e.updateSlideIndex(l.value+1),n.value=0},T=t=>{e.updateSlideIndex(t),n.value=0},M=l=>{const a=t.value.findIndex((e=>e.id===l));-1!==a&&(e.updateSlideIndex(a),n.value=0)};return{autoPlayTimer:p,autoPlayInterval:w,setAutoPlayInterval:k,autoPlay:x,closeAutoPlay:v,loopPlay:m,setLoopPlay:h,mousewheelListener:b,touchStartListener:I,touchEndListener:S,turnPrevSlide:L,turnNextSlide:E,turnSlideToIndex:T,turnSlideToId:M,execPrev:g,execNext:y,animationIndex:n}},GS=e=>{const t=F(),{viewportRatio:l}=(0,o.Jk)(t),a=(0,s.iH)(0),n=(0,s.iH)(0),r=()=>{const t=e?.value||document.body,o=t.clientWidth,i=t.clientHeight;let s,r;i/o===l.value?(s=o,r=i):i/o>l.value?(s=o,r=o*l.value):(s=i/l.value,r=i),a.value=s,n.value=r};return(0,i.bv)((()=>{r(),window.addEventListener("resize",r)})),(0,i.Ah)((()=>{window.removeEventListener("resize",r)})),{slideWidth:a,slideHeight:n}},KS=()=>{const e=(0,s.iH)(!0),t=(0,s.iH)(!0),{exitScreening:l}=_a(),a=()=>{e.value=ba(),!e.value&&t.value&&l(),t.value=!0};(0,i.bv)((()=>{e.value=ba(),document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a)})),(0,i.Ah)((()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}));const n=()=>{e.value&&(t.value=!1,ka())};return{fullscreenState:e,manualExitFullscreen:n}};const QS={class:"element-content"};var eC=(0,i.aZ)({__name:"ScreenVideoElement",props:{elementInfo:{}},setup(e){const{currentSlide:t}=(0,o.Jk)(F()),l=(0,i.f3)(Sn)||(0,s.iH)(1),a=(0,i.f3)(Cn)||(0,s.iH)(""),n=(0,i.Fl)((()=>t.value.id===a.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-video screen-element-video",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",QS,[n.value?((0,i.wg)(),(0,i.j4)(Wr,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4))}});const tC=(0,Nl.Z)(eC,[["__scopeId","data-v-76bf5b3f"]]);var lC=tC;const aC={class:"element-content"};var nC=(0,i.aZ)({__name:"ScreenAudioElement",props:{elementInfo:{}},setup(e){const t=e,{viewportRatio:l,currentSlide:a}=(0,o.Jk)(F()),n=(0,i.f3)(Sn)||(0,s.iH)(1),r=(0,i.f3)(Cn)||(0,s.iH)(""),u=(0,i.Fl)((()=>a.value.id===r.value)),c=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),d=(0,i.Fl)((()=>{const e=la,a=la*l.value,o=280/n.value,i=50/n.value,s=t.elementInfo.width,r=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=r;return u+o>=e&&(d=s-o),c+r+i>=a&&(p=-i),{left:d+"px",top:p+"px"}})),p=(0,s.iH)(),v=()=>{p.value&&p.value.toggle()};return(e,t)=>{const l=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio screen-element-audio",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",aC,[(0,i.Wm)(l,{class:"audio-icon",style:(0,ae.j5)({fontSize:c.value,color:e.elementInfo.color}),onClick:t[0]||(t[0]=e=>v())},null,8,["style"]),u.value?((0,i.wg)(),(0,i.j4)(Qr,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:p,style:(0,ae.j5)({...d.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(n)},null,8,["style","src","loop","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4)}}});const oC=(0,Nl.Z)(nC,[["__scopeId","data-v-adf39436"]]);var iC=oC;const sC=["id","title"];var rC=(0,i.aZ)({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Jc,[na.TEXT]:Kc,[na.SHAPE]:id,[na.LINE]:dd,[na.CHART]:md,[na.TABLE]:Id,[na.LATEX]:Ud,[na.VIDEO]:lC,[na.AUDIO]:iC};return e[t.elementInfo.type]||null})),{formatedAnimations:a,theme:n}=(0,o.Jk)(F()),r=(0,i.Fl)((()=>{const e=a.value.findIndex((e=>{const l=e.animations.map((e=>e.elId));return l.includes(t.elementInfo.id)}));if(-1===e)return!1;if(ee.elId===t.elementInfo.id));return"in"===l?.type})),u=()=>{const e=t.elementInfo.link;e&&("web"===e.type?(t.manualExitFullscreen(),window.open(e.target)):"slide"===e.type&&t.turnSlideToId(e.target))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:(0,ae.j5)({zIndex:e.elementIndex,color:(0,s.SU)(n).fontColor,fontFamily:(0,s.SU)(n).fontName,visibility:r.value?"hidden":"visible"}),title:e.elementInfo.link?.target||"",onClick:t[0]||(t[0]=e=>u())},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,sC))}});const uC=(0,Nl.Z)(rC,[["__scopeId","data-v-2139723a"]]);var cC=uC,dC=(0,i.aZ)({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=hu(a),r=(0,i.Fl)((()=>t.slide.id));return(0,i.JJ)(Cn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-slide",style:(0,ae.j5)({width:(0,s.SU)(la)+"px",height:(0,s.SU)(la)*(0,s.SU)(l)+"px",transform:`scale(${e.scale})`})},[(0,i._)("div",{class:"background",style:(0,ae.j5)({...(0,s.SU)(n)})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((t,l)=>((0,i.wg)(),(0,i.j4)(cC,{key:t.id,elementInfo:t,elementIndex:l+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"])))),128))],4))}});const pC=(0,Nl.Z)(dC,[["__scopeId","data-v-016af5da"]]);var vC=pC;const mC={class:"screen-slide-list"};var hC=(0,i.aZ)({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)(F()),n=(0,i.Fl)((()=>l.value.map((e=>{let t=e.turningMode;if(t||(t="slideY"),"random"===t){const e=wk.filter((e=>!["random","no"].includes(e.value))).map((e=>e.value));t=e[Math.floor(Math.random()*e.length)]}return{...e,turningMode:t}})))),r=(0,i.Fl)((()=>t.slideWidth/la));return(0,i.JJ)(Sn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",mC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(n.value,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slide-item",`turning-mode-${t.turningMode}`,{current:l===(0,s.SU)(a),before:l<(0,s.SU)(a),after:l>(0,s.SU)(a),hide:(l===(0,s.SU)(a)-1||l===(0,s.SU)(a)+1)&&t.turningMode!==n.value[(0,s.SU)(a)].turningMode}]),key:t.id},[Math.abs((0,s.SU)(a)-l)<2||t.animations?.length?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,ae.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(vC,{slide:t,scale:r.value,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):(0,i.kq)("",!0)],2)))),128))]))}});const fC=(0,Nl.Z)(hC,[["__scopeId","data-v-552b63d2"]]);var gC=fC;const yC={class:"slide-thumbnails"},wC={class:"return-button"},xC={class:"slide-thumbnails-content"},kC=["onClick"];var bC=(0,i.aZ)({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(e,{emit:t}){const l=e,{slides:a,slideIndex:n}=(0,o.Jk)(F()),{slidesLoadLimit:r}=_m(),u=e=>{l.turnSlideToIndex(e),t("close")};return(e,l)=>{const o=(0,i.up)("IconArrowCircleLeft");return(0,i.wg)(),(0,i.iD)("div",yC,[(0,i._)("div",wC,[(0,i.Wm)(o,{class:"icon",onClick:l[0]||(l[0]=e=>t("close"))})]),(0,i._)("div",xC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(a),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail",{active:t===(0,s.SU)(n)}]),key:e.id,onClick:e=>u(t)},[(0,i.Wm)(jd,{slide:e,size:150,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,kC)))),128))])])}}});const _C=(0,Nl.Z)(bC,[["__scopeId","data-v-15912b32"]]);var IC=_C;const SC={key:0,class:"blackboard"};var CC=(0,i.aZ)({__name:"WritingBoard",props:{color:{default:"#ffcc00"},model:{default:"pen"},blackboard:{type:Boolean,default:!1},penSize:{default:6},markSize:{default:24},rubberSize:{default:80}},emits:["end"],setup(e,{expose:t,emit:l}){const a=e;let n=null;const o=(0,s.iH)(),r=(0,s.iH)();let u={x:0,y:0},c=!1,d=0,p=-1;const v=(0,s.iH)({x:0,y:0}),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,i.Fl)((()=>r.value?h.value/r.value.width:1)),y=(0,i.Fl)((()=>r.value?f.value/r.value.height:1)),w=()=>{o.value&&(h.value=o.value.clientWidth,f.value=o.value.clientHeight)},x=new ResizeObserver(w);(0,i.bv)((()=>{o.value&&x.observe(o.value)})),(0,i.Ah)((()=>{o.value&&x.unobserve(o.value)}));const k=()=>{r.value&&o.value&&(n=r.value.getContext("2d"),n&&(r.value.width=o.value.clientWidth,r.value.height=o.value.clientHeight,n.lineCap="round",n.lineJoin="round"))};(0,i.bv)(k);const b=()=>{n&&("mark"===a.model?(n.globalCompositeOperation="xor",n.globalAlpha=.5):"pen"===a.model&&(n.globalCompositeOperation="source-over",n.globalAlpha=1))};(0,i.YP)((()=>a.model),b);const _=(e,t,l)=>{if(!n)return;const o=u.x,i=u.y;n.lineWidth=l,n.strokeStyle=a.color,n.beginPath(),n.moveTo(o,i),n.lineTo(e,t),n.stroke(),n.closePath()},I=(e,t)=>{if(!n||!r.value)return;const l=u.x,o=u.y,i=a.rubberSize/2,s=i*Math.sin(Math.atan((t-o)/(e-l))),c=i*Math.cos(Math.atan((t-o)/(e-l))),d=[l+s,o-c],p=[l-s,o+c],v=[e+s,t-c],m=[e-s,t+c];n.save(),n.beginPath(),n.arc(e,t,i,0,2*Math.PI),n.clip(),n.clearRect(0,0,r.value.width,r.value.height),n.restore(),n.save(),n.beginPath(),n.moveTo(...d),n.lineTo(...v),n.lineTo(...m),n.lineTo(...p),n.closePath(),n.clip(),n.clearRect(0,0,r.value.width,r.value.height),n.restore()},S=(e,t)=>{const l=u.x,a=u.y;return Math.sqrt((e-l)*(e-l)+(t-a)*(t-a))},C=(e,t)=>{const l=10,n=.1,o=a.penSize,i=3,s=e/t;let r;return r=s<=n?o:s>=l?i:o-s/l*o,-1===p?r:1*r/3+2*p/3},L=(e,t)=>{const l=(new Date).getTime();if("pen"===a.model){const a=S(e,t),n=l-d,o=C(a,n);_(e,t,o),p=o}else"mark"===a.model?_(e,t,a.markSize):I(e,t);u={x:e,y:t},d=(new Date).getTime()},E=e=>{if(!r.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=r.value.getBoundingClientRect(),a=t.pageX-l.x,n=t.pageY-l.y;return[a,n]},T=e=>{const[t,l]=E(e),a=t/g.value,n=l/y.value;c=!0,u={x:a,y:n},d=(new Date).getTime(),e instanceof MouseEvent||(v.value={x:t,y:l},m.value=!0)},M=e=>{const[t,l]=E(e),a=t/g.value,n=l/y.value;v.value={x:t,y:l},c&&L(a,n)},U=()=>{c&&(c=!1,l("end"))},W=()=>{n&&r.value&&(n.clearRect(0,0,r.value.width,r.value.height),l("end"))},D=()=>r.value?.toDataURL(),H=e=>{if(n&&r.value&&(n.clearRect(0,0,r.value.width,r.value.height),e)){n.globalCompositeOperation="source-over",n.globalAlpha=1;const t=new Image;t.src=e,t.onload=()=>{n.drawImage(t,0,0),b()}}};return t({clearCanvas:W,getImageDataURL:D,setImageDataURL:H}),(e,t)=>{const l=(0,i.up)("IconWrite"),a=(0,i.up)("IconHighLight");return(0,i.wg)(),(0,i.iD)("div",{class:"writing-board",ref_key:"writingBoardRef",ref:o},[e.blackboard?((0,i.wg)(),(0,i.iD)("div",SC)):(0,i.kq)("",!0),(0,i._)("canvas",{class:"canvas",ref_key:"canvasRef",ref:r,style:(0,ae.j5)({width:h.value+"px",height:f.value+"px"}),onMousedown:t[0]||(t[0]=e=>T(e)),onMousemove:t[1]||(t[1]=e=>M(e)),onMouseup:t[2]||(t[2]=e=>U()),onTouchstart:t[3]||(t[3]=e=>T(e)),onTouchmove:t[4]||(t[4]=e=>M(e)),onTouchend:t[5]||(t[5]=e=>{U(),m.value=!1}),onMouseleave:t[6]||(t[6]=e=>{U(),m.value=!1}),onMouseenter:t[7]||(t[7]=e=>m.value=!0)},null,36),m.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},["eraser"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"eraser",style:(0,ae.j5)({left:v.value.x-e.rubberSize/2+"px",top:v.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):(0,i.kq)("",!0),"pen"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:1,class:"pen",style:(0,ae.j5)({left:v.value.x-e.penSize/2+"px",top:v.value.y-6*e.penSize+e.penSize/2+"px",color:e.color})},["pen"===e.model?((0,i.wg)(),(0,i.j4)(l,{key:0,class:"icon",size:6*e.penSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0),"mark"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:2,class:"pen",style:(0,ae.j5)({left:v.value.x-e.markSize/2+"px",top:v.value.y+"px",color:e.color})},["mark"===e.model?((0,i.wg)(),(0,i.j4)(a,{key:0,class:"icon",size:1.5*e.markSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)],512)}}});const LC=(0,Nl.Z)(CC,[["__scopeId","data-v-d8027742"]]);var EC=LC;const TC=e=>((0,i.dD)("data-v-92cd0b5a"),e=e(),(0,i.Cn)(),e),MC={class:"writing-board-tool"},UC={class:"tool-content"},WC={class:"size"},DC=TC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),HC={class:"size"},FC=TC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),AC={class:"size"},ZC=TC((()=>(0,i._)("div",{class:"label"},"橡皮大小:",-1))),$C={class:"colors"},OC=["onClick"];var RC=(0,i.aZ)({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],{currentSlide:a}=(0,o.Jk)(F()),r=(0,s.iH)(),u=(0,s.iH)("#e2534d"),c=(0,s.iH)("pen"),d=(0,s.iH)(!1),p=(0,s.iH)(""),v=(0,s.iH)(6),m=(0,s.iH)(24),h=(0,s.iH)(80),f=e=>{c.value===e?p.value=p.value===e?"":e:(p.value&&(p.value=""),c.value=e)},g=()=>{r.value.clearCanvas()},y=e=>{"eraser"===c.value&&(c.value="pen"),u.value=e},w=()=>{t("close")};(0,i.YP)(a,(()=>{j.writingBoardImgs.where("id").equals(a.value.id).toArray().then((e=>{const t=e[0];r.value.setImageDataURL(t?.dataURL||"")}))}),{immediate:!0});const x=()=>{const e=r.value.getImageDataURL();e&&j.writingBoardImgs.where("id").equals(a.value.id).toArray().then((t=>{const l=t[0];l?j.writingBoardImgs.update(l,{dataURL:e}):j.writingBoardImgs.add({id:a.value.id,dataURL:e})}))};return(e,t)=>{const a=(0,i.up)("IconWrite"),o=(0,i.up)("IconHighLight"),s=(0,i.up)("IconErase"),k=(0,i.up)("IconClear"),b=(0,i.up)("IconFill"),_=(0,i.up)("IconClose"),I=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",MC,[(0,i._)("div",{class:"writing-board-wrap",style:(0,ae.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(EC,{ref_key:"writingBoardRef",ref:r,color:u.value,blackboard:d.value,model:c.value,penSize:v.value,markSize:m.value,rubberSize:h.value,onEnd:t[0]||(t[0]=e=>x())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),(0,i.Wm)(wS,{class:"tools-panel",width:520,height:50,left:e.left,top:e.top,moveable:""===p.value},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"tools",onMousedown:t[10]||(t[10]=(0,n.iM)((()=>{}),["stop"]))},[(0,i._)("div",UC,[(0,i.Wm)(rn,{trigger:"manual",value:"pen"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",WC,[DC,(0,i.Wm)(Ym,{class:"size-slider",min:4,max:10,step:2,value:v.value,"onUpdate:value":t[1]||(t[1]=e=>v.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"pen"===c.value}]),onClick:t[2]||(t[2]=e=>f("pen"))},[(0,i.Wm)(a,{class:"icon"})],2)),[[I,"画笔"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"manual",value:"mark"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",HC,[FC,(0,i.Wm)(Ym,{class:"size-slider",min:16,max:40,step:4,value:m.value,"onUpdate:value":t[3]||(t[3]=e=>m.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"mark"===c.value}]),onClick:t[4]||(t[4]=e=>f("mark"))},[(0,i.Wm)(o,{class:"icon"})],2)),[[I,"荧光笔"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"manual",value:"eraser"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",AC,[ZC,(0,i.Wm)(Ym,{class:"size-slider",min:20,max:200,step:20,value:h.value,"onUpdate:value":t[5]||(t[5]=e=>h.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"eraser"===c.value}]),onClick:t[6]||(t[6]=e=>f("eraser"))},[(0,i.Wm)(s,{class:"icon"})],2)),[[I,"橡皮擦"]])])),_:1},8,["value"]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[7]||(t[7]=e=>g())},[(0,i.Wm)(k,{class:"icon"})])),[[I,"清除墨迹"]]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:d.value}]),onClick:t[8]||(t[8]=e=>d.value=!d.value)},[(0,i.Wm)(b,{class:"icon"})],2)),[[I,"黑板"]]),(0,i._)("div",$C,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>(0,i._)("div",{class:(0,ae.C_)(["color",{active:e===u.value}]),key:e,style:(0,ae.j5)({backgroundColor:e}),onClick:t=>y(e)},null,14,OC))),64))])]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[9]||(t[9]=e=>w())},[(0,i.Wm)(_,{class:"icon"})])),[[I,"关闭画笔"]])],32)])),_:1},8,["left","top","moveable"])])}}});const PC=(0,Nl.Z)(RC,[["__scopeId","data-v-92cd0b5a"]]);var zC=PC;const BC=e=>((0,i.dD)("data-v-83a589f0"),e=e(),(0,i.Cn)(),e),NC={class:"header"},jC={class:"content"},YC={class:"timer"},VC=["value","disabled"],JC=BC((()=>(0,i._)("div",{class:"colon"},":",-1))),qC={class:"timer"},XC=["value","disabled"];var GC=(0,i.aZ)({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(e,{emit:t}){const l=(0,s.iH)(null),a=(0,s.iH)(!1),o=(0,s.iH)(!1),r=(0,s.iH)(0),u=(0,i.Fl)((()=>Math.floor(r.value/60))),c=(0,i.Fl)((()=>r.value%60)),d=(0,i.Fl)((()=>!o.value||a.value)),p=()=>{l.value&&clearInterval(l.value)};(0,i.Ah)(p);const v=()=>{p(),a.value=!1},m=()=>{p(),a.value=!1,o.value?r.value=600:r.value=0},h=()=>{p(),o.value?l.value=setInterval((()=>{r.value=r.value-1,r.value<=0&&m()}),1e3):l.value=setInterval((()=>{r.value=r.value+1,r.value>36e3&&v()}),1e3),a.value=!0},f=()=>{a.value?v():h()},g=()=>{o.value=!o.value,m()},y=(e,t)=>{const l=e.target;let a=l.value;const n=/^(\d)+$/.test(a);n?("second"===t&&+a>=60&&(a="59"),r.value="minute"===t?60*+a+c.value:+a+60*u.value):l.value=q("minute"===t?u.value:c.value,2)};return(e,l)=>{const r=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(wS,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:(0,i.w5)((()=>[(0,i._)("div",NC,[(0,i._)("span",{class:"text-btn",onClick:l[0]||(l[0]=e=>f())},(0,ae.zw)(a.value?"暂停":"开始"),1),(0,i._)("span",{class:"text-btn",onClick:l[1]||(l[1]=e=>m())},"重置"),(0,i._)("span",{class:(0,ae.C_)(["text-btn",{active:o.value}]),onClick:l[2]||(l[2]=e=>g())},"倒计时",2)]),(0,i._)("div",jC,[(0,i._)("div",YC,[(0,i._)("input",{type:"text",value:(0,s.SU)(q)(u.value,2),maxlength:3,disabled:d.value,onMousedown:l[3]||(l[3]=(0,n.iM)((()=>{}),["stop"])),onBlur:l[4]||(l[4]=e=>y(e,"minute")),onKeydown:[l[5]||(l[5]=(0,n.iM)((()=>{}),["stop"])),l[6]||(l[6]=(0,n.D2)((0,n.iM)((e=>y(e,"minute")),["stop"]),["enter"]))]},null,40,VC)]),JC,(0,i._)("div",qC,[(0,i._)("input",{type:"text",value:(0,s.SU)(q)(c.value,2),maxlength:3,disabled:d.value,onMousedown:l[7]||(l[7]=(0,n.iM)((()=>{}),["stop"])),onBlur:l[8]||(l[8]=e=>y(e,"second")),onKeydown:[l[9]||(l[9]=(0,n.iM)((()=>{}),["stop"])),l[10]||(l[10]=(0,n.D2)((0,n.iM)((e=>y(e,"second")),["stop"]),["enter"]))]},null,40,XC)])]),(0,i._)("div",{class:"close-btn",onClick:l[11]||(l[11]=e=>t("close"))},[(0,i.Wm)(r,{class:"icon"})])])),_:1},8,["left","top"])}}});const KC=(0,Nl.Z)(GC,[["__scopeId","data-v-83a589f0"]]);var QC=KC;const eL={class:"tools-left"},tL={class:"content"};var lL=(0,i.aZ)({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)(F()),{autoPlayTimer:n,autoPlay:r,closeAutoPlay:u,autoPlayInterval:c,setAutoPlayInterval:d,loopPlay:p,setLoopPlay:v,mousewheelListener:m,touchStartListener:h,touchEndListener:f,turnPrevSlide:g,turnNextSlide:y,turnSlideToIndex:w,turnSlideToId:x,execPrev:k,execNext:b,animationIndex:_}=XS(),{slideWidth:I,slideHeight:S}=GS(),{exitScreening:C}=_a(),{fullscreenState:L,manualExitFullscreen:E}=KS(),T=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>g()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>y()},{text:"第一页",disable:0===a.value,handler:()=>w(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>w(l.value.length-1)},{divider:!0},{text:n.value?"取消自动放映":"自动放映",handler:n.value?u:r,children:[{text:"2.5秒",subText:2500===c.value?"√":"",handler:()=>d(2500)},{text:"5秒",subText:5e3===c.value?"√":"",handler:()=>d(5e3)},{text:"7.5秒",subText:7500===c.value?"√":"",handler:()=>d(7500)},{text:"10秒",subText:1e4===c.value?"√":"",handler:()=>d(1e4)}]},{text:"循环放映",subText:p.value?"√":"",handler:()=>v(!p.value)},{divider:!0},{text:"显示工具栏",handler:()=>T.value=!0},{text:"查看所有幻灯片",handler:()=>W.value=!0},{text:"画笔工具",handler:()=>M.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:"结束放映",subText:"ESC",handler:C}];return(e,t)=>{const n=(0,i.up)("IconLeftTwo"),o=(0,i.up)("IconRightTwo"),r=(0,i.up)("IconWrite"),u=(0,i.up)("IconMagic"),c=(0,i.up)("IconStopwatchStart"),d=(0,i.up)("IconListView"),p=(0,i.up)("IconOffScreenOne"),v=(0,i.up)("IconFullScreenOne"),g=(0,i.up)("IconPower"),y=(0,i.Q2)("contextmenu"),F=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["base-view",{"laser-pen":D.value}])},[(0,i.wy)((0,i.Wm)(gC,{slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),animationIndex:(0,s.SU)(_),turnSlideToId:(0,s.SU)(x),manualExitFullscreen:(0,s.SU)(E),onWheel:t[0]||(t[0]=e=>(0,s.SU)(m)(e)),onTouchstart:t[1]||(t[1]=e=>(0,s.SU)(h)(e)),onTouchend:t[2]||(t[2]=e=>(0,s.SU)(f)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[y,H]]),W.value?((0,i.wg)(),(0,i.j4)(IC,{key:0,turnSlideToIndex:(0,s.SU)(w),onClose:t[3]||(t[3]=e=>W.value=!1)},null,8,["turnSlideToIndex"])):(0,i.kq)("",!0),M.value?((0,i.wg)(),(0,i.j4)(zC,{key:1,slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),onClose:t[4]||(t[4]=e=>M.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),U.value?((0,i.wg)(),(0,i.j4)(QC,{key:2,onClose:t[5]||(t[5]=e=>U.value=!1)})):(0,i.kq)("",!0),(0,i._)("div",eL,[(0,i.Wm)(n,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[6]||(t[6]=e=>(0,s.SU)(k)())}),(0,i.Wm)(o,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[7]||(t[7]=e=>(0,s.SU)(b)())})]),(0,i._)("div",{class:(0,ae.C_)(["tools-right",{visible:T.value}]),onMouseleave:t[16]||(t[16]=e=>T.value=!1),onMouseenter:t[17]||(t[17]=e=>T.value=!0)},[(0,i._)("div",tL,[(0,i._)("div",{class:"tool-btn page-number",onClick:t[8]||(t[8]=e=>W.value=!0)},"幻灯片 "+(0,ae.zw)((0,s.SU)(a)+1)+" / "+(0,ae.zw)((0,s.SU)(l).length),1),(0,i.wy)((0,i.Wm)(r,{class:"tool-btn",onClick:t[9]||(t[9]=e=>M.value=!0)},null,512),[[F,"画笔工具"]]),(0,i.wy)((0,i.Wm)(u,{class:(0,ae.C_)(["tool-btn",{active:D.value}]),onClick:t[10]||(t[10]=e=>D.value=!D.value)},null,8,["class"]),[[F,"激光笔"]]),(0,i.wy)((0,i.Wm)(c,{class:(0,ae.C_)(["tool-btn",{active:U.value}]),onClick:t[11]||(t[11]=e=>U.value=!U.value)},null,8,["class"]),[[F,"计时器"]]),(0,i.wy)((0,i.Wm)(d,{class:"tool-btn",onClick:t[12]||(t[12]=t=>e.changeViewMode("presenter"))},null,512),[[F,"演讲者视图"]]),(0,s.SU)(L)?(0,i.wy)(((0,i.wg)(),(0,i.j4)(p,{key:0,class:"tool-btn",onClick:t[13]||(t[13]=e=>(0,s.SU)(E)())},null,512)),[[F,"退出全屏"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(v,{key:1,class:"tool-btn",onClick:t[14]||(t[14]=e=>(0,s.SU)(xa)())},null,512)),[[F,"进入全屏"]]),(0,i.wy)((0,i.Wm)(g,{class:"tool-btn",onClick:t[15]||(t[15]=e=>(0,s.SU)(C)())},null,512),[[F,"结束放映"]])])],34)],2)}}});const aL=(0,Nl.Z)(lL,[["__scopeId","data-v-e9c1efea"]]);var nL=aL;const oL=e=>((0,i.dD)("data-v-0fc2d7b2"),e=e(),(0,i.Cn)(),e),iL={class:"presenter-view"},sL={class:"toolbar"},rL=oL((()=>(0,i._)("span",null,"普通视图",-1))),uL=oL((()=>(0,i._)("span",null,"画笔",-1))),cL=oL((()=>(0,i._)("span",null,"激光笔",-1))),dL=oL((()=>(0,i._)("span",null,"计时器",-1))),pL=oL((()=>(0,i._)("span",null,"结束放映",-1))),vL={class:"content"},mL=["onClick"],hL={class:"remark"},fL={class:"header"},gL=oL((()=>(0,i._)("span",null,"演讲者备注",-1))),yL=["innerHTML"],wL={class:"remark-scale"};var xL=(0,i.aZ)({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a,viewportRatio:r,currentSlide:u}=(0,o.Jk)(F()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)(!1),{mousewheelListener:h,touchStartListener:f,touchEndListener:g,turnPrevSlide:y,turnNextSlide:w,turnSlideToIndex:x,turnSlideToId:k,animationIndex:b}=XS(),{slideWidth:_,slideHeight:I}=GS(c),{exitScreening:S}=_a(),{slidesLoadLimit:C}=_m(),{fullscreenState:L,manualExitFullscreen:E}=KS(),T=(0,s.iH)(16),M=(0,i.Fl)((()=>Ql(u.value.remark||"无备注"))),U=e=>{d.value&&d.value.scrollBy(e.deltaY,0)},W=e=>{e<12||e>40||(T.value=e)};(0,i.YP)(a,(()=>{(0,i.Y3)((()=>{if(!d.value)return;const e=d.value.querySelector(".thumbnail.active");if(!e)return;const t=d.value.offsetWidth,l=e.offsetLeft;d.value.scrollTo({left:l-t/2,behavior:"smooth"})}))}));const D=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>y()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>w()},{text:"第一页",disable:0===a.value,handler:()=>x(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>x(l.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>p.value=!0},{text:"普通视图",handler:()=>t.changeViewMode("base")},{divider:!0},{text:"结束放映",subText:"ESC",handler:S}];return(e,t)=>{const o=(0,i.up)("IconListView"),u=(0,i.up)("IconWrite"),y=(0,i.up)("IconMagic"),w=(0,i.up)("IconStopwatchStart"),H=(0,i.up)("IconOffScreenOne"),F=(0,i.up)("IconPower"),A=(0,i.up)("IconMinus"),Z=(0,i.up)("IconPlus"),$=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",iL,[(0,i._)("div",sL,[(0,i._)("div",{class:"tool-btn",onClick:t[0]||(t[0]=t=>e.changeViewMode("base"))},[(0,i.Wm)(o,{class:"tool-icon"}),rL]),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:p.value}]),onClick:t[1]||(t[1]=e=>p.value=!p.value)},[(0,i.Wm)(u,{class:"tool-icon"}),uL],2),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:m.value}]),onClick:t[2]||(t[2]=e=>m.value=!m.value)},[(0,i.Wm)(y,{class:"tool-icon"}),cL],2),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:v.value}]),onClick:t[3]||(t[3]=e=>v.value=!v.value)},[(0,i.Wm)(w,{class:"tool-icon"}),dL],2),(0,i._)("div",{class:"tool-btn",onClick:t[4]||(t[4]=()=>(0,s.SU)(L)?(0,s.SU)(E)():(0,s.SU)(xa)())},[(0,s.SU)(L)?((0,i.wg)(),(0,i.j4)(H,{key:0,class:"tool-icon"})):((0,i.wg)(),(0,i.j4)(H,{key:1,class:"tool-icon"})),(0,i._)("span",null,(0,ae.zw)((0,s.SU)(L)?"退出全屏":"全屏"),1)]),(0,i.Wm)(Fc,{class:"divider"}),(0,i._)("div",{class:"tool-btn",onClick:t[5]||(t[5]=e=>(0,s.SU)(S)())},[(0,i.Wm)(F,{class:"tool-icon"}),pL])]),(0,i._)("div",vL,[(0,i._)("div",{class:(0,ae.C_)(["slide-list-wrap",{"laser-pen":m.value}]),ref_key:"slideListWrapRef",ref:c},[(0,i.wy)((0,i.Wm)(gC,{slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),animationIndex:(0,s.SU)(b),turnSlideToId:(0,s.SU)(k),manualExitFullscreen:(0,s.SU)(E),onWheel:t[6]||(t[6]=e=>(0,s.SU)(h)(e)),onTouchstart:t[7]||(t[7]=e=>(0,s.SU)(f)(e)),onTouchend:t[8]||(t[8]=e=>(0,s.SU)(g)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[$,D]]),p.value?((0,i.wg)(),(0,i.j4)(zC,{key:0,slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),left:-365,top:-155,onClose:t[9]||(t[9]=e=>p.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),v.value?((0,i.wg)(),(0,i.j4)(QC,{key:1,left:75,onClose:t[10]||(t[10]=e=>v.value=!1)})):(0,i.kq)("",!0)],2),(0,i._)("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:d,onWheel:t[11]||(t[11]=(0,n.iM)((e=>U(e)),["prevent"]))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail",{active:t===(0,s.SU)(a)}]),key:e.id,onClick:e=>(0,s.SU)(x)(t)},[(0,i.Wm)(jd,{slide:e,size:120/(0,s.SU)(r),visible:t<(0,s.SU)(C)},null,8,["slide","size","visible"])],10,mL)))),128))],544)]),(0,i._)("div",hL,[(0,i._)("div",fL,[gL,(0,i._)("span",null,"P "+(0,ae.zw)((0,s.SU)(a)+1)+" / "+(0,ae.zw)((0,s.SU)(l).length),1)]),(0,i._)("div",{class:"remark-content",style:(0,ae.j5)({fontSize:T.value+"px"}),innerHTML:M.value},null,12,yL),(0,i._)("div",wL,[(0,i._)("div",{class:(0,ae.C_)(["scale-btn",{disable:12===T.value}]),onClick:t[12]||(t[12]=e=>W(T.value-2))},[(0,i.Wm)(A)],2),(0,i._)("div",{class:(0,ae.C_)(["scale-btn",{disable:40===T.value}]),onClick:t[13]||(t[13]=e=>W(T.value+2))},[(0,i.Wm)(Z)],2)])])])}}});const kL=(0,Nl.Z)(xL,[["__scopeId","data-v-0fc2d7b2"]]);var bL=kL;const _L={class:"pptist-screen"};var IL=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("base"),l=e=>{t.value=e},{exitScreening:a}=_a(),n=e=>{const t=e.key.toUpperCase();t===le.ESC&&a()};return(0,i.bv)((()=>document.addEventListener("keydown",n))),(0,i.Ah)((()=>document.removeEventListener("keydown",n))),(e,a)=>((0,i.wg)(),(0,i.iD)("div",_L,["base"===t.value?((0,i.wg)(),(0,i.j4)(nL,{key:0,changeViewMode:l})):"presenter"===t.value?((0,i.wg)(),(0,i.j4)(bL,{key:1,changeViewMode:l})):(0,i.kq)("",!0)]))}});const SL=(0,Nl.Z)(IL,[["__scopeId","data-v-6bf3d190"]]);var CL=SL,LL=(0,i.aZ)({__name:"MobileEditableElement",props:{elementInfo:{},elementIndex:{},selectElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Ho,[na.TEXT]:Qi,[na.SHAPE]:hs,[na.LINE]:Cs,[na.CHART]:Ds,[na.TABLE]:Qs,[na.LATEX]:or,[na.VIDEO]:Fr,[na.AUDIO]:lu};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-editable-element",style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement"]))],4))}});const EL=LL;var TL=EL,ML=(0,i.aZ)({__name:"MobileOperate",props:{elementInfo:{},isSelected:{type:Boolean},canvasScale:{},scaleElement:{type:Function},rotateElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),a=(0,i.Fl)((()=>t.elementInfo.width*t.canvasScale)),o=(0,i.Fl)((()=>t.elementInfo.height*t.canvasScale)),{borderLines:r,resizeHandlers:u,textElementResizeHandlers:c}=Au(a,o),d="text"===t.elementInfo.type||"table"===t.elementInfo.type?c:u,p=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-operate",style:(0,ae.j5)({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${l.value}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Ou,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onTouchstart:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onTouchstart"])))),128)),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Xu,{key:0,class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onTouchstart:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)],4))}});const UL=(0,Nl.Z)(ML,[["__scopeId","data-v-fd451ff6"]]);var WL=UL;const DL={class:"mobile-thumbnails"},HL=["onClick"],FL={class:"label"};var AL=(0,i.aZ)({__name:"MobileThumbnails",setup(e){const t=F(),{slides:l,slideIndex:a}=(0,o.Jk)(t),{sortSlides:n}=pa(),{slidesLoadLimit:r}=_m(),u=e=>{t.updateSlideIndex(e)},c=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&n(t,l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",DL,[(0,i.Wm)((0,s.SU)(Mm()),{class:"thumbnail-list",modelValue:(0,s.SU)(l),animation:200,scroll:!0,scrollSensitivity:50,delayOnTouchOnly:!0,delay:800,itemKey:"id",onEnd:c},{item:(0,i.w5)((({element:e,index:t})=>[(0,i._)("div",{class:(0,ae.C_)(["thumbnail-item",{active:(0,s.SU)(a)===t}]),onClick:e=>u(t)},[(0,i._)("div",FL,(0,ae.zw)(t+1),1),(0,i.Wm)(jd,{class:"thumbnail",slide:e,size:120,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,HL)])),_:1},8,["modelValue"])]))}});const ZL=(0,Nl.Z)(AL,[["__scopeId","data-v-2c80920e"]]);var $L=ZL;const OL={class:"slide-toolbar"},RL={class:"remark"},PL=["value"],zL={class:"toolbar"};var BL=(0,i.aZ)({__name:"SlideToolbar",setup(e){const t=F(),{viewportRatio:l,currentSlide:a}=(0,o.Jk)(t),{createSlide:n,copyAndPasteSlide:r,deleteSlide:u}=pa(),{createTextElement:c,createImageElement:d,createShapeElement:p}=ua(),v=()=>{const e=400,t=56;c({left:(la-e)/2,top:(la*l.value-t)/2,width:e,height:t},{content:"

新添加文本

"})},m=e=>{e&&e[0]&&ta(e[0]).then((e=>d(e)))},h=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},a={viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},n={square:t,round:a},o=200;p({left:(la-o)/2,top:(la*l.value-o)/2,width:o,height:o},n[e])},f=(0,i.Fl)((()=>a.value?.remark||"")),g=e=>{const l=e.target.value;t.updateSlide({remark:l})};return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconCopy"),o=(0,i.up)("IconDelete"),c=(0,i.up)("IconFontSize"),d=(0,i.up)("IconPicture"),p=(0,i.up)("IconSquare"),y=(0,i.up)("IconRound");return(0,i.wg)(),(0,i.iD)("div",OL,[(0,i._)("div",RL,[(0,i._)("textarea",{value:f.value,placeholder:"点击输入演讲者备注",onInput:t[0]||(t[0]=e=>g(e))},null,40,PL)]),(0,i._)("div",zL,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)(" 新幻灯片")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"icon"}),(0,i.Uk)(" 文字")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Oa,{onChange:t[5]||(t[5]=e=>m(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:"icon"}),(0,i.Uk)("图片 ")])),_:1})])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>h("square"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p,{class:"icon"}),(0,i.Uk)(" 矩形")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>h("round"))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"icon"}),(0,i.Uk)(" 圆形")])),_:1})])),_:1})]),(0,i.Wm)($L)])}}});const NL=(0,Nl.Z)(BL,[["__scopeId","data-v-24150aba"]]);var jL=NL;const YL=e=>((0,i.dD)("data-v-f3d1ac70"),e=e(),(0,i.Cn)(),e),VL={class:"element-toolbar"},JL={class:"content"},qL={key:0,class:"style"},XL={class:"row-block"},GL=YL((()=>(0,i._)("div",{class:"label"},"文字颜色:",-1))),KL={class:"colors"},QL=["onClick"],eE={class:"row-block"},tE=YL((()=>(0,i._)("div",{class:"label"},"填充色:",-1))),lE={class:"colors"},aE=["onClick"],nE={key:1,class:"common"};var oE=(0,i.aZ)({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],l=$(),a=F(),{handleElement:n,handleElementId:r,richTextAttrs:u}=(0,o.Jk)(l),{addHistorySnapshot:c}=ra(),d=(e,t)=>{a.updateElement({id:e,props:t}),c()},p=[{key:"style",label:"样式"},{key:"common",label:"布局"}],v=(0,s.iH)("common"),{orderElement:m}=wa(),{alignElementToCanvas:h}=Yn(),{addElementsFromData:f}=ca(),{deleteElement:g}=ma(),y=()=>{const e=JSON.parse(JSON.stringify(n.value));f([e])},w=(e,t)=>{Ai.emit(Di.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},x=e=>{if(n.value){if(("text"===n.value.type||"shape"===n.value.type&&n.value.text?.content)&&Ai.emit(Di.RICH_TEXT_COMMAND,{action:{command:"color",value:e}}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{if(n.value){if("text"!==n.value.type&&"shape"!==n.value.type&&"chart"!==n.value.type||d(r.value,{fill:e}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{const a=(0,i.up)("IconTextBold"),o=(0,i.up)("IconTextItalic"),r=(0,i.up)("IconTextUnderline"),c=(0,i.up)("IconStrikethrough"),d=(0,i.up)("IconFontSize"),f=(0,i.up)("IconAlignTextLeft"),b=(0,i.up)("IconAlignTextCenter"),_=(0,i.up)("IconAlignTextRight"),I=(0,i.up)("IconCopy"),S=(0,i.up)("IconDelete"),C=(0,i.up)("IconSendToBack"),L=(0,i.up)("IconBringToFrontOne"),E=(0,i.up)("IconBringToFront"),T=(0,i.up)("IconSentToBack"),M=(0,i.up)("IconAlignLeft"),U=(0,i.up)("IconAlignVertically"),W=(0,i.up)("IconAlignRight"),D=(0,i.up)("IconAlignTop"),H=(0,i.up)("IconAlignHorizontally"),F=(0,i.up)("IconAlignBottom");return(0,i.wg)(),(0,i.iD)("div",VL,[(0,i.Wm)(qd,{tabs:p,value:v.value,"onUpdate:value":l[0]||(l[0]=e=>v.value=e),tabsStyle:{marginBottom:"8px"},tabStyle:{width:"30%",margin:"0 10%"}},null,8,["value"]),(0,i._)("div",JL,["style"===v.value?((0,i.wg)(),(0,i.iD)("div",qL,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[1]||(l[1]=e=>w("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["checked"]),(0,i.Wm)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[2]||(l[2]=e=>w("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["checked"]),(0,i.Wm)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[3]||(l[3]=e=>w("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"]),(0,i.Wm)(Yf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[4]||(l[4]=e=>w("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[5]||(l[5]=e=>w("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("+")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[6]||(l[6]=e=>w("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("-")])),_:1})])),_:1}),(0,i.Wm)(Fc,{style:{margin:"20px 0"}}),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[7]||(l[7]=e=>w("align",e))},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1}),(0,i.Wm)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(b)])),_:1}),(0,i.Wm)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(_)])),_:1})])),_:1},8,["value"]),(0,i.Wm)(Fc,{style:{margin:"20px 0"}}),(0,i._)("div",XL,[GL,(0,i._)("div",KL,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>x(e)},[(0,i._)("div",{class:"color-block",style:(0,ae.j5)({backgroundColor:e})},null,4)],8,QL))),64))])]),(0,i._)("div",eE,[tE,(0,i._)("div",lE,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>k(e)},[(0,i._)("div",{class:"color-block",style:(0,ae.j5)({backgroundColor:e})},null,4)],8,aE))),64))])])])):(0,i.kq)("",!0),"common"===v.value?((0,i.wg)(),(0,i.iD)("div",nE,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[8]||(l[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(I,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[9]||(l[9]=e=>(0,s.SU)(g)())},{default:(0,i.w5)((()=>[(0,i.Wm)(S,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Fc,{style:{margin:"20px 0"}}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[10]||(l[10]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(C,{class:"icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[11]||(l[11]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(L,{class:"icon"}),(0,i.Uk)(" 置底")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[12]||(l[12]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(E,{class:"icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[13]||(l[13]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{class:"icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Fc,{style:{margin:"20px 0"}}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[14]||(l[14]=e=>(0,s.SU)(h)((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(M,{class:"icon"}),(0,i.Uk)(" 左对齐")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[15]||(l[15]=e=>(0,s.SU)(h)((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U,{class:"icon"}),(0,i.Uk)(" 水平居中")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[16]||(l[16]=e=>(0,s.SU)(h)((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(W,{class:"icon"}),(0,i.Uk)(" 右对齐")])),_:1})])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[17]||(l[17]=e=>(0,s.SU)(h)((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(D,{class:"icon"}),(0,i.Uk)(" 上对齐")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[18]||(l[18]=e=>(0,s.SU)(h)((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(H,{class:"icon"}),(0,i.Uk)(" 垂直居中")])),_:1}),(0,i.Wm)(Kd,{style:{flex:"1"},onClick:l[19]||(l[19]=e=>(0,s.SU)(h)((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(F,{class:"icon"}),(0,i.Uk)(" 下对齐")])),_:1})])),_:1})])):(0,i.kq)("",!0)])])}}});const iE=(0,Nl.Z)(oE,[["__scopeId","data-v-f3d1ac70"]]);var sE=iE;const rE={class:"mobile-editor-header"},uE={class:"history"};var cE=(0,i.aZ)({__name:"Header",props:{changeMode:{type:Function}},setup(e){const{canUndo:t,canRedo:l}=(0,o.Jk)(Y()),{redo:a,undo:r}=ra();return(e,o)=>{const u=(0,i.up)("IconBack"),c=(0,i.up)("IconNext"),d=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",rE,[(0,i._)("div",uE,[(0,i._)("div",{class:(0,ae.C_)(["history-item",{disable:!(0,s.SU)(t)}]),onClick:o[0]||(o[0]=(0,n.iM)((e=>(0,s.SU)(r)()),["stop"]))},[(0,i.Wm)(u),(0,i.Uk)(" 撤销")],2),(0,i._)("div",{class:(0,ae.C_)(["history-item",{disable:!(0,s.SU)(l)}]),onClick:o[1]||(o[1]=(0,n.iM)((e=>(0,s.SU)(a)()),["stop"]))},[(0,i.Wm)(c),(0,i.Uk)(" 重做")],2)]),(0,i._)("div",{class:"back",onClick:o[2]||(o[2]=t=>e.changeMode("preview"))},[(0,i.Wm)(d),(0,i.Uk)(" 退出编辑")])])}}});const dE=(0,Nl.Z)(cE,[["__scopeId","data-v-5c34ab81"]]);var pE=dE;const vE={class:"mobile-editor"};var mE=(0,i.aZ)({__name:"index",props:{changeMode:{type:Function}},setup(e){const t=F(),l=$(),{slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),{activeElementIdList:u,handleElement:c}=(0,o.Jk)(l),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)([]),m=(0,i.Fl)((()=>n.value.background)),{backgroundStyle:h}=hu(m),f=(0,i.Fl)((()=>{if(!d.value)return 1;const e=d.value.clientWidth,t=d.value.clientHeight,l=t/e;return l>=r.value?(e-20)/la:(t-20)/r.value/la}));(0,i.bv)((()=>{u.value.length&&l.setActiveElementIdList([]),0!==a.value&&t.updateSlideIndex(0)}));const g=(0,i.Fl)((()=>({width:la*f.value+"px",height:la*r.value*f.value+"px"}))),y=(0,s.iH)([]),w=()=>{y.value=n.value?JSON.parse(JSON.stringify(n.value.elements)):[]};(0,i.m0)(w);const{dragElement:x}=zn(y,v,f),{scaleElement:k}=Rn(y,v,f),{rotateElement:b}=Dn(y,p,f),_=(e,t,a=!0)=>{u.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),a&&x(e,t)},I=()=>{l.setActiveElementIdList([])};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",vE,[(0,i.Wm)(pE,{changeMode:e.changeMode},null,8,["changeMode"]),(0,i._)("div",{class:"content",ref_key:"contentRef",ref:d,onTouchstart:t[0]||(t[0]=e=>I())},[(0,i._)("div",{class:"viewport-wrapper",style:(0,ae.j5)(g.value)},[(0,i._)("div",{class:"background",style:(0,ae.j5)((0,s.SU)(h))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((e,t)=>((0,i.wg)(),(0,i.j4)(ku,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:f.value},null,8,["type","axis","length","canvasScale"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["line"!==e.type?((0,i.wg)(),(0,i.j4)(WL,{key:0,elementInfo:e,isSelected:(0,s.SU)(u).includes(e.id),canvasScale:f.value,scaleElement:(0,s.SU)(k),rotateElement:(0,s.SU)(b)},null,8,["elementInfo","isSelected","canvasScale","scaleElement","rotateElement"])):(0,i.kq)("",!0)],64)))),128)),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:p,style:(0,ae.j5)({transform:`scale(${f.value})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.j4)(TL,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:_},null,8,["elementInfo","elementIndex"])))),128))],4)],4)],544),(0,i.Wm)(jL),(0,s.SU)(c)?((0,i.wg)(),(0,i.j4)(sE,{key:0})):(0,i.kq)("",!0)]))}});const hE=(0,Nl.Z)(mE,[["__scopeId","data-v-3756d058"]]);var fE=hE;const gE={class:"header"};var yE=(0,i.aZ)({__name:"MobilePlayer",props:{changeMode:{type:Function}},setup(e){const t=F(),{slides:l,slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),u=(0,s.iH)(!1),c=(0,s.iH)({width:0,height:0});(0,i.bv)((()=>{0!==a.value&&t.updateSlideIndex(0),c.value={width:document.body.clientHeight,height:document.body.clientWidth}}));const d=(0,i.Fl)((()=>{const e=c.value.height/c.value.width;let t=0,l=0;return e>=r.value?(t=c.value.width,l=t*r.value):(l=c.value.height,t=l/r.value),{width:t,height:l}})),p=(0,s.iH)(null),v=e=>{p.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},m=e=>{if(!p.value)return;const n=Math.abs(p.value.y-e.changedTouches[0].pageY),o=e.changedTouches[0].pageX-p.value.x;Math.abs(o)>n&&Math.abs(o)>50&&(p.value=null,o<0&&a.value>0&&t.updateSlideIndex(a.value-1),o>0&&a.value{const o=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-player",style:(0,ae.j5)({width:c.value.width+"px",height:c.value.height+"px",transform:`rotate(90deg) translateY(-${c.value.height}px)`})},[(0,i._)("div",{class:"screen-slide-list",onClick:t[0]||(t[0]=e=>u.value=!u.value),onTouchstart:t[1]||(t[1]=e=>v(e)),onTouchend:t[2]||(t[2]=e=>m(e))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slide-item",`turning-mode-${e.turningMode||"slideY"}`,{current:t===(0,s.SU)(a),before:t<(0,s.SU)(a),after:t>(0,s.SU)(a),hide:(t===(0,s.SU)(a)-1||t===(0,s.SU)(a)+1)&&e.turningMode!==(0,s.SU)(n).turningMode}]),key:e.id},[Math.abs((0,s.SU)(a)-t)<2?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,ae.j5)({width:d.value.width+"px",height:d.value.height+"px"})},[(0,i.Wm)(jd,{slide:e,size:d.value.width},null,8,["slide","size"])],4)):(0,i.kq)("",!0)],2)))),128))],32),u.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",gE,[(0,i._)("div",{class:"back",onClick:t[3]||(t[3]=t=>e.changeMode("preview"))},[(0,i.Wm)(o),(0,i.Uk)(" 退出播放")])]),(0,i.Wm)($L,{class:"thumbnails"})],64)):(0,i.kq)("",!0)],4)}}});const wE=(0,Nl.Z)(yE,[["__scopeId","data-v-62f26eba"]]);var xE=wE;const kE={class:"thumbnail-list"},bE={class:"menu"};var _E=(0,i.aZ)({__name:"MobilePreview",props:{changeMode:{type:Function}},setup(e){const{slides:t}=(0,o.Jk)(F()),{slidesLoadLimit:l}=_m(),a=(0,s.iH)(),n=(0,s.iH)(0);return(0,i.bv)((()=>{a.value&&(n.value=a.value.clientWidth)})),(e,o)=>{const r=(0,i.up)("IconEdit"),u=(0,i.up)("IconFullScreenPlay");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-preview",ref_key:"mobileRef",ref:a},[(0,i._)("div",kE,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-item",key:e.id},[(0,i.Wm)(jd,{slide:e,size:n.value-20,visible:t<(0,s.SU)(l)},null,8,["slide","size","visible"])])))),128))]),(0,i._)("div",bE,[(0,i._)("div",{class:"menu-item",onClick:o[0]||(o[0]=t=>e.changeMode("editor"))},[(0,i.Wm)(r,{class:"icon"}),(0,i.Uk)(" 编辑")]),(0,i.Wm)(Fc,{type:"vertical",style:{height:"30px"}}),(0,i._)("div",{class:"menu-item",onClick:o[1]||(o[1]=t=>e.changeMode("player"))},[(0,i.Wm)(u,{class:"icon"}),(0,i.Uk)(" 播放")])])],512)}}});const IE=(0,Nl.Z)(_E,[["__scopeId","data-v-53dd42dc"]]);var SE=IE;const CE={class:"mobile"};var LE=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("preview"),l=e=>t.value=e,a=(0,i.Fl)((()=>{const e={editor:fE,player:xE,preview:SE};return e[t.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",CE,[((0,i.wg)(),(0,i.j4)((0,i.LL)(a.value),{changeMode:l}))]))}});const EE=(0,Nl.Z)(LE,[["__scopeId","data-v-9826ff08"]]);var TE=EE,ME=(0,i.aZ)({__name:"App",setup(e){const t=X(),l=$(),a=Y(),{databaseId:n}=(0,o.Jk)(l),{screening:r}=(0,o.Jk)(J());return window.onbeforeunload=()=>!1,(0,i.bv)((async()=>{await B(),a.initSnapshotDatabase(),l.setAvailableFonts()})),window.addEventListener("unload",(()=>{const e=localStorage.getItem(P),t=e?JSON.parse(e):[];t.push(n.value);const l=JSON.stringify(t);localStorage.setItem(P,l)})),(e,l)=>(0,s.SU)(r)?((0,i.wg)(),(0,i.j4)(CL,{key:0})):(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(qS,{key:1})):((0,i.wg)(),(0,i.j4)(TE,{key:2}))}});const UE=ME;var WE=UE,DE=l(5205);(0,DE.z)("service-worker.js",{ready(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered(){console.log("Service worker has been registered.")},cached(){console.log("Content has been cached for offline use.")},updatefound(){console.log("New content is downloading.")},updated(){console.log("New content is available; please refresh.")},offline(){console.log("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});l(9744),l(9091);const HE={class:"menu-content"},FE=["onClick"],AE={class:"text"},ZE={key:0,class:"sub-text"};var $E=(0,i.aZ)({__name:"MenuContent",props:{menus:{},handleClickMenuItem:{type:Function}},setup(e){return(e,t)=>{const l=(0,i.up)("menu-content",!0);return(0,i.wg)(),(0,i.iD)("ul",HE,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.menus,((t,a)=>((0,i.wg)(),(0,i.iD)(i.HY,{key:t.text||a},[t.hide?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("li",{key:0,class:(0,ae.C_)(["menu-item",{divider:t.divider,disable:t.disable}]),onClick:(0,n.iM)((l=>e.handleClickMenuItem(t)),["stop"])},[t.divider?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[(0,i._)("span",AE,(0,ae.zw)(t.text),1),t.subText&&!t.children?((0,i.wg)(),(0,i.iD)("span",ZE,(0,ae.zw)(t.subText),1)):(0,i.kq)("",!0),t.children&&t.children.length?((0,i.wg)(),(0,i.j4)(l,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):(0,i.kq)("",!0)],2))],10,FE))],64)))),128))])}}});const OE=(0,Nl.Z)($E,[["__scopeId","data-v-77e74b43"]]);var RE=OE,PE=(0,i.aZ)({__name:"index",props:{axis:{},el:{},menus:{},removeContextmenu:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=170,l=30,a=11,n=5,{x:o,y:i}=t.axis,s=t.menus.filter((e=>!(e.divider||e.hide))).length,r=t.menus.filter((e=>e.divider)).length,u=e,c=s*l+r*a+2*n,d=document.body.clientWidth,p=document.body.clientHeight;return{left:d<=o+u?o-u:o,top:p<=i+c?i-c:i}})),a=e=>{e.disable||e.children&&!e.handler||(e.handler&&e.handler(t.el),t.removeContextmenu())};return(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",{class:"mask",onContextmenu:t[0]||(t[0]=(0,n.iM)((t=>e.removeContextmenu()),["prevent"])),onMousedown:t[1]||(t[1]=t=>e.removeContextmenu())},null,32),(0,i._)("div",{class:"contextmenu",style:(0,ae.j5)({left:l.value.left+"px",top:l.value.top+"px"}),onContextmenu:t[2]||(t[2]=(0,n.iM)((()=>{}),["prevent"]))},[(0,i.Wm)(RE,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}});const zE=PE;var BE=zE;const NE="CTX_CONTEXTMENU_HANDLER",jE=(e,t,l)=>{t.stopPropagation(),t.preventDefault();const a=l.value(e);if(!a)return;let o=null;const s=()=>{o&&(document.body.removeChild(o),o=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",s),window.removeEventListener("resize",s)},r={axis:{x:t.x,y:t.y},el:e,menus:a,removeContextmenu:s};o=document.createElement("div");const u=(0,i.Wm)(BE,r,null);(0,n.sY)(u,o),document.body.appendChild(o),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",s),window.addEventListener("resize",s)},YE={mounted(e,t){e[NE]=l=>jE(e,l,t),e.addEventListener("contextmenu",e[NE])},unmounted(e){e&&e[NE]&&(e.removeEventListener("contextmenu",e[NE]),delete e[NE])}};var VE=YE;const JE="CTX_CLICK_OUTSIDE_HANDLER",qE=(e,t,l)=>{const a=l.value,n=t.composedPath(),o=n?n.indexOf(e)<0:!e.contains(t.target);o&&a(t)},XE={mounted(e,t){e[JE]=l=>qE(e,l,t),setTimeout((()=>{document.addEventListener("click",e[JE])}),0)},unmounted(e){e[JE]&&(document.removeEventListener("click",e[JE]),delete e[JE])}};var GE=XE;const KE="TOOLTIP_INSTANCE",QE={mounted(e,t){let l="",a="top",n=[300,0];"string"===typeof t.value?l=t.value:(l=t.value.content,void 0!==t.value.placement&&(a=t.value.placement),void 0!==t.value.delay&&(n=t.value.delay)),e[KE]=(0,nn.ZP)(e,{content:l,theme:"tooltip",duration:100,animation:"scale",allowHTML:!0,placement:a,delay:n})},updated(e,t){let l="";l="string"===typeof t.value?t.value:t.value.content,e[KE]&&e[KE].setContent(l)},unmounted(e){e[KE]&&e[KE].destroy()}};var eT=QE,tT={install(e){e.directive("contextmenu",VE),e.directive("click-outside",GE),e.directive("tooltip",eT)}};const lT=(0,n.ri)(WE);lT.use(Al),lT.use(tT),lT.use((0,o.WB)()),lT.mount("#app")},2480:function(){},3180:function(){},7687:function(){}},t={};function l(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,l),o.loaded=!0,o.exports}l.m=e,function(){var e=[];l.O=function(t,a,n,o){if(!a){var i=1/0;for(c=0;c=o)&&Object.keys(l.O).every((function(e){return l.O[e](a[r])}))?a.splice(r--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,n,o]}}(),function(){l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,{a:t}),t}}(),function(){l.d=function(e,t){for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){l.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};l.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,o,i=a[0],s=a[1],r=a[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(n in s)l.o(s,n)&&(l.m[n]=s[n]);if(r)var c=r(l)}for(t&&t(a);u {\n const { empty } = view.state.selection\n if (empty) selectAll(view.state, view.dispatch)\n}\n\nexport const addMark = (editorView: EditorView, mark: Mark, selection?: { from: number; to: number; }) => {\n if (selection) {\n editorView.dispatch(editorView.state.tr.addMark(selection.from, selection.to, mark))\n }\n else {\n const { $from, $to } = editorView.state.selection\n editorView.dispatch(editorView.state.tr.addMark($from.pos, $to.pos, mark))\n }\n}\n\nexport const findNodesWithSameMark = (doc: Node, from: number, to: number, markType: MarkType) => {\n let ii = from\n const finder = (mark: Mark) => mark.type === markType\n let firstMark = null\n let fromNode = null\n let toNode = null\n\n while (ii <= to) {\n const node = doc.nodeAt(ii)\n if (!node || !node.marks) return null\n\n const mark = node.marks.find(finder)\n if (!mark) return null\n\n if (firstMark && mark !== firstMark) return null\n\n fromNode = fromNode || node\n firstMark = firstMark || mark\n toNode = node\n ii++\n }\n\n let fromPos = from\n let toPos = to\n\n let jj = 0\n ii = from - 1\n while (ii > jj) {\n const node = doc.nodeAt(ii)\n const mark = node && node.marks.find(finder)\n if (!mark || mark !== firstMark) break\n fromPos = ii\n fromNode = node\n ii--\n }\n\n ii = to + 1\n jj = doc.nodeSize - 2\n while (ii < jj) {\n const node = doc.nodeAt(ii)\n const mark = node && node.marks.find(finder)\n if (!mark || mark !== firstMark) break\n toPos = ii\n toNode = node\n ii++\n }\n\n return {\n mark: firstMark,\n from: {\n node: fromNode,\n pos: fromPos,\n },\n to: {\n node: toNode,\n pos: toPos,\n },\n }\n}\n\nconst equalNodeType = (nodeType: NodeType, node: Node) => {\n return Array.isArray(nodeType) && nodeType.indexOf(node.type) > -1 || node.type === nodeType\n}\n\nconst findParentNodeClosestToPos = ($pos: ResolvedPos, predicate: (node: Node) => boolean) => {\n for (let i = $pos.depth; i > 0; i--) {\n const node = $pos.node(i)\n if (predicate(node)) {\n return {\n pos: i > 0 ? $pos.before(i) : 0,\n start: $pos.start(i),\n depth: i,\n node,\n }\n }\n }\n}\n\nexport const findParentNode = (predicate: (node: Node) => boolean) => {\n return (_ref: Selection) => findParentNodeClosestToPos(_ref.$from, predicate)\n}\n\nexport const findParentNodeOfType = (nodeType: NodeType) => {\n return (selection: Selection) => {\n return findParentNode((node: Node) => {\n return equalNodeType(nodeType, node)\n })(selection)\n }\n}\n\nexport const isActiveOfParentNodeType = (nodeType: string, state: EditorState) => {\n const node = state.schema.nodes[nodeType]\n return !!findParentNodeOfType(node)(state.selection)\n}\n\nexport const getMarkAttrs = (view: EditorView) => {\n const { selection, doc } = view.state\n const { from } = selection\n\n let node = doc.nodeAt(from) || doc.nodeAt(from - 1)\n if (node?.lastChild) node = node.lastChild\n\n return node?.marks || []\n}\n\nexport const getAttrValue = (marks: readonly Mark[], markType: string, attr: string): string | null => {\n for (const mark of marks) {\n if (mark.type.name === markType && mark.attrs[attr]) return mark.attrs[attr]\n }\n return null\n}\n\nexport const isActiveMark = (marks: readonly Mark[], markType: string) => {\n for (const mark of marks) {\n if (mark.type.name === markType) return true\n }\n return false\n}\n\nexport const markActive = (state: EditorState, type: MarkType) => {\n const { from, $from, to, empty } = state.selection\n if (empty) return type.isInSet(state.storedMarks || $from.marks())\n return state.doc.rangeHasMark(from, to, type)\n}\n\nexport const getAttrValueInSelection = (view: EditorView, attr: string) => {\n const { selection, doc } = view.state\n const { from, to } = selection\n\n let keepChecking = true\n let value = ''\n doc.nodesBetween(from, to, node => {\n if (keepChecking && node.attrs[attr]) {\n keepChecking = false\n value = node.attrs[attr]\n }\n return keepChecking\n })\n return value\n}\n\ntype Align = 'left' | 'right' | 'center'\n\ninterface DefaultAttrs {\n color: string\n backcolor: string\n fontsize: string\n fontname: string\n align: Align\n}\nconst _defaultAttrs: DefaultAttrs = {\n color: '#000',\n backcolor: '',\n fontsize: '20px',\n fontname: '微软雅黑',\n align: 'left',\n}\nexport const getTextAttrs = (view: EditorView, attrs: Partial = {}) => {\n const defaultAttrs: DefaultAttrs = { ..._defaultAttrs, ...attrs }\n\n const marks = getMarkAttrs(view)\n\n const isBold = isActiveMark(marks, 'strong')\n const isEm = isActiveMark(marks, 'em')\n const isUnderline = isActiveMark(marks, 'underline')\n const isStrikethrough = isActiveMark(marks, 'strikethrough')\n const isSuperscript = isActiveMark(marks, 'superscript')\n const isSubscript = isActiveMark(marks, 'subscript')\n const isCode = isActiveMark(marks, 'code')\n const color = getAttrValue(marks, 'forecolor', 'color') || defaultAttrs.color\n const backcolor = getAttrValue(marks, 'backcolor', 'backcolor') || defaultAttrs.backcolor\n const fontsize = getAttrValue(marks, 'fontsize', 'fontsize') || defaultAttrs.fontsize\n const fontname = getAttrValue(marks, 'fontname', 'fontname') || defaultAttrs.fontname\n const link = getAttrValue(marks, 'link', 'href') || ''\n const align = (getAttrValueInSelection(view, 'align') || defaultAttrs.align) as Align\n const isBulletList = isActiveOfParentNodeType('bullet_list', view.state)\n const isOrderedList = isActiveOfParentNodeType('ordered_list', view.state)\n const isBlockquote = isActiveOfParentNodeType('blockquote', view.state)\n\n return {\n bold: isBold,\n em: isEm,\n underline: isUnderline,\n strikethrough: isStrikethrough,\n superscript: isSuperscript,\n subscript: isSubscript,\n code: isCode,\n color: color,\n backcolor: backcolor,\n fontsize: fontsize,\n fontname: fontname,\n link: link,\n align: align,\n bulletList: isBulletList,\n orderedList: isOrderedList,\n blockquote: isBlockquote,\n }\n}\n\nexport type TextAttrs = ReturnType\n\nexport const getFontsize = (view: EditorView) => {\n const marks = getMarkAttrs(view)\n const fontsize = getAttrValue(marks, 'fontsize', 'fontsize') || _defaultAttrs.fontsize\n return parseInt(fontsize)\n}\n\nexport const defaultRichTextAttrs: TextAttrs = {\n bold: false,\n em: false,\n underline: false,\n strikethrough: false,\n superscript: false,\n subscript: false,\n code: false,\n color: '#000',\n backcolor: '',\n fontsize: '20px',\n fontname: '微软雅黑',\n link: '',\n align: 'left',\n bulletList: false,\n orderedList: false,\n blockquote: false,\n}","export const SYS_FONTS = [\n { label: 'Arial', value: 'Arial' },\n { label: '微软雅黑', value: 'Microsoft Yahei' },\n { label: '宋体', value: 'SimSun' },\n { label: '黑体', value: 'SimHei' },\n { label: '楷体', value: 'KaiTi' },\n { label: '新宋体', value: 'NSimSun' },\n { label: '仿宋', value: 'FangSong' },\n { label: '苹方', value: 'PingFang SC' },\n { label: '华文黑体', value: 'STHeiti' },\n { label: '华文楷体', value: 'STKaiti' },\n { label: '华文宋体', value: 'STSong' },\n { label: '华文仿宋', value: 'STFangSong' },\n { label: '华文中宋', value: 'STZhongSong' },\n { label: '华文琥珀', value: 'STHupo' },\n { label: '华文新魏', value: 'STXinwei' },\n { label: '华文隶书', value: 'STLiti' },\n { label: '华文行楷', value: 'STXingkai' },\n { label: '冬青黑体', value: 'Hiragino Sans GB' },\n { label: '兰亭黑', value: 'Lantinghei SC' },\n { label: '偏偏体', value: 'Hanzipen SC' },\n { label: '手札体', value: 'Hannotate SC' },\n { label: '宋体', value: 'Songti SC' },\n { label: '娃娃体', value: 'Wawati SC' },\n { label: '行楷', value: 'Xingkai SC' },\n { label: '圆体', value: 'Yuanti SC' },\n { label: '华文细黑', value: 'STXihei' },\n { label: '幼圆', value: 'YouYuan' },\n { label: '隶书', value: 'LiSu' },\n]\n\nexport const WEB_FONTS = [\n { label: '得意黑', value: '得意黑' },\n { label: '仓耳小丸子', value: '仓耳小丸子' },\n { label: '优设标题黑', value: '优设标题黑' },\n { label: '峰广明锐体', value: '峰广明锐体' },\n { label: '摄图摩登小方体', value: '摄图摩登小方体' },\n { label: '站酷快乐体', value: '站酷快乐体' },\n { label: '字制区喜脉体', value: '字制区喜脉体' },\n { label: '素材集市康康体', value: '素材集市康康体' },\n { label: '素材集市酷方体', value: '素材集市酷方体' },\n { label: '途牛类圆体', value: '途牛类圆体' },\n { label: '锐字真言体', value: '锐字真言体' },\n]","/**\n * 判断操作系统是否存在某字体\n * @param fontName 字体名\n */\nexport const isSupportFont = (fontName: string) => {\n if (typeof fontName !== 'string') return false\n\n const arial = 'Arial'\n if (fontName.toLowerCase() === arial.toLowerCase()) return true\n\n const size = 100\n const width = 100\n const height = 100\n const str = 'a'\n\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d', { willReadFrequently: true })\n\n if (!ctx) return false\n\n canvas.width = width\n canvas.height = height\n ctx.textAlign = 'center'\n ctx.fillStyle = 'black'\n ctx.textBaseline = 'middle'\n\n const getDotArray = (_fontFamily: string) => {\n ctx.clearRect(0, 0, width, height)\n ctx.font = `${size}px ${_fontFamily}, ${arial}`\n ctx.fillText(str, width / 2, height / 2)\n const imageData = ctx.getImageData(0, 0, width, height).data\n return [].slice.call(imageData).filter(item => item !== 0)\n }\n\n return getDotArray(arial).join('') !== getDotArray(fontName).join('')\n}","import type { Slide } from '@/types/slides'\n\nexport const slides: Slide[] = [\n {\n id: 'test-slide-1',\n elements: [\n {\n type: 'shape',\n id: '4cbRxp',\n left: 0,\n top: 200,\n width: 546,\n height: 362.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n opacity: 0.7,\n rotate: 0\n },\n {\n type: 'shape',\n id: 'ookHrf',\n left: 0,\n top: 0,\n width: 300,\n height: 320,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n flipV: true,\n rotate: 0\n },\n {\n type: 'text',\n id: 'idn7Mx',\n left: 355,\n top: 65.25,\n width: 585,\n height: 188,\n lineHeight: 1.2,\n content: '

PPTIST

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333'\n },\n {\n type: 'text',\n id: '7stmVP',\n left: 355,\n top: 253.25,\n width: 585,\n height: 56,\n content: '

基于 Vue 3.x + TypeScript 的在线演示文稿应用

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333'\n },\n {\n type: 'line',\n id: 'FnpZs4',\n left: 361,\n top: 238,\n start: [0, 0],\n end: [549, 0],\n points: ['', ''],\n color: '#5b9bd5',\n style: 'solid',\n width: 2,\n },\n ],\n background: {\n type: 'solid',\n color: '#ffffff',\n },\n },\n {\n id: 'test-slide-2',\n elements: [\n {\n type: 'text',\n id: 'ptNnUJ',\n left: 145,\n top: 148,\n width: 711,\n height: 77,\n lineHeight: 1.2,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n }, \n {\n type: 'text',\n id: 'mRHvQN',\n left: 207.50000000000003,\n top: 249.84259259259264,\n width: 585,\n height: 56,\n content: '

在此处添加副标题

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n }, \n {\n type: 'line',\n id: '7CQDwc',\n left: 323.09259259259267,\n top: 238.33333333333334,\n start: [0, 0],\n end: [354.8148148148148, 0],\n points: ['', ''],\n color: '#5b9bd5',\n style: 'solid',\n width: 4\n }, \n {\n type: 'shape',\n id: '09wqWw',\n left: -27.648148148148138,\n top: 432.73148148148147,\n width: 1056.2962962962963,\n height: 162.96296296296296,\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '#fff',\n },\n },\n {\n id: 'test-slide-3',\n elements: [\n {\n type: 'shape',\n id: 'vSheCJ',\n left: 183.5185185185185,\n top: 175.5092592592593,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0\n }, \n {\n type: 'shape',\n id: 'Mpwv7x',\n left: 211.29629629629628,\n top: 201.80555555555557,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0,\n opacity: 0.7\n }, \n {\n type: 'text',\n id: 'WQOTAp',\n left: 304.9074074074074,\n top: 198.10185185185182,\n width: 417.9629629629629,\n height: 140,\n content: '

感谢观看

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n wordSpace: 5\n }\n ],\n background: {\n type: 'solid',\n color: '#fff',\n },\n },\n]","import type { SlideTheme } from '@/types/slides'\n\nexport const theme: SlideTheme = {\n themeColor: '#5b9bd5',\n fontColor: '#333',\n fontName: 'Microsoft Yahei',\n backgroundColor: '#fff',\n}","/* eslint-disable max-lines */\n\nimport type { Slide } from '@/types/slides'\n\nexport const layouts: Slide[] = [\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: '4cbRxp',\n left: 0,\n top: 200,\n width: 546,\n height: 362.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n opacity: 0.7,\n rotate: 0\n },\n {\n type: 'shape',\n id: 'ookHrf',\n left: 0,\n top: 0,\n width: 300,\n height: 320,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n flipV: true,\n rotate: 0\n },\n {\n type: 'text',\n id: 'AkIh3E',\n left: 355,\n top: 95.11111111111111,\n width: 585,\n height: 116,\n lineHeight: 1.2,\n content: '

输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 6\n },\n {\n type: 'text',\n id: '7stmVP',\n left: 355,\n top: 253.25,\n width: 585,\n height: 56,\n content: '

请在此处输入副标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n },\n {\n type: 'line',\n id: 'FnpZs4',\n left: 361,\n top: 238,\n start: [0, 0],\n end: [549, 0],\n points: ['', ''],\n color: '{{themeColor}}',\n style: 'solid',\n width: 2,\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'ptNnUJ',\n left: 145,\n top: 148,\n width: 711,\n height: 77,\n lineHeight: 1.2,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'mRHvQN',\n left: 207.50000000000003,\n top: 249.84259259259264,\n width: 585,\n height: 56,\n content: '

在此处添加副标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'line',\n id: '7CQDwc',\n left: 323.09259259259267,\n top: 238.33333333333334,\n start: [0, 0],\n end: [354.8148148148148, 0],\n points: ['', ''],\n color: '{{themeColor}}',\n style: 'solid',\n width: 4\n }, \n {\n type: 'shape',\n id: '09wqWw',\n left: -27.648148148148138,\n top: 432.73148148148147,\n width: 1056.2962962962963,\n height: 162.96296296296296,\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'vSheCJ',\n left: 183.5185185185185,\n top: 175.5092592592593,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n }, \n {\n type: 'shape',\n id: 'Mpwv7x',\n left: 211.29629629629628,\n top: 201.80555555555557,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n opacity: 0.7\n }, \n {\n type: 'text',\n id: 'WQOTAp',\n left: 304.9074074074074,\n top: 198.10185185185182,\n width: 417.9629629629629,\n height: 140,\n content: '

感谢观看

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 5\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'MZVO1kkj',\n elements: [\n {\n type: 'shape',\n id: 'cql0h8',\n left: 0,\n top: 0,\n width: 352.59259259259255,\n height: 562.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n },\n {\n type: 'shape',\n id: '_RTaF4',\n left: 171.4814814814814,\n top: 100.13888888888887,\n width: 362.22222222222223,\n height: 362.22222222222223,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: 'rgba(255,255,255,0)',\n fixedRatio: false,\n rotate: 0,\n outline: {\n width: 10,\n color: '{{backgroundColor}}',\n style: 'solid'\n }\n },\n {\n type: 'shape',\n id: 'UZfo8N',\n left: 216.66666666666663,\n top: 145.32407407407408,\n width: 271.85185185185185,\n height: 271.85185185185185,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

01

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n },\n {\n type: 'text',\n id: 'ysqtBg',\n left: 561.4814814814814,\n top: 100.1388888888889,\n width: 359.25925925925924,\n height: 80,\n content: '

在此处输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n },\n {\n type: 'text',\n id: 'lXsoHa',\n left: 572.5925925925925,\n top: 202.3611111111111,\n width: 257.77777777777777,\n height: 260,\n content: '
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n lineHeight: 2,\n fill: '{{subColor}}'\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'EBBnTr',\n left: 360.5996472663139,\n top: 141.8496472663139,\n width: 278.80070546737215,\n height: 278.80070546737215,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 0,\n color: '{{backgroundColor}}',\n style: 'solid'\n }\n }, \n {\n type: 'shape',\n id: 'gDIWDH',\n left: 456.4373897707231,\n top: 98.287037037037,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

1

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'DUWT7E',\n left: 317.037037037037,\n top: 237.68738977072314,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

4

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'pbhn38',\n left: 456.43738977072303,\n top: 377.08774250440916,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

3

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'CvMKrO',\n left: 595.8377425044091,\n top: 237.6873897707231,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

2

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'adudHB',\n left: 402.962962962963,\n top: 39.39814814814815,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: '9UpDwg',\n left: 402.962962962963,\n top: 473.1018518518518,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'GERdpB',\n left: 111.48148148148151,\n top: 256.25,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'G5qoho',\n left: 691.1111111111111,\n top: 256.25,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'shape',\n id: 'vdZcI6',\n left: 415.18518518518516,\n top: 196.4351851851852,\n width: 169.62962962962962,\n height: 169.62962962962962,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'tYUmrx',\n left: 156.66666666666683,\n top: 149.02777777777771,\n width: 264.4444444444445,\n height: 264.4444444444445,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

01

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n },\n {\n type: 'shape',\n id: '0GVHf8',\n left: 342.2222222222223,\n top: 217.17592592592587,\n width: 128.14814814814812,\n height: 128.14814814814812,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0\n },\n {\n type: 'text',\n id: 'BO33Sv',\n left: 378.8888888888889,\n top: 235.24999999999994,\n width: 464.4444444444444,\n height: 92,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'Hj7ttp',\n left: 69.35185185185185,\n top: 49.21759259259262,\n width: 420,\n height: 63,\n lineHeight: 1.2,\n content: '

1.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'FmKMNB',\n left: 69.35185185185185,\n top: 129.28240740740745,\n width: 420,\n height: 384,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'rI7ZeO',\n left: 510.64814814814815,\n top: 49.21759259259262,\n width: 420,\n height: 63,\n lineHeight: 1.2,\n content: '

2.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'KspwGc',\n left: 510.64814814814815,\n top: 129.28240740740745,\n width: 420,\n height: 384,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'Rx63Jo',\n left: 69.35185185185179,\n top: 51.71759259259262,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

1.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'ulyuzE',\n left: 69.35185185185179,\n top: 131.78240740740745,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'kr35Ca',\n left: 510.6481481481481,\n top: 51.71759259259262,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

2.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'BNQSpC',\n left: 510.6481481481481,\n top: 131.78240740740745,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'Vr38Nu',\n left: 69.35185185185185,\n top: 301.71759259259255,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

3.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'IwKRSu',\n left: 69.35185185185185,\n top: 381.7824074074074,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: '0Opr1v',\n left: 510.64814814814815,\n top: 301.71759259259255,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

4.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: '4L9Uzz',\n left: 510.64814814814815,\n top: 381.7824074074074,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'GdEGxg',\n left: 134.53703703703704,\n top: 127.25,\n width: 152.77777777777777,\n height: 308,\n lineHeight: 1.8,\n content: '

请在此处输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 8,\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'y5sAfw',\n left: 332.8703703703704,\n top: 127.25,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容1

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'VeuocM',\n left: 332.8703703703704,\n top: 212.0648148148148,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容2

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'RyFWQe',\n left: 332.8703703703704,\n top: 296.8796296296296,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容3

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'Q56viI',\n left: 332.8703703703704,\n top: 381.69444444444446,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容4

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'SUWirT',\n left: 73.8888888888889,\n top: 64.21296296296302,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

1

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'YjzN1M',\n left: 148.70370370370372,\n top: 64.21296296296302,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'fS09I7',\n left: 527.5925925925926,\n top: 64.21296296296302,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

2

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'qCnfB1',\n left: 602.4074074074074,\n top: 64.21296296296302,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n },\n {\n type: 'shape',\n id: 'difAAT',\n left: 73.8888888888889,\n top: 221.25000000000003,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

3

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'EUlvMo',\n left: 148.70370370370372,\n top: 221.25000000000003,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'US_9jB',\n left: 527.5925925925926,\n top: 221.25000000000003,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

4

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '243MnQ',\n left: 602.4074074074074,\n top: 221.25000000000003,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'Y_KUj0',\n left: 73.8888888888889,\n top: 378.287037037037,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

5

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '9GglMe',\n left: 148.70370370370372,\n top: 378.287037037037,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'eSInje',\n left: 527.5925925925926,\n top: 378.287037037037,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

6

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '0S3yUg',\n left: 602.4074074074074,\n top: 378.287037037037,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n]","import { defineStore } from 'pinia'\nimport tinycolor from 'tinycolor2'\nimport { omit } from 'lodash'\nimport type { Slide, SlideTheme, PPTElement, PPTAnimation } from '@/types/slides'\nimport { slides } from '@/mocks/slides'\nimport { theme } from '@/mocks/theme'\nimport { layouts } from '@/mocks/layout'\n\ninterface RemoveElementPropData {\n id: string\n propName: string | string[]\n}\n\ninterface UpdateElementData {\n id: string | string[]\n props: Partial\n slideId?: string\n}\n\ninterface FormatedAnimation {\n animations: PPTAnimation[]\n autoNext: boolean\n}\n\nexport interface SlidesState {\n title: string\n theme: SlideTheme\n slides: Slide[]\n slideIndex: number\n viewportRatio: number\n}\n\nexport const useSlidesStore = defineStore('slides', {\n state: (): SlidesState => ({\n title: '未命名演示文稿', // 幻灯片标题\n theme: theme, // 主题样式\n slides: slides, // 幻灯片页面数据\n slideIndex: 0, // 当前页面索引\n viewportRatio: 0.5625, // 可视区域比例,默认16:9\n }),\n\n getters: {\n currentSlide(state) {\n return state.slides[state.slideIndex]\n },\n \n currentSlideAnimations(state) {\n const currentSlide = state.slides[state.slideIndex]\n if (!currentSlide?.animations) return []\n\n const els = currentSlide.elements\n const elIds = els.map(el => el.id)\n return currentSlide.animations.filter(animation => elIds.includes(animation.elId))\n },\n\n // 格式化的当前页动画\n // 将触发条件为“与上一动画同时”的项目向上合并到序列中的同一位置\n // 为触发条件为“上一动画之后”项目的上一项添加自动向下执行标记\n formatedAnimations(state) {\n const currentSlide = state.slides[state.slideIndex]\n if (!currentSlide?.animations) return []\n\n const els = currentSlide.elements\n const elIds = els.map(el => el.id)\n const animations = currentSlide.animations.filter(animation => elIds.includes(animation.elId))\n\n const formatedAnimations: FormatedAnimation[] = []\n for (const animation of animations) {\n if (animation.trigger === 'click' || !formatedAnimations.length) {\n formatedAnimations.push({ animations: [animation], autoNext: false })\n }\n else if (animation.trigger === 'meantime') {\n const last = formatedAnimations[formatedAnimations.length - 1]\n last.animations = last.animations.filter(item => item.elId !== animation.elId)\n last.animations.push(animation)\n formatedAnimations[formatedAnimations.length - 1] = last\n }\n else if (animation.trigger === 'auto') {\n const last = formatedAnimations[formatedAnimations.length - 1]\n last.autoNext = true\n formatedAnimations[formatedAnimations.length - 1] = last\n formatedAnimations.push({ animations: [animation], autoNext: false })\n }\n }\n return formatedAnimations\n },\n \n layouts(state) {\n const {\n themeColor,\n fontColor,\n fontName,\n backgroundColor,\n } = state.theme\n \n const subColor = tinycolor(fontColor).isDark() ? 'rgba(230, 230, 230, 0.5)' : 'rgba(180, 180, 180, 0.5)'\n \n const layoutsString = JSON.stringify(layouts)\n .replaceAll('{{themeColor}}', themeColor)\n .replaceAll('{{fontColor}}', fontColor)\n .replaceAll('{{fontName}}', fontName)\n .replaceAll('{{backgroundColor}}', backgroundColor)\n .replaceAll('{{subColor}}', subColor)\n \n return JSON.parse(layoutsString)\n },\n },\n\n actions: {\n setTitle(title: string) {\n if (!title) this.title = '未命名演示文稿'\n else this.title = title\n },\n\n setTheme(themeProps: Partial) {\n this.theme = { ...this.theme, ...themeProps }\n },\n \n setViewportRatio(viewportRatio: number) {\n this.viewportRatio = viewportRatio\n },\n \n setSlides(slides: Slide[]) {\n this.slides = slides\n },\n \n addSlide(slide: Slide | Slide[]) {\n const slides = Array.isArray(slide) ? slide : [slide]\n const addIndex = this.slideIndex + 1\n this.slides.splice(addIndex, 0, ...slides)\n this.slideIndex = addIndex\n },\n \n updateSlide(props: Partial) {\n const slideIndex = this.slideIndex\n this.slides[slideIndex] = { ...this.slides[slideIndex], ...props }\n },\n \n deleteSlide(slideId: string | string[]) {\n const slidesId = Array.isArray(slideId) ? slideId : [slideId]\n \n const deleteSlidesIndex = []\n for (let i = 0; i < slidesId.length; i++) {\n const index = this.slides.findIndex(item => item.id === slidesId[i])\n deleteSlidesIndex.push(index)\n }\n let newIndex = Math.min(...deleteSlidesIndex)\n \n const maxIndex = this.slides.length - slidesId.length - 1\n if (newIndex > maxIndex) newIndex = maxIndex\n \n this.slideIndex = newIndex\n this.slides = this.slides.filter(item => !slidesId.includes(item.id))\n },\n \n updateSlideIndex(index: number) {\n this.slideIndex = index\n },\n \n addElement(element: PPTElement | PPTElement[]) {\n const elements = Array.isArray(element) ? element : [element]\n const currentSlideEls = this.slides[this.slideIndex].elements\n const newEls = [...currentSlideEls, ...elements]\n this.slides[this.slideIndex].elements = newEls\n },\n\n deleteElement(elementId: string | string[]) {\n const elementIdList = Array.isArray(elementId) ? elementId : [elementId]\n const currentSlideEls = this.slides[this.slideIndex].elements\n const newEls = currentSlideEls.filter(item => !elementIdList.includes(item.id))\n this.slides[this.slideIndex].elements = newEls\n },\n \n updateElement(data: UpdateElementData) {\n const { id, props, slideId } = data\n const elIdList = typeof id === 'string' ? [id] : id\n\n const slideIndex = slideId ? this.slides.findIndex(item => item.id === slideId) : this.slideIndex\n const slide = this.slides[slideIndex]\n const elements = slide.elements.map(el => {\n return elIdList.includes(el.id) ? { ...el, ...props } : el\n })\n this.slides[slideIndex].elements = (elements as PPTElement[])\n },\n \n removeElementProps(data: RemoveElementPropData) {\n const { id, propName } = data\n const propsNames = typeof propName === 'string' ? [propName] : propName\n \n const slideIndex = this.slideIndex\n const slide = this.slides[slideIndex]\n const elements = slide.elements.map(el => {\n return el.id === id ? omit(el, propsNames) : el\n })\n this.slides[slideIndex].elements = (elements as PPTElement[])\n },\n },\n})","import { customAlphabet } from 'nanoid'\nimport { defineStore } from 'pinia'\nimport { ToolbarStates } from '@/types/toolbar'\nimport type { CreatingElement, ShapeFormatPainter, TextFormatPainter } from '@/types/edit'\nimport type { DialogForExportTypes } from '@/types/export'\nimport { type TextAttrs, defaultRichTextAttrs } from '@/utils/prosemirror/utils'\nimport { SYS_FONTS } from '@/configs/font'\nimport { isSupportFont } from '@/utils/font'\n\nimport { useSlidesStore } from './slides'\n\nexport interface MainState {\n activeElementIdList: string[]\n handleElementId: string\n activeGroupElementId: string\n hiddenElementIdList: string[]\n canvasPercentage: number\n canvasScale: number\n canvasDragged: boolean\n thumbnailsFocus: boolean\n editorAreaFocus: boolean\n disableHotkeys: boolean\n gridLineSize: number\n showRuler: boolean\n creatingElement: CreatingElement | null\n creatingCustomShape: boolean\n availableFonts: typeof SYS_FONTS\n toolbarState: ToolbarStates\n clipingImageElementId: string\n isScaling: boolean\n richTextAttrs: TextAttrs\n selectedTableCells: string[]\n selectedSlidesIndex: number[]\n dialogForExport: DialogForExportTypes\n databaseId: string\n textFormatPainter: TextFormatPainter | null\n shapeFormatPainter: ShapeFormatPainter | null\n showSelectPanel: boolean\n showSearchPanel: boolean\n}\n\nconst nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')\nexport const databaseId = nanoid(10)\n\nexport const useMainStore = defineStore('main', {\n state: (): MainState => ({\n activeElementIdList: [], // 被选中的元素ID集合,包含 handleElementId\n handleElementId: '', // 正在操作的元素ID\n activeGroupElementId: '', // 组合元素成员中,被选中可独立操作的元素ID\n hiddenElementIdList: [], // 被隐藏的元素ID集合\n canvasPercentage: 90, // 画布可视区域百分比\n canvasScale: 1, // 画布缩放比例(基于宽度1000px)\n canvasDragged: false, // 画布被拖拽移动\n thumbnailsFocus: false, // 左侧导航缩略图区域聚焦\n editorAreaFocus: false, // 编辑区域聚焦\n disableHotkeys: false, // 禁用快捷键\n gridLineSize: 0, // 网格线尺寸(0表示不显示网格线)\n showRuler: false, // 显示标尺\n creatingElement: null, // 正在插入的元素信息,需要通过绘制插入的元素(文字、形状、线条)\n creatingCustomShape: false, // 正在绘制任意多边形\n availableFonts: SYS_FONTS, // 当前环境可用字体\n toolbarState: ToolbarStates.SLIDE_DESIGN, // 右侧工具栏状态\n clipingImageElementId: '', // 当前正在裁剪的图片ID \n richTextAttrs: defaultRichTextAttrs, // 富文本状态\n selectedTableCells: [], // 选中的表格单元格\n isScaling: false, // 正在进行元素缩放\n selectedSlidesIndex: [], // 当前被选中的页面索引集合\n dialogForExport: '', // 导出面板\n databaseId, // 标识当前应用的indexedDB数据库ID\n textFormatPainter: null, // 文字格式刷\n shapeFormatPainter: null, // 形状格式刷\n showSelectPanel: false, // 打开选择面板\n showSearchPanel: false, // 打开查找替换面板\n }),\n\n getters: {\n activeElementList(state) {\n const slidesStore = useSlidesStore()\n const currentSlide = slidesStore.currentSlide\n if (!currentSlide || !currentSlide.elements) return []\n return currentSlide.elements.filter(element => state.activeElementIdList.includes(element.id))\n },\n \n handleElement(state) {\n const slidesStore = useSlidesStore()\n const currentSlide = slidesStore.currentSlide\n if (!currentSlide || !currentSlide.elements) return null\n return currentSlide.elements.find(element => state.handleElementId === element.id) || null\n },\n },\n\n actions: {\n setActiveElementIdList(activeElementIdList: string[]) {\n if (activeElementIdList.length === 1) this.handleElementId = activeElementIdList[0]\n else this.handleElementId = ''\n \n this.activeElementIdList = activeElementIdList\n },\n \n setHandleElementId(handleElementId: string) {\n this.handleElementId = handleElementId\n },\n \n setActiveGroupElementId(activeGroupElementId: string) {\n this.activeGroupElementId = activeGroupElementId\n },\n \n setHiddenElementIdList(hiddenElementIdList: string[]) {\n this.hiddenElementIdList = hiddenElementIdList\n },\n \n setCanvasPercentage(percentage: number) {\n this.canvasPercentage = percentage\n },\n \n setCanvasScale(scale: number) {\n this.canvasScale = scale\n },\n \n setCanvasDragged(isDragged: boolean) {\n this.canvasDragged = isDragged\n },\n \n setThumbnailsFocus(isFocus: boolean) {\n this.thumbnailsFocus = isFocus\n },\n \n setEditorareaFocus(isFocus: boolean) {\n this.editorAreaFocus = isFocus\n },\n \n setDisableHotkeysState(disable: boolean) {\n this.disableHotkeys = disable\n },\n \n setGridLineSize(size: number) {\n this.gridLineSize = size\n },\n \n setRulerState(show: boolean) {\n this.showRuler = show\n },\n \n setCreatingElement(element: CreatingElement | null) {\n this.creatingElement = element\n },\n \n setCreatingCustomShapeState(state: boolean) {\n this.creatingCustomShape = state\n },\n \n setAvailableFonts() {\n this.availableFonts = SYS_FONTS.filter(font => isSupportFont(font.value))\n },\n \n setToolbarState(toolbarState: ToolbarStates) {\n this.toolbarState = toolbarState\n },\n \n setClipingImageElementId(elId: string) {\n this.clipingImageElementId = elId\n },\n \n setRichtextAttrs(attrs: TextAttrs) {\n this.richTextAttrs = attrs\n },\n \n setSelectedTableCells(cells: string[]) {\n this.selectedTableCells = cells\n },\n \n setScalingState(isScaling: boolean) {\n this.isScaling = isScaling\n },\n \n updateSelectedSlidesIndex(selectedSlidesIndex: number[]) {\n this.selectedSlidesIndex = selectedSlidesIndex\n },\n\n setDialogForExport(type: DialogForExportTypes) {\n this.dialogForExport = type\n },\n\n setTextFormatPainter(textFormatPainter: TextFormatPainter | null) {\n this.textFormatPainter = textFormatPainter\n },\n\n setShapeFormatPainter(shapeFormatPainter: ShapeFormatPainter | null) {\n this.shapeFormatPainter = shapeFormatPainter\n },\n\n setSelectPanelState(show: boolean) {\n this.showSelectPanel = show\n },\n\n setSearchPanelState(show: boolean) {\n this.showSearchPanel = show\n },\n },\n})","export const LOCALSTORAGE_KEY_DISCARDED_DB = 'PPTIST_DISCARDED_DB'","import Dexie from 'dexie'\nimport { databaseId } from '@/store/main'\nimport type { Slide } from '@/types/slides'\nimport { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'\n\nexport interface writingBoardImg {\n id: string\n dataURL: string\n}\n\nexport interface Snapshot {\n index: number\n slides: Slide[]\n}\n\nconst databaseNamePrefix = 'PPTist'\n\n// 删除失效/过期的数据库\n// 应用关闭时(关闭或刷新浏览器),会将其数据库ID记录在 localStorage 中,表示该ID指向的数据库已失效\n// 当应用初始化时,检查当前所有数据库,将被记录失效的数据库删除\n// 另外,距离初始化时间超过12小时的数据库也将被删除(这是为了防止出现因意外未被正确删除的库)\nexport const deleteDiscardedDB = async () => {\n const now = new Date().getTime()\n\n const localStorageDiscardedDB = localStorage.getItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n const localStorageDiscardedDBList: string[] = localStorageDiscardedDB ? JSON.parse(localStorageDiscardedDB) : []\n\n const databaseNames = await Dexie.getDatabaseNames()\n const discardedDBNames = databaseNames.filter(name => {\n if (name.indexOf(databaseNamePrefix) === -1) return false\n \n const [prefix, id, time] = name.split('_')\n if (prefix !== databaseNamePrefix || !id || !time) return true\n if (localStorageDiscardedDBList.includes(id)) return true\n if (now - (+time) >= 1000 * 60 * 60 * 12) return true\n\n return false\n })\n\n for (const name of discardedDBNames) Dexie.delete(name)\n localStorage.removeItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n}\n\nclass PPTistDB extends Dexie {\n public snapshots: Dexie.Table\n public writingBoardImgs: Dexie.Table\n\n public constructor() {\n super(`${databaseNamePrefix}_${databaseId}_${new Date().getTime()}`)\n this.version(1).stores({\n snapshots: '++id',\n writingBoardImgs: '++id',\n })\n this.snapshots = this.table('snapshots')\n this.writingBoardImgs = this.table('writingBoardImgs')\n }\n}\n\nexport const db = new PPTistDB()","import { defineStore } from 'pinia'\nimport type { IndexableTypeArray } from 'dexie'\nimport { db, type Snapshot } from '@/utils/database'\n\nimport { useSlidesStore } from './slides'\nimport { useMainStore } from './main'\n\nexport interface ScreenState {\n snapshotCursor: number\n snapshotLength: number\n}\n\nexport const useSnapshotStore = defineStore('snapshot', {\n state: (): ScreenState => ({\n snapshotCursor: -1, // 历史快照指针\n snapshotLength: 0, // 历史快照长度\n }),\n\n getters: {\n canUndo(state) {\n return state.snapshotCursor > 0\n },\n canRedo(state) {\n return state.snapshotCursor < state.snapshotLength - 1\n },\n },\n\n actions: {\n setSnapshotCursor(cursor: number) {\n this.snapshotCursor = cursor\n },\n setSnapshotLength(length: number) {\n this.snapshotLength = length\n },\n\n async initSnapshotDatabase() {\n const slidesStore = useSlidesStore()\n \n const newFirstSnapshot = {\n index: slidesStore.slideIndex,\n slides: slidesStore.slides,\n }\n await db.snapshots.add(newFirstSnapshot)\n this.setSnapshotCursor(0)\n this.setSnapshotLength(1)\n },\n \n async addSnapshot() {\n const slidesStore = useSlidesStore()\n\n // 获取当前indexeddb中全部快照的ID\n const allKeys = await db.snapshots.orderBy('id').keys()\n \n let needDeleteKeys: IndexableTypeArray = []\n \n // 记录需要删除的快照ID\n // 若当前快照指针不处在最后一位,那么再添加快照时,应该将当前指针位置后面的快照全部删除,对应的实际情况是:\n // 用户撤回多次后,再进行操作(添加快照),此时原先被撤销的快照都应该被删除\n if (this.snapshotCursor >= 0 && this.snapshotCursor < allKeys.length - 1) {\n needDeleteKeys = allKeys.slice(this.snapshotCursor + 1)\n }\n \n // 添加新快照\n const snapshot = {\n index: slidesStore.slideIndex,\n slides: slidesStore.slides,\n }\n await db.snapshots.add(snapshot)\n \n // 计算当前快照长度,用于设置快照指针的位置(此时指针应该处在最后一位,即:快照长度 - 1)\n let snapshotLength = allKeys.length - needDeleteKeys.length + 1\n \n // 快照数量超过长度限制时,应该将头部多余的快照删除\n const snapshotLengthLimit = 20\n if (snapshotLength > snapshotLengthLimit) {\n needDeleteKeys.push(allKeys[0])\n snapshotLength--\n }\n \n // 快照数大于1时,需要保证撤回操作后维持页面焦点不变:也就是将倒数第二个快照对应的索引设置为当前页的索引\n // https://github.com/pipipi-pikachu/PPTist/issues/27\n if (snapshotLength >= 2) {\n db.snapshots.update(allKeys[snapshotLength - 2] as number, { index: slidesStore.slideIndex })\n }\n \n await db.snapshots.bulkDelete(needDeleteKeys)\n \n this.setSnapshotCursor(snapshotLength - 1)\n this.setSnapshotLength(snapshotLength)\n },\n \n async unDo() {\n if (this.snapshotCursor <= 0) return\n\n const slidesStore = useSlidesStore()\n const mainStore = useMainStore()\n \n const snapshotCursor = this.snapshotCursor - 1\n const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray()\n const snapshot = snapshots[snapshotCursor]\n const { index, slides } = snapshot\n \n const slideIndex = index > slides.length - 1 ? slides.length - 1 : index\n \n slidesStore.setSlides(slides)\n slidesStore.updateSlideIndex(slideIndex)\n this.setSnapshotCursor(snapshotCursor)\n mainStore.setActiveElementIdList([])\n },\n \n async reDo() {\n if (this.snapshotCursor >= this.snapshotLength - 1) return\n\n const slidesStore = useSlidesStore()\n const mainStore = useMainStore()\n \n const snapshotCursor = this.snapshotCursor + 1\n const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray()\n const snapshot = snapshots[snapshotCursor]\n const { index, slides } = snapshot\n \n const slideIndex = index > slides.length - 1 ? slides.length - 1 : index\n \n slidesStore.setSlides(slides)\n slidesStore.updateSlideIndex(slideIndex)\n this.setSnapshotCursor(snapshotCursor)\n mainStore.setActiveElementIdList([])\n },\n },\n})","import { defineStore } from 'pinia'\n\nexport interface KeyboardState {\n ctrlKeyState: boolean\n shiftKeyState: boolean\n spaceKeyState: boolean\n}\n\nexport const useKeyboardStore = defineStore('keyboard', {\n state: (): KeyboardState => ({\n ctrlKeyState: false, // ctrl键按下状态\n shiftKeyState: false, // shift键按下状态\n spaceKeyState: false, // space键按下状态\n }),\n\n getters: {\n ctrlOrShiftKeyActive(state) {\n return state.ctrlKeyState || state.shiftKeyState\n },\n },\n\n actions: {\n setCtrlKeyState(active: boolean) {\n this.ctrlKeyState = active\n },\n setShiftKeyState(active: boolean) {\n this.shiftKeyState = active\n },\n setSpaceKeyState(active: boolean) {\n this.spaceKeyState = active\n },\n },\n})","import { defineStore } from 'pinia'\n\nexport interface ScreenState {\n screening: boolean\n}\n\nexport const useScreenStore = defineStore('screen', {\n state: (): ScreenState => ({\n screening: false, // 是否进入放映状态\n }),\n\n actions: {\n setScreening(screening: boolean) {\n this.screening = screening\n },\n },\n})","import { padStart } from 'lodash'\n\n/**\n * 补足数字位数\n * @param digit 数字\n * @param len 位数\n */\nexport const fillDigit = (digit: number, len: number) => {\n return padStart('' + digit, len, '0')\n}\n\n/**\n * 判断设备\n */\nexport const isPC = () => {\n return !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i)\n}","import type { ShapePoolItem } from '@/configs/shapes'\r\nimport type { LinePoolItem } from '@/configs/lines'\r\nimport type { ImageClipDataRange, PPTElementOutline, PPTElementShadow, ShapeGradient } from './slides'\r\n\r\nexport enum ElementOrderCommands {\r\n UP = 'up',\r\n DOWN = 'down',\r\n TOP = 'top',\r\n BOTTOM = 'bottom',\r\n}\r\n\r\nexport enum ElementAlignCommands {\r\n TOP = 'top',\r\n BOTTOM = 'bottom',\r\n LEFT = 'left',\r\n RIGHT = 'right',\r\n VERTICAL = 'vertical',\r\n HORIZONTAL = 'horizontal',\r\n CENTER = 'center',\r\n}\r\n\r\nexport const enum OperateBorderLines {\r\n T = 'top',\r\n B = 'bottom',\r\n L = 'left',\r\n R = 'right',\r\n}\r\n\r\nexport const enum OperateResizeHandlers {\r\n LEFT_TOP = 'left-top',\r\n TOP = 'top',\r\n RIGHT_TOP = 'right-top',\r\n LEFT = 'left',\r\n RIGHT = 'right',\r\n LEFT_BOTTOM = 'left-bottom',\r\n BOTTOM = 'bottom',\r\n RIGHT_BOTTOM = 'right-bottom',\r\n}\r\n\r\nexport const enum OperateLineHandlers {\r\n START = 'start',\r\n END = 'end',\r\n C = 'ctrl',\r\n C1 = 'ctrl1',\r\n C2 = 'ctrl2',\r\n}\r\n\r\nexport interface AlignmentLineAxis {\r\n x: number\r\n y: number\r\n}\r\n\r\nexport interface AlignmentLineProps {\r\n type: 'vertical' | 'horizontal'\r\n axis: AlignmentLineAxis\r\n length: number\r\n}\r\n\r\nexport interface MultiSelectRange {\r\n minX: number\r\n maxX: number\r\n minY: number\r\n maxY: number\r\n}\r\n\r\nexport interface ImageClipedEmitData {\r\n range: ImageClipDataRange\r\n position: {\r\n left: number\r\n top: number\r\n width: number\r\n height: number\r\n }\r\n}\r\n\r\nexport interface CreateElementSelectionData {\r\n start: [number, number]\r\n end: [number, number]\r\n}\r\n\r\nexport interface CreateCustomShapeData {\r\n start: [number, number]\r\n end: [number, number]\r\n path: string\r\n viewBox: [number, number]\r\n}\r\n\r\nexport interface CreatingTextElement {\r\n type: 'text'\r\n vertical?: boolean\r\n}\r\nexport interface CreatingShapeElement {\r\n type: 'shape'\r\n data: ShapePoolItem\r\n}\r\nexport interface CreatingLineElement {\r\n type: 'line'\r\n data: LinePoolItem\r\n}\r\nexport type CreatingElement = CreatingTextElement | CreatingShapeElement | CreatingLineElement\r\n\r\nexport type TextFormatPainterKeys = 'bold' | 'em' | 'underline' | 'strikethrough' | 'color' | 'backcolor' | 'fontsize' | 'fontname' | 'align'\r\n\r\nexport interface TextFormatPainter {\r\n keep: boolean\r\n bold?: boolean\r\n em?: boolean\r\n underline?: boolean\r\n strikethrough?: boolean\r\n color?: string\r\n backcolor?: string\r\n fontsize?: string\r\n fontname?: string\r\n align?: 'left' | 'right' | 'center'\r\n}\r\n\r\nexport interface ShapeFormatPainter {\r\n keep: boolean\r\n fill?: string\r\n gradient?: ShapeGradient\r\n outline?: PPTElementOutline\r\n opacity?: number\r\n shadow?: PPTElementShadow\r\n}","export const enum KEYS {\n C = 'C',\n X = 'X',\n Z = 'Z',\n Y = 'Y',\n A = 'A',\n G = 'G',\n L = 'L',\n F = 'F',\n D = 'D',\n B = 'B',\n P = 'P',\n MINUS = '-',\n EQUAL = '=',\n DIGIT_0 = '0',\n DELETE = 'DELETE',\n UP = 'ARROWUP',\n DOWN = 'ARROWDOWN',\n LEFT = 'ARROWLEFT',\n RIGHT = 'ARROWRIGHT',\n ENTER = 'ENTER',\n SPACE = ' ',\n TAB = 'TAB',\n BACKSPACE = 'BACKSPACE',\n ESC = 'ESCAPE',\n PAGEUP = 'PAGEUP',\n PAGEDOWN = 'PAGEDOWN',\n F5 = 'F5',\n}\n\nexport const HOTKEY_DOC = [\n {\n type: '通用',\n children: [\n { label: '剪切', value: 'Ctrl + X' },\n { label: '复制', value: 'Ctrl + C' },\n { label: '粘贴', value: 'Ctrl + V' },\n { label: '粘贴为纯文本', value: 'Ctrl + Shift + V' },\n { label: '快速复制粘贴', value: 'Ctrl + D' },\n { label: '全选', value: 'Ctrl + A' },\n { label: '撤销', value: 'Ctrl + Z' },\n { label: '恢复', value: 'Ctrl + Y' },\n { label: '删除', value: 'Delete / Backspace' },\n { label: '多选', value: '按住 Ctrl 或 Shift' },\n { label: '打开搜索替换', value: 'Ctrl + F' },\n { label: '打印', value: 'Ctrl + P' },\n { label: '关闭弹窗', value: 'ESC' },\n ],\n },\n {\n type: '幻灯片放映',\n children: [\n { label: '从头开始放映幻灯片', value: 'F5' },\n { label: '从当前开始放映幻灯片', value: 'Shift + F5' },\n { label: '切换上一页', value: '↑ / ← / PgUp' },\n { label: '切换下一页', value: '↓ / → / PgDown' },\n { label: '切换下一页', value: 'Enter / Space' },\n { label: '退出放映', value: 'ESC' },\n ],\n },\n {\n type: '幻灯片编辑',\n children: [\n { label: '新建幻灯片', value: 'Enter' },\n { label: '移动画布', value: 'Space + 鼠标拖拽' },\n { label: '缩放画布', value: 'Ctrl + 鼠标滚轮' },\n { label: '放大画布', value: 'Ctrl + =' },\n { label: '缩小画布', value: 'Ctrl + -' },\n { label: '使画布适应当前屏幕', value: 'Ctrl + 0' },\n { label: '上一页(未选中元素)', value: '↑ / ←' },\n { label: '下一页(未选中元素)', value: '↓ / →' },\n { label: '上一页', value: '鼠标上滚 / PgUp' },\n { label: '下一页', value: '鼠标下滚 / PgDown' },\n ],\n },\n {\n type: '元素操作',\n children: [\n { label: '移动', value: '↑ / ← / ↓ / →' },\n { label: '锁定', value: 'Ctrl + L' },\n { label: '组合', value: 'Ctrl + G' },\n { label: '取消组合', value: 'Ctrl + Shift + G' },\n { label: '置顶层', value: 'Alt + F' },\n { label: '置底层', value: 'Alt + B' },\n { label: '锁定宽高比例', value: '按住 Ctrl 或 Shift' },\n { label: '创建水平 / 垂直线条', value: '按住 Ctrl 或 Shift' },\n { label: '切换焦点元素', value: 'Tab' },\n { label: '确认图片裁剪', value: 'Enter' },\n ],\n },\n {\n type: '表格编辑',\n children: [\n { label: '聚焦到下一个单元格', value: 'Tab' },\n { label: '在上方插入一行', value: 'Ctrl + ↑' },\n { label: '在下方插入一行', value: 'Ctrl + ↓' },\n { label: '在左侧插入一列', value: 'Ctrl + ←' },\n { label: '在右侧插入一列', value: 'Ctrl + →' },\n ],\n },\n {\n type: '图表数据编辑',\n children: [\n { label: '聚焦到下一行', value: 'Enter' },\n ],\n },\n {\n type: '文本编辑',\n children: [\n { label: '加粗', value: 'Ctrl + B' },\n { label: '斜体', value: 'Ctrl + I' },\n { label: '下划线', value: 'Ctrl + U' },\n { label: '行内代码', value: 'Ctrl + E' },\n { label: '上角标', value: 'Ctrl + ;' },\n { label: '下角标', value: `Ctrl + '` },\n { label: '选中段落', value: `ESC` },\n ],\n },\n]","import CryptoJS from 'crypto-js'\n\nconst CRYPTO_KEY = 'pptist'\n\n/**\n * 加密\n * @param msg 待加密字符串\n */\nexport const encrypt = (msg: string) => {\n return CryptoJS.AES.encrypt(msg, CRYPTO_KEY).toString()\n}\n\n/**\n * 解密\n * @param ciphertext 待解密字符串\n */\nexport const decrypt = (ciphertext: string) => {\n const bytes = CryptoJS.AES.decrypt(ciphertext, CRYPTO_KEY)\n return bytes.toString(CryptoJS.enc.Utf8)\n}","import Clipboard from 'clipboard'\nimport { decrypt } from '@/utils/crypto'\n\n/**\n * 复制文本到剪贴板\n * @param text 文本内容\n */\nexport const copyText = (text: string) => {\n return new Promise((resolve, reject) => {\n const fakeElement = document.createElement('button')\n const clipboard = new Clipboard(fakeElement, {\n text: () => text,\n action: () => 'copy',\n container: document.body,\n })\n clipboard.on('success', e => {\n clipboard.destroy()\n resolve(e)\n })\n clipboard.on('error', e => {\n clipboard.destroy()\n reject(e)\n })\n document.body.appendChild(fakeElement)\n fakeElement.click()\n document.body.removeChild(fakeElement)\n })\n}\n\n// 读取剪贴板\nexport const readClipboard = (): Promise => {\n return new Promise((resolve, reject) => {\n if (navigator.clipboard?.readText) {\n navigator.clipboard.readText().then(text => {\n if (!text) reject('剪贴板为空或者不包含文本')\n return resolve(text)\n })\n }\n else reject('浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V')\n })\n}\n\n// 解析加密后的剪贴板内容\nexport const pasteCustomClipboardString = (text: string) => {\n let clipboardData\n try {\n clipboardData = JSON.parse(decrypt(text))\n }\n catch {\n clipboardData = text\n }\n\n return clipboardData\n}\n\n// 尝试解析剪贴板内容是否为Excel表格(或类似的)数据格式\nexport const pasteExcelClipboardString = (text: string): string[][] | null => {\n const lines: string[] = text.split('\\r\\n')\n\n if (lines[lines.length - 1] === '') lines.pop()\n\n let colCount = -1\n const data: string[][] = []\n for (const index in lines) {\n data[index] = lines[index].split('\\t')\n\n if (data[index].length === 1) return null\n if (colCount === -1) colCount = data[index].length\n else if (colCount !== data[index].length) return null\n }\n return data\n}","import tinycolor from 'tinycolor2'\r\nimport { nanoid } from 'nanoid'\r\nimport type { PPTElement, PPTLineElement, Slide } from '@/types/slides'\r\n\r\ninterface RotatedElementData {\r\n left: number\r\n top: number\r\n width: number\r\n height: number\r\n rotate: number\r\n}\r\n\r\ninterface IdMap {\r\n [id: string]: string\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的矩形范围旋转后的新位置范围\r\n * @param element 元素的位置大小和旋转角度信息\r\n */\r\nexport const getRectRotatedRange = (element: RotatedElementData) => {\r\n const { left, top, width, height, rotate = 0 } = element\r\n\r\n const radius = Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ) / 2\r\n const auxiliaryAngle = Math.atan(height / width) * 180 / Math.PI\r\n\r\n const tlbraRadian = (180 - rotate - auxiliaryAngle) * Math.PI / 180\r\n const trblaRadian = (auxiliaryAngle - rotate) * Math.PI / 180\r\n\r\n const middleLeft = left + width / 2\r\n const middleTop = top + height / 2\r\n\r\n const xAxis = [\r\n middleLeft + radius * Math.cos(tlbraRadian),\r\n middleLeft + radius * Math.cos(trblaRadian),\r\n middleLeft - radius * Math.cos(tlbraRadian),\r\n middleLeft - radius * Math.cos(trblaRadian),\r\n ]\r\n const yAxis = [\r\n middleTop - radius * Math.sin(tlbraRadian),\r\n middleTop - radius * Math.sin(trblaRadian),\r\n middleTop + radius * Math.sin(tlbraRadian),\r\n middleTop + radius * Math.sin(trblaRadian),\r\n ]\r\n\r\n return {\r\n xRange: [Math.min(...xAxis), Math.max(...xAxis)],\r\n yRange: [Math.min(...yAxis), Math.max(...yAxis)],\r\n }\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的矩形范围旋转后的新位置与旋转之前位置的偏离距离\r\n * @param element 元素的位置大小和旋转角度信息\r\n */\r\nexport const getRectRotatedOffset = (element: RotatedElementData) => {\r\n const { xRange: originXRange, yRange: originYRange } = getRectRotatedRange({\r\n left: element.left,\r\n top: element.top,\r\n width: element.width,\r\n height: element.height,\r\n rotate: 0,\r\n })\r\n const { xRange: rotatedXRange, yRange: rotatedYRange } = getRectRotatedRange({\r\n left: element.left,\r\n top: element.top,\r\n width: element.width,\r\n height: element.height,\r\n rotate: element.rotate,\r\n })\r\n return {\r\n offsetX: rotatedXRange[0] - originXRange[0],\r\n offsetY: rotatedYRange[0] - originYRange[0],\r\n }\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的位置范围\r\n * @param element 元素信息\r\n */\r\nexport const getElementRange = (element: PPTElement) => {\r\n let minX, maxX, minY, maxY\r\n\r\n if (element.type === 'line') {\r\n minX = element.left\r\n maxX = element.left + Math.max(element.start[0], element.end[0])\r\n minY = element.top\r\n maxY = element.top + Math.max(element.start[1], element.end[1])\r\n }\r\n else if ('rotate' in element && element.rotate) {\r\n const { left, top, width, height, rotate } = element\r\n const { xRange, yRange } = getRectRotatedRange({ left, top, width, height, rotate })\r\n minX = xRange[0]\r\n maxX = xRange[1]\r\n minY = yRange[0]\r\n maxY = yRange[1]\r\n }\r\n else {\r\n minX = element.left\r\n maxX = element.left + element.width\r\n minY = element.top\r\n maxY = element.top + element.height\r\n }\r\n return { minX, maxX, minY, maxY }\r\n}\r\n\r\n/**\r\n * 计算一组元素在画布中的位置范围\r\n * @param elementList 一组元素信息\r\n */\r\nexport const getElementListRange = (elementList: PPTElement[]) => {\r\n const leftValues: number[] = []\r\n const topValues: number[] = []\r\n const rightValues: number[] = []\r\n const bottomValues: number[] = []\r\n\r\n elementList.forEach(element => {\r\n const { minX, maxX, minY, maxY } = getElementRange(element)\r\n leftValues.push(minX)\r\n topValues.push(minY)\r\n rightValues.push(maxX)\r\n bottomValues.push(maxY)\r\n })\r\n\r\n const minX = Math.min(...leftValues)\r\n const maxX = Math.max(...rightValues)\r\n const minY = Math.min(...topValues)\r\n const maxY = Math.max(...bottomValues)\r\n\r\n return { minX, maxX, minY, maxY }\r\n}\r\n\r\nexport interface AlignLine {\r\n value: number\r\n range: [number, number]\r\n}\r\n\r\n/**\r\n * 将一组对齐吸附线进行去重:同位置的的多条对齐吸附线仅留下一条,取该位置所有对齐吸附线的最大值和最小值为新的范围\r\n * @param lines 一组对齐吸附线信息\r\n */\r\nexport const uniqAlignLines = (lines: AlignLine[]) => {\r\n const uniqLines: AlignLine[] = []\r\n lines.forEach(line => {\r\n const index = uniqLines.findIndex(_line => _line.value === line.value)\r\n if (index === -1) uniqLines.push(line)\r\n else {\r\n const uniqLine = uniqLines[index]\r\n const rangeMin = Math.min(uniqLine.range[0], line.range[0])\r\n const rangeMax = Math.max(uniqLine.range[1], line.range[1])\r\n const range: [number, number] = [rangeMin, rangeMax]\r\n const _line = { value: line.value, range }\r\n uniqLines[index] = _line\r\n }\r\n })\r\n return uniqLines\r\n}\r\n\r\n/**\r\n * 以页面列表为基础,为每一个页面生成新的ID,并关联到旧ID形成一个字典\r\n * 主要用于页面元素时,维持数据中各处页面ID原有的关系\r\n * @param slides 页面列表\r\n */\r\nexport const createSlideIdMap = (slides: Slide[]) => {\r\n const slideIdMap: IdMap = {}\r\n for (const slide of slides) {\r\n slideIdMap[slide.id] = nanoid(10)\r\n }\r\n return slideIdMap\r\n}\r\n\r\n/**\r\n * 以元素列表为基础,为每一个元素生成新的ID,并关联到旧ID形成一个字典\r\n * 主要用于复制元素时,维持数据中各处元素ID原有的关系\r\n * 例如:原本两个组合的元素拥有相同的groupId,复制后依然会拥有另一个相同的groupId\r\n * @param elements 元素列表数据\r\n */\r\nexport const createElementIdMap = (elements: PPTElement[]) => {\r\n const groupIdMap: IdMap = {}\r\n const elIdMap: IdMap = {}\r\n for (const element of elements) {\r\n const groupId = element.groupId\r\n if (groupId && !groupIdMap[groupId]) {\r\n groupIdMap[groupId] = nanoid(10)\r\n }\r\n elIdMap[element.id] = nanoid(10)\r\n }\r\n return {\r\n groupIdMap,\r\n elIdMap,\r\n }\r\n}\r\n\r\n/**\r\n * 根据表格的主题色,获取对应用于配色的子颜色\r\n * @param themeColor 主题色\r\n */\r\nexport const getTableSubThemeColor = (themeColor: string) => {\r\n const rgba = tinycolor(themeColor)\r\n return [\r\n rgba.setAlpha(0.3).toRgbString(),\r\n rgba.setAlpha(0.1).toRgbString(),\r\n ]\r\n}\r\n\r\n/**\r\n * 获取线条元素路径字符串\r\n * @param element 线条元素\r\n */\r\nexport const getLineElementPath = (element: PPTLineElement) => {\r\n const start = element.start.join(',')\r\n const end = element.end.join(',')\r\n if (element.broken) {\r\n const mid = element.broken.join(',')\r\n return `M${start} L${mid} L${end}`\r\n }\r\n else if (element.curve) {\r\n const mid = element.curve.join(',')\r\n return `M${start} Q${mid} ${end}`\r\n }\r\n else if (element.cubic) {\r\n const [c1, c2] = element.cubic\r\n const p1 = c1.join(',')\r\n const p2 = c2.join(',')\r\n return `M${start} C${p1} ${p2} ${end}`\r\n }\r\n return `M${start} L${end}`\r\n}","// https://iconpark.bytedance.com/official\n\nimport type { App } from 'vue'\nimport {\n PlayOne,\n FullScreenPlay,\n Lock,\n Unlock,\n Ppt,\n Format,\n Picture,\n FullScreen,\n List,\n OrderedList,\n FlipVertically,\n FlipHorizontally,\n FontSize,\n Code,\n TextBold,\n TextItalic,\n TextUnderline,\n Strikethrough,\n Edit,\n Quote,\n BackgroundColor,\n Group,\n Ungroup,\n Back,\n Next,\n Fullwidth,\n AlignTop,\n AlignLeft,\n AlignRight,\n AlignBottom,\n AlignVertically,\n AlignHorizontally,\n BringToFront,\n SendToBack,\n AlignTextLeft,\n AlignTextRight,\n AlignTextCenter,\n AlignTextBoth,\n RowHeight,\n Write,\n InsertTable,\n AddText,\n Fill,\n Tailoring,\n Effects,\n ColorFilter,\n Up,\n Down,\n Plus,\n Minus,\n Connection,\n BringToFrontOne,\n SentToBack,\n Github,\n ChartProportion,\n ChartHistogram,\n ChartHistogramOne,\n ChartLineArea,\n ChartRing,\n ChartScatter,\n ChartLine,\n ChartPie,\n Text,\n Rotate,\n LeftTwo,\n RightTwo,\n Platte,\n Close,\n CloseSmall,\n Undo,\n Transform,\n Click,\n Theme,\n ArrowCircleLeft,\n GraphicDesign,\n Logout,\n Erase,\n Clear,\n AlignTextTopOne,\n AlignTextBottomOne,\n AlignTextMiddleOne,\n Pause,\n VolumeMute,\n VolumeNotice,\n VolumeSmall,\n VideoTwo,\n Formula,\n LinkOne,\n FullScreenOne,\n OffScreenOne,\n Power,\n ListView,\n Magic,\n HighLight,\n Download,\n IndentLeft,\n IndentRight,\n VerticalSpacingBetweenItems,\n Copy,\n Delete,\n Square,\n Round,\n Needle,\n TextRotationNone,\n TextRotationDown,\n FormatBrush,\n PreviewOpen,\n PreviewClose,\n StopwatchStart,\n Search,\n Left,\n Right,\n MoveOne,\n HamburgerButton,\n Attention,\n CheckOne,\n CloseOne,\n Info,\n} from '@icon-park/vue-next'\n\nexport interface Icons {\n [key: string]: typeof PlayOne\n}\n\nexport const icons: Icons = {\n IconPlayOne: PlayOne,\n IconFullScreenPlay: FullScreenPlay,\n IconLock: Lock,\n IconUnlock: Unlock,\n IconPpt: Ppt,\n IconFormat: Format,\n IconPicture: Picture,\n IconFullScreen: FullScreen,\n IconList: List,\n IconOrderedList: OrderedList,\n IconFlipVertically: FlipVertically,\n IconFlipHorizontally: FlipHorizontally,\n IconFontSize: FontSize,\n IconCode: Code,\n IconTextBold: TextBold,\n IconTextItalic: TextItalic,\n IconTextUnderline: TextUnderline,\n IconStrikethrough: Strikethrough,\n IconEdit: Edit,\n IconQuote: Quote,\n IconBackgroundColor: BackgroundColor,\n IconGroup: Group,\n IconUngroup: Ungroup,\n IconBack: Back,\n IconNext: Next,\n IconFullwidth: Fullwidth,\n IconAlignTop: AlignTop,\n IconAlignLeft: AlignLeft,\n IconAlignRight: AlignRight,\n IconAlignBottom: AlignBottom,\n IconAlignVertically: AlignVertically,\n IconAlignHorizontally: AlignHorizontally,\n IconBringToFront: BringToFront,\n IconSendToBack: SendToBack,\n IconAlignTextLeft: AlignTextLeft,\n IconAlignTextRight: AlignTextRight,\n IconAlignTextCenter: AlignTextCenter,\n IconAlignTextBoth: AlignTextBoth,\n IconRowHeight: RowHeight,\n IconWrite: Write,\n IconInsertTable: InsertTable,\n IconAddText: AddText,\n IconFill: Fill,\n IconTailoring: Tailoring,\n IconEffects: Effects,\n IconColorFilter: ColorFilter,\n IconUp: Up,\n IconDown: Down,\n IconPlus: Plus,\n IconMinus: Minus,\n IconConnection: Connection,\n IconBringToFrontOne: BringToFrontOne,\n IconSentToBack: SentToBack,\n IconGithub: Github,\n IconChartProportion: ChartProportion,\n IconChartHistogram: ChartHistogram,\n IconChartHistogramOne: ChartHistogramOne,\n IconChartLineArea: ChartLineArea,\n IconChartRing: ChartRing,\n IconChartScatter: ChartScatter,\n IconChartLine: ChartLine,\n IconChartPie: ChartPie,\n IconText: Text,\n IconRotate: Rotate,\n IconLeftTwo: LeftTwo,\n IconRightTwo: RightTwo,\n IconPlatte: Platte,\n IconClose: Close,\n IconCloseSmall: CloseSmall,\n IconUndo: Undo,\n IconTransform: Transform,\n IconClick: Click,\n IconTheme: Theme,\n IconArrowCircleLeft: ArrowCircleLeft,\n IconGraphicDesign: GraphicDesign,\n IconLogout: Logout,\n IconErase: Erase,\n IconClear: Clear,\n IconAlignTextTopOne: AlignTextTopOne,\n IconAlignTextBottomOne: AlignTextBottomOne,\n IconAlignTextMiddleOne: AlignTextMiddleOne,\n IconPause: Pause,\n IconVolumeMute: VolumeMute,\n IconVolumeNotice: VolumeNotice,\n IconVolumeSmall: VolumeSmall,\n IconVideoTwo: VideoTwo,\n IconFormula: Formula,\n IconLinkOne: LinkOne,\n IconFullScreenOne: FullScreenOne,\n IconOffScreenOne: OffScreenOne,\n IconPower: Power,\n IconListView: ListView,\n IconMagic: Magic,\n IconHighLight: HighLight,\n IconDownload: Download,\n IconIndentLeft: IndentLeft,\n IconIndentRight: IndentRight,\n IconVerticalSpacingBetweenItems: VerticalSpacingBetweenItems,\n IconCopy: Copy,\n IconDelete: Delete,\n IconSquare: Square,\n IconRound: Round,\n IconNeedle: Needle,\n IconTextRotationNone: TextRotationNone,\n IconTextRotationDown: TextRotationDown,\n IconFormatBrush: FormatBrush,\n IconPreviewOpen: PreviewOpen,\n IconPreviewClose: PreviewClose,\n IconStopwatchStart: StopwatchStart,\n IconSearch: Search,\n IconLeft: Left,\n IconRight: Right,\n IconMoveOne: MoveOne,\n IconHamburgerButton: HamburgerButton,\n IconAttention: Attention,\n IconCheckOne: CheckOne,\n IconCloseOne: CloseOne,\n IconInfo: Info,\n}\n\nexport default {\n install(app: App) {\n for (const key of Object.keys(icons)) {\n app.component(key, icons[key])\n }\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Transition as _Transition, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2231702e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = { class: \"icons\" }\nconst _hoisted_3 = { class: \"content\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"title\"\n}\nconst _hoisted_5 = { class: \"description\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"control\"\n}\n\nimport { onMounted, ref, onBeforeMount } from 'vue'\nimport { icons } from '@/plugins/icon'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Message',\n props: {\n id: {},\n message: {},\n type: { default: 'success' },\n title: { default: '' },\n duration: { default: 3000 },\n closable: { type: Boolean, default: false }\n },\n emits: [\"close\", \"destroy\"],\n setup(__props: any, { expose: __expose, emit }) {\n\nconst props = __props;\n\nconst {\n IconAttention,\n IconCheckOne,\n IconCloseOne,\n IconInfo,\n IconCloseSmall,\n} = icons\n\n\n\n\n\nconst visible = ref(true)\nconst timer = ref(null)\n\nconst startTimer = () => {\n if (props.duration <= 0) return\n timer.value = setTimeout(close, props.duration)\n}\nconst clearTimer = () => {\n if (timer.value) clearTimeout(timer.value)\n}\n\nconst close = () => visible.value = false\n\nonBeforeMount(() => {\n clearTimer()\n})\nonMounted(() => {\n startTimer()\n})\n\n__expose({\n close,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Transition, {\n name: \"message-fade\",\n appear: \"\",\n mode: \"in-out\",\n onBeforeLeave: _cache[3] || (_cache[3] = ($event: any) => (emit('close'))),\n onAfterLeave: _cache[4] || (_cache[4] = ($event: any) => (emit('destroy')))\n }, {\n default: _withCtx(() => [\n (visible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"message\",\n id: _ctx.id\n }, [\n _createElementVNode(\"div\", {\n class: \"message-container\",\n onMouseenter: _cache[1] || (_cache[1] = ($event: any) => (clearTimer())),\n onMouseleave: _cache[2] || (_cache[2] = ($event: any) => (startTimer()))\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.type === 'warning')\n ? (_openBlock(), _createBlock(_unref(IconAttention), {\n key: 0,\n theme: \"filled\",\n size: \"18\",\n fill: \"#faad14\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'success')\n ? (_openBlock(), _createBlock(_unref(IconCheckOne), {\n key: 1,\n theme: \"filled\",\n size: \"18\",\n fill: \"#52c41a\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'error')\n ? (_openBlock(), _createBlock(_unref(IconCloseOne), {\n key: 2,\n theme: \"filled\",\n size: \"18\",\n fill: \"#ff4d4f\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'info')\n ? (_openBlock(), _createBlock(_unref(IconInfo), {\n key: 3,\n theme: \"filled\",\n size: \"18\",\n fill: \"#1677ff\"\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, _toDisplayString(_ctx.title), 1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(_ctx.message), 1)\n ]),\n (_ctx.closable)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createElementVNode(\"span\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (close()))\n }, [\n _createVNode(_unref(IconCloseSmall))\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ], 32)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }))\n}\n}\n\n})","\n\n\n\n","import script from \"./Message.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Message.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Message.vue?vue&type=style&index=0&id=2231702e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2231702e\"]])\n\nexport default __exports__","import { createVNode, render, type AppContext } from 'vue'\nimport MessageComponent from '@/components/Message.vue'\n\nexport interface MessageOptions {\n type?: 'info' | 'success' | 'warning' | 'error'\n title?: string\n message?: string\n duration?: number\n closable?: boolean\n ctx?: AppContext\n onClose?: () => void\n}\n\nexport type MessageTypeOptions = Omit\nexport interface MessageIntance {\n id: string\n close: () => void\n}\n\nexport type MessageFn = (message: string, options?: MessageTypeOptions) => MessageIntance\nexport interface Message {\n (options: MessageOptions): MessageIntance\n info: MessageFn\n success: MessageFn\n error: MessageFn\n warning: MessageFn\n closeAll: () => void\n _context?: AppContext | null\n}\n\nconst instances: MessageIntance[] = []\nlet wrap: HTMLDivElement | null = null\nlet seed = 0\nconst defaultOptions: MessageOptions = {\n duration: 3000,\n}\n\nconst message: Message = (options: MessageOptions) => {\n const id = 'message-' + seed++\n const props = {\n ...defaultOptions,\n ...options,\n id,\n }\n\n if (!wrap) {\n wrap = document.createElement('div')\n wrap.className = 'message-wrap'\n wrap.style.cssText = `\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n `\n document.body.appendChild(wrap)\n }\n\n const vm = createVNode(MessageComponent, props, null)\n const div = document.createElement('div')\n\n vm.appContext = options.ctx || message._context || null\n vm.props!.onClose = options.onClose\n vm.props!.onDestroy = () => {\n if (wrap && wrap.childNodes.length <= 1) {\n wrap.remove()\n wrap = null\n }\n render(null, div)\n }\n\n render(vm, div)\n wrap.appendChild(div.firstElementChild!)\n\n const instance = {\n id,\n close: () => vm?.component?.exposed?.close(),\n }\n\n instances.push(instance)\n return instance\n}\n\nmessage.success = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'success', message: msg })\nmessage.info = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'info', message: msg })\nmessage.warning = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'warning', message: msg })\nmessage.error = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'error', message: msg })\n\nmessage.closeAll = function() {\n for (let i = instances.length - 1; i >= 0; i--) {\n instances[i].close()\n }\n}\n\nexport default message","/**\r\n * 将普通文本转为带段落信息的HTML字符串\r\n * @param text 文本\r\n */\r\nexport const parseText2Paragraphs = (text: string) => {\r\n const htmlText = text.replace(/[\\n\\r]+/g, '
')\r\n const paragraphs = htmlText.split('
')\r\n let string = ''\r\n for (const paragraph of paragraphs) {\r\n if (paragraph) string += `
${paragraph}
`\r\n }\r\n return string\r\n}","interface ImageSize {\n width: number\n height: number\n}\n\n/**\n * 获取图片的原始宽高\n * @param src 图片地址\n */\nexport const getImageSize = (src: string): Promise => {\n return new Promise(resolve => {\n const img = document.createElement('img')\n img.src = src\n img.style.opacity = '0'\n document.body.appendChild(img)\n\n img.onload = () => {\n const imgWidth = img.clientWidth\n const imgHeight = img.clientHeight\n \n img.onload = null\n img.onerror = null\n\n document.body.removeChild(img)\n\n resolve({ width: imgWidth, height: imgHeight })\n }\n\n img.onerror = () => {\n img.onload = null\n img.onerror = null\n }\n })\n}\n\n/**\n * 读取图片文件的dataURL\n * @param file 图片文件\n */\nexport const getImageDataURL = (file: File): Promise => {\n return new Promise(resolve => {\n const reader = new FileReader()\n reader.addEventListener('load', () => {\n resolve(reader.result as string)\n })\n reader.readAsDataURL(file)\n })\n}","export const VIEWPORT_SIZE = 1000","import type { BarChartOptions, LineChartOptions, PieChartOptions } from 'chartist'\n\nexport const enum ShapePathFormulasKeys {\n ROUND_RECT = 'roundRect',\n ROUND_RECT_DIAGONAL = 'roundRectDiagonal',\n ROUND_RECT_SINGLE = 'roundRectSingle',\n ROUND_RECT_SAMESIDE = 'roundRectSameSide',\n CUT_RECT_DIAGONAL = 'cutRectDiagonal',\n CUT_RECT_SINGLE = 'cutRectSingle',\n CUT_RECT_SAMESIDE = 'cutRectSameSide',\n CUT_ROUND_RECT = 'cutRoundRect',\n MESSAGE = 'message',\n ROUND_MESSAGE = 'roundMessage',\n L = 'L',\n RING_RECT = 'ringRect',\n PLUS = 'plus',\n TRIANGLE = 'triangle',\n PARALLELOGRAM_LEFT = 'parallelogramLeft',\n PARALLELOGRAM_RIGHT = 'parallelogramRight',\n TRAPEZOID = 'trapezoid',\n BULLET = 'bullet',\n INDICATOR = 'indicator',\n}\n\nexport const enum ElementTypes {\n TEXT = 'text',\n IMAGE = 'image',\n SHAPE = 'shape',\n LINE = 'line',\n CHART = 'chart',\n TABLE = 'table',\n LATEX = 'latex',\n VIDEO = 'video',\n AUDIO = 'audio',\n}\n\n/**\n * 元素阴影\n * \n * h: 水平偏移量\n * \n * v: 垂直偏移量\n * \n * blur: 模糊程度\n * \n * color: 阴影颜色\n */\nexport interface PPTElementShadow {\n h: number\n v: number\n blur: number\n color: string\n}\n\n/**\n * 元素边框\n * \n * style?: 边框样式(实线或虚线)\n * \n * width?: 边框宽度\n * \n * color?: 边框颜色\n */\nexport interface PPTElementOutline {\n style?: 'dashed' | 'solid'\n width?: number\n color?: string\n}\n\n/**\n * 元素超链接\n * \n * type: 链接类型(网页、幻灯片页面)\n * \n * target: 目标地址(网页链接、幻灯片页面ID)\n */\nexport interface PPTElementLink {\n type: 'web' | 'slide'\n target: string\n}\n\n\n/**\n * 元素通用属性\n * \n * id: 元素ID\n * \n * left: 元素水平方向位置(距离画布左侧)\n * \n * top: 元素垂直方向位置(距离画布顶部)\n * \n * lock?: 锁定元素\n * \n * groupId?: 组合ID(拥有相同组合ID的元素即为同一组合元素成员)\n * \n * width: 元素宽度\n * \n * height: 元素高度\n * \n * rotate: 旋转角度\n * \n * link?: 超链接\n * \n * name?: 元素名\n */\ninterface PPTBaseElement {\n id: string\n left: number\n top: number\n lock?: boolean\n groupId?: string\n width: number\n height: number\n rotate: number\n link?: PPTElementLink\n name?: string\n}\n\n\n/**\n * 文本元素\n * \n * type: 元素类型(text)\n * \n * content: 文本内容(HTML字符串)\n * \n * defaultFontName: 默认字体(会被文本内容中的HTML内联样式覆盖)\n * \n * defaultColor: 默认颜色(会被文本内容中的HTML内联样式覆盖)\n * \n * outline?: 边框\n * \n * fill?: 填充色\n * \n * lineHeight?: 行高(倍),默认1.5\n * \n * wordSpace?: 字间距,默认0\n * \n * opacity?: 不透明度,默认1\n * \n * shadow?: 阴影\n * \n * paragraphSpace?: 段间距,默认 5px\n * \n * vertical?: 竖向文本\n */\nexport interface PPTTextElement extends PPTBaseElement {\n type: 'text'\n content: string\n defaultFontName: string\n defaultColor: string\n outline?: PPTElementOutline\n fill?: string\n lineHeight?: number\n wordSpace?: number\n opacity?: number\n shadow?: PPTElementShadow\n paragraphSpace?: number\n vertical?: boolean\n}\n\n\n/**\n * 图片翻转、形状翻转\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n */\nexport interface ImageOrShapeFlip {\n flipH?: boolean\n flipV?: boolean\n}\n\n/**\n * 图片滤镜\n * \n * https://developer.mozilla.org/zh-CN/docs/Web/CSS/filter\n * \n * 'blur'?: 模糊,默认0(px)\n * \n * 'brightness'?: 亮度,默认100(%)\n * \n * 'contrast'?: 对比度,默认100(%)\n * \n * 'grayscale'?: 灰度,默认0(%)\n * \n * 'saturate'?: 饱和度,默认100(%)\n * \n * 'hue-rotate'?: 色相旋转,默认0(deg)\n * \n * 'opacity'?: 不透明度,默认100(%)\n */\nexport type ImageElementFilterKeys = 'blur' | 'brightness' | 'contrast' | 'grayscale' | 'saturate' | 'hue-rotate' | 'opacity'\nexport interface ImageElementFilters {\n 'blur'?: string\n 'brightness'?: string\n 'contrast'?: string\n 'grayscale'?: string\n 'saturate'?: string\n 'hue-rotate'?: string\n 'opacity'?: string\n}\n\nexport type ImageClipDataRange = [[number, number], [number, number]]\n\n/**\n * 图片裁剪\n * \n * range: 裁剪范围,例如:[[10, 10], [90, 90]] 表示裁取原图从左上角 10%, 10% 到 90%, 90% 的范围\n * \n * shape: 裁剪形状,见 configs/imageClip.ts CLIPPATHS \n */\nexport interface ImageElementClip {\n range: ImageClipDataRange\n shape: string\n}\n\n/**\n * 图片元素\n * \n * type: 元素类型(image)\n * \n * fixedRatio: 固定图片宽高比例\n * \n * src: 图片地址\n * \n * outline?: 边框\n * \n * filters?: 图片滤镜\n * \n * clip?: 裁剪信息\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n * \n * shadow?: 阴影\n */\nexport interface PPTImageElement extends PPTBaseElement {\n type: 'image'\n fixedRatio: boolean\n src: string\n outline?: PPTElementOutline\n filters?: ImageElementFilters\n clip?: ImageElementClip\n flipH?: boolean\n flipV?: boolean\n shadow?: PPTElementShadow\n colorMask?: string\n}\n\n\n/**\n * 形状渐变\n * \n * type: 渐变类型(径向、线性)\n * \n * color: 渐变颜色\n * \n * rotate: 渐变角度(线性渐变)\n */\nexport interface ShapeGradient {\n type: 'linear' | 'radial'\n color: [string, string]\n rotate: number\n}\n\n/**\n * 形状内文本\n * \n * content: 文本内容(HTML字符串)\n * \n * defaultFontName: 默认字体(会被文本内容中的HTML内联样式覆盖)\n * \n * defaultColor: 默认颜色(会被文本内容中的HTML内联样式覆盖)\n * \n * align: 文本对齐方向(垂直方向)\n */\nexport interface ShapeText {\n content: string\n defaultFontName: string\n defaultColor: string\n align: 'top' | 'middle' | 'bottom'\n}\n\n/**\n * 形状元素\n * \n * type: 元素类型(shape)\n * \n * viewBox: SVG的viewBox属性,例如 [1000, 1000] 表示 '0 0 1000 1000'\n * \n * path: 形状路径,SVG path 的 d 属性\n * \n * fixedRatio: 固定形状宽高比例\n * \n * fill: 填充,不存在渐变时生效\n * \n * gradient?: 渐变,该属性存在时将优先作为填充\n * \n * outline?: 边框\n * \n * opacity?: 不透明度\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n * \n * shadow?: 阴影\n * \n * special?: 特殊形状(标记一些难以解析的形状,例如路径使用了 L Q C A 以外的类型,该类形状在导出后将变为图片的形式)\n * \n * text?: 形状内文本\n * \n * pathFormula?: 形状路径计算公式\n * 一般情况下,形状的大小变化时仅由宽高基于 viewBox 的缩放比例来调整形状,而 viewBox 本身和 path 不会变化,\n * 但也有一些形状希望能更精确的控制一些关键点的位置,此时就需要提供路径计算公式,通过在缩放时更新 viewBox 并重新计算 path 来重新绘制形状\n * \n * keypoint?: 关键点位置百分比\n */\nexport interface PPTShapeElement extends PPTBaseElement {\n type: 'shape'\n viewBox: [number, number]\n path: string\n fixedRatio: boolean\n fill: string\n gradient?: ShapeGradient\n outline?: PPTElementOutline\n opacity?: number\n flipH?: boolean\n flipV?: boolean\n shadow?: PPTElementShadow\n special?: boolean\n text?: ShapeText\n pathFormula?: ShapePathFormulasKeys\n keypoint?: number\n}\n\n\nexport type LinePoint = '' | 'arrow' | 'dot' \n\n/**\n * 线条元素\n * \n * type: 元素类型(line)\n * \n * start: 起点位置([x, y])\n * \n * end: 终点位置([x, y])\n * \n * style: 线条样式(实线、虚线)\n * \n * color: 线条颜色\n * \n * points: 端点样式([起点样式, 终点样式],可选:无、箭头、圆点)\n * \n * shadow?: 阴影\n * \n * broken?: 折线控制点位置([x, y])\n * \n * curve?: 二次曲线控制点位置([x, y])\n * \n * cubic?: 三次曲线控制点位置([[x1, y1], [x2, y2]])\n */\nexport interface PPTLineElement extends Omit {\n type: 'line'\n start: [number, number]\n end: [number, number]\n style: 'solid' | 'dashed'\n color: string\n points: [LinePoint, LinePoint]\n shadow?: PPTElementShadow\n broken?: [number, number]\n curve?: [number, number]\n cubic?: [[number, number], [number, number]]\n}\n\n\nexport type PresetChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'scatter' | 'pie' | 'ring'\nexport type ChartType = 'bar' | 'line' | 'pie'\nexport type ChartOptions = LineChartOptions & BarChartOptions & PieChartOptions\nexport interface ChartData {\n labels: string[]\n legends: string[]\n series: number[][]\n}\n\n/**\n * 图表元素\n * \n * type: 元素类型(chart)\n * \n * fill?: 填充色\n * \n * chartType: 图表基础类型(bar/line/pie),所有图表类型都是由这三种基本类型衍生而来\n * \n * data: 图表数据\n * \n * options?: 图表配置项\n * \n * outline?: 边框\n * \n * themeColor: 主题色\n * \n * gridColor?: 网格&坐标颜色\n * \n * legend?: 图例/位置\n */\nexport interface PPTChartElement extends PPTBaseElement {\n type: 'chart'\n fill?: string\n chartType: ChartType\n data: ChartData\n options?: ChartOptions\n outline?: PPTElementOutline\n themeColor: string[]\n gridColor?: string\n legend?: '' | 'top' | 'bottom'\n}\n\n\n/**\n * 表格单元格样式\n * \n * bold?: 加粗\n * \n * em?: 斜体\n * \n * underline?: 下划线\n * \n * strikethrough?: 删除线\n * \n * color?: 字体颜色\n * \n * backcolor?: 填充色\n * \n * fontsize?: 字体大小\n * \n * fontname?: 字体\n * \n * align?: 对齐方式\n */\nexport interface TableCellStyle {\n bold?: boolean\n em?: boolean\n underline?: boolean\n strikethrough?: boolean\n color?: string\n backcolor?: string\n fontsize?: string\n fontname?: string\n align?: 'left' | 'center' | 'right'\n}\n\n\n/**\n * 表格单元格\n * \n * id: 单元格ID\n * \n * colspan: 合并列数\n * \n * rowspan: 合并行数\n * \n * text: 文字内容\n * \n * style?: 单元格样式\n */\nexport interface TableCell {\n id: string\n colspan: number\n rowspan: number\n text: string\n style?: TableCellStyle\n}\n\n/**\n * 表格主题\n * \n * color: 主题色\n * \n * rowHeader: 标题行\n * \n * rowFooter: 汇总行\n * \n * colHeader: 第一列\n * \n * colFooter: 最后一列\n */\nexport interface TableTheme {\n color: string\n rowHeader: boolean\n rowFooter: boolean\n colHeader: boolean\n colFooter: boolean\n}\n\n/**\n * 表格元素\n * \n * type: 元素类型(table)\n * \n * outline: 边框\n * \n * theme?: 主题\n * \n * colWidths: 列宽数组,如[30, 50, 20]表示三列宽度分别为30%, 50%, 20%\n * \n * cellMinHeight: 单元格最小高度\n * \n * data: 表格数据\n */\nexport interface PPTTableElement extends PPTBaseElement {\n type: 'table'\n outline: PPTElementOutline\n theme?: TableTheme\n colWidths: number[]\n cellMinHeight: number\n data: TableCell[][]\n}\n\n\n/**\n * LaTeX元素(公式)\n * \n * type: 元素类型(latex)\n * \n * latex: latex代码\n * \n * path: svg path\n * \n * color: 颜色\n * \n * strokeWidth: 路径宽度\n * \n * viewBox: SVG的viewBox属性\n * \n * fixedRatio: 固定形状宽高比例\n */\nexport interface PPTLatexElement extends PPTBaseElement {\n type: 'latex'\n latex: string\n path: string\n color: string\n strokeWidth: number\n viewBox: [number, number]\n fixedRatio: boolean\n}\n\n/**\n * 视频元素\n * \n * type: 元素类型(video)\n * \n * src: 视频地址\n * \n * autoplay: 自动播放\n * \n * poster: 预览封面\n * \n * ext: 视频后缀,当资源链接缺少后缀时用该字段确认资源类型\n */\nexport interface PPTVideoElement extends PPTBaseElement {\n type: 'video'\n src: string\n autoplay: boolean\n poster?: string\n ext?: string\n}\n\n/**\n * 音频元素\n * \n * type: 元素类型(audio)\n * \n * fixedRatio: 固定图标宽高比例\n * \n * color: 图标颜色\n * \n * loop: 循环播放\n * \n * autoplay: 自动播放\n * \n * src: 音频地址\n * \n * ext: 音频后缀,当资源链接缺少后缀时用该字段确认资源类型\n */\nexport interface PPTAudioElement extends PPTBaseElement {\n type: 'audio'\n fixedRatio: boolean\n color: string\n loop: boolean\n autoplay: boolean\n src: string\n ext?: string\n}\n\n\nexport type PPTElement = PPTTextElement | PPTImageElement | PPTShapeElement | PPTLineElement | PPTChartElement | PPTTableElement | PPTLatexElement | PPTVideoElement | PPTAudioElement\n\n\n/**\n * 元素动画\n * \n * id: 动画id\n * \n * elId: 元素ID\n * \n * effect: 动画效果\n * \n * type: 动画类型(入场、退场、强调)\n * \n * duration: 动画持续时间\n * \n * trigger: 动画触发方式(click - 单击时、meantime - 与上一动画同时、auto - 上一动画之后)\n */\nexport interface PPTAnimation {\n id: string\n elId: string\n effect: string\n type: 'in' | 'out' | 'attention'\n duration: number\n trigger: 'click' | 'meantime' | 'auto'\n}\n\n/**\n * 幻灯片背景\n * \n * type: 背景类型(纯色、图片、渐变)\n * \n * color?: 背景颜色(纯色)\n * \n * image?: 图片地址(图片)\n * \n * imageSize?: 图片填充方式\n * \n * gradientType?: 渐变类型(线性、径向)\n * \n * gradientColor?: 渐变颜色\n * \n * gradientRotate?: 渐变角度(线性)\n */\nexport interface SlideBackground {\n type: 'solid' | 'image' | 'gradient'\n color?: string\n image?: string\n imageSize?: 'cover' | 'contain' | 'repeat'\n gradientType?: 'linear' | 'radial'\n gradientColor?: [string, string]\n gradientRotate?: number\n}\n\n\nexport type TurningMode = 'no' | 'fade' | 'slideX' | 'slideY' | 'random' | 'slideX3D' | 'slideY3D' | 'rotate' | 'scaleY' | 'scaleX' | 'scale' | 'scaleReverse'\n\n/**\n * 幻灯片页面\n * \n * id: 页面ID\n * \n * elements: 元素集合\n * \n * remark?: 备注\n * \n * background?: 页面背景\n * \n * animations?: 元素动画集合\n * \n * turningMode?: 翻页方式\n */\nexport interface Slide {\n id: string\n elements: PPTElement[]\n remark?: string\n background?: SlideBackground\n animations?: PPTAnimation[]\n turningMode?: TurningMode\n}\n\n/**\n * 幻灯片主题\n * \n * backgroundColor: 页面背景颜色\n * \n * themeColor: 主题色,用于默认创建的形状颜色等\n * \n * fontColor: 字体颜色\n * \n * fontName: 字体\n */\nexport interface SlideTheme {\n backgroundColor: string\n themeColor: string\n fontColor: string\n fontName: string\n}\n","/* eslint-disable max-lines */\n\n// 非专业设计人士可以用该应用绘制基本形状:https://github.com/pipipi-pikachu/svgPathCreator\n\nimport { ShapePathFormulasKeys } from '@/types/slides'\n\nexport interface ShapePoolItem {\n viewBox: [number, number]\n path: string\n special?: boolean\n pathFormula?: ShapePathFormulasKeys\n outlined?: boolean\n pptxShapeType?: string\n title?: string\n}\n\ninterface ShapeListItem {\n type: string\n children: ShapePoolItem[]\n}\n\nexport const SHAPE_PATH_FORMULAS = {\n [ShapePathFormulasKeys.ROUND_RECT]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height - radius} Q ${width} ${height} ${width - radius} ${height} L ${radius} ${height} Q 0 ${height} 0 ${height - radius} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_DIAGONAL]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${height - radius} L 0 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L ${radius} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_SINGLE]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${height} L 0 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_SAMESIDE]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${radius} L ${radius} 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_DIAGONAL]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 1],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width} 0 L ${width} ${height - radius} Q ${width} ${height} ${width - radius} ${height} L 0 ${height} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_SINGLE]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 1],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height} L 0 ${height} L 0 0 Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_SAMESIDE]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${radius} Q 0 0 ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_ROUND_RECT]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L 0 ${height} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.MESSAGE]: {\n formula: (width: number, height: number) => {\n const arrowWidth = width * 0.2\n const arrowheight = height * 0.2\n return `M 0 0 L ${width} 0 L ${width} ${height - arrowheight} L ${width / 2} ${height - arrowheight} L ${width / 2 - arrowWidth} ${height} L ${width / 2 - arrowWidth} ${height - arrowheight} L 0 ${height - arrowheight} Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_MESSAGE]: {\n formula: (width: number, height: number) => {\n const radius = Math.min(width, height) * 0.125\n const arrowWidth = width * 0.2\n const arrowheight = height * 0.2\n return `M 0 ${radius} Q 0 0 ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height - radius - arrowheight} Q ${width} ${height - arrowheight} ${width - radius} ${height - arrowheight} L ${width / 2} ${height - arrowheight} L ${width / 2 - arrowWidth} ${height} L ${width / 2 - arrowWidth} ${height - arrowheight} L ${radius} ${height - arrowheight} Q 0 ${height - arrowheight} 0 ${height - radius - arrowheight} L 0 ${radius} Z`\n }\n },\n [ShapePathFormulasKeys.L]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.9],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M 0 0 L 0 ${height} L ${width} ${height} L ${width} ${height - lineWidth} L ${lineWidth} ${height - lineWidth} L ${lineWidth} 0 Z`\n }\n },\n [ShapePathFormulasKeys.RING_RECT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.45],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M 0 0 ${width} 0 ${width} ${height} L 0 ${height} L 0 0 Z M ${lineWidth} ${lineWidth} L ${lineWidth} ${height - lineWidth} L ${width - lineWidth} ${height - lineWidth} L ${width - lineWidth} ${lineWidth} Z`\n }\n },\n [ShapePathFormulasKeys.PLUS]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.9],\n relative: 'center',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M ${width / 2 - lineWidth / 2} 0 L ${width / 2 - lineWidth / 2} ${height / 2 - lineWidth / 2} L 0 ${height / 2 - lineWidth / 2} L 0 ${height / 2 + lineWidth / 2} L ${width / 2 - lineWidth / 2} ${height / 2 + lineWidth / 2} L ${width / 2 - lineWidth / 2} ${height} L ${width / 2 + lineWidth / 2} ${height} L ${width / 2 + lineWidth / 2} ${height / 2 + lineWidth / 2} L ${width} ${height / 2 + lineWidth / 2} L ${width} ${height / 2 - lineWidth / 2} L ${width / 2 + lineWidth / 2} ${height / 2 - lineWidth / 2} L ${width / 2 + lineWidth / 2} 0 Z`\n }\n },\n [ShapePathFormulasKeys.TRIANGLE]: {\n editable: true,\n defaultValue: 0.5,\n range: [0, 1],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const vertex = width * value\n return `M ${vertex} 0 L 0 ${height} L ${width} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.PARALLELOGRAM_LEFT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.9],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${point} 0 L ${width} 0 L ${width - point} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.PARALLELOGRAM_RIGHT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M 0 0 L ${width - point} 0 L ${width} ${height} L ${point} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.TRAPEZOID]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${point} 0 L ${width - point} 0 L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.BULLET]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 1],\n relative: 'top',\n getBaseSize: (width: number, height: number) => height,\n formula: (width: number, height: number, value: number) => {\n const point = height * value\n return `M ${width / 2} 0 L 0 ${point} L 0 ${height} L ${width} ${height} L ${width} ${point} Z`\n }\n },\n [ShapePathFormulasKeys.INDICATOR]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${width} ${height / 2} L ${width - point} 0 L 0 0 L ${point} ${height / 2} L 0 ${height} L ${width - point} ${height} Z`\n }\n },\n}\n\nexport const SHAPE_LIST: ShapeListItem[] = [\n {\n type: '矩形',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n pptxShapeType: 'rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT,\n pptxShapeType: 'roundRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_SINGLE,\n pptxShapeType: 'snip1Rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_SAMESIDE,\n pptxShapeType: 'snip2SameRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_DIAGONAL,\n pptxShapeType: 'snip2DiagRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.CUT_ROUND_RECT,\n pptxShapeType: 'snipRoundRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_SINGLE,\n pptxShapeType: 'round1Rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_SAMESIDE,\n pptxShapeType: 'round2SameRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_DIAGONAL,\n pptxShapeType: 'round2DiagRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z',\n title: '任意多边形',\n },\n ]\n },\n\n {\n type: '常用形状',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n pptxShapeType: 'ellipse',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 200 L 200 200 L 100 0 Z',\n pathFormula: ShapePathFormulasKeys.TRIANGLE,\n pptxShapeType: 'triangle',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z',\n pathFormula: ShapePathFormulasKeys.PARALLELOGRAM_LEFT,\n pptxShapeType: 'parallelogram',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.PARALLELOGRAM_RIGHT,\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z',\n pathFormula: ShapePathFormulasKeys.TRAPEZOID,\n pptxShapeType: 'trapezoid',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z',\n pptxShapeType: 'diamond',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z',\n pathFormula: ShapePathFormulasKeys.BULLET,\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z',\n pathFormula: ShapePathFormulasKeys.INDICATOR,\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z',\n pptxShapeType: 'pie',\n },\n {\n viewBox: [200, 200],\n path: 'M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z',\n pptxShapeType: 'chord',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z',\n pptxShapeType: 'teardrop',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z',\n pptxShapeType: 'pentagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z',\n pptxShapeType: 'hexagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z',\n pptxShapeType: 'octagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.L\n },\n {\n viewBox: [200, 200],\n path: 'M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z',\n pathFormula: ShapePathFormulasKeys.RING_RECT,\n },\n {\n viewBox: [200, 200],\n path: 'M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z',\n pathFormula: ShapePathFormulasKeys.PLUS,\n },\n {\n viewBox: [200, 200],\n path: 'M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z',\n pathFormula: ShapePathFormulasKeys.MESSAGE,\n },\n {\n viewBox: [200, 200],\n path: 'M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_MESSAGE,\n },\n {\n viewBox: [200, 200],\n path: 'M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z',\n pptxShapeType: 'star4',\n },\n {\n viewBox: [1024, 1024],\n path: 'M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z',\n pptxShapeType: 'star5',\n special: true,\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z',\n pptxShapeType: 'star6',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z',\n },\n ],\n },\n \n {\n type: '箭头',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z',\n pptxShapeType: 'upArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z',\n pptxShapeType: 'downArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z',\n pptxShapeType: 'leftArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z',\n pptxShapeType: 'rightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z',\n pptxShapeType: 'upDownArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z',\n pptxShapeType: 'leftRightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z',\n pptxShapeType: 'notchedRightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z',\n pptxShapeType: 'chevron',\n },\n {\n viewBox: [200, 200],\n path: 'M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z',\n pptxShapeType: 'homePlate',\n },\n {\n viewBox: [200, 200],\n path: 'M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z'\n },\n {\n viewBox: [1024, 1024],\n path: 'M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z',\n special: true,\n },\n ],\n },\n\n {\n type: '其他形状',\n children: [\n {\n viewBox: [1024, 1024],\n path: 'M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z',\n special: true,\n },\n ],\n },\n\n {\n type: '线性',\n children: [\n {\n viewBox: [1024, 1024],\n path: 'M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z',\n special: true,\n outlined: true,\n },\n ],\n }\n]","import type { ChartType } from '@/types/slides'\n\ninterface ChartTypes {\n [propName: string]: ChartType\n}\n\nexport const CHART_TYPES: ChartTypes = {\n bar: 'bar',\n horizontalBar: 'bar',\n line: 'line',\n area: 'line',\n scatter: 'line',\n pie: 'pie',\n ring: 'pie',\n}","import { debounce, throttle} from 'lodash'\nimport { useSnapshotStore } from '@/store'\n\nexport default () => {\n const snapshotStore = useSnapshotStore()\n\n // 添加历史快照(历史记录)\n const addHistorySnapshot = debounce(function() {\n snapshotStore.addSnapshot()\n }, 300, { trailing: true })\n\n // 重做\n const redo = throttle(function() {\n snapshotStore.reDo()\n }, 100, { leading: true, trailing: false })\n\n // 撤销\n const undo = throttle(function() {\n snapshotStore.unDo()\n }, 100, { leading: true, trailing: false })\n\n return {\n addHistorySnapshot,\n redo,\n undo,\n }\n}","import { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { getImageSize } from '@/utils/image'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport type { PPTLineElement, PPTElement, TableCell, TableCellStyle, PPTShapeElement, PPTChartElement, ChartOptions, PresetChartType } from '@/types/slides'\nimport { type ShapePoolItem, SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport type { LinePoolItem } from '@/configs/lines'\nimport { CHART_TYPES } from '@/configs/chartTypes'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface CommonElementPosition {\n top: number\n left: number\n width: number\n height: number\n}\n\ninterface LineElementPosition {\n top: number\n left: number\n start: [number, number]\n end: [number, number]\n}\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { creatingElement } = storeToRefs(mainStore)\n const { theme, viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 创建(插入)一个元素并将其设置为被选中元素\n const createElement = (element: PPTElement, callback?: () => void) => {\n slidesStore.addElement(element)\n mainStore.setActiveElementIdList([element.id])\n\n if (creatingElement.value) mainStore.setCreatingElement(null)\n\n setTimeout(() => {\n mainStore.setEditorareaFocus(true)\n }, 0)\n\n if (callback) callback()\n\n addHistorySnapshot()\n }\n\n /**\n * 创建图片元素\n * @param src 图片地址\n */\n const createImageElement = (src: string) => {\n getImageSize(src).then(({ width, height }) => {\n const scale = height / width\n \n if (scale < viewportRatio.value && width > VIEWPORT_SIZE) {\n width = VIEWPORT_SIZE\n height = width * scale\n }\n else if (height > VIEWPORT_SIZE * viewportRatio.value) {\n height = VIEWPORT_SIZE * viewportRatio.value\n width = height / scale\n }\n\n createElement({\n type: 'image',\n id: nanoid(10),\n src,\n width,\n height,\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n fixedRatio: true,\n rotate: 0,\n })\n })\n }\n \n /**\n * 创建图表元素\n * @param chartType 图表类型\n */\n const createChartElement = (type: PresetChartType) => {\n const newElement: PPTChartElement = {\n type: 'chart',\n id: nanoid(10),\n chartType: CHART_TYPES[type],\n left: 300,\n top: 81.25,\n width: 400,\n height: 400,\n rotate: 0,\n themeColor: [theme.value.themeColor],\n gridColor: theme.value.fontColor,\n data: {\n labels: ['类别1', '类别2', '类别3', '类别4', '类别5'],\n legends: ['系列1'],\n series: [\n [12, 19, 5, 2, 18],\n ],\n },\n }\n\n const options: ChartOptions = {\n ...(type === 'bar' ? { horizontalBars: false, stackBars: false } : {}),\n ...(type === 'horizontalBar' ? { horizontalBars: true, stackBars: false } : {}),\n ...(type === 'line' ? { showLine: true, lineSmooth: true, showArea: false } : {}),\n ...(type === 'area' ? { showLine: true, lineSmooth: true, showArea: true } : {}),\n ...(type === 'scatter' ? { showLine: false, lineSmooth: true, showArea: false } : {}),\n ...(type === 'pie' ? { donut: false } : {}),\n ...(type === 'ring' ? { donut: true } : {}),\n }\n\n createElement({\n ...newElement,\n options,\n })\n }\n \n /**\n * 创建表格元素\n * @param row 行数\n * @param col 列数\n */\n const createTableElement = (row: number, col: number) => {\n const style: TableCellStyle = {\n fontname: theme.value.fontName,\n color: theme.value.fontColor,\n }\n const data: TableCell[][] = []\n for (let i = 0; i < row; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < col; j++) {\n rowCells.push({ id: nanoid(10), colspan: 1, rowspan: 1, text: '', style })\n }\n data.push(rowCells)\n }\n\n const DEFAULT_CELL_WIDTH = 100\n const DEFAULT_CELL_HEIGHT = 36\n\n const colWidths: number[] = new Array(col).fill(1 / col)\n\n const width = col * DEFAULT_CELL_WIDTH\n const height = row * DEFAULT_CELL_HEIGHT\n\n createElement({\n type: 'table',\n id: nanoid(10),\n width,\n height,\n colWidths,\n rotate: 0,\n data,\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n outline: {\n width: 2,\n style: 'solid',\n color: '#eeece1',\n },\n theme: {\n color: theme.value.themeColor,\n rowHeader: true,\n rowFooter: false,\n colHeader: false,\n colFooter: false,\n },\n cellMinHeight: 36,\n })\n }\n \n /**\n * 创建文本元素\n * @param position 位置大小信息\n * @param content 文本内容\n */\n \n interface CreateTextData {\n content?: string\n vertical?: boolean\n }\n const createTextElement = (position: CommonElementPosition, data?: CreateTextData) => {\n const { left, top, width, height } = position\n const content = data?.content || ''\n const vertical = data?.vertical || false\n\n const id = nanoid(10)\n createElement({\n type: 'text',\n id,\n left, \n top, \n width, \n height,\n content,\n rotate: 0,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n vertical,\n }, () => {\n setTimeout(() => {\n const editorRef: HTMLElement | null = document.querySelector(`#editable-element-${id} .ProseMirror`)\n if (editorRef) editorRef.focus()\n }, 0)\n })\n }\n \n /**\n * 创建形状元素\n * @param position 位置大小信息\n * @param data 形状路径信息\n */\n const createShapeElement = (position: CommonElementPosition, data: ShapePoolItem) => {\n const { left, top, width, height } = position\n const newElement: PPTShapeElement = {\n type: 'shape',\n id: nanoid(10),\n left, \n top, \n width, \n height,\n viewBox: data.viewBox,\n path: data.path,\n fill: theme.value.themeColor,\n fixedRatio: false,\n rotate: 0,\n }\n if (data.special) newElement.special = true\n if (data.pathFormula) {\n newElement.pathFormula = data.pathFormula\n newElement.viewBox = [width, height]\n\n const pathFormula = SHAPE_PATH_FORMULAS[data.pathFormula]\n if ('editable' in pathFormula) {\n newElement.path = pathFormula.formula(width, height, pathFormula.defaultValue)\n newElement.keypoint = pathFormula.defaultValue\n }\n else newElement.path = pathFormula.formula(width, height)\n }\n createElement(newElement)\n }\n \n /**\n * 创建线条元素\n * @param position 位置大小信息\n * @param data 线条的路径和样式\n */\n const createLineElement = (position: LineElementPosition, data: LinePoolItem) => {\n const { left, top, start, end } = position\n\n const newElement: PPTLineElement = {\n type: 'line',\n id: nanoid(10),\n left, \n top, \n start,\n end,\n points: data.points,\n color: theme.value.themeColor,\n style: data.style,\n width: 2,\n }\n if (data.isBroken) newElement.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (data.isCurve) newElement.curve = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (data.isCubic) newElement.cubic = [[(start[0] + end[0]) / 2, (start[1] + end[1]) / 2], [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]]\n createElement(newElement)\n }\n \n /**\n * 创建LaTeX元素\n * @param svg SVG代码\n */\n const createLatexElement = (data: { path: string; latex: string; w: number; h: number; }) => {\n createElement({\n type: 'latex',\n id: nanoid(10),\n width: data.w,\n height: data.h,\n rotate: 0,\n left: (VIEWPORT_SIZE - data.w) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - data.h) / 2,\n path: data.path,\n latex: data.latex,\n color: theme.value.fontColor,\n strokeWidth: 2,\n viewBox: [data.w, data.h],\n fixedRatio: true,\n })\n }\n \n /**\n * 创建视频元素\n * @param src 视频地址\n */\n const createVideoElement = (src: string) => {\n createElement({\n type: 'video',\n id: nanoid(10),\n width: 500,\n height: 300,\n rotate: 0,\n left: (VIEWPORT_SIZE - 500) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - 300) / 2,\n src,\n autoplay: false,\n })\n }\n \n /**\n * 创建音频元素\n * @param src 音频地址\n */\n const createAudioElement = (src: string) => {\n createElement({\n type: 'audio',\n id: nanoid(10),\n width: 50,\n height: 50,\n rotate: 0,\n left: (VIEWPORT_SIZE - 50) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - 50) / 2,\n loop: false,\n autoplay: false,\n fixedRatio: true,\n color: theme.value.themeColor,\n src,\n })\n }\n\n return {\n createImageElement,\n createChartElement,\n createTableElement,\n createTextElement,\n createShapeElement,\n createLineElement,\n createLatexElement,\n createVideoElement,\n createAudioElement,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useSlidesStore, useMainStore } from '@/store'\nimport type { PPTElement, Slide } from '@/types/slides'\nimport { createSlideIdMap, createElementIdMap, getElementRange } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { currentSlide, slides } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 添加指定的元素数据(一组)\n * @param elements 元素列表数据\n */\n const addElementsFromData = (elements: PPTElement[]) => {\n const { groupIdMap, elIdMap } = createElementIdMap(elements)\n\n const firstElement = elements[0]\n let offset = 0\n let lastSameElement: PPTElement | undefined\n \n do {\n lastSameElement = currentSlide.value.elements.find(el => {\n if (el.type !== firstElement.type) return false\n \n const { minX: oMinX, maxX: oMaxX, minY: oMinY, maxY: oMaxY } = getElementRange(el)\n const { minX: nMinX, maxX: nMaxX, minY: nMinY, maxY: nMaxY } = getElementRange({\n ...firstElement,\n left: firstElement.left + offset,\n top: firstElement.top + offset\n })\n if (\n oMinX === nMinX &&\n oMaxX === nMaxX &&\n oMinY === nMinY &&\n oMaxY === nMaxY\n ) return true\n \n return false\n })\n if (lastSameElement) offset += 10\n\n } while (lastSameElement)\n \n for (const element of elements) {\n element.id = elIdMap[element.id]\n\n element.left = element.left + offset\n element.top = element.top + offset\n\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n }\n slidesStore.addElement(elements)\n mainStore.setActiveElementIdList(Object.values(elIdMap))\n addHistorySnapshot()\n }\n\n /**\n * 添加指定的页面数据\n * @param slide 页面数据\n */\n const addSlidesFromData = (slides: Slide[]) => {\n const slideIdMap = createSlideIdMap(slides)\n const newSlides = slides.map(slide => {\n const { groupIdMap, elIdMap } = createElementIdMap(slide.elements)\n\n for (const element of slide.elements) {\n element.id = elIdMap[element.id]\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n\t\t\n // 若元素绑定了页面跳转链接\n if (element.link && element.link.type === 'slide') {\n\n // 待添加页面中包含该页面,则替换相关绑定关系\n if (slideIdMap[element.link.target]) {\n element.link.target = slideIdMap[element.link.target]\n }\n // 待添加页面中不包含该页面,则删除该元素绑定的页面跳转\n else delete element.link\n }\n }\n // 动画id替换\n if (slide.animations) {\n for (const animation of slide.animations) {\n animation.id = nanoid(10)\n animation.elId = elIdMap[animation.elId]\n }\n }\n return {\n ...slide,\n id: slideIdMap[slide.id],\n }\n })\n slidesStore.addSlide(newSlides)\n addHistorySnapshot()\n }\n\n const isEmptySlide = computed(() => {\n if (slides.value.length > 1) return false\n if (slides.value[0].elements.length > 0) return false\n return true\n })\n\n return {\n addElementsFromData,\n addSlidesFromData,\n isEmptySlide,\n }\n}","import { pasteCustomClipboardString } from '@/utils/clipboard'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useCreateElement from '@/hooks/useCreateElement'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\n\ninterface PasteTextClipboardDataOptions {\n onlySlide?: boolean\n onlyElements?: boolean\n}\n\nexport default () => {\n const { createTextElement } = useCreateElement()\n const { addElementsFromData, addSlidesFromData } = useAddSlidesOrElements()\n\n /**\n * 粘贴普通文本:创建为新的文本元素\n * @param text 文本\n */\n const createTextElementFromClipboard = (text: string) => {\n createTextElement({\n left: 0,\n top: 0,\n width: 600,\n height: 50,\n }, { content: text })\n }\n\n /**\n * 解析剪贴板内容,根据解析结果选择合适的粘贴方式\n * @param text 剪贴板内容\n * @param options 配置项:onlySlide -- 仅处理页面粘贴;onlyElements -- 仅处理元素粘贴;\n */\n const pasteTextClipboardData = (text: string, options?: PasteTextClipboardDataOptions) => {\n const onlySlide = options?.onlySlide || false\n const onlyElements = options?.onlyElements || false\n\n const clipboardData = pasteCustomClipboardString(text)\n\n // 元素或页面\n if (typeof clipboardData === 'object') {\n const { type, data } = clipboardData\n\n if (type === 'elements' && !onlySlide) addElementsFromData(data)\n else if (type === 'slides' && !onlyElements) addSlidesFromData(data)\n }\n\n // 普通文本\n else if (!onlyElements && !onlySlide) {\n const string = parseText2Paragraphs(clipboardData)\n createTextElementFromClipboard(string)\n }\n }\n\n return {\n pasteTextClipboardData,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { copyText, readClipboard } from '@/utils/clipboard'\nimport { encrypt } from '@/utils/crypto'\nimport { createElementIdMap } from '@/utils/element'\nimport { KEYS } from '@/configs/hotkey'\nimport message from '@/utils/message'\nimport usePasteTextClipboardData from '@/hooks/usePasteTextClipboardData'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport useAddSlidesOrElements from '@/hooks//useAddSlidesOrElements'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { selectedSlidesIndex: _selectedSlidesIndex, activeElementIdList } = storeToRefs(mainStore)\n const { currentSlide, slides, theme, slideIndex } = storeToRefs(slidesStore)\n\n const selectedSlidesIndex = computed(() => [..._selectedSlidesIndex.value, slideIndex.value])\n const selectedSlides = computed(() => slides.value.filter((item, index) => selectedSlidesIndex.value.includes(index)))\n const selectedSlidesId = computed(() => selectedSlides.value.map(item => item.id))\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { addSlidesFromData } = useAddSlidesOrElements()\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 重置幻灯片\n const resetSlides = () => {\n const emptySlide: Slide = {\n id: nanoid(10),\n elements: [],\n background: {\n type: 'solid',\n color: theme.value.backgroundColor,\n },\n }\n slidesStore.updateSlideIndex(0)\n mainStore.setActiveElementIdList([])\n slidesStore.setSlides([emptySlide])\n }\n\n /**\n * 移动页面焦点\n * @param command 移动页面焦点命令:上移、下移\n */\n const updateSlideIndex = (command: string) => {\n if (command === KEYS.UP && slideIndex.value > 0) {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(slideIndex.value - 1)\n }\n else if (command === KEYS.DOWN && slideIndex.value < slides.value.length - 1) {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(slideIndex.value + 1)\n }\n }\n\n // 将当前页面数据加密后复制到剪贴板\n const copySlide = () => {\n const text = encrypt(JSON.stringify({\n type: 'slides',\n data: selectedSlides.value,\n }))\n\n copyText(text).then(() => {\n mainStore.setThumbnailsFocus(true)\n })\n }\n\n // 尝试将剪贴板页面数据解密后添加到下一页(粘贴)\n const pasteSlide = () => {\n readClipboard().then(text => {\n pasteTextClipboardData(text, { onlySlide: true })\n }).catch(err => message.warning(err))\n }\n\n // 创建一页空白页并添加到下一页\n const createSlide = () => {\n const emptySlide: Slide = {\n id: nanoid(10),\n elements: [],\n background: {\n type: 'solid',\n color: theme.value.backgroundColor,\n },\n }\n mainStore.setActiveElementIdList([])\n slidesStore.addSlide(emptySlide)\n addHistorySnapshot()\n }\n\n // 根据模板创建新页面\n const createSlideByTemplate = (slide: Slide) => {\n const { groupIdMap, elIdMap } = createElementIdMap(slide.elements)\n\n for (const element of slide.elements) {\n element.id = elIdMap[element.id]\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n }\n const newSlide = {\n ...slide,\n id: nanoid(10),\n }\n mainStore.setActiveElementIdList([])\n slidesStore.addSlide(newSlide)\n addHistorySnapshot()\n }\n\n // 将当前页复制一份到下一页\n const copyAndPasteSlide = () => {\n const slide = JSON.parse(JSON.stringify(currentSlide.value))\n addSlidesFromData([slide])\n }\n\n // 删除当前页,若将删除全部页面,则执行重置幻灯片操作\n const deleteSlide = (targetSlidesId = selectedSlidesId.value) => {\n if (slides.value.length === targetSlidesId.length) resetSlides()\n else slidesStore.deleteSlide(targetSlidesId)\n\n mainStore.updateSelectedSlidesIndex([])\n\n addHistorySnapshot()\n }\n\n // 将当前页复制后删除(剪切)\n // 由于复制操作会导致多选状态消失,所以需要提前将需要删除的页面ID进行缓存\n const cutSlide = () => {\n const targetSlidesId = [...selectedSlidesId.value]\n copySlide()\n deleteSlide(targetSlidesId)\n }\n\n // 选中全部幻灯片\n const selectAllSlide = () => {\n const newSelectedSlidesIndex = Array.from(Array(slides.value.length), (item, index) => index)\n mainStore.setActiveElementIdList([])\n mainStore.updateSelectedSlidesIndex(newSelectedSlidesIndex)\n }\n\n // 拖拽调整幻灯片顺序同步数据\n const sortSlides = (newIndex: number, oldIndex: number) => {\n if (oldIndex === newIndex) return\n \n const _slides = JSON.parse(JSON.stringify(slides.value))\n const _slide = _slides[oldIndex]\n _slides.splice(oldIndex, 1)\n _slides.splice(newIndex, 0, _slide)\n slidesStore.setSlides(_slides)\n slidesStore.updateSlideIndex(newIndex)\n }\n\n return {\n resetSlides,\n updateSlideIndex,\n copySlide,\n pasteSlide,\n createSlide,\n createSlideByTemplate,\n copyAndPasteSlide,\n deleteSlide,\n cutSlide,\n selectAllSlide,\n sortSlides,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 锁定选中的元素,并清空选中元素状态\n const lockElement = () => {\n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n \n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id)) element.lock = true\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList([])\n addHistorySnapshot()\n }\n\n /**\n * 解除元素的锁定状态,并将其设置为当前选择元素\n * @param handleElement 需要解锁的元素\n */\n const unlockElement = (handleElement: PPTElement) => {\n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n\n if (handleElement.groupId) {\n const groupElementIdList = []\n for (const element of newElementList) {\n if (element.groupId === handleElement.groupId) {\n element.lock = false\n groupElementIdList.push(element.id)\n }\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList(groupElementIdList)\n }\n else {\n for (const element of newElementList) {\n if (element.id === handleElement.id) {\n element.lock = false\n break\n }\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList([handleElement.id])\n }\n addHistorySnapshot()\n }\n\n return {\n lockElement,\n unlockElement,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 删除全部选中元素\n // 组合元素成员中,存在被选中可独立操作的元素时,优先删除该元素。否则默认删除所有被选中的元素\n const deleteElement = () => {\n if (!activeElementIdList.value.length) return\n\n let newElementList: PPTElement[] = []\n if (activeGroupElementId.value) {\n newElementList = currentSlide.value.elements.filter(el => el.id !== activeGroupElementId.value)\n }\n else {\n newElementList = currentSlide.value.elements.filter(el => !activeElementIdList.value.includes(el.id))\n }\n\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n // 删除内面内全部元素(无论是否选中)\n const deleteAllElements = () => {\n if (!currentSlide.value.elements.length) return\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlide({ elements: [] })\n addHistorySnapshot()\n }\n\n return {\n deleteElement,\n deleteAllElements,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeElementList, handleElementId } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 判断当前选中的元素是否可以组合\n */\n const canCombine = computed(() => {\n if (activeElementList.value.length < 2) return false\n\n const firstGroupId = activeElementList.value[0].groupId\n if (!firstGroupId) return true\n\n const inSameGroup = activeElementList.value.every(el => (el.groupId && el.groupId) === firstGroupId)\n return !inSameGroup\n })\n\n /**\n * 组合当前选中的元素:给当前选中的元素赋予一个相同的分组ID\n */\n const combineElements = () => {\n if (!activeElementList.value.length) return\n\n // 生成一个新元素列表进行后续操作\n let newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n\n // 生成分组ID\n const groupId = nanoid(10)\n\n // 收集需要组合的元素列表,并赋上唯一分组ID\n const combineElementList: PPTElement[] = []\n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id)) {\n element.groupId = groupId\n combineElementList.push(element)\n }\n }\n\n // 确保该组合内所有元素成员的层级是连续的,具体操作方法为:\n // 先获取到该组合内最上层元素的层级,将本次需要组合的元素从新元素列表中移除,\n // 再根据最上层元素的层级位置,将上面收集到的需要组合的元素列表一起插入到新元素列表中合适的位置\n const combineElementMaxLevel = newElementList.findIndex(_element => _element.id === combineElementList[combineElementList.length - 1].id)\n const combineElementIdList = combineElementList.map(_element => _element.id)\n newElementList = newElementList.filter(_element => !combineElementIdList.includes(_element.id))\n\n const insertLevel = combineElementMaxLevel - combineElementList.length + 1\n newElementList.splice(insertLevel, 0, ...combineElementList)\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n /**\n * 取消组合元素:移除选中元素的分组ID\n */\n const uncombineElements = () => {\n if (!activeElementList.value.length) return\n const hasElementInGroup = activeElementList.value.some(item => item.groupId)\n if (!hasElementInGroup) return\n \n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id) && element.groupId) delete element.groupId\n }\n slidesStore.updateSlide({ elements: newElementList })\n\n // 取消组合后,需要重置激活元素状态\n // 默认重置为当前正在操作的元素,如果不存在则重置为空\n const handleElementIdList = handleElementId.value ? [handleElementId.value] : []\n mainStore.setActiveElementIdList(handleElementIdList)\n\n addHistorySnapshot()\n }\n\n return {\n canCombine,\n combineElements,\n uncombineElements,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { copyText, readClipboard } from '@/utils/clipboard'\nimport { encrypt } from '@/utils/crypto'\nimport message from '@/utils/message'\nimport usePasteTextClipboardData from '@/hooks/usePasteTextClipboardData'\nimport useDeleteElement from './useDeleteElement'\n\nexport default () => {\n const mainStore = useMainStore()\n const { activeElementIdList, activeElementList } = storeToRefs(mainStore)\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { deleteElement } = useDeleteElement()\n\n // 将选中元素数据加密后复制到剪贴板\n const copyElement = () => {\n if (!activeElementIdList.value.length) return\n\n const text = encrypt(JSON.stringify({\n type: 'elements',\n data: activeElementList.value,\n }))\n\n copyText(text).then(() => {\n mainStore.setEditorareaFocus(true)\n })\n }\n\n // 将选中元素复制后删除(剪切)\n const cutElement = () => {\n copyElement()\n deleteElement()\n }\n\n // 尝试将剪贴板元素数据解密后进行粘贴\n const pasteElement = () => {\n readClipboard().then(text => {\n pasteTextClipboardData(text)\n }).catch(err => message.warning(err))\n }\n\n // 将选中元素复制后立刻粘贴\n const quickCopyElement = () => {\n copyElement()\n pasteElement()\n }\n\n return {\n copyElement,\n cutElement,\n pasteElement,\n quickCopyElement,\n }\n}","import { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\n\r\nexport default () => {\r\n const mainStore = useMainStore()\r\n const { currentSlide } = storeToRefs(useSlidesStore())\r\n const { hiddenElementIdList } = storeToRefs(mainStore)\r\n\r\n // 将当前页面全部元素设置为被选择状态\r\n const selectAllElement = () => {\r\n const unlockedElements = currentSlide.value.elements.filter(el => !el.lock && !hiddenElementIdList.value.includes(el.id))\r\n const newActiveElementIdList = unlockedElements.map(el => el.id)\r\n mainStore.setActiveElementIdList(newActiveElementIdList)\r\n }\r\n\r\n return {\r\n selectAllElement,\r\n }\r\n}","import { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\nimport type { PPTElement } from '@/types/slides'\r\nimport { KEYS } from '@/configs/hotkey'\r\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\r\n\r\nexport default () => {\r\n const slidesStore = useSlidesStore()\r\n const { activeElementIdList, activeGroupElementId } = storeToRefs(useMainStore())\r\n const { currentSlide } = storeToRefs(slidesStore)\r\n\r\n const { addHistorySnapshot } = useHistorySnapshot()\r\n\r\n /**\r\n * 将元素向指定方向移动指定的距离\r\n * 组合元素成员中,存在被选中可独立操作的元素时,优先移动该元素。否则默认移动所有被选中的元素\r\n * @param command 移动方向\r\n * @param step 移动距离\r\n */\r\n const moveElement = (command: string, step = 1) => {\r\n let newElementList: PPTElement[] = []\r\n\r\n const move = (el: PPTElement) => {\r\n let { left, top } = el\r\n switch (command) {\r\n case KEYS.LEFT: \r\n left = left - step\r\n break\r\n case KEYS.RIGHT: \r\n left = left + step\r\n break\r\n case KEYS.UP: \r\n top = top - step\r\n break\r\n case KEYS.DOWN: \r\n top = top + step\r\n break\r\n default: break\r\n }\r\n return { ...el, left, top }\r\n }\r\n\r\n if (activeGroupElementId.value) {\r\n newElementList = currentSlide.value.elements.map(el => {\r\n return activeGroupElementId.value === el.id ? move(el) : el\r\n })\r\n }\r\n else {\r\n newElementList = currentSlide.value.elements.map(el => {\r\n return activeElementIdList.value.includes(el.id) ? move(el) : el\r\n })\r\n }\r\n\r\n slidesStore.updateSlide({ elements: newElementList })\r\n addHistorySnapshot()\r\n }\r\n\r\n return {\r\n moveElement,\r\n }\r\n}","import { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ElementOrderCommands } from '@/types/edit'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 获取组合元素层级范围\n * @param elementList 本页所有元素列表\n * @param combineElementList 组合元素列表\n */\n const getCombineElementLevelRange = (elementList: PPTElement[], combineElementList: PPTElement[]) => {\n return {\n minLevel: elementList.findIndex(_element => _element.id === combineElementList[0].id),\n maxLevel: elementList.findIndex(_element => _element.id === combineElementList[combineElementList.length - 1].id),\n }\n }\n\n /**\n * 上移一层\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveUpElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n // 如果被操作的元素是组合元素成员,需要将该组合全部成员一起进行移动\n if (element.groupId) {\n\n // 获取到该组合全部成员,以及所有成员的层级范围\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel, maxLevel } = getCombineElementLevelRange(elementList, combineElementList)\n\n // 已经处在顶层,无法继续移动\n if (maxLevel === elementList.length - 1) return\n\n // 通过组合成员范围的最大值,获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n // 若上层元素处在另一个组合中,则将上述被移除的组合元素插入到该上层组合上方\n // 若上层元素不处于任何分组中,则将上述被移除的组合元素插入到该上层元素上方\n const nextElement = copyOfElementList[maxLevel + 1]\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n\n if (nextElement.groupId) {\n const nextCombineElementList = copyOfElementList.filter(_element => _element.groupId === nextElement.groupId)\n copyOfElementList.splice(minLevel + nextCombineElementList.length, 0, ...movedElementList)\n }\n else copyOfElementList.splice(minLevel + 1, 0, ...movedElementList)\n }\n\n // 如果被操作的元素不是组合元素成员\n else {\n\n // 获取该元素在列表中的层级\n const level = elementList.findIndex(item => item.id === element.id)\n\n // 已经处在顶层,无法继续移动\n if (level === elementList.length - 1) return\n\n // 获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n const nextElement = copyOfElementList[level + 1]\n const movedElement = copyOfElementList.splice(level, 1)[0]\n\n // 通过组合成员范围的最大值,获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n // 若上层元素处在另一个组合中,则将上述被移除的组合元素插入到该上层组合上方\n // 若上层元素不处于任何分组中,则将上述被移除的组合元素插入到该上层元素上方\n if (nextElement.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === nextElement.groupId)\n copyOfElementList.splice(level + combineElementList.length, 0, movedElement)\n }\n else copyOfElementList.splice(level + 1, 0, movedElement)\n }\n\n return copyOfElementList\n }\n\n /**\n * 下移一层,操作方式同上移\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveDownElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n if (element.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel } = getCombineElementLevelRange(elementList, combineElementList)\n if (minLevel === 0) return\n\n const prevElement = copyOfElementList[minLevel - 1]\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n\n if (prevElement.groupId) {\n const prevCombineElementList = copyOfElementList.filter(_element => _element.groupId === prevElement.groupId)\n copyOfElementList.splice(minLevel - prevCombineElementList.length, 0, ...movedElementList)\n }\n else copyOfElementList.splice(minLevel - 1, 0, ...movedElementList)\n }\n\n else {\n const level = elementList.findIndex(item => item.id === element.id)\n if (level === 0) return\n\n const prevElement = copyOfElementList[level - 1]\n const movedElement = copyOfElementList.splice(level, 1)[0]\n\n if (prevElement.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === prevElement.groupId)\n copyOfElementList.splice(level - combineElementList.length, 0, movedElement)\n }\n else copyOfElementList.splice(level - 1, 0, movedElement)\n }\n\n return copyOfElementList\n }\n\n /**\n * 置顶层\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveTopElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n // 如果被操作的元素是组合元素成员,需要将该组合全部成员一起进行移动\n if (element.groupId) {\n\n // 获取到该组合全部成员,以及所有成员的层级范围\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel, maxLevel } = getCombineElementLevelRange(elementList, combineElementList)\n\n // 已经处在顶层,无法继续移动\n if (maxLevel === elementList.length - 1) return null\n\n // 将该组合元素从元素列表中移除,然后将被移除的元素添加到元素列表顶部\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n copyOfElementList.push(...movedElementList)\n }\n\n // 如果被操作的元素不是组合元素成员\n else {\n\n // 获取该元素在列表中的层级\n const level = elementList.findIndex(item => item.id === element.id)\n\n // 已经处在顶层,无法继续移动\n if (level === elementList.length - 1) return null\n\n // 将该组合元素从元素列表中移除,然后将被移除的元素添加到元素列表底部\n copyOfElementList.splice(level, 1)\n copyOfElementList.push(element)\n }\n\n return copyOfElementList\n }\n\n /**\n * 置底层,操作方式同置顶\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveBottomElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n if (element.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel } = getCombineElementLevelRange(elementList, combineElementList)\n if (minLevel === 0) return\n\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n copyOfElementList.unshift(...movedElementList)\n }\n\n else {\n const level = elementList.findIndex(item => item.id === element.id)\n if (level === 0) return\n\n copyOfElementList.splice(level, 1)\n copyOfElementList.unshift(element)\n }\n\n return copyOfElementList\n }\n\n /**\n * 调整元素层级\n * @param element 需要调整层级的元素\n * @param command 调整命令:上移、下移、置顶、置底\n */\n const orderElement = (element: PPTElement, command: ElementOrderCommands) => {\n let newElementList\n \n if (command === ElementOrderCommands.UP) newElementList = moveUpElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.DOWN) newElementList = moveDownElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.TOP) newElementList = moveTopElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.BOTTOM) newElementList = moveBottomElement(currentSlide.value.elements, element)\n\n if (!newElementList) return\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n return {\n orderElement,\n }\n}","// 进入全屏\nexport const enterFullscreen = () => {\n const docElm = document.documentElement\n if (docElm.requestFullscreen) docElm.requestFullscreen() \n else if (docElm.mozRequestFullScreen) docElm.mozRequestFullScreen() \n else if (docElm.webkitRequestFullScreen) docElm.webkitRequestFullScreen()\n else if (docElm.msRequestFullscreen) docElm.msRequestFullscreen()\n}\n\n// 退出全屏\nexport const exitFullscreen = () => {\n if (document.exitFullscreen) document.exitFullscreen()\n else if (document.mozCancelFullScreen) document.mozCancelFullScreen()\n else if (document.webkitExitFullscreen) document.webkitExitFullscreen()\n else if (document.msExitFullscreen) document.msExitFullscreen()\n}\n\n// 判断是否全屏\nexport const isFullscreen = () => {\n const fullscreenElement = \n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement ||\n document.msFullscreenElement ||\n document.webkitCurrentFullScreenElement\n return !!fullscreenElement\n}","import { useScreenStore, useSlidesStore } from '@/store'\nimport { enterFullscreen, exitFullscreen, isFullscreen } from '@/utils/fullscreen'\n\nexport default () => {\n const screenStore = useScreenStore()\n const slidesStore = useSlidesStore()\n\n // 进入放映状态(从当前页开始)\n const enterScreening = () => {\n enterFullscreen()\n screenStore.setScreening(true)\n }\n\n // 进入放映状态(从第一页开始)\n const enterScreeningFromStart = () => {\n slidesStore.updateSlideIndex(0)\n enterScreening()\n }\n\n // 退出放映状态\n const exitScreening = () => {\n screenStore.setScreening(false)\n if (isFullscreen()) exitFullscreen()\n }\n\n return {\n enterScreening,\n enterScreeningFromStart,\n exitScreening,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\n\nexport default () => {\n const mainStore = useMainStore()\n const { canvasPercentage, canvasScale, canvasDragged } = storeToRefs(mainStore)\n\n const canvasScalePercentage = computed(() => Math.round(canvasScale.value * 100) + '%')\n\n /**\n * 缩放画布百分比\n * @param command 缩放命令:放大、缩小\n */\n const scaleCanvas = (command: '+' | '-') => {\n let percentage = canvasPercentage.value\n const step = 5\n const max = 200\n const min = 30\n if (command === '+' && percentage <= max) percentage += step\n if (command === '-' && percentage >= min) percentage -= step\n\n mainStore.setCanvasPercentage(percentage)\n }\n\n /**\n * 设置画布缩放比例\n * 但不是直接设置该值,而是通过设置画布可视区域百分比来动态计算\n * @param value 目标画布缩放比例\n */\n const setCanvasScalePercentage = (value: number) => {\n const percentage = Math.round(value / canvasScale.value * canvasPercentage.value) / 100\n mainStore.setCanvasPercentage(percentage)\n }\n\n /**\n * 重置画布尺寸和位置\n */\n const resetCanvas = () => {\n mainStore.setCanvasPercentage(90)\n if (canvasDragged) mainStore.setCanvasDragged(false)\n }\n\n return {\n canvasScalePercentage,\n setCanvasScalePercentage,\n scaleCanvas,\n resetCanvas,\n }\n}","import { onMounted, onUnmounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport { ElementOrderCommands } from '@/types/edit'\nimport { KEYS } from '@/configs/hotkey'\n\nimport useSlideHandler from './useSlideHandler'\nimport useLockElement from './useLockElement'\nimport useDeleteElement from './useDeleteElement'\nimport useCombineElement from './useCombineElement'\nimport useCopyAndPasteElement from './useCopyAndPasteElement'\nimport useSelectAllElement from './useSelectAllElement'\nimport useMoveElement from './useMoveElement'\nimport useOrderElement from './useOrderElement'\nimport useHistorySnapshot from './useHistorySnapshot'\nimport useScreening from './useScreening'\nimport useScaleCanvas from './useScaleCanvas'\n\nexport default () => {\n const mainStore = useMainStore()\n const keyboardStore = useKeyboardStore()\n const {\n activeElementIdList,\n disableHotkeys,\n handleElement,\n handleElementId,\n editorAreaFocus,\n thumbnailsFocus,\n showSearchPanel,\n } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(useSlidesStore())\n const { ctrlKeyState, shiftKeyState, spaceKeyState } = storeToRefs(keyboardStore)\n\n const {\n updateSlideIndex,\n copySlide,\n createSlide,\n deleteSlide,\n cutSlide,\n copyAndPasteSlide,\n selectAllSlide,\n } = useSlideHandler()\n\n const { combineElements, uncombineElements } = useCombineElement()\n const { deleteElement } = useDeleteElement()\n const { lockElement } = useLockElement()\n const { copyElement, cutElement, quickCopyElement } = useCopyAndPasteElement()\n const { selectAllElement } = useSelectAllElement()\n const { moveElement } = useMoveElement()\n const { orderElement } = useOrderElement()\n const { redo, undo } = useHistorySnapshot()\n const { enterScreening, enterScreeningFromStart } = useScreening()\n const { scaleCanvas, resetCanvas } = useScaleCanvas()\n\n const copy = () => {\n if (activeElementIdList.value.length) copyElement()\n else if (thumbnailsFocus.value) copySlide()\n }\n\n const cut = () => {\n if (activeElementIdList.value.length) cutElement()\n else if (thumbnailsFocus.value) cutSlide()\n }\n\n const quickCopy = () => {\n if (activeElementIdList.value.length) quickCopyElement()\n else if (thumbnailsFocus.value) copyAndPasteSlide()\n }\n\n const selectAll = () => {\n if (editorAreaFocus.value) selectAllElement()\n if (thumbnailsFocus.value) selectAllSlide()\n }\n\n const lock = () => {\n if (!editorAreaFocus.value) return\n lockElement()\n }\n const combine = () => {\n if (!editorAreaFocus.value) return\n combineElements()\n }\n\n const uncombine = () => {\n if (!editorAreaFocus.value) return\n uncombineElements()\n }\n\n const remove = () => {\n if (activeElementIdList.value.length) deleteElement()\n else if (thumbnailsFocus.value) deleteSlide()\n }\n\n const move = (key: string) => {\n if (activeElementIdList.value.length) moveElement(key)\n else if (key === KEYS.UP || key === KEYS.DOWN) updateSlideIndex(key)\n }\n\n const moveSlide = (key: string) => {\n if (key === KEYS.PAGEUP) updateSlideIndex(KEYS.UP)\n else if (key === KEYS.PAGEDOWN) updateSlideIndex(KEYS.DOWN)\n }\n\n const order = (command: ElementOrderCommands) => {\n if (!handleElement.value) return\n orderElement(handleElement.value, command)\n }\n\n const create = () => {\n if (!thumbnailsFocus.value) return\n createSlide()\n }\n\n const tabActiveElement = () => {\n if (!currentSlide.value.elements.length) return\n if (!handleElementId.value) {\n const firstElement = currentSlide.value.elements[0]\n mainStore.setActiveElementIdList([firstElement.id])\n return\n }\n const currentIndex = currentSlide.value.elements.findIndex(el => el.id === handleElementId.value)\n const nextIndex = currentIndex >= currentSlide.value.elements.length - 1 ? 0 : currentIndex + 1\n const nextElementId = currentSlide.value.elements[nextIndex].id\n\n mainStore.setActiveElementIdList([nextElementId])\n }\n\n const keydownListener = (e: KeyboardEvent) => {\n const { ctrlKey, shiftKey, altKey, metaKey } = e\n const ctrlOrMetaKeyActive = ctrlKey || metaKey\n \n const key = e.key.toUpperCase()\n\n if (ctrlOrMetaKeyActive && !ctrlKeyState.value) keyboardStore.setCtrlKeyState(true)\n if (shiftKey && !shiftKeyState.value) keyboardStore.setShiftKeyState(true)\n if (!disableHotkeys.value && key === KEYS.SPACE) keyboardStore.setSpaceKeyState(true)\n\n \n if (ctrlOrMetaKeyActive && key === KEYS.P) {\n e.preventDefault()\n mainStore.setDialogForExport('pdf')\n return\n }\n if (shiftKey && key === KEYS.F5) {\n e.preventDefault()\n enterScreening()\n keyboardStore.setShiftKeyState(false)\n return\n }\n if (key === KEYS.F5) {\n e.preventDefault()\n enterScreeningFromStart()\n return\n }\n if (ctrlKey && key === KEYS.F) {\n e.preventDefault()\n mainStore.setSearchPanelState(!showSearchPanel.value)\n return\n }\n \n if (!editorAreaFocus.value && !thumbnailsFocus.value) return \n\n if (ctrlOrMetaKeyActive && key === KEYS.C) {\n if (disableHotkeys.value) return\n e.preventDefault()\n copy()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.X) {\n if (disableHotkeys.value) return\n e.preventDefault()\n cut()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.D) {\n if (disableHotkeys.value) return\n e.preventDefault()\n quickCopy()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.Z) {\n if (disableHotkeys.value) return\n e.preventDefault()\n undo()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.Y) {\n if (disableHotkeys.value) return\n e.preventDefault()\n redo()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.A) {\n if (disableHotkeys.value) return\n e.preventDefault()\n selectAll()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.L) {\n if (disableHotkeys.value) return\n e.preventDefault()\n lock()\n }\n if (!shiftKey && ctrlOrMetaKeyActive && key === KEYS.G) {\n if (disableHotkeys.value) return\n e.preventDefault()\n combine()\n }\n if (shiftKey && ctrlOrMetaKeyActive && key === KEYS.G) {\n if (disableHotkeys.value) return\n e.preventDefault()\n uncombine()\n }\n if (altKey && key === KEYS.F) {\n if (disableHotkeys.value) return\n e.preventDefault()\n order(ElementOrderCommands.TOP)\n }\n if (altKey && key === KEYS.B) {\n if (disableHotkeys.value) return\n e.preventDefault()\n order(ElementOrderCommands.BOTTOM)\n }\n if (key === KEYS.DELETE || key === KEYS.BACKSPACE) {\n if (disableHotkeys.value) return\n e.preventDefault()\n remove()\n }\n if (key === KEYS.UP) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.UP)\n }\n if (key === KEYS.DOWN) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.DOWN)\n }\n if (key === KEYS.LEFT) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.LEFT)\n }\n if (key === KEYS.RIGHT) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.RIGHT)\n }\n if (key === KEYS.PAGEUP) {\n if (disableHotkeys.value) return\n e.preventDefault()\n moveSlide(KEYS.PAGEUP)\n }\n if (key === KEYS.PAGEDOWN) {\n if (disableHotkeys.value) return\n e.preventDefault()\n moveSlide(KEYS.PAGEDOWN)\n }\n if (key === KEYS.ENTER) {\n if (disableHotkeys.value) return\n e.preventDefault()\n create()\n }\n if (key === KEYS.MINUS) {\n if (disableHotkeys.value) return\n e.preventDefault()\n scaleCanvas('-')\n }\n if (key === KEYS.EQUAL) {\n if (disableHotkeys.value) return\n e.preventDefault()\n scaleCanvas('+')\n }\n if (key === KEYS.DIGIT_0) {\n if (disableHotkeys.value) return\n e.preventDefault()\n resetCanvas()\n }\n if (key === KEYS.TAB) {\n if (disableHotkeys.value) return\n e.preventDefault()\n tabActiveElement()\n }\n }\n \n const keyupListener = () => {\n if (ctrlKeyState.value) keyboardStore.setCtrlKeyState(false)\n if (shiftKeyState.value) keyboardStore.setShiftKeyState(false)\n if (spaceKeyState.value) keyboardStore.setSpaceKeyState(false)\n }\n\n onMounted(() => {\n document.addEventListener('keydown', keydownListener)\n document.addEventListener('keyup', keyupListener)\n window.addEventListener('blur', keyupListener)\n })\n onUnmounted(() => {\n document.removeEventListener('keydown', keydownListener)\n document.removeEventListener('keyup', keyupListener)\n window.removeEventListener('blur', keyupListener)\n })\n}","import { onMounted, onUnmounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { getImageDataURL } from '@/utils/image'\nimport usePasteTextClipboardData from './usePasteTextClipboardData'\nimport useCreateElement from './useCreateElement'\n\nexport default () => {\n const { editorAreaFocus, thumbnailsFocus, disableHotkeys } = storeToRefs(useMainStore())\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { createImageElement } = useCreateElement()\n\n // 粘贴图片到幻灯片元素\n const pasteImageFile = (imageFile: File) => {\n getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))\n }\n\n /**\n * 粘贴事件监听\n * @param e ClipboardEvent\n */\n const pasteListener = (e: ClipboardEvent) => {\n if (!editorAreaFocus.value && !thumbnailsFocus.value) return\n if (disableHotkeys.value) return\n\n if (!e.clipboardData) return\n\n const clipboardDataItems = e.clipboardData.items\n const clipboardDataFirstItem = clipboardDataItems[0]\n\n if (!clipboardDataFirstItem) return\n\n // 如果剪贴板内有图片,优先尝试读取图片\n for (const item of clipboardDataItems) {\n if (item.kind === 'file' && item.type.indexOf('image') !== -1) {\n const imageFile = item.getAsFile()\n if (imageFile) pasteImageFile(imageFile)\n return\n }\n }\n \n // 如果剪贴板内没有图片,但有文字内容,尝试解析文字内容\n if (clipboardDataFirstItem.kind === 'string' && clipboardDataFirstItem.type === 'text/plain') {\n clipboardDataFirstItem.getAsString(text => pasteTextClipboardData(text))\n }\n }\n\n onMounted(() => {\n document.addEventListener('paste', pasteListener)\n })\n onUnmounted(() => {\n document.removeEventListener('paste', pasteListener)\n })\n}","import { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { parse, type Shape, type Element } from 'pptxtojson'\nimport { nanoid } from 'nanoid'\nimport type { Slide, TableCellStyle, TableCell, ChartType, ChartOptions, SlideBackground, PPTShapeElement, PPTLineElement } from '@/types/slides'\nimport { useSlidesStore } from '@/store'\nimport { decrypt } from '@/utils/crypto'\nimport { type ShapePoolItem, SHAPE_LIST, SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\nimport message from '@/utils/message'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { theme } = storeToRefs(useSlidesStore())\n\n const { addSlidesFromData, isEmptySlide } = useAddSlidesOrElements()\n\n const exporting = ref(false)\n\n // 导入pptist文件\n const importSpecificFile = (files: FileList, cover = false) => {\n const file = files[0]\n\n const reader = new FileReader()\n reader.addEventListener('load', () => {\n try {\n const slides = JSON.parse(decrypt(reader.result as string))\n if (cover) slidesStore.setSlides(slides)\n else if (isEmptySlide.value) slidesStore.setSlides(slides)\n else addSlidesFromData(slides)\n }\n catch {\n message.error('无法正确读取 / 解析该文件')\n }\n })\n reader.readAsText(file)\n }\n\n const parseLineElement = (el: Shape): PPTLineElement => {\n let start: [number, number] = [0, 0]\n let end: [number, number] = [0, 0]\n\n if (!el.isFlipV && !el.isFlipH) { // 右下\n start = [0, 0]\n end = [el.width, el.height]\n }\n else if (el.isFlipV && el.isFlipH) { // 左上\n start = [el.width, el.height]\n end = [0, 0]\n }\n else if (el.isFlipV && !el.isFlipH) { // 右上\n start = [0, el.height]\n end = [el.width, 0]\n }\n else { // 左下\n start = [el.width, 0]\n end = [0, el.height]\n }\n return {\n type: 'line',\n id: nanoid(10),\n width: el.borderWidth || 1,\n left: el.left,\n top: el.top,\n start,\n end,\n style: el.borderType,\n color: el.borderColor,\n points: ['', el.shapType === 'straightConnector1' ? 'arrow' : '']\n }\n }\n\n // 导入PPTX文件\n const importPPTXFile = (files: FileList) => {\n const file = files[0]\n if (!file) return\n\n exporting.value = true\n\n const shapeList: ShapePoolItem[] = []\n for (const item of SHAPE_LIST) {\n shapeList.push(...item.children)\n }\n \n const reader = new FileReader()\n reader.onload = async e => {\n const json = await parse(e.target!.result as ArrayBuffer)\n\n const width = json.size.width\n const scale = VIEWPORT_SIZE / width\n\n const slides: Slide[] = []\n for (const item of json.slides) {\n const { type, value } = item.fill\n let background: SlideBackground\n if (type === 'image') {\n background = {\n type: 'image',\n image: value.picBase64,\n imageSize: 'cover',\n }\n }\n else if (type === 'gradient') {\n background = {\n type: 'gradient',\n gradientType: 'linear',\n gradientColor: [value.colors[0], value.colors[1]],\n gradientRotate: value.rot,\n }\n }\n else {\n background = {\n type: 'solid',\n color: value,\n }\n }\n\n const slide: Slide = {\n id: nanoid(10),\n elements: [],\n background,\n }\n\n const parseElements = (elements: Element[]) => {\n for (const el of elements) {\n el.width = el.width * scale\n el.height = el.height * scale\n el.left = el.left * scale\n el.top = el.top * scale\n \n if (el.type === 'text') {\n slide.elements.push({\n type: 'text',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: el.rotate,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n content: el.content,\n lineHeight: 1,\n outline: {\n color: el.borderColor,\n width: el.borderWidth,\n style: el.borderType,\n },\n fill: el.fillColor,\n })\n }\n else if (el.type === 'image') {\n slide.elements.push({\n type: 'image',\n id: nanoid(10),\n src: el.src,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n fixedRatio: true,\n rotate: el.rotate,\n })\n }\n else if (el.type === 'shape') {\n if (el.shapType === 'line' || el.shapType === 'straightConnector1') {\n const lineElement = parseLineElement(el)\n slide.elements.push(lineElement)\n }\n else {\n const shape = shapeList.find(item => item.pptxShapeType === el.shapType)\n \n const element: PPTShapeElement = {\n type: 'shape',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: el.fillColor || 'none',\n fixedRatio: false,\n rotate: el.rotate,\n outline: {\n color: el.borderColor,\n width: el.borderWidth,\n style: el.borderType,\n },\n text: {\n content: el.content,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n align: 'middle',\n }\n }\n \n if (shape) {\n element.path = shape.path\n element.viewBox = shape.viewBox\n \n if (shape.pathFormula) {\n element.pathFormula = shape.pathFormula\n element.viewBox = [el.width, el.height]\n \n const pathFormula = SHAPE_PATH_FORMULAS[shape.pathFormula]\n if ('editable' in pathFormula) {\n element.path = pathFormula.formula(el.width, el.height, pathFormula.defaultValue)\n element.keypoint = pathFormula.defaultValue\n }\n else element.path = pathFormula.formula(el.width, el.height)\n }\n }\n \n slide.elements.push(element)\n }\n }\n else if (el.type === 'table') {\n const row = el.data.length\n const col = el.data[0].length\n \n const style: TableCellStyle = {\n fontname: theme.value.fontName,\n color: theme.value.fontColor,\n }\n const data: TableCell[][] = []\n for (let i = 0; i < row; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < col; j++) {\n const cellData = el.data[i][j]\n rowCells.push({\n id: nanoid(10),\n colspan: 1,\n rowspan: cellData.rowSpan || 1,\n text: cellData.text,\n style,\n })\n }\n data.push(rowCells)\n }\n \n const colWidths: number[] = new Array(col).fill(1 / col)\n \n slide.elements.push({\n type: 'table',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n colWidths,\n rotate: 0,\n data,\n outline: {\n width: 2,\n style: 'solid',\n color: '#eeece1',\n },\n theme: {\n color: theme.value.themeColor,\n rowHeader: true,\n rowFooter: false,\n colHeader: false,\n colFooter: false,\n },\n cellMinHeight: 36,\n })\n }\n else if (el.type === 'chart') {\n let labels: string[]\n let legends: string[]\n let series: number[][]\n \n if (el.chartType === 'scatterChart') {\n labels = el.data[0].map(item => item + '')\n legends = ['系列1']\n series = [el.data[1]]\n }\n else {\n labels = Object.values(el.data[0].xlabels)\n legends = el.data.map(item => item.key)\n series = el.data.map(item => item.values.map(v => v.y))\n }\n \n let options: ChartOptions = {}\n \n let chartType: ChartType = 'bar'\n if (el.chartType === 'barChart') {\n chartType = 'bar'\n }\n if (el.chartType === 'stackedBarChart') {\n chartType = 'bar'\n options = { stackBars: true }\n }\n else if (el.chartType === 'lineChart') {\n chartType = 'line'\n }\n else if (el.chartType === 'areaChart') {\n chartType = 'line'\n options = { showArea: true }\n }\n else if (el.chartType === 'scatterChart') {\n chartType = 'line'\n options = { showLine: false }\n }\n else if (el.chartType === 'pieChart' || el.chartType === 'pie3DChart') {\n chartType = 'pie'\n }\n \n slide.elements.push({\n type: 'chart',\n id: nanoid(10),\n chartType: chartType,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: 0,\n themeColor: [theme.value.themeColor],\n gridColor: theme.value.fontColor,\n data: {\n labels,\n legends,\n series,\n },\n options,\n })\n }\n else if (el.type === 'group') {\n const elements = el.elements.map(_el => ({\n ..._el,\n left: _el.left + el.left,\n top: _el.top + el.top,\n }))\n parseElements(elements)\n }\n }\n }\n parseElements(item.elements)\n slides.push(slide)\n }\n if (isEmptySlide.value) slidesStore.setSlides(slides)\n else addSlidesFromData(slides)\n exporting.value = false\n }\n reader.readAsArrayBuffer(file)\n }\n\n return {\n importSpecificFile,\n importPPTXFile,\n exporting,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a0322054\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"hotkey-doc\" }\nconst _hoisted_2 = { class: \"title\" }\nconst _hoisted_3 = { class: \"label\" }\nconst _hoisted_4 = { class: \"value\" }\n\nimport { HOTKEY_DOC } from '@/configs/hotkey' \n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'HotkeyDoc',\n setup(__props) {\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(HOTKEY_DOC), (item) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (hotkey) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"hotkey-item\",\n key: hotkey.label\n }, [\n _createElementVNode(\"div\", _hoisted_3, _toDisplayString(hotkey.label), 1),\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(hotkey.value), 1)\n ]))\n }), 128))\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./HotkeyDoc.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./HotkeyDoc.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./HotkeyDoc.vue?vue&type=style&index=0&id=a0322054&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a0322054\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-64bedb34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"accept\"]\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FileInput',\n props: {\n accept: { default: 'image/*' }\n },\n emits: [\"change\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nconst inputRef = ref()\n\nconst handleClick = () => {\n if (!inputRef.value) return\n inputRef.value.value = ''\n inputRef.value.click()\n}\nconst handleChange = (e: Event) => {\n const files = (e.target as HTMLInputElement).files\n if (files) emit('change', files)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"file-input\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (handleClick()))\n }, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"input\", {\n class: \"input\",\n type: \"file\",\n name: \"upload\",\n ref_key: \"inputRef\",\n ref: inputRef,\n accept: _ctx.accept,\n onChange: _cache[0] || (_cache[0] = $event => handleChange($event))\n }, null, 40, _hoisted_1)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./FileInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FileInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FileInput.vue?vue&type=style&index=0&id=64bedb34&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-64bedb34\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a5c6b41c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"fullscreen-spin\"\n}\nconst _hoisted_2 = { class: \"spin\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"spinner\" }, null, -1))\nconst _hoisted_4 = { class: \"text\" }\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FullscreenSpin',\n props: {\n loading: { type: Boolean, default: false },\n tip: { default: '' }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(_ctx.tip), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./FullscreenSpin.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FullscreenSpin.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FullscreenSpin.vue?vue&type=style&index=0&id=a5c6b41c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a5c6b41c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, vShow as _vShow, normalizeClass as _normalizeClass, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, Teleport as _Teleport, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-749dadac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\n\nimport { computed, ref, type CSSProperties } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Drawer',\n props: {\n visible: { type: Boolean },\n width: { default: 320 },\n contentStyle: {},\n placement: { default: 'right' }\n },\n emits: [\"update:visible\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return {\n width: props.width + 'px',\n ...(props.contentStyle || {})\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconClose = _resolveComponent(\"IconClose\")!\n\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, {\n name: `drawer-slide-${_ctx.placement}`,\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (contentVisible.value = false)),\n onBeforeEnter: _cache[2] || (_cache[2] = ($event: any) => (contentVisible.value = true))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: _normalizeClass(['drawer', _ctx.placement]),\n style: _normalizeStyle({ width: props.width + 'px' })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"title\"),\n _createElementVNode(\"span\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('update:visible', false)))\n }, [\n _createVNode(_component_IconClose)\n ])\n ]),\n (contentVisible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"content\",\n style: _normalizeStyle(contentStyle.value)\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 6), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n }, 8, [\"name\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Drawer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Drawer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Drawer.vue?vue&type=style&index=0&id=749dadac&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-749dadac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, withKeys as _withKeys, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a97ba0dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"prefix\" }\nconst _hoisted_2 = [\"disabled\", \"value\", \"placeholder\"]\nconst _hoisted_3 = { class: \"suffix\" }\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Input',\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n placeholder: { default: '' }\n },\n emits: [\"update:value\", \"input\", \"change\", \"blur\", \"focus\", \"enter\"],\n setup(__props: any, { expose: __expose, emit }) {\n\n\n\n\n\nconst focused = ref(false)\n\nconst handleInput = (e: Event) => {\n emit('update:value', (e.target as HTMLInputElement).value)\n}\nconst handleBlur = (e: Event) => {\n focused.value = false\n emit('blur', e)\n}\nconst handleFocus = (e: Event) => {\n focused.value = true\n emit('focus', e)\n}\n\nconst inputRef = ref()\nconst focus = () => {\n if (inputRef.value) inputRef.value.focus()\n}\n\n__expose({\n focus,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"input\", {\n 'disabled': _ctx.disabled,\n 'focused': focused.value,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prefix\")\n ]),\n _createElementVNode(\"input\", {\n type: \"text\",\n ref_key: \"inputRef\",\n ref: inputRef,\n disabled: _ctx.disabled,\n value: _ctx.value,\n placeholder: _ctx.placeholder,\n onInput: _cache[0] || (_cache[0] = $event => handleInput($event)),\n onFocus: _cache[1] || (_cache[1] = $event => handleFocus($event)),\n onBlur: _cache[2] || (_cache[2] = $event => handleBlur($event)),\n onChange: _cache[3] || (_cache[3] = $event => emit('change', $event)),\n onKeydown: _cache[4] || (_cache[4] = _withKeys($event => emit('enter', $event), [\"enter\"]))\n }, null, 40, _hoisted_2),\n _createElementVNode(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"suffix\")\n ])\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./Input.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Input.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Input.vue?vue&type=style&index=0&id=a97ba0dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a97ba0dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { type CSSProperties, onMounted, ref, watch, computed } from 'vue'\nimport tippy, { type Instance, type Placement } from 'tippy.js'\n\nimport 'tippy.js/animations/scale.css'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Popover',\n props: {\n value: { type: Boolean, default: false },\n trigger: { default: 'click' },\n placement: { default: 'bottom' },\n appendTo: {},\n contentStyle: {},\n center: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst instance = ref()\nconst triggerRef = ref()\nconst contentRef = ref()\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return props.contentStyle || {}\n})\n\nwatch(() => props.value, () => {\n if (!instance.value) return\n if (props.value) instance.value.show()\n else instance.value.hide()\n})\n\nonMounted(() => {\n instance.value = tippy(triggerRef.value!, {\n content: contentRef.value!,\n allowHTML: true,\n trigger: props.trigger,\n placement: props.placement,\n interactive: true,\n appendTo: props.appendTo || document.body,\n maxWidth: 'none',\n offset: [0, 8],\n duration: 200,\n animation: 'scale',\n theme: 'popover',\n onShow() {\n contentVisible.value = true\n },\n onShown() {\n if (!props.value) emit('update:value', true)\n },\n onHidden() {\n if (props.value) emit('update:value', false)\n contentVisible.value = false\n },\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"popover\", { 'center': _ctx.center }]),\n ref_key: \"triggerRef\",\n ref: triggerRef\n }, [\n _createElementVNode(\"div\", {\n class: \"popover-content\",\n style: _normalizeStyle(contentStyle.value),\n ref_key: \"contentRef\",\n ref: contentRef\n }, [\n (contentVisible.value)\n ? _renderSlot(_ctx.$slots, \"content\", { key: 0 })\n : _createCommentVNode(\"\", true)\n ], 4),\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./Popover.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Popover.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Popover.vue?vue&type=style&index=0&id=70fabe9a&lang=scss&scoped=true\"\nimport \"./Popover.vue?vue&type=style&index=1&id=70fabe9a&lang=scss\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-70fabe9a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'PopoverMenuItem',\n props: {\n center: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"popover-menu-item\", { 'center': _ctx.center }]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('click')))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","import script from \"./PopoverMenuItem.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./PopoverMenuItem.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./PopoverMenuItem.vue?vue&type=style&index=0&id=2f137c4f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2f137c4f\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, resolveComponent as _resolveComponent, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2394d37c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"editor-header\" }\nconst _hoisted_2 = { class: \"left\" }\nconst _hoisted_3 = { class: \"menu-item\" }\nconst _hoisted_4 = { class: \"title\" }\nconst _hoisted_5 = [\"title\"]\nconst _hoisted_6 = { class: \"right\" }\nconst _hoisted_7 = { class: \"group-menu-item\" }\nconst _hoisted_8 = { class: \"arrow-btn\" }\nconst _hoisted_9 = {\n class: \"github-link\",\n href: \"https://github.com/pipipi-pikachu/PPTist\",\n target: \"_blank\"\n}\nconst _hoisted_10 = { class: \"menu-item\" }\n\nimport { nextTick, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport useScreening from '@/hooks/useScreening'\nimport useImport from '@/hooks/useImport'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport type { DialogForExportTypes } from '@/types/export'\n\nimport HotkeyDoc from './HotkeyDoc.vue'\nimport FileInput from '@/components/FileInput.vue'\nimport FullscreenSpin from '@/components/FullscreenSpin.vue'\nimport Drawer from '@/components/Drawer.vue'\nimport Input from '@/components/Input.vue'\nimport Popover from '@/components/Popover.vue'\nimport PopoverMenuItem from '@/components/PopoverMenuItem.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { title } = storeToRefs(slidesStore)\nconst { enterScreening, enterScreeningFromStart } = useScreening()\nconst { importSpecificFile, importPPTXFile, exporting } = useImport()\nconst { resetSlides } = useSlideHandler()\n\nconst mainMenuVisible = ref(false)\nconst hotkeyDrawerVisible = ref(false)\nconst editingTitle = ref(false)\nconst titleInputRef = ref()\nconst titleValue = ref('')\n\nconst startEditTitle = () => {\n titleValue.value = title.value\n editingTitle.value = true\n nextTick(() => titleInputRef.value?.focus())\n}\n\nconst handleUpdateTitle = () => {\n slidesStore.setTitle(titleValue.value)\n editingTitle.value = false\n}\n\nconst goLink = (url: string) => {\n window.open(url)\n mainMenuVisible.value = false\n}\n\nconst setDialogForExport = (type: DialogForExportTypes) => {\n mainStore.setDialogForExport(type)\n mainMenuVisible.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconHamburgerButton = _resolveComponent(\"IconHamburgerButton\")!\n const _component_IconPpt = _resolveComponent(\"IconPpt\")!\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n const _component_IconDownload = _resolveComponent(\"IconDownload\")!\n const _component_IconGithub = _resolveComponent(\"IconGithub\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Popover, {\n trigger: \"click\",\n placement: \"bottom-start\",\n value: mainMenuVisible.value,\n \"onUpdate:value\": _cache[7] || (_cache[7] = ($event: any) => ((mainMenuVisible).value = $event))\n }, {\n content: _withCtx(() => [\n _createVNode(FileInput, {\n accept: \".pptist\",\n onChange: _cache[0] || (_cache[0] = files => {\n _unref(importSpecificFile)(files)\n mainMenuVisible.value = false\n })\n }, {\n default: _withCtx(() => [\n _createVNode(PopoverMenuItem, null, {\n default: _withCtx(() => [\n _createTextVNode(\"导入 pptist 文件\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(FileInput, {\n accept: \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n onChange: _cache[1] || (_cache[1] = files => {\n _unref(importPPTXFile)(files)\n mainMenuVisible.value = false\n })\n }, {\n default: _withCtx(() => [\n _createVNode(PopoverMenuItem, null, {\n default: _withCtx(() => [\n _createTextVNode(\"导入 pptx 文件(测试版)\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (setDialogForExport('pptx')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"导出文件\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[3] || (_cache[3] = ($event: any) => {_unref(resetSlides)(); mainMenuVisible.value = false})\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"重置幻灯片\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (goLink('https://github.com/pipipi-pikachu/PPTist/issues')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"意见反馈\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (goLink('https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"常见问题\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[6] || (_cache[6] = ($event: any) => {mainMenuVisible.value = false; hotkeyDrawerVisible.value = true})\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"快捷键\")\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(_component_IconHamburgerButton, { class: \"icon\" })\n ])\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_4, [\n (editingTitle.value)\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"title-input\",\n ref_key: \"titleInputRef\",\n ref: titleInputRef,\n value: titleValue.value,\n \"onUpdate:value\": _cache[8] || (_cache[8] = ($event: any) => ((titleValue).value = $event)),\n onBlur: _cache[9] || (_cache[9] = ($event: any) => (handleUpdateTitle()))\n }, null, 8, [\"value\"]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"title-text\",\n onClick: _cache[10] || (_cache[10] = ($event: any) => (startEditTitle())),\n title: _unref(title)\n }, _toDisplayString(_unref(title)), 9, _hoisted_5))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"menu-item\",\n onClick: _cache[11] || (_cache[11] = ($event: any) => (_unref(enterScreening)()))\n }, [\n _createVNode(_component_IconPpt, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '幻灯片放映']\n ]),\n _createVNode(Popover, {\n trigger: \"click\",\n center: \"\"\n }, {\n content: _withCtx(() => [\n _createVNode(PopoverMenuItem, {\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_unref(enterScreeningFromStart)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"从头开始\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(enterScreening)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"从当前页开始\")\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(_component_IconDown, { class: \"arrow\" })\n ])\n ]),\n _: 1\n })\n ]),\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"menu-item\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (setDialogForExport('pptx')))\n }, [\n _createVNode(_component_IconDownload, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '导出']\n ]),\n _createElementVNode(\"a\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(_component_IconGithub, { class: \"icon\" })\n ])\n ])\n ]),\n _createVNode(Drawer, {\n width: 320,\n visible: hotkeyDrawerVisible.value,\n \"onUpdate:visible\": _cache[15] || (_cache[15] = ($event: any) => ((hotkeyDrawerVisible).value = $event)),\n placement: \"right\"\n }, {\n default: _withCtx(() => [\n _createVNode(HotkeyDoc)\n ]),\n _: 1\n }, 8, [\"visible\"]),\n _createVNode(FullscreenSpin, {\n loading: _unref(exporting),\n tip: \"正在导入...\"\n }, null, 8, [\"loading\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=2394d37c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2394d37c\"]])\n\nexport default __exports__","import type { InjectionKey, Ref } from 'vue'\n\nexport type SlideScale = Ref\nexport type SlideId = Ref\nexport type RadioGroupValue = {\n value: Ref\n updateValue: (value: string) => void\n}\n\nexport const injectKeySlideScale: InjectionKey = Symbol()\nexport const injectKeySlideId: InjectionKey = Symbol()\nexport const injectKeyRadioGroupValue: InjectionKey = Symbol()","// 清除文字选区\nexport const removeAllRanges = () => {\n const selection = window.getSelection()\n selection && selection.removeAllRanges()\n}","import { ref, computed, onMounted, onUnmounted, watch, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nexport default (canvasRef: Ref) => {\n const viewportLeft = ref(0)\n const viewportTop = ref(0)\n\n const mainStore = useMainStore()\n const { canvasPercentage, canvasDragged } = storeToRefs(mainStore)\n const { viewportRatio } = storeToRefs(useSlidesStore())\n\n // 初始化画布可视区域的位置\n const initViewportPosition = () => {\n if (!canvasRef.value) return\n const canvasWidth = canvasRef.value.clientWidth\n const canvasHeight = canvasRef.value.clientHeight\n\n if (canvasHeight / canvasWidth > viewportRatio.value) {\n const viewportActualWidth = canvasWidth * (canvasPercentage.value / 100)\n mainStore.setCanvasScale(viewportActualWidth / VIEWPORT_SIZE)\n viewportLeft.value = (canvasWidth - viewportActualWidth) / 2\n viewportTop.value = (canvasHeight - viewportActualWidth * viewportRatio.value) / 2\n }\n else {\n const viewportActualHeight = canvasHeight * (canvasPercentage.value / 100)\n mainStore.setCanvasScale(viewportActualHeight / (VIEWPORT_SIZE * viewportRatio.value))\n viewportLeft.value = (canvasWidth - viewportActualHeight / viewportRatio.value) / 2\n viewportTop.value = (canvasHeight - viewportActualHeight) / 2\n }\n }\n\n // 更新画布可视区域的位置\n const setViewportPosition = (newValue: number, oldValue: number) => {\n if (!canvasRef.value) return\n const canvasWidth = canvasRef.value.clientWidth\n const canvasHeight = canvasRef.value.clientHeight\n\n const newViewportActualWidth = canvasWidth * (newValue / 100)\n const oldViewportActualWidth = canvasWidth * (oldValue / 100)\n const newViewportActualHeight = canvasHeight * (newValue / 100)\n const oldViewportActualHeight = canvasHeight * (oldValue / 100)\n\n if (canvasHeight / canvasWidth > viewportRatio.value) {\n mainStore.setCanvasScale(newViewportActualWidth / VIEWPORT_SIZE)\n }\n else {\n mainStore.setCanvasScale(newViewportActualHeight / (VIEWPORT_SIZE * viewportRatio.value))\n }\n viewportLeft.value = viewportLeft.value - (newViewportActualWidth - oldViewportActualWidth) / 2\n viewportTop.value = viewportTop.value - (newViewportActualHeight - oldViewportActualHeight) / 2\n }\n\n // 可视区域缩放或比例变化时,重置/更新可视区域的位置\n watch(canvasPercentage, setViewportPosition)\n watch(viewportRatio, initViewportPosition)\n\n // 画布拖拽状态改变(复原)时,重置可视区域的位置\n watch(canvasDragged, () => {\n if (!canvasDragged.value) initViewportPosition()\n })\n\n // 画布可视区域位置和大小的样式\n const viewportStyles = computed(() => ({\n width: VIEWPORT_SIZE,\n height: VIEWPORT_SIZE * viewportRatio.value,\n left: viewportLeft.value,\n top: viewportTop.value,\n }))\n\n // 监听画布尺寸发生变化时,重置可视区域的位置\n const resizeObserver = new ResizeObserver(initViewportPosition)\n\n onMounted(() => {\n if (canvasRef.value) resizeObserver.observe(canvasRef.value)\n })\n onUnmounted(() => {\n if (canvasRef.value) resizeObserver.unobserve(canvasRef.value)\n })\n\n // 拖拽画布\n const dragViewport = (e: MouseEvent) => {\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originLeft = viewportLeft.value\n const originTop = viewportTop.value\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n viewportLeft.value = originLeft + (currentPageX - startPageX)\n viewportTop.value = originTop + (currentPageY - startPageY)\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n mainStore.setCanvasDragged(true)\n }\n }\n\n return {\n viewportStyles,\n dragViewport,\n }\n}","import { type Ref, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { getElementRange } from '@/utils/element'\n\nexport default (elementList: Ref, viewportRef: Ref) => {\n const mainStore = useMainStore()\n const { canvasScale, hiddenElementIdList } = storeToRefs(mainStore)\n\n const mouseSelectionVisible = ref(false)\n const mouseSelectionQuadrant = ref(1)\n const mouseSelection = ref({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n })\n\n // 更新鼠标框选范围\n const updateMouseSelection = (e: MouseEvent) => {\n if (!viewportRef.value) return\n\n let isMouseDown = true\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const minSelectionRange = 5\n \n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const left = (startPageX - viewportRect.x) / canvasScale.value\n const top = (startPageY - viewportRect.y) / canvasScale.value\n\n // 确定框选的起始位置和其他默认值初始化\n mouseSelection.value = {\n top: top,\n left: left,\n width: 0,\n height: 0,\n }\n mouseSelectionVisible.value = false\n mouseSelectionQuadrant.value = 4\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const offsetWidth = (currentPageX - startPageX) / canvasScale.value\n const offsetHeight = (currentPageY - startPageY) / canvasScale.value\n\n const width = Math.abs(offsetWidth)\n const height = Math.abs(offsetHeight)\n\n if ( width < minSelectionRange || height < minSelectionRange ) return\n \n // 计算鼠标框选(移动)的方向\n // 按四个象限的位置区分,如右下角为第四象限\n let quadrant = 0\n if ( offsetWidth > 0 && offsetHeight > 0 ) quadrant = 4\n else if ( offsetWidth < 0 && offsetHeight < 0 ) quadrant = 2\n else if ( offsetWidth > 0 && offsetHeight < 0 ) quadrant = 1\n else if ( offsetWidth < 0 && offsetHeight > 0 ) quadrant = 3\n\n // 更新框选范围\n mouseSelection.value = {\n ...mouseSelection.value,\n width: width,\n height: height,\n }\n mouseSelectionVisible.value = true\n mouseSelectionQuadrant.value = quadrant\n }\n\n document.onmouseup = () => {\n document.onmousemove = null\n document.onmouseup = null\n isMouseDown = false\n\n // 计算画布中的元素是否处在鼠标选择范围中,处在范围中的元素设置为被选中状态\n let inRangeElementList: PPTElement[] = []\n for (let i = 0; i < elementList.value.length; i++) {\n const element = elementList.value[i]\n const mouseSelectionLeft = mouseSelection.value.left\n const mouseSelectionTop = mouseSelection.value.top\n const mouseSelectionWidth = mouseSelection.value.width\n const mouseSelectionHeight = mouseSelection.value.height\n\n const { minX, maxX, minY, maxY } = getElementRange(element)\n\n // 计算元素是否处在框选范围内时,四个框选方向的计算方式有差异\n let isInclude = false\n if (mouseSelectionQuadrant.value === 4) {\n isInclude = minX > mouseSelectionLeft && \n maxX < mouseSelectionLeft + mouseSelectionWidth && \n minY > mouseSelectionTop && \n maxY < mouseSelectionTop + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 2) {\n isInclude = minX > (mouseSelectionLeft - mouseSelectionWidth) && \n maxX < (mouseSelectionLeft - mouseSelectionWidth) + mouseSelectionWidth && \n minY > (mouseSelectionTop - mouseSelectionHeight) && \n maxY < (mouseSelectionTop - mouseSelectionHeight) + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 1) {\n isInclude = minX > mouseSelectionLeft && \n maxX < mouseSelectionLeft + mouseSelectionWidth && \n minY > (mouseSelectionTop - mouseSelectionHeight) && \n maxY < (mouseSelectionTop - mouseSelectionHeight) + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 3) {\n isInclude = minX > (mouseSelectionLeft - mouseSelectionWidth) && \n maxX < (mouseSelectionLeft - mouseSelectionWidth) + mouseSelectionWidth && \n minY > mouseSelectionTop && \n maxY < mouseSelectionTop + mouseSelectionHeight\n }\n\n // 被锁定或被隐藏的元素即使在范围内,也不需要设置为选中状态\n if (isInclude && !element.lock && !hiddenElementIdList.value.includes(element.id)) inRangeElementList.push(element)\n }\n\n // 如果范围内有组合元素的成员,需要该组全部成员都处在范围内,才会被设置为选中状态\n inRangeElementList = inRangeElementList.filter(inRangeElement => {\n if (inRangeElement.groupId) {\n const inRangeElementIdList = inRangeElementList.map(inRangeElement => inRangeElement.id)\n const groupElementList = elementList.value.filter(element => element.groupId === inRangeElement.groupId)\n return groupElementList.every(groupElement => inRangeElementIdList.includes(groupElement.id))\n }\n return true\n })\n const inRangeElementIdList = inRangeElementList.map(inRangeElement => inRangeElement.id)\n mainStore.setActiveElementIdList(inRangeElementIdList)\n\n mouseSelectionVisible.value = false\n }\n }\n\n return {\n mouseSelection,\n mouseSelectionVisible,\n mouseSelectionQuadrant,\n updateMouseSelection,\n }\n}","import { onMounted, onUnmounted, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { getImageDataURL } from '@/utils/image'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nexport default (elementRef: Ref) => {\n const { disableHotkeys } = storeToRefs(useMainStore())\n\n const { createImageElement, createTextElement } = useCreateElement()\n\n // 拖拽元素到画布中\n const handleDrop = (e: DragEvent) => {\n if (!e.dataTransfer || e.dataTransfer.items.length === 0) return\n const dataTransferItem = e.dataTransfer.items[0]\n\n // 检查事件对象中是否存在图片,存在则插入图片,否则继续检查是否存在文字,存在则插入文字\n if (dataTransferItem.kind === 'file' && dataTransferItem.type.indexOf('image') !== -1) {\n const imageFile = dataTransferItem.getAsFile()\n if (imageFile) {\n getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))\n }\n }\n else if (dataTransferItem.kind === 'string' && dataTransferItem.type === 'text/plain') {\n dataTransferItem.getAsString(text => {\n if (disableHotkeys.value) return\n const string = parseText2Paragraphs(text)\n createTextElement({\n left: 0,\n top: 0,\n width: 600,\n height: 50,\n }, { content: string })\n })\n }\n }\n\n onMounted(() => {\n elementRef.value && elementRef.value.addEventListener('drop', handleDrop)\n\n document.ondragleave = e => e.preventDefault()\n document.ondrop = e => e.preventDefault()\n document.ondragenter = e => e.preventDefault()\n document.ondragover = e => e.preventDefault()\n })\n onUnmounted(() => {\n elementRef.value && elementRef.value.removeEventListener('drop', handleDrop)\n\n document.ondragleave = null\n document.ondrop = null\n document.ondragenter = null\n document.ondragover = null\n })\n}","import type { Ref } from 'vue'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTLineElement, PPTVideoElement, PPTAudioElement, PPTChartElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\n/**\n * 计算给定坐标到原点连线的弧度\n * @param x 坐标x\n * @param y 坐标y\n */\nconst getAngleFromCoordinate = (x: number, y: number) => {\n const radian = Math.atan2(x, y)\n const angle = 180 / Math.PI * radian\n return angle\n}\n\nexport default (\n elementList: Ref,\n viewportRef: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 旋转元素\n const rotateElement = (e: MouseEvent | TouchEvent, element: Exclude) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n \n let isMouseDown = true\n let angle = 0\n const elOriginRotate = element.rotate || 0\n\n const elLeft = element.left\n const elTop = element.top\n const elWidth = element.width\n const elHeight = element.height\n\n // 元素中心点(旋转中心点)\n const centerX = elLeft + elWidth / 2\n const centerY = elTop + elHeight / 2\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n \n // 计算当前鼠标位置相对元素中心点连线的角度(弧度)\n const mouseX = (currentPageX - viewportRect.left) / canvasScale.value\n const mouseY = (currentPageY - viewportRect.top) / canvasScale.value\n const x = mouseX - centerX\n const y = centerY - mouseY\n\n angle = getAngleFromCoordinate(x, y)\n\n // 靠近45倍数的角度时有吸附效果\n const sorptionRange = 5\n if ( Math.abs(angle) <= sorptionRange ) angle = 0\n else if ( angle > 0 && Math.abs(angle - 45) <= sorptionRange ) angle -= (angle - 45)\n else if ( angle < 0 && Math.abs(angle + 45) <= sorptionRange ) angle -= (angle + 45)\n else if ( angle > 0 && Math.abs(angle - 90) <= sorptionRange ) angle -= (angle - 90)\n else if ( angle < 0 && Math.abs(angle + 90) <= sorptionRange ) angle -= (angle + 90)\n else if ( angle > 0 && Math.abs(angle - 135) <= sorptionRange ) angle -= (angle - 135)\n else if ( angle < 0 && Math.abs(angle + 135) <= sorptionRange ) angle -= (angle + 135)\n else if ( angle > 0 && Math.abs(angle - 180) <= sorptionRange ) angle -= (angle - 180)\n else if ( angle < 0 && Math.abs(angle + 180) <= sorptionRange ) angle -= (angle + 180)\n\n elementList.value = elementList.value.map(el => element.id === el.id ? { ...el, rotate: angle } : el)\n }\n\n const handleMouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n if (elOriginRotate === angle) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n rotateElement,\n }\n}","export const ELEMENT_TYPE_ZH: { [key: string]: string } = {\n text: '文本',\n image: '图片',\n shape: '形状',\n line: '线条',\n chart: '图表',\n table: '表格',\n video: '视频',\n audio: '音频',\n latex: '公式',\n}\n\nexport const MIN_SIZE: { [key: string]: number } = {\n text: 20,\n image: 20,\n shape: 15,\n chart: 200,\n table: 20,\n video: 250,\n audio: 20,\n latex: 20,\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { PPTElement, PPTImageElement, PPTLineElement, PPTShapeElement } from '@/types/slides'\nimport { OperateResizeHandlers, type AlignmentLineProps, type MultiSelectRange } from '@/types/edit'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { MIN_SIZE } from '@/configs/element'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport { type AlignLine, uniqAlignLines } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface RotateElementData {\n left: number\n top: number\n width: number\n height: number\n}\n\n/**\n * 计算旋转后的元素八个缩放点的位置\n * @param element 元素原始位置大小信息\n * @param angle 旋转角度\n */\nconst getRotateElementPoints = (element: RotateElementData, angle: number) => {\n const { left, top, width, height } = element\n\n const radius = Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ) / 2\n const auxiliaryAngle = Math.atan(height / width) * 180 / Math.PI\n\n const tlbraRadian = (180 - angle - auxiliaryAngle) * Math.PI / 180\n const trblaRadian = (auxiliaryAngle - angle) * Math.PI / 180\n const taRadian = (90 - angle) * Math.PI / 180\n const raRadian = angle * Math.PI / 180\n\n const halfWidth = width / 2\n const halfHeight = height / 2\n\n const middleLeft = left + halfWidth\n const middleTop = top + halfHeight\n\n const leftTopPoint = {\n left: middleLeft + radius * Math.cos(tlbraRadian),\n top: middleTop - radius * Math.sin(tlbraRadian),\n }\n const topPoint = {\n left: middleLeft + halfHeight * Math.cos(taRadian),\n top: middleTop - halfHeight * Math.sin(taRadian),\n }\n const rightTopPoint = {\n left: middleLeft + radius * Math.cos(trblaRadian),\n top: middleTop - radius * Math.sin(trblaRadian),\n }\n const rightPoint = {\n left: middleLeft + halfWidth * Math.cos(raRadian),\n top: middleTop + halfWidth * Math.sin(raRadian),\n }\n const rightBottomPoint = {\n left: middleLeft - radius * Math.cos(tlbraRadian),\n top: middleTop + radius * Math.sin(tlbraRadian),\n }\n const bottomPoint = {\n left: middleLeft - halfHeight * Math.sin(raRadian),\n top: middleTop + halfHeight * Math.cos(raRadian),\n }\n const leftBottomPoint = {\n left: middleLeft - radius * Math.cos(trblaRadian),\n top: middleTop + radius * Math.sin(trblaRadian),\n }\n const leftPoint = {\n left: middleLeft - halfWidth * Math.cos(raRadian),\n top: middleTop - halfWidth * Math.sin(raRadian),\n }\n\n return { leftTopPoint, topPoint, rightTopPoint, rightPoint, rightBottomPoint, bottomPoint, leftBottomPoint, leftPoint }\n}\n\n/**\n * 获取元素某缩放点相对的另一个点的位置,如:【上】对应【下】、【左上】对应【右下】\n * @param direction 当前操作的缩放点\n * @param points 旋转后的元素八个缩放点的位置\n */\nconst getOppositePoint = (direction: OperateResizeHandlers, points: ReturnType): { left: number; top: number } => {\n const oppositeMap = {\n [OperateResizeHandlers.RIGHT_BOTTOM]: points.leftTopPoint,\n [OperateResizeHandlers.LEFT_BOTTOM]: points.rightTopPoint,\n [OperateResizeHandlers.LEFT_TOP]: points.rightBottomPoint,\n [OperateResizeHandlers.RIGHT_TOP]: points.leftBottomPoint,\n [OperateResizeHandlers.TOP]: points.bottomPoint,\n [OperateResizeHandlers.BOTTOM]: points.topPoint,\n [OperateResizeHandlers.LEFT]: points.rightPoint,\n [OperateResizeHandlers.RIGHT]: points.leftPoint,\n }\n return oppositeMap[direction]\n}\n\nexport default (\n elementList: Ref,\n alignmentLines: Ref,\n canvasScale: Ref,\n) => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(mainStore)\n const { viewportRatio } = storeToRefs(slidesStore)\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 缩放元素\n const scaleElement = (e: MouseEvent | TouchEvent, element: Exclude, command: OperateResizeHandlers) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n let isMouseDown = true\n mainStore.setScalingState(true)\n\n const elOriginLeft = element.left\n const elOriginTop = element.top\n const elOriginWidth = element.width\n const elOriginHeight = element.height\n\n const originTableCellMinHeight = element.type === 'table' ? element.cellMinHeight : 0\n \n const elRotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n const rotateRadian = Math.PI * elRotate / 180\n\n const fixedRatio = ctrlOrShiftKeyActive.value || ('fixedRatio' in element && element.fixedRatio)\n const aspectRatio = elOriginWidth / elOriginHeight\n\n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n // 元素最小缩放限制\n const minSize = MIN_SIZE[element.type] || 20\n const getSizeWithinRange = (size: number) => size < minSize ? minSize : size\n\n let points: ReturnType\n let baseLeft = 0\n let baseTop = 0\n let horizontalLines: AlignLine[] = []\n let verticalLines: AlignLine[] = []\n\n // 旋转后的元素进行缩放时,引入基点的概念,以当前操作的缩放点相对的点为基点\n // 例如拖动右下角缩放时,左上角为基点,需要保持左上角不变然后修改其他的点的位置来达到所放的效果\n if ('rotate' in element && element.rotate) {\n const { left, top, width, height } = element\n points = getRotateElementPoints({ left, top, width, height }, elRotate)\n const oppositePoint = getOppositePoint(command, points)\n\n baseLeft = oppositePoint.left\n baseTop = oppositePoint.top\n }\n\n // 未旋转的元素具有缩放时的对齐吸附功能,在此处收集对齐对齐吸附线\n // 包括页面内除目标元素外的其他元素在画布中的各个可吸附对齐位置:上下左右四边\n // 其中线条和被旋转过的元素不参与吸附对齐\n else {\n const edgeWidth = VIEWPORT_SIZE\n const edgeHeight = VIEWPORT_SIZE * viewportRatio.value\n const isActiveGroupElement = element.id === activeGroupElementId.value\n \n for (const el of elementList.value) {\n if ('rotate' in el && el.rotate) continue\n if (el.type === 'line') continue\n if (isActiveGroupElement && el.id === element.id) continue\n if (!isActiveGroupElement && activeElementIdList.value.includes(el.id)) continue\n\n const left = el.left\n const top = el.top\n const width = el.width\n const height = el.height\n const right = left + width\n const bottom = top + height\n\n const topLine: AlignLine = { value: top, range: [left, right] }\n const bottomLine: AlignLine = { value: bottom, range: [left, right] }\n const leftLine: AlignLine = { value: left, range: [top, bottom] }\n const rightLine: AlignLine = { value: right, range: [top, bottom] }\n\n horizontalLines.push(topLine, bottomLine)\n verticalLines.push(leftLine, rightLine)\n }\n\n // 画布可视区域的四个边界、水平中心、垂直中心\n const edgeTopLine: AlignLine = { value: 0, range: [0, edgeWidth] }\n const edgeBottomLine: AlignLine = { value: edgeHeight, range: [0, edgeWidth] }\n const edgeHorizontalCenterLine: AlignLine = { value: edgeHeight / 2, range: [0, edgeWidth] }\n const edgeLeftLine: AlignLine = { value: 0, range: [0, edgeHeight] }\n const edgeRightLine: AlignLine = { value: edgeWidth, range: [0, edgeHeight] }\n const edgeVerticalCenterLine: AlignLine = { value: edgeWidth / 2, range: [0, edgeHeight] }\n\n horizontalLines.push(edgeTopLine, edgeBottomLine, edgeHorizontalCenterLine)\n verticalLines.push(edgeLeftLine, edgeRightLine, edgeVerticalCenterLine)\n \n horizontalLines = uniqAlignLines(horizontalLines)\n verticalLines = uniqAlignLines(verticalLines)\n }\n \n // 对齐吸附方法\n // 将收集到的对齐吸附线与计算的目标元素当前的位置大小相关数据做对比,差值小于设定的值时执行自动缩放校正\n // 水平和垂直两个方向需要分开计算\n const alignedAdsorption = (currentX: number | null, currentY: number | null) => {\n const sorptionRange = 5\n\n const _alignmentLines: AlignmentLineProps[] = []\n let isVerticalAdsorbed = false\n let isHorizontalAdsorbed = false\n const correctionVal = { offsetX: 0, offsetY: 0 }\n \n if (currentY || currentY === 0) {\n for (let i = 0; i < horizontalLines.length; i++) {\n const { value, range } = horizontalLines[i]\n const min = Math.min(...range, currentX || 0)\n const max = Math.max(...range, currentX || 0)\n \n if (Math.abs(currentY - value) < sorptionRange && !isHorizontalAdsorbed) {\n correctionVal.offsetY = currentY - value\n isHorizontalAdsorbed = true\n _alignmentLines.push({ type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100 })\n }\n }\n }\n if (currentX || currentX === 0) {\n for (let i = 0; i < verticalLines.length; i++) {\n const { value, range } = verticalLines[i]\n const min = Math.min(...range, (currentY || 0))\n const max = Math.max(...range, (currentY || 0))\n\n if (Math.abs(currentX - value) < sorptionRange && !isVerticalAdsorbed) {\n correctionVal.offsetX = currentX - value\n isVerticalAdsorbed = true\n _alignmentLines.push({ type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100 })\n }\n }\n }\n alignmentLines.value = _alignmentLines\n return correctionVal\n }\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n const x = currentPageX - startPageX\n const y = currentPageY - startPageY\n\n let width = elOriginWidth\n let height = elOriginHeight\n let left = elOriginLeft\n let top = elOriginTop\n \n // 元素被旋转的情况下,需要根据元素旋转的角度,重新计算需要缩放的距离(鼠标按下后移动的距离)\n if (elRotate) {\n const revisedX = (Math.cos(rotateRadian) * x + Math.sin(rotateRadian) * y) / canvasScale.value\n let revisedY = (Math.cos(rotateRadian) * y - Math.sin(rotateRadian) * x) / canvasScale.value\n\n // 锁定宽高比例(仅四个角可能触发,四条边不会触发)\n // 以水平方向上缩放的距离为基础,计算垂直方向上的缩放距离,保持二者具有相同的缩放比例\n if (fixedRatio) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) revisedY = revisedX / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) revisedY = -revisedX / aspectRatio\n }\n\n // 根据不同的操作点分别计算元素缩放后的大小和位置\n // 需要注意:\n // 此处计算的位置需要在后面重新进行校正,因为旋转后再缩放事实上会改变元素基点的位置(虽然视觉上基点保持不动,但这是【旋转】+【移动】共同作用的结果)\n // 但此处计算的大小不需要重新校正,因为前面已经重新计算需要缩放的距离,相当于大小已经经过了校正\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n height = getSizeWithinRange(elOriginHeight + revisedY)\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n height = getSizeWithinRange(elOriginHeight + revisedY)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n height = getSizeWithinRange(elOriginHeight - revisedY)\n left = elOriginLeft - (width - elOriginWidth)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n height = getSizeWithinRange(elOriginHeight - revisedY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.TOP) {\n height = getSizeWithinRange(elOriginHeight - revisedY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n height = getSizeWithinRange(elOriginHeight + revisedY)\n }\n else if (command === OperateResizeHandlers.LEFT) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n }\n\n // 获取当前元素的基点坐标,与初始状态时的基点坐标进行对比,并计算差值进行元素位置的校正\n const currentPoints = getRotateElementPoints({ width, height, left, top }, elRotate)\n const currentOppositePoint = getOppositePoint(command, currentPoints)\n const currentBaseLeft = currentOppositePoint.left\n const currentBaseTop = currentOppositePoint.top\n\n const offsetX = currentBaseLeft - baseLeft\n const offsetY = currentBaseTop - baseTop\n\n left = left - offsetX\n top = top - offsetY\n }\n\n // 元素未被旋转的情况下,正常计算新的位置大小即可,无需复杂的校正等工作\n // 额外需要处理对齐吸附相关的操作\n // 锁定宽高比例相关的操作同上,不再赘述\n else {\n let moveX = x / canvasScale.value\n let moveY = y / canvasScale.value\n\n if (fixedRatio) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) moveY = moveX / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) moveY = -moveX / aspectRatio\n }\n\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, elOriginTop + elOriginHeight + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = moveY * aspectRatio\n else moveY = moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth + moveX)\n height = getSizeWithinRange(elOriginHeight + moveY)\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + moveX, elOriginTop + elOriginHeight + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = -moveY * aspectRatio\n else moveY = -moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth - moveX)\n height = getSizeWithinRange(elOriginHeight + moveY)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + moveX, elOriginTop + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = moveY * aspectRatio\n else moveY = moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth - moveX)\n height = getSizeWithinRange(elOriginHeight - moveY)\n left = elOriginLeft - (width - elOriginWidth)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, elOriginTop + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = -moveY * aspectRatio\n else moveY = -moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth + moveX)\n height = getSizeWithinRange(elOriginHeight - moveY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.LEFT) {\n const { offsetX } = alignedAdsorption(elOriginLeft + moveX, null)\n moveX = moveX - offsetX\n width = getSizeWithinRange(elOriginWidth - moveX)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n const { offsetX } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, null)\n moveX = moveX - offsetX\n width = getSizeWithinRange(elOriginWidth + moveX)\n }\n else if (command === OperateResizeHandlers.TOP) {\n const { offsetY } = alignedAdsorption(null, elOriginTop + moveY)\n moveY = moveY - offsetY\n height = getSizeWithinRange(elOriginHeight - moveY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n const { offsetY } = alignedAdsorption(null, elOriginTop + elOriginHeight + moveY)\n moveY = moveY - offsetY\n height = getSizeWithinRange(elOriginHeight + moveY)\n }\n }\n \n elementList.value = elementList.value.map(el => {\n if (element.id !== el.id) return el\n if (el.type === 'shape' && 'pathFormula' in el && el.pathFormula) {\n const pathFormula = SHAPE_PATH_FORMULAS[el.pathFormula]\n\n let path = ''\n if ('editable' in pathFormula) path = pathFormula.formula(width, height, el.keypoint!)\n else path = pathFormula.formula(width, height)\n\n return {\n ...el, left, top, width, height,\n viewBox: [width, height],\n path,\n }\n }\n if (el.type === 'table') {\n let cellMinHeight = originTableCellMinHeight + (height - elOriginHeight) / el.data.length\n cellMinHeight = cellMinHeight < 36 ? 36 : cellMinHeight\n\n if (cellMinHeight === originTableCellMinHeight) return { ...el, left, width }\n return {\n ...el, left, top, width, height,\n cellMinHeight: cellMinHeight < 36 ? 36 : cellMinHeight,\n }\n }\n return { ...el, left, top, width, height }\n })\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n alignmentLines.value = []\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n \n if (startPageX === currentPageX && startPageY === currentPageY) return\n \n slidesStore.updateSlide({ elements: elementList.value })\n mainStore.setScalingState(false)\n \n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n // 多选元素缩放\n const scaleMultiElement = (e: MouseEvent, range: MultiSelectRange, command: OperateResizeHandlers) => {\n let isMouseDown = true\n \n const { minX, maxX, minY, maxY } = range\n const operateWidth = maxX - minX\n const operateHeight = maxY - minY\n const aspectRatio = operateWidth / operateHeight\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList.value))\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n \n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const x = (currentPageX - startPageX) / canvasScale.value\n let y = (currentPageY - startPageY) / canvasScale.value\n\n // 锁定宽高比例,逻辑同上\n if (ctrlOrShiftKeyActive.value) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) y = x / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) y = -x / aspectRatio\n }\n\n // 所有选中元素的整体范围\n let currentMinX = minX\n let currentMaxX = maxX\n let currentMinY = minY\n let currentMaxY = maxY\n\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n currentMaxX = maxX + x\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n currentMinX = minX + x\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n currentMinX = minX + x\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n currentMaxX = maxX + x\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.TOP) {\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT) {\n currentMinX = minX + x\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n currentMaxX = maxX + x\n }\n\n // 所有选中元素的整体宽高\n const currentOppositeWidth = currentMaxX - currentMinX\n const currentOppositeHeight = currentMaxY - currentMinY\n\n // 当前正在操作元素宽高占所有选中元素的整体宽高的比例\n let widthScale = currentOppositeWidth / operateWidth\n let heightScale = currentOppositeHeight / operateHeight\n\n if (widthScale <= 0) widthScale = 0\n if (heightScale <= 0) heightScale = 0\n \n // 根据前面计算的比例,计算并修改所有选中元素的位置大小\n elementList.value = elementList.value.map(el => {\n if ((el.type === 'image' || el.type === 'shape') && activeElementIdList.value.includes(el.id)) {\n const originElement = originElementList.find(originEl => originEl.id === el.id) as PPTImageElement | PPTShapeElement\n return {\n ...el,\n width: originElement.width * widthScale,\n height: originElement.height * heightScale,\n left: currentMinX + (originElement.left - minX) * widthScale,\n top: currentMinY + (originElement.top - minY) * heightScale,\n }\n }\n return el\n })\n }\n\n document.onmouseup = e => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n if (startPageX === e.pageX && startPageY === e.pageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n }\n\n return {\n scaleElement,\n scaleMultiElement,\n }\n}","export const enum ClipPathTypes {\n RECT = 'rect',\n ELLIPSE = 'ellipse',\n POLYGON = 'polygon',\n}\n\nexport const enum ClipPaths {\n RECT = 'rect',\n ROUNDRECT = 'roundRect',\n ELLIPSE = 'ellipse',\n TRIANGLE = 'triangle',\n PENTAGON = 'pentagon',\n RHOMBUS = 'rhombus',\n STAR = 'star',\n}\n\ninterface ClipPath {\n [key: string]: {\n name: string\n type: ClipPathTypes\n style: string\n radius?: string\n createPath?: (width: number, height: number) => string\n }\n}\n\nexport const CLIPPATHS: ClipPath = {\n rect: {\n name: '矩形',\n type: ClipPathTypes.RECT,\n radius: '0',\n style: '',\n },\n rect2: {\n name: '矩形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.8} 0 L ${width} ${height * 0.2} L ${width} ${height} L 0 ${height} Z`\n },\n },\n rect3: {\n name: '矩形3',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.8} 0 L ${width} ${height * 0.2} L ${width} ${height} L ${width * 0.2} ${height} L 0 ${height * 0.8} Z`\n },\n },\n roundRect: {\n name: '圆角矩形',\n type: ClipPathTypes.RECT,\n radius: '10px',\n style: 'inset(0 0 0 0 round 10px 10px 10px 10px)',\n },\n ellipse: {\n name: '圆形',\n type: ClipPathTypes.ELLIPSE,\n style: 'ellipse(50% 50% at 50% 50%)',\n },\n triangle: {\n name: '三角形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 0% 100%, 100% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L 0 ${height} L ${width} ${height} Z`\n },\n },\n triangle2: {\n name: '三角形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 100%, 0% 0%, 100% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} ${height} L 0 0 L ${width} 0 Z`\n },\n },\n triangle3: {\n name: '三角形3',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 0% 100%, 100% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L 0 ${height} L ${width} ${height} Z`\n },\n },\n rhombus: {\n name: '菱形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width} ${height * 0.5} L ${width * 0.5} ${height} L 0 ${height * 0.5} Z`\n },\n },\n pentagon: {\n name: '五边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width} ${0.38 * height} L ${0.82 * width} ${height} L ${0.18 * width} ${height} L 0 ${0.38 * height} Z`\n },\n },\n hexagon: {\n name: '六边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.2} 0 L ${width * 0.8} 0 L ${width} ${height * 0.5} L ${width * 0.8} ${height} L ${width * 0.2} ${height} L 0 ${height * 0.5} Z`\n },\n },\n heptagon: {\n name: '七边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width * 0.9} ${height * 0.2} L ${width} ${height * 0.6} L ${width * 0.75} ${height} L ${width * 0.25} ${height} L 0 ${height * 0.6} L ${width * 0.1} ${height * 0.2} Z`\n },\n },\n octagon: {\n name: '八边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} 0 L ${width * 0.7} 0 L ${width} ${height * 0.3} L ${width} ${height * 0.7} L ${width * 0.7} ${height} L ${width * 0.3} ${height} L 0 ${height * 0.7} L 0 ${height * 0.3} Z`\n },\n },\n chevron: {\n name: 'V形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.75} 0 L ${width} ${height * 0.5} L ${width * 0.75} ${height} L 0 ${height} L ${width * 0.25} ${height * 0.5} L 0 0 Z`\n },\n },\n point: {\n name: '点',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.75} 0 L ${width} ${height * 0.5} L ${width * 0.75} ${height} L 0 ${height} Z`\n },\n },\n arrow: {\n name: '箭头',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)',\n createPath: (width: number, height: number) => {\n return `M 0 ${height * 0.2} L ${width * 0.6} ${height * 0.2} L ${width * 0.6} 0 L ${width} ${height * 0.5} L ${width * 0.6} ${height} L ${width * 0.6} ${height * 0.8} L 0 ${height * 0.8} Z`\n },\n },\n parallelogram: {\n name: '平行四边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} 0 L ${width} 0 L ${width * 0.7} ${height} L 0 ${height} Z`\n },\n },\n parallelogram2: {\n name: '平行四边形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} ${height} L ${width} ${height} L ${width * 0.7} 0 L 0 0 Z`\n },\n },\n trapezoid: {\n name: '梯形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.25} 0 L ${width * 0.75} 0 L ${width} ${height} L 0 ${height} Z`\n },\n },\n trapezoid2: {\n name: '梯形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width} 0 L ${width * 0.75} ${height} L ${width * 0.25} ${height} Z`\n },\n },\n}","import type { Ref } from 'vue'\nimport { uniq } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\n\nexport default (\n elementList: Ref,\n moveElement: (e: MouseEvent | TouchEvent, element: PPTElement) => void,\n) => {\n const mainStore = useMainStore()\n const { activeElementIdList, activeGroupElementId, handleElementId, editorAreaFocus } = storeToRefs(mainStore)\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\n // 选中元素\n // startMove 表示是否需要再选中操作后进入到开始移动的状态\n const selectElement = (e: MouseEvent | TouchEvent, element: PPTElement, startMove = true) => {\n if (!editorAreaFocus.value) mainStore.setEditorareaFocus(true)\n\n // 如果目标元素当前未被选中,则将他设为选中状态\n // 此时如果按下Ctrl键或Shift键,则进入多选状态,将当前已选中的元素和目标元素一起设置为选中状态,否则仅将目标元素设置为选中状态\n // 如果目标元素是分组成员,需要将该组合的其他元素一起设置为选中状态\n if (!activeElementIdList.value.includes(element.id)) {\n let newActiveIdList: string[] = []\n\n if (ctrlOrShiftKeyActive.value) {\n newActiveIdList = [...activeElementIdList.value, element.id]\n }\n else newActiveIdList = [element.id]\n \n if (element.groupId) {\n const groupMembersId: string[] = []\n elementList.value.forEach((el: PPTElement) => {\n if (el.groupId === element.groupId) groupMembersId.push(el.id)\n })\n newActiveIdList = [...newActiveIdList, ...groupMembersId]\n }\n\n mainStore.setActiveElementIdList(uniq(newActiveIdList))\n mainStore.setHandleElementId(element.id)\n }\n\n // 如果目标元素已被选中,且按下了Ctrl键或Shift键,则取消其被选中状态\n // 除非目标元素是最后的一个被选中元素,或者目标元素所在的组合是最后一组选中组合\n // 如果目标元素是分组成员,需要将该组合的其他元素一起取消选中状态\n else if (ctrlOrShiftKeyActive.value) {\n let newActiveIdList: string[] = []\n\n if (element.groupId) {\n const groupMembersId: string[] = []\n elementList.value.forEach((el: PPTElement) => {\n if (el.groupId === element.groupId) groupMembersId.push(el.id)\n })\n newActiveIdList = activeElementIdList.value.filter(id => !groupMembersId.includes(id))\n }\n else {\n newActiveIdList = activeElementIdList.value.filter(id => id !== element.id)\n }\n\n if (newActiveIdList.length > 0) {\n mainStore.setActiveElementIdList(newActiveIdList)\n }\n }\n\n // 如果目标元素已被选中,同时目标元素不是当前操作元素,则将其设置为当前操作元素\n else if (handleElementId.value !== element.id) {\n mainStore.setHandleElementId(element.id)\n }\n\n // 如果目标元素已被选中,同时也是当前操作元素,那么当目标元素在该状态下再次被点击时,将被设置为多选元素中的激活成员\n else if (activeGroupElementId.value !== element.id) {\n const startPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const startPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n ;(e.target as HTMLElement).onmouseup = (e: MouseEvent) => {\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) {\n mainStore.setActiveGroupElementId(element.id)\n ;(e.target as HTMLElement).onmouseup = null\n }\n }\n }\n\n if (startMove) moveElement(e, element)\n }\n\n return {\n selectElement,\n }\n}\n","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps } from '@/types/edit'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { getRectRotatedRange, uniqAlignLines, type AlignLine } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default (\n elementList: Ref,\n alignmentLines: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(useMainStore())\n const { shiftKeyState } = storeToRefs(useKeyboardStore())\n const { viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const dragElement = (e: MouseEvent | TouchEvent, element: PPTElement) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n if (!activeElementIdList.value.includes(element.id)) return\n let isMouseDown = true\n\n const edgeWidth = VIEWPORT_SIZE\n const edgeHeight = VIEWPORT_SIZE * viewportRatio.value\n \n const sorptionRange = 5\n\n const originElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList.value))\n const originActiveElementList = originElementList.filter(el => activeElementIdList.value.includes(el.id))\n \n const elOriginLeft = element.left\n const elOriginTop = element.top\n const elOriginWidth = element.width\n const elOriginHeight = ('height' in element && element.height) ? element.height : 0\n const elOriginRotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n \n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n let isMisoperation: boolean | null = null\n\n const isActiveGroupElement = element.id === activeGroupElementId.value\n\n // 收集对齐对齐吸附线\n // 包括页面内除目标元素外的其他元素在画布中的各个可吸附对齐位置:上下左右四边,水平中心、垂直中心\n // 其中线条和被旋转过的元素需要重新计算他们在画布中的中心点位置的范围\n let horizontalLines: AlignLine[] = []\n let verticalLines: AlignLine[] = []\n\n for (const el of elementList.value) {\n if (el.type === 'line') continue\n if (isActiveGroupElement && el.id === element.id) continue\n if (!isActiveGroupElement && activeElementIdList.value.includes(el.id)) continue\n\n let left, top, width, height\n if ('rotate' in el && el.rotate) {\n const { xRange, yRange } = getRectRotatedRange({\n left: el.left,\n top: el.top,\n width: el.width,\n height: el.height,\n rotate: el.rotate,\n })\n left = xRange[0]\n top = yRange[0]\n width = xRange[1] - xRange[0]\n height = yRange[1] - yRange[0]\n }\n else {\n left = el.left\n top = el.top\n width = el.width\n height = el.height\n }\n \n const right = left + width\n const bottom = top + height\n const centerX = top + height / 2\n const centerY = left + width / 2\n\n const topLine: AlignLine = { value: top, range: [left, right] }\n const bottomLine: AlignLine = { value: bottom, range: [left, right] }\n const horizontalCenterLine: AlignLine = { value: centerX, range: [left, right] }\n const leftLine: AlignLine = { value: left, range: [top, bottom] }\n const rightLine: AlignLine = { value: right, range: [top, bottom] }\n const verticalCenterLine: AlignLine = { value: centerY, range: [top, bottom] }\n\n horizontalLines.push(topLine, bottomLine, horizontalCenterLine)\n verticalLines.push(leftLine, rightLine, verticalCenterLine)\n }\n\n // 画布可视区域的四个边界、水平中心、垂直中心\n const edgeTopLine: AlignLine = { value: 0, range: [0, edgeWidth] }\n const edgeBottomLine: AlignLine = { value: edgeHeight, range: [0, edgeWidth] }\n const edgeHorizontalCenterLine: AlignLine = { value: edgeHeight / 2, range: [0, edgeWidth] }\n const edgeLeftLine: AlignLine = { value: 0, range: [0, edgeHeight] }\n const edgeRightLine: AlignLine = { value: edgeWidth, range: [0, edgeHeight] }\n const edgeVerticalCenterLine: AlignLine = { value: edgeWidth / 2, range: [0, edgeHeight] }\n\n horizontalLines.push(edgeTopLine, edgeBottomLine, edgeHorizontalCenterLine)\n verticalLines.push(edgeLeftLine, edgeRightLine, edgeVerticalCenterLine)\n \n // 对齐吸附线去重\n horizontalLines = uniqAlignLines(horizontalLines)\n verticalLines = uniqAlignLines(verticalLines)\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n // 如果鼠标滑动距离过小,则将操作判定为误操作:\n // 如果误操作标记为null,表示是第一次触发移动,需要计算当前是否是误操作\n // 如果误操作标记为true,表示当前还处在误操作范围内,但仍然需要继续计算检查后续操作是否还处于误操作\n // 如果误操作标记为false,表示已经脱离了误操作范围,不需要再次计算\n if (isMisoperation !== false) {\n isMisoperation = Math.abs(startPageX - currentPageX) < sorptionRange && \n Math.abs(startPageY - currentPageY) < sorptionRange\n }\n if (!isMouseDown || isMisoperation) return\n \n let moveX = (currentPageX - startPageX) / canvasScale.value\n let moveY = (currentPageY - startPageY) / canvasScale.value\n\n if (shiftKeyState.value) {\n if (Math.abs(moveX) > Math.abs(moveY)) moveY = 0\n if (Math.abs(moveX) < Math.abs(moveY)) moveX = 0\n }\n\n // 基础目标位置\n let targetLeft = elOriginLeft + moveX\n let targetTop = elOriginTop + moveY\n\n // 计算目标元素在画布中的位置范围,用于吸附对齐\n // 需要区分单选和多选两种情况,其中多选状态下需要计算多选元素的整体范围;单选状态下需要继续区分线条、普通元素、旋转后的普通元素三种情况\n let targetMinX: number, targetMaxX: number, targetMinY: number, targetMaxY: number\n\n if (activeElementIdList.value.length === 1 || isActiveGroupElement) {\n if (elOriginRotate) {\n const { xRange, yRange } = getRectRotatedRange({\n left: targetLeft,\n top: targetTop,\n width: elOriginWidth,\n height: elOriginHeight,\n rotate: elOriginRotate,\n })\n targetMinX = xRange[0]\n targetMaxX = xRange[1]\n targetMinY = yRange[0]\n targetMaxY = yRange[1]\n }\n else if (element.type === 'line') {\n targetMinX = targetLeft\n targetMaxX = targetLeft + Math.max(element.start[0], element.end[0])\n targetMinY = targetTop\n targetMaxY = targetTop + Math.max(element.start[1], element.end[1])\n }\n else {\n targetMinX = targetLeft\n targetMaxX = targetLeft + elOriginWidth\n targetMinY = targetTop\n targetMaxY = targetTop + elOriginHeight\n }\n }\n else {\n const leftValues = []\n const topValues = []\n const rightValues = []\n const bottomValues = []\n \n for (let i = 0; i < originActiveElementList.length; i++) {\n const element = originActiveElementList[i]\n const left = element.left + moveX\n const top = element.top + moveY\n const width = element.width\n const height = ('height' in element && element.height) ? element.height : 0\n const rotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n\n if ('rotate' in element && element.rotate) {\n const { xRange, yRange } = getRectRotatedRange({ left, top, width, height, rotate })\n leftValues.push(xRange[0])\n topValues.push(yRange[0])\n rightValues.push(xRange[1])\n bottomValues.push(yRange[1])\n }\n else if (element.type === 'line') {\n leftValues.push(left)\n topValues.push(top)\n rightValues.push(left + Math.max(element.start[0], element.end[0]))\n bottomValues.push(top + Math.max(element.start[1], element.end[1]))\n }\n else {\n leftValues.push(left)\n topValues.push(top)\n rightValues.push(left + width)\n bottomValues.push(top + height)\n }\n }\n\n targetMinX = Math.min(...leftValues)\n targetMaxX = Math.max(...rightValues)\n targetMinY = Math.min(...topValues)\n targetMaxY = Math.max(...bottomValues)\n }\n \n const targetCenterX = targetMinX + (targetMaxX - targetMinX) / 2\n const targetCenterY = targetMinY + (targetMaxY - targetMinY) / 2\n\n // 将收集到的对齐吸附线与计算的目标元素位置范围做对比,二者的差小于设定的值时执行自动对齐校正\n // 水平和垂直两个方向需要分开计算\n const _alignmentLines: AlignmentLineProps[] = []\n let isVerticalAdsorbed = false\n let isHorizontalAdsorbed = false\n for (let i = 0; i < horizontalLines.length; i++) {\n const { value, range } = horizontalLines[i]\n const min = Math.min(...range, targetMinX, targetMaxX)\n const max = Math.max(...range, targetMinX, targetMaxX)\n \n if (Math.abs(targetMinY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetMinY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n if (Math.abs(targetMaxY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetMaxY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n if (Math.abs(targetCenterY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetCenterY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n }\n for (let i = 0; i < verticalLines.length; i++) {\n const { value, range } = verticalLines[i]\n const min = Math.min(...range, targetMinY, targetMaxY)\n const max = Math.max(...range, targetMinY, targetMaxY)\n\n if (Math.abs(targetMinX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetMinX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n if (Math.abs(targetMaxX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetMaxX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n if (Math.abs(targetCenterX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetCenterX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n }\n alignmentLines.value = _alignmentLines\n \n // 单选状态下,或者当前选中的多个元素中存在正在操作的元素时,仅修改正在操作的元素的位置\n if (activeElementIdList.value.length === 1 || isActiveGroupElement) {\n elementList.value = elementList.value.map(el => {\n return el.id === element.id ? { ...el, left: targetLeft, top: targetTop } : el\n })\n }\n\n // 多选状态下,除了修改正在操作的元素的位置,其他被选中的元素也需要修改位置信息\n // 其他被选中的元素的位置信息通过正在操作的元素的移动偏移量来进行计算\n else {\n const handleElement = elementList.value.find(el => el.id === element.id)\n if (!handleElement) return\n\n elementList.value = elementList.value.map(el => {\n if (activeElementIdList.value.includes(el.id)) {\n if (el.id === element.id) {\n return {\n ...el,\n left: targetLeft,\n top: targetTop,\n }\n }\n return {\n ...el,\n left: el.left + (targetLeft - handleElement.left),\n top: el.top + (targetTop - handleElement.top),\n }\n }\n return el\n })\n }\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n alignmentLines.value = []\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n dragElement,\n }\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, PPTLineElement } from '@/types/slides'\nimport { OperateLineHandlers } from '@/types/edit'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface AdsorptionPoint {\n x: number\n y: number\n}\n\nexport default (elementList: Ref) => {\n const slidesStore = useSlidesStore()\n const { canvasScale } = storeToRefs(useMainStore())\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 拖拽线条端点\n const dragLineElement = (e: MouseEvent, element: PPTLineElement, command: OperateLineHandlers) => {\n let isMouseDown = true\n\n const sorptionRange = 8\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const adsorptionPoints: AdsorptionPoint[] = []\n\n // 获取所有线条以外的未旋转的元素的8个缩放点作为吸附位置\n for (let i = 0; i < elementList.value.length; i++) {\n const _element = elementList.value[i]\n if (_element.type === 'line' || _element.rotate) continue\n\n const left = _element.left\n const top = _element.top\n const width = _element.width\n const height = _element.height\n \n const right = left + width\n const bottom = top + height\n const centerX = top + height / 2\n const centerY = left + width / 2\n\n const topPoint = { x: centerY, y: top }\n const bottomPoint = { x: centerY, y: bottom }\n const leftPoint = { x: left, y: centerX }\n const rightPoint = { x: right, y: centerX }\n\n const leftTopPoint = { x: left, y: top }\n const rightTopPoint = { x: right, y: top }\n const leftBottomPoint = { x: left, y: bottom }\n const rightBottomPoint = { x: right, y: bottom }\n\n adsorptionPoints.push(\n topPoint,\n bottomPoint,\n leftPoint,\n rightPoint,\n leftTopPoint,\n rightTopPoint,\n leftBottomPoint,\n rightBottomPoint,\n )\n }\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const moveX = (currentPageX - startPageX) / canvasScale.value\n const moveY = (currentPageY - startPageY) / canvasScale.value\n \n // 线条起点和终点在编辑区域中的位置\n let startX = element.left + element.start[0]\n let startY = element.top + element.start[1]\n let endX = element.left + element.end[0]\n let endY = element.top + element.end[1]\n\n const mid = element.broken || element.curve || [0, 0]\n let midX = element.left + mid[0]\n let midY = element.top + mid[1]\n\n const [c1, c2] = element.cubic || [[0, 0], [0, 0]]\n let c1X = element.left + c1[0]\n let c1Y = element.top + c1[1]\n let c2X = element.left + c2[0]\n let c2Y = element.top + c2[1]\n\n // 拖拽起点或终点的位置\n // 水平和垂直方向上有吸附\n if (command === OperateLineHandlers.START) {\n startX = startX + moveX\n startY = startY + moveY\n\n if (Math.abs(startX - endX) < sorptionRange) startX = endX\n if (Math.abs(startY - endY) < sorptionRange) startY = endY\n\n for (const adsorptionPoint of adsorptionPoints) {\n const { x, y } = adsorptionPoint\n if (Math.abs(x - startX) < sorptionRange && Math.abs(y - startY) < sorptionRange) {\n startX = x\n startY = y\n break\n }\n }\n }\n else if (command === OperateLineHandlers.END) {\n endX = endX + moveX\n endY = endY + moveY\n\n if (Math.abs(startX - endX) < sorptionRange) endX = startX\n if (Math.abs(startY - endY) < sorptionRange) endY = startY\n\n for (const adsorptionPoint of adsorptionPoints) {\n const { x, y } = adsorptionPoint\n if (Math.abs(x - endX) < sorptionRange && Math.abs(y - endY) < sorptionRange) {\n endX = x\n endY = y\n break\n }\n }\n }\n else if (command === OperateLineHandlers.C) {\n midX = midX + moveX\n midY = midY + moveY\n\n if (Math.abs(midX - startX) < sorptionRange) midX = startX\n if (Math.abs(midY - startY) < sorptionRange) midY = startY\n if (Math.abs(midX - endX) < sorptionRange) midX = endX\n if (Math.abs(midY - endY) < sorptionRange) midY = endY\n if (Math.abs(midX - (startX + endX) / 2) < sorptionRange && Math.abs(midY - (startY + endY) / 2) < sorptionRange) {\n midX = (startX + endX) / 2\n midY = (startY + endY) / 2\n }\n }\n else if (command === OperateLineHandlers.C1) {\n c1X = c1X + moveX\n c1Y = c1Y + moveY\n\n if (Math.abs(c1X - startX) < sorptionRange) c1X = startX\n if (Math.abs(c1Y - startY) < sorptionRange) c1Y = startY\n if (Math.abs(c1X - endX) < sorptionRange) c1X = endX\n if (Math.abs(c1Y - endY) < sorptionRange) c1Y = endY\n }\n else if (command === OperateLineHandlers.C2) {\n c2X = c2X + moveX\n c2Y = c2Y + moveY\n\n if (Math.abs(c2X - startX) < sorptionRange) c2X = startX\n if (Math.abs(c2Y - startY) < sorptionRange) c2Y = startY\n if (Math.abs(c2X - endX) < sorptionRange) c2X = endX\n if (Math.abs(c2Y - endY) < sorptionRange) c2Y = endY\n }\n\n // 计算更新起点和终点基于自身元素位置的坐标\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n const start: [number, number] = [0, 0]\n const end: [number, number] = [maxX - minX, maxY - minY]\n if (startX > endX) {\n start[0] = maxX - minX\n end[0] = 0\n }\n if (startY > endY) {\n start[1] = maxY - minY\n end[1] = 0\n }\n\n elementList.value = elementList.value.map(el => {\n if (el.id === element.id) {\n const newEl: PPTLineElement = {\n ...(el as PPTLineElement),\n left: minX,\n top: minY,\n start: start,\n end: end,\n }\n if (command === OperateLineHandlers.START || command === OperateLineHandlers.END) {\n if (element.broken) newEl.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (element.curve) newEl.curve = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (element.cubic) newEl.cubic = [[(start[0] + end[0]) / 2, (start[1] + end[1]) / 2], [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]]\n }\n else if (command === OperateLineHandlers.C) {\n if (element.broken) newEl.broken = [midX - minX, midY - minY]\n if (element.curve) newEl.curve = [midX - minX, midY - minY]\n }\n else {\n if (element.cubic) newEl.cubic = [[c1X - minX, c1Y - minY], [c2X - minX, c2Y - minY]]\n }\n return newEl\n }\n return el\n })\n }\n\n document.onmouseup = e => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n }\n\n return {\n dragLineElement,\n }\n}","import type { Ref } from 'vue'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTShapeElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\n\ninterface ShapePathData {\n baseSize: number,\n originPos: number,\n min: number,\n max: number,\n relative: string,\n}\n\nexport default (\n elementList: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const moveShapeKeypoint = (e: MouseEvent | TouchEvent, element: PPTShapeElement) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n let isMouseDown = true\n \n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n const pathFormula = SHAPE_PATH_FORMULAS[element.pathFormula!]\n let shapePathData: ShapePathData | null = null\n if ('editable' in pathFormula) {\n const baseSize = pathFormula.getBaseSize(element.width, element.height)\n const originPos = baseSize * element.keypoint!\n const [min, max] = pathFormula.range\n const relative = pathFormula.relative\n\n shapePathData = { baseSize, originPos, min, max, relative }\n }\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n const moveX = (currentPageX - startPageX) / canvasScale.value\n const moveY = (currentPageY - startPageY) / canvasScale.value\n\n elementList.value = elementList.value.map(el => {\n if (el.id === element.id && shapePathData) {\n const { baseSize, originPos, min, max, relative } = shapePathData\n const shapeElement = el as PPTShapeElement\n\n let keypoint = 0\n\n if (relative === 'left') keypoint = (originPos + moveX) / baseSize\n if (relative === 'right') keypoint = (originPos - moveX) / baseSize\n if (relative === 'center') keypoint = (originPos - moveX * 2) / baseSize\n if (relative === 'top') keypoint = (originPos + moveY) / baseSize\n if (relative === 'bottom') keypoint = (originPos - moveY) / baseSize\n\n if (keypoint < min) keypoint = min\n if (keypoint > max) keypoint = max\n\n return {\n ...el,\n keypoint,\n path: pathFormula.formula(shapeElement.width, shapeElement.height, keypoint),\n }\n }\n return el\n })\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n moveShapeKeypoint,\n }\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { CreateElementSelectionData } from '@/types/edit'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nexport default (viewportRef: Ref) => {\n const mainStore = useMainStore()\n const { canvasScale, creatingElement } = storeToRefs(mainStore)\n\n // 通过鼠标框选时的起点和终点,计算选区的位置大小\n const formatCreateSelection = (selectionData: CreateElementSelectionData) => {\n const { start, end } = selectionData\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const [startX, startY] = start\n const [endX, endY] = end\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const left = (minX - viewportRect.x) / canvasScale.value\n const top = (minY - viewportRect.y) / canvasScale.value\n const width = (maxX - minX) / canvasScale.value\n const height = (maxY - minY) / canvasScale.value\n\n return { left, top, width, height }\n }\n\n // 通过鼠标框选时的起点和终点,计算线条在画布中的位置和起点终点\n const formatCreateSelectionForLine = (selectionData: CreateElementSelectionData) => {\n const { start, end } = selectionData\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const [startX, startY] = start\n const [endX, endY] = end\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const left = (minX - viewportRect.x) / canvasScale.value\n const top = (minY - viewportRect.y) / canvasScale.value\n const width = (maxX - minX) / canvasScale.value\n const height = (maxY - minY) / canvasScale.value\n\n const _start: [number, number] = [\n startX === minX ? 0 : width,\n startY === minY ? 0 : height,\n ]\n const _end: [number, number] = [\n endX === minX ? 0 : width,\n endY === minY ? 0 : height,\n ]\n\n return {\n left,\n top,\n start: _start,\n end: _end,\n }\n }\n\n const { createTextElement, createShapeElement, createLineElement } = useCreateElement()\n\n // 根据鼠标选区的位置大小插入元素\n const insertElementFromCreateSelection = (selectionData: CreateElementSelectionData) => {\n if (!creatingElement.value) return\n\n const type = creatingElement.value.type\n if (type === 'text') {\n const position = formatCreateSelection(selectionData)\n position && createTextElement(position, { vertical: creatingElement.value.vertical })\n }\n else if (type === 'shape') {\n const position = formatCreateSelection(selectionData)\n position && createShapeElement(position, creatingElement.value.data)\n }\n else if (type === 'line') {\n const position = formatCreateSelectionForLine(selectionData)\n position && createLineElement(position, creatingElement.value.data)\n }\n mainStore.setCreatingElement(null)\n }\n\n return {\n formatCreateSelection,\n insertElementFromCreateSelection,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ElementAlignCommands } from '@/types/edit'\nimport { getElementListRange } from '@/utils/element'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useHistorySnapshot from './useHistorySnapshot'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeElementList } = storeToRefs(useMainStore())\n const { currentSlide, viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 将所有选中的元素对齐到画布\n * @param command 对齐方向\n */\n const alignElementToCanvas = (command: ElementAlignCommands) => {\n const viewportWidth = VIEWPORT_SIZE\n const viewportHeight = VIEWPORT_SIZE * viewportRatio.value\n const { minX, maxX, minY, maxY } = getElementListRange(activeElementList.value)\n \n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n for (const element of newElementList) {\n if (!activeElementIdList.value.includes(element.id)) continue\n \n // 水平垂直居中\n if (command === ElementAlignCommands.CENTER) {\n const offsetY = minY + (maxY - minY) / 2 - viewportHeight / 2\n const offsetX = minX + (maxX - minX) / 2 - viewportWidth / 2\n element.top = element.top - offsetY \n element.left = element.left - offsetX \n }\n\n // 顶部对齐\n if (command === ElementAlignCommands.TOP) {\n const offsetY = minY - 0\n element.top = element.top - offsetY \n }\n\n // 垂直居中\n else if (command === ElementAlignCommands.VERTICAL) {\n const offsetY = minY + (maxY - minY) / 2 - viewportHeight / 2\n element.top = element.top - offsetY \n }\n\n // 底部对齐\n else if (command === ElementAlignCommands.BOTTOM) {\n const offsetY = maxY - viewportHeight\n element.top = element.top - offsetY \n }\n \n // 左侧对齐\n else if (command === ElementAlignCommands.LEFT) {\n const offsetX = minX - 0\n element.left = element.left - offsetX \n }\n\n // 水平居中\n else if (command === ElementAlignCommands.HORIZONTAL) {\n const offsetX = minX + (maxX - minX) / 2 - viewportWidth / 2\n element.left = element.left - offsetX \n }\n\n // 右侧对齐\n else if (command === ElementAlignCommands.RIGHT) {\n const offsetX = maxX - viewportWidth\n element.left = element.left - offsetX \n }\n }\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n return {\n alignElementToCanvas,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { PPTElementShadow } from '@/types/slides'\n\n// 计算元素的阴影样式\nexport default (shadow: Ref) => {\n const shadowStyle = computed(() => {\n if (shadow.value) {\n const { h, v, blur, color } = shadow.value\n return `${h}px ${v}px ${blur}px ${color}`\n }\n return ''\n })\n\n return {\n shadowStyle,\n }\n}","import { computed, type Ref } from 'vue'\n\n// 计算元素的翻转样式\nexport default (flipH: Ref, flipV: Ref) => {\n const flipStyle = computed(() => {\n let style = ''\n \n if (flipH.value && flipV.value) style = 'rotateX(180deg) rotateY(180deg)'\n else if (flipV.value) style = 'rotateX(180deg)'\n else if (flipH.value) style = 'rotateY(180deg)'\n\n return style\n })\n\n return {\n flipStyle,\n }\n}","import { computed, type Ref } from 'vue'\nimport { CLIPPATHS, ClipPathTypes } from '@/configs/imageClip'\nimport type { ImageElementClip } from '@/types/slides'\n\nexport default (clip: Ref) => {\n const clipShape = computed(() => {\n if (!clip.value) return CLIPPATHS.rect\n const shape = clip.value.shape || ClipPathTypes.RECT\n\n return CLIPPATHS[shape]\n })\n\n const imgPosition = computed(() => {\n if (!clip.value) {\n return {\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n }\n }\n\n const [start, end] = clip.value.range\n\n const widthScale = (end[0] - start[0]) / 100\n const heightScale = (end[1] - start[1]) / 100\n const left = start[0] / widthScale\n const top = start[1] / heightScale\n\n return {\n left: -left + '%',\n top: -top + '%',\n width: 100 / widthScale + '%',\n height: 100 / heightScale + '%',\n }\n })\n\n return {\n clipShape,\n imgPosition,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { ImageElementFilters, ImageElementFilterKeys } from '@/types/slides'\n\nexport default (filters: Ref) => {\n const filter = computed(() => {\n if (!filters.value) return ''\n let filter = ''\n const keys = Object.keys(filters.value) as ImageElementFilterKeys[]\n for (const key of keys) {\n filter += `${key}(${filters.value[key]}) `\n }\n return filter\n })\n\n return {\n filter,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\n\n// 计算边框相关属性值,主要是对默认值的处理\nexport default (outline: Ref) => {\n const outlineWidth = computed(() => outline.value?.width ?? 0)\n const outlineStyle = computed(() => outline.value?.style || 'solid')\n const outlineColor = computed(() => outline.value?.color || '#d14424')\n\n const strokeDashArray = computed(() => {\n if (outlineStyle.value !== 'dashed') return '0 0'\n const size = outlineWidth.value\n return size <= 6 ? `${size * 4.5} ${size * 2}` : `${size * 4} ${size * 1.5}`\n })\n\n return {\n outlineWidth,\n outlineStyle,\n outlineColor,\n strokeDashArray,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35e36256\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"rx\", \"ry\", \"width\", \"height\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageRectOutline',\n props: {\n width: {},\n height: {},\n outline: {},\n radius: { default: '0' }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-rect-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"rect\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n rx: _ctx.radius,\n ry: _ctx.radius,\n width: _ctx.width,\n height: _ctx.height,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageRectOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageRectOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageRectOutline.vue?vue&type=style&index=0&id=35e36256&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35e36256\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-11836cf8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"cx\", \"cy\", \"rx\", \"ry\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageEllipseOutline',\n props: {\n width: {},\n height: {},\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-ellipse-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"ellipse\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n cx: _ctx.width / 2,\n cy: _ctx.height / 2,\n rx: _ctx.width / 2,\n ry: _ctx.height / 2,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageEllipseOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageEllipseOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageEllipseOutline.vue?vue&type=style&index=0&id=11836cf8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-11836cf8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6e021ee2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImagePolygonOutline',\n props: {\n width: {},\n height: {},\n createPath: { type: Function },\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-polygon-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n d: _ctx.createPath(_ctx.width, _ctx.height),\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImagePolygonOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImagePolygonOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImagePolygonOutline.vue?vue&type=style&index=0&id=6e021ee2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6e021ee2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"image-outline\" }\n\nimport { computed } from 'vue'\nimport type { PPTImageElement } from '@/types/slides'\nimport useClipImage from '../useClipImage'\n\nimport ImageRectOutline from './ImageRectOutline.vue'\nimport ImageEllipseOutline from './ImageEllipseOutline.vue'\nimport ImagePolygonOutline from './ImagePolygonOutline.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape } = useClipImage(clip)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(clipShape).type === 'rect')\n ? (_openBlock(), _createBlock(ImageRectOutline, {\n key: 0,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n radius: _unref(clipShape).radius,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"radius\", \"outline\"]))\n : (_unref(clipShape).type === 'ellipse')\n ? (_openBlock(), _createBlock(ImageEllipseOutline, {\n key: 1,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]))\n : (_unref(clipShape).type === 'polygon')\n ? (_openBlock(), _createBlock(ImagePolygonOutline, {\n key: 2,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline,\n createPath: _unref(clipShape).createPath!\n }, null, 8, [\"width\", \"height\", \"outline\", \"createPath\"]))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5984406b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\nconst _hoisted_2 = [\"src\"]\nconst _hoisted_3 = [\"onMousedown\"]\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n width: \"16\",\n height: \"16\",\n fill: \"#fff\",\n stroke: \"#333\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"stroke-width\": \"0.3\",\n \"shape-rendering\": \"crispEdges\",\n d: \"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z\"\n })\n], -1))\nconst _hoisted_5 = [\n _hoisted_4\n]\nconst _hoisted_6 = [\"onMousedown\"]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n width: \"16\",\n height: \"16\",\n fill: \"#fff\",\n stroke: \"#333\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"stroke-width\": \"0.3\",\n \"shape-rendering\": \"crispEdges\",\n d: \"M 16 0 L 0 0 L 0 4 L 16 4 Z\"\n })\n], -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport { KEYS } from '@/configs/hotkey'\nimport { type ImageClipedEmitData, OperateResizeHandlers } from '@/types/edit'\nimport type { ImageClipDataRange, ImageElementClip } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageClipHandler',\n props: {\n src: {},\n clipPath: {},\n width: {},\n height: {},\n top: {},\n left: {},\n rotate: {},\n clipData: {}\n },\n emits: [\"clip\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst clipWrapperPositionStyle = ref({\n top: '0',\n left: '0',\n})\nconst isSettingClipRange = ref(false)\nconst currentRange = ref(null)\n\n// 获取裁剪区域信息(裁剪区域占原图的宽高比例,处在原图中的位置)\nconst getClipDataTransformInfo = () => {\n const [start, end] = props.clipData ? props.clipData.range : [[0, 0], [100, 100]]\n\n const widthScale = (end[0] - start[0]) / 100\n const heightScale = (end[1] - start[1]) / 100\n const left = start[0] / widthScale\n const top = start[1] / heightScale\n\n return { widthScale, heightScale, left, top }\n}\n\n// 底层图片位置大小(遮罩区域图片)\nconst imgPosition = computed(() => {\n const { widthScale, heightScale, left, top } = getClipDataTransformInfo()\n return {\n left: -left,\n top: -top,\n width: 100 / widthScale,\n height: 100 / heightScale,\n }\n})\n\n// 底层图片位置大小样式(遮罩区域图片)\nconst bottomImgPositionStyle = computed(() => {\n return {\n top: imgPosition.value.top + '%',\n left: imgPosition.value.left + '%',\n width: imgPosition.value.width + '%',\n height: imgPosition.value.height + '%',\n }\n})\n\n// 顶层图片容器位置大小(裁剪高亮区域)\nconst topImgWrapperPosition = ref({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n})\n\n// 顶层图片容器位置大小样式(裁剪高亮区域)\nconst topImgWrapperPositionStyle = computed(() => {\n const { top, left, width, height } = topImgWrapperPosition.value\n return {\n top: top + '%',\n left: left + '%',\n width: width + '%',\n height: height + '%',\n }\n})\n\n// 顶层图片位置大小样式(裁剪区域图片)\nconst topImgPositionStyle = computed(() => {\n const bottomWidth = imgPosition.value.width\n const bottomHeight = imgPosition.value.height\n \n const { top, left, width, height } = topImgWrapperPosition.value\n \n return {\n left: -left * (100 / width) + '%',\n top: -top * (100 / height) + '%',\n width: bottomWidth / width * 100 + '%',\n height: bottomHeight / height * 100 + '%',\n }\n})\n\n// 初始化裁剪位置信息\nconst initClipPosition = () => {\n const { left, top } = getClipDataTransformInfo()\n topImgWrapperPosition.value = {\n left: left,\n top: top,\n width: 100,\n height: 100,\n }\n \n clipWrapperPositionStyle.value = {\n top: -top + '%',\n left: -left + '%',\n }\n}\n\n// 执行裁剪:计算裁剪后的图片位置大小和裁剪信息,并将数据同步出去\nconst handleClip = () => {\n if (isSettingClipRange.value) return\n\n if (!currentRange.value) {\n emit('clip', null)\n return\n }\n\n const { left, top } = getClipDataTransformInfo()\n\n const position = {\n left: (topImgWrapperPosition.value.left - left) / 100 * props.width,\n top: (topImgWrapperPosition.value.top - top) / 100 * props.height,\n width: (topImgWrapperPosition.value.width - 100) / 100 * props.width,\n height: (topImgWrapperPosition.value.height - 100) / 100 * props.height,\n }\n\n const clipedEmitData: ImageClipedEmitData = {\n range: currentRange.value,\n position,\n }\n emit('clip', clipedEmitData)\n}\n\n// 快捷键监听:回车确认裁剪\nconst keyboardListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ENTER) handleClip()\n}\n\nonMounted(() => {\n initClipPosition()\n document.addEventListener('keydown', keyboardListener)\n})\nonUnmounted(() => {\n document.removeEventListener('keydown', keyboardListener)\n})\n\n// 计算并更新裁剪区域范围数据\nconst updateRange = () => {\n const retPosition = {\n left: parseInt(topImgPositionStyle.value.left),\n top: parseInt(topImgPositionStyle.value.top),\n width: parseInt(topImgPositionStyle.value.width),\n height: parseInt(topImgPositionStyle.value.height),\n }\n\n const widthScale = 100 / retPosition.width\n const heightScale = 100 / retPosition.height\n\n const start: [number, number] = [\n -retPosition.left * widthScale,\n -retPosition.top * heightScale,\n ]\n const end: [number, number] = [\n widthScale * 100 + start[0],\n heightScale * 100 + start[1],\n ]\n\n currentRange.value = [start, end]\n}\n\n// 移动裁剪区域\nconst moveClipRange = (e: MouseEvent) => {\n isSettingClipRange.value = true\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n const bottomPosition = imgPosition.value\n const originPositopn = { ...topImgWrapperPosition.value }\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n let moveX = (currentPageX - startPageX) / canvasScale.value / props.width * 100\n let moveY = (currentPageY - startPageY) / canvasScale.value / props.height * 100\n\n if (props.rotate > 45 && props.rotate < 135) {\n moveX = (currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = -(currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n if ((props.rotate >= 135 && props.rotate <= 180) || (props.rotate >= -180 && props.rotate <= -135)) {\n moveX = -moveX\n moveY = -moveY\n }\n if (props.rotate > -135 && props.rotate < -45) {\n moveX = -(currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = (currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n\n let targetLeft = originPositopn.left + moveX\n let targetTop = originPositopn.top + moveY\n\n if (targetLeft < 0) targetLeft = 0\n else if (targetLeft + originPositopn.width > bottomPosition.width) {\n targetLeft = bottomPosition.width - originPositopn.width\n }\n if (targetTop < 0) targetTop = 0\n else if (targetTop + originPositopn.height > bottomPosition.height) {\n targetTop = bottomPosition.height - originPositopn.height\n }\n \n topImgWrapperPosition.value = {\n ...topImgWrapperPosition.value,\n left: targetLeft,\n top: targetTop,\n }\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n updateRange()\n\n setTimeout(() => {\n isSettingClipRange.value = false\n }, 0)\n }\n}\n\n// 缩放裁剪区域\nconst scaleClipRange = (e: MouseEvent, type: OperateResizeHandlers) => {\n isSettingClipRange.value = true\n let isMouseDown = true\n\n const minWidth = 50 / props.width * 100\n const minHeight = 50 / props.height * 100\n \n const startPageX = e.pageX\n const startPageY = e.pageY\n const bottomPosition = imgPosition.value\n const originPositopn = { ...topImgWrapperPosition.value }\n\n const aspectRatio = topImgWrapperPosition.value.width / topImgWrapperPosition.value.height\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n let moveX = (currentPageX - startPageX) / canvasScale.value / props.width * 100\n let moveY = (currentPageY - startPageY) / canvasScale.value / props.height * 100\n\n if (props.rotate > 45 && props.rotate < 135) {\n moveX = (currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = -(currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n if ((props.rotate >= 135 && props.rotate <= 180) || (props.rotate >= -180 && props.rotate <= -135)) {\n moveX = -moveX\n moveY = -moveY\n }\n if (props.rotate > -135 && props.rotate < -45) {\n moveX = -(currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = (currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n\n if (ctrlOrShiftKeyActive.value) {\n if (type === OperateResizeHandlers.RIGHT_BOTTOM || type === OperateResizeHandlers.LEFT_TOP) moveY = moveX / aspectRatio\n if (type === OperateResizeHandlers.LEFT_BOTTOM || type === OperateResizeHandlers.RIGHT_TOP) moveY = -moveX / aspectRatio\n }\n\n let targetLeft, targetTop, targetWidth, targetHeight\n\n if (type === OperateResizeHandlers.LEFT_TOP) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.RIGHT_TOP) {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width + moveX\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.LEFT_BOTTOM) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.RIGHT_BOTTOM) {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width + moveX\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.TOP) {\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.BOTTOM) {\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.LEFT) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top\n }\n else {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n targetHeight = originPositopn.height\n targetWidth = originPositopn.width + moveX\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n\n topImgWrapperPosition.value = {\n left: targetLeft,\n top: targetTop,\n width: targetWidth,\n height: targetHeight,\n }\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n updateRange()\n\n setTimeout(() => isSettingClipRange.value = false, 0)\n }\n}\n\nconst rotateClassName = computed(() => {\n const prefix = 'rotate-'\n const rotate = props.rotate\n if (rotate > -22.5 && rotate <= 22.5) return prefix + 0\n else if (rotate > 22.5 && rotate <= 67.5) return prefix + 45\n else if (rotate > 67.5 && rotate <= 112.5) return prefix + 90\n else if (rotate > 112.5 && rotate <= 157.5) return prefix + 135\n else if (rotate > 157.5 || rotate <= -157.5) return prefix + 0\n else if (rotate > -157.5 && rotate <= -112.5) return prefix + 45\n else if (rotate > -112.5 && rotate <= -67.5) return prefix + 90\n else if (rotate > -67.5 && rotate <= -22.5) return prefix + 135\n return prefix + 0\n})\n\nconst cornerPoint = [\n OperateResizeHandlers.LEFT_TOP,\n OperateResizeHandlers.RIGHT_TOP,\n OperateResizeHandlers.LEFT_BOTTOM,\n OperateResizeHandlers.RIGHT_BOTTOM,\n]\nconst edgePoints = [\n OperateResizeHandlers.TOP,\n OperateResizeHandlers.BOTTOM,\n OperateResizeHandlers.LEFT,\n OperateResizeHandlers.RIGHT,\n]\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_click_outside = _resolveDirective(\"click-outside\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"image-clip-handler\",\n style: _normalizeStyle(clipWrapperPositionStyle.value)\n }, [\n _createElementVNode(\"img\", {\n class: \"bottom-img\",\n src: _ctx.src,\n draggable: false,\n alt: \"\",\n style: _normalizeStyle(bottomImgPositionStyle.value)\n }, null, 12, _hoisted_1),\n _createElementVNode(\"div\", {\n class: \"top-image-content\",\n style: _normalizeStyle({\n ...topImgWrapperPositionStyle.value,\n clipPath: _ctx.clipPath,\n })\n }, [\n _createElementVNode(\"img\", {\n class: \"top-img\",\n src: _ctx.src,\n draggable: false,\n alt: \"\",\n style: _normalizeStyle(topImgPositionStyle.value)\n }, null, 12, _hoisted_2)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"operate\",\n style: _normalizeStyle(topImgWrapperPositionStyle.value),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => moveClipRange($event), [\"stop\"]))\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(cornerPoint, (point) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['clip-point', point, rotateClassName.value]),\n key: point,\n onMousedown: _withModifiers($event => scaleClipRange($event, point), [\"stop\"])\n }, _hoisted_5, 42, _hoisted_3)\n }), 64)),\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(edgePoints, (point) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['clip-point', point, rotateClassName.value]),\n key: point,\n onMousedown: _withModifiers($event => scaleClipRange($event, point), [\"stop\"])\n }, _hoisted_8, 42, _hoisted_6)\n }), 64))\n ], 36)\n ], 4)), [\n [_directive_click_outside, handleClip]\n ])\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageClipHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageClipHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageClipHandler.vue?vue&type=style&index=0&id=5984406b&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5984406b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1156b3e1\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { ImageElementClip, PPTImageElement } from '@/types/slides'\nimport type { ImageClipedEmitData } from '@/types/edit'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport useClipImage from './useClipImage'\nimport useFilter from './useFilter'\n\nimport ImageOutline from './ImageOutline/index.vue'\nimport ImageClipHandler from './ImageClipHandler.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { clipingImageElementId } = storeToRefs(mainStore)\n\nconst isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape, imgPosition } = useClipImage(clip)\n\nconst filters = computed(() => props.elementInfo.filters)\nconst { filter } = useFilter(filters)\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n props.selectElement(e, props.elementInfo)\n}\n\nconst handleClip = (data: ImageClipedEmitData | null) => {\n mainStore.setClipingImageElementId('')\n \n if (!data) return\n\n const { range, position } = data\n const originClip: ImageElementClip = props.elementInfo.clip || { shape: 'rect', range: [[0, 0], [100, 100]] }\n\n const left = props.elementInfo.left + position.left\n const top = props.elementInfo.top + position.top\n const width = props.elementInfo.width + position.width\n const height = props.elementInfo.height + position.height\n\n let centerOffsetX = 0\n let centerOffsetY = 0\n\n if (props.elementInfo.rotate) {\n const centerX = (left + width / 2) - (props.elementInfo.left + props.elementInfo.width / 2)\n const centerY = -((top + height / 2) - (props.elementInfo.top + props.elementInfo.height / 2))\n\n const radian = -props.elementInfo.rotate * Math.PI / 180\n\n const rotatedCenterX = centerX * Math.cos(radian) - centerY * Math.sin(radian)\n const rotatedCenterY = centerX * Math.sin(radian) + centerY * Math.cos(radian)\n\n centerOffsetX = rotatedCenterX - centerX\n centerOffsetY = -(rotatedCenterY - centerY)\n }\n\n const _props = {\n clip: { ...originClip, range },\n left: left + centerOffsetX,\n top: top + centerOffsetY,\n width,\n height,\n }\n slidesStore.updateElement({ id: props.elementInfo.id, props: _props })\n \n addHistorySnapshot()\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-image\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n (isCliping.value)\n ? (_openBlock(), _createBlock(ImageClipHandler, {\n key: 0,\n src: _ctx.elementInfo.src,\n clipData: _ctx.elementInfo.clip,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n top: _ctx.elementInfo.top,\n left: _ctx.elementInfo.left,\n rotate: _ctx.elementInfo.rotate,\n clipPath: _unref(clipShape).style,\n onClip: _cache[0] || (_cache[0] = range => handleClip(range))\n }, null, 8, [\"src\", \"clipData\", \"width\", \"height\", \"top\", \"left\", \"rotate\", \"clipPath\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"element-content\",\n style: _normalizeStyle({\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n }),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event))\n }, [\n _createVNode(ImageOutline, { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]),\n _createElementVNode(\"div\", {\n class: \"image-content\",\n style: _normalizeStyle({ clipPath: _unref(clipShape).style })\n }, [\n _createElementVNode(\"img\", {\n src: _ctx.elementInfo.src,\n draggable: false,\n style: _normalizeStyle({\n top: _unref(imgPosition).top,\n left: _unref(imgPosition).left,\n width: _unref(imgPosition).width,\n height: _unref(imgPosition).height,\n filter: _unref(filter),\n }),\n onDragstart: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"prevent\"])),\n alt: \"\"\n }, null, 44, _hoisted_1),\n (_ctx.elementInfo.colorMask)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"color-mask\",\n style: _normalizeStyle({\n backgroundColor: _ctx.elementInfo.colorMask,\n })\n }, null, 4))\n : _createCommentVNode(\"\", true)\n ], 4)\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1156b3e1&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1156b3e1\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-efb76626\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\n\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementOutline',\n props: {\n width: {},\n height: {},\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"element-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n d: `M0,0 L${_ctx.width},0 L${_ctx.width},${_ctx.height} L0,${_ctx.height} Z`,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementOutline.vue?vue&type=style&index=0&id=efb76626&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-efb76626\"]])\n\nexport default __exports__","import { splitListItem, liftListItem, sinkListItem } from 'prosemirror-schema-list'\nimport type { Schema } from 'prosemirror-model'\nimport { undo, redo } from 'prosemirror-history'\nimport { undoInputRule } from 'prosemirror-inputrules'\nimport type { Command } from 'prosemirror-state'\nimport {\n toggleMark,\n selectParentNode,\n joinUp,\n joinDown,\n chainCommands,\n newlineInCode,\n createParagraphNear,\n liftEmptyBlock,\n splitBlockKeepMarks,\n} from 'prosemirror-commands'\n\ninterface Keys {\n [key: string]: Command\n}\n\nexport const buildKeymap = (schema: Schema) => {\n const keys: Keys = {}\n const bind = (key: string, cmd: Command) => keys[key] = cmd\n\n bind('Alt-ArrowUp', joinUp)\n bind('Alt-ArrowDown', joinDown)\n bind('Mod-z', undo)\n bind('Mod-y', redo)\n bind('Backspace', undoInputRule)\n bind('Escape', selectParentNode)\n bind('Mod-b', toggleMark(schema.marks.strong))\n bind('Mod-i', toggleMark(schema.marks.em))\n bind('Mod-u', toggleMark(schema.marks.underline))\n bind('Mod-d', toggleMark(schema.marks.strikethrough))\n bind('Mod-e', toggleMark(schema.marks.code))\n bind('Mod-;', toggleMark(schema.marks.superscript))\n bind(`Mod-'`, toggleMark(schema.marks.subscript))\n bind('Enter', chainCommands(\n splitListItem(schema.nodes.list_item),\n newlineInCode,\n createParagraphNear,\n liftEmptyBlock,\n splitBlockKeepMarks,\n ))\n bind('Mod-[', liftListItem(schema.nodes.list_item))\n bind('Mod-]', sinkListItem(schema.nodes.list_item))\n bind('Tab', sinkListItem(schema.nodes.list_item))\n\n return keys\n}","import type { NodeType, Schema } from 'prosemirror-model'\nimport {\n inputRules,\n wrappingInputRule,\n smartQuotes,\n emDash,\n ellipsis,\n InputRule,\n} from 'prosemirror-inputrules'\n\nconst blockQuoteRule = (nodeType: NodeType) => wrappingInputRule(/^\\s*>\\s$/, nodeType)\n\nconst orderedListRule = (nodeType: NodeType) => (\n wrappingInputRule(\n /^(\\d+)\\.\\s$/, \n nodeType, \n match => ({order: +match[1]}),\n (match, node) => node.childCount + node.attrs.order === +match[1],\n )\n)\n\nconst bulletListRule = (nodeType: NodeType) => wrappingInputRule(/^\\s*([-+*])\\s$/, nodeType)\n\nconst codeRule = () => {\n const inputRegex = /(?:^|\\s)((?:`)((?:[^`]+))(?:`))$/\n \n return new InputRule(inputRegex, (state, match, start, end) => {\n const { schema } = state\n\n const tr = state.tr.insertText(`${match[2]} `, start, end)\n const mark = schema.marks.code.create()\n\n return tr.addMark(start, start + match[2].length, mark)\n })\n}\n\nconst linkRule = () => {\n const urlRegEx = /(?:https?:\\/\\/)?[\\w-]+(?:\\.[\\w-]+)+\\.?(?:\\d+)?(?:\\/\\S*)?$/\n \n return new InputRule(urlRegEx, (state, match, start, end) => {\n const { schema } = state\n\n const tr = state.tr.insertText(match[0], start, end)\n const mark = schema.marks.link.create({ href: match[0], title: match[0] })\n\n return tr.addMark(start, start + match[0].length, mark)\n })\n}\n\nexport const buildInputRules = (schema: Schema) => {\n const rules = [\n ...smartQuotes,\n ellipsis,\n emDash,\n ]\n rules.push(blockQuoteRule(schema.nodes.blockquote))\n rules.push(orderedListRule(schema.nodes.ordered_list))\n rules.push(bulletListRule(schema.nodes.bullet_list))\n rules.push(codeRule())\n rules.push(linkRule())\n\n return inputRules({ rules })\n}","import { Plugin } from 'prosemirror-state'\nimport { Decoration, DecorationSet } from 'prosemirror-view'\nimport type { Node } from 'prosemirror-model'\n\nconst isEmptyParagraph = (node: Node) => {\n return node.type.name === 'paragraph' && node.nodeSize === 2\n}\n\nexport const placeholderPlugin = (placeholder: string) => {\n return new Plugin({\n props: {\n decorations(state) {\n const { $from } = state.selection\n if (isEmptyParagraph($from.parent)) {\n const decoration = Decoration.node($from.before(), $from.after(), {\n 'data-placeholder': placeholder,\n })\n return DecorationSet.create(state.doc, [decoration])\n }\n },\n },\n })\n}","import { keymap } from 'prosemirror-keymap'\nimport type { Schema } from 'prosemirror-model'\nimport { history } from 'prosemirror-history'\nimport { baseKeymap } from 'prosemirror-commands'\nimport { dropCursor } from 'prosemirror-dropcursor'\nimport { gapCursor } from 'prosemirror-gapcursor'\n\nimport { buildKeymap } from './keymap'\nimport { buildInputRules } from './inputrules'\nimport { placeholderPlugin } from './placeholder'\n\nexport interface PluginOptions {\n placeholder?: string\n}\n\nexport const buildPlugins = (schema: Schema, options?: PluginOptions) => {\n const placeholder = options?.placeholder\n\n const plugins = [\n buildInputRules(schema),\n keymap(buildKeymap(schema)),\n keymap(baseKeymap),\n dropCursor(),\n gapCursor(),\n history(),\n ]\n\n if (placeholder) plugins.push(placeholderPlugin(placeholder))\n\n return plugins\n}","import { nodes } from 'prosemirror-schema-basic'\nimport type { Node, NodeSpec } from 'prosemirror-model'\nimport { listItem as _listItem } from 'prosemirror-schema-list'\n\ninterface Attr {\n [key: string]: number | string\n}\n\nconst orderedList: NodeSpec = {\n attrs: {\n order: {\n default: 1,\n },\n listStyleType: {\n default: '',\n },\n },\n content: 'list_item+',\n group: 'block',\n parseDOM: [\n { \n tag: 'ol', \n getAttrs: dom => {\n const order = ((dom as HTMLElement).hasAttribute('start') ? (dom as HTMLElement).getAttribute('start') : 1) || 1\n const attr: Attr = { order: +order }\n\n const { listStyleType } = (dom as HTMLElement).style\n if (listStyleType) attr['listStyleType'] = listStyleType\n\n return attr\n }\n }\n ],\n toDOM: (node: Node) => {\n const { order, listStyleType } = node.attrs\n let style = ''\n if (listStyleType) style += `list-style-type: ${listStyleType};`\n\n const attr: Attr = { style }\n if (order !== 1) attr['start'] = order\n\n\n return ['ol', attr, 0]\n },\n}\n\nconst bulletList: NodeSpec = {\n attrs: {\n listStyleType: {\n default: '',\n },\n },\n content: 'list_item+',\n group: 'block',\n parseDOM: [\n {\n tag: 'ul',\n getAttrs: dom => {\n const { listStyleType } = (dom as HTMLElement).style\n return listStyleType ? { listStyleType } : {}\n }\n }\n ],\n toDOM: (node: Node) => {\n const { listStyleType } = node.attrs\n let style = ''\n if (listStyleType) style += `list-style-type: ${listStyleType};`\n\n return ['ul', { style }, 0]\n },\n}\n\nconst listItem: NodeSpec = {\n ..._listItem,\n content: 'paragraph block*',\n group: 'block',\n}\n\nconst paragraph: NodeSpec = {\n attrs: {\n align: {\n default: '',\n },\n indent: {\n default: 0,\n },\n textIndent: {\n default: 0,\n },\n },\n content: 'inline*',\n group: 'block',\n parseDOM: [\n {\n tag: 'p',\n getAttrs: dom => {\n const { textAlign, textIndent } = (dom as HTMLElement).style\n\n let align = (dom as HTMLElement).getAttribute('align') || textAlign || ''\n align = /(left|right|center|justify)/.test(align) ? align : ''\n\n let textIndentLevel = 0\n if (textIndent) {\n if (/em/.test(textIndent)) {\n textIndentLevel = parseInt(textIndent)\n }\n else if (/px/.test(textIndent)) {\n textIndentLevel = Math.floor(parseInt(textIndent) / 20)\n if (!textIndentLevel) textIndentLevel = 1\n }\n }\n\n const indent = +((dom as HTMLElement).getAttribute('data-indent') || 0)\n \n return { align, indent, textIndent: textIndentLevel }\n }\n },\n {\n tag: 'img',\n ignore: true,\n },\n {\n tag: 'pre',\n skip: true,\n },\n ],\n toDOM: (node: Node) => {\n const { align, indent, textIndent } = node.attrs\n let style = ''\n if (align && align !== 'left') style += `text-align: ${align};`\n if (textIndent) style += `text-indent: ${textIndent * 20}px;`\n\n const attr: Attr = { style }\n if (indent) attr['data-indent'] = indent\n\n return ['p', attr, 0]\n },\n}\n\nconst {\n doc,\n blockquote,\n text,\n} = nodes\n\nexport default {\n doc,\n paragraph,\n blockquote,\n text,\n 'ordered_list': orderedList,\n 'bullet_list': bulletList,\n 'list_item': listItem,\n}\n","import { marks } from 'prosemirror-schema-basic'\nimport type { MarkSpec } from 'prosemirror-model'\n\nconst subscript: MarkSpec = {\n excludes: 'subscript',\n parseDOM: [\n { tag: 'sub' },\n {\n style: 'vertical-align',\n getAttrs: value => value === 'sub' && null\n },\n ],\n toDOM: () => ['sub', 0],\n}\n\nconst superscript: MarkSpec = {\n excludes: 'superscript',\n parseDOM: [\n { tag: 'sup' },\n {\n style: 'vertical-align',\n getAttrs: value => value === 'super' && null\n },\n ],\n toDOM: () => ['sup', 0],\n}\n\nconst strikethrough: MarkSpec = {\n parseDOM: [\n { tag: 'strike' },\n {\n style: 'text-decoration',\n getAttrs: value => value === 'line-through' && null\n },\n {\n style: 'text-decoration-line',\n getAttrs: value => value === 'line-through' && null\n },\n ],\n toDOM: () => ['span', { style: 'text-decoration-line: line-through;' }, 0],\n}\n\nconst underline: MarkSpec = {\n parseDOM: [\n { tag: 'u' },\n {\n style: 'text-decoration',\n getAttrs: value => value === 'underline' && null\n },\n {\n style: 'text-decoration-line',\n getAttrs: value => value === 'underline' && null\n },\n ],\n toDOM: () => ['span', { style: 'text-decoration: underline;' }, 0],\n}\n\nconst forecolor: MarkSpec = {\n attrs: {\n color: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'color',\n getAttrs: color => color ? { color } : {}\n },\n ],\n toDOM: mark => {\n const { color } = mark.attrs\n let style = ''\n if (color) style += `color: ${color};`\n return ['span', { style }, 0]\n },\n}\n\nconst backcolor: MarkSpec = {\n attrs: {\n backcolor: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'background-color',\n getAttrs: backcolor => backcolor ? { backcolor } : {}\n },\n ],\n toDOM: mark => {\n const { backcolor } = mark.attrs\n let style = ''\n if (backcolor) style += `background-color: ${backcolor};`\n return ['span', { style }, 0]\n },\n}\n\nconst fontsize: MarkSpec = {\n attrs: {\n fontsize: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'font-size',\n getAttrs: fontsize => fontsize ? { fontsize } : {}\n },\n ],\n toDOM: mark => {\n const { fontsize } = mark.attrs\n let style = ''\n if (fontsize) style += `font-size: ${fontsize};`\n return ['span', { style }, 0]\n },\n}\n\nconst fontname: MarkSpec = {\n attrs: {\n fontname: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'font-family',\n getAttrs: fontname => {\n return { fontname: fontname && typeof fontname === 'string' ? fontname.replace(/[\\\"\\']/g, '') : '' }\n }\n },\n ],\n toDOM: mark => {\n const { fontname } = mark.attrs\n let style = ''\n if (fontname) style += `font-family: ${fontname};`\n return ['span', { style }, 0]\n },\n}\n\nconst link: MarkSpec = {\n attrs: {\n href: {},\n title: { default: null },\n target: { default: '_blank' },\n },\n inclusive: false,\n parseDOM: [\n {\n tag: 'a[href]',\n getAttrs: dom => {\n const href = (dom as HTMLElement).getAttribute('href')\n const title = (dom as HTMLElement).getAttribute('title')\n return { href, title }\n }\n },\n ],\n toDOM: node => ['a', node.attrs, 0],\n}\n\nconst mark: MarkSpec = {\n attrs: {\n index: { default: null },\n },\n parseDOM: [\n {\n tag: 'mark',\n getAttrs: dom => {\n const index = (dom as HTMLElement).dataset.index\n return { index }\n }\n },\n ],\n toDOM: node => ['mark', { 'data-index': node.attrs.index }, 0],\n}\n\nconst { em, strong, code } = marks\n\nexport default {\n em,\n strong,\n fontsize,\n fontname,\n code,\n forecolor,\n backcolor,\n subscript,\n superscript,\n strikethrough,\n underline,\n link,\n mark,\n}","import nodes from './nodes'\nimport marks from './marks'\n\nexport const schemaNodes = nodes\nexport const schemaMarks = marks\n","import { EditorState } from 'prosemirror-state'\nimport { type DirectEditorProps, EditorView } from 'prosemirror-view'\nimport { Schema, DOMParser } from 'prosemirror-model'\nimport { buildPlugins, type PluginOptions } from './plugins/index'\nimport { schemaNodes, schemaMarks } from './schema/index'\n\nconst schema = new Schema({\n nodes: schemaNodes,\n marks: schemaMarks,\n})\n\nexport const createDocument = (content: string) => {\n const htmlString = `
${content}
`\n const parser = new window.DOMParser()\n const element = parser.parseFromString(htmlString, 'text/html').body.firstElementChild\n return DOMParser.fromSchema(schema).parse(element as Element)\n}\n\nexport const initProsemirrorEditor = (\n dom: Element,\n content: string,\n props: Omit,\n pluginOptions?: PluginOptions,\n) => {\n return new EditorView(dom, {\n state: EditorState.create({\n doc: createDocument(content),\n plugins: buildPlugins(schema, pluginOptions),\n }),\n ...props,\n })\n}","import mitt, { type Emitter } from 'mitt'\n\nexport const enum EmitterEvents {\n RICH_TEXT_COMMAND = 'RICH_TEXT_COMMAND',\n OPEN_CHART_DATA_EDITOR = 'OPEN_CHART_DATA_EDITOR',\n OPEN_LATEX_EDITOR = 'OPEN_LATEX_EDITOR',\n}\n\nexport interface RichTextAction {\n command: string\n value?: string\n}\n\nexport interface RichTextCommand {\n target?: string\n action: RichTextAction | RichTextAction[]\n}\n\ntype Events = {\n [EmitterEvents.RICH_TEXT_COMMAND]: RichTextCommand\n [EmitterEvents.OPEN_CHART_DATA_EDITOR]: void\n [EmitterEvents.OPEN_LATEX_EDITOR]: void\n} \n\nconst emitter: Emitter = mitt()\n\nexport default emitter","import type { Schema, Node, NodeType } from 'prosemirror-model'\nimport type { Transaction } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\n\nexport const setTextAlign = (tr: Transaction, schema: Schema, alignment: string) => {\n const { selection, doc } = tr\n if (!selection || !doc) return tr\n\n const { from, to } = selection\n const { nodes } = schema\n\n const blockquote = nodes.blockquote\n const listItem = nodes.list_item\n const paragraph = nodes.paragraph\n\n interface Task {\n node: Node\n pos: number\n nodeType: NodeType\n }\n\n const tasks: Task[] = []\n alignment = alignment || ''\n\n const allowedNodeTypes = new Set([blockquote, listItem, paragraph])\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type\n const align = node.attrs.align || ''\n if (align !== alignment && allowedNodeTypes.has(nodeType)) {\n tasks.push({\n node,\n pos,\n nodeType,\n })\n }\n return true\n })\n\n if (!tasks.length) return tr\n\n tasks.forEach(task => {\n const { node, pos, nodeType } = task\n let { attrs } = node\n if (alignment) attrs = { ...attrs, align: alignment }\n else attrs = { ...attrs, align: null }\n tr = tr.setNodeMarkup(pos, nodeType, attrs, node.marks)\n })\n\n return tr\n}\n\nexport const alignmentCommand = (view: EditorView, alignment: string) => {\n const { state } = view\n const { schema, selection } = state\n const tr = setTextAlign(\n state.tr.setSelection(selection),\n schema,\n alignment,\n )\n view.dispatch(tr)\n}","import { wrapInList, liftListItem } from 'prosemirror-schema-list'\nimport type { Schema, Node, NodeType } from 'prosemirror-model'\nimport type { Transaction, EditorState } from 'prosemirror-state'\nimport { findParentNode } from '../utils'\n\nexport const isList = (node: Node, schema: Schema) => {\n return (\n node.type === schema.nodes.bullet_list ||\n node.type === schema.nodes.ordered_list\n )\n}\n\nexport const toggleList = (listType: NodeType, itemType: NodeType, listStyleType?: string) => {\n return (state: EditorState, dispatch: (tr: Transaction) => void) => {\n const { schema, selection } = state\n const { $from, $to } = selection\n const range = $from.blockRange($to)\n\n if (!range) return false\n\n const parentList = findParentNode((node: Node) => isList(node, schema))(selection)\n\n if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {\n if (parentList.node.type === listType && !listStyleType) {\n return liftListItem(itemType)(state, dispatch)\n }\n\n if (isList(parentList.node, schema) && listType.validContent(parentList.node.content)) {\n const { tr } = state\n if (listStyleType) {\n const nodeAttrs = {\n ...parentList.node.attrs,\n listStyleType: listStyleType,\n }\n tr.setNodeMarkup(parentList.pos, listType, nodeAttrs)\n }\n else tr.setNodeMarkup(parentList.pos, listType)\n\n if (dispatch) dispatch(tr)\n\n return false\n }\n }\n\n if (listStyleType) return wrapInList(listType, { listStyleType })(state, dispatch)\n return wrapInList(listType)(state, dispatch)\n }\n}","import type { Schema } from 'prosemirror-model'\nimport { type Transaction, TextSelection, AllSelection } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\nimport { isList } from './toggleList'\n\ntype IndentKey = 'indent' | 'textIndent'\n\nfunction setNodeIndentMarkup(tr: Transaction, pos: number, delta: number, indentKey: IndentKey): Transaction {\n if (!tr.doc) return tr\n\n const node = tr.doc.nodeAt(pos)\n if (!node) return tr\n\n const minIndent = 0\n const maxIndent = 8\n\n let indent = (node.attrs[indentKey] || 0) + delta\n if (indent < minIndent) indent = minIndent\n if (indent > maxIndent) indent = maxIndent\n\n if (indent === node.attrs[indentKey]) return tr\n\n const nodeAttrs = {\n ...node.attrs,\n [indentKey]: indent,\n }\n\n return tr.setNodeMarkup(pos, node.type, nodeAttrs, node.marks)\n}\n\nconst setIndent = (tr: Transaction, schema: Schema, delta: number, indentKey: IndentKey): Transaction => {\n const { selection, doc } = tr\n if (!selection || !doc) return tr\n\n if (!(selection instanceof TextSelection || selection instanceof AllSelection)) return tr\n\n const { from, to } = selection\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type\n\n if (nodeType.name === 'paragraph' || nodeType.name === 'blockquote') {\n tr = setNodeIndentMarkup(tr, pos, delta, indentKey)\n return false\n } \n else if (isList(node, schema)) return false\n return true\n })\n\n return tr\n}\n\nexport const indentCommand = (view: EditorView, delta: number) => {\n const { state } = view\n const { schema, selection } = state\n\n const tr = setIndent(\n state.tr.setSelection(selection),\n schema,\n delta,\n 'indent',\n )\n if (tr.docChanged) {\n view.dispatch(tr)\n return true\n }\n\n return false\n}\n\nexport const textIndentCommand = (view: EditorView, delta: number) => {\n const { state } = view\n const { schema, selection } = state\n\n const tr = setIndent(\n state.tr.setSelection(selection),\n schema,\n delta,\n 'textIndent',\n )\n if (tr.docChanged) {\n view.dispatch(tr)\n return true\n }\n\n return false\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { debounce } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { EditorView } from 'prosemirror-view'\nimport { toggleMark, wrapIn, lift } from 'prosemirror-commands'\nimport { initProsemirrorEditor, createDocument } from '@/utils/prosemirror'\nimport { isActiveOfParentNodeType, findNodesWithSameMark, getTextAttrs, autoSelectAll, addMark, markActive, getFontsize } from '@/utils/prosemirror/utils'\nimport emitter, { EmitterEvents, type RichTextAction, type RichTextCommand } from '@/utils/emitter'\nimport { alignmentCommand } from '@/utils/prosemirror/commands/setTextAlign'\nimport { indentCommand, textIndentCommand } from '@/utils/prosemirror/commands/setTextIndent'\nimport { toggleList } from '@/utils/prosemirror/commands/toggleList'\nimport type { TextFormatPainterKeys } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ProsemirrorEditor',\n props: {\n elementId: {},\n defaultColor: {},\n defaultFontName: {},\n value: {},\n editable: { type: Boolean, default: false },\n autoFocus: { type: Boolean, default: false }\n },\n emits: [\"update\", \"focus\", \"blur\", \"mousedown\"],\n setup(__props: any, { expose: __expose, emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst mainStore = useMainStore()\nconst { handleElementId, textFormatPainter } = storeToRefs(mainStore)\n\nconst editorViewRef = ref()\nlet editorView: EditorView\n\n// 富文本的各种交互事件监听:\n// 聚焦时取消全局快捷键事件\n// 输入文字时同步数据到vuex\n// 点击鼠标和键盘时同步富文本状态到工具栏\nconst handleInput = debounce(function() {\n emit('update', editorView.dom.innerHTML)\n}, 300, { trailing: true })\n\nconst handleFocus = () => {\n mainStore.setDisableHotkeysState(true)\n emit('focus')\n}\n\nconst handleBlur = () => {\n mainStore.setDisableHotkeysState(false)\n emit('blur')\n}\n\nconst handleClick = debounce(function() {\n const attrs = getTextAttrs(editorView, {\n color: props.defaultColor,\n fontname: props.defaultFontName,\n })\n mainStore.setRichtextAttrs(attrs)\n}, 30, { trailing: true })\n\nconst handleKeydown = () => {\n handleInput()\n handleClick()\n}\n\n// 将富文本内容同步到DOM\nconst textContent = computed(() => props.value)\nwatch(textContent, () => {\n if (!editorView) return\n if (editorView.hasFocus()) return\n\n const { doc, tr } = editorView.state\n editorView.dispatch(tr.replaceRangeWith(0, doc.content.size, createDocument(textContent.value)))\n})\n\n// 打开/关闭编辑器的编辑模式\nwatch(() => props.editable, () => {\n editorView.setProps({ editable: () => props.editable })\n})\n\n// 暴露 focus 方法\nconst focus = () => editorView.focus()\n__expose({ focus })\n\n// 执行富文本命令(可以是一个或多个)\n// 部分命令在执行前先判断当前选区是否为空,如果选区为空先进行全选操作\nconst execCommand = ({ target, action }: RichTextCommand) => {\n if (!target && handleElementId.value !== props.elementId) return\n if (target && target !== props.elementId) return\n\n const actions = ('command' in action) ? [action] : action\n\n for (const item of actions) {\n if (item.command === 'fontname' && item.value) {\n const mark = editorView.state.schema.marks.fontname.create({ fontname: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'fontsize' && item.value) {\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'fontsize-add') {\n const step = item.value ? +item.value : 2\n autoSelectAll(editorView)\n const fontsize = getFontsize(editorView) + step + 'px'\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize })\n addMark(editorView, mark)\n }\n else if (item.command === 'fontsize-reduce') {\n const step = item.value ? +item.value : 2\n autoSelectAll(editorView)\n let fontsize = getFontsize(editorView) - step\n if (fontsize < 12) fontsize = 12\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize: fontsize + 'px' })\n addMark(editorView, mark)\n }\n else if (item.command === 'color' && item.value) {\n const mark = editorView.state.schema.marks.forecolor.create({ color: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'backcolor' && item.value) {\n const mark = editorView.state.schema.marks.backcolor.create({ backcolor: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'bold') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.strong)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'em') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.em)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'underline') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.underline)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'strikethrough') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.strikethrough)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'subscript') {\n toggleMark(editorView.state.schema.marks.subscript)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'superscript') {\n toggleMark(editorView.state.schema.marks.superscript)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'blockquote') {\n const isBlockquote = isActiveOfParentNodeType('blockquote', editorView.state)\n if (isBlockquote) lift(editorView.state, editorView.dispatch)\n else wrapIn(editorView.state.schema.nodes.blockquote)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'code') {\n toggleMark(editorView.state.schema.marks.code)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'align' && item.value) {\n alignmentCommand(editorView, item.value)\n }\n else if (item.command === 'indent' && item.value) {\n indentCommand(editorView, +item.value)\n }\n else if (item.command === 'textIndent' && item.value) {\n textIndentCommand(editorView, +item.value)\n }\n else if (item.command === 'bulletList') {\n const listStyleType = item.value || ''\n const { bullet_list: bulletList, list_item: listItem } = editorView.state.schema.nodes\n toggleList(bulletList, listItem, listStyleType)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'orderedList') {\n const listStyleType = item.value || ''\n const { ordered_list: orderedList, list_item: listItem } = editorView.state.schema.nodes\n toggleList(orderedList, listItem, listStyleType)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'clear') {\n autoSelectAll(editorView)\n const { $from, $to } = editorView.state.selection\n editorView.dispatch(editorView.state.tr.removeMark($from.pos, $to.pos))\n }\n else if (item.command === 'link') {\n const markType = editorView.state.schema.marks.link\n const { from, to } = editorView.state.selection\n const result = findNodesWithSameMark(editorView.state.doc, from, to, markType)\n if (result) {\n if (item.value) {\n const mark = editorView.state.schema.marks.link.create({ href: item.value, title: item.value })\n addMark(editorView, mark, { from: result.from.pos, to: result.to.pos + 1 })\n }\n else editorView.dispatch(editorView.state.tr.removeMark(result.from.pos, result.to.pos + 1, markType))\n }\n else if (markActive(editorView.state, markType)) {\n if (item.value) {\n const mark = editorView.state.schema.marks.link.create({ href: item.value, title: item.value })\n addMark(editorView, mark)\n }\n else toggleMark(markType)(editorView.state, editorView.dispatch)\n }\n else if (item.value) {\n autoSelectAll(editorView)\n toggleMark(markType, { href: item.value, title: item.value })(editorView.state, editorView.dispatch)\n }\n }\n else if (item.command === 'insert' && item.value) {\n editorView.dispatch(editorView.state.tr.insertText(item.value))\n }\n }\n\n editorView.focus()\n handleInput()\n handleClick()\n}\n\n// 鼠标抬起时,执行格式刷命令\nconst handleMouseup = () => {\n if (!textFormatPainter.value) return\n const { keep, ...newProps } = textFormatPainter.value\n\n const actions: RichTextAction[] = [{ command: 'clear' }]\n for (const key of Object.keys(newProps) as TextFormatPainterKeys[]) {\n const command = key\n const value = textFormatPainter.value[key]\n if (value === true) actions.push({ command })\n else if (value) actions.push({ command, value })\n }\n execCommand({ action: actions })\n if (!keep) mainStore.setTextFormatPainter(null)\n}\n\n// Prosemirror编辑器的初始化和卸载\nonMounted(() => {\n editorView = initProsemirrorEditor((editorViewRef.value as Element), textContent.value, {\n handleDOMEvents: {\n focus: handleFocus,\n blur: handleBlur,\n keydown: handleKeydown,\n click: handleClick,\n mouseup: handleMouseup,\n },\n editable: () => props.editable,\n })\n if (props.autoFocus) editorView.focus()\n})\nonUnmounted(() => {\n editorView && editorView.destroy()\n})\n\nemitter.on(EmitterEvents.RICH_TEXT_COMMAND, execCommand)\nonUnmounted(() => {\n emitter.off(EmitterEvents.RICH_TEXT_COMMAND, execCommand)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"prosemirror-editor\", { 'format-painter': _unref(textFormatPainter) }]),\n ref_key: \"editorViewRef\",\n ref: editorViewRef,\n onMousedown: _cache[0] || (_cache[0] = $event => emit('mousedown', $event))\n }, null, 34))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ProsemirrorEditor.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ProsemirrorEditor.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ProsemirrorEditor.vue?vue&type=style&index=0&id=3608adca&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3608adca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2a1e49ba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"drag-handler top\" }, null, -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"drag-handler bottom\" }, null, -1))\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { debounce } from 'lodash'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTextElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\nimport ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElementId, isScaling } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst elementRef = ref()\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\n// 监听文本元素的尺寸变化,当高度变化时,更新高度到vuex\n// 如果高度变化时正处在缩放操作中,则等待缩放操作结束后再更新\nconst realHeightCache = ref(-1)\nconst realWidthCache = ref(-1)\n\nwatch(isScaling, () => {\n if (handleElementId.value !== props.elementInfo.id) return\n\n if (!isScaling.value) {\n if (!props.elementInfo.vertical && realHeightCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeightCache.value },\n })\n realHeightCache.value = -1\n }\n if (props.elementInfo.vertical && realWidthCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { width: realWidthCache.value },\n })\n realWidthCache.value = -1\n }\n }\n})\n\nconst updateTextElementHeight = (entries: ResizeObserverEntry[]) => {\n const contentRect = entries[0].contentRect\n if (!elementRef.value) return\n\n const realHeight = contentRect.height + 20\n const realWidth = contentRect.width + 20\n\n if (!props.elementInfo.vertical && props.elementInfo.height !== realHeight) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeight },\n })\n }\n else realHeightCache.value = realHeight\n }\n if (props.elementInfo.vertical && props.elementInfo.width !== realWidth) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { width: realWidth },\n })\n }\n else realWidthCache.value = realWidth\n }\n}\nconst resizeObserver = new ResizeObserver(updateTextElementHeight)\n\nonMounted(() => {\n if (elementRef.value) resizeObserver.observe(elementRef.value)\n})\nonUnmounted(() => {\n if (elementRef.value) resizeObserver.unobserve(elementRef.value)\n})\n\nconst updateContent = (content: string) => {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { content },\n })\n \n addHistorySnapshot()\n}\n\nconst checkEmptyText = debounce(function() {\n const pureText = props.elementInfo.content.replaceAll(/<[^>]+>/g, '')\n if (!pureText) slidesStore.deleteElement(props.elementInfo.id)\n}, 300, { trailing: true })\n\nconst isHandleElement = computed(() => handleElementId.value === props.elementInfo.id)\nwatch(isHandleElement, () => {\n if (!isHandleElement.value) checkEmptyText()\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-text\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n ref_key: \"elementRef\",\n ref: elementRef,\n style: _normalizeStyle({\n width: _ctx.elementInfo.vertical ? 'auto' : _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.vertical ? _ctx.elementInfo.height + 'px' : 'auto',\n backgroundColor: _ctx.elementInfo.fill,\n opacity: _ctx.elementInfo.opacity,\n textShadow: _unref(shadowStyle),\n lineHeight: _ctx.elementInfo.lineHeight,\n letterSpacing: (_ctx.elementInfo.wordSpace || 0) + 'px',\n color: _ctx.elementInfo.defaultColor,\n fontFamily: _ctx.elementInfo.defaultFontName,\n writingMode: _ctx.elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',\n }),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event))\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(ProsemirrorEditor, {\n class: \"text\",\n elementId: _ctx.elementInfo.id,\n defaultColor: _ctx.elementInfo.defaultColor,\n defaultFontName: _ctx.elementInfo.defaultFontName,\n editable: !_ctx.elementInfo.lock,\n value: _ctx.elementInfo.content,\n style: _normalizeStyle({\n '--paragraphSpace': `${_ctx.elementInfo.paragraphSpace === undefined ? 5 : _ctx.elementInfo.paragraphSpace}px`,\n }),\n onUpdate: _cache[0] || (_cache[0] = value => updateContent(value)),\n onMousedown: _cache[1] || (_cache[1] = $event => handleSelectElement($event, false))\n }, null, 8, [\"elementId\", \"defaultColor\", \"defaultFontName\", \"editable\", \"value\", \"style\"]),\n _hoisted_1,\n _hoisted_2\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=2a1e49ba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2a1e49ba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"gradientTransform\"]\nconst _hoisted_2 = [\"stop-color\"]\nconst _hoisted_3 = [\"stop-color\"]\nconst _hoisted_4 = [\"id\"]\nconst _hoisted_5 = [\"stop-color\"]\nconst _hoisted_6 = [\"stop-color\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'GradientDefs',\n props: {\n id: {},\n type: {},\n color1: {},\n color2: {},\n rotate: { default: 0 }\n },\n setup(__props: any) {\n\r\n\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.type === 'linear')\n ? (_openBlock(), _createElementBlock(\"linearGradient\", {\n key: 0,\n id: _ctx.id,\n x1: \"0%\",\n y1: \"0%\",\n x2: \"100%\",\n y2: \"0%\",\n gradientTransform: `rotate(${_ctx.rotate},0.5,0.5)`\n }, [\n _createElementVNode(\"stop\", {\n offset: \"0%\",\n \"stop-color\": _ctx.color1\n }, null, 8, _hoisted_2),\n _createElementVNode(\"stop\", {\n offset: \"100%\",\n \"stop-color\": _ctx.color2\n }, null, 8, _hoisted_3)\n ], 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"radialGradient\", {\n key: 1,\n id: _ctx.id\n }, [\n _createElementVNode(\"stop\", {\n offset: \"0%\",\n \"stop-color\": _ctx.color1\n }, null, 8, _hoisted_5),\n _createElementVNode(\"stop\", {\n offset: \"100%\",\n \"stop-color\": _ctx.color2\n }, null, 8, _hoisted_6)\n ], 8, _hoisted_4))\n}\n}\n\n})","import script from \"./GradientDefs.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GradientDefs.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5d988de2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\", \"fill\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTShapeElement, ShapeText } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport GradientDefs from './GradientDefs.vue'\nimport ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElementId, shapeFormatPainter } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\nconst execFormatPainter = () => {\n if (!shapeFormatPainter.value) return\n const { keep, ...newProps } = shapeFormatPainter.value\n\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: newProps,\n })\n \n addHistorySnapshot()\n if (!keep) mainStore.setShapeFormatPainter(null)\n}\n\nconst outline = computed(() => props.elementInfo.outline)\nconst { outlineWidth, outlineColor, strokeDashArray } = useElementOutline(outline)\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst editable = ref(false)\n\nwatch(handleElementId, () => {\n if (handleElementId.value !== props.elementInfo.id) {\n if (editable.value) editable.value = false\n }\n})\n\nconst text = computed(() => {\n const defaultText: ShapeText = {\n content: '',\n defaultFontName: '微软雅黑',\n defaultColor: '#000',\n align: 'middle',\n }\n if (!props.elementInfo.text) return defaultText\n\n return props.elementInfo.text\n})\n\nconst updateText = (content: string) => {\n const _text = { ...text.value, content }\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { text: _text },\n })\n \n addHistorySnapshot()\n}\n\nconst checkEmptyText = () => {\n if (!props.elementInfo.text) return\n\n const pureText = props.elementInfo.text.content.replaceAll(/<[^>]+>/g, '')\n if (!pureText) {\n slidesStore.removeElementProps({ id: props.elementInfo.id, propName: 'text' })\n addHistorySnapshot()\n }\n}\n\nconst prosemirrorEditorRef = ref>()\nconst startEdit = () => {\n editable.value = true\n nextTick(() => prosemirrorEditorRef.value && prosemirrorEditorRef.value.focus())\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-shape\", {\n 'lock': _ctx.elementInfo.lock,\n 'format-painter': _unref(shapeFormatPainter),\n }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n opacity: _ctx.elementInfo.opacity,\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n color: text.value.defaultColor,\n fontFamily: text.value.defaultFontName,\n }),\n onMousedown: _cache[3] || (_cache[3] = $event => handleSelectElement($event)),\n onMouseup: _cache[4] || (_cache[4] = ($event: any) => (execFormatPainter())),\n onTouchstart: _cache[5] || (_cache[5] = $event => handleSelectElement($event)),\n onDblclick: _cache[6] || (_cache[6] = ($event: any) => (startEdit()))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height\n }, [\n (_ctx.elementInfo.gradient)\n ? (_openBlock(), _createElementBlock(\"defs\", _hoisted_2, [\n _createVNode(GradientDefs, {\n id: `editabel-gradient-${_ctx.elementInfo.id}`,\n type: _ctx.elementInfo.gradient.type,\n color1: _ctx.elementInfo.gradient.color[0],\n color2: _ctx.elementInfo.gradient.color[1],\n rotate: _ctx.elementInfo.gradient.rotate\n }, null, 8, [\"id\", \"type\", \"color1\", \"color2\", \"rotate\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n class: \"shape-path\",\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n d: _ctx.elementInfo.path,\n fill: _ctx.elementInfo.gradient ? `url(#editabel-gradient-${_ctx.elementInfo.id})` : _ctx.elementInfo.fill,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_1)),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"shape-text\", [text.value.align, { 'editable': editable.value || text.value.content }]])\n }, [\n (editable.value || text.value.content)\n ? (_openBlock(), _createBlock(ProsemirrorEditor, {\n key: 0,\n ref_key: \"prosemirrorEditorRef\",\n ref: prosemirrorEditorRef,\n elementId: _ctx.elementInfo.id,\n defaultColor: text.value.defaultColor,\n defaultFontName: text.value.defaultFontName,\n editable: !_ctx.elementInfo.lock,\n value: text.value.content,\n onUpdate: _cache[0] || (_cache[0] = value => updateText(value)),\n onBlur: _cache[1] || (_cache[1] = ($event: any) => (checkEmptyText())),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event, false))\n }, null, 8, [\"elementId\", \"defaultColor\", \"defaultFontName\", \"editable\", \"value\"]))\n : _createCommentVNode(\"\", true)\n ], 2)\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5d988de2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5d988de2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"markerWidth\", \"markerHeight\", \"refX\", \"refY\"]\nconst _hoisted_2 = [\"d\", \"fill\", \"transform\"]\n\nimport { computed } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinePointMarker',\n props: {\n id: {},\n position: {},\n type: {},\n baseSize: {},\n color: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst pathMap = {\n dot: 'm0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z',\n arrow: 'M0,0 L10,5 0,10 Z',\n}\nconst rotateMap: { [key: string]: number } = {\n 'arrow-start': 180,\n 'arrow-end': 0,\n}\n\nconst path = computed(() => pathMap[props.type])\nconst rotate = computed(() => rotateMap[`${props.type}-${props.position}`] || 0)\nconst size = computed(() => props.baseSize < 2 ? 2 : props.baseSize)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"marker\", {\n id: `${_ctx.id}-${_ctx.type}-${_ctx.position}`,\n markerUnits: \"userSpaceOnUse\",\n orient: \"auto\",\n markerWidth: size.value * 3,\n markerHeight: size.value * 3,\n refX: size.value * 1.5,\n refY: size.value * 1.5\n }, [\n _createElementVNode(\"path\", {\n d: path.value,\n fill: _ctx.color,\n transform: `scale(${size.value * 0.3}, ${size.value * 0.3}) rotate(${rotate.value}, 5, 5)`\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n}\n}\n\n})","\n\n","import script from \"./LinePointMarker.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinePointMarker.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-16512454\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\nconst _hoisted_3 = [\"d\"]\n\nimport { computed } from 'vue'\nimport type { PPTLineElement } from '@/types/slides'\nimport { getLineElementPath } from '@/utils/element'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\nimport LinePointMarker from './LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst svgWidth = computed(() => {\n const width = Math.abs(props.elementInfo.start[0] - props.elementInfo.end[0])\n return width < 24 ? 24 : width\n})\nconst svgHeight = computed(() => {\n const height = Math.abs(props.elementInfo.start[1] - props.elementInfo.end[1])\n return height < 24 ? 24 : height\n})\n\nconst lineDashArray = computed(() => {\n if (props.elementInfo.style !== 'dashed') return '0 0'\n const size = props.elementInfo.width\n return size <= 8 ? `${size * 5} ${size * 2.5}` : `${size * 5} ${size * 1.5}`\n})\n\nconst path = computed(() => {\n return getLineElementPath(props.elementInfo)\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-shape\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '' }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: svgWidth.value,\n height: svgHeight.value\n }, [\n _createElementVNode(\"defs\", null, [\n (_ctx.elementInfo.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n id: _ctx.elementInfo.id,\n position: \"start\",\n type: _ctx.elementInfo.points[0],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n id: _ctx.elementInfo.id,\n position: \"end\",\n type: _ctx.elementInfo.points[1],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n class: \"line-point\",\n d: path.value,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.width,\n \"stroke-dasharray\": lineDashArray.value,\n fill: \"none\",\n \"marker-start\": _ctx.elementInfo.points[0] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[0]}-start)` : '',\n \"marker-end\": _ctx.elementInfo.points[1] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[1]}-end)` : ''\n }, null, 8, _hoisted_2),\n _withDirectives(_createElementVNode(\"path\", {\n class: \"line-path\",\n d: path.value,\n stroke: \"transparent\",\n \"stroke-width\": \"20\",\n fill: \"none\"\n }, null, 8, _hoisted_3), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 8, _hoisted_1))\n ], 36)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=16512454&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-16512454\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed, inject, onMounted, ref, watch } from 'vue'\nimport tinycolor from 'tinycolor2'\nimport { BarChart, LineChart, PieChart } from 'chartist'\nimport type { ChartData, ChartOptions, ChartType } from '@/types/slides'\nimport { injectKeySlideScale } from '@/types/injectKey'\n\nimport 'chartist/dist/index.css'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Chart',\n props: {\n width: {},\n height: {},\n type: {},\n data: {},\n themeColor: {},\n legends: {},\n options: {},\n gridColor: {},\n legend: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst chartRef = ref()\nconst slideScale = inject(injectKeySlideScale) || ref(1)\n\nlet chart: LineChart | BarChart | PieChart | undefined\n\nconst chartHeight = computed(() => {\n if (props.legend) return props.height - 20\n return props.height\n})\n\nconst getPieChartData = () => ({ ...props.data, series: props.data.series[0] })\n\nconst getOptions = () => {\n const propsOptopns = props.options || {}\n return {\n ...propsOptopns,\n width: props.width * slideScale.value,\n height: chartHeight.value * slideScale.value,\n }\n}\n\nconst renderChart = () => {\n if (!chartRef.value) return\n\n const options = getOptions()\n if (props.type === 'bar') chart = new BarChart(chartRef.value, props.data, options)\n if (props.type === 'line') chart = new LineChart(chartRef.value, props.data, options)\n if (props.type === 'pie') chart = new PieChart(chartRef.value, getPieChartData(), options)\n}\n\nconst updateChart = () => {\n if (!chart) {\n renderChart()\n return\n }\n const options = getOptions()\n const data = props.type === 'pie' ? getPieChartData() : props.data\n chart.update(data, options)\n}\n\nwatch([\n () => props.width,\n () => props.height,\n () => props.data,\n () => props.options,\n slideScale,\n], updateChart)\n\nonMounted(renderChart)\n\nconst themeColors = computed(() => {\n let colors: string[] = []\n if (props.themeColor.length >= 10) colors = props.themeColor\n else if (props.themeColor.length === 1) colors = tinycolor(props.themeColor[0]).analogous(10).map(color => color.toRgbString())\n else {\n const len = props.themeColor.length\n const supplement = tinycolor(props.themeColor[len - 1]).analogous(10 + 1 - len).map(color => color.toRgbString())\n colors = [...props.themeColor.slice(0, len - 1), ...supplement]\n }\n return colors\n})\n\n// 更新主题配色:\n// 如果当前所设置的主题色数小于10,剩余部分获取最后一个主题色的相近颜色作为配色\nconst updateTheme = () => {\n if (!chartRef.value) return\n\n for (let i = 0; i < 10; i++) {\n chartRef.value.style.setProperty(`--theme-color-${i + 1}`, themeColors.value[i])\n }\n}\n\nwatch(themeColors, updateTheme)\nonMounted(updateTheme)\n\n// 更新网格颜色,包括坐标的文字部分\nconst updateGridColor = () => {\n if (!chartRef.value) return\n if (props.gridColor) chartRef.value.style.setProperty(`--grid-color`, props.gridColor)\n}\n\nwatch(() => props.gridColor, updateGridColor)\nonMounted(updateGridColor)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"chart\",\n style: _normalizeStyle({ flexDirection: _ctx.legend === 'top' ? 'column-reverse' : 'column' })\n }, [\n _createElementVNode(\"div\", {\n class: \"chart-content\",\n ref_key: \"chartRef\",\n ref: chartRef,\n style: _normalizeStyle({\n width: _ctx.width + 'px',\n height: chartHeight.value + 'px',\n transform: `scale(${1 / _unref(slideScale)})`,\n })\n }, null, 4),\n (_ctx.legend)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"legends\",\n style: _normalizeStyle({ transform: `scale(${1 / _unref(slideScale)})` })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.legends, (legend, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"legend\",\n key: index,\n style: _normalizeStyle({ color: _ctx.gridColor })\n }, [\n _createElementVNode(\"div\", {\n class: \"block\",\n style: _normalizeStyle({ backgroundColor: themeColors.value[index] })\n }, null, 4),\n _createTextVNode(\" \" + _toDisplayString(legend), 1)\n ], 4))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./Chart.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Chart.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Chart.vue?vue&type=style&index=0&id=ae2a96a6&lang=scss&scoped=true\"\nimport \"./Chart.vue?vue&type=style&index=1&id=ae2a96a6&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ae2a96a6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport type { PPTChartElement } from '@/types/slides'\r\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\r\nimport emitter, { EmitterEvents } from '@/utils/emitter'\r\n\r\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\r\nimport Chart from './Chart.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n\r\n\r\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\r\n if (props.elementInfo.lock) return\r\n e.stopPropagation()\r\n\r\n props.selectElement(e, props.elementInfo)\r\n}\r\n\r\nconst openDataEditor = () => {\r\n emitter.emit(EmitterEvents.OPEN_CHART_DATA_EDITOR)\r\n}\r\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-chart\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top + 'px',\r\n left: _ctx.elementInfo.left + 'px',\r\n width: _ctx.elementInfo.width + 'px',\r\n height: _ctx.elementInfo.height + 'px',\r\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\r\n backgroundColor: _ctx.elementInfo.fill,\r\n }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onDblclick: _cache[2] || (_cache[2] = ($event: any) => (openDataEditor()))\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(Chart, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n type: _ctx.elementInfo.chartType,\n data: _ctx.elementInfo.data,\n options: _ctx.elementInfo.options,\n themeColor: _ctx.elementInfo.themeColor,\n gridColor: _ctx.elementInfo.gridColor,\n legends: _ctx.elementInfo.data.legends,\n legend: _ctx.elementInfo.legend || ''\n }, null, 8, [\"width\", \"height\", \"type\", \"data\", \"options\", \"themeColor\", \"gridColor\", \"legends\", \"legend\"])\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\r\n\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=6fc3de39&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6fc3de39\"]])\n\nexport default __exports__","import type { CSSProperties } from 'vue'\nimport type { TableCellStyle } from '@/types/slides'\n\n/**\n * 计算单元格文本样式\n * @param style 单元格文本样式原数据\n */\nexport const getTextStyle = (style?: TableCellStyle): CSSProperties => {\n if (!style) return {}\n const {\n bold,\n em,\n underline,\n strikethrough,\n color,\n backcolor,\n fontsize,\n fontname,\n align,\n } = style\n\n let textDecoration = `${underline ? 'underline' : ''} ${strikethrough ? 'line-through' : ''}`\n if (textDecoration === ' ') textDecoration = 'none'\n \n return {\n fontWeight: bold ? 'bold' : 'normal',\n fontStyle: em ? 'italic' : 'normal',\n textDecoration,\n color: color || '#000',\n backgroundColor: backcolor || '',\n fontSize: fontsize || '14px',\n fontFamily: fontname || '微软雅黑',\n textAlign: align || 'left',\n }\n}\n\nexport const formatText = (text: string) => {\n return text.replace(/\\n/g, '
').replace(/ /g, ' ')\n}","import { computed, type Ref } from 'vue'\nimport type { TableCell } from '@/types/slides'\n\n// 计算无效的单元格位置(被合并的单元格位置)集合\n\nexport default (cells: Ref) => {\n const hideCells = computed(() => {\n const hideCells = []\n \n for (let i = 0; i < cells.value.length; i++) {\n const rowCells = cells.value[i]\n\n for (let j = 0; j < rowCells.length; j++) {\n const cell = rowCells[j]\n \n if (cell.colspan > 1 || cell.rowspan > 1) {\n for (let row = i; row < i + cell.rowspan; row++) {\n for (let col = row === i ? j + 1 : j; col < j + cell.colspan; col++) {\n hideCells.push(`${row}_${col}`)\n }\n }\n }\n }\n }\n return hideCells\n })\n\n return {\n hideCells,\n }\n}","import { ref, watch, type Ref } from 'vue'\nimport type { TableTheme } from '@/types/slides'\nimport { getTableSubThemeColor } from '@/utils/element'\n\n// 通过表格的主题色计算辅助颜色\n\nexport default (theme: Ref) => {\n const subThemeColor = ref(['', ''])\n watch(() => theme.value, () => {\n if (theme.value) {\n subThemeColor.value = getTableSubThemeColor(theme.value.color)\n }\n }, { immediate: true })\n\n return {\n subThemeColor,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7a7222ac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/clipboard'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'CustomTextarea',\n props: {\n value: { default: '' }\n },\n emits: [\"updateValue\", \"insertExcelData\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst textareaRef = ref()\nconst text = ref('')\nconst isFocus = ref(false)\n\n// 自定义v-modal,同步数据\n// 当文本框聚焦时,不执行数据同步\nwatch(() => props.value, () => {\n if (isFocus.value) return\n text.value = props.value\n if (textareaRef.value) textareaRef.value.innerHTML = props.value\n}, { immediate: true })\n\nconst handleInput = () => {\n if (!textareaRef.value) return\n const text = textareaRef.value.innerHTML\n emit('updateValue', text)\n}\n\n// 聚焦时更新焦点标记,并监听粘贴事件\nconst handleFocus = () => {\n isFocus.value = true\n\n if (!textareaRef.value) return\n textareaRef.value.onpaste = (e: ClipboardEvent) => {\n e.preventDefault()\n if (!e.clipboardData) return\n\n const clipboardDataFirstItem = e.clipboardData.items[0]\n\n if (clipboardDataFirstItem && clipboardDataFirstItem.kind === 'string' && clipboardDataFirstItem.type === 'text/plain') {\n clipboardDataFirstItem.getAsString(text => {\n const clipboardData = pasteCustomClipboardString(text)\n if (typeof clipboardData === 'object') return\n \n const excelData = pasteExcelClipboardString(text)\n if (excelData) {\n emit('insertExcelData', excelData)\n if (textareaRef.value) textareaRef.value.innerHTML = excelData[0][0]\n return\n }\n\n document.execCommand('insertText', false, text)\n })\n }\n }\n}\n\n// 失焦时更新焦点标记,清除粘贴事件监听\nconst handleBlur = () => {\n isFocus.value = false\n if (textareaRef.value) textareaRef.value.onpaste = null\n}\n\n// 清除粘贴事件监听\nonBeforeUnmount(() => {\n if (textareaRef.value) textareaRef.value.onpaste = null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"custom-textarea\",\n ref_key: \"textareaRef\",\n ref: textareaRef,\n contenteditable: true,\n onFocus: _cache[0] || (_cache[0] = ($event: any) => (handleFocus())),\n onBlur: _cache[1] || (_cache[1] = ($event: any) => (handleBlur())),\n onInput: _cache[2] || (_cache[2] = ($event: any) => (handleInput())),\n innerHTML: text.value\n }, null, 40, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./CustomTextarea.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CustomTextarea.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./CustomTextarea.vue?vue&type=style&index=0&id=7a7222ac&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7a7222ac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, createBlock as _createBlock, vShow as _vShow, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0236a619\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"handler\"\n}\nconst _hoisted_2 = [\"onMousedown\"]\nconst _hoisted_3 = [\"width\"]\nconst _hoisted_4 = [\"rowspan\", \"colspan\", \"data-cell-index\", \"onMousedown\", \"onMouseenter\"]\nconst _hoisted_5 = [\"innerHTML\"]\n\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { debounce, isEqual } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore } from '@/store'\nimport type { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { KEYS } from '@/configs/hotkey'\nimport { getTextStyle, formatText } from './utils'\nimport useHideCells from './useHideCells'\nimport useSubThemeColor from './useSubThemeColor'\n\nimport CustomTextarea from './CustomTextarea.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditableTable',\n props: {\n data: {},\n width: {},\n cellMinHeight: {},\n colWidths: {},\n outline: {},\n theme: {},\n editable: { type: Boolean, default: true }\n },\n emits: [\"change\", \"changeColWidths\", \"changeSelectedCells\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n \nconst isStartSelect = ref(false)\nconst startCell = ref([])\nconst endCell = ref([])\n\nconst tableCells = computed({\n get() {\n return props.data\n },\n set(newData) {\n emit('change', newData)\n },\n})\n\n// 主题辅助色\nconst theme = computed(() => props.theme)\nconst { subThemeColor } = useSubThemeColor(theme)\n\n// 计算表格每一列的列宽和总宽度\nconst colSizeList = ref([])\nconst totalWidth = computed(() => colSizeList.value.reduce((a, b) => a + b))\nwatch([\n () => props.colWidths,\n () => props.width,\n], () => {\n colSizeList.value = props.colWidths.map(item => item * props.width)\n}, { immediate: true })\n\n// 清除全部单元格的选中状态\n// 表格处于不可编辑状态时也需要清除\nconst removeSelectedCells = () => {\n startCell.value = []\n endCell.value = []\n}\n\nwatch(() => props.editable, () => {\n if (!props.editable) removeSelectedCells()\n})\n\n// 用于拖拽列宽的操作节点位置\nconst dragLinePosition = computed(() => {\n const dragLinePosition: number[] = []\n for (let i = 1; i < colSizeList.value.length + 1; i++) {\n const pos = colSizeList.value.slice(0, i).reduce((a, b) => (a + b))\n dragLinePosition.push(pos)\n }\n return dragLinePosition\n})\n\n// 无效的单元格位置(被合并的单元格位置)集合\nconst cells = computed(() => props.data)\nconst { hideCells } = useHideCells(cells)\n\n// 当前选中的单元格集合\nconst selectedCells = computed(() => {\n if (!startCell.value.length) return []\n const [startX, startY] = startCell.value\n\n if (!endCell.value.length) return [`${startX}_${startY}`]\n const [endX, endY] = endCell.value\n\n if (startX === endX && startY === endY) return [`${startX}_${startY}`]\n\n const selectedCells = []\n\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n for (let i = 0; i < tableCells.value.length; i++) {\n const rowCells = tableCells.value[i]\n for (let j = 0; j < rowCells.length; j++) {\n if (i >= minX && i <= maxX && j >= minY && j <= maxY) selectedCells.push(`${i}_${j}`)\n }\n }\n return selectedCells\n})\n\nwatch(selectedCells, (value, oldValue) => {\n if (isEqual(value, oldValue)) return\n emit('changeSelectedCells', selectedCells.value)\n})\n\n// 当前激活的单元格:当且仅当只有一个选中单元格时,该单元格为激活的单元格\nconst activedCell = computed(() => {\n if (selectedCells.value.length > 1) return null\n return selectedCells.value[0]\n})\n\n// 设置选中单元格状态(鼠标点击或拖选)\nconst handleMouseup = () => isStartSelect.value = false\n\nconst handleCellMousedown = (e: MouseEvent, rowIndex: number, colIndex: number) => {\n if (e.button === 0) {\n endCell.value = []\n isStartSelect.value = true\n startCell.value = [rowIndex, colIndex]\n }\n}\n\nconst handleCellMouseenter = (rowIndex: number, colIndex: number) => {\n if (!isStartSelect.value) return\n endCell.value = [rowIndex, colIndex]\n}\n\nonMounted(() => {\n document.addEventListener('mouseup', handleMouseup)\n})\nonUnmounted(() => {\n document.removeEventListener('mouseup', handleMouseup)\n})\n\n// 判断某位置是否为无效单元格(被合并掉的位置)\nconst isHideCell = (rowIndex: number, colIndex: number) => hideCells.value.includes(`${rowIndex}_${colIndex}`)\n\n// 选中指定的列\nconst selectCol = (index: number) => {\n const maxRow = tableCells.value.length - 1\n startCell.value = [0, index]\n endCell.value = [maxRow, index]\n}\n\n// 选中指定的行\nconst selectRow = (index: number) => {\n const maxCol = tableCells.value[index].length - 1\n startCell.value = [index, 0]\n endCell.value = [index, maxCol]\n}\n\n// 选中全部单元格\nconst selectAll = () => {\n const maxRow = tableCells.value.length - 1\n const maxCol = tableCells.value[maxRow].length - 1\n startCell.value = [0, 0]\n endCell.value = [maxRow, maxCol]\n}\n\n// 删除一行\nconst deleteRow = (rowIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const targetCells = tableCells.value[rowIndex]\n const hideCellsPos = []\n for (let i = 0; i < targetCells.length; i++) {\n if (isHideCell(rowIndex, i)) hideCellsPos.push(i)\n }\n \n for (const pos of hideCellsPos) {\n for (let i = rowIndex; i >= 0; i--) {\n if (!isHideCell(i, pos)) {\n _tableCells[i][pos].rowspan = _tableCells[i][pos].rowspan - 1\n break\n }\n }\n }\n\n _tableCells.splice(rowIndex, 1)\n tableCells.value = _tableCells\n}\n\n// 删除一列\nconst deleteCol = (colIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const hideCellsPos = []\n for (let i = 0; i < tableCells.value.length; i++) {\n if (isHideCell(i, colIndex)) hideCellsPos.push(i)\n }\n\n for (const pos of hideCellsPos) {\n for (let i = colIndex; i >= 0; i--) {\n if (!isHideCell(pos, i)) {\n _tableCells[pos][i].colspan = _tableCells[pos][i].colspan - 1\n break\n }\n }\n }\n\n tableCells.value = _tableCells.map(item => {\n item.splice(colIndex, 1)\n return item\n })\n colSizeList.value.splice(colIndex, 1)\n emit('changeColWidths', colSizeList.value)\n}\n\n// 插入一行\nconst insertRow = (rowIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const rowCells: TableCell[] = []\n for (let i = 0; i < _tableCells[0].length; i++) {\n rowCells.push({\n colspan: 1,\n rowspan: 1,\n text: '',\n id: nanoid(10),\n })\n }\n\n _tableCells.splice(rowIndex, 0, rowCells)\n tableCells.value = _tableCells\n}\n\n// 插入一列\nconst insertCol = (colIndex: number) => {\n tableCells.value = tableCells.value.map(item => {\n const cell = {\n colspan: 1,\n rowspan: 1,\n text: '',\n id: nanoid(10),\n }\n item.splice(colIndex, 0, cell)\n return item\n })\n colSizeList.value.splice(colIndex, 0, 100)\n emit('changeColWidths', colSizeList.value)\n}\n\n// 填充指定的行/列数\nconst fillTable = (rowCount: number, colCount: number) => {\n let _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n const defaultCell = { colspan: 1, rowspan: 1, text: '' }\n \n if (rowCount) {\n const newRows = []\n for (let i = 0; i < rowCount; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < _tableCells[0].length; j++) {\n rowCells.push({\n ...defaultCell,\n id: nanoid(10),\n })\n }\n newRows.push(rowCells)\n }\n _tableCells = [..._tableCells, ...newRows]\n }\n if (colCount) {\n _tableCells = _tableCells.map(item => {\n const cells: TableCell[] = []\n for (let i = 0; i < colCount; i++) {\n const cell = {\n ...defaultCell,\n id: nanoid(10),\n }\n cells.push(cell)\n }\n return [...item, ...cells]\n })\n colSizeList.value = [...colSizeList.value, ...new Array(colCount).fill(100)]\n emit('changeColWidths', colSizeList.value)\n }\n\n tableCells.value = _tableCells\n}\n\n// 合并单元格\nconst mergeCells = () => {\n const [startX, startY] = startCell.value\n const [endX, endY] = endCell.value\n\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n \n _tableCells[minX][minY].rowspan = maxX - minX + 1\n _tableCells[minX][minY].colspan = maxY - minY + 1\n\n tableCells.value = _tableCells\n removeSelectedCells()\n}\n\n// 拆分单元格\nconst splitCells = (rowIndex: number, colIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n _tableCells[rowIndex][colIndex].rowspan = 1\n _tableCells[rowIndex][colIndex].colspan = 1\n\n tableCells.value = _tableCells\n removeSelectedCells()\n}\n\n// 鼠标拖拽调整列宽\nconst handleMousedownColHandler = (e: MouseEvent, colIndex: number) => {\n removeSelectedCells()\n let isMouseDown = true\n\n const originWidth = colSizeList.value[colIndex]\n const startPageX = e.pageX\n\n const minWidth = 50\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n \n const moveX = (e.pageX - startPageX) / canvasScale.value\n const width = originWidth + moveX < minWidth ? minWidth : Math.round(originWidth + moveX)\n\n colSizeList.value[colIndex] = width\n }\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n emit('changeColWidths', colSizeList.value)\n }\n}\n\n// 清空选中单元格内的文字\nconst clearSelectedCellText = () => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n for (let i = 0; i < _tableCells.length; i++) {\n for (let j = 0; j < _tableCells[i].length; j++) {\n if (selectedCells.value.includes(`${i}_${j}`)) {\n _tableCells[i][j].text = ''\n }\n }\n }\n tableCells.value = _tableCells\n}\n\n// 将焦点移动到下一个单元格\n// 当前行右边有单元格时,焦点右移\n// 当前行右边无单元格(已处在行末),且存在下一行时,焦点移动至下一行行首\n// 当前行右边无单元格(已处在行末),且不存在下一行(已处在最后一行)时,新建一行并将焦点移动至下一行行首\nconst tabActiveCell = () => {\n const getNextCell = (i: number, j: number): [number, number] | null => {\n if (!tableCells.value[i]) return null\n if (!tableCells.value[i][j]) return getNextCell(i + 1, 0)\n if (isHideCell(i, j)) return getNextCell(i, j + 1)\n return [i, j]\n }\n\n endCell.value = []\n\n const nextRow = startCell.value[0]\n const nextCol = startCell.value[1] + 1\n\n const nextCell = getNextCell(nextRow, nextCol)\n if (!nextCell) {\n insertRow(nextRow + 1)\n startCell.value = [nextRow + 1, 0]\n }\n else startCell.value = nextCell\n\n // 移动焦点后自动聚焦文本\n nextTick(() => {\n const textRef = document.querySelector('.cell-text.active') as HTMLInputElement\n if (textRef) textRef.focus()\n })\n}\n\n// 表格快捷键监听\nconst keydownListener = (e: KeyboardEvent) => {\n if (!props.editable || !selectedCells.value.length) return\n\n const key = e.key.toUpperCase()\n if (selectedCells.value.length < 2) {\n if (key === KEYS.TAB) {\n e.preventDefault()\n tabActiveCell()\n }\n if (e.ctrlKey && key === KEYS.UP) {\n e.preventDefault()\n const rowIndex = +selectedCells.value[0].split('_')[0]\n insertRow(rowIndex)\n }\n if (e.ctrlKey && key === KEYS.DOWN) {\n e.preventDefault()\n const rowIndex = +selectedCells.value[0].split('_')[0]\n insertRow(rowIndex + 1)\n }\n if (e.ctrlKey && key === KEYS.LEFT) {\n e.preventDefault()\n const colIndex = +selectedCells.value[0].split('_')[1]\n insertCol(colIndex)\n }\n if (e.ctrlKey && key === KEYS.RIGHT) {\n e.preventDefault()\n const colIndex = +selectedCells.value[0].split('_')[1]\n insertCol(colIndex + 1)\n }\n }\n else if (key === KEYS.DELETE) {\n clearSelectedCellText()\n }\n}\n\nonMounted(() => {\n document.addEventListener('keydown', keydownListener)\n})\nonUnmounted(() => {\n document.removeEventListener('keydown', keydownListener)\n})\n\n// 单元格文字输入时更新表格数据\nconst handleInput = debounce(function(value, rowIndex, colIndex) {\n tableCells.value[rowIndex][colIndex].text = value\n emit('change', tableCells.value)\n}, 300, { trailing: true })\n\n// 插入来自Excel的数据,表格的行/列数不够时自动补足\nconst insertExcelData = (data: string[][], rowIndex: number, colIndex: number) => {\n const maxRow = data.length\n const maxCol = data[0].length\n\n let fillRowCount = 0\n let fillColCount = 0\n if (rowIndex + maxRow > tableCells.value.length) fillRowCount = rowIndex + maxRow - tableCells.value.length\n if (colIndex + maxCol > tableCells.value[0].length) fillColCount = colIndex + maxCol - tableCells.value[0].length\n if (fillRowCount || fillColCount) fillTable(fillRowCount, fillColCount)\n\n nextTick(() => {\n for (let i = 0; i < maxRow; i++) {\n for (let j = 0; j < maxCol; j++) {\n if (tableCells.value[rowIndex + i][colIndex + j]) {\n tableCells.value[rowIndex + i][colIndex + j].text = data[i][j]\n }\n }\n }\n emit('change', tableCells.value)\n })\n}\n\n// 获取有效的单元格(排除掉被合并的单元格)\nconst getEffectiveTableCells = () => {\n const effectiveTableCells = []\n\n for (let i = 0; i < tableCells.value.length; i++) {\n const rowCells = tableCells.value[i]\n const _rowCells = []\n for (let j = 0; j < rowCells.length; j++) {\n if (!isHideCell(i, j)) _rowCells.push(rowCells[j])\n }\n if (_rowCells.length) effectiveTableCells.push(_rowCells)\n }\n\n return effectiveTableCells\n}\n\n// 检查是否可以删除行和列:有效的行/列数大于1\nconst checkCanDeleteRowOrCol = () => {\n const effectiveTableCells = getEffectiveTableCells()\n const canDeleteRow = effectiveTableCells.length > 1\n const canDeleteCol = effectiveTableCells[0].length > 1\n\n return { canDeleteRow, canDeleteCol }\n}\n\n// 检查是否可以合并或拆分\n// 必须多选才可以合并\n// 必须单选且所选单元格为合并单元格才可以拆分\nconst checkCanMergeOrSplit = (rowIndex: number, colIndex: number) => {\n const isMultiSelected = selectedCells.value.length > 1\n const targetCell = tableCells.value[rowIndex][colIndex]\n\n const canMerge = isMultiSelected\n const canSplit = !isMultiSelected && (targetCell.rowspan > 1 || targetCell.colspan > 1)\n\n return { canMerge, canSplit }\n}\n\nconst contextmenus = (el: HTMLElement): ContextmenuItem[] => {\n const cellIndex = el.dataset.cellIndex as string\n const rowIndex = +cellIndex.split('_')[0]\n const colIndex = +cellIndex.split('_')[1]\n\n if (!selectedCells.value.includes(`${rowIndex}_${colIndex}`)) {\n startCell.value = [rowIndex, colIndex]\n endCell.value = []\n }\n\n const { canMerge, canSplit } = checkCanMergeOrSplit(rowIndex, colIndex)\n const { canDeleteRow, canDeleteCol } = checkCanDeleteRowOrCol()\n\n return [\n {\n text: '插入列',\n children: [\n { text: '到左侧', handler: () => insertCol(colIndex) },\n { text: '到右侧', handler: () => insertCol(colIndex + 1) },\n ],\n },\n {\n text: '插入行',\n children: [\n { text: '到上方', handler: () => insertRow(rowIndex) },\n { text: '到下方', handler: () => insertRow(rowIndex + 1) },\n ],\n },\n {\n text: '删除列',\n disable: !canDeleteCol,\n handler: () => deleteCol(colIndex),\n },\n {\n text: '删除行',\n disable: !canDeleteRow,\n handler: () => deleteRow(rowIndex),\n },\n { divider: true },\n {\n text: '合并单元格',\n disable: !canMerge,\n handler: mergeCells,\n },\n {\n text: '取消合并单元格',\n disable: !canSplit,\n handler: () => splitCells(rowIndex, colIndex),\n },\n { divider: true },\n {\n text: '选中当前列',\n handler: () => selectCol(colIndex),\n },\n {\n text: '选中当前行',\n handler: () => selectRow(rowIndex),\n },\n {\n text: '选中全部单元格',\n handler: selectAll,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"editable-table\",\n style: _normalizeStyle({ width: totalWidth.value + 'px' })\n }, [\n (_ctx.editable)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(dragLinePosition.value, (pos, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"drag-line\",\n key: index,\n style: _normalizeStyle({ left: pos + 'px' }),\n onMousedown: $event => handleMousedownColHandler($event, index)\n }, null, 44, _hoisted_2))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"table\", {\n class: _normalizeClass({\n 'theme': theme.value,\n 'row-header': theme.value?.rowHeader,\n 'row-footer': theme.value?.rowFooter,\n 'col-header': theme.value?.colHeader,\n 'col-footer': theme.value?.colFooter,\n }),\n style: _normalizeStyle(`--themeColor: ${theme.value?.color}; --subThemeColor1: ${_unref(subThemeColor)[0]}; --subThemeColor2: ${_unref(subThemeColor)[1]}`)\n }, [\n _createElementVNode(\"colgroup\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(colSizeList.value, (width, index) => {\n return (_openBlock(), _createElementBlock(\"col\", {\n span: \"1\",\n key: index,\n width: width\n }, null, 8, _hoisted_3))\n }), 128))\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tableCells.value, (rowCells, rowIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: rowIndex,\n style: _normalizeStyle({ height: _ctx.cellMinHeight + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rowCells, (cell, colIndex) => {\n return _withDirectives((_openBlock(), _createElementBlock(\"td\", {\n class: _normalizeClass([\"cell\", {\n 'selected': selectedCells.value.includes(`${rowIndex}_${colIndex}`) && selectedCells.value.length > 1,\n 'active': activedCell.value === `${rowIndex}_${colIndex}`,\n }]),\n style: _normalizeStyle({\n borderStyle: _ctx.outline.style,\n borderColor: _ctx.outline.color,\n borderWidth: _ctx.outline.width + 'px',\n ..._unref(getTextStyle)(cell.style),\n }),\n key: cell.id,\n rowspan: cell.rowspan,\n colspan: cell.colspan,\n \"data-cell-index\": `${rowIndex}_${colIndex}`,\n onMousedown: $event => handleCellMousedown($event, rowIndex, colIndex),\n onMouseenter: ($event: any) => (handleCellMouseenter(rowIndex, colIndex))\n }, [\n (activedCell.value === `${rowIndex}_${colIndex}`)\n ? (_openBlock(), _createBlock(CustomTextarea, {\n key: 0,\n class: _normalizeClass([\"cell-text\", { 'active': activedCell.value === `${rowIndex}_${colIndex}` }]),\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n value: cell.text,\n onUpdateValue: value => _unref(handleInput)(value, rowIndex, colIndex),\n onInsertExcelData: value => insertExcelData(value, rowIndex, colIndex)\n }, null, 8, [\"class\", \"style\", \"value\", \"onUpdateValue\", \"onInsertExcelData\"]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"cell-text\",\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n innerHTML: _unref(formatText)(cell.text)\n }, null, 12, _hoisted_5))\n ], 46, _hoisted_4)), [\n [_vShow, !_unref(hideCells).includes(`${rowIndex}_${colIndex}`)],\n [_directive_contextmenu, (el) => contextmenus(el)]\n ])\n }), 128))\n ], 4))\n }), 128))\n ])\n ], 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./EditableTable.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./EditableTable.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./EditableTable.vue?vue&type=style&index=0&id=0236a619&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0236a619\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createVNode as _createVNode, unref as _unref, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-742a731e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTableElement, TableCell } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport EditableTable from './EditableTable.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { canvasScale, handleElementId, isScaling } = storeToRefs(mainStore)\n\nconst elementRef = ref()\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\n// 更新表格的可编辑状态,表格处于编辑状态时需要禁用全局快捷键\nconst editable = ref(false)\n\nwatch(handleElementId, () => {\n if (handleElementId.value !== props.elementInfo.id) editable.value = false\n})\n\nwatch(editable, () => {\n mainStore.setDisableHotkeysState(editable.value)\n})\n\nconst startEdit = () => {\n if (!props.elementInfo.lock) editable.value = true\n}\n\n// 监听表格元素的尺寸变化,当高度变化时,更新高度到vuex\n// 如果高度变化时正处在缩放操作中,则等待缩放操作结束后再更新\nconst realHeightCache = ref(-1)\n\nwatch(isScaling, () => {\n if (handleElementId.value !== props.elementInfo.id) return\n\n if (isScaling.value) editable.value = false\n\n if (!isScaling.value && realHeightCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeightCache.value },\n })\n realHeightCache.value = -1\n }\n})\n\nconst updateTableElementHeight = (entries: ResizeObserverEntry[]) => {\n const contentRect = entries[0].contentRect\n if (!elementRef.value) return\n\n const realHeight = contentRect.height\n\n if (props.elementInfo.height !== realHeight) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeight },\n })\n }\n else realHeightCache.value = realHeight\n }\n}\n\nconst resizeObserver = new ResizeObserver(updateTableElementHeight)\n\nonMounted(() => {\n if (elementRef.value) resizeObserver.observe(elementRef.value)\n})\nonUnmounted(() => {\n if (elementRef.value) resizeObserver.unobserve(elementRef.value)\n})\n\n// 更新表格内容数据\nconst updateTableCells = (data: TableCell[][]) => {\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { data },\n })\n addHistorySnapshot()\n}\n\n// 更新表格的列宽数据\nconst updateColWidths = (widths: number[]) => {\n const width = widths.reduce((a, b) => a + b)\n const colWidths = widths.map(item => item / width)\n\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { width, colWidths },\n })\n addHistorySnapshot()\n}\n\n// 更新表格当前选中的单元格\nconst updateSelectedCells = (cells: string[]) => {\n nextTick(() => mainStore.setSelectedTableCells(cells))\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-table\", { 'lock': _ctx.elementInfo.lock }]),\n ref_key: \"elementRef\",\n ref: elementRef,\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(EditableTable, {\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"])),\n data: _ctx.elementInfo.data,\n width: _ctx.elementInfo.width,\n cellMinHeight: _ctx.elementInfo.cellMinHeight,\n colWidths: _ctx.elementInfo.colWidths,\n outline: _ctx.elementInfo.outline,\n theme: _ctx.elementInfo.theme,\n editable: editable.value,\n onChange: _cache[1] || (_cache[1] = data => updateTableCells(data)),\n onChangeColWidths: _cache[2] || (_cache[2] = widths => updateColWidths(widths)),\n onChangeSelectedCells: _cache[3] || (_cache[3] = cells => updateSelectedCells(cells))\n }, null, 8, [\"data\", \"width\", \"cellMinHeight\", \"colWidths\", \"outline\", \"theme\", \"editable\"]),\n (!editable.value || _ctx.elementInfo.lock)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"table-mask\", { 'lock': _ctx.elementInfo.lock }]),\n onDblclick: _cache[4] || (_cache[4] = ($event: any) => (startEdit())),\n onMousedown: _cache[5] || (_cache[5] = $event => handleSelectElement($event)),\n onTouchstart: _cache[6] || (_cache[6] = $event => handleSelectElement($event))\n }, [\n (_unref(handleElementId) === _ctx.elementInfo.id)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"mask-tip\",\n style: _normalizeStyle({ transform: `scale(${ 1 / _unref(canvasScale) })` })\n }, \"双击编辑\", 4))\n : _createCommentVNode(\"\", true)\n ], 34))\n : _createCommentVNode(\"\", true)\n ])), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=742a731e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-742a731e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35c33b80\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\", \"stroke\", \"stroke-width\"]\nconst _hoisted_2 = [\"transform\"]\nconst _hoisted_3 = [\"d\"]\n\nimport type { PPTLatexElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport emitter, { EmitterEvents } from '@/utils/emitter'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nconst openLatexEditor = () => {\n emitter.emit(EmitterEvents.OPEN_LATEX_EDITOR)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-latex\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onDblclick: _cache[2] || (_cache[2] = ($event: any) => (openLatexEditor()))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.strokeWidth,\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n d: _ctx.elementInfo.path\n }, null, 8, _hoisted_3)\n ], 8, _hoisted_2)\n ], 8, _hoisted_1))\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=35c33b80&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35c33b80\"]])\n\nexport default __exports__","import { onMounted, type Ref } from 'vue'\n\nexport default (\n src: string,\n videoRef: Ref,\n) => {\n onMounted(() => {\n if (!videoRef.value) return\n\n let type = 'normal'\n if (/m3u8(#|\\?|$)/i.exec(src)) type = 'hls'\n else if (/.flv(#|\\?|$)/i.exec(src)) type = 'flv'\n\n if (videoRef.value && type === 'hls' && (videoRef.value.canPlayType('application/x-mpegURL') || videoRef.value.canPlayType('application/vnd.apple.mpegURL'))) {\n type = 'normal'\n }\n\n if (type === 'hls') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Hls = (window as any).Hls\n \n if (Hls && Hls.isSupported()) {\n const hls = new Hls()\n hls.loadSource(src)\n hls.attachMedia(videoRef.value)\n }\n }\n else if (type === 'flv') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const flvjs = (window as any).flvjs\n if (flvjs && flvjs.isSupported()) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: src,\n })\n flvPlayer.attachMediaElement(videoRef.value)\n flvPlayer.load()\n }\n }\n })\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-e55352ca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"load-error\"\n}\nconst _hoisted_2 = [\"src\", \"autoplay\", \"poster\"]\nconst _hoisted_3 = { class: \"bezel\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"controller-mask\" }, null, -1))\nconst _hoisted_5 = { class: \"controller\" }\nconst _hoisted_6 = { class: \"icons icons-left\" }\nconst _hoisted_7 = { class: \"icon-content\" }\nconst _hoisted_8 = { class: \"volume\" }\nconst _hoisted_9 = { class: \"icon-content\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\nconst _hoisted_12 = { class: \"time\" }\nconst _hoisted_13 = { class: \"ptime\" }\nconst _hoisted_14 = { class: \"dtime\" }\nconst _hoisted_15 = { class: \"icons icons-right\" }\nconst _hoisted_16 = { class: \"speed\" }\nconst _hoisted_17 = { class: \"icon speed-icon\" }\nconst _hoisted_18 = [\"onClick\"]\nconst _hoisted_19 = { class: \"icon-content\" }\nconst _hoisted_20 = { class: \"bar\" }\nconst _hoisted_21 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_22 = [\n _hoisted_21\n]\n\nimport { computed, ref } from 'vue'\nimport useMSE from './useMSE'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n width: {},\n height: {},\n src: {},\n poster: { default: '' },\n autoplay: { type: Boolean, default: false },\n scale: { default: 1 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst secondToTime = (second = 0) => {\n if (second === 0 || isNaN(second)) return '00:00'\n\n const add0 = (num: number) => (num < 10 ? '0' + num : '' + num)\n const hour = Math.floor(second / 3600)\n const min = Math.floor((second - hour * 3600) / 60)\n const sec = Math.floor(second - hour * 3600 - min * 60)\n return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':')\n}\n\nconst getBoundingClientRectViewLeft = (element: HTMLElement) => {\n return element.getBoundingClientRect().left\n}\n\nconst videoRef = ref()\nconst playBarWrap = ref()\nconst volumeBarRef = ref()\n\nconst volume = ref(0.5)\nconst paused = ref(true)\nconst currentTime = ref(0)\nconst duration = ref(0)\nconst loaded = ref(0)\nconst loop = ref(false)\nconst bezelTransition = ref(false)\nconst playbackRate = ref(1)\n\nconst playBarTimeVisible = ref(false)\nconst playBarTime = ref('00:00')\nconst playBarTimeLeft = ref('0')\n\nconst ptime = computed(() => secondToTime(currentTime.value))\nconst dtime = computed(() => secondToTime(duration.value))\nconst playedBarWidth = computed(() => currentTime.value / duration.value * 100 + '%')\nconst loadedBarWidth = computed(() => loaded.value / duration.value * 100 + '%')\nconst volumeBarWidth = computed(() => volume.value * 100 + '%')\n\nconst speedMenuVisible = ref(false)\nconst speedOptions = [\n { label: '2x', value: 2 },\n { label: '1.5x', value: 1.5 },\n { label: '1.25x', value: 1.25 },\n { label: '1x', value: 1 },\n { label: '0.75x', value: 0.75 },\n { label: '0.5x', value: 0.5 },\n]\n\nconst seek = (time: number) => {\n if (!videoRef.value) return\n\n time = Math.max(time, 0)\n time = Math.min(time, duration.value)\n\n videoRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst play = () => {\n if (!videoRef.value) return\n\n paused.value = false\n videoRef.value.play()\n bezelTransition.value = true\n}\n\nconst pause = () => {\n if (!videoRef.value) return\n\n paused.value = true\n videoRef.value.pause()\n bezelTransition.value = true\n}\n\nconst toggle = () => {\n if (paused.value) play() \n else pause()\n}\n\nconst setVolume = (percentage: number) => {\n if (!videoRef.value) return\n\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n\n videoRef.value.volume = percentage\n volume.value = percentage\n if (videoRef.value.muted && percentage !== 0) videoRef.value.muted = false\n}\n\nconst speed = (rate: number) => {\n if (videoRef.value) videoRef.value.playbackRate = rate\n playbackRate.value = rate\n}\n\nconst handleDurationchange = () => {\n duration.value = videoRef.value?.duration || 0\n}\n\nconst handleTimeupdate = () => {\n currentTime.value = videoRef.value?.currentTime || 0\n}\n\nconst handleEnded = () => {\n if (!loop.value) pause()\n else {\n seek(0)\n play()\n }\n}\n\nconst handleProgress = () => {\n loaded.value = videoRef.value?.buffered.length ? videoRef.value.buffered.end(videoRef.value.buffered.length - 1) : 0\n}\n\nconst loadError = ref(false)\nconst handleError = () => loadError.value = true\n\nconst thumbMove = (e: MouseEvent | TouchEvent) => {\n if (!videoRef.value || !playBarWrap.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n videoRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst thumbUp = (e: MouseEvent | TouchEvent) => {\n if (!videoRef.value || !playBarWrap.value) return\n\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n videoRef.value.currentTime = time\n currentTime.value = time\n\n document.removeEventListener('mousemove', thumbMove)\n document.removeEventListener('touchmove', thumbMove)\n document.removeEventListener('mouseup', thumbUp)\n document.removeEventListener('touchend', thumbUp)\n}\n\nconst handleMousedownPlayBar = () => {\n document.addEventListener('mousemove', thumbMove)\n document.addEventListener('touchmove', thumbMove)\n document.addEventListener('mouseup', thumbUp)\n document.addEventListener('touchend', thumbUp)\n}\n\nconst volumeMove = (e: MouseEvent | TouchEvent) => {\n if (!volumeBarRef.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n const percentage = (clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst volumeUp = () => {\n document.removeEventListener('mousemove', volumeMove)\n document.removeEventListener('touchmove', volumeMove)\n document.removeEventListener('mouseup', volumeUp)\n document.removeEventListener('touchend', volumeUp)\n}\n\nconst handleMousedownVolumeBar = () => {\n document.addEventListener('mousemove', volumeMove)\n document.addEventListener('touchmove', volumeMove)\n document.addEventListener('mouseup', volumeUp)\n document.addEventListener('touchend', volumeUp)\n}\n\nconst handleClickVolumeBar = (e: MouseEvent) => {\n if (!volumeBarRef.value) return\n const percentage = (e.clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst handleMousemovePlayBar = (e: MouseEvent) => {\n if (duration.value && playBarWrap.value) {\n const px = playBarWrap.value.getBoundingClientRect().left\n const tx = e.clientX - px\n if (tx < 0 || tx > playBarWrap.value.offsetWidth) return\n\n const time = duration.value * (tx / playBarWrap.value.offsetWidth)\n playBarTimeLeft.value = `${tx - (time >= 3600 ? 25 : 20)}px`\n playBarTime.value = secondToTime(time)\n playBarTimeVisible.value = true\n }\n}\n\nconst toggleVolume = () => {\n if (!videoRef.value) return\n\n if (videoRef.value.muted) {\n videoRef.value.muted = false\n setVolume(0.5)\n }\n else {\n videoRef.value.muted = true\n setVolume(0)\n }\n}\n\nconst toggleLoop = () => {\n loop.value = !loop.value\n}\n\nconst autoHideControllerTimer = ref(-1)\nconst hideController = ref(false)\nconst autoHideController = () => {\n hideController.value = false\n clearTimeout(autoHideControllerTimer.value)\n autoHideControllerTimer.value = setTimeout(() => {\n if (videoRef.value?.played.length) hideController.value = true\n }, 3000)\n}\n\nuseMSE(props.src, videoRef)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPause = _resolveComponent(\"IconPause\")!\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n const _component_IconVolumeMute = _resolveComponent(\"IconVolumeMute\")!\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _component_IconVolumeSmall = _resolveComponent(\"IconVolumeSmall\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"video-player\", { 'hide-controller': hideController.value }]),\n style: _normalizeStyle({\n width: _ctx.width * _ctx.scale + 'px',\n height: _ctx.height * _ctx.scale + 'px',\n transform: `scale(${1 / _ctx.scale})`,\n }),\n onMousemove: _cache[22] || (_cache[22] = ($event: any) => (autoHideController())),\n onClick: _cache[23] || (_cache[23] = ($event: any) => (autoHideController()))\n }, [\n _createElementVNode(\"div\", {\n class: \"video-wrap\",\n onClick: _cache[8] || (_cache[8] = ($event: any) => (toggle()))\n }, [\n (loadError.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, \"视频加载失败\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"video\", {\n class: \"video\",\n ref_key: \"videoRef\",\n ref: videoRef,\n src: _ctx.src,\n autoplay: _ctx.autoplay,\n poster: _ctx.poster,\n \"webkit-playsinline\": \"\",\n playsinline: \"\",\n onDurationchange: _cache[0] || (_cache[0] = ($event: any) => (handleDurationchange())),\n onTimeupdate: _cache[1] || (_cache[1] = ($event: any) => (handleTimeupdate())),\n onEnded: _cache[2] || (_cache[2] = ($event: any) => (handleEnded())),\n onProgress: _cache[3] || (_cache[3] = ($event: any) => (handleProgress())),\n onPlay: _cache[4] || (_cache[4] = ($event: any) => {autoHideController(); paused.value = false}),\n onPause: _cache[5] || (_cache[5] = ($event: any) => (autoHideController())),\n onError: _cache[6] || (_cache[6] = ($event: any) => (handleError()))\n }, null, 40, _hoisted_2),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bezel-icon\", { 'bezel-transition': bezelTransition.value }]),\n onAnimationend: _cache[7] || (_cache[7] = ($event: any) => (bezelTransition.value = false))\n }, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPause, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPlayOne, { key: 1 }))\n ], 34)\n ])\n ]),\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", {\n class: \"icon play-icon\",\n onClick: _cache[9] || (_cache[9] = ($event: any) => (toggle()))\n }, [\n _createElementVNode(\"span\", _hoisted_7, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPlayOne, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPause, { key: 1 }))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", {\n class: \"icon volume-icon\",\n onClick: _cache[10] || (_cache[10] = ($event: any) => (toggleVolume()))\n }, [\n _createElementVNode(\"span\", _hoisted_9, [\n (volume.value === 0)\n ? (_openBlock(), _createBlock(_component_IconVolumeMute, { key: 0 }))\n : (volume.value === 1)\n ? (_openBlock(), _createBlock(_component_IconVolumeNotice, { key: 1 }))\n : (_openBlock(), _createBlock(_component_IconVolumeSmall, { key: 2 }))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"volume-bar-wrap\",\n onMousedown: _cache[11] || (_cache[11] = ($event: any) => (handleMousedownVolumeBar())),\n onTouchstart: _cache[12] || (_cache[12] = ($event: any) => (handleMousedownVolumeBar())),\n onClick: _cache[13] || (_cache[13] = $event => handleClickVolumeBar($event))\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar\",\n ref_key: \"volumeBarRef\",\n ref: volumeBarRef\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar-inner\",\n style: _normalizeStyle({ width: volumeBarWidth.value })\n }, _hoisted_11, 4)\n ], 512)\n ], 32)\n ]),\n _createElementVNode(\"span\", _hoisted_12, [\n _createElementVNode(\"span\", _hoisted_13, _toDisplayString(ptime.value), 1),\n _createTextVNode(\" / \"),\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(dtime.value), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"span\", {\n class: \"icon-content\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (speedMenuVisible.value = !speedMenuVisible.value))\n }, _toDisplayString(playbackRate.value === 1 ? '倍速' : (playbackRate.value + 'x')), 1),\n (speedMenuVisible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"speed-menu\",\n onMouseleave: _cache[15] || (_cache[15] = ($event: any) => (speedMenuVisible.value = false))\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(speedOptions, (item) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"speed-menu-item\", { 'active': item.value === playbackRate.value }]),\n key: item.label,\n onClick: ($event: any) => (speed(item.value))\n }, _toDisplayString(item.label), 11, _hoisted_18)\n }), 64))\n ], 32))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"loop\",\n onClick: _cache[16] || (_cache[16] = ($event: any) => (toggleLoop()))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"icon loop-icon\", { 'active': loop.value }])\n }, [\n _createElementVNode(\"span\", _hoisted_19, \"循环\" + _toDisplayString(loop.value ? '开' : '关'), 1)\n ], 2)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"bar-wrap\",\n ref_key: \"playBarWrap\",\n ref: playBarWrap,\n onMousedown: _cache[17] || (_cache[17] = ($event: any) => (handleMousedownPlayBar())),\n onTouchstart: _cache[18] || (_cache[18] = ($event: any) => (handleMousedownPlayBar())),\n onMousemove: _cache[19] || (_cache[19] = $event => handleMousemovePlayBar($event)),\n onMouseenter: _cache[20] || (_cache[20] = ($event: any) => (playBarTimeVisible.value = true)),\n onMouseleave: _cache[21] || (_cache[21] = ($event: any) => (playBarTimeVisible.value = false))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bar-time\", { 'hidden': !playBarTimeVisible.value }]),\n style: _normalizeStyle({ left: playBarTimeLeft.value })\n }, _toDisplayString(playBarTime.value), 7),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"div\", {\n class: \"loaded\",\n style: _normalizeStyle({ width: loadedBarWidth.value })\n }, null, 4),\n _createElementVNode(\"div\", {\n class: \"played\",\n style: _normalizeStyle({ width: playedBarWidth.value })\n }, _hoisted_22, 4)\n ])\n ], 544)\n ])\n ], 38))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=e55352ca&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e55352ca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeStyle as _normalizeStyle } from \"vue\"\n\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTVideoElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\n\nimport VideoPlayer from './VideoPlayer/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-video\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event, false)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event, false))\n }, [\n _createVNode(VideoPlayer, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n src: _ctx.elementInfo.src,\n poster: _ctx.elementInfo.poster,\n scale: _unref(canvasScale)\n }, null, 8, [\"width\", \"height\", \"src\", \"poster\", \"scale\"]),\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(['t', 'b', 'l', 'r'], (item) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['handler-border', item]),\n key: item,\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event))\n }, null, 34)\n }), 64))\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5dc89f2a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5dc89f2a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-44037f56\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"autoplay\"]\nconst _hoisted_2 = { class: \"controller\" }\nconst _hoisted_3 = { class: \"icons\" }\nconst _hoisted_4 = { class: \"icon-content\" }\nconst _hoisted_5 = { class: \"volume\" }\nconst _hoisted_6 = { class: \"icon-content\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\nconst _hoisted_9 = { class: \"time\" }\nconst _hoisted_10 = { class: \"ptime\" }\nconst _hoisted_11 = { class: \"dtime\" }\nconst _hoisted_12 = { class: \"bar\" }\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_14 = [\n _hoisted_13\n]\n\nimport { computed, ref } from 'vue'\nimport message from '@/utils/message'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AudioPlayer',\n props: {\n src: {},\n loop: { type: Boolean },\n autoplay: { type: Boolean, default: false },\n scale: { default: 1 }\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\n\nconst secondToTime = (second = 0) => {\n if (second === 0 || isNaN(second)) return '00:00'\n\n const add0 = (num: number) => (num < 10 ? '0' + num : '' + num)\n const hour = Math.floor(second / 3600)\n const min = Math.floor((second - hour * 3600) / 60)\n const sec = Math.floor(second - hour * 3600 - min * 60)\n return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':')\n}\n\nconst getBoundingClientRectViewLeft = (element: HTMLElement) => {\n return element.getBoundingClientRect().left\n}\n\nconst audioRef = ref()\nconst playBarWrap = ref()\nconst volumeBarRef = ref()\n\nconst volume = ref(0.5)\nconst paused = ref(true)\nconst currentTime = ref(0)\nconst duration = ref(0)\nconst loaded = ref(0)\n\nconst playBarTimeVisible = ref(false)\nconst playBarTime = ref('00:00')\nconst playBarTimeLeft = ref('0')\n\nconst ptime = computed(() => secondToTime(currentTime.value))\nconst dtime = computed(() => secondToTime(duration.value))\nconst playedBarWidth = computed(() => currentTime.value / duration.value * 100 + '%')\nconst loadedBarWidth = computed(() => loaded.value / duration.value * 100 + '%')\nconst volumeBarWidth = computed(() => volume.value * 100 + '%')\n\nconst seek = (time: number) => {\n if (!audioRef.value) return\n\n time = Math.max(time, 0)\n time = Math.min(time, duration.value)\n\n audioRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst play = () => {\n if (!audioRef.value) return\n\n paused.value = false\n audioRef.value.play()\n}\n\nconst pause = () => {\n if (!audioRef.value) return\n\n paused.value = true\n audioRef.value.pause()\n}\n\nconst toggle = () => {\n if (paused.value) play() \n else pause()\n}\n\nconst setVolume = (percentage: number) => {\n if (!audioRef.value) return\n\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n\n audioRef.value.volume = percentage\n volume.value = percentage\n if (audioRef.value.muted && percentage !== 0) audioRef.value.muted = false\n}\n\nconst handleDurationchange = () => {\n duration.value = audioRef.value?.duration || 0\n}\n\nconst handleTimeupdate = () => {\n currentTime.value = audioRef.value?.currentTime || 0\n}\n\nconst handlePlayed = () => {\n paused.value = false\n}\n\nconst handleEnded = () => {\n if (!props.loop) pause()\n else {\n seek(0)\n play()\n }\n}\n\nconst handleProgress = () => {\n loaded.value = audioRef.value?.buffered.length ? audioRef.value.buffered.end(audioRef.value.buffered.length - 1) : 0\n}\n\nconst handleError = () => message.error('视频加载失败')\n\nconst thumbMove = (e: MouseEvent | TouchEvent) => {\n if (!audioRef.value || !playBarWrap.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n audioRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst thumbUp = (e: MouseEvent | TouchEvent) => {\n if (!audioRef.value || !playBarWrap.value) return\n\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n audioRef.value.currentTime = time\n currentTime.value = time\n\n document.removeEventListener('mousemove', thumbMove)\n document.removeEventListener('touchmove', thumbMove)\n document.removeEventListener('mouseup', thumbUp)\n document.removeEventListener('touchend', thumbUp)\n}\n\nconst handleMousedownPlayBar = () => {\n document.addEventListener('mousemove', thumbMove)\n document.addEventListener('touchmove', thumbMove)\n document.addEventListener('mouseup', thumbUp)\n document.addEventListener('touchend', thumbUp)\n}\n\nconst volumeMove = (e: MouseEvent | TouchEvent) => {\n if (!volumeBarRef.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n const percentage = (clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst volumeUp = () => {\n document.removeEventListener('mousemove', volumeMove)\n document.removeEventListener('touchmove', volumeMove)\n document.removeEventListener('mouseup', volumeUp)\n document.removeEventListener('touchend', volumeUp)\n}\n\nconst handleMousedownVolumeBar = () => {\n document.addEventListener('mousemove', volumeMove)\n document.addEventListener('touchmove', volumeMove)\n document.addEventListener('mouseup', volumeUp)\n document.addEventListener('touchend', volumeUp)\n}\n\nconst handleClickVolumeBar = (e: MouseEvent) => {\n if (!volumeBarRef.value) return\n const percentage = (e.clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst handleMousemovePlayBar = (e: MouseEvent) => {\n if (duration.value && playBarWrap.value) {\n const px = playBarWrap.value.getBoundingClientRect().left\n const tx = e.clientX - px\n if (tx < 0 || tx > playBarWrap.value.offsetWidth) return\n\n const time = duration.value * (tx / playBarWrap.value.offsetWidth)\n playBarTimeLeft.value = `${tx - (time >= 3600 ? 25 : 20)}px`\n playBarTime.value = secondToTime(time)\n playBarTimeVisible.value = true\n }\n}\n\nconst toggleVolume = () => {\n if (!audioRef.value) return\n\n if (audioRef.value.muted) {\n audioRef.value.muted = false\n setVolume(0.5)\n }\n else {\n audioRef.value.muted = true\n setVolume(0)\n }\n}\n\n__expose({\n toggle,\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n const _component_IconPause = _resolveComponent(\"IconPause\")!\n const _component_IconVolumeMute = _resolveComponent(\"IconVolumeMute\")!\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _component_IconVolumeSmall = _resolveComponent(\"IconVolumeSmall\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"audio-player\",\n style: _normalizeStyle({ transform: `scale(${1 / _ctx.scale})` })\n }, [\n _createElementVNode(\"audio\", {\n class: \"audio\",\n ref_key: \"audioRef\",\n ref: audioRef,\n src: _ctx.src,\n autoplay: _ctx.autoplay,\n onDurationchange: _cache[0] || (_cache[0] = ($event: any) => (handleDurationchange())),\n onTimeupdate: _cache[1] || (_cache[1] = ($event: any) => (handleTimeupdate())),\n onPlay: _cache[2] || (_cache[2] = ($event: any) => (handlePlayed())),\n onEnded: _cache[3] || (_cache[3] = ($event: any) => (handleEnded())),\n onProgress: _cache[4] || (_cache[4] = ($event: any) => (handleProgress())),\n onError: _cache[5] || (_cache[5] = ($event: any) => (handleError()))\n }, null, 40, _hoisted_1),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", {\n class: \"icon play-icon\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (toggle()))\n }, [\n _createElementVNode(\"span\", _hoisted_4, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPlayOne, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPause, { key: 1 }))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", {\n class: \"icon volume-icon\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (toggleVolume()))\n }, [\n _createElementVNode(\"span\", _hoisted_6, [\n (volume.value === 0)\n ? (_openBlock(), _createBlock(_component_IconVolumeMute, { key: 0 }))\n : (volume.value === 1)\n ? (_openBlock(), _createBlock(_component_IconVolumeNotice, { key: 1 }))\n : (_openBlock(), _createBlock(_component_IconVolumeSmall, { key: 2 }))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"volume-bar-wrap\",\n onMousedown: _cache[8] || (_cache[8] = ($event: any) => (handleMousedownVolumeBar())),\n onTouchstart: _cache[9] || (_cache[9] = ($event: any) => (handleMousedownVolumeBar())),\n onClick: _cache[10] || (_cache[10] = $event => handleClickVolumeBar($event))\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar\",\n ref_key: \"volumeBarRef\",\n ref: volumeBarRef\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar-inner\",\n style: _normalizeStyle({ width: volumeBarWidth.value })\n }, _hoisted_8, 4)\n ], 512)\n ], 32)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_9, [\n _createElementVNode(\"span\", _hoisted_10, _toDisplayString(ptime.value), 1),\n _createTextVNode(\" / \"),\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(dtime.value), 1)\n ]),\n _createElementVNode(\"div\", {\n class: \"bar-wrap\",\n ref_key: \"playBarWrap\",\n ref: playBarWrap,\n onMousedown: _cache[11] || (_cache[11] = ($event: any) => (handleMousedownPlayBar())),\n onTouchstart: _cache[12] || (_cache[12] = ($event: any) => (handleMousedownPlayBar())),\n onMousemove: _cache[13] || (_cache[13] = $event => handleMousemovePlayBar($event)),\n onMouseenter: _cache[14] || (_cache[14] = ($event: any) => (playBarTimeVisible.value = true)),\n onMouseleave: _cache[15] || (_cache[15] = ($event: any) => (playBarTimeVisible.value = false))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bar-time\", { 'hidden': !playBarTimeVisible.value }]),\n style: _normalizeStyle({ left: playBarTimeLeft.value })\n }, _toDisplayString(playBarTime.value), 7),\n _createElementVNode(\"div\", _hoisted_12, [\n _createElementVNode(\"div\", {\n class: \"loaded\",\n style: _normalizeStyle({ width: loadedBarWidth.value })\n }, null, 4),\n _createElementVNode(\"div\", {\n class: \"played\",\n style: _normalizeStyle({ width: playedBarWidth.value })\n }, _hoisted_14, 4)\n ])\n ], 544)\n ])\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./AudioPlayer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AudioPlayer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AudioPlayer.vue?vue&type=style&index=0&id=44037f56&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-44037f56\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, unref as _unref, withModifiers as _withModifiers, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTAudioElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nimport AudioPlayer from './AudioPlayer.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale, handleElementId } = storeToRefs(useMainStore())\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\nconst audioPlayerPosition = computed(() => {\n const canvasWidth = VIEWPORT_SIZE\n const canvasHeight = VIEWPORT_SIZE * viewportRatio.value\n\n const audioWidth = 280 / canvasScale.value\n const audioHeight = 50 / canvasScale.value\n\n const elWidth = props.elementInfo.width\n const elHeight = props.elementInfo.height\n const elLeft = props.elementInfo.left\n const elTop = props.elementInfo.top\n\n let left = 0\n let top = elHeight\n \n if (elLeft + audioWidth >= canvasWidth) left = elWidth - audioWidth\n if (elTop + elHeight + audioHeight >= canvasHeight) top = -audioHeight\n\n return {\n left: left + 'px',\n top: top + 'px',\n }\n})\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-audio\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onTouchstart: _cache[2] || (_cache[2] = $event => handleSelectElement($event))\n }, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n })\n }, null, 8, [\"style\"]),\n (_unref(handleElementId) === _ctx.elementInfo.id)\n ? (_openBlock(), _createBlock(AudioPlayer, {\n key: 0,\n class: \"audio-player\",\n style: _normalizeStyle({ ...audioPlayerPosition.value }),\n src: _ctx.elementInfo.src,\n loop: _ctx.elementInfo.loop,\n scale: _unref(canvasScale),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 8, [\"style\", \"src\", \"loop\", \"scale\"]))\n : _createCommentVNode(\"\", true)\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=53bdc956&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53bdc956\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\n\nimport useLockElement from '@/hooks/useLockElement'\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useCombineElement from '@/hooks/useCombineElement'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'\nimport useCopyAndPasteElement from '@/hooks/useCopyAndPasteElement'\nimport useSelectAllElement from '@/hooks/useSelectAllElement'\n\nimport { ElementOrderCommands, ElementAlignCommands } from '@/types/edit'\n\nimport ImageElement from '@/views/components/element/ImageElement/index.vue'\nimport TextElement from '@/views/components/element/TextElement/index.vue'\nimport ShapeElement from '@/views/components/element/ShapeElement/index.vue'\nimport LineElement from '@/views/components/element/LineElement/index.vue'\nimport ChartElement from '@/views/components/element/ChartElement/index.vue'\nimport TableElement from '@/views/components/element/TableElement/index.vue'\nimport LatexElement from '@/views/components/element/LatexElement/index.vue'\nimport VideoElement from '@/views/components/element/VideoElement/index.vue'\nimport AudioElement from '@/views/components/element/AudioElement/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditableElement',\n props: {\n elementInfo: {},\n elementIndex: {},\n isMultiSelect: { type: Boolean },\n selectElement: { type: Function },\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: ImageElement,\n [ElementTypes.TEXT]: TextElement,\n [ElementTypes.SHAPE]: ShapeElement,\n [ElementTypes.LINE]: LineElement,\n [ElementTypes.CHART]: ChartElement,\n [ElementTypes.TABLE]: TableElement,\n [ElementTypes.LATEX]: LatexElement,\n [ElementTypes.VIDEO]: VideoElement,\n [ElementTypes.AUDIO]: AudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nconst { orderElement } = useOrderElement()\nconst { alignElementToCanvas } = useAlignElementToCanvas()\nconst { combineElements, uncombineElements } = useCombineElement()\nconst { deleteElement } = useDeleteElement()\nconst { lockElement, unlockElement } = useLockElement()\nconst { copyElement, pasteElement, cutElement } = useCopyAndPasteElement()\nconst { selectAllElement } = useSelectAllElement()\n\nconst contextmenus = (): ContextmenuItem[] => {\n if (props.elementInfo.lock) {\n return [{\n text: '解锁', \n handler: () => unlockElement(props.elementInfo),\n }]\n }\n\n return [\n {\n text: '剪切',\n subText: 'Ctrl + X',\n handler: cutElement,\n },\n {\n text: '复制',\n subText: 'Ctrl + C',\n handler: copyElement,\n },\n {\n text: '粘贴',\n subText: 'Ctrl + V',\n handler: pasteElement,\n },\n { divider: true },\n {\n text: '水平居中',\n handler: () => alignElementToCanvas(ElementAlignCommands.HORIZONTAL),\n children: [\n { text: '水平垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.CENTER), },\n { text: '水平居中', handler: () => alignElementToCanvas(ElementAlignCommands.HORIZONTAL) },\n { text: '左对齐', handler: () => alignElementToCanvas(ElementAlignCommands.LEFT) },\n { text: '右对齐', handler: () => alignElementToCanvas(ElementAlignCommands.RIGHT) },\n ],\n },\n {\n text: '垂直居中',\n handler: () => alignElementToCanvas(ElementAlignCommands.VERTICAL),\n children: [\n { text: '水平垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.CENTER) },\n { text: '垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.VERTICAL) },\n { text: '顶部对齐', handler: () => alignElementToCanvas(ElementAlignCommands.TOP) },\n { text: '底部对齐', handler: () => alignElementToCanvas(ElementAlignCommands.BOTTOM) },\n ],\n },\n { divider: true },\n {\n text: '置于顶层',\n disable: props.isMultiSelect && !props.elementInfo.groupId,\n handler: () => orderElement(props.elementInfo, ElementOrderCommands.TOP),\n children: [\n { text: '置于顶层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.TOP) },\n { text: '上移一层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.UP) },\n ],\n },\n {\n text: '置于底层',\n disable: props.isMultiSelect && !props.elementInfo.groupId,\n handler: () => orderElement(props.elementInfo, ElementOrderCommands.BOTTOM),\n children: [\n { text: '置于底层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.BOTTOM) },\n { text: '下移一层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.DOWN) },\n ],\n },\n { divider: true },\n {\n text: '设置链接',\n handler: props.openLinkDialog,\n },\n {\n text: props.elementInfo.groupId ? '取消组合' : '组合',\n subText: 'Ctrl + G',\n handler: props.elementInfo.groupId ? uncombineElements : combineElements,\n hide: !props.isMultiSelect,\n },\n {\n text: '全选',\n subText: 'Ctrl + A',\n handler: selectAllElement,\n },\n {\n text: '锁定',\n subText: 'Ctrl + L',\n handler: lockElement,\n },\n {\n text: '删除',\n subText: 'Delete',\n handler: deleteElement,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"editable-element\",\n ref: \"elementRef\",\n id: `editable-element-${_ctx.elementInfo.id}`,\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n selectElement: _ctx.selectElement,\n contextmenus: contextmenus\n }, null, 8, [\"elementInfo\", \"selectElement\"]))\n ], 12, _hoisted_1))\n}\n}\n\n})","\n\n","import script from \"./EditableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./EditableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MouseSelection',\n props: {\n top: {},\n left: {},\n width: {},\n height: {},\n quadrant: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(`mouse-selection quadrant-${_ctx.quadrant}`),\n style: _normalizeStyle({\n top: _ctx.top + 'px',\n left: _ctx.left + 'px',\n width: _ctx.width + 'px',\n height: _ctx.height + 'px',\n })\n }, null, 6))\n}\n}\n\n})","import script from \"./MouseSelection.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MouseSelection.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MouseSelection.vue?vue&type=style&index=0&id=2c5e1d42&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2c5e1d42\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-05484a24\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"grid-lines\" }\nconst _hoisted_2 = [\"d\", \"stroke\"]\n\nimport { computed } from 'vue'\nimport tinycolor from 'tinycolor2'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport type { SlideBackground } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'GridLines',\n setup(__props) {\n\nconst { canvasScale, gridLineSize } = storeToRefs(useMainStore())\nconst { currentSlide, viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => currentSlide.value?.background)\n\n// 计算网格线的颜色,避免与背景的颜色太接近\nconst gridColor = computed(() => {\n const bgColor = background.value?.color || '#fff'\n const colorList = ['#000', '#fff']\n return tinycolor.mostReadable(bgColor, colorList, { includeFallbackColors: true }).setAlpha(.5).toRgbString()\n})\n\n// 网格路径\nconst path = computed(() => {\n const maxX = VIEWPORT_SIZE\n const maxY = VIEWPORT_SIZE * viewportRatio.value\n\n let p = ''\n for (let i = 0; i <= Math.floor(maxY / gridLineSize.value); i++) {\n p += `M0 ${i * gridLineSize.value} L${maxX} ${i * gridLineSize.value} `\n }\n for (let i = 0; i <= Math.floor(maxX / gridLineSize.value); i++) {\n p += `M${i * gridLineSize.value} 0 L${i * gridLineSize.value} ${maxY} `\n }\n return p\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, [\n _createElementVNode(\"path\", {\n style: _normalizeStyle({\n transform: `scale(${_unref(canvasScale)})`,\n }),\n d: path.value,\n fill: \"none\",\n stroke: gridColor.value,\n \"stroke-width\": \"0.3\",\n \"stroke-dasharray\": \"5\"\n }, null, 12, _hoisted_2)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./GridLines.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GridLines.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GridLines.vue?vue&type=style&index=0&id=05484a24&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-05484a24\"]])\n\nexport default __exports__","import { type Ref, computed } from 'vue'\nimport type { SlideBackground } from '@/types/slides'\n\n// 将页面背景数据转换为css样式\nexport default (background: Ref) => {\n const backgroundStyle = computed(() => {\n if (!background.value) return { backgroundColor: '#fff' }\n\n const {\n type,\n color,\n image,\n imageSize,\n gradientColor,\n gradientRotate,\n gradientType,\n } = background.value\n\n // 纯色背景\n if (type === 'solid') return { backgroundColor: color }\n\n // 背景图模式\n // 包括:背景图、背景大小,是否重复\n else if (type === 'image') {\n if (!image) return { backgroundColor: '#fff' }\n if (imageSize === 'repeat') {\n return {\n backgroundImage: `url(${image}`,\n backgroundRepeat: 'repeat',\n backgroundSize: 'contain',\n }\n }\n return {\n backgroundImage: `url(${image}`,\n backgroundRepeat: 'no-repeat',\n backgroundSize: imageSize || 'cover',\n }\n }\n\n // 渐变色背景\n else if (type === 'gradient') {\n const rotate = gradientRotate || 0\n const color1 = gradientColor ? gradientColor[0] : '#fff'\n const color2 = gradientColor ? gradientColor[1] : '#fff'\n \n if (gradientType === 'radial') return { backgroundImage: `radial-gradient(${color1}, ${color2}` }\n return { backgroundImage: `linear-gradient(${rotate}deg, ${color1}, ${color2}` }\n }\n\n return { backgroundColor: '#fff' }\n })\n\n return {\n backgroundStyle,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { SlideBackground } from '@/types/slides'\nimport GridLines from './GridLines.vue'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ViewportBackground',\n setup(__props) {\n\nconst { gridLineSize } = storeToRefs(useMainStore())\nconst { currentSlide } = storeToRefs(useSlidesStore())\nconst background = computed(() => currentSlide.value?.background)\n\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"viewport-background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, [\n (_unref(gridLineSize))\n ? (_openBlock(), _createBlock(GridLines, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ViewportBackground.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ViewportBackground.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ViewportBackground.vue?vue&type=style&index=0&id=b6b18502&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b6b18502\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { AlignmentLineAxis } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AlignmentLine',\n props: {\n type: {},\n axis: {},\n length: {},\n canvasScale: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\n// 吸附对齐线的位置\nconst left = computed(() => props.axis.x * props.canvasScale + 'px')\nconst top = computed(() => props.axis.y * props.canvasScale + 'px')\n\n// 吸附对齐线的长度\nconst sizeStyle = computed(() => {\n if (props.type === 'vertical') return { height: props.length * props.canvasScale + 'px' }\n return { width: props.length * props.canvasScale + 'px' }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"alignment-line\",\n style: _normalizeStyle({ left: left.value, top: top.value })\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass(['line', _ctx.type]),\n style: _normalizeStyle(sizeStyle.value)\n }, null, 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./AlignmentLine.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AlignmentLine.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AlignmentLine.vue?vue&type=style&index=0&id=ed6fc00a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ed6fc00a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2963c74c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"ruler\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\n\ninterface ViewportStyles {\n top: number\n left: number\n width: number\n height: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Ruler',\n props: {\n viewportStyles: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst markerSize = computed(() => {\n return props.viewportStyles.width * canvasScale.value / 10\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"h\",\n style: _normalizeStyle({\n width: _ctx.viewportStyles.width * _unref(canvasScale) + 'px',\n left: _ctx.viewportStyles.left + 'px',\n })\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(20, (marker) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"ruler-marker-100\", { 'hide': markerSize.value < 36, 'omit': markerSize.value < 72 }]),\n key: `marker-100-${marker}`\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(marker), 1)\n ], 2)\n }), 64))\n ], 4),\n _createElementVNode(\"div\", {\n class: \"v\",\n style: _normalizeStyle({\n height: _ctx.viewportStyles.height * _unref(canvasScale) + 'px',\n top: _ctx.viewportStyles.top + 'px',\n })\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(20, (marker) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"ruler-marker-100\", { 'hide': markerSize.value < 36, 'omit': markerSize.value < 72 }]),\n key: marker,\n style: _normalizeStyle({ height: markerSize.value + 'px' })\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(marker), 1)\n ], 6)\n }), 64))\n ], 4)\n ]))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./Ruler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Ruler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Ruler.vue?vue&type=style&index=0&id=2963c74c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2963c74c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85b0bbaa\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\"]\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport type { CreateElementSelectionData } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementCreateSelection',\n emits: [\"created\"],\n setup(__props, { emit }) {\n\n\n\nconst mainStore = useMainStore()\nconst { creatingElement } = storeToRefs(mainStore)\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst start = ref<[number, number]>()\nconst end = ref<[number, number]>()\n\nconst selectionRef = ref()\nconst offset = ref({\n x: 0,\n y: 0,\n})\nonMounted(() => {\n if (!selectionRef.value) return\n const { x, y } = selectionRef.value.getBoundingClientRect()\n offset.value = { x, y }\n})\n\n// 鼠标拖动创建元素生成位置大小\n// 获取范围的起始位置和终点位置\nconst createSelection = (e: MouseEvent) => {\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n start.value = [startPageX, startPageY]\n\n document.onmousemove = e => {\n if (!creatingElement.value || !isMouseDown) return\n\n let currentPageX = e.pageX\n let currentPageY = e.pageY\n\n // 按住Ctrl键或者Shift键时:\n // 对于非线条元素需要锁定宽高比例,对于线条元素需要锁定水平或垂直方向\n if (ctrlOrShiftKeyActive.value) {\n const moveX = currentPageX - startPageX\n const moveY = currentPageY - startPageY\n\n // 水平和垂直方向的拖动距离,后面以拖动距离较大的方向为基础计算另一方向的数据\n const absX = Math.abs(moveX)\n const absY = Math.abs(moveY)\n\n if (creatingElement.value.type === 'shape') {\n\n // 判断是否为反向拖动:从左上到右下为正向操作,此外所有情况都是反向操作\n const isOpposite = (moveY > 0 && moveX < 0) || (moveY < 0 && moveX > 0)\n\n if (absX > absY) {\n currentPageY = isOpposite ? startPageY - moveX : startPageY + moveX\n }\n else {\n currentPageX = isOpposite ? startPageX - moveY : startPageX + moveY\n }\n }\n\n else if (creatingElement.value.type === 'line') {\n if (absX > absY) currentPageY = startPageY\n else currentPageX = startPageX\n }\n }\n\n end.value = [currentPageX, currentPageY]\n }\n\n document.onmouseup = e => {\n document.onmousemove = null\n document.onmouseup = null\n\n if (e.button === 2) {\n setTimeout(() => mainStore.setCreatingElement(null), 0)\n return\n }\n\n isMouseDown = false\n\n const endPageX = e.pageX\n const endPageY = e.pageY\n\n const minSize = 30\n\n if (\n creatingElement.value?.type === 'line' &&\n (Math.abs(endPageX - startPageX) >= minSize || Math.abs(endPageY - startPageY) >= minSize)\n ) {\n emit('created', {\n start: start.value!,\n end: end.value!,\n })\n }\n else if (\n creatingElement.value?.type !== 'line' &&\n (Math.abs(endPageX - startPageX) >= minSize && Math.abs(endPageY - startPageY) >= minSize)\n ) {\n emit('created', {\n start: start.value!,\n end: end.value!,\n })\n }\n else {\n const defaultSize = 200\n const minX = Math.min(endPageX, startPageX)\n const minY = Math.min(endPageY, startPageY)\n const maxX = Math.max(endPageX, startPageX)\n const maxY = Math.max(endPageY, startPageY)\n const offsetX = maxX - minX >= minSize ? maxX - minX : defaultSize\n const offsetY = maxY - minY >= minSize ? maxY - minY : defaultSize\n emit('created', {\n start: [minX, minY],\n end: [minX + offsetX, minY + offsetY],\n })\n }\n }\n}\n\n// 绘制线条的路径相关数据(仅当绘制元素类型为线条时使用)\nconst lineData = computed(() => {\n if (!start.value || !end.value) return null\n if (!creatingElement.value || creatingElement.value.type !== 'line') return null\n\n const [_startX, _startY] = start.value\n const [_endX, _endY] = end.value\n const minX = Math.min(_startX, _endX)\n const maxX = Math.max(_startX, _endX)\n const minY = Math.min(_startY, _endY)\n const maxY = Math.max(_startY, _endY)\n\n const svgWidth = maxX - minX >= 24 ? maxX - minX : 24\n const svgHeight = maxY - minY >= 24 ? maxY - minY : 24\n\n const startX = _startX === minX ? 0 : maxX - minX\n const startY = _startY === minY ? 0 : maxY - minY\n const endX = _endX === minX ? 0 : maxX - minX\n const endY = _endY === minY ? 0 : maxY - minY\n\n const path = `M${startX}, ${startY} L${endX}, ${endY}`\n\n return {\n svgWidth,\n svgHeight,\n startX,\n startY,\n endX,\n endY,\n path,\n }\n})\n\n// 根据生成范围的起始位置和终点位置,计算元素创建时的位置和大小\nconst position = computed(() => {\n if (!start.value || !end.value) return {}\n\n const [startX, startY] = start.value\n const [endX, endY] = end.value\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const width = maxX - minX\n const height = maxY - minY\n\n return {\n left: minX - offset.value.x + 'px',\n top: minY - offset.value.y + 'px',\n width: width + 'px',\n height: height + 'px',\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"element-create-selection\",\n ref_key: \"selectionRef\",\n ref: selectionRef,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => createSelection($event), [\"stop\"])),\n onContextmenu: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\",\"prevent\"]))\n }, [\n (start.value && end.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass(['selection', _unref(creatingElement)?.type]),\n style: _normalizeStyle(position.value)\n }, [\n (_unref(creatingElement)?.type === 'line' && lineData.value)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n overflow: \"visible\",\n width: lineData.value.svgWidth,\n height: lineData.value.svgHeight\n }, [\n _createElementVNode(\"path\", {\n d: lineData.value.path,\n stroke: \"#d14424\",\n fill: \"none\",\n \"stroke-width\": \"2\"\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ], 544))\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementCreateSelection.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementCreateSelection.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementCreateSelection.vue?vue&type=style&index=0&id=85b0bbaa&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85b0bbaa\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-224f36be\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { overflow: \"visible\" }\nconst _hoisted_2 = [\"d\", \"fill\"]\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useKeyboardStore, useMainStore } from '@/store'\nimport type { CreateCustomShapeData } from '@/types/edit'\nimport { KEYS } from '@/configs/hotkey'\nimport message from '@/utils/message'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapeCreateCanvas',\n emits: [\"created\"],\n setup(__props, { emit }) {\n\n\nconst mainStore = useMainStore()\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst shapeCanvasRef = ref()\nconst offset = ref({\n x: 0,\n y: 0,\n})\nonMounted(() => {\n if (!shapeCanvasRef.value) return\n const { x, y } = shapeCanvasRef.value.getBoundingClientRect()\n offset.value = { x, y }\n})\n\nconst mousePosition = ref<[number, number]>()\nconst points = ref<[number, number][]>([])\nconst closed = ref(false)\n\nconst getPoint = (e: MouseEvent) => {\n let pageX = e.pageX - offset.value.x\n let pageY = e.pageY - offset.value.y\n\n if (ctrlOrShiftKeyActive.value && points.value.length) {\n const [lastPointX, lastPointY] = points.value[points.value.length - 1]\n if (Math.abs(lastPointX - pageX) - Math.abs(lastPointY - pageY) > 0) {\n pageY = lastPointY\n }\n else pageX = lastPointX\n }\n return { pageX, pageY }\n}\n\nconst updateMousePosition = (e: MouseEvent) => {\n const { pageX, pageY } = getPoint(e)\n mousePosition.value = [pageX, pageY]\n\n if (points.value.length >= 2) {\n const [firstPointX, firstPointY] = points.value[0]\n if (Math.abs(firstPointX - pageX) < 5 && Math.abs(firstPointY - pageY) < 5) {\n closed.value = true\n }\n else closed.value = false\n }\n else closed.value = false\n}\n\nconst path = computed(() => {\n let d = ''\n for (let i = 0; i < points.value.length; i++) {\n const point = points.value[i]\n if (i === 0) d += `M ${point[0]} ${point[1]} `\n else d += `L ${point[0]} ${point[1]} `\n }\n if (points.value.length && mousePosition.value) {\n d += `L ${mousePosition.value[0]} ${mousePosition.value[1]}`\n }\n return d\n})\n\nconst addPoint = (e: MouseEvent) => {\n const { pageX, pageY } = getPoint(e)\n\n if (closed.value) {\n const xList = points.value.map(item => item[0])\n const yList = points.value.map(item => item[1])\n const minX = Math.min(...xList)\n const minY = Math.min(...yList)\n const maxX = Math.max(...xList)\n const maxY = Math.max(...yList)\n\n const formatedPoints = points.value.map(point => {\n return [point[0] - minX, point[1] - minY]\n })\n let path = ''\n for (let i = 0; i < formatedPoints.length; i++) {\n const point = formatedPoints[i]\n if (i === 0) path += `M ${point[0]} ${point[1]} `\n else path += `L ${point[0]} ${point[1]} `\n }\n path += 'Z'\n \n emit('created', {\n start: [minX + offset.value.x, minY + offset.value.y],\n end: [maxX + offset.value.x, maxY + offset.value.y],\n path,\n viewBox: [maxX - minX, maxY - minY],\n })\n }\n else points.value.push([pageX, pageY])\n}\n\nconst close = () => {\n mainStore.setCreatingCustomShapeState(false)\n}\n\nconst keydownListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ESC) close()\n}\nonMounted(() => {\n message.success('点击开始绘制任意多边形,首尾闭合完成绘制,按 ESC 键或鼠标右键关闭')\n document.addEventListener('keydown', keydownListener)\n})\nonUnmounted(() => document.removeEventListener('keydown', keydownListener))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"shape-create-canvas\",\n ref_key: \"shapeCanvasRef\",\n ref: shapeCanvasRef,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => addPoint($event), [\"stop\"])),\n onMousemove: _cache[1] || (_cache[1] = $event => updateMousePosition($event)),\n onContextmenu: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (close()), [\"stop\",\"prevent\"]))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, [\n _createElementVNode(\"path\", {\n d: path.value,\n stroke: \"#d14424\",\n fill: closed.value ? 'rgba(226, 83, 77, 0.15)' : 'none',\n \"stroke-width\": \"2\"\n }, null, 8, _hoisted_2)\n ]))\n ], 544))\n}\n}\n\n})","\n\n\n\n","import script from \"./ShapeCreateCanvas.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeCreateCanvas.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeCreateCanvas.vue?vue&type=style&index=0&id=224f36be&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-224f36be\"]])\n\nexport default __exports__","import { computed, type Ref } from 'vue'\nimport { OperateResizeHandlers, OperateBorderLines } from '@/types/edit'\n\nexport default (width: Ref, height: Ref) => {\n // 元素缩放点\n const resizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.LEFT_TOP, style: {} },\n { direction: OperateResizeHandlers.TOP, style: {left: width.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT_TOP, style: {left: width.value + 'px'} },\n { direction: OperateResizeHandlers.LEFT, style: {top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT, style: {left: width.value + 'px', top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.LEFT_BOTTOM, style: {top: height.value + 'px'} },\n { direction: OperateResizeHandlers.BOTTOM, style: {left: width.value / 2 + 'px', top: height.value + 'px'} },\n { direction: OperateResizeHandlers.RIGHT_BOTTOM, style: {left: width.value + 'px', top: height.value + 'px'} },\n ]\n })\n\n // 文本元素缩放点\n const textElementResizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.LEFT, style: {top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT, style: {left: width.value + 'px', top: height.value / 2 + 'px'} },\n ]\n })\n const verticalTextElementResizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.TOP, style: {left: width.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.BOTTOM, style: {left: width.value / 2 + 'px', top: height.value + 'px'} },\n ]\n })\n\n // 元素选中边框线\n const borderLines = computed(() => {\n return [\n { type: OperateBorderLines.T, style: {width: width.value + 'px'} },\n { type: OperateBorderLines.B, style: {top: height.value + 'px', width: width.value + 'px'} },\n { type: OperateBorderLines.L, style: {height: height.value + 'px'} },\n { type: OperateBorderLines.R, style: {left: width.value + 'px', height: height.value + 'px'} },\n ]\n })\n\n return {\n resizeHandlers,\n textElementResizeHandlers,\n verticalTextElementResizeHandlers,\n borderLines,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { OperateResizeHandlers } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ResizeHandler',\n props: {\n type: {},\n rotate: { default: 0 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst rotateClassName = computed(() => {\n const prefix = 'rotate-'\n const rotate = props.rotate\n if (rotate > -22.5 && rotate <= 22.5) return prefix + 0\n else if (rotate > 22.5 && rotate <= 67.5) return prefix + 45\n else if (rotate > 67.5 && rotate <= 112.5) return prefix + 90\n else if (rotate > 112.5 && rotate <= 157.5) return prefix + 135\n else if (rotate > 157.5 || rotate <= -157.5) return prefix + 0\n else if (rotate > -157.5 && rotate <= -112.5) return prefix + 45\n else if (rotate > -112.5 && rotate <= -67.5) return prefix + 90\n else if (rotate > -67.5 && rotate <= -22.5) return prefix + 135\n return prefix + 0\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['resize-handler', rotateClassName.value, _ctx.type])\n }, null, 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./ResizeHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ResizeHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ResizeHandler.vue?vue&type=style&index=0&id=1e66197f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1e66197f\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport type { OperateBorderLines } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BorderLine',\n props: {\n type: {},\n isWide: { type: Boolean, default: false }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['border-line', _ctx.type, { 'wide': _ctx.isWide }])\n }, null, 2))\n}\n}\n\n})","import script from \"./BorderLine.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BorderLine.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BorderLine.vue?vue&type=style&index=0&id=8346cf6c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8346cf6c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed, ref, watchEffect } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { getElementListRange } from '@/utils/element'\nimport type { OperateResizeHandlers, MultiSelectRange } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MultiSelectOperate',\n props: {\n elementList: {},\n scaleMultiElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { activeElementIdList, canvasScale } = storeToRefs(useMainStore())\n\nconst localActiveElementList = computed(() => props.elementList.filter(el => activeElementIdList.value.includes(el.id)))\n\nconst range = ref({\n minX: 0,\n maxX: 0,\n minY: 0,\n maxY: 0,\n})\n\n// 根据多选元素整体在画布中的范围,计算边框线和缩放点的位置信息\nconst width = computed(() => (range.value.maxX - range.value.minX) * canvasScale.value)\nconst height = computed(() => (range.value.maxY - range.value.minY) * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(width, height)\n\n// 计算多选元素整体在画布中的范围\nconst setRange = () => {\n const { minX, maxX, minY, maxY } = getElementListRange(localActiveElementList.value)\n range.value = { minX, maxX, minY, maxY }\n}\nwatchEffect(setRange)\n\n// 禁用多选状态下缩放:仅未旋转的图片和形状可以在多选状态下缩放\nconst disableResize = computed(() => {\n return localActiveElementList.value.some(item => {\n if (\n (item.type === 'image' || item.type === 'shape') && \n !item.rotate\n ) return false\n return true\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"multi-select-operate\",\n style: _normalizeStyle({\n left: range.value.minX * _unref(canvasScale) + 'px',\n top: range.value.minY * _unref(canvasScale) + 'px',\n })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (!disableResize.value)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n key: point.direction,\n type: point.direction,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers(($event: any) => (_ctx.scaleMultiElement($event, range.value, point.direction)), [\"stop\"])\n }, null, 8, [\"type\", \"style\", \"onMousedown\"]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MultiSelectOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MultiSelectOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MultiSelectOperate.vue?vue&type=style&index=0&id=97dc9b9a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-97dc9b9a\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./RotateHandler.vue?vue&type=template&id=b99d8dae&scoped=true\"\nconst script = {}\n\nimport \"./RotateHandler.vue?vue&type=style&index=0&id=b99d8dae&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b99d8dae\"]])\n\nexport default __exports__","\r\n\r\n\r\n\r\n\r\n\r\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore } from '@/store'\r\nimport type { PPTImageElement } from '@/types/slides'\r\nimport type { OperateResizeHandlers } from '@/types/edit'\r\nimport useCommonOperate from '../hooks/useCommonOperate'\r\n\r\nimport RotateHandler from './RotateHandler.vue'\r\nimport ResizeHandler from './ResizeHandler.vue'\r\nimport BorderLine from './BorderLine.vue'\r\n\r\n\r\nconst __default__ = {\r\n inheritAttrs: false,\r\n}\r\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'ImageElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n\r\n\r\nconst { canvasScale, clipingImageElementId } = storeToRefs(useMainStore())\r\n\r\nconst isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)\r\n\r\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\r\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\r\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"image-element-operate\", { 'cliping': isCliping.value }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./ImageElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageElementOperate.vue?vue&type=style&index=0&id=7bcad5a9&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7bcad5a9\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"text-element-operate\" }\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore } from '@/store'\r\nimport type { PPTTextElement } from '@/types/slides'\r\nimport type { OperateResizeHandlers } from '@/types/edit'\r\nimport useCommonOperate from '../hooks/useCommonOperate'\r\n\r\nimport RotateHandler from './RotateHandler.vue'\r\nimport ResizeHandler from './ResizeHandler.vue'\r\nimport BorderLine from './BorderLine.vue'\r\n\r\n\r\nconst __default__ = {\r\n inheritAttrs: false,\r\n}\r\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'TextElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n\r\n\r\nconst { canvasScale } = storeToRefs(useMainStore())\r\n\r\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\r\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\r\n\r\nconst { textElementResizeHandlers, verticalTextElementResizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\r\nconst resizeHandlers = computed(() => props.elementInfo.vertical ? verticalTextElementResizeHandlers.value : textElementResizeHandlers.value)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(resizeHandlers.value, (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./TextElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TextElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-52dcdbf8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTShapeElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'ShapeElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function },\n moveShapeKeypoint: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nconst keypointStyle = computed(() => {\n if (!props.elementInfo.pathFormula || props.elementInfo.keypoint === undefined) return {}\n\n const pathFormula = SHAPE_PATH_FORMULAS[props.elementInfo.pathFormula]\n if ('editable' in pathFormula) {\n const keypointPos = pathFormula.getBaseSize(props.elementInfo.width, props.elementInfo.height) * props.elementInfo.keypoint\n if (pathFormula.relative === 'left') return { left: keypointPos * canvasScale.value + 'px' }\n if (pathFormula.relative === 'right') return { left: (props.elementInfo.width - keypointPos) * canvasScale.value + 'px' }\n if (pathFormula.relative === 'center') return { left: (props.elementInfo.width - keypointPos) / 2 * canvasScale.value + 'px' }\n if (pathFormula.relative === 'top') return { top: keypointPos * canvasScale.value + 'px' }\n if (pathFormula.relative === 'bottom') return { top: (props.elementInfo.height - keypointPos) * canvasScale.value + 'px' }\n }\n return {}\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"]),\n (_ctx.elementInfo.keypoint !== undefined)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"operate-keypoint-handler\",\n style: _normalizeStyle(keypointStyle.value),\n onMousedown: _cache[1] || (_cache[1] = _withModifiers($event => _ctx.moveShapeKeypoint($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 36))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./ShapeElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeElementOperate.vue?vue&type=style&index=0&id=52dcdbf8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52dcdbf8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, createBlock as _createBlock, unref as _unref, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3aa5cc44\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"line-element-operate\" }\nconst _hoisted_2 = [\"width\", \"height\", \"stroke\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_5 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_6 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_7 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTLineElement } from '@/types/slides'\nimport { OperateLineHandlers } from '@/types/edit'\n\nimport ResizeHandler from './ResizeHandler.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'LineElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n dragLineElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst svgWidth = computed(() => Math.max(props.elementInfo.start[0], props.elementInfo.end[0]))\nconst svgHeight = computed(() => Math.max(props.elementInfo.start[1], props.elementInfo.end[1]))\n\nconst resizeHandlers = computed(() => {\n const handlers = [\n {\n handler: OperateLineHandlers.START,\n style: {\n left: props.elementInfo.start[0] * canvasScale.value + 'px',\n top: props.elementInfo.start[1] * canvasScale.value + 'px',\n }\n },\n {\n handler: OperateLineHandlers.END,\n style: {\n left: props.elementInfo.end[0] * canvasScale.value + 'px',\n top: props.elementInfo.end[1] * canvasScale.value + 'px',\n }\n },\n ]\n\n if (props.elementInfo.curve || props.elementInfo.broken) {\n const ctrlHandler = (props.elementInfo.curve || props.elementInfo.broken) as [number, number]\n\n handlers.push({\n handler: OperateLineHandlers.C,\n style: {\n left: ctrlHandler[0] * canvasScale.value + 'px',\n top: ctrlHandler[1] * canvasScale.value + 'px',\n }\n })\n }\n else if (props.elementInfo.cubic) {\n const [ctrlHandler1, ctrlHandler2] = props.elementInfo.cubic\n handlers.push({\n handler: OperateLineHandlers.C1,\n style: {\n left: ctrlHandler1[0] * canvasScale.value + 'px',\n top: ctrlHandler1[1] * canvasScale.value + 'px',\n }\n })\n handlers.push({\n handler: OperateLineHandlers.C2,\n style: {\n left: ctrlHandler2[0] * canvasScale.value + 'px',\n top: ctrlHandler2[1] * canvasScale.value + 'px',\n }\n })\n }\n\n return handlers\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(resizeHandlers.value, (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.handler,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.dragLineElement($event, _ctx.elementInfo, point.handler), [\"stop\"])\n }, null, 8, [\"style\", \"onMousedown\"]))\n }), 128)),\n (_openBlock(), _createElementBlock(\"svg\", {\n width: svgWidth.value || 1,\n height: svgHeight.value || 1,\n stroke: _ctx.elementInfo.color,\n overflow: \"visible\",\n style: _normalizeStyle({ transform: `scale(${_unref(canvasScale)})` })\n }, [\n (_ctx.elementInfo.curve)\n ? (_openBlock(), _createElementBlock(\"g\", _hoisted_3, [\n _createElementVNode(\"line\", {\n class: \"anchor-line\",\n x1: _ctx.elementInfo.start[0],\n y1: _ctx.elementInfo.start[1],\n x2: _ctx.elementInfo.curve[0],\n y2: _ctx.elementInfo.curve[1]\n }, null, 8, _hoisted_4),\n _createElementVNode(\"line\", {\n class: \"anchor-line\",\n x1: _ctx.elementInfo.end[0],\n y1: _ctx.elementInfo.end[1],\n x2: _ctx.elementInfo.curve[0],\n y2: _ctx.elementInfo.curve[1]\n }, null, 8, _hoisted_5)\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.cubic)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(_ctx.elementInfo.cubic, (item, index) => {\n return (_openBlock(), _createElementBlock(\"g\", { key: index }, [\n (index === 0)\n ? (_openBlock(), _createElementBlock(\"line\", {\n key: 0,\n class: \"anchor-line\",\n x1: _ctx.elementInfo.start[0],\n y1: _ctx.elementInfo.start[1],\n x2: item[0],\n y2: item[1]\n }, null, 8, _hoisted_6))\n : _createCommentVNode(\"\", true),\n (index === 1)\n ? (_openBlock(), _createElementBlock(\"line\", {\n key: 1,\n class: \"anchor-line\",\n x1: _ctx.elementInfo.end[0],\n y1: _ctx.elementInfo.end[1],\n x2: item[0],\n y2: item[1]\n }, null, 8, _hoisted_7))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ], 12, _hoisted_2))\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./LineElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LineElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LineElementOperate.vue?vue&type=style&index=0&id=3aa5cc44&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3aa5cc44\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"table-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTTableElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'TableElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst outlineWidth = computed(() => props.elementInfo.outline.width || 1)\n\nconst scaleWidth = computed(() => (props.elementInfo.width + outlineWidth.value) * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\n\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./TableElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TableElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"common-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTVideoElement, PPTLatexElement, PPTAudioElement, PPTChartElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\ntype PPTElement = PPTVideoElement | PPTLatexElement | PPTAudioElement | PPTChartElement\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'CommonElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nconst cannotRotate = computed(() => ['chart', 'video', 'audio'].includes(props.elementInfo.type))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n (!cannotRotate.value)\n ? (_openBlock(), _createBlock(RotateHandler, {\n key: 0,\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./CommonElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CommonElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTElementLink } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport message from '@/utils/message'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const setLink = (handleElement: PPTElement, link: PPTElementLink) => {\n const linkRegExp = /^(https?):\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+([\\w\\-.,@?^=%&:\\/~+#]*[\\w\\-@?^=%&\\/~+#])?$/\n if (link.type === 'web' && !linkRegExp.test(link.target)) {\n message.error('不是正确的网页链接地址')\n return false\n }\n if (link.type === 'slide' && !link.target) {\n message.error('请先选择链接目标')\n return false\n }\n const props = { link }\n slidesStore.updateElement({ id: handleElement.id, props })\n addHistorySnapshot()\n\n return true\n }\n\n const removeLink = (handleElement: PPTElement) => {\n slidesStore.removeElementProps({ id: handleElement.id, propName: 'link' })\n addHistorySnapshot()\n }\n\n return {\n setLink,\n removeLink,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Divider',\n props: {\n type: { default: 'horizontal' },\n margin: { default: 0 }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['divider', _ctx.type]),\n style: _normalizeStyle({\n margin: _ctx.type === 'horizontal' ? `${_ctx.margin || 24}px 0` : `0 ${_ctx.margin || 8}px`\n })\n }, null, 6))\n}\n}\n\n})","import script from \"./Divider.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Divider.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Divider.vue?vue&type=style&index=0&id=6b66cde8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b66cde8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-316c4664\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"href\"]\nconst _hoisted_2 = { class: \"btns\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, PPTElementLink } from '@/types/slides'\nimport useLink from '@/hooks/useLink'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinkHandler',\n props: {\n elementInfo: {},\n link: {},\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { canvasScale } = storeToRefs(mainStore)\nconst { slides } = storeToRefs(slidesStore)\nconst { removeLink } = useLink()\nconst height = computed(() => props.elementInfo.type === 'line' ? 0 : props.elementInfo.height)\n\nconst turnTarget = (slideId: string) => {\n const targetIndex = slides.value.findIndex(item => item.id === slideId)\n if (targetIndex !== -1) {\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(targetIndex)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"link-handler\",\n style: _normalizeStyle({ top: height.value * _unref(canvasScale) + 10 + 'px' })\n }, [\n (_ctx.link.type === 'web')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n class: \"link\",\n href: _ctx.link.target,\n target: \"_blank\"\n }, _toDisplayString(_ctx.link.target), 9, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"a\", {\n key: 1,\n class: \"link\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (turnTarget(_ctx.link.target)))\n }, \"幻灯片页面 \" + _toDisplayString(_ctx.link.target), 1)),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.openLinkDialog()))\n }, \"更换\"),\n _createVNode(Divider, { type: \"vertical\" }),\n _createElementVNode(\"div\", {\n class: \"btn\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_unref(removeLink)(_ctx.elementInfo)))\n }, \"移除\")\n ])\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinkHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinkHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinkHandler.vue?vue&type=style&index=0&id=316c4664&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-316c4664\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, withModifiers as _withModifiers, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5ec1ff35\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"animation-index\"\n}\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\nimport {\r\n ElementTypes,\r\n type PPTElement,\r\n type PPTLineElement,\r\n type PPTVideoElement,\r\n type PPTAudioElement,\r\n type PPTShapeElement,\r\n type PPTChartElement,\r\n} from '@/types/slides'\r\nimport type { OperateLineHandlers, OperateResizeHandlers } from '@/types/edit'\r\n\r\nimport ImageElementOperate from './ImageElementOperate.vue'\r\nimport TextElementOperate from './TextElementOperate.vue'\r\nimport ShapeElementOperate from './ShapeElementOperate.vue'\r\nimport LineElementOperate from './LineElementOperate.vue'\r\nimport TableElementOperate from './TableElementOperate.vue'\r\nimport CommonElementOperate from './CommonElementOperate.vue'\r\nimport LinkHandler from './LinkHandler.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n isSelected: { type: Boolean },\n isActive: { type: Boolean },\n isActiveGroupElement: { type: Boolean },\n isMultiSelect: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function },\n dragLineElement: { type: Function },\n moveShapeKeypoint: { type: Function },\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n\r\n\r\nconst { canvasScale, toolbarState } = storeToRefs(useMainStore())\r\nconst { formatedAnimations } = storeToRefs(useSlidesStore())\r\n\r\nconst currentOperateComponent = computed(() => {\r\n const elementTypeMap = {\r\n [ElementTypes.IMAGE]: ImageElementOperate,\r\n [ElementTypes.TEXT]: TextElementOperate,\r\n [ElementTypes.SHAPE]: ShapeElementOperate,\r\n [ElementTypes.LINE]: LineElementOperate,\r\n [ElementTypes.TABLE]: TableElementOperate,\r\n [ElementTypes.CHART]: CommonElementOperate,\r\n [ElementTypes.LATEX]: CommonElementOperate,\r\n [ElementTypes.VIDEO]: CommonElementOperate,\r\n [ElementTypes.AUDIO]: CommonElementOperate,\r\n }\r\n return elementTypeMap[props.elementInfo.type] || null\r\n})\r\n\r\nconst elementIndexListInAnimation = computed(() => {\r\n const indexList = []\r\n for (let i = 0; i < formatedAnimations.value.length; i++) {\r\n const elIds = formatedAnimations.value[i].animations.map(item => item.elId)\r\n if (elIds.includes(props.elementInfo.id)) indexList.push(i)\r\n }\r\n return indexList\r\n})\r\n\r\nconst rotate = computed(() => 'rotate' in props.elementInfo ? props.elementInfo.rotate : 0)\r\nconst height = computed(() => 'height' in props.elementInfo ? props.elementInfo.height : 0)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"operate\", { 'multi-select': _ctx.isMultiSelect && !_ctx.isActive }]),\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top * _unref(canvasScale) + 'px',\r\n left: _ctx.elementInfo.left * _unref(canvasScale) + 'px',\r\n transform: `rotate(${rotate.value}deg)`,\r\n transformOrigin: `${_ctx.elementInfo.width * _unref(canvasScale) / 2}px ${height.value * _unref(canvasScale) / 2}px`,\r\n })\n }, [\n (_ctx.isSelected)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(currentOperateComponent.value), {\n key: 0,\n elementInfo: _ctx.elementInfo,\n handlerVisible: !_ctx.elementInfo.lock && (_ctx.isActiveGroupElement || !_ctx.isMultiSelect),\n rotateElement: _ctx.rotateElement,\n scaleElement: _ctx.scaleElement,\n dragLineElement: _ctx.dragLineElement,\n moveShapeKeypoint: _ctx.moveShapeKeypoint\n }, null, 8, [\"elementInfo\", \"handlerVisible\", \"rotateElement\", \"scaleElement\", \"dragLineElement\", \"moveShapeKeypoint\"]))\n : _createCommentVNode(\"\", true),\n (_unref(toolbarState) === 'elAnimation' && elementIndexListInAnimation.value.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementIndexListInAnimation.value, (index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"index-item\",\n key: index\n }, _toDisplayString(index + 1), 1))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.isActive && _ctx.elementInfo.link)\n ? (_openBlock(), _createBlock(LinkHandler, {\n key: 2,\n elementInfo: _ctx.elementInfo,\n link: _ctx.elementInfo.link,\n openLinkDialog: _ctx.openLinkDialog,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 8, [\"elementInfo\", \"link\", \"openLinkDialog\"]))\n : _createCommentVNode(\"\", true)\n ], 6))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5ec1ff35&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5ec1ff35\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-24fef706\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nimport { computed } from 'vue'\nimport type { PPTImageElement } from '@/types/slides'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useClipImage from './useClipImage'\nimport useFilter from './useFilter'\n\nimport ImageOutline from './ImageOutline/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseImageElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape, imgPosition } = useClipImage(clip)\n\nconst filters = computed(() => props.elementInfo.filters)\nconst { filter } = useFilter(filters)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-image\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n })\n }, [\n _createVNode(ImageOutline, { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]),\n _createElementVNode(\"div\", {\n class: \"image-content\",\n style: _normalizeStyle({ clipPath: _unref(clipShape).style })\n }, [\n _createElementVNode(\"img\", {\n src: _ctx.elementInfo.src,\n draggable: false,\n style: _normalizeStyle({\n top: _unref(imgPosition).top,\n left: _unref(imgPosition).left,\n width: _unref(imgPosition).width,\n height: _unref(imgPosition).height,\n filter: _unref(filter),\n }),\n alt: \"\"\n }, null, 12, _hoisted_1),\n (_ctx.elementInfo.colorMask)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"color-mask\",\n style: _normalizeStyle({\n backgroundColor: _ctx.elementInfo.colorMask,\n })\n }, null, 4))\n : _createCommentVNode(\"\", true)\n ], 4)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseImageElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseImageElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseImageElement.vue?vue&type=style&index=0&id=24fef706&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-24fef706\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-52a206f2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport type { PPTTextElement } from '@/types/slides'\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\n\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTextElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-text\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n width: _ctx.elementInfo.vertical ? 'auto' : _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.vertical ? _ctx.elementInfo.height + 'px' : 'auto',\n backgroundColor: _ctx.elementInfo.fill,\n opacity: _ctx.elementInfo.opacity,\n textShadow: _unref(shadowStyle),\n lineHeight: _ctx.elementInfo.lineHeight,\n letterSpacing: (_ctx.elementInfo.wordSpace || 0) + 'px',\n color: _ctx.elementInfo.defaultColor,\n fontFamily: _ctx.elementInfo.defaultFontName,\n writingMode: _ctx.elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',\n })\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createElementVNode(\"div\", {\n class: \"text ProseMirror-static\",\n style: _normalizeStyle({\n '--paragraphSpace': `${_ctx.elementInfo.paragraphSpace === undefined ? 5 : _ctx.elementInfo.paragraphSpace}px`,\n }),\n innerHTML: _ctx.elementInfo.content\n }, null, 12, _hoisted_1)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseTextElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseTextElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseTextElement.vue?vue&type=style&index=0&id=52a206f2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52a206f2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b13f8fa8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\", \"fill\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\nconst _hoisted_5 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport type { PPTShapeElement, ShapeText } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\n\nimport GradientDefs from './GradientDefs.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseShapeElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst outline = computed(() => props.elementInfo.outline)\nconst { outlineWidth, outlineColor, strokeDashArray } = useElementOutline(outline)\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst text = computed(() => {\n const defaultText: ShapeText = {\n content: '',\n defaultFontName: '微软雅黑',\n defaultColor: '#000',\n align: 'middle',\n }\n if (!props.elementInfo.text) return defaultText\n\n return props.elementInfo.text\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-shape\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n opacity: _ctx.elementInfo.opacity,\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n color: text.value.defaultColor,\n fontFamily: text.value.defaultFontName,\n })\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height\n }, [\n (_ctx.elementInfo.gradient)\n ? (_openBlock(), _createElementBlock(\"defs\", _hoisted_2, [\n _createVNode(GradientDefs, {\n id: `base-gradient-${_ctx.elementInfo.id}`,\n type: _ctx.elementInfo.gradient.type,\n color1: _ctx.elementInfo.gradient.color[0],\n color2: _ctx.elementInfo.gradient.color[1],\n rotate: _ctx.elementInfo.gradient.rotate\n }, null, 8, [\"id\", \"type\", \"color1\", \"color2\", \"rotate\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n d: _ctx.elementInfo.path,\n fill: _ctx.elementInfo.gradient ? `url(#base-gradient-${_ctx.elementInfo.id})` : _ctx.elementInfo.fill,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_1)),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"shape-text\", text.value.align])\n }, [\n _createElementVNode(\"div\", {\n class: \"ProseMirror-static\",\n innerHTML: text.value.content\n }, null, 8, _hoisted_5)\n ], 2)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseShapeElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseShapeElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseShapeElement.vue?vue&type=style&index=0&id=b13f8fa8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b13f8fa8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-443e2f82\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\n\nimport { computed } from 'vue'\nimport type { PPTLineElement } from '@/types/slides'\nimport { getLineElementPath } from '@/utils/element'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\nimport LinePointMarker from './LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseLineElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst svgWidth = computed(() => {\n const width = Math.abs(props.elementInfo.start[0] - props.elementInfo.end[0])\n return width < 24 ? 24 : width\n})\nconst svgHeight = computed(() => {\n const height = Math.abs(props.elementInfo.start[1] - props.elementInfo.end[1])\n return height < 24 ? 24 : height\n})\n\nconst lineDashArray = computed(() => {\n if (props.elementInfo.style !== 'dashed') return '0 0'\n const size = props.elementInfo.width\n return size <= 8 ? `${size * 5} ${size * 2.5}` : `${size * 5} ${size * 1.5}`\n})\n\nconst path = computed(() => {\n return getLineElementPath(props.elementInfo)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-line\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '' })\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: svgWidth.value,\n height: svgHeight.value\n }, [\n _createElementVNode(\"defs\", null, [\n (_ctx.elementInfo.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n id: _ctx.elementInfo.id,\n position: \"start\",\n type: _ctx.elementInfo.points[0],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n id: _ctx.elementInfo.id,\n position: \"end\",\n type: _ctx.elementInfo.points[1],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n d: path.value,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.width,\n \"stroke-dasharray\": lineDashArray.value,\n fill: \"none\",\n \"marker-start\": _ctx.elementInfo.points[0] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[0]}-start)` : '',\n \"marker-end\": _ctx.elementInfo.points[1] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[1]}-end)` : ''\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseLineElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseLineElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseLineElement.vue?vue&type=style&index=0&id=443e2f82&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-443e2f82\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed, inject, ref } from 'vue'\r\nimport type { PPTChartElement } from '@/types/slides'\r\nimport { injectKeySlideScale } from '@/types/injectKey'\r\n\r\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\r\nimport Chart from './Chart.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseChartElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\r\n\r\n\r\nconst slideScale = inject(injectKeySlideScale) || ref(1)\r\n\r\nconst needScaleSize = computed(() => slideScale.value < 1)\r\nconst zoom = computed(() => needScaleSize.value ? 1 / slideScale.value : 1)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-chart\",\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top + 'px',\r\n left: _ctx.elementInfo.left + 'px',\r\n width: _ctx.elementInfo.width + 'px',\r\n height: _ctx.elementInfo.height + 'px',\r\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\r\n backgroundColor: _ctx.elementInfo.fill,\r\n })\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(Chart, {\n width: _ctx.elementInfo.width * zoom.value,\n height: _ctx.elementInfo.height * zoom.value,\n type: _ctx.elementInfo.chartType,\n data: _ctx.elementInfo.data,\n options: _ctx.elementInfo.options,\n themeColor: _ctx.elementInfo.themeColor,\n gridColor: _ctx.elementInfo.gridColor,\n legends: _ctx.elementInfo.data.legends,\n legend: _ctx.elementInfo.legend || '',\n style: _normalizeStyle({ zoom: 1 / zoom.value })\n }, null, 8, [\"width\", \"height\", \"type\", \"data\", \"options\", \"themeColor\", \"gridColor\", \"legends\", \"legend\", \"style\"])\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./BaseChartElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseChartElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseChartElement.vue?vue&type=style&index=0&id=7c03d68d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7c03d68d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, vShow as _vShow, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5d949d4d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\"]\nconst _hoisted_2 = [\"rowspan\", \"colspan\"]\nconst _hoisted_3 = [\"innerHTML\"]\n\nimport { computed, ref, watch } from 'vue'\nimport type { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'\nimport { getTextStyle, formatText } from './utils'\nimport useHideCells from './useHideCells'\nimport useSubThemeColor from './useSubThemeColor'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'StaticTable',\n props: {\n data: {},\n width: {},\n cellMinHeight: {},\n colWidths: {},\n outline: {},\n theme: {},\n editable: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst colSizeList = ref([])\nconst totalWidth = computed(() => colSizeList.value.reduce((a, b) => a + b))\n\nwatch([\n () => props.colWidths,\n () => props.width,\n], () => {\n colSizeList.value = props.colWidths.map(item => item * props.width)\n}, { immediate: true })\n\nconst cells = computed(() => props.data)\nconst { hideCells } = useHideCells(cells)\n\nconst theme = computed(() => props.theme)\nconst { subThemeColor } = useSubThemeColor(theme)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"static-table\",\n style: _normalizeStyle({ width: totalWidth.value + 'px' })\n }, [\n _createElementVNode(\"table\", {\n class: _normalizeClass({\n 'theme': theme.value,\n 'row-header': theme.value?.rowHeader,\n 'row-footer': theme.value?.rowFooter,\n 'col-header': theme.value?.colHeader,\n 'col-footer': theme.value?.colFooter,\n }),\n style: _normalizeStyle(`--themeColor: ${theme.value?.color}; --subThemeColor1: ${_unref(subThemeColor)[0]}; --subThemeColor2: ${_unref(subThemeColor)[1]}`)\n }, [\n _createElementVNode(\"colgroup\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(colSizeList.value, (width, index) => {\n return (_openBlock(), _createElementBlock(\"col\", {\n span: \"1\",\n key: index,\n width: width\n }, null, 8, _hoisted_1))\n }), 128))\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.data, (rowCells, rowIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: rowIndex,\n style: _normalizeStyle({ height: _ctx.cellMinHeight + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rowCells, (cell, colIndex) => {\n return _withDirectives((_openBlock(), _createElementBlock(\"td\", {\n class: \"cell\",\n style: _normalizeStyle({\n borderStyle: _ctx.outline.style,\n borderColor: _ctx.outline.color,\n borderWidth: _ctx.outline.width + 'px',\n ..._unref(getTextStyle)(cell.style),\n }),\n key: cell.id,\n rowspan: cell.rowspan,\n colspan: cell.colspan\n }, [\n _createElementVNode(\"div\", {\n class: \"cell-text\",\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n innerHTML: _unref(formatText)(cell.text)\n }, null, 12, _hoisted_3)\n ], 12, _hoisted_2)), [\n [_vShow, !_unref(hideCells).includes(`${rowIndex}_${colIndex}`)]\n ])\n }), 128))\n ], 4))\n }), 128))\n ])\n ], 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./StaticTable.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./StaticTable.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./StaticTable.vue?vue&type=style&index=0&id=5d949d4d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5d949d4d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eff7eba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport type { PPTTableElement } from '@/types/slides'\n\nimport StaticTable from './StaticTable.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTableElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-table\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(StaticTable, {\n data: _ctx.elementInfo.data,\n width: _ctx.elementInfo.width,\n cellMinHeight: _ctx.elementInfo.cellMinHeight,\n colWidths: _ctx.elementInfo.colWidths,\n outline: _ctx.elementInfo.outline,\n theme: _ctx.elementInfo.theme\n }, null, 8, [\"data\", \"width\", \"cellMinHeight\", \"colWidths\", \"outline\", \"theme\"])\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseTableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseTableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseTableElement.vue?vue&type=style&index=0&id=3eff7eba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eff7eba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1587280d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\nconst _hoisted_2 = [\"width\", \"height\", \"stroke\", \"stroke-width\"]\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\"]\n\nimport type { PPTLatexElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseLatexElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-latex\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.strokeWidth,\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n d: _ctx.elementInfo.path\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_2))\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseLatexElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseLatexElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseLatexElement.vue?vue&type=style&index=0&id=1587280d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1587280d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport type { PPTVideoElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseVideoElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-video\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ backgroundImage: _ctx.elementInfo.poster ? `url(${_ctx.elementInfo.poster})` : '' })\n }, [\n _createVNode(_component_IconPlayOne, { class: \"icon\" })\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseVideoElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseVideoElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseVideoElement.vue?vue&type=style&index=0&id=09436dde&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-09436dde\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5da834d7\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { computed } from 'vue'\nimport type { PPTAudioElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseAudioElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-audio\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n })\n }, null, 8, [\"style\"])\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseAudioElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseAudioElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseAudioElement.vue?vue&type=style&index=0&id=5da834d7&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5da834d7\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\n\nimport BaseImageElement from '@/views/components/element/ImageElement/BaseImageElement.vue'\nimport BaseTextElement from '@/views/components/element/TextElement/BaseTextElement.vue'\nimport BaseShapeElement from '@/views/components/element/ShapeElement/BaseShapeElement.vue'\nimport BaseLineElement from '@/views/components/element/LineElement/BaseLineElement.vue'\nimport BaseChartElement from '@/views/components/element/ChartElement/BaseChartElement.vue'\nimport BaseTableElement from '@/views/components/element/TableElement/BaseTableElement.vue'\nimport BaseLatexElement from '@/views/components/element/LatexElement/BaseLatexElement.vue'\nimport BaseVideoElement from '@/views/components/element/VideoElement/BaseVideoElement.vue'\nimport BaseAudioElement from '@/views/components/element/AudioElement/BaseAudioElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ThumbnailElement',\n props: {\n elementInfo: {},\n elementIndex: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: BaseImageElement,\n [ElementTypes.TEXT]: BaseTextElement,\n [ElementTypes.SHAPE]: BaseShapeElement,\n [ElementTypes.LINE]: BaseLineElement,\n [ElementTypes.CHART]: BaseChartElement,\n [ElementTypes.TABLE]: BaseTableElement,\n [ElementTypes.LATEX]: BaseLatexElement,\n [ElementTypes.VIDEO]: BaseVideoElement,\n [ElementTypes.AUDIO]: BaseAudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"base-element\", `base-element-${_ctx.elementInfo.id}`]),\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n target: \"thumbnail\"\n }, null, 8, [\"elementInfo\"]))\n ], 6))\n}\n}\n\n})","\n\n","import script from \"./ThumbnailElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ThumbnailElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43dcaa52\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"placeholder\"\n}\n\nimport { computed, provide } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\nimport ThumbnailElement from './ThumbnailElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n slide: {},\n size: {},\n visible: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => props.slide.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst scale = computed(() => props.size / VIEWPORT_SIZE)\nprovide(injectKeySlideScale, scale)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"thumbnail-slide\",\n style: _normalizeStyle({\n width: _ctx.size + 'px',\n height: _ctx.size * _unref(viewportRatio) + 'px',\n })\n }, [\n (_ctx.visible)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"elements\",\n style: _normalizeStyle({\n width: _unref(VIEWPORT_SIZE) + 'px',\n height: _unref(VIEWPORT_SIZE) * _unref(viewportRatio) + 'px',\n transform: `scale(${scale.value})`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.slide.elements, (element, index) => {\n return (_openBlock(), _createBlock(ThumbnailElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1\n }, null, 8, [\"elementInfo\", \"elementIndex\"]))\n }), 128))\n ], 4))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_1, \"加载中 ...\"))\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=43dcaa52&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43dcaa52\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e3d7626\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { type CSSProperties } from 'vue'\n\ninterface TabItem {\n key: string\n label: string\n color?: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Tabs',\n props: {\n value: {},\n tabs: {},\n card: { type: Boolean, default: false },\n tabsStyle: {},\n tabStyle: {},\n spaceAround: { type: Boolean, default: false },\n spaceBetween: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs\", {\n 'card': _ctx.card,\n 'space-around': _ctx.spaceAround,\n 'space-between': _ctx.spaceBetween,\n }]),\n style: _normalizeStyle(_ctx.tabsStyle || {})\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.tabs, (tab) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tab\", { 'active': tab.key === _ctx.value }]),\n key: tab.key,\n style: _normalizeStyle({\n ...(_ctx.tabStyle || {}),\n '--color': tab.color,\n }),\n onClick: ($event: any) => (emit('update:value', tab.key))\n }, _toDisplayString(tab.label), 15, _hoisted_1))\n }), 128))\n ], 6))\n}\n}\n\n})","import script from \"./Tabs.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Tabs.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Tabs.vue?vue&type=style&index=0&id=5e3d7626&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5e3d7626\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Button',\n props: {\n checked: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n type: { default: 'default' },\n size: { default: 'normal' },\n first: { type: Boolean, default: false },\n last: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst handleClick = () => {\n if (props.disabled) return\n emit('click')\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n class: _normalizeClass([\"button\", {\n 'disabled': _ctx.disabled,\n 'checked': !_ctx.disabled && _ctx.checked,\n 'default': !_ctx.disabled && _ctx.type === 'default',\n 'primary': !_ctx.disabled && _ctx.type === 'primary',\n 'checkbox': !_ctx.disabled && _ctx.type === 'checkbox',\n 'radio': !_ctx.disabled && _ctx.type === 'radio',\n 'small': _ctx.size === 'small',\n 'first': _ctx.first,\n 'last': _ctx.last,\n }]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (handleClick()))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./Button.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Button.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Button.vue?vue&type=style&index=0&id=52c90330&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52c90330\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bf3b141\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"select-wrap\"\n}\nconst _hoisted_2 = { class: \"selector\" }\nconst _hoisted_3 = { class: \"icon\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = { class: \"selector\" }\nconst _hoisted_6 = { class: \"icon\" }\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport Popover from './Popover.vue'\n\ninterface SelectOption {\n label: string\n value: string | number\n disabled?: boolean\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Select',\n props: {\n value: {},\n options: {},\n disabled: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\nconst showLabel = computed(() => {\n return props.options.find(item => item.value === props.value)?.label || props.value\n})\n\n\n\nconst popoverVisible = ref(false)\nconst selectRef = ref()\nconst width = ref(0)\n\nconst updateWidth = () => {\n if (!selectRef.value) return\n width.value = selectRef.value.clientWidth\n}\nconst resizeObserver = new ResizeObserver(updateWidth)\nonMounted(() => {\n if (!selectRef.value) return\n resizeObserver.observe(selectRef.value)\n})\nonUnmounted(() => {\n if (!selectRef.value) return\n resizeObserver.unobserve(selectRef.value)\n})\n\nconst handleSelect = (option: SelectOption) => {\n if (option.disabled) return\n\n emit('update:value', option.value)\n popoverVisible.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n\n return (_ctx.disabled)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"select disabled\",\n ref_key: \"selectRef\",\n ref: selectRef\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(_ctx.value), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _createVNode(_component_IconDown, { size: 14 })\n ])\n ])\n ], 512)\n ]))\n : (_openBlock(), _createBlock(Popover, {\n key: 1,\n class: \"select-wrap\",\n trigger: \"click\",\n value: popoverVisible.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((popoverVisible).value = $event)),\n placement: \"bottom\",\n contentStyle: {\n padding: 0,\n boxShadow: '0 6px 16px 0 rgba(0, 0, 0, 0.08)',\n }\n }, {\n content: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"options\",\n style: _normalizeStyle({ width: width.value + 2 + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.options, (option) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"option\", {\n 'disabled': option.disabled,\n 'selected': option.value === _ctx.value,\n }]),\n key: option.value,\n onClick: ($event: any) => (handleSelect(option))\n }, _toDisplayString(option.label), 11, _hoisted_4))\n }), 128))\n ], 4)\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"select\",\n ref_key: \"selectRef\",\n ref: selectRef\n }, [\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(showLabel.value), 1),\n _createElementVNode(\"div\", _hoisted_6, [\n _renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _createVNode(_component_IconDown, { size: 14 })\n ])\n ])\n ], 512)\n ]),\n _: 3\n }, 8, [\"value\", \"contentStyle\"]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Select.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Select.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=5bf3b141&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bf3b141\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-cc39ee16\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"link-dialog\" }\nconst _hoisted_2 = {\n key: 2,\n class: \"preview\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \"预览:\", -1))\nconst _hoisted_4 = { class: \"btns\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElementLink } from '@/types/slides'\nimport useLink from '@/hooks/useLink'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\nimport Select from '@/components/Select.vue'\n\ntype TypeKey = 'web' | 'slide'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinkDialog',\n emits: [\"close\"],\n setup(__props, { emit }) {\n\n\n\nconst { handleElement } = storeToRefs(useMainStore())\nconst { slides, currentSlide } = storeToRefs(useSlidesStore())\n\nconst type = ref('web')\nconst address = ref('')\nconst slideId = ref('')\n\nconst slideOptions = computed(() => {\n return slides.value.map((item, index) => ({\n label: `幻灯片 ${index + 1}`,\n value: item.id,\n disabled: currentSlide.value.id === item.id,\n }))\n})\n\nslideId.value = slides.value.find(item => item.id !== currentSlide.value.id)?.id || ''\n\nconst selectedSlide = computed(() => {\n if (!slideId.value) return null\n\n return slides.value.find(item => item.id === slideId.value) || null\n})\n\nconst tabs: TabItem[] = [\n { key: 'web', label: '网页链接' },\n { key: 'slide', label: '幻灯片页面' },\n]\n\nconst { setLink } = useLink()\n\nonMounted(() => {\n if (handleElement.value?.link) {\n if (handleElement.value.link.type === 'web') address.value = handleElement.value.link.target\n else if (handleElement.value.link.type === 'slide') slideId.value = handleElement.value.link.target\n\n type.value = handleElement.value.link.type\n }\n})\n\nconst save = () => {\n const link: PPTElementLink = {\n type: type.value,\n target: type.value === 'web' ? address.value : slideId.value,\n }\n if (handleElement.value) {\n const success = setLink(handleElement.value, link)\n if (success) emit('close')\n else address.value = ''\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((type).value = $event)),\n tabsStyle: { marginBottom: '20px' }\n }, null, 8, [\"value\"]),\n (type.value === 'web')\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"input\",\n value: address.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((address).value = $event)),\n placeholder: \"请输入网页链接地址\"\n }, null, 8, [\"value\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'slide')\n ? (_openBlock(), _createBlock(Select, {\n key: 1,\n class: \"input\",\n value: slideId.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((slideId).value = $event)),\n options: slideOptions.value\n }, null, 8, [\"value\", \"options\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'slide' && selectedSlide.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _hoisted_3,\n _createVNode(ThumbnailSlide, {\n class: \"thumbnail\",\n slide: selectedSlide.value,\n size: 500\n }, null, 8, [\"slide\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(Button, {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (save()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinkDialog.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinkDialog.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinkDialog.vue?vue&type=style&index=0&id=cc39ee16&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-cc39ee16\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, vShow as _vShow, normalizeStyle as _normalizeStyle, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, withKeys as _withKeys, Teleport as _Teleport, createBlock as _createBlock } from \"vue\"\n\nimport { computed, nextTick, ref, watch, type CSSProperties } from 'vue'\nimport { icons } from '@/plugins/icon'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Modal',\n props: {\n visible: { type: Boolean },\n width: { default: 480 },\n closeButton: { type: Boolean, default: false },\n closeOnClickMask: { type: Boolean, default: true },\n closeOnEsc: { type: Boolean, default: true },\n contentStyle: {}\n },\n emits: [\"update:visible\", \"closed\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\nconst { IconClose } = icons\n\n\n\nconst modalRef = ref()\n\n\n\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return {\n width: props.width + 'px',\n ...(props.contentStyle || {})\n }\n})\n\nwatch(() => props.visible, () => {\n if (props.visible) {\n nextTick(() => modalRef.value!.focus())\n }\n})\n\nconst close = () => {\n emit('update:visible', false)\n emit('closed')\n}\n\nconst onEsc = () => {\n if (props.visible && props.closeOnEsc) close()\n}\n\nconst onClickMask = () => {\n if (props.closeOnClickMask) close()\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, { name: \"modal-fade\" }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"modal\",\n ref_key: \"modalRef\",\n ref: modalRef,\n tabindex: \"-1\",\n onKeyup: _cache[4] || (_cache[4] = _withKeys(($event: any) => (onEsc()), [\"esc\"]))\n }, [\n _createElementVNode(\"div\", {\n class: \"mask\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (onClickMask()))\n }),\n _createVNode(_Transition, {\n name: \"modal-zoom\",\n onAfterLeave: _cache[2] || (_cache[2] = ($event: any) => (contentVisible.value = false)),\n onBeforeEnter: _cache[3] || (_cache[3] = ($event: any) => (contentVisible.value = true))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"modal-content\",\n style: _normalizeStyle(contentStyle.value)\n }, [\n (_ctx.closeButton)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: \"close-btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (close()))\n }, [\n _createVNode(_unref(IconClose))\n ]))\n : _createCommentVNode(\"\", true),\n (contentVisible.value)\n ? _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n : _createCommentVNode(\"\", true)\n ], 4), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n })\n ], 544), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=fea8edcc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-fea8edcc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, vShow as _vShow, withDirectives as _withDirectives, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, withCtx as _withCtx, resolveDirective as _resolveDirective, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-ce64755c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"operates\" }\nconst _hoisted_2 = {\n key: 2,\n class: \"drag-mask\"\n}\n\nimport { nextTick, onMounted, onUnmounted, provide, ref, watch, watchEffect } from 'vue'\nimport { throttle } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps, CreateCustomShapeData } from '@/types/edit'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { removeAllRanges } from '@/utils/selection'\nimport { KEYS } from '@/configs/hotkey'\n\nimport useViewportSize from './hooks/useViewportSize'\nimport useMouseSelection from './hooks/useMouseSelection'\nimport useDropImageOrText from './hooks/useDropImageOrText'\nimport useRotateElement from './hooks/useRotateElement'\nimport useScaleElement from './hooks/useScaleElement'\nimport useSelectElement from './hooks/useSelectElement'\nimport useDragElement from './hooks/useDragElement'\nimport useDragLineElement from './hooks/useDragLineElement'\nimport useMoveShapeKeypoint from './hooks/useMoveShapeKeypoint'\nimport useInsertFromCreateSelection from './hooks/useInsertFromCreateSelection'\n\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useCopyAndPasteElement from '@/hooks/useCopyAndPasteElement'\nimport useSelectAllElement from '@/hooks/useSelectAllElement'\nimport useScaleCanvas from '@/hooks/useScaleCanvas'\nimport useScreening from '@/hooks/useScreening'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nimport EditableElement from './EditableElement.vue'\nimport MouseSelection from './MouseSelection.vue'\nimport ViewportBackground from './ViewportBackground.vue'\nimport AlignmentLine from './AlignmentLine.vue'\nimport Ruler from './Ruler.vue'\nimport ElementCreateSelection from './ElementCreateSelection.vue'\nimport ShapeCreateCanvas from './ShapeCreateCanvas.vue'\nimport MultiSelectOperate from './Operate/MultiSelectOperate.vue'\nimport Operate from './Operate/index.vue'\nimport LinkDialog from './LinkDialog.vue'\nimport Modal from '@/components/Modal.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst {\n activeElementIdList,\n activeGroupElementId,\n handleElementId,\n hiddenElementIdList,\n editorAreaFocus,\n gridLineSize,\n showRuler,\n creatingElement,\n creatingCustomShape,\n canvasScale,\n textFormatPainter,\n} = storeToRefs(mainStore)\nconst { currentSlide } = storeToRefs(useSlidesStore())\nconst { ctrlKeyState, spaceKeyState } = storeToRefs(useKeyboardStore())\n\nconst viewportRef = ref()\nconst alignmentLines = ref([])\n\nconst linkDialogVisible = ref(false)\nconst openLinkDialog = () => linkDialogVisible.value = true\n\nwatch(handleElementId, () => {\n mainStore.setActiveGroupElementId('')\n})\n\nconst elementList = ref([])\nconst setLocalElementList = () => {\n elementList.value = currentSlide.value ? JSON.parse(JSON.stringify(currentSlide.value.elements)) : []\n}\nwatchEffect(setLocalElementList)\n\nconst canvasRef = ref()\nconst { dragViewport, viewportStyles } = useViewportSize(canvasRef)\n\nuseDropImageOrText(canvasRef)\n\nconst { mouseSelection, mouseSelectionVisible, mouseSelectionQuadrant, updateMouseSelection } = useMouseSelection(elementList, viewportRef)\n\nconst { dragElement } = useDragElement(elementList, alignmentLines, canvasScale)\nconst { dragLineElement } = useDragLineElement(elementList)\nconst { selectElement } = useSelectElement(elementList, dragElement)\nconst { scaleElement, scaleMultiElement } = useScaleElement(elementList, alignmentLines, canvasScale)\nconst { rotateElement } = useRotateElement(elementList, viewportRef, canvasScale)\nconst { moveShapeKeypoint } = useMoveShapeKeypoint(elementList, canvasScale)\n\nconst { selectAllElement } = useSelectAllElement()\nconst { deleteAllElements } = useDeleteElement()\nconst { pasteElement } = useCopyAndPasteElement()\nconst { enterScreeningFromStart } = useScreening()\nconst { updateSlideIndex } = useSlideHandler()\nconst { createTextElement, createShapeElement } = useCreateElement()\n\n// 组件渲染时,如果存在元素焦点,需要清除\n// 这种情况存在于:有焦点元素的情况下进入了放映模式,再退出时,需要清除原先的焦点(因为可能已经切换了页面)\nonMounted(() => {\n if (activeElementIdList.value.length) {\n nextTick(() => mainStore.setActiveElementIdList([]))\n }\n})\n\n// 点击画布的空白区域:清空焦点元素、设置画布焦点、清除文字选区、清空格式刷状态\nconst handleClickBlankArea = (e: MouseEvent) => {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n\n if (!spaceKeyState.value) updateMouseSelection(e)\n else dragViewport(e)\n\n if (!editorAreaFocus.value) mainStore.setEditorareaFocus(true)\n if (textFormatPainter.value) mainStore.setTextFormatPainter(null)\n removeAllRanges()\n}\n\n// 双击空白处插入文本\nconst handleDblClick = (e: MouseEvent) => {\n if (activeElementIdList.value.length || creatingElement.value || creatingCustomShape.value) return\n if (!viewportRef.value) return\n\n const viewportRect = viewportRef.value.getBoundingClientRect()\n const left = (e.pageX - viewportRect.x) / canvasScale.value\n const top = (e.pageY - viewportRect.y) / canvasScale.value\n\n createTextElement({\n left,\n top,\n width: 200 / canvasScale.value, // 除以 canvasScale 是为了与点击选区创建的形式保持相同的宽度\n height: 0,\n })\n}\n\n// 画布注销时清空格式刷状态\nonUnmounted(() => {\n if (textFormatPainter.value) mainStore.setTextFormatPainter(null)\n})\n\n// 移除画布编辑区域焦点\nconst removeEditorAreaFocus = () => {\n if (editorAreaFocus.value) mainStore.setEditorareaFocus(false)\n}\n\n// 滚动鼠标\nconst { scaleCanvas } = useScaleCanvas()\nconst throttleScaleCanvas = throttle(scaleCanvas, 100, { leading: true, trailing: false })\nconst throttleUpdateSlideIndex = throttle(updateSlideIndex, 300, { leading: true, trailing: false })\n\nconst handleMousewheelCanvas = (e: WheelEvent) => {\n e.preventDefault()\n\n // 按住Ctrl键时:缩放画布\n if (ctrlKeyState.value) {\n if (e.deltaY > 0) throttleScaleCanvas('-')\n else if (e.deltaY < 0) throttleScaleCanvas('+')\n }\n // 上下翻页\n else {\n if (e.deltaY > 0) throttleUpdateSlideIndex(KEYS.DOWN)\n else if (e.deltaY < 0) throttleUpdateSlideIndex(KEYS.UP)\n }\n}\n\n// 开关标尺\nconst toggleRuler = () => {\n mainStore.setRulerState(!showRuler.value)\n}\n\n// 在鼠标绘制的范围插入元素\nconst { insertElementFromCreateSelection, formatCreateSelection } = useInsertFromCreateSelection(viewportRef)\n\n// 插入自定义任意多边形\nconst insertCustomShape = (data: CreateCustomShapeData) => {\n const {\n start,\n end,\n path,\n viewBox,\n } = data\n const position = formatCreateSelection({ start, end })\n position && createShapeElement(position, { path, viewBox })\n\n mainStore.setCreatingCustomShapeState(false)\n}\n\nconst contextmenus = (): ContextmenuItem[] => {\n return [\n {\n text: '粘贴',\n subText: 'Ctrl + V',\n handler: pasteElement,\n },\n {\n text: '全选',\n subText: 'Ctrl + A',\n handler: selectAllElement,\n },\n {\n text: '标尺',\n subText: showRuler.value ? '√' : '',\n handler: toggleRuler,\n },\n {\n text: '网格线',\n handler: () => mainStore.setGridLineSize(gridLineSize.value ? 0 : 50),\n children: [\n {\n text: '无',\n subText: gridLineSize.value === 0 ? '√' : '',\n handler: () => mainStore.setGridLineSize(0),\n },\n {\n text: '小',\n subText: gridLineSize.value === 25 ? '√' : '',\n handler: () => mainStore.setGridLineSize(25),\n },\n {\n text: '中',\n subText: gridLineSize.value === 50 ? '√' : '',\n handler: () => mainStore.setGridLineSize(50),\n },\n {\n text: '大',\n subText: gridLineSize.value === 100 ? '√' : '',\n handler: () => mainStore.setGridLineSize(100),\n },\n ],\n },\n {\n text: '重置当前页',\n handler: deleteAllElements,\n },\n { divider: true },\n {\n text: '幻灯片放映',\n subText: 'F5',\n handler: enterScreeningFromStart,\n },\n ]\n}\n\nprovide(injectKeySlideScale, canvasScale)\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n const _directive_click_outside = _resolveDirective(\"click-outside\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"canvas\",\n ref_key: \"canvasRef\",\n ref: canvasRef,\n onWheel: _cache[4] || (_cache[4] = $event => handleMousewheelCanvas($event)),\n onMousedown: _cache[5] || (_cache[5] = $event => handleClickBlankArea($event)),\n onDblclick: _cache[6] || (_cache[6] = $event => handleDblClick($event))\n }, [\n (_unref(creatingElement))\n ? (_openBlock(), _createBlock(ElementCreateSelection, {\n key: 0,\n onCreated: _cache[0] || (_cache[0] = data => _unref(insertElementFromCreateSelection)(data))\n }))\n : _createCommentVNode(\"\", true),\n (_unref(creatingCustomShape))\n ? (_openBlock(), _createBlock(ShapeCreateCanvas, {\n key: 1,\n onCreated: _cache[1] || (_cache[1] = data => insertCustomShape(data))\n }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n class: \"viewport-wrapper\",\n style: _normalizeStyle({\n width: _unref(viewportStyles).width * _unref(canvasScale) + 'px',\n height: _unref(viewportStyles).height * _unref(canvasScale) + 'px',\n left: _unref(viewportStyles).left + 'px',\n top: _unref(viewportStyles).top + 'px',\n })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alignmentLines.value, (line, index) => {\n return (_openBlock(), _createBlock(AlignmentLine, {\n key: index,\n type: line.type,\n axis: line.axis,\n length: line.length,\n canvasScale: _unref(canvasScale)\n }, null, 8, [\"type\", \"axis\", \"length\", \"canvasScale\"]))\n }), 128)),\n (_unref(activeElementIdList).length > 1)\n ? (_openBlock(), _createBlock(MultiSelectOperate, {\n key: 0,\n elementList: elementList.value,\n scaleMultiElement: _unref(scaleMultiElement)\n }, null, 8, [\"elementList\", \"scaleMultiElement\"]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element) => {\n return _withDirectives((_openBlock(), _createBlock(Operate, {\n key: element.id,\n elementInfo: element,\n isSelected: _unref(activeElementIdList).includes(element.id),\n isActive: _unref(handleElementId) === element.id,\n isActiveGroupElement: _unref(activeGroupElementId) === element.id,\n isMultiSelect: _unref(activeElementIdList).length > 1,\n rotateElement: _unref(rotateElement),\n scaleElement: _unref(scaleElement),\n openLinkDialog: openLinkDialog,\n dragLineElement: _unref(dragLineElement),\n moveShapeKeypoint: _unref(moveShapeKeypoint)\n }, null, 8, [\"elementInfo\", \"isSelected\", \"isActive\", \"isActiveGroupElement\", \"isMultiSelect\", \"rotateElement\", \"scaleElement\", \"dragLineElement\", \"moveShapeKeypoint\"])), [\n [_vShow, !_unref(hiddenElementIdList).includes(element.id)]\n ])\n }), 128)),\n _createVNode(ViewportBackground)\n ]),\n _createElementVNode(\"div\", {\n class: \"viewport\",\n ref_key: \"viewportRef\",\n ref: viewportRef,\n style: _normalizeStyle({ transform: `scale(${_unref(canvasScale)})` })\n }, [\n (_unref(mouseSelectionVisible))\n ? (_openBlock(), _createBlock(MouseSelection, {\n key: 0,\n top: _unref(mouseSelection).top,\n left: _unref(mouseSelection).left,\n width: _unref(mouseSelection).width,\n height: _unref(mouseSelection).height,\n quadrant: _unref(mouseSelectionQuadrant)\n }, null, 8, [\"top\", \"left\", \"width\", \"height\", \"quadrant\"]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element, index) => {\n return _withDirectives((_openBlock(), _createBlock(EditableElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n isMultiSelect: _unref(activeElementIdList).length > 1,\n selectElement: _unref(selectElement),\n openLinkDialog: openLinkDialog\n }, null, 8, [\"elementInfo\", \"elementIndex\", \"isMultiSelect\", \"selectElement\"])), [\n [_vShow, !_unref(hiddenElementIdList).includes(element.id)]\n ])\n }), 128))\n ], 4)\n ], 4),\n (_unref(spaceKeyState))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true),\n (_unref(showRuler))\n ? (_openBlock(), _createBlock(Ruler, {\n key: 3,\n viewportStyles: _unref(viewportStyles)\n }, null, 8, [\"viewportStyles\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(Modal, {\n visible: linkDialogVisible.value,\n \"onUpdate:visible\": _cache[3] || (_cache[3] = ($event: any) => ((linkDialogVisible).value = $event)),\n width: 540\n }, {\n default: _withCtx(() => [\n _createVNode(LinkDialog, {\n onClose: _cache[2] || (_cache[2] = ($event: any) => (linkDialogVisible.value = false))\n })\n ]),\n _: 1\n }, 8, [\"visible\"])\n ], 32)), [\n [_directive_contextmenu, contextmenus],\n [_directive_click_outside, removeEditorAreaFocus]\n ])\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=ce64755c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ce64755c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8603ad34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-item-thumbnail\" }\nconst _hoisted_2 = { class: \"shape-content\" }\nconst _hoisted_3 = {\n overflow: \"visible\",\n width: \"18\",\n height: \"18\"\n}\nconst _hoisted_4 = [\"transform\"]\nconst _hoisted_5 = [\"fill\", \"stroke\", \"d\"]\n\nimport type { ShapePoolItem } from '@/configs/shapes'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapeItemThumbnail',\n props: {\n shape: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_3, [\n _createElementVNode(\"g\", {\n transform: `scale(${18 / _ctx.shape.viewBox[0]}, ${18 / _ctx.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n class: _normalizeClass([\"shape-path\", { 'outlined': _ctx.shape.outlined }]),\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: _ctx.shape.outlined ? '#999' : 'transparent',\n stroke: _ctx.shape.outlined ? 'transparent' : '#999',\n \"stroke-width\": \"2\",\n d: _ctx.shape.path\n }, null, 10, _hoisted_5)\n ], 8, _hoisted_4)\n ]))\n ])\n ]))\n}\n}\n\n})","import script from \"./ShapeItemThumbnail.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeItemThumbnail.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeItemThumbnail.vue?vue&type=style&index=0&id=8603ad34&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8603ad34\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8b994b42\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-pool\" }\nconst _hoisted_2 = { class: \"category-name\" }\nconst _hoisted_3 = { class: \"shape-list\" }\n\nimport { SHAPE_LIST, type ShapePoolItem } from '@/configs/shapes'\nimport ShapeItemThumbnail from './ShapeItemThumbnail.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapePool',\n emits: [\"select\"],\n setup(__props, { emit }) {\n\n\n\nconst selectShape = (shape: ShapePoolItem) => {\n emit('select', shape)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(SHAPE_LIST), (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"category\",\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (shape, index) => {\n return (_openBlock(), _createBlock(ShapeItemThumbnail, {\n class: \"shape-item\",\n key: index,\n shape: shape,\n onClick: ($event: any) => (selectShape(shape))\n }, null, 8, [\"shape\", \"onClick\"]))\n }), 128))\n ])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ShapePool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapePool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapePool.vue?vue&type=style&index=0&id=8b994b42&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8b994b42\"]])\n\nexport default __exports__","import type { LinePoint } from '@/types/slides'\n\n\nexport interface LinePoolItem {\n path: string\n style: 'solid' | 'dashed'\n points: [LinePoint, LinePoint]\n isBroken?: boolean\n isCurve?: boolean\n isCubic?: boolean\n}\n\ninterface PresetLine {\n type: string\n children: LinePoolItem[]\n}\n\nexport const LINE_LIST: PresetLine[] = [\n {\n type: '直线',\n children: [\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', ''] },\n { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', ''] },\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'arrow'] },\n { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', 'arrow'] },\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'dot'] },\n ],\n },\n {\n type: '折线、曲线',\n children: [\n { path: 'M 0 0 L 0 20 L 20 20', style: 'solid', points: ['', 'arrow'], isBroken: true },\n { path: 'M 0 0 Q 0 20 20 20', style: 'solid', points: ['', 'arrow'], isCurve: true },\n { path: 'M 0 0 C 20 0 0 20 20 20', style: 'solid', points: ['', 'arrow'], isCubic: true },\n ],\n },\n]","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-554824b6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"line-pool\" }\nconst _hoisted_2 = { class: \"category-name\" }\nconst _hoisted_3 = { class: \"line-list\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = {\n overflow: \"visible\",\n width: \"20\",\n height: \"20\"\n}\nconst _hoisted_6 = [\"d\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\n\nimport { LINE_LIST, type LinePoolItem } from '@/configs/lines'\n\nimport LinePointMarker from '@/views/components/element/LineElement/LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinePool',\n emits: [\"select\"],\n setup(__props, { emit }) {\n\n\n\nconst selectLine = (line: LinePoolItem) => {\n emit('select', line)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(LINE_LIST), (item, i) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"category\",\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (line, j) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"line-item\",\n key: j\n }, [\n _createElementVNode(\"div\", {\n class: \"line-content\",\n onClick: ($event: any) => (selectLine(line))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_5, [\n _createElementVNode(\"defs\", null, [\n (line.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n class: \"line-marker\",\n id: `preset-line-${i}-${j}`,\n position: \"start\",\n type: line.points[0],\n color: \"currentColor\",\n baseSize: 2\n }, null, 8, [\"id\", \"type\"]))\n : _createCommentVNode(\"\", true),\n (line.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n class: \"line-marker\",\n id: `preset-line-${i}-${j}`,\n position: \"end\",\n type: line.points[1],\n color: \"currentColor\",\n baseSize: 2\n }, null, 8, [\"id\", \"type\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n class: \"line-path\",\n d: line.path,\n stroke: \"currentColor\",\n fill: \"none\",\n \"stroke-width\": \"2\",\n \"stroke-dasharray\": line.style === 'solid' ? '0, 0' : '4, 1',\n \"marker-start\": line.points[0] ? `url(#${`preset-line-${i}-${j}`}-${line.points[0]}-start)` : '',\n \"marker-end\": line.points[1] ? `url(#${`preset-line-${i}-${j}`}-${line.points[1]}-end)` : ''\n }, null, 8, _hoisted_6)\n ]))\n ], 8, _hoisted_4)\n ]))\n }), 128))\n ])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinePool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinePool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinePool.vue?vue&type=style&index=0&id=554824b6&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-554824b6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-398f5699\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"chart-pool\" }\nconst _hoisted_2 = [\"onClick\"]\n\nimport type { PresetChartType } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ChartPool',\n emits: [\"select\"],\n setup(__props, { emit }) {\n\n\n\nconst chartList: PresetChartType[] = ['bar', 'horizontalBar', 'line', 'area', 'scatter', 'pie', 'ring']\n\nconst selectChart = (chart: PresetChartType) => {\n emit('select', chart)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconChartLine = _resolveComponent(\"IconChartLine\")!\n const _component_IconChartHistogram = _resolveComponent(\"IconChartHistogram\")!\n const _component_IconChartPie = _resolveComponent(\"IconChartPie\")!\n const _component_IconChartHistogramOne = _resolveComponent(\"IconChartHistogramOne\")!\n const _component_IconChartLineArea = _resolveComponent(\"IconChartLineArea\")!\n const _component_IconChartRing = _resolveComponent(\"IconChartRing\")!\n const _component_IconChartScatter = _resolveComponent(\"IconChartScatter\")!\n\n return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(chartList, (chart, index) => {\n return _createElementVNode(\"li\", {\n class: \"chart-item\",\n key: index\n }, [\n _createElementVNode(\"div\", {\n class: \"chart-content\",\n onClick: ($event: any) => (selectChart(chart))\n }, [\n (chart === 'line')\n ? (_openBlock(), _createBlock(_component_IconChartLine, {\n key: 0,\n size: \"24\"\n }))\n : (chart === 'bar')\n ? (_openBlock(), _createBlock(_component_IconChartHistogram, {\n key: 1,\n size: \"24\"\n }))\n : (chart === 'pie')\n ? (_openBlock(), _createBlock(_component_IconChartPie, {\n key: 2,\n size: \"24\"\n }))\n : (chart === 'horizontalBar')\n ? (_openBlock(), _createBlock(_component_IconChartHistogramOne, {\n key: 3,\n size: \"24\"\n }))\n : (chart === 'area')\n ? (_openBlock(), _createBlock(_component_IconChartLineArea, {\n key: 4,\n size: \"24\"\n }))\n : (chart === 'ring')\n ? (_openBlock(), _createBlock(_component_IconChartRing, {\n key: 5,\n size: \"24\"\n }))\n : (chart === 'scatter')\n ? (_openBlock(), _createBlock(_component_IconChartScatter, {\n key: 6,\n size: \"24\"\n }))\n : _createCommentVNode(\"\", true)\n ], 8, _hoisted_2)\n ])\n }), 64))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ChartPool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ChartPool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ChartPool.vue?vue&type=style&index=0&id=398f5699&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-398f5699\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-268948c2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"prefix\" }\nconst _hoisted_2 = { class: \"input-wrap\" }\nconst _hoisted_3 = [\"disabled\", \"placeholder\"]\nconst _hoisted_4 = { class: \"handlers\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"currentColor\",\n width: \"1em\",\n height: \"1em\",\n viewBox: \"64 64 896 896\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z\" })\n], -1))\nconst _hoisted_6 = [\n _hoisted_5\n]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"currentColor\",\n width: \"1em\",\n height: \"1em\",\n viewBox: \"64 64 896 896\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" })\n], -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\nconst _hoisted_9 = { class: \"suffix\" }\n\nimport { ref, watch } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'NumberInput',\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n placeholder: { default: '' },\n min: { default: 0 },\n max: { default: Infinity },\n step: { default: 1 }\n },\n emits: [\"update:value\", \"input\", \"change\", \"blur\", \"focus\", \"enter\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst number = ref(0)\nconst focused = ref(false)\n\nwatch(() => props.value, () => {\n if (props.value !== number.value) {\n number.value = props.value\n }\n}, {\n immediate: true,\n})\n\nwatch(number, () => {\n let value = +number.value\n if (isNaN(value)) value = props.min\n else if (value > props.max) value = props.max\n else if (value < props.min) value = props.min\n\n number.value = value\n emit('update:value', number.value)\n})\n\nconst handleBlur = (e: Event) => {\n focused.value = false\n emit('blur', e)\n}\nconst handleFocus = (e: Event) => {\n focused.value = true\n emit('focus', e)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"number-input\", {\n 'disabled': _ctx.disabled,\n 'focused': focused.value,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prefix\")\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n disabled: _ctx.disabled,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((number).value = $event)),\n placeholder: _ctx.placeholder,\n onInput: _cache[1] || (_cache[1] = $event => emit('input', $event)),\n onFocus: _cache[2] || (_cache[2] = $event => handleFocus($event)),\n onBlur: _cache[3] || (_cache[3] = $event => handleBlur($event)),\n onChange: _cache[4] || (_cache[4] = $event => emit('change', $event)),\n onKeydown: _cache[5] || (_cache[5] = _withKeys($event => emit('enter', $event), [\"enter\"]))\n }, null, 40, _hoisted_3), [\n [_vModelText, number.value]\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n class: \"handler\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (number.value += _ctx.step))\n }, _hoisted_6),\n _createElementVNode(\"span\", {\n class: \"handler\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (number.value -= _ctx.step))\n }, _hoisted_8)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_9, [\n _renderSlot(_ctx.$slots, \"suffix\")\n ])\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./NumberInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./NumberInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./NumberInput.vue?vue&type=style&index=0&id=268948c2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-268948c2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-372c6730\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"table-generator\" }\nconst _hoisted_2 = { class: \"title\" }\nconst _hoisted_3 = { class: \"lef\" }\nconst _hoisted_4 = [\"onMouseenter\"]\nconst _hoisted_5 = {\n key: 1,\n class: \"custom\"\n}\nconst _hoisted_6 = { class: \"row\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"label\",\n style: {\"width\":\"25%\"}\n}, \"行数:\", -1))\nconst _hoisted_8 = { class: \"row\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"label\",\n style: {\"width\":\"25%\"}\n}, \"列数:\", -1))\nconst _hoisted_10 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport message from '@/utils/message'\nimport Button from '@/components/Button.vue'\nimport NumberInput from '@/components/NumberInput.vue'\n\ninterface InsertData {\n row: number\n col: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TableGenerator',\n emits: [\"insert\", \"close\"],\n setup(__props, { emit }) {\n\n\n\nconst endCell = ref([])\nconst customRow = ref(3)\nconst customCol = ref(3)\nconst isCustom = ref(false)\n\nconst handleClickTable = () => {\n if (!endCell.value.length) return\n const [row, col] = endCell.value\n emit('insert', { row, col })\n}\n\nconst insertCustomTable = () => {\n if (customRow.value < 1 || customRow.value > 20) return message.warning('行数/列数必须在0~20之间!')\n if (customCol.value < 1 || customCol.value > 20) return message.warning('行数/列数必须在0~20之间!')\n emit('insert', { row: customRow.value, col: customCol.value })\n isCustom.value = false\n}\n\nconst close = () => {\n emit('close')\n isCustom.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, \"表格 \" + _toDisplayString(endCell.value.length ? `${endCell.value[0]} x ${endCell.value[1]}` : ''), 1),\n _createElementVNode(\"div\", {\n class: \"right\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (isCustom.value = !isCustom.value))\n }, _toDisplayString(isCustom.value ? '返回' : '自定义'), 1)\n ]),\n (!isCustom.value)\n ? (_openBlock(), _createElementBlock(\"table\", {\n key: 0,\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (endCell.value = [])),\n onClick: _cache[2] || (_cache[2] = ($event: any) => (handleClickTable()))\n }, [\n _createElementVNode(\"tbody\", null, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (row) => {\n return _createElementVNode(\"tr\", { key: row }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (col) => {\n return _createElementVNode(\"td\", {\n onMouseenter: ($event: any) => (endCell.value = [row, col]),\n key: col\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"cell\", { 'active': endCell.value.length && row <= endCell.value[0] && col <= endCell.value[1] }])\n }, null, 2)\n ], 40, _hoisted_4)\n }), 64))\n ])\n }), 64))\n ])\n ], 32))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createVNode(NumberInput, {\n min: 1,\n max: 20,\n value: customRow.value,\n \"onUpdate:value\": _cache[3] || (_cache[3] = ($event: any) => ((customRow).value = $event)),\n style: {\"width\":\"75%\"}\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createVNode(NumberInput, {\n min: 1,\n max: 20,\n value: customCol.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((customCol).value = $event)),\n style: {\"width\":\"75%\"}\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(Button, {\n class: \"btn\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (close()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn\",\n type: \"primary\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertCustomTable()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ]))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./TableGenerator.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TableGenerator.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./TableGenerator.vue?vue&type=style&index=0&id=372c6730&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-372c6730\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35a1214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"media-input\" }\nconst _hoisted_2 = { class: \"btns\" }\nconst _hoisted_3 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport message from '@/utils/message'\nimport Tabs from '@/components/Tabs.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\n\ntype TypeKey = 'video' | 'audio'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MediaInput',\n emits: [\"insertVideo\", \"insertAudio\", \"close\"],\n setup(__props, { emit }) {\n\n\n\nconst type = ref('video')\n\nconst videoSrc = ref('https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm')\nconst audioSrc = ref('https://freesound.org/data/previews/614/614107_11861866-lq.mp3')\n\nconst tabs: TabItem[] = [\n { key: 'video', label: '视频' },\n { key: 'audio', label: '音频' },\n]\n\nconst insertVideo = () => {\n if (!videoSrc.value) return message.error('请先输入正确的视频地址')\n emit('insertVideo', videoSrc.value)\n}\n\nconst insertAudio = () => {\n if (!audioSrc.value) return message.error('请先输入正确的音频地址')\n emit('insertAudio', audioSrc.value)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((type).value = $event)),\n tabsStyle: { marginBottom: '15px' }\n }, null, 8, [\"value\"]),\n (type.value === 'video')\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createVNode(Input, {\n value: videoSrc.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((videoSrc).value = $event)),\n placeholder: \"请输入视频地址,e.g. https://xxx.mp4\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Button, {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (insertVideo()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ], 64))\n : _createCommentVNode(\"\", true),\n (type.value === 'audio')\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createVNode(Input, {\n value: audioSrc.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((audioSrc).value = $event)),\n placeholder: \"请输入音频地址,e.g. https://xxx.mp3\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(Button, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertAudio()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./MediaInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MediaInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MediaInput.vue?vue&type=style&index=0&id=35a1214c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35a1214c\"]])\n\nexport default __exports__","import { hfmath, CONFIG as hfmathConfig } from 'hfmath'\n\nhfmathConfig.SUB_SUP_SCALE = 0.5\n\nexport { hfmath }","export const FORMULA_LIST = [\n {\n label: '高斯公式',\n latex: `\\\\int\\\\int\\\\int _ { \\\\Omega } \\\\left( \\\\frac { \\\\partial {P} } { \\\\partial {x} } + \\\\frac { \\\\partial {Q} } { \\\\partial {y} } + \\\\frac { \\\\partial {R} }{ \\\\partial {z} } \\\\right) \\\\mathrm { d } V = \\\\oint _ { \\\\partial \\\\Omega } ( P \\\\cos \\\\alpha + Q \\\\cos \\\\beta + R \\\\cos \\\\gamma ) \\\\mathrm{ d} S`\n },\n {\n label: '傅里叶级数',\n latex: `f(x) = \\\\frac {a_0} 2 + \\\\sum_{n = 1}^\\\\infty {({a_n}\\\\cos {nx} + {b_n}\\\\sin {nx})}`,\n },\n {\n label: '泰勒展开式',\n latex: `e ^ { x } = 1 + \\\\frac { x } { 1 ! } + \\\\frac { x ^ { 2 } } { 2 ! } + \\\\frac { x ^ { 3 } } { 3 ! } + ... , \\\\quad - \\\\infty < x < \\\\infty`,\n },\n {\n label: '定积分',\n latex: `\\\\lim_ { n \\\\rightarrow + \\\\infty } \\\\sum _ { i = 1 } ^ { n } f \\\\left[ a + \\\\frac { i } { n } ( b - a ) \\\\right] \\\\frac { b - a } { n } = \\\\int _ { a } ^ { b } f ( x ) dx`,\n },\n {\n label: '三角恒等式1',\n latex: `\\\\sin \\\\alpha \\\\pm \\\\sin \\\\beta = 2 \\\\sin \\\\frac { 1 } { 2 } ( \\\\alpha \\\\pm \\\\beta ) \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha \\\\mp \\\\beta )`,\n },\n {\n label: '三角恒等式2',\n latex: `\\\\cos \\\\alpha + \\\\cos \\\\beta = 2 \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha + \\\\beta ) \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha - \\\\beta )`,\n },\n {\n label: '和的展开式',\n latex: `( 1 + x ) ^ { n } = 1 + \\\\frac { n x } { 1 ! } + \\\\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ...`,\n },\n {\n label: '欧拉公式',\n latex: ` e^{ix} = \\\\cos {x} + i\\\\sin {x}`,\n },\n {\n label: '贝努利方程',\n latex: `\\\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\\\not= {0,1})`,\n },\n {\n label: '全微分方程',\n latex: `du(x,y) = P(x,y)dx + Q(x,y)dy = 0`,\n },\n {\n label: '非齐次方程',\n latex: `y = (\\\\int Q(x) e^{\\\\int {P(x)dx}}dx + C)e^{-\\\\int {P(x)dx}}`,\n },\n {\n label: '柯西中值定理',\n latex: `\\\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\\\frac{{f'(\\\\xi )}}{{F'(\\\\xi )}}`,\n },\n {\n label: '拉格朗日中值定理',\n latex: `f(b) - f(a) = f'(\\\\xi )(b - a)`,\n },\n {\n label: '导数公式',\n latex: `(\\\\arcsin x)' = \\\\frac{1}{{\\\\sqrt {1 - x^2} }}`,\n },\n {\n label: '三角函数积分',\n latex: `\\\\int {tgxdx = - \\\\ln \\\\left| {\\\\cos x} \\\\right| + C}`,\n },\n {\n label: '二次曲面',\n latex: `\\\\frac{{{x^2}}}{{{a^2}}} + \\\\frac{{{y^2}}}{{{b^2}}} - \\\\frac{{{z^2}}}{{{c^2}}} = 1`,\n },\n {\n label: '二阶微分',\n latex: `\\\\frac {{d^2}y} {dx^2} + P(x) \\\\frac {dy} {dx} + Q(x)y = f(x)`,\n },\n {\n label: '方向导数',\n latex: `\\\\frac{{\\\\partial f}}{{\\\\partial l}} = \\\\frac{{\\\\partial f}}{{\\\\partial x}}\\\\cos \\\\phi + \\\\frac{{\\\\partial f}}{{\\\\partial y}}\\\\sin \\\\phi`,\n },\n]\n\nexport const SYMBOL_LIST = [\n {\n type: 'operators',\n label: '数学',\n children: [\n { latex: '\\\\cdot' },\n { latex: '\\\\pm' },\n { latex: '\\\\mp' },\n { latex: '+' },\n { latex: '-' },\n { latex: '\\\\times' },\n { latex: '\\\\div' },\n { latex: '<' },\n { latex: '>' },\n { latex: '=' },\n { latex: '\\\\neq\\\\ne' },\n { latex: '\\\\leqq' },\n { latex: '\\\\geqq' },\n { latex: '\\\\leq' },\n { latex: '\\\\geq' },\n { latex: '\\\\propto' },\n { latex: '\\\\sim' },\n { latex: '\\\\equiv' },\n { latex: '\\\\dagger' },\n { latex: '\\\\ddagger' },\n { latex: '\\\\ell' },\n { latex: '\\\\#' },\n { latex: '\\\\$' },\n { latex: '\\\\&' },\n { latex: '\\\\%' },\n { latex: '\\\\langle\\\\rangle' },\n { latex: '()' },\n { latex: '[]' },\n { latex: '\\\\{\\\\}' },\n { latex: '||' },\n { latex: '\\\\|' },\n { latex: '\\\\exists' },\n { latex: '\\\\in' },\n { latex: '\\\\subset' },\n { latex: '\\\\supset' },\n { latex: '\\\\cup' },\n { latex: '\\\\cap' },\n { latex: '\\\\infty' },\n { latex: '\\\\partial' },\n { latex: '\\\\nabla' },\n { latex: '\\\\aleph' },\n { latex: '\\\\wp' },\n { latex: '\\\\therefore' },\n { latex: '\\\\mid' },\n { latex: '\\\\sum' },\n { latex: '\\\\prod' },\n { latex: '\\\\bigoplus' },\n { latex: '\\\\bigodot' },\n { latex: '\\\\int' },\n { latex: '\\\\oint' },\n { latex: '\\\\oplus' },\n { latex: '\\\\odot' },\n { latex: '\\\\perp' },\n { latex: '\\\\angle' },\n { latex: '\\\\triangle' },\n { latex: '\\\\Box' },\n { latex: '\\\\rightarrow' },\n { latex: '\\\\to' },\n { latex: '\\\\leftarrow' },\n { latex: '\\\\gets' },\n { latex: '\\\\circ' },\n { latex: '\\\\bigcirc' },\n { latex: '\\\\bullet' },\n { latex: '\\\\star' },\n { latex: '\\\\diamond' },\n { latex: '\\\\ast' },\n { latex: ',' },\n { latex: '.' },\n { latex: ';' },\n { latex: '!' },\n ],\n },\n {\n type: 'group',\n label: '组合',\n children: [\n { latex: '\\\\frac{a}{b}' },\n { latex: '\\\\frac{dx}{dx}' },\n { latex: '\\\\frac{\\\\partial a}{\\\\partial b}' },\n { latex: '\\\\sqrt{x}' },\n { latex: '\\\\sqrt[n]{x}' },\n { latex: 'x^{n}' },\n { latex: 'x_{n}' },\n { latex: 'x_a^b' },\n { latex: '\\\\int_{a}^{b}' },\n { latex: '\\\\oint_a^b' },\n { latex: '\\\\lim_{a \\\\rightarrow b}' },\n { latex: '\\\\prod_a^b' },\n { latex: '\\\\sum_a^b' },\n { latex: '\\\\left(\\\\begin{array}a \\\\\\\\ b\\\\end{array}\\\\right)' },\n { latex: '\\\\begin{bmatrix}a & b \\\\\\\\ c & d \\\\end{bmatrix}' },\n { latex: '\\\\begin{cases}a & x = 0 \\\\\\\\ b & x > 0\\\\end{cases}' },\n { latex: '\\\\hat{a}' },\n { latex: '\\\\breve{a}' },\n { latex: '\\\\acute{a}' },\n { latex: '\\\\grave{a}' },\n { latex: '\\\\tilde{a}' },\n { latex: '\\\\bar{a}' },\n { latex: '\\\\vec{a}' },\n { latex: '\\\\underline{a}' },\n { latex: '\\\\overline{a}' },\n { latex: '\\\\widehat{ab}' },\n { latex: '\\\\overleftarrow{ab}' },\n { latex: '\\\\overrightarrow{ab}' },\n ],\n },\n {\n type: 'verbatim',\n label: '函数',\n children: [\n { latex: '\\\\log' },\n { latex: '\\\\ln' },\n { latex: '\\\\exp' },\n { latex: '\\\\mod' },\n { latex: '\\\\lim' },\n { latex: '\\\\sin' },\n { latex: '\\\\cos' },\n { latex: '\\\\tan' },\n { latex: '\\\\csc' },\n { latex: '\\\\sec' },\n { latex: '\\\\cot' },\n { latex: '\\\\sinh' },\n { latex: '\\\\cosh' },\n { latex: '\\\\tanh' },\n { latex: '\\\\csch' },\n { latex: '\\\\sech' },\n { latex: '\\\\coth' },\n { latex: '\\\\arcsin' },\n { latex: '\\\\arccos' },\n { latex: '\\\\arctan' },\n { latex: '\\\\arccsc' },\n { latex: '\\\\arcsec' },\n { latex: '\\\\arccot' },\n ],\n },\n {\n type: 'greek',\n label: '希腊字母',\n children: [\n { latex: '\\\\alpha' },\n { latex: '\\\\beta' },\n { latex: '\\\\gamma' },\n { latex: '\\\\delta' },\n { latex: '\\\\varepsilon' },\n { latex: '\\\\zeta' },\n { latex: '\\\\eta' },\n { latex: '\\\\vartheta' },\n { latex: '\\\\iota' },\n { latex: '\\\\kappa' },\n { latex: '\\\\lambda' },\n { latex: '\\\\mu' },\n { latex: '\\\\nu' },\n { latex: '\\\\xi' },\n { latex: '\\\\omicron' },\n { latex: '\\\\pi' },\n { latex: '\\\\rho' },\n { latex: '\\\\sigma' },\n { latex: '\\\\tau' },\n { latex: '\\\\upsilon' },\n { latex: '\\\\varphi' },\n { latex: '\\\\chi' },\n { latex: '\\\\psi' },\n { latex: '\\\\omega' },\n { latex: '\\\\epsilon' },\n { latex: '\\\\theta' },\n { latex: '\\\\phi' },\n { latex: '\\\\varsigma' },\n { latex: '\\\\Alpha' },\n { latex: '\\\\Beta' },\n { latex: '\\\\Gamma' },\n { latex: '\\\\Delta' },\n { latex: '\\\\Epsilon' },\n { latex: '\\\\Zeta' },\n { latex: '\\\\Eta' },\n { latex: '\\\\Theta' },\n { latex: '\\\\Iota' },\n { latex: '\\\\Kappa' },\n { latex: '\\\\Lambda' },\n { latex: '\\\\Mu' },\n { latex: '\\\\Nu' },\n { latex: '\\\\Xi' },\n { latex: '\\\\Omicron' },\n { latex: '\\\\Pi' },\n { latex: '\\\\Rho' },\n { latex: '\\\\Sigma' },\n { latex: '\\\\Tau' },\n { latex: '\\\\Upsilon' },\n { latex: '\\\\Phi' },\n { latex: '\\\\Chi' },\n { latex: '\\\\Psi' },\n { latex: '\\\\Omega' },\n ],\n },\n]","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-567417d3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"transform\"]\nconst _hoisted_3 = [\"d\"]\n\nimport { computed, ref, watch } from 'vue'\nimport { hfmath } from './hfmath'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FormulaContent',\n props: {\n latex: {},\n width: {},\n height: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst box = ref({ x: 0, y: 0, w: 0, h: 0 })\nconst pathd = ref('')\n\nwatch(() => props.latex, () => {\n const eq = new hfmath(props.latex)\n pathd.value = eq.pathd({})\n box.value = eq.box({})\n}, { immediate: true })\n\nconst scale = computed(() => {\n const boxW = box.value.w + 32\n const boxH = box.value.h + 32\n\n if (boxW > props.width || boxH > props.height) {\n if (boxW / boxH > props.width / props.height) return props.width / boxW\n return props.height / boxH\n }\n return 1\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", {\n class: \"formula-content\",\n overflow: \"visible\",\n width: box.value.w + 32,\n height: box.value.h + 32,\n stroke: \"#000\",\n \"stroke-width\": \"1\",\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${scale.value}, ${scale.value}) translate(0,0) matrix(1,0,0,1,0,0)`,\n \"transform-origin\": \"0 50%\"\n }, [\n _createElementVNode(\"path\", { d: pathd.value }, null, 8, _hoisted_3)\n ], 8, _hoisted_2)\n ], 8, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./FormulaContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FormulaContent.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FormulaContent.vue?vue&type=style&index=0&id=567417d3&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-567417d3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport { hfmath } from './hfmath'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SymbolContent',\n props: {\n latex: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst svg = computed(() => {\n const eq = new hfmath(props.latex)\n return eq.svg({\n SCALE_X: 10,\n SCALE_Y: 10,\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"symbol-content\",\n innerHTML: svg.value\n }, null, 8, _hoisted_1))\n}\n}\n\n})","\n\n\n","import script from \"./SymbolContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SymbolContent.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-326ac8a0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\", \"value\", \"rows\", \"placeholder\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TextArea',\n props: {\n value: {},\n rows: { default: 4 },\n disabled: { type: Boolean, default: false },\n resizable: { type: Boolean, default: false },\n placeholder: { default: '' }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nconst handleInput = (e: Event) => {\n emit('update:value', (e.target as HTMLInputElement).value)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"textarea\", {\n class: _normalizeClass([\"textarea\", {\n 'disabled': _ctx.disabled,\n 'resizable': _ctx.resizable,\n }]),\n disabled: _ctx.disabled,\n value: _ctx.value,\n rows: _ctx.rows,\n placeholder: _ctx.placeholder,\n onInput: _cache[0] || (_cache[0] = $event => handleInput($event))\n }, null, 42, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./TextArea.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TextArea.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./TextArea.vue?vue&type=style&index=0&id=326ac8a0&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-326ac8a0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-46e48b5e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"latex-editor\" }\nconst _hoisted_2 = { class: \"container\" }\nconst _hoisted_3 = { class: \"left\" }\nconst _hoisted_4 = { class: \"input-area\" }\nconst _hoisted_5 = { class: \"preview\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"placeholder\"\n}\nconst _hoisted_7 = {\n key: 1,\n class: \"preview-content\"\n}\nconst _hoisted_8 = { class: \"right\" }\nconst _hoisted_9 = { class: \"content\" }\nconst _hoisted_10 = {\n key: 0,\n class: \"symbol\"\n}\nconst _hoisted_11 = { class: \"symbol-pool\" }\nconst _hoisted_12 = [\"onClick\"]\nconst _hoisted_13 = {\n key: 1,\n class: \"formula\"\n}\nconst _hoisted_14 = { class: \"formula-title\" }\nconst _hoisted_15 = [\"onClick\"]\nconst _hoisted_16 = { class: \"footer\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { hfmath } from './hfmath'\nimport { FORMULA_LIST, SYMBOL_LIST } from '@/configs/latex'\nimport message from '@/utils/message'\n\nimport FormulaContent from './FormulaContent.vue'\nimport SymbolContent from './SymbolContent.vue'\nimport Button from '../Button.vue'\nimport TextArea from '../TextArea.vue'\nimport Tabs from '../Tabs.vue'\n\ninterface TabItem {\n key: 'symbol' | 'formula'\n label: string\n}\n\ninterface LatexResult {\n latex: string\n path: string\n w: number\n h: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n value: { default: '' }\n },\n emits: [\"update\", \"close\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\nconst tabs: TabItem[] = [\n { label: '常用符号', key: 'symbol' },\n { label: '预置公式', key: 'formula' },\n]\n\n\n\n\n\nconst formulaList = FORMULA_LIST\n\nconst symbolTabs = SYMBOL_LIST.map(item => ({\n label: item.label,\n key: item.type,\n}))\n\nconst latex = ref('')\nconst toolbarState = ref<'symbol' | 'formula'>('symbol')\nconst textAreaRef = ref()\n\nconst selectedSymbolKey = ref(SYMBOL_LIST[0].type)\nconst symbolPool = computed(() => {\n const selectedSymbol = SYMBOL_LIST.find(item => item.type === selectedSymbolKey.value)\n return selectedSymbol?.children || []\n})\n\nonMounted(() => {\n if (props.value) latex.value = props.value\n})\n\nconst update = () => {\n if (!latex.value) return message.error('公式不能为空')\n\n const eq = new hfmath(latex.value)\n const pathd = eq.pathd({})\n const box = eq.box({})\n \n emit('update', {\n latex: latex.value,\n path: pathd,\n w: box.w + 32,\n h: box.h + 32,\n })\n}\n\nconst insertSymbol = (latex: string) => {\n if (!textAreaRef.value) return\n textAreaRef.value.focus()\n document.execCommand('insertText', false, latex)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(TextArea, {\n value: latex.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((latex).value = $event)),\n placeholder: \"输入 LaTeX 公式\",\n ref_key: \"textAreaRef\",\n ref: textAreaRef\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n (!latex.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"公式预览\"))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createVNode(FormulaContent, {\n width: 518,\n height: 138,\n latex: latex.value\n }, null, 8, [\"latex\"])\n ]))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: toolbarState.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((toolbarState).value = $event)),\n card: \"\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_9, [\n (toolbarState.value === 'symbol')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _createVNode(Tabs, {\n tabs: _unref(symbolTabs),\n value: selectedSymbolKey.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((selectedSymbolKey).value = $event)),\n spaceBetween: \"\",\n tabsStyle: { margin: '10px 10px 0' }\n }, null, 8, [\"tabs\", \"value\"]),\n _createElementVNode(\"div\", _hoisted_11, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(symbolPool.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"symbol-item\",\n key: item.latex,\n onClick: ($event: any) => (insertSymbol(item.latex))\n }, [\n _createVNode(SymbolContent, {\n latex: item.latex\n }, null, 8, [\"latex\"])\n ], 8, _hoisted_12))\n }), 128))\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(formulaList), (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"formula-item\",\n key: item.label\n }, [\n _createElementVNode(\"div\", _hoisted_14, _toDisplayString(item.label), 1),\n _createElementVNode(\"div\", {\n class: \"formula-item-content\",\n onClick: ($event: any) => (latex.value =item.latex)\n }, [\n _createVNode(FormulaContent, {\n width: 236,\n height: 60,\n latex: item.latex\n }, null, 8, [\"latex\"])\n ], 8, _hoisted_15)\n ]))\n }), 128))\n ]))\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(Button, {\n class: \"btn\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn\",\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (update()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确定\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./SlideToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SlideToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./SlideToolbar.vue?vue&type=style&index=0&id=24150aba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-24150aba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-f3d1ac70\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-toolbar\" }\nconst _hoisted_2 = { class: \"content\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"style\"\n}\nconst _hoisted_4 = { class: \"row-block\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"文字颜色:\", -1))\nconst _hoisted_6 = { class: \"colors\" }\nconst _hoisted_7 = [\"onClick\"]\nconst _hoisted_8 = { class: \"row-block\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"填充色:\", -1))\nconst _hoisted_10 = { class: \"colors\" }\nconst _hoisted_11 = [\"onClick\"]\nconst _hoisted_12 = {\n key: 1,\n class: \"common\"\n}\n\nimport { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, TableCell } from '@/types/slides'\nimport { ElementAlignCommands, ElementOrderCommands } from '@/types/edit'\nimport emitter, { EmitterEvents } from '@/utils/emitter'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport CheckboxButton from '@/components/CheckboxButton.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Divider from '@/components/Divider.vue'\nimport Button from '@/components/Button.vue'\nimport ButtonGroup from '@/components/ButtonGroup.vue'\nimport RadioButton from '@/components/RadioButton.vue'\nimport RadioGroup from '@/components/RadioGroup.vue'\n\ninterface TabItem {\n key: 'style' | 'common'\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementToolbar',\n setup(__props) {\n\nconst colors = ['#000000', '#ffffff', '#eeece1', '#1e497b', '#4e81bb', '#e2534d', '#9aba60', '#8165a0', '#47acc5', '#f9974c', '#c21401', '#ff1e02', '#ffc12a', '#ffff3a', '#90cf5b', '#00af57']\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElement, handleElementId, richTextAttrs } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst updateElement = (id: string, props: Partial) => {\n slidesStore.updateElement({ id, props })\n addHistorySnapshot()\n}\n\nconst tabs: TabItem[] = [\n { key: 'style', label: '样式' },\n { key: 'common', label: '布局' },\n]\nconst activeTab = ref('common')\n\nconst { orderElement } = useOrderElement()\nconst { alignElementToCanvas } = useAlignElementToCanvas()\nconst { addElementsFromData } = useAddSlidesOrElements()\nconst { deleteElement } = useDeleteElement()\n\nconst copyElement = () => {\n const element: PPTElement = JSON.parse(JSON.stringify(handleElement.value))\n addElementsFromData([element])\n}\n\nconst emitRichTextCommand = (command: string, value?: string) => {\n emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command, value } })\n}\n\nconst updateFontColor = (color: string) => {\n if (!handleElement.value) return\n if (handleElement.value.type === 'text' || (handleElement.value.type === 'shape' && handleElement.value.text?.content)) {\n emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command: 'color', value: color } })\n }\n if (handleElement.value.type === 'table') {\n const data: TableCell[][] = JSON.parse(JSON.stringify(handleElement.value.data))\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n const style = data[i][j].style || {}\n data[i][j].style = { ...style, color }\n }\n }\n updateElement(handleElementId.value, { data })\n }\n if (handleElement.value.type === 'latex') {\n updateElement(handleElementId.value, { color })\n }\n}\n\nconst updateFill = (color: string) => {\n if (!handleElement.value) return\n if (\n handleElement.value.type === 'text' ||\n handleElement.value.type === 'shape' ||\n handleElement.value.type === 'chart'\n ) updateElement(handleElementId.value, { fill: color })\n\n if (handleElement.value.type === 'table') {\n const data: TableCell[][] = JSON.parse(JSON.stringify(handleElement.value.data))\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n const style = data[i][j].style || {}\n data[i][j].style = { ...style, backcolor: color }\n }\n }\n updateElement(handleElementId.value, { data })\n }\n\n if (handleElement.value.type === 'audio') updateElement(handleElementId.value, { color })\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconTextBold = _resolveComponent(\"IconTextBold\")!\n const _component_IconTextItalic = _resolveComponent(\"IconTextItalic\")!\n const _component_IconTextUnderline = _resolveComponent(\"IconTextUnderline\")!\n const _component_IconStrikethrough = _resolveComponent(\"IconStrikethrough\")!\n const _component_IconFontSize = _resolveComponent(\"IconFontSize\")!\n const _component_IconAlignTextLeft = _resolveComponent(\"IconAlignTextLeft\")!\n const _component_IconAlignTextCenter = _resolveComponent(\"IconAlignTextCenter\")!\n const _component_IconAlignTextRight = _resolveComponent(\"IconAlignTextRight\")!\n const _component_IconCopy = _resolveComponent(\"IconCopy\")!\n const _component_IconDelete = _resolveComponent(\"IconDelete\")!\n const _component_IconSendToBack = _resolveComponent(\"IconSendToBack\")!\n const _component_IconBringToFrontOne = _resolveComponent(\"IconBringToFrontOne\")!\n const _component_IconBringToFront = _resolveComponent(\"IconBringToFront\")!\n const _component_IconSentToBack = _resolveComponent(\"IconSentToBack\")!\n const _component_IconAlignLeft = _resolveComponent(\"IconAlignLeft\")!\n const _component_IconAlignVertically = _resolveComponent(\"IconAlignVertically\")!\n const _component_IconAlignRight = _resolveComponent(\"IconAlignRight\")!\n const _component_IconAlignTop = _resolveComponent(\"IconAlignTop\")!\n const _component_IconAlignHorizontally = _resolveComponent(\"IconAlignHorizontally\")!\n const _component_IconAlignBottom = _resolveComponent(\"IconAlignBottom\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: activeTab.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((activeTab).value = $event)),\n tabsStyle: { marginBottom: '8px' },\n tabStyle: {\n width: '30%',\n margin: '0 10%',\n }\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n (activeTab.value === 'style')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).bold,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emitRichTextCommand('bold')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextBold)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).em,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emitRichTextCommand('em')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextItalic)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).underline,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emitRichTextCommand('underline')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextUnderline)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).strikethrough,\n onClick: _cache[4] || (_cache[4] = ($event: any) => (emitRichTextCommand('strikethrough')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconStrikethrough)\n ]),\n _: 1\n }, 8, [\"checked\"])\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emitRichTextCommand('fontsize-add')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize),\n _createTextVNode(\"+\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emitRichTextCommand('fontsize-reduce')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize),\n _createTextVNode(\"-\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(RadioGroup, {\n class: \"row\",\n \"button-style\": \"solid\",\n value: _unref(richTextAttrs).align,\n \"onUpdate:value\": _cache[7] || (_cache[7] = value => emitRichTextCommand('align', value))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n value: \"left\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextLeft)\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n value: \"center\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextCenter)\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n value: \"right\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextRight)\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createElementVNode(\"div\", _hoisted_6, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(colors, (color) => {\n return _createElementVNode(\"div\", {\n class: \"color\",\n key: color,\n onClick: ($event: any) => (updateFontColor(color))\n }, [\n _createElementVNode(\"div\", {\n class: \"color-block\",\n style: _normalizeStyle({ backgroundColor: color })\n }, null, 4)\n ], 8, _hoisted_7)\n }), 64))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createElementVNode(\"div\", _hoisted_10, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(colors, (color) => {\n return _createElementVNode(\"div\", {\n class: \"color\",\n key: color,\n onClick: ($event: any) => (updateFill(color))\n }, [\n _createElementVNode(\"div\", {\n class: \"color-block\",\n style: _normalizeStyle({ backgroundColor: color })\n }, null, 4)\n ], 8, _hoisted_11)\n }), 64))\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (activeTab.value === 'common')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[8] || (_cache[8] = ($event: any) => (copyElement()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconCopy, { class: \"icon\" }),\n _createTextVNode(\" 复制\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[9] || (_cache[9] = ($event: any) => (_unref(deleteElement)()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconDelete, { class: \"icon\" }),\n _createTextVNode(\" 删除\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[10] || (_cache[10] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).TOP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSendToBack, { class: \"icon\" }),\n _createTextVNode(\" 置顶\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[11] || (_cache[11] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).BOTTOM)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconBringToFrontOne, { class: \"icon\" }),\n _createTextVNode(\" 置底\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).UP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconBringToFront, { class: \"icon\" }),\n _createTextVNode(\" 上移\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).DOWN)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSentToBack, { class: \"icon\" }),\n _createTextVNode(\" 下移\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[14] || (_cache[14] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).LEFT)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignLeft, { class: \"icon\" }),\n _createTextVNode(\" 左对齐\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[15] || (_cache[15] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).HORIZONTAL)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignVertically, { class: \"icon\" }),\n _createTextVNode(\" 水平居中\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[16] || (_cache[16] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).RIGHT)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignRight, { class: \"icon\" }),\n _createTextVNode(\" 右对齐\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[17] || (_cache[17] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).TOP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTop, { class: \"icon\" }),\n _createTextVNode(\" 上对齐\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[18] || (_cache[18] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).VERTICAL)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignHorizontally, { class: \"icon\" }),\n _createTextVNode(\" 垂直居中\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[19] || (_cache[19] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).BOTTOM)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignBottom, { class: \"icon\" }),\n _createTextVNode(\" 下对齐\")\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementToolbar.vue?vue&type=style&index=0&id=f3d1ac70&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f3d1ac70\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5c34ab81\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-editor-header\" }\nconst _hoisted_2 = { class: \"history\" }\n\nimport { storeToRefs } from 'pinia'\nimport { useSnapshotStore } from '@/store'\nimport type { Mode } from '@/types/mobile'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Header',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst { canUndo, canRedo } = storeToRefs(useSnapshotStore())\nconst { redo, undo } = useHistorySnapshot()\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconBack = _resolveComponent(\"IconBack\")!\n const _component_IconNext = _resolveComponent(\"IconNext\")!\n const _component_IconLogout = _resolveComponent(\"IconLogout\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"history-item\", { 'disable': !_unref(canUndo) }]),\n onClick: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (_unref(undo)()), [\"stop\"]))\n }, [\n _createVNode(_component_IconBack),\n _createTextVNode(\" 撤销\")\n ], 2),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"history-item\", { 'disable': !_unref(canRedo) }]),\n onClick: _cache[1] || (_cache[1] = _withModifiers(($event: any) => (_unref(redo)()), [\"stop\"]))\n }, [\n _createVNode(_component_IconNext),\n _createTextVNode(\" 重做\")\n ], 2)\n ]),\n _createElementVNode(\"div\", {\n class: \"back\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.changeMode('preview')))\n }, [\n _createVNode(_component_IconLogout),\n _createTextVNode(\" 退出编辑\")\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Header.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Header.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Header.vue?vue&type=style&index=0&id=5c34ab81&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5c34ab81\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3756d058\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-editor\" }\n\nimport { computed, onMounted, ref, watchEffect } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps } from '@/types/edit'\nimport type { Mode } from '@/types/mobile'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\nimport useDragElement from '@/views/Editor/Canvas/hooks/useDragElement'\nimport useScaleElement from '@/views/Editor/Canvas/hooks/useScaleElement'\nimport useRotateElement from '@/views/Editor/Canvas/hooks/useRotateElement'\n\nimport AlignmentLine from '@/views/Editor/Canvas/AlignmentLine.vue'\nimport MobileEditableElement from './MobileEditableElement.vue'\nimport MobileOperate from './MobileOperate.vue'\nimport SlideToolbar from './SlideToolbar.vue'\nimport ElementToolbar from './ElementToolbar.vue'\nimport Header from './Header.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst slidesStore = useSlidesStore()\nconst mainStore = useMainStore()\nconst { slideIndex, currentSlide, viewportRatio } = storeToRefs(slidesStore)\nconst { activeElementIdList, handleElement } = storeToRefs(mainStore)\n\nconst contentRef = ref()\nconst viewportRef = ref()\n\nconst alignmentLines = ref([])\n\nconst background = computed(() => currentSlide.value.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst canvasScale = computed(() => {\n if (!contentRef.value) return 1\n const contentWidth = contentRef.value.clientWidth\n const contentheight = contentRef.value.clientHeight\n\n const contentRatio = contentheight / contentWidth\n if (contentRatio >= viewportRatio.value) return (contentWidth - 20) / VIEWPORT_SIZE\n return (contentheight - 20) / viewportRatio.value / VIEWPORT_SIZE\n})\n\nonMounted(() => {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n if (slideIndex.value !== 0) slidesStore.updateSlideIndex(0)\n})\n\nconst viewportStyles = computed(() => ({\n width: VIEWPORT_SIZE * canvasScale.value + 'px',\n height: VIEWPORT_SIZE * viewportRatio.value * canvasScale.value + 'px',\n}))\n\nconst elementList = ref([])\nconst setLocalElementList = () => {\n elementList.value = currentSlide.value ? JSON.parse(JSON.stringify(currentSlide.value.elements)) : []\n}\nwatchEffect(setLocalElementList)\n\nconst { dragElement } = useDragElement(elementList, alignmentLines, canvasScale)\nconst { scaleElement } = useScaleElement(elementList, alignmentLines, canvasScale)\nconst { rotateElement } = useRotateElement(elementList, viewportRef, canvasScale)\n\nconst selectElement = (e: TouchEvent, element: PPTElement, startMove = true) => {\n if (!activeElementIdList.value.includes(element.id)) {\n mainStore.setActiveElementIdList([element.id])\n mainStore.setHandleElementId(element.id)\n }\n if (startMove) dragElement(e, element)\n}\n\nconst handleClickBlankArea = () => {\n mainStore.setActiveElementIdList([])\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Header, { changeMode: _ctx.changeMode }, null, 8, [\"changeMode\"]),\n _createElementVNode(\"div\", {\n class: \"content\",\n ref_key: \"contentRef\",\n ref: contentRef,\n onTouchstart: _cache[0] || (_cache[0] = ($event: any) => (handleClickBlankArea()))\n }, [\n _createElementVNode(\"div\", {\n class: \"viewport-wrapper\",\n style: _normalizeStyle(viewportStyles.value)\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alignmentLines.value, (line, index) => {\n return (_openBlock(), _createBlock(AlignmentLine, {\n key: index,\n type: line.type,\n axis: line.axis,\n length: line.length,\n canvasScale: canvasScale.value\n }, null, 8, [\"type\", \"axis\", \"length\", \"canvasScale\"]))\n }), 128)),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: element.id\n }, [\n (element.type !== 'line')\n ? (_openBlock(), _createBlock(MobileOperate, {\n key: 0,\n elementInfo: element,\n isSelected: _unref(activeElementIdList).includes(element.id),\n canvasScale: canvasScale.value,\n scaleElement: _unref(scaleElement),\n rotateElement: _unref(rotateElement)\n }, null, 8, [\"elementInfo\", \"isSelected\", \"canvasScale\", \"scaleElement\", \"rotateElement\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n }), 128)),\n _createElementVNode(\"div\", {\n class: \"viewport\",\n ref_key: \"viewportRef\",\n ref: viewportRef,\n style: _normalizeStyle({ transform: `scale(${canvasScale.value})` })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element, index) => {\n return (_openBlock(), _createBlock(MobileEditableElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n selectElement: selectElement\n }, null, 8, [\"elementInfo\", \"elementIndex\"]))\n }), 128))\n ], 4)\n ], 4)\n ], 544),\n _createVNode(SlideToolbar),\n (_unref(handleElement))\n ? (_openBlock(), _createBlock(ElementToolbar, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=3756d058&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3756d058\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-62f26eba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Mode } from '@/types/mobile'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport MobileThumbnails from './MobileThumbnails.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobilePlayer',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst slidesStore = useSlidesStore()\nconst { slides, slideIndex, currentSlide, viewportRatio } = storeToRefs(slidesStore)\n\nconst toolVisible = ref(false)\n\nconst playerSize = ref({ width: 0, height: 0 })\n\nonMounted(() => {\n if (slideIndex.value !== 0) slidesStore.updateSlideIndex(0)\n\n playerSize.value = {\n width: document.body.clientHeight,\n height: document.body.clientWidth,\n }\n})\n\nconst slideSize = computed(() => {\n const playerRatio = playerSize.value.height / playerSize.value.width\n\n let slideWidth = 0\n let slideHeight = 0\n\n if (playerRatio >= viewportRatio.value) {\n slideWidth = playerSize.value.width\n slideHeight = slideWidth * viewportRatio.value\n }\n else {\n slideHeight = playerSize.value.height\n slideWidth = slideHeight / viewportRatio.value\n }\n\n return {\n width: slideWidth,\n height: slideHeight,\n }\n})\n\nconst touchInfo = ref<{ x: number; y: number; } | null>(null)\nconst touchStartListener = (e: TouchEvent) => {\n touchInfo.value = {\n x: e.changedTouches[0].pageX,\n y: e.changedTouches[0].pageY,\n }\n}\nconst touchEndListener = (e: TouchEvent) => {\n if (!touchInfo.value) return\n\n const offsetY = Math.abs(touchInfo.value.y - e.changedTouches[0].pageY)\n const offsetX = e.changedTouches[0].pageX - touchInfo.value.x\n\n if ( Math.abs(offsetX) > offsetY && Math.abs(offsetX) > 50 ) {\n touchInfo.value = null\n\n if (offsetX < 0 && slideIndex.value > 0) slidesStore.updateSlideIndex(slideIndex.value - 1)\n if (offsetX > 0 && slideIndex.value < slides.value.length - 1) slidesStore.updateSlideIndex(slideIndex.value + 1)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconLogout = _resolveComponent(\"IconLogout\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-player\",\n style: _normalizeStyle({\n width: playerSize.value.width + 'px',\n height: playerSize.value.height + 'px',\n transform: `rotate(90deg) translateY(-${playerSize.value.height}px)`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"screen-slide-list\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (toolVisible.value = !toolVisible.value)),\n onTouchstart: _cache[1] || (_cache[1] = $event => touchStartListener($event)),\n onTouchend: _cache[2] || (_cache[2] = $event => touchEndListener($event))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\n 'slide-item', \n `turning-mode-${slide.turningMode || 'slideY'}`,\n {\n 'current': index === _unref(slideIndex),\n 'before': index < _unref(slideIndex),\n 'after': index > _unref(slideIndex),\n 'hide': (index === _unref(slideIndex) - 1 || index === _unref(slideIndex) + 1) && slide.turningMode !== _unref(currentSlide).turningMode,\n }\n ]),\n key: slide.id\n }, [\n (Math.abs(_unref(slideIndex) - index) < 2)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"slide-content\",\n style: _normalizeStyle({\n width: slideSize.value.width + 'px',\n height: slideSize.value.height + 'px',\n })\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: slideSize.value.width\n }, null, 8, [\"slide\", \"size\"])\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 2))\n }), 128))\n ], 32),\n (toolVisible.value)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"back\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (_ctx.changeMode('preview')))\n }, [\n _createVNode(_component_IconLogout),\n _createTextVNode(\" 退出播放\")\n ])\n ]),\n _createVNode(MobileThumbnails, { class: \"thumbnails\" })\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MobilePlayer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobilePlayer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobilePlayer.vue?vue&type=style&index=0&id=62f26eba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-62f26eba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-53dd42dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"thumbnail-list\" }\nconst _hoisted_2 = { class: \"menu\" }\n\nimport { onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useLoadSlides from '@/hooks/useLoadSlides'\nimport type { Mode } from '@/types/mobile'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobilePreview',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst { slides } = storeToRefs(useSlidesStore())\nconst { slidesLoadLimit } = useLoadSlides()\n\nconst mobileRef = ref()\nconst screenWidth = ref(0)\n\nonMounted(() => {\n if (!mobileRef.value) return\n screenWidth.value = mobileRef.value.clientWidth\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconEdit = _resolveComponent(\"IconEdit\")!\n const _component_IconFullScreenPlay = _resolveComponent(\"IconFullScreenPlay\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-preview\",\n ref_key: \"mobileRef\",\n ref: mobileRef\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"thumbnail-item\",\n key: slide.id\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: screenWidth.value - 20,\n visible: index < _unref(slidesLoadLimit)\n }, null, 8, [\"slide\", \"size\", \"visible\"])\n ]))\n }), 128))\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"menu-item\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.changeMode('editor')))\n }, [\n _createVNode(_component_IconEdit, { class: \"icon\" }),\n _createTextVNode(\" 编辑\")\n ]),\n _createVNode(Divider, {\n type: \"vertical\",\n style: {\"height\":\"30px\"}\n }),\n _createElementVNode(\"div\", {\n class: \"menu-item\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.changeMode('player')))\n }, [\n _createVNode(_component_IconFullScreenPlay, { class: \"icon\" }),\n _createTextVNode(\" 播放\")\n ])\n ])\n ], 512))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./MobilePreview.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobilePreview.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobilePreview.vue?vue&type=style&index=0&id=53dd42dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53dd42dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-9826ff08\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile\" }\n\nimport { computed, ref } from 'vue'\nimport type { Mode } from '@/types/mobile'\n\nimport MobileEditor from './MobileEditor/index.vue'\nimport MobilePlayer from './MobilePlayer.vue'\nimport MobilePreview from './MobilePreview.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mode = ref('preview')\n \nconst changeMode = (_mode: Mode) => mode.value = _mode\n\nconst currentComponent = computed(() => {\n const componentMap = {\n 'editor': MobileEditor,\n 'player': MobilePlayer,\n 'preview': MobilePreview,\n }\n return componentMap[mode.value] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentComponent.value), { changeMode: changeMode }))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=9826ff08&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-9826ff08\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { onMounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useScreenStore, useMainStore, useSnapshotStore } from '@/store'\nimport { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'\nimport { deleteDiscardedDB } from '@/utils/database'\nimport { isPC } from './utils/common'\n\nimport Editor from './views/Editor/index.vue'\nimport Screen from './views/Screen/index.vue'\nimport Mobile from './views/Mobile/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'App',\n setup(__props) {\n\nconst _isPC = isPC()\n\nconst mainStore = useMainStore()\nconst snapshotStore = useSnapshotStore()\nconst { databaseId } = storeToRefs(mainStore)\nconst { screening } = storeToRefs(useScreenStore())\n\nif (process.env.NODE_ENV === 'production') {\n window.onbeforeunload = () => false\n}\n\nonMounted(async () => {\n await deleteDiscardedDB()\n snapshotStore.initSnapshotDatabase()\n mainStore.setAvailableFonts()\n})\n\n// 应用注销时向 localStorage 中记录下本次 indexedDB 的数据库ID,用于之后清除数据库\nwindow.addEventListener('unload', () => {\n const discardedDB = localStorage.getItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n const discardedDBList: string[] = discardedDB ? JSON.parse(discardedDB) : []\n\n discardedDBList.push(databaseId.value)\n\n const newDiscardedDB = JSON.stringify(discardedDBList)\n localStorage.setItem(LOCALSTORAGE_KEY_DISCARDED_DB, newDiscardedDB)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(screening))\n ? (_openBlock(), _createBlock(Screen, { key: 0 }))\n : (_unref(_isPC))\n ? (_openBlock(), _createBlock(Editor, { key: 1 }))\n : (_openBlock(), _createBlock(Mobile, { key: 2 }))\n}\n}\n\n})","\n\n\n\n","import script from \"./App.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./App.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./App.vue?vue&type=style&index=0&id=685e8c72&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","/* eslint-disable no-console */\n\nimport { register } from 'register-service-worker'\n\nif (process.env.NODE_ENV === 'production') {\n register(`${process.env.BASE_URL}service-worker.js`, {\n ready() {\n console.log(\n 'App is being served from cache by a service worker.\\n' +\n 'For more details, visit https://goo.gl/AFskqB'\n )\n },\n registered() {\n console.log('Service worker has been registered.')\n },\n cached() {\n console.log('Content has been cached for offline use.')\n },\n updatefound() {\n console.log('New content is downloading.')\n },\n updated() {\n console.log('New content is available; please refresh.')\n },\n offline() {\n console.log('No internet connection found. App is running in offline mode.')\n },\n error(error) {\n console.error('Error during service worker registration:', error)\n }\n })\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-77e74b43\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"menu-content\" }\nconst _hoisted_2 = [\"onClick\"]\nconst _hoisted_3 = { class: \"text\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"sub-text\"\n}\n\nimport type { ContextmenuItem } from './types'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MenuContent',\n props: {\n menus: {},\n handleClickMenuItem: { type: Function }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n const _component_menu_content = _resolveComponent(\"menu-content\", true)!\n\n return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.menus, (menu, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: menu.text || index\n }, [\n (!menu.hide)\n ? (_openBlock(), _createElementBlock(\"li\", {\n key: 0,\n class: _normalizeClass([\"menu-item\", {'divider': menu.divider, 'disable': menu.disable}]),\n onClick: _withModifiers(($event: any) => (_ctx.handleClickMenuItem(menu)), [\"stop\"])\n }, [\n (!menu.divider)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"menu-item-content\", {\n 'has-children': menu.children,\n 'has-handler': menu.handler,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(menu.text), 1),\n (menu.subText && !menu.children)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(menu.subText), 1))\n : _createCommentVNode(\"\", true),\n (menu.children && menu.children.length)\n ? (_openBlock(), _createBlock(_component_menu_content, {\n key: 1,\n class: \"sub-menu\",\n menus: menu.children,\n handleClickMenuItem: _ctx.handleClickMenuItem\n }, null, 8, [\"menus\", \"handleClickMenuItem\"]))\n : _createCommentVNode(\"\", true)\n ], 2))\n : _createCommentVNode(\"\", true)\n ], 10, _hoisted_2))\n : _createCommentVNode(\"\", true)\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./MenuContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MenuContent.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MenuContent.vue?vue&type=style&index=0&id=77e74b43&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-77e74b43\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { ContextmenuItem, Axis } from './types'\n\nimport MenuContent from './MenuContent.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n axis: {},\n el: {},\n menus: {},\n removeContextmenu: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst style = computed(() => {\n const MENU_WIDTH = 170\n const MENU_HEIGHT = 30\n const DIVIDER_HEIGHT = 11\n const PADDING = 5\n\n const { x, y } = props.axis\n const menuCount = props.menus.filter(menu => !(menu.divider || menu.hide)).length\n const dividerCount = props.menus.filter(menu => menu.divider).length\n\n const menuWidth = MENU_WIDTH\n const menuHeight = menuCount * MENU_HEIGHT + dividerCount * DIVIDER_HEIGHT + PADDING * 2\n\n const screenWidth = document.body.clientWidth\n const screenHeight = document.body.clientHeight\n\n return {\n left: screenWidth <= x + menuWidth ? x - menuWidth : x,\n top: screenHeight <= y + menuHeight ? y - menuHeight : y,\n }\n})\n\nconst handleClickMenuItem = (item: ContextmenuItem) => {\n if (item.disable) return\n if (item.children && !item.handler) return\n if (item.handler) item.handler(props.el)\n props.removeContextmenu()\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n class: \"mask\",\n onContextmenu: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (_ctx.removeContextmenu()), [\"prevent\"])),\n onMousedown: _cache[1] || (_cache[1] = ($event: any) => (_ctx.removeContextmenu()))\n }, null, 32),\n _createElementVNode(\"div\", {\n class: \"contextmenu\",\n style: _normalizeStyle({\n left: style.value.left + 'px',\n top: style.value.top + 'px',\n }),\n onContextmenu: _cache[2] || (_cache[2] = _withModifiers(() => {}, [\"prevent\"]))\n }, [\n _createVNode(MenuContent, {\n menus: _ctx.menus,\n handleClickMenuItem: handleClickMenuItem\n }, null, 8, [\"menus\"])\n ], 36)\n ], 64))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1abfab1d&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { type Directive, type DirectiveBinding, createVNode, render } from 'vue'\nimport ContextmenuComponent from '@/components/Contextmenu/index.vue'\n\nconst CTX_CONTEXTMENU_HANDLER = 'CTX_CONTEXTMENU_HANDLER'\n\ninterface CustomHTMLElement extends HTMLElement {\n [CTX_CONTEXTMENU_HANDLER]?: (event: MouseEvent) => void\n} \n\nconst contextmenuListener = (el: HTMLElement, event: MouseEvent, binding: DirectiveBinding) => {\n event.stopPropagation()\n event.preventDefault()\n\n const menus = binding.value(el)\n if (!menus) return\n\n let container: HTMLDivElement | null = null\n\n // 移除右键菜单并取消相关的事件监听\n const removeContextmenu = () => {\n if (container) {\n document.body.removeChild(container)\n container = null\n }\n el.classList.remove('contextmenu-active')\n document.body.removeEventListener('scroll', removeContextmenu) \n window.removeEventListener('resize', removeContextmenu)\n }\n\n // 创建自定义菜单\n const options = {\n axis: { x: event.x, y: event.y },\n el,\n menus,\n removeContextmenu,\n }\n container = document.createElement('div')\n const vm = createVNode(ContextmenuComponent, options, null)\n render(vm, container)\n document.body.appendChild(container)\n\n // 为目标节点添加菜单激活状态的className\n el.classList.add('contextmenu-active')\n\n // 页面变化时移除菜单\n document.body.addEventListener('scroll', removeContextmenu)\n window.addEventListener('resize', removeContextmenu)\n}\n\nconst ContextmenuDirective: Directive = {\n mounted(el: CustomHTMLElement, binding) {\n el[CTX_CONTEXTMENU_HANDLER] = (event: MouseEvent) => contextmenuListener(el, event, binding)\n el.addEventListener('contextmenu', el[CTX_CONTEXTMENU_HANDLER])\n },\n\n unmounted(el: CustomHTMLElement) {\n if (el && el[CTX_CONTEXTMENU_HANDLER]) {\n el.removeEventListener('contextmenu', el[CTX_CONTEXTMENU_HANDLER])\n delete el[CTX_CONTEXTMENU_HANDLER]\n }\n },\n}\n\nexport default ContextmenuDirective","import type { Directive, DirectiveBinding } from 'vue'\n\nconst CTX_CLICK_OUTSIDE_HANDLER = 'CTX_CLICK_OUTSIDE_HANDLER'\n\ninterface CustomHTMLElement extends HTMLElement {\n [CTX_CLICK_OUTSIDE_HANDLER]?: (event: MouseEvent) => void\n} \n\nconst clickListener = (el: HTMLElement, event: MouseEvent, binding: DirectiveBinding) => {\n const handler = binding.value\n\n const path = event.composedPath()\n const isClickOutside = path ? path.indexOf(el) < 0 : !el.contains(event.target as HTMLElement)\n\n if (!isClickOutside) return\n handler(event)\n}\n\nconst ClickOutsideDirective: Directive = {\n mounted(el: CustomHTMLElement, binding) {\n el[CTX_CLICK_OUTSIDE_HANDLER] = (event: MouseEvent) => clickListener(el, event, binding)\n setTimeout(() => {\n document.addEventListener('click', el[CTX_CLICK_OUTSIDE_HANDLER]!)\n }, 0)\n },\n \n unmounted(el: CustomHTMLElement) {\n if (el[CTX_CLICK_OUTSIDE_HANDLER]) {\n document.removeEventListener('click', el[CTX_CLICK_OUTSIDE_HANDLER])\n delete el[CTX_CLICK_OUTSIDE_HANDLER]\n }\n },\n}\n\nexport default ClickOutsideDirective","import type { Directive, DirectiveBinding } from 'vue'\nimport tippy, { type Instance, type Placement } from 'tippy.js'\n\nimport './tooltip.scss'\n\nconst TOOLTIP_INSTANCE = 'TOOLTIP_INSTANCE'\n\ninterface CustomHTMLElement extends HTMLElement {\n [TOOLTIP_INSTANCE]?: Instance\n}\n\ntype Delay = number | [number | null, number | null]\n\ninterface BindingValue {\n content: string\n placement?: Placement\n delay?: Delay\n}\n\nconst TooltipDirective: Directive = {\n mounted(el: CustomHTMLElement, binding: DirectiveBinding) {\n let content = ''\n let placement: Placement = 'top'\n let delay: Delay = [300, 0]\n\n if (typeof binding.value === 'string') {\n content = binding.value\n }\n else {\n content = binding.value.content\n if (binding.value.placement !== undefined) placement = binding.value.placement\n if (binding.value.delay !== undefined) delay = binding.value.delay\n }\n\n el[TOOLTIP_INSTANCE] = tippy(el, {\n content,\n theme: 'tooltip',\n duration: 100,\n animation: 'scale',\n allowHTML: true,\n placement,\n delay,\n })\n },\n\n updated(el: CustomHTMLElement, binding: DirectiveBinding) {\n let content = ''\n if (typeof binding.value === 'string') {\n content = binding.value\n }\n else {\n content = binding.value.content\n }\n if (el[TOOLTIP_INSTANCE]) el[TOOLTIP_INSTANCE].setContent(content)\n },\n \n unmounted(el: CustomHTMLElement) {\n if (el[TOOLTIP_INSTANCE]) el[TOOLTIP_INSTANCE].destroy()\n },\n}\n\nexport default TooltipDirective","import type { App } from 'vue'\n\nimport Contextmenu from './contextmenu'\nimport ClickOutside from './clickOutside'\nimport Tooltip from './tooltip'\n\nexport default {\n install(app: App) {\n app.directive('contextmenu', Contextmenu)\n app.directive('click-outside', ClickOutside)\n app.directive('tooltip', Tooltip)\n }\n}\n","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './registerServiceWorker'\n\nimport '@icon-park/vue-next/styles/index.css'\nimport 'prosemirror-view/style/prosemirror.css'\nimport 'animate.css'\n\nimport '@/assets/styles/prosemirror.scss'\nimport '@/assets/styles/global.scss'\nimport '@/assets/styles/font.scss'\n\nimport Icon from '@/plugins/icon'\nimport Directive from '@/plugins/directive'\n\nconst app = createApp(App)\n\napp.use(Icon)\napp.use(Directive)\n\napp.use(createPinia())\napp.mount('#app')\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpptist\"] = self[\"webpackChunkpptist\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(2180); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["ToolbarStates","autoSelectAll","view","empty","state","selection","selectAll","dispatch","addMark","editorView","mark","tr","from","to","$from","$to","pos","findNodesWithSameMark","doc","markType","ii","finder","type","firstMark","fromNode","toNode","node","nodeAt","marks","find","fromPos","toPos","jj","nodeSize","equalNodeType","nodeType","Array","isArray","indexOf","findParentNodeClosestToPos","$pos","predicate","i","depth","before","start","findParentNode","_ref","findParentNodeOfType","isActiveOfParentNodeType","schema","nodes","getMarkAttrs","lastChild","getAttrValue","attr","name","attrs","isActiveMark","markActive","isInSet","storedMarks","rangeHasMark","getAttrValueInSelection","keepChecking","value","nodesBetween","_defaultAttrs","color","backcolor","fontsize","fontname","align","getTextAttrs","defaultAttrs","isBold","isEm","isUnderline","isStrikethrough","isSuperscript","isSubscript","isCode","link","isBulletList","isOrderedList","isBlockquote","bold","em","underline","strikethrough","superscript","subscript","code","bulletList","orderedList","blockquote","getFontsize","parseInt","defaultRichTextAttrs","SYS_FONTS","label","WEB_FONTS","isSupportFont","fontName","arial","toLowerCase","size","width","height","str","canvas","document","createElement","ctx","getContext","willReadFrequently","textAlign","fillStyle","textBaseline","getDotArray","_fontFamily","clearRect","font","fillText","imageData","getImageData","data","slice","call","filter","item","join","slides","id","elements","left","top","viewBox","path","fill","fixedRatio","opacity","rotate","flipV","lineHeight","content","defaultFontName","defaultColor","end","points","style","background","wordSpace","theme","themeColor","fontColor","backgroundColor","layouts","outline","text","useSlidesStore","defineStore","title","slideIndex","viewportRatio","getters","currentSlide","currentSlideAnimations","animations","els","elIds","map","el","animation","includes","elId","formatedAnimations","trigger","length","last","push","autoNext","subColor","tinycolor","isDark","layoutsString","JSON","stringify","replaceAll","parse","actions","setTitle","this","setTheme","themeProps","setViewportRatio","setSlides","addSlide","slide","addIndex","splice","updateSlide","props","deleteSlide","slideId","slidesId","deleteSlidesIndex","index","findIndex","newIndex","Math","min","maxIndex","updateSlideIndex","addElement","element","currentSlideEls","newEls","deleteElement","elementId","elementIdList","updateElement","elIdList","removeElementProps","propName","propsNames","omit","nanoid","customAlphabet","databaseId","useMainStore","activeElementIdList","handleElementId","activeGroupElementId","hiddenElementIdList","canvasPercentage","canvasScale","canvasDragged","thumbnailsFocus","editorAreaFocus","disableHotkeys","gridLineSize","showRuler","creatingElement","creatingCustomShape","availableFonts","toolbarState","SLIDE_DESIGN","clipingImageElementId","richTextAttrs","selectedTableCells","isScaling","selectedSlidesIndex","dialogForExport","textFormatPainter","shapeFormatPainter","showSelectPanel","showSearchPanel","activeElementList","slidesStore","handleElement","setActiveElementIdList","setHandleElementId","setActiveGroupElementId","setHiddenElementIdList","setCanvasPercentage","percentage","setCanvasScale","scale","setCanvasDragged","isDragged","setThumbnailsFocus","isFocus","setEditorareaFocus","setDisableHotkeysState","disable","setGridLineSize","setRulerState","show","setCreatingElement","setCreatingCustomShapeState","setAvailableFonts","setToolbarState","setClipingImageElementId","setRichtextAttrs","setSelectedTableCells","cells","setScalingState","updateSelectedSlidesIndex","setDialogForExport","setTextFormatPainter","setShapeFormatPainter","setSelectPanelState","setSearchPanelState","LOCALSTORAGE_KEY_DISCARDED_DB","databaseNamePrefix","deleteDiscardedDB","async","now","Date","getTime","localStorageDiscardedDB","localStorage","getItem","localStorageDiscardedDBList","databaseNames","Dexie","getDatabaseNames","discardedDBNames","prefix","time","split","delete","removeItem","PPTistDB","constructor","super","_defineProperty","version","stores","snapshots","writingBoardImgs","table","db","useSnapshotStore","snapshotCursor","snapshotLength","canUndo","canRedo","setSnapshotCursor","cursor","setSnapshotLength","initSnapshotDatabase","newFirstSnapshot","add","addSnapshot","allKeys","orderBy","keys","needDeleteKeys","snapshot","snapshotLengthLimit","update","bulkDelete","unDo","mainStore","toArray","reDo","useKeyboardStore","ctrlKeyState","shiftKeyState","spaceKeyState","ctrlOrShiftKeyActive","setCtrlKeyState","active","setShiftKeyState","setSpaceKeyState","useScreenStore","screening","setScreening","fillDigit","digit","len","padStart","isPC","navigator","userAgent","match","ElementOrderCommands","ElementAlignCommands","OperateBorderLines","OperateResizeHandlers","OperateLineHandlers","KEYS","HOTKEY_DOC","children","CRYPTO_KEY","encrypt","msg","CryptoJS","toString","decrypt","ciphertext","bytes","Utf8","copyText","Promise","resolve","reject","fakeElement","clipboard","Clipboard","action","container","body","on","e","destroy","appendChild","click","removeChild","readClipboard","readText","then","pasteCustomClipboardString","clipboardData","pasteExcelClipboardString","lines","pop","colCount","getRectRotatedRange","radius","sqrt","pow","auxiliaryAngle","atan","PI","tlbraRadian","trblaRadian","middleLeft","middleTop","xAxis","cos","yAxis","sin","xRange","max","yRange","getRectRotatedOffset","originXRange","originYRange","rotatedXRange","rotatedYRange","offsetX","offsetY","getElementRange","minX","maxX","minY","maxY","getElementListRange","elementList","leftValues","topValues","rightValues","bottomValues","forEach","uniqAlignLines","uniqLines","line","_line","uniqLine","rangeMin","range","rangeMax","createSlideIdMap","slideIdMap","createElementIdMap","groupIdMap","elIdMap","groupId","getTableSubThemeColor","rgba","setAlpha","toRgbString","getLineElementPath","broken","mid","curve","cubic","c1","c2","p1","p2","icons","IconPlayOne","_PlayOne","IconFullScreenPlay","_FullScreenPlay","IconLock","_Lock","IconUnlock","_Unlock","IconPpt","_Ppt","IconFormat","_Format","IconPicture","_Picture","IconFullScreen","_FullScreen","IconList","_List","IconOrderedList","_OrderedList","IconFlipVertically","_FlipVertically","IconFlipHorizontally","_FlipHorizontally","IconFontSize","_FontSize","IconCode","_Code","IconTextBold","_TextBold","IconTextItalic","_TextItalic","IconTextUnderline","_TextUnderline","IconStrikethrough","_Strikethrough","IconEdit","_Edit","IconQuote","_Quote","IconBackgroundColor","_BackgroundColor","IconGroup","_Group","IconUngroup","_Ungroup","IconBack","_Back","IconNext","_Next","IconFullwidth","_Fullwidth","IconAlignTop","_AlignTop","IconAlignLeft","_AlignLeft","IconAlignRight","_AlignRight","IconAlignBottom","_AlignBottom","IconAlignVertically","_AlignVertically","IconAlignHorizontally","_AlignHorizontally","IconBringToFront","_BringToFront","IconSendToBack","_SendToBack","IconAlignTextLeft","_AlignTextLeft","IconAlignTextRight","_AlignTextRight","IconAlignTextCenter","_AlignTextCenter","IconAlignTextBoth","_AlignTextBoth","IconRowHeight","_RowHeight","IconWrite","_Write","IconInsertTable","_InsertTable","IconAddText","_AddText","IconFill","_Fill","IconTailoring","_Tailoring","IconEffects","_Effects","IconColorFilter","_ColorFilter","IconUp","_Up","IconDown","_Down","IconPlus","_Plus","IconMinus","_Minus","IconConnection","_Connection","IconBringToFrontOne","_BringToFrontOne","IconSentToBack","_SentToBack","IconGithub","_Github","IconChartProportion","_ChartProportion","IconChartHistogram","_ChartHistogram","IconChartHistogramOne","_ChartHistogramOne","IconChartLineArea","_ChartLineArea","IconChartRing","_ChartRing","IconChartScatter","_ChartScatter","IconChartLine","_ChartLine","IconChartPie","_ChartPie","IconText","_Text","IconRotate","_Rotate","IconLeftTwo","_LeftTwo","IconRightTwo","_RightTwo","IconPlatte","_Platte","IconClose","_Close","IconCloseSmall","_CloseSmall","IconUndo","_Undo","IconTransform","_Transform","IconClick","_Click","IconTheme","_Theme","IconArrowCircleLeft","_ArrowCircleLeft","IconGraphicDesign","_GraphicDesign","IconLogout","_Logout","IconErase","_Erase","IconClear","_Clear","IconAlignTextTopOne","_AlignTextTopOne","IconAlignTextBottomOne","_AlignTextBottomOne","IconAlignTextMiddleOne","_AlignTextMiddleOne","IconPause","_Pause","IconVolumeMute","_VolumeMute","IconVolumeNotice","_VolumeNotice","IconVolumeSmall","_VolumeSmall","IconVideoTwo","_VideoTwo","IconFormula","_Formula","IconLinkOne","_LinkOne","IconFullScreenOne","_FullScreenOne","IconOffScreenOne","_OffScreenOne","IconPower","_Power","IconListView","_ListView","IconMagic","_Magic","IconHighLight","_HighLight","IconDownload","_Download","IconIndentLeft","_IndentLeft","IconIndentRight","_IndentRight","IconVerticalSpacingBetweenItems","_VerticalSpacingBetweenItems","IconCopy","_Copy","IconDelete","_Delete","IconSquare","_Square","IconRound","_Round","IconNeedle","_Needle","IconTextRotationNone","_TextRotationNone","IconTextRotationDown","_TextRotationDown","IconFormatBrush","_FormatBrush","IconPreviewOpen","_PreviewOpen","IconPreviewClose","_PreviewClose","IconStopwatchStart","_StopwatchStart","IconSearch","_Search","IconLeft","_Left","IconRight","_Right","IconMoveOne","_MoveOne","IconHamburgerButton","_HamburgerButton","IconAttention","_Attention","IconCheckOne","_CheckOne","IconCloseOne","_CloseOne","IconInfo","_Info","install","app","key","Object","component","_hoisted_1","_hoisted_2","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_defineComponent","__name","message","default","duration","closable","Boolean","emits","setup","__props","expose","__expose","emit","visible","ref","timer","startTimer","setTimeout","close","clearTimer","clearTimeout","onBeforeMount","onMounted","_ctx","_cache","_openBlock","_createBlock","_Transition","appear","mode","onBeforeLeave","$event","onAfterLeave","_withCtx","_createElementBlock","_createElementVNode","onMouseenter","onMouseleave","_unref","_createCommentVNode","_toDisplayString","onClick","_createVNode","_","__exports__","instances","wrap","seed","defaultOptions","options","className","cssText","vm","createVNode","MessageComponent","div","appContext","_context","onClose","onDestroy","childNodes","remove","render","firstElementChild","instance","exposed","success","info","warning","error","closeAll","parseText2Paragraphs","htmlText","replace","paragraphs","string","paragraph","getImageSize","src","img","onload","imgWidth","clientWidth","imgHeight","clientHeight","onerror","getImageDataURL","file","reader","FileReader","addEventListener","result","readAsDataURL","VIEWPORT_SIZE","ShapePathFormulasKeys","ElementTypes","SHAPE_PATH_FORMULAS","ROUND_RECT","editable","defaultValue","relative","getBaseSize","formula","CUT_RECT_DIAGONAL","CUT_RECT_SINGLE","CUT_RECT_SAMESIDE","ROUND_RECT_DIAGONAL","ROUND_RECT_SINGLE","ROUND_RECT_SAMESIDE","CUT_ROUND_RECT","MESSAGE","arrowWidth","arrowheight","ROUND_MESSAGE","L","lineWidth","RING_RECT","PLUS","TRIANGLE","vertex","PARALLELOGRAM_LEFT","point","PARALLELOGRAM_RIGHT","TRAPEZOID","BULLET","INDICATOR","SHAPE_LIST","pptxShapeType","pathFormula","special","outlined","CHART_TYPES","bar","horizontalBar","area","scatter","pie","ring","snapshotStore","addHistorySnapshot","debounce","trailing","redo","throttle","leading","undo","storeToRefs","useHistorySnapshot","callback","createImageElement","createChartElement","newElement","chartType","gridColor","labels","legends","series","horizontalBars","stackBars","showLine","lineSmooth","showArea","donut","createTableElement","row","col","rowCells","j","colspan","rowspan","DEFAULT_CELL_WIDTH","DEFAULT_CELL_HEIGHT","colWidths","rowHeader","rowFooter","colHeader","colFooter","cellMinHeight","createTextElement","position","vertical","editorRef","querySelector","focus","createShapeElement","keypoint","createLineElement","isBroken","isCurve","isCubic","createLatexElement","w","h","latex","strokeWidth","createVideoElement","autoplay","createAudioElement","loop","addElementsFromData","firstElement","lastSameElement","offset","oMinX","oMaxX","oMinY","oMaxY","nMinX","nMaxX","nMinY","nMaxY","values","addSlidesFromData","newSlides","target","isEmptySlide","computed","useCreateElement","useAddSlidesOrElements","createTextElementFromClipboard","pasteTextClipboardData","onlySlide","onlyElements","_selectedSlidesIndex","selectedSlides","selectedSlidesId","usePasteTextClipboardData","resetSlides","emptySlide","command","UP","DOWN","copySlide","pasteSlide","catch","err","createSlide","createSlideByTemplate","newSlide","copyAndPasteSlide","targetSlidesId","cutSlide","selectAllSlide","newSelectedSlidesIndex","sortSlides","oldIndex","_slides","_slide","lockElement","newElementList","lock","unlockElement","groupElementIdList","deleteAllElements","canCombine","firstGroupId","inSameGroup","every","combineElements","combineElementList","combineElementMaxLevel","_element","combineElementIdList","insertLevel","uncombineElements","hasElementInGroup","some","handleElementIdList","useDeleteElement","copyElement","cutElement","pasteElement","quickCopyElement","selectAllElement","unlockedElements","newActiveElementIdList","moveElement","step","move","LEFT","RIGHT","getCombineElementLevelRange","minLevel","maxLevel","moveUpElement","copyOfElementList","nextElement","movedElementList","nextCombineElementList","level","movedElement","moveDownElement","prevElement","prevCombineElementList","moveTopElement","moveBottomElement","unshift","orderElement","TOP","BOTTOM","enterFullscreen","docElm","documentElement","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","isFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","webkitCurrentFullScreenElement","screenStore","enterScreening","enterScreeningFromStart","exitScreening","canvasScalePercentage","round","scaleCanvas","setCanvasScalePercentage","resetCanvas","keyboardStore","useSlideHandler","useCombineElement","useLockElement","useCopyAndPasteElement","useSelectAllElement","useMoveElement","useOrderElement","useScreening","useScaleCanvas","copy","cut","quickCopy","combine","uncombine","moveSlide","PAGEUP","PAGEDOWN","order","create","tabActiveElement","currentIndex","nextIndex","nextElementId","keydownListener","ctrlKey","shiftKey","altKey","metaKey","ctrlOrMetaKeyActive","toUpperCase","SPACE","P","preventDefault","F5","F","C","X","D","Z","Y","A","G","B","DELETE","BACKSPACE","ENTER","MINUS","EQUAL","DIGIT_0","TAB","keyupListener","window","onUnmounted","removeEventListener","pasteImageFile","imageFile","dataURL","pasteListener","clipboardDataItems","items","clipboardDataFirstItem","kind","getAsFile","getAsString","exporting","importSpecificFile","files","cover","readAsText","parseLineElement","isFlipV","isFlipH","borderWidth","borderType","borderColor","shapType","importPPTXFile","shapeList","json","image","picBase64","imageSize","gradientType","gradientColor","colors","gradientRotate","rot","parseElements","fillColor","lineElement","shape","cellData","rowSpan","xlabels","v","y","_el","readAsArrayBuffer","_Fragment","_renderList","hotkey","accept","inputRef","handleClick","handleChange","_renderSlot","$slots","ref_key","onChange","_withScopeId","n","_pushScopeId","_popScopeId","loading","tip","contentStyle","placement","contentVisible","_component_IconClose","_resolveComponent","_Teleport","onBeforeEnter","_withDirectives","_normalizeClass","_normalizeStyle","_vShow","disabled","placeholder","focused","handleInput","handleBlur","handleFocus","onInput","onFocus","onBlur","onKeydown","_withKeys","appendTo","center","triggerRef","contentRef","watch","hide","tippy","allowHTML","interactive","maxWidth","onShow","onShown","onHidden","_hoisted_7","_hoisted_8","_hoisted_9","href","_hoisted_10","useImport","mainMenuVisible","hotkeyDrawerVisible","editingTitle","titleInputRef","titleValue","startEditTitle","nextTick","handleUpdateTitle","goLink","url","open","_component_IconHamburgerButton","_component_IconPpt","_component_IconDown","_component_IconDownload","_component_IconGithub","_directive_tooltip","_resolveDirective","Popover","FileInput","PopoverMenuItem","_createTextVNode","Input","Drawer","HotkeyDoc","FullscreenSpin","injectKeySlideScale","Symbol","injectKeySlideId","injectKeyRadioGroupValue","removeAllRanges","getSelection","canvasRef","viewportLeft","viewportTop","initViewportPosition","canvasWidth","canvasHeight","viewportActualWidth","viewportActualHeight","setViewportPosition","newValue","oldValue","newViewportActualWidth","oldViewportActualWidth","newViewportActualHeight","oldViewportActualHeight","viewportStyles","resizeObserver","ResizeObserver","observe","unobserve","dragViewport","isMouseDown","startPageX","pageX","startPageY","pageY","originLeft","originTop","onmousemove","currentPageX","currentPageY","onmouseup","viewportRef","mouseSelectionVisible","mouseSelectionQuadrant","mouseSelection","updateMouseSelection","viewportRect","getBoundingClientRect","minSelectionRange","x","offsetWidth","offsetHeight","abs","quadrant","inRangeElementList","mouseSelectionLeft","mouseSelectionTop","mouseSelectionWidth","mouseSelectionHeight","isInclude","inRangeElement","inRangeElementIdList","groupElementList","groupElement","elementRef","handleDrop","dataTransfer","dataTransferItem","ondragleave","ondrop","ondragenter","ondragover","getAngleFromCoordinate","radian","atan2","angle","rotateElement","isTouchEvent","MouseEvent","changedTouches","elOriginRotate","elLeft","elTop","elWidth","elHeight","centerX","centerY","handleMousemove","mouseX","mouseY","sorptionRange","handleMouseup","ontouchmove","ontouchend","ELEMENT_TYPE_ZH","chart","video","audio","MIN_SIZE","getRotateElementPoints","taRadian","raRadian","halfWidth","halfHeight","leftTopPoint","topPoint","rightTopPoint","rightPoint","rightBottomPoint","bottomPoint","leftBottomPoint","leftPoint","getOppositePoint","direction","oppositeMap","RIGHT_BOTTOM","LEFT_BOTTOM","LEFT_TOP","RIGHT_TOP","ClipPathTypes","ClipPaths","alignmentLines","scaleElement","elOriginLeft","elOriginTop","elOriginWidth","elOriginHeight","originTableCellMinHeight","elRotate","rotateRadian","aspectRatio","minSize","getSizeWithinRange","baseLeft","baseTop","horizontalLines","verticalLines","oppositePoint","edgeWidth","edgeHeight","isActiveGroupElement","right","bottom","topLine","bottomLine","leftLine","rightLine","edgeTopLine","edgeBottomLine","edgeHorizontalCenterLine","edgeLeftLine","edgeRightLine","edgeVerticalCenterLine","alignedAdsorption","currentX","currentY","_alignmentLines","isVerticalAdsorbed","isHorizontalAdsorbed","correctionVal","axis","revisedX","revisedY","currentPoints","currentOppositePoint","currentBaseLeft","currentBaseTop","moveX","moveY","scaleMultiElement","operateWidth","operateHeight","originElementList","currentMinX","currentMaxX","currentMinY","currentMaxY","currentOppositeWidth","currentOppositeHeight","widthScale","heightScale","originElement","originEl","selectElement","startMove","newActiveIdList","groupMembersId","uniq","dragElement","originActiveElementList","isMisoperation","horizontalCenterLine","verticalCenterLine","targetMinX","targetMaxX","targetMinY","targetMaxY","targetLeft","targetTop","targetCenterX","targetCenterY","dragLineElement","adsorptionPoints","startX","startY","endX","endY","midX","midY","c1X","c1Y","c2X","c2Y","START","adsorptionPoint","END","C1","C2","newEl","moveShapeKeypoint","shapePathData","baseSize","originPos","shapeElement","formatCreateSelection","selectionData","formatCreateSelectionForLine","_start","_end","insertElementFromCreateSelection","alignElementToCanvas","viewportWidth","viewportHeight","CENTER","VERTICAL","HORIZONTAL","shadow","shadowStyle","blur","flipH","flipStyle","CLIPPATHS","rect","RECT","rect2","POLYGON","createPath","rect3","roundRect","ellipse","ELLIPSE","triangle","triangle2","triangle3","rhombus","pentagon","hexagon","heptagon","octagon","chevron","arrow","parallelogram","parallelogram2","trapezoid","trapezoid2","clip","clipShape","imgPosition","filters","outlineWidth","outlineStyle","outlineColor","strokeDashArray","useElementOutline","toRef","overflow","rx","ry","stroke","cx","cy","Function","d","elementInfo","useClipImage","ImageRectOutline","ImageEllipseOutline","ImagePolygonOutline","clipPath","clipData","clipWrapperPositionStyle","isSettingClipRange","currentRange","getClipDataTransformInfo","bottomImgPositionStyle","topImgWrapperPosition","topImgWrapperPositionStyle","topImgPositionStyle","bottomWidth","bottomHeight","initClipPosition","handleClip","clipedEmitData","keyboardListener","updateRange","retPosition","moveClipRange","bottomPosition","originPositopn","scaleClipRange","minWidth","minHeight","targetWidth","targetHeight","rotateClassName","cornerPoint","edgePoints","_directive_click_outside","draggable","alt","onMousedown","_withModifiers","contextmenus","isCliping","useElementShadow","useElementFlip","useFilter","handleSelectElement","stopPropagation","originClip","centerOffsetX","centerOffsetY","rotatedCenterX","rotatedCenterY","_props","_directive_contextmenu","transform","ImageClipHandler","onClip","onTouchstart","ImageOutline","onDragstart","colorMask","buildKeymap","bind","cmd","joinUp","joinDown","undoInputRule","selectParentNode","toggleMark","strong","chainCommands","splitListItem","list_item","newlineInCode","createParagraphNear","liftEmptyBlock","splitBlockKeepMarks","liftListItem","sinkListItem","blockQuoteRule","wrappingInputRule","orderedListRule","childCount","bulletListRule","codeRule","inputRegex","InputRule","insertText","linkRule","urlRegEx","buildInputRules","rules","smartQuotes","ellipsis","emDash","ordered_list","bullet_list","inputRules","isEmptyParagraph","placeholderPlugin","Plugin","decorations","parent","decoration","Decoration","after","DecorationSet","buildPlugins","plugins","keymap","baseKeymap","dropCursor","gapCursor","history","listStyleType","group","parseDOM","tag","getAttrs","dom","hasAttribute","getAttribute","toDOM","listItem","_listItem","indent","textIndent","test","textIndentLevel","floor","ignore","skip","excludes","forecolor","inline","inclusive","dataset","schemaNodes","schemaMarks","Schema","createDocument","htmlString","parser","DOMParser","parseFromString","fromSchema","initProsemirrorEditor","pluginOptions","EditorView","EditorState","EmitterEvents","emitter","mitt","setTextAlign","alignment","tasks","allowedNodeTypes","Set","has","task","setNodeMarkup","alignmentCommand","setSelection","isList","toggleList","listType","itemType","blockRange","parentList","validContent","nodeAttrs","wrapInList","setNodeIndentMarkup","delta","indentKey","minIndent","maxIndent","setIndent","TextSelection","AllSelection","indentCommand","docChanged","textIndentCommand","autoFocus","editorViewRef","innerHTML","handleKeydown","textContent","hasFocus","replaceRangeWith","setProps","execCommand","lift","wrapIn","removeMark","keep","newProps","handleDOMEvents","keydown","mouseup","RICH_TEXT_COMMAND","off","canMove","realHeightCache","realWidthCache","updateTextElementHeight","entries","contentRect","realHeight","realWidth","updateContent","checkEmptyText","pureText","isHandleElement","textShadow","letterSpacing","fontFamily","writingMode","ElementOutline","ProsemirrorEditor","undefined","paragraphSpace","onUpdate","color1","color2","x1","y1","x2","y2","gradientTransform","execFormatPainter","defaultText","updateText","_text","prosemirrorEditorRef","startEdit","onMouseup","onDblclick","gradient","GradientDefs","pathMap","dot","rotateMap","markerUnits","orient","markerWidth","markerHeight","refX","refY","svgWidth","svgHeight","lineDashArray","LinePointMarker","legend","chartRef","slideScale","inject","chartHeight","getPieChartData","getOptions","propsOptopns","renderChart","BarChart","LineChart","PieChart","updateChart","themeColors","analogous","supplement","updateTheme","setProperty","updateGridColor","flexDirection","openDataEditor","OPEN_CHART_DATA_EDITOR","Chart","getTextStyle","textDecoration","fontWeight","fontStyle","fontSize","formatText","hideCells","cell","subThemeColor","immediate","textareaRef","onpaste","excelData","onBeforeUnmount","contenteditable","isStartSelect","startCell","endCell","tableCells","get","set","newData","useSubThemeColor","colSizeList","totalWidth","reduce","a","b","removeSelectedCells","dragLinePosition","useHideCells","selectedCells","isEqual","activedCell","handleCellMousedown","rowIndex","colIndex","button","handleCellMouseenter","isHideCell","selectCol","maxRow","selectRow","maxCol","deleteRow","_tableCells","targetCells","hideCellsPos","deleteCol","insertRow","insertCol","fillTable","rowCount","defaultCell","newRows","mergeCells","splitCells","handleMousedownColHandler","originWidth","clearSelectedCellText","tabActiveCell","getNextCell","nextRow","nextCol","nextCell","textRef","insertExcelData","fillRowCount","fillColCount","getEffectiveTableCells","effectiveTableCells","_rowCells","checkCanDeleteRowOrCol","canDeleteRow","canDeleteCol","checkCanMergeOrSplit","isMultiSelected","targetCell","canMerge","canSplit","cellIndex","handler","divider","span","borderStyle","CustomTextarea","onUpdateValue","onInsertExcelData","updateTableElementHeight","updateTableCells","updateColWidths","widths","updateSelectedCells","EditableTable","onChangeColWidths","onChangeSelectedCells","openLatexEditor","OPEN_LATEX_EDITOR","videoRef","exec","canPlayType","Hls","isSupported","hls","loadSource","attachMedia","flvjs","flvPlayer","createPlayer","attachMediaElement","load","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","poster","secondToTime","second","isNaN","add0","num","hour","sec","getBoundingClientRectViewLeft","playBarWrap","volumeBarRef","volume","paused","currentTime","loaded","bezelTransition","playbackRate","playBarTimeVisible","playBarTime","playBarTimeLeft","ptime","dtime","playedBarWidth","loadedBarWidth","volumeBarWidth","speedMenuVisible","speedOptions","seek","play","pause","toggle","setVolume","muted","speed","rate","handleDurationchange","handleTimeupdate","handleEnded","handleProgress","buffered","loadError","handleError","thumbMove","clientX","thumbUp","handleMousedownPlayBar","volumeMove","volumeUp","handleMousedownVolumeBar","handleClickVolumeBar","handleMousemovePlayBar","px","tx","toggleVolume","toggleLoop","autoHideControllerTimer","hideController","autoHideController","played","useMSE","_component_IconPause","_component_IconPlayOne","_component_IconVolumeMute","_component_IconVolumeNotice","_component_IconVolumeSmall","onMousemove","playsinline","onDurationchange","onTimeupdate","onEnded","onProgress","onPlay","onPause","onError","onAnimationend","VideoPlayer","audioRef","handlePlayed","audioIconSize","audioPlayerPosition","audioWidth","audioHeight","AudioPlayer","elementIndex","isMultiSelect","openLinkDialog","currentElementComponent","elementTypeMap","IMAGE","ImageElement","TEXT","TextElement","SHAPE","ShapeElement","LINE","LineElement","CHART","ChartElement","TABLE","TableElement","LATEX","LatexElement","VIDEO","VideoElement","AUDIO","AudioElement","useAlignElementToCanvas","subText","zIndex","_resolveDynamicComponent","bgColor","colorList","mostReadable","includeFallbackColors","p","backgroundStyle","backgroundImage","backgroundRepeat","backgroundSize","useSlideBackgroundStyle","GridLines","sizeStyle","markerSize","marker","selectionRef","createSelection","absX","absY","isOpposite","endPageX","endPageY","defaultSize","lineData","_startX","_startY","_endX","_endY","onContextmenu","shapeCanvasRef","mousePosition","closed","getPoint","lastPointX","lastPointY","updateMousePosition","firstPointX","firstPointY","addPoint","xList","yList","formatedPoints","ESC","resizeHandlers","textElementResizeHandlers","verticalTextElementResizeHandlers","borderLines","T","R","isWide","localActiveElementList","useCommonOperate","setRange","watchEffect","disableResize","BorderLine","ResizeHandler","script","__default__","inheritAttrs","handlerVisible","scaleWidth","scaleHeight","RotateHandler","keypointStyle","keypointPos","handlers","ctrlHandler","ctrlHandler1","ctrlHandler2","cannotRotate","setLink","linkRegExp","removeLink","margin","useLink","turnTarget","targetIndex","Divider","isSelected","isActive","currentOperateComponent","ImageElementOperate","TextElementOperate","ShapeElementOperate","LineElementOperate","TableElementOperate","CommonElementOperate","elementIndexListInAnimation","indexList","transformOrigin","LinkHandler","needScaleSize","zoom","StaticTable","BaseImageElement","BaseTextElement","BaseShapeElement","BaseLineElement","BaseChartElement","BaseTableElement","BaseLatexElement","BaseVideoElement","BaseAudioElement","provide","ThumbnailElement","tabs","card","tabsStyle","tabStyle","spaceAround","spaceBetween","tab","checked","first","showLabel","popoverVisible","selectRef","updateWidth","handleSelect","option","padding","boxShadow","address","slideOptions","selectedSlide","save","Tabs","marginBottom","Select","ThumbnailSlide","Button","closeButton","closeOnClickMask","closeOnEsc","modalRef","onEsc","onClickMask","tabindex","onKeyup","linkDialogVisible","setLocalElementList","useViewportSize","useDropImageOrText","useMouseSelection","useDragElement","useDragLineElement","useSelectElement","useScaleElement","useRotateElement","useMoveShapeKeypoint","handleClickBlankArea","handleDblClick","removeEditorAreaFocus","throttleScaleCanvas","throttleUpdateSlideIndex","handleMousewheelCanvas","deltaY","toggleRuler","useInsertFromCreateSelection","insertCustomShape","onWheel","ElementCreateSelection","onCreated","ShapeCreateCanvas","AlignmentLine","MultiSelectOperate","Operate","ViewportBackground","MouseSelection","EditableElement","Ruler","Modal","LinkDialog","selectShape","ShapeItemThumbnail","LINE_LIST","selectLine","chartList","selectChart","_component_IconChartLine","_component_IconChartHistogram","_component_IconChartPie","_component_IconChartHistogramOne","_component_IconChartLineArea","_component_IconChartRing","_component_IconChartScatter","Infinity","number","_vModelText","customRow","customCol","isCustom","handleClickTable","insertCustomTable","NumberInput","videoSrc","audioSrc","insertVideo","insertAudio","hfmathConfig","SUB_SUP_SCALE","FORMULA_LIST","SYMBOL_LIST","box","pathd","eq","hfmath","boxW","boxH","svg","SCALE_X","SCALE_Y","rows","resizable","formulaList","symbolTabs","textAreaRef","selectedSymbolKey","symbolPool","selectedSymbol","insertSymbol","TextArea","FormulaContent","SymbolContent","canvasScalePresetList","canvasScaleVisible","applyCanvasPresetScale","insertImageElement","shapePoolVisible","linePoolVisible","chartPoolVisible","tableGeneratorVisible","mediaInputVisible","latexEditorVisible","textTypeSelectVisible","drawText","drawShape","drawLine","toggleSelectPanel","toggleSraechPanel","_component_IconBack","_component_IconNext","_component_IconMoveOne","_component_IconSearch","_component_IconFontSize","_component_IconTextRotationNone","_component_IconTextRotationDown","_component_IconPicture","_component_IconGraphicDesign","_component_IconConnection","_component_IconChartProportion","_component_IconInsertTable","_component_IconFormula","_component_IconVideoTwo","_component_IconMinus","_component_IconPlus","_component_IconFullScreen","ShapePool","onSelect","LinePool","ChartPool","TableGenerator","onInsert","MediaInput","onInsertVideo","onInsertAudio","LaTeXEditor","slidesLoadLimit","loadSlide","selectSlideTemplate","useLoadSlides","presetLayoutPopoverVisible","changeSlideIndex","handleClickSlideThumbnail","minIndex","handleDragEnd","eventData","contextmenusThumbnails","contextmenusThumbnailItem","LayoutPool","Draggable","modelValue","scroll","scrollSensitivity","onEnd","itemKey","toggleTextFormatPainter","sliderRef","getNewValue","diff","fround","targetNumber","accuracy","NP","tooltipValue","tooltipRangeStartValue","tooltipRangeEndValue","getPercentage","progress","_percentage","remainder","updateRangeEnd","updatePercentage","oldValueArr","newValueArr","updatePercentageEnd","handleMousedown","deep","updateOpacity","Slider","_component_IconPlatte","white","grey","checkboardCache","renderCheckboard","fillRect","translate","toDataURL","getCheckboard","checkboard","bgStyle","rgbaStr","r","g","alphaRef","containerWidth","xOffset","pageXOffset","unbindEventListeners","handleMouseDown","Checkboard","hue","oldHue","pullDirection","hsla","toHsl","pointerLeft","s","hueRef","percent","l","hsva","toHsv","pointerTop","emitChangeEvent","param","saturationRef","containerHeight","yOffset","pageYOffset","clamp","saturation","bright","val","_hex","toHex8String","toHexString","toRgb","RECENT_COLORS","presetColorConfig","startColor","endColor","_startColor","_endColor","rStep","gStep","bStep","gradientColorArr","getPresetColors","presetColors","standardColors","recentColors","rgbaString","currentColor","selectPresetColor","colorString","updateRecentColorsCache","_color","maxLength","recentColorsCache","setItem","changeColor","openEyeDropper","isSupportedEyeDropper","browserEyeDropper","customEyeDropper","eyeDropper","EyeDropper","tColor","sRGBHex","targetRef","maskRef","colorBlockRef","tagName","classList","contains","toCanvas","fontEmbedCSS","pixelRatio","toFixed","handleMouseleave","_component_IconNeedle","Saturation","onColorChange","Hue","Alpha","EditableInput","c","fixed","hasOutline","updateOutline","outlineProps","toggleOutline","_outline","Switch","ColorPicker","ColorButton","hasShadow","updateShadow","shadowProps","_shadow","toggleShadow","passive","_value","updateValue","ButtonGroup","_hoisted_23","_hoisted_24","_hoisted_25","presetStyles","useTextFormatPainter","bulletListPanelVisible","orderedListPanelVisible","indentLeftPanelVisible","indentRightPanelVisible","bulletListStyleTypeOption","orderedListStyleTypeOption","fontSizeOptions","lineHeightOptions","wordSpaceOptions","paragraphSpaceOptions","updateLineHeight","updateParagraphSpace","updateWordSpace","updateFill","emitRichTextCommand","emitBatchRichTextCommand","linkPopoverVisible","openLinkPopover","updateLink","_component_IconAddText","_component_IconText","_component_IconHighLight","_component_IconTextBold","_component_IconTextItalic","_component_IconTextUnderline","_component_IconStrikethrough","_component_IconCode","_component_IconQuote","_component_IconFormat","_component_IconFormatBrush","_component_IconLinkOne","_component_IconAlignTextLeft","_component_IconAlignTextCenter","_component_IconAlignTextRight","_component_IconAlignTextBoth","_component_IconList","_component_IconOrderedList","_component_IconIndentLeft","_component_IconIndentRight","_component_IconRowHeight","_component_IconVerticalSpacingBetweenItems","_component_IconFullwidth","SelectGroup","icon","TextColorButton","CheckboxButton","RadioGroup","RadioButton","ElementShadow","ElementOpacity","updateFlip","flipProps","_component_IconFlipVertically","_component_IconFlipHorizontally","defaultFilters","unit","filterOptions","hasFilters","filterItem","updateFilter","_handleElement","originFilters","toggleFilters","defaultColorMask","hasColorMask","toggleColorMask","updateColorMask","shapeClipPathOptions","ratioClipOptions","ratio","handleImageElement","clipPanelVisible","clipImage","getImageElementDataBeforeClip","imgLeft","imgTop","originClipRange","originHeight","presetImageClip","imageRatio","distance","replaceImage","resetImage","setBackgroundImage","_component_IconTailoring","_component_IconTransform","_component_IconUndo","_component_IconTheme","ElementFlip","typeItem","ElementColorMask","ElementFilter","toggleShapeFormatPainter","handleShapeElement","fillType","useShapeFormatPainter","updateFillType","updateGradient","gradientProps","_gradient","changeShape","updateTextAlign","_component_IconAlignTextTopOne","_component_IconAlignTextMiddleOne","_component_IconAlignTextBottomOne","handleLineElement","updateLine","CELL_WIDTH","CELL_HEIGHT","selectedRange","tempRangeSize","focusCell","rangeLines","resizablePointStyle","initData","_data","moveNextRow","getTableData","labelsItem","labelInputRef","legendsItem","seriesItem","valueInputRef","clear","handlePaste","closeEditor","changeSelectRange","autocomplete","onPaste","presetChartThemes","handleChartElement","chartDataEditorVisible","presetThemesVisible","presetThemeColorHoverIndex","_lineSmooth","_showLine","_showArea","_horizontalBars","_donut","_stackBars","updateData","updateOptions","optionProps","newOptions","addThemeColor","applyPresetTheme","deleteThemeColor","updateLegend","_component_IconEdit","_component_IconCloseSmall","Checkbox","itemIndex","ChartDataEditor","onSave","textAttrs","hasTheme","minRowCount","minColCount","updateTextAttrState","selectedCell","updateTextAttrs","textAttrProp","themeProp","_theme","toggleTheme","setTableRow","newTableCells","setTableCol","newColSizeList","_component_IconFill","handleLatexElement","updateLatex","updateLatexData","handleVideoElement","updateVideo","setVideoPoster","handleAudioElement","updateAudio","updateFontStyle","panelMap","TextStylePanel","ImageStylePanel","ShapeStylePanel","LineStylePanel","ChartStylePanel","TableStylePanel","LatexStylePanel","VideoStylePanel","AudioStylePanel","currentPanelComponent","MultiStylePanel","activeGroupElement","isHorizontalText","isVerticalText","updateLeft","updateTop","updateShapePathData","updateHeight","updateRotate","updateFixedRatio","updateRotate45","_rotate","_component_IconSendToBack","_component_IconBringToFrontOne","_component_IconBringToFront","_component_IconSentToBack","_component_IconAlignLeft","_component_IconAlignVertically","_component_IconAlignRight","_component_IconAlignTop","_component_IconAlignHorizontally","_component_IconAlignBottom","_component_IconLock","_component_IconUnlock","_component_IconRotate","ANIMATION_DEFAULT_DURATION","ANIMATION_DEFAULT_TRIGGER","ANIMATION_CLASS_PREFIX","ENTER_ANIMATIONS","EXIT_ANIMATIONS","ATTENTION_ANIMATIONS","SLIDE_ANIMATIONS","animationEffects","effect","animationTypes","activeTab","animationPoolVisible","hoverPreviewAnimation","animationSequence","elType","animationEffect","handleElementAnimation","deleteAnimation","runAnimation","elRef","animationName","handleAnimationEnd","removeProperty","once","updateElementAnimationDuration","updateElementAnimationTrigger","updateElementAnimation","handleAnimationId","animationItem","addAnimation","popoverMaskHide","handlePopoverVisibleChange","openAnimationPool","in","out","attention","_component_IconEffects","_component_IconClick","handle","PRESET_THEMES","getSlideAllColors","getAlpha","createSlideThemeColorMap","newColors","oldColors","themeColorMap","otherColors","setSlideTheme","colorMap","applyPresetThemeToSingleSlide","applyPresetThemeToAllSlides","applyThemeToAllSlides","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","useSlideTheme","updateBackgroundType","newBackground","updateBackground","uploadBackgroundImage","applyBackgroundAllSlide","updateViewportRatio","currentTurningMode","turningMode","updateTurningMode","applyAllSlide","alignActiveElement","groupElementRangeMap","activeElement","groupElements","horizontalCenter","verticalCenter","displayItemCount","count","groupIdList","uniformHorizontalDisplay","copyOfActiveElementList","singleElemetList","groupList","groupEl","formatedGroupList","groupItem","list","sort","itemA","itemB","sortedElementData","firstItem","lastPos","lastWidth","currentPos","currentWidth","sortedItem","uniformVerticalDisplay","totalHeight","lastHeight","currentHeight","useAlignActiveElement","useUniformDisplayElement","alignElement","_component_IconGroup","_component_IconUngroup","selectSymbol","elementTabs","EL_STYLE","SYMBOL","EL_POSITION","EL_ANIMATION","slideTabs","SLIDE_ANIMATION","multiSelectTabs","MULTI_POSITION","currentTabs","currentTabsValue","ElementStylePanel","ElementPositionPanel","ElementAnimationPanel","SlideDesignPanel","SlideAnimationPanel","MultiPositionPanel","SymbolPanel","menuInstance","menuRef","hideMenuInstance","updateTextContent","anchorNode","focusNode","isCollapsed","getRangeAt","getReferenceClientRect","mousedown","input","hideOnClick","remark","resize","newHeight","Editor","childlessTags","closingTags","closingTagAncestorBreakers","li","dt","dd","tbody","thead","tfoot","td","voidTags","jumpPosition","movePositopn","findTextEnd","isEnd","textEnd","char","charAt","lexText","tokens","lexComment","contentEnd","commentEnd","lexTagName","isTagChar","lexTagAttributes","quote","wordBegin","words","isQuoteEnd","isTagEnd","isWordEnd","isQuoteStart","word","isNotPair","secondWord","startsWith","newWord","thirdWord","endsWith","lexSkipTag","safeTagName","nextTag","tagState","lexTag","textStart","secondChar","tagStartClose","firstChar","tagEndClose","lex","isComment","safeTag","lexer","root","stack","hasTerminalParent","tagParents","parentTagName","rewindStack","newLength","token","tagToken","shouldRewind","isClosingTag","shouldRewindToAutoClose","previousIndex","attributes","tagEndToken","_token","elementNode","hasChildren","innerState","splitHead","sep","idx","unquote","car","formatAttributes","attribute","parts","trim","format","toAST","typeMap","toPoints","pathData","SVGPathData","commands","lastPoint","cubicBezierPoints","arcToBezier","py","rX","rY","xAxisRotation","xRot","largeArcFlag","lArcFlag","sweepFlag","cbPoint","characters","PREFIX","utf8Encode","utftext","charCodeAt","String","fromCharCode","encode","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","svg2Base64","XMLS","XMLSerializer","serializeToString","INCH_PX_RATIO","PT_PX_RATIO","exportImage","domRef","quality","ignoreWebfont","toImage","toPng","toJpeg","foreignObjectSpans","querySelectorAll","spanRef","removeAttribute","config","dataUrl","saveAs","exportSpecificFile","blob","Blob","exportJSON","formatColor","alpha","formatHTML","html","ast","bulletFlag","slices","obj","baseStyleObj","isBlockTag","lastSlice","breakLine","styleObj","styleAttr","styleArr","styleItem","_key","dataIndentAttr","highlight","strike","italic","fontFace","hyperlink","bullet","paraSpaceBefore","indentLevel","formatPoints","moveTo","getShadowOption","getOutlineOption","transparency","dashType","getLinkOption","exportPPTX","masterOverwrite","ignoreMedia","pptx","pptxgen","layout","defineLayout","bgAlpha","defineSlideMaster","pptxSlide","mix","addNotes","textProps","valign","lineSpacingMultiple","autoFit","charSpacing","vert","addText","linkOption","rounding","originW","originH","sizing","addImage","svgRef","base64SVG","addShape","beginArrowType","endArrowType","chartData","chartColors","plotArea","showLegend","legendPos","legendColor","legendFontSize","ChartType","barDir","lineSize","doughnut","holeSize","addChart","hiddenCells","rowData","tableData","subThemeColors","_row","cellOptions","colW","border","pt","addTable","extMatch","extn","ext","videoExts","audioExts","addMedia","writeFile","fileName","imageThumbnailsRef","rangeType","renderSlides","useExport","expImage","createIframe","iframe","writeContent","printNode","docType","styleSheets","styleSheet","cssRules","rule","head","write","print","iframeContentWindow","contentWindow","contentDocument","handleLoadIframe","handleAfterprint","pdfThumbnailsRef","expPDF","pageSize","currentDialogComponent","dialogMap","ExportImage","ExportJSON","ExportPDF","ExportPPTX","ExportSpecificFile","moveable","moveablePanelRef","windowWidth","_elements","lastItem","selectGroupEl","idList","selectEl","hideElement","showAll","currentSlideElIdList","needHiddenElementIdList","hideAll","editingElId","saveElementName","enterEdit","_component_IconUp","_component_IconPreviewClose","_component_IconPreviewOpen","MoveablePanel","searchWord","replaceWord","searchResults","searchIndex","modifiers","search","textList","matchRegex","RegExp","textRegex","rets","highlightCurrentSlide","clearMarks","getTextNodeList","nodeList","textNodes","shift","TEXT_NODE","wholeText","getTextInfoList","startIdx","endIdx","getMatchList","keyword","reg","matchList","matchStart","matchEnd","textIdx","textNode","nodeMatchStartIdx","nodeMatchLength","splitText","innerText","substring","parentNode","replaceChild","highlightTableText","markNodes","createTextNode","lastTarget","setActiveMark","searchNext","searchPrev","targetElement","replaced","targetSlide","lastMarkIndex","markIndex","reset","toggleModifiers","useSearch","searchInpRef","_component_IconLeft","_component_IconRight","_isRef","onEnter","suffix","closeExportDialog","remarkHeight","useGlobalHotkey","usePasteEvent","EditorHeader","Thumbnails","CanvasTool","Canvas","Remark","Toolbar","SelectPanel","SearchPanel","onClosed","ExportDialog","animationIndex","inAnimation","playedSlidesMinIndex","endAnimationCount","classname","revokeAnimation","execPrev","autoPlayTimer","closeAutoPlay","clearInterval","loopPlay","setLoopPlay","throttleMassage","turnSlideToIndex","execNext","autoPlayInterval","autoPlay","setInterval","setAutoPlayInterval","interval","mousewheelListener","touchInfo","touchStartListener","touchEndListener","turnPrevSlide","turnNextSlide","turnSlideToId","wrapRef","slideWidth","slideHeight","setSlideContentSize","slideWrapRef","winWidth","winHeight","fullscreenState","escExit","handleFullscreenChange","manualExitFullscreen","inCurrentSlide","audioPlayerRef","ScreenVideoElement","ScreenAudioElement","needWaitAnimation","elementIndexInAnimation","firstAnimation","openLink","visibility","ScreenElement","slidesWithTurningMode","turningModeKeys","random","ScreenSlide","turnSlide","_component_IconArrowCircleLeft","model","blackboard","penSize","markSize","rubberSize","writingBoardRef","lastTime","lastLineWidth","mouse","mouseInCanvas","updateCanvasSize","initCanvas","lineCap","lineJoin","updateCtx","globalCompositeOperation","globalAlpha","draw","posX","posY","lastPosX","lastPosY","strokeStyle","beginPath","lineTo","closePath","erase","sinRadius","cosRadius","rectPoint1","rectPoint2","rectPoint3","rectPoint4","arc","restore","getDistance","getLineWidth","t","maxV","minV","handleMove","getMouseOffsetPosition","event","canvasRect","clearCanvas","setImageDataURL","imageDataURL","Image","drawImage","_component_IconWrite","onTouchmove","onTouchend","writingBoardColors","writingBoardColor","writingBoardModel","sizePopoverType","changeModel","closeWritingBoard","where","equals","ret","currentImg","hanldeWritingEnd","_component_IconErase","_component_IconClear","WritingBoard","inTiming","isCountdown","minute","inputEditable","toggleCountdown","changeTime","isNumber","maxlength","changeViewMode","useExecPlay","useSlideSize","useFullscreen","rightToolsVisible","writingBoardToolVisible","timerlVisible","slideThumbnailModelVisible","laserPen","_component_IconLeftTwo","_component_IconRightTwo","_component_IconMagic","_component_IconStopwatchStart","_component_IconListView","_component_IconOffScreenOne","_component_IconFullScreenOne","_component_IconPower","ScreenSlideList","SlideThumbnails","WritingBoardTool","CountdownTimer","slideListWrapRef","thumbnailsRef","remarkFontSize","currentSlideRemark","handleMousewheelThumbnails","scrollBy","setRemarkFontSize","activeThumbnailRef","offsetLeft","scrollTo","behavior","viewMode","BaseView","PresenterView","_resizeHandlers","delayOnTouchOnly","delay","insertTextElement","insertShapeElement","square","handleInputMark","_component_IconCopy","_component_IconDelete","_component_IconSquare","_component_IconRound","MobileThumbnails","updateFontColor","changeMode","_component_IconLogout","contentWidth","contentheight","contentRatio","Header","MobileOperate","MobileEditableElement","SlideToolbar","ElementToolbar","toolVisible","playerSize","slideSize","playerRatio","mobileRef","screenWidth","_component_IconFullScreenPlay","_mode","currentComponent","componentMap","MobileEditor","MobilePlayer","MobilePreview","_isPC","onbeforeunload","discardedDB","discardedDBList","newDiscardedDB","Screen","Mobile","register","ready","console","log","registered","cached","updatefound","updated","offline","menus","handleClickMenuItem","_component_menu_content","menu","removeContextmenu","MENU_WIDTH","MENU_HEIGHT","DIVIDER_HEIGHT","PADDING","menuCount","dividerCount","menuWidth","menuHeight","screenHeight","MenuContent","CTX_CONTEXTMENU_HANDLER","contextmenuListener","binding","ContextmenuComponent","ContextmenuDirective","mounted","unmounted","CTX_CLICK_OUTSIDE_HANDLER","clickListener","composedPath","isClickOutside","ClickOutsideDirective","TOOLTIP_INSTANCE","TooltipDirective","setContent","directive","Contextmenu","ClickOutside","Tooltip","createApp","App","use","Icon","Directive","createPinia","mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","getter","__esModule","definition","o","defineProperty","enumerable","globalThis","prop","prototype","hasOwnProperty","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app.c01019f7.js b/js/app.c01019f7.js deleted file mode 100644 index 7b59e573..00000000 --- a/js/app.c01019f7.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(){var e={2121:function(e,t,l){"use strict";var a,n=l(9963),o=l(9876),i=(l(7658),l(6252)),s=l(2262),r=l(3416);(function(e){e["SYMBOL"]="symbol",e["EL_ANIMATION"]="elAnimation",e["EL_STYLE"]="elStyle",e["EL_POSITION"]="elPosition",e["SLIDE_DESIGN"]="slideDesign",e["SLIDE_ANIMATION"]="slideAnimation",e["MULTI_POSITION"]="multiPosition"})(a||(a={}));var u=l(5804);const c=e=>{const{empty:t}=e.state.selection;t&&(0,u.td)(e.state,e.dispatch)},d=(e,t,l)=>{if(l)e.dispatch(e.state.tr.addMark(l.from,l.to,t));else{const{$from:l,$to:a}=e.state.selection;e.dispatch(e.state.tr.addMark(l.pos,a.pos,t))}},p=(e,t,l,a)=>{let n=t;const o=e=>e.type===a;let i=null,s=null,r=null;while(n<=l){const t=e.nodeAt(n);if(!t||!t.marks)return null;const l=t.marks.find(o);if(!l)return null;if(i&&l!==i)return null;s=s||t,i=i||l,r=t,n++}let u=t,c=l,d=0;n=t-1;while(n>d){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==i)break;u=n,s=t,n--}n=l+1,d=e.nodeSize-2;while(nArray.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,m=(e,t)=>{for(let l=e.depth;l>0;l--){const a=e.node(l);if(t(a))return{pos:l>0?e.before(l):0,start:e.start(l),depth:l,node:a}}},h=e=>t=>m(t.$from,e),f=e=>t=>h((t=>v(e,t)))(t),g=(e,t)=>{const l=t.schema.nodes[e];return!!f(l)(t.selection)},y=e=>{const{selection:t,doc:l}=e.state,{from:a}=t;let n=l.nodeAt(a)||l.nodeAt(a-1);return n?.lastChild&&(n=n.lastChild),n?.marks||[]},w=(e,t,l)=>{for(const a of e)if(a.type.name===t&&a.attrs[l])return a.attrs[l];return null},x=(e,t)=>{for(const l of e)if(l.type.name===t)return!0;return!1},k=(e,t)=>{const{from:l,$from:a,to:n,empty:o}=e.selection;return o?t.isInSet(e.storedMarks||a.marks()):e.doc.rangeHasMark(l,n,t)},b=(e,t)=>{const{selection:l,doc:a}=e.state,{from:n,to:o}=l;let i=!0,s="";return a.nodesBetween(n,o,(e=>(i&&e.attrs[t]&&(i=!1,s=e.attrs[t]),i))),s},_={color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",align:"left"},I=(e,t={})=>{const l={..._,...t},a=y(e),n=x(a,"strong"),o=x(a,"em"),i=x(a,"underline"),s=x(a,"strikethrough"),r=x(a,"superscript"),u=x(a,"subscript"),c=x(a,"code"),d=w(a,"forecolor","color")||l.color,p=w(a,"backcolor","backcolor")||l.backcolor,v=w(a,"fontsize","fontsize")||l.fontsize,m=w(a,"fontname","fontname")||l.fontname,h=w(a,"link","href")||"",f=b(e,"align")||l.align,k=g("bullet_list",e.state),I=g("ordered_list",e.state),S=g("blockquote",e.state);return{bold:n,em:o,underline:i,strikethrough:s,superscript:r,subscript:u,code:c,color:d,backcolor:p,fontsize:v,fontname:m,link:h,align:f,bulletList:k,orderedList:I,blockquote:S}},S=e=>{const t=y(e),l=w(t,"fontsize","fontsize")||_.fontsize;return parseInt(l)},C={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},L=[{label:"Arial",value:"Arial"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"宋体",value:"SimSun"},{label:"黑体",value:"SimHei"},{label:"楷体",value:"KaiTi"},{label:"新宋体",value:"NSimSun"},{label:"仿宋",value:"FangSong"},{label:"苹方",value:"PingFang SC"},{label:"华文黑体",value:"STHeiti"},{label:"华文楷体",value:"STKaiti"},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangSong"},{label:"华文中宋",value:"STZhongSong"},{label:"华文琥珀",value:"STHupo"},{label:"华文新魏",value:"STXinwei"},{label:"华文隶书",value:"STLiti"},{label:"华文行楷",value:"STXingkai"},{label:"冬青黑体",value:"Hiragino Sans GB"},{label:"兰亭黑",value:"Lantinghei SC"},{label:"偏偏体",value:"Hanzipen SC"},{label:"手札体",value:"Hannotate SC"},{label:"宋体",value:"Songti SC"},{label:"娃娃体",value:"Wawati SC"},{label:"行楷",value:"Xingkai SC"},{label:"圆体",value:"Yuanti SC"},{label:"华文细黑",value:"STXihei"},{label:"幼圆",value:"YouYuan"},{label:"隶书",value:"LiSu"}],E=[{label:"得意黑",value:"得意黑"},{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}],T=e=>{if("string"!==typeof e)return!1;const t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;const l=100,a=100,n=100,o="a",i=document.createElement("canvas"),s=i.getContext("2d",{willReadFrequently:!0});if(!s)return!1;i.width=a,i.height=n,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";const r=e=>{s.clearRect(0,0,a,n),s.font=`${l}px ${e}, ${t}`,s.fillText(o,a/2,n/2);const i=s.getImageData(0,0,a,n).data;return[].slice.call(i).filter((e=>0!==e))};return r(t).join("")!==r(e).join("")};var M=l(7234),U=l(6486);const W=[{id:"test-slide-1",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"idn7Mx",left:355,top:65.25,width:585,height:188,lineHeight:1.2,content:"

PPTIST

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

基于 Vue 3.x + TypeScript 的在线演示文稿应用

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"#5b9bd5",style:"solid",width:2}],background:{type:"solid",color:"#ffffff"}},{id:"test-slide-2",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"

在此处添加标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"#5b9bd5",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"#fff"}},{id:"test-slide-3",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"

感谢观看

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333",wordSpace:5}],background:{type:"solid",color:"#fff"}}],D={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff"},H=[{id:"template",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"AkIh3E",left:355,top:95.11111111111111,width:585,height:116,lineHeight:1.2,content:"

输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:6},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

请在此处输入副标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"{{themeColor}}",style:"solid",width:2}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"{{themeColor}}",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"

感谢观看

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:5}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"MZVO1kkj",elements:[{type:"shape",id:"cql0h8",left:0,top:0,width:352.59259259259255,height:562.5,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"_RTaF4",left:171.4814814814814,top:100.13888888888887,width:362.22222222222223,height:362.22222222222223,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"rgba(255,255,255,0)",fixedRatio:!1,rotate:0,outline:{width:10,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"UZfo8N",left:216.66666666666663,top:145.32407407407408,width:271.85185185185185,height:271.85185185185185,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0,text:{content:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"ysqtBg",left:561.4814814814814,top:100.1388888888889,width:359.25925925925924,height:80,content:"

在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"lXsoHa",left:572.5925925925925,top:202.3611111111111,width:257.77777777777777,height:260,content:"
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",lineHeight:2,fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"EBBnTr",left:360.5996472663139,top:141.8496472663139,width:278.80070546737215,height:278.80070546737215,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:0,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"gDIWDH",left:456.4373897707231,top:98.287037037037,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"DUWT7E",left:317.037037037037,top:237.68738977072314,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"pbhn38",left:456.43738977072303,top:377.08774250440916,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"CvMKrO",left:595.8377425044091,top:237.6873897707231,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"adudHB",left:402.962962962963,top:39.39814814814815,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"9UpDwg",left:402.962962962963,top:473.1018518518518,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"GERdpB",left:111.48148148148151,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"G5qoho",left:691.1111111111111,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"shape",id:"vdZcI6",left:415.18518518518516,top:196.4351851851852,width:169.62962962962962,height:169.62962962962962,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"tYUmrx",left:156.66666666666683,top:149.02777777777771,width:264.4444444444445,height:264.4444444444445,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"0GVHf8",left:342.2222222222223,top:217.17592592592587,width:128.14814814814812,height:128.14814814814812,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0},{type:"text",id:"BO33Sv",left:378.8888888888889,top:235.24999999999994,width:464.4444444444444,height:92,content:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Hj7ttp",left:69.35185185185185,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"FmKMNB",left:69.35185185185185,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"rI7ZeO",left:510.64814814814815,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"KspwGc",left:510.64814814814815,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Rx63Jo",left:69.35185185185179,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"ulyuzE",left:69.35185185185179,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"kr35Ca",left:510.6481481481481,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"BNQSpC",left:510.6481481481481,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Vr38Nu",left:69.35185185185185,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"

3.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"IwKRSu",left:69.35185185185185,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"0Opr1v",left:510.64814814814815,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"

4.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"4L9Uzz",left:510.64814814814815,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"GdEGxg",left:134.53703703703704,top:127.25,width:152.77777777777777,height:308,lineHeight:1.8,content:"

请在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:8,fill:"{{themeColor}}"},{type:"text",id:"y5sAfw",left:332.8703703703704,top:127.25,width:532.5925925925926,height:50,content:"

请在此处输入内容1

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"VeuocM",left:332.8703703703704,top:212.0648148148148,width:532.5925925925926,height:50,content:"

请在此处输入内容2

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"RyFWQe",left:332.8703703703704,top:296.8796296296296,width:532.5925925925926,height:50,content:"

请在此处输入内容3

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Q56viI",left:332.8703703703704,top:381.69444444444446,width:532.5925925925926,height:50,content:"

请在此处输入内容4

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"SUWirT",left:73.8888888888889,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"YjzN1M",left:148.70370370370372,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"fS09I7",left:527.5925925925926,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"qCnfB1",left:602.4074074074074,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"difAAT",left:73.8888888888889,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"EUlvMo",left:148.70370370370372,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"US_9jB",left:527.5925925925926,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"243MnQ",left:602.4074074074074,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"Y_KUj0",left:73.8888888888889,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

5

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"9GglMe",left:148.70370370370372,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"eSInje",left:527.5925925925926,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

6

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"0S3yUg",left:602.4074074074074,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}}],F=(0,o.Q_)("slides",{state:()=>({title:"未命名演示文稿",theme:D,slides:W,slideIndex:0,viewportRatio:.5625}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id));return t.animations.filter((e=>a.includes(e.elId)))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id)),n=t.animations.filter((e=>a.includes(e.elId))),o=[];for(const i of n)if("click"!==i.trigger&&o.length){if("meantime"===i.trigger){const e=o[o.length-1];e.animations=e.animations.filter((e=>e.elId!==i.elId)),e.animations.push(i),o[o.length-1]=e}else if("auto"===i.trigger){const e=o[o.length-1];e.autoNext=!0,o[o.length-1]=e,o.push({animations:[i],autoNext:!1})}}else o.push({animations:[i],autoNext:!1});return o},layouts(e){const{themeColor:t,fontColor:l,fontName:a,backgroundColor:n}=e.theme,o=(0,M.Z)(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",i=JSON.stringify(H).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",a).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",o);return JSON.parse(i)}},actions:{setTitle(e){this.title=e||"未命名演示文稿"},setTheme(e){this.theme={...this.theme,...e}},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},addSlide(e){const t=Array.isArray(e)?e:[e],l=this.slideIndex+1;this.slides.splice(l,0,...t),this.slideIndex=l},updateSlide(e){const t=this.slideIndex;this.slides[t]={...this.slides[t],...e}},deleteSlide(e){const t=Array.isArray(e)?e:[e],l=[];for(let o=0;oe.id===t[o]));l.push(e)}let a=Math.min(...l);const n=this.slides.length-t.length-1;a>n&&(a=n),this.slideIndex=a,this.slides=this.slides.filter((e=>!t.includes(e.id)))},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=[...l,...t];this.slides[this.slideIndex].elements=a},deleteElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=l.filter((e=>!t.includes(e.id)));this.slides[this.slideIndex].elements=a},updateElement(e){const{id:t,props:l,slideId:a}=e,n="string"===typeof t?[t]:t,o=a?this.slides.findIndex((e=>e.id===a)):this.slideIndex,i=this.slides[o],s=i.elements.map((e=>n.includes(e.id)?{...e,...l}:e));this.slides[o].elements=s},removeElementProps(e){const{id:t,propName:l}=e,a="string"===typeof l?[l]:l,n=this.slideIndex,o=this.slides[n],i=o.elements.map((e=>e.id===t?(0,U.omit)(e,a):e));this.slides[n].elements=i}}}),A=(0,r.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),Z=A(10),$=(0,o.Q_)("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,creatingCustomShape:!1,availableFonts:L,toolbarState:a.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:C,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:Z,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1}),getters:{activeElementList(e){const t=F(),l=t.currentSlide;return l&&l.elements?l.elements.filter((t=>e.activeElementIdList.includes(t.id))):[]},handleElement(e){const t=F(),l=t.currentSlide;return l&&l.elements&&l.elements.find((t=>e.handleElementId===t.id))||null}},actions:{setActiveElementIdList(e){1===e.length?this.handleElementId=e[0]:this.handleElementId="",this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setHiddenElementIdList(e){this.hiddenElementIdList=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setCreatingCustomShapeState(e){this.creatingCustomShape=e},setAvailableFonts(){this.availableFonts=L.filter((e=>T(e.value)))},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e},setTextFormatPainter(e){this.textFormatPainter=e},setShapeFormatPainter(e){this.shapeFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e}}});var O=l(7327),z=l(8134);const P="PPTIST_DISCARDED_DB",R="PPTist",B=async()=>{const e=(new Date).getTime(),t=localStorage.getItem(P),l=t?JSON.parse(t):[],a=await z.Z.getDatabaseNames(),n=a.filter((t=>{if(-1===t.indexOf(R))return!1;const[a,n,o]=t.split("_");return a!==R||!n||!o||(!!l.includes(n)||e-+o>=432e5)}));for(const o of n)z.Z.delete(o);localStorage.removeItem(P)};class N extends z.Z{constructor(){super(`${R}_${Z}_${(new Date).getTime()}`),(0,O.Z)(this,"snapshots",void 0),(0,O.Z)(this,"writingBoardImgs",void 0),this.version(1).stores({snapshots:"++id",writingBoardImgs:"++id"}),this.snapshots=this.table("snapshots"),this.writingBoardImgs=this.table("writingBoardImgs")}}const j=new N,Y=(0,o.Q_)("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor=0&&this.snapshotCursoro&&(l.push(t[0]),n--),n>=2&&j.snapshots.update(t[n-2],{index:e.slideIndex}),await j.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=F(),t=$(),l=this.snapshotCursor-1,a=await j.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=F(),t=$(),l=this.snapshotCursor+1,a=await j.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])}}}),V=(0,o.Q_)("keyboard",{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),J=(0,o.Q_)("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),q=(e,t)=>(0,U.padStart)(""+e,t,"0"),X=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);var G,K,Q,ee,te,le,ae=l(3577);(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(G||(G={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(K||(K={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(Q||(Q={})),function(e){e["LEFT_TOP"]="left-top",e["TOP"]="top",e["RIGHT_TOP"]="right-top",e["LEFT"]="left",e["RIGHT"]="right",e["LEFT_BOTTOM"]="left-bottom",e["BOTTOM"]="bottom",e["RIGHT_BOTTOM"]="right-bottom"}(ee||(ee={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(te||(te={})),function(e){e["C"]="C",e["X"]="X",e["Z"]="Z",e["Y"]="Y",e["A"]="A",e["G"]="G",e["L"]="L",e["F"]="F",e["D"]="D",e["B"]="B",e["P"]="P",e["MINUS"]="-",e["EQUAL"]="=",e["DIGIT_0"]="0",e["DELETE"]="DELETE",e["UP"]="ARROWUP",e["DOWN"]="ARROWDOWN",e["LEFT"]="ARROWLEFT",e["RIGHT"]="ARROWRIGHT",e["ENTER"]="ENTER",e["SPACE"]=" ",e["TAB"]="TAB",e["BACKSPACE"]="BACKSPACE",e["ESC"]="ESCAPE",e["PAGEUP"]="PAGEUP",e["PAGEDOWN"]="PAGEDOWN",e["F5"]="F5"}(le||(le={}));const ne=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"粘贴为纯文本",value:"Ctrl + Shift + V"},{label:"快速复制粘贴",value:"Ctrl + D"},{label:"全选",value:"Ctrl + A"},{label:"撤销",value:"Ctrl + Z"},{label:"恢复",value:"Ctrl + Y"},{label:"删除",value:"Delete / Backspace"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"打开搜索替换",value:"Ctrl + F"},{label:"打印",value:"Ctrl + P"},{label:"关闭弹窗",value:"ESC"}]},{type:"幻灯片放映",children:[{label:"从头开始放映幻灯片",value:"F5"},{label:"从当前开始放映幻灯片",value:"Shift + F5"},{label:"切换上一页",value:"↑ / ← / PgUp"},{label:"切换下一页",value:"↓ / → / PgDown"},{label:"切换下一页",value:"Enter / Space"},{label:"退出放映",value:"ESC"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"移动画布",value:"Space + 鼠标拖拽"},{label:"缩放画布",value:"Ctrl + 鼠标滚轮"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"使画布适应当前屏幕",value:"Ctrl + 0"},{label:"上一页(未选中元素)",value:"↑ / ←"},{label:"下一页(未选中元素)",value:"↓ / →"},{label:"上一页",value:"鼠标上滚 / PgUp"},{label:"下一页",value:"鼠标下滚 / PgDown"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"切换焦点元素",value:"Tab"},{label:"确认图片裁剪",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"图表数据编辑",children:[{label:"聚焦到下一行",value:"Enter"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"行内代码",value:"Ctrl + E"},{label:"上角标",value:"Ctrl + ;"},{label:"下角标",value:"Ctrl + '"},{label:"选中段落",value:"ESC"}]}];var oe=l(2152),ie=l.n(oe),se=l(1354),re=l.n(se);const ue="pptist",ce=e=>re().AES.encrypt(e,ue).toString(),de=e=>{const t=re().AES.decrypt(e,ue);return t.toString(re().enc.Utf8)},pe=e=>new Promise(((t,l)=>{const a=document.createElement("button"),n=new(ie())(a,{text:()=>e,action:()=>"copy",container:document.body});n.on("success",(e=>{n.destroy(),t(e)})),n.on("error",(e=>{n.destroy(),l(e)})),document.body.appendChild(a),a.click(),document.body.removeChild(a)})),ve=()=>new Promise(((e,t)=>{navigator.clipboard?.readText?navigator.clipboard.readText().then((l=>(l||t("剪贴板为空或者不包含文本"),e(l)))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")})),me=e=>{let t;try{t=JSON.parse(de(e))}catch{t=e}return t},he=e=>{const t=e.split("\r\n");""===t[t.length-1]&&t.pop();let l=-1;const a=[];for(const n in t){if(a[n]=t[n].split("\t"),1===a[n].length)return null;if(-1===l)l=a[n].length;else if(l!==a[n].length)return null}return a},fe=e=>{const{left:t,top:l,width:a,height:n,rotate:o=0}=e,i=Math.sqrt(Math.pow(a,2)+Math.pow(n,2))/2,s=180*Math.atan(n/a)/Math.PI,r=(180-o-s)*Math.PI/180,u=(s-o)*Math.PI/180,c=t+a/2,d=l+n/2,p=[c+i*Math.cos(r),c+i*Math.cos(u),c-i*Math.cos(r),c-i*Math.cos(u)],v=[d-i*Math.sin(r),d-i*Math.sin(u),d+i*Math.sin(r),d+i*Math.sin(u)];return{xRange:[Math.min(...p),Math.max(...p)],yRange:[Math.min(...v),Math.max(...v)]}},ge=e=>{const{xRange:t,yRange:l}=fe({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:a,yRange:n}=fe({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:a[0]-t[0],offsetY:n[0]-l[0]}},ye=e=>{let t,l,a,n;if("line"===e.type)t=e.left,l=e.left+Math.max(e.start[0],e.end[0]),a=e.top,n=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:o,top:i,width:s,height:r,rotate:u}=e,{xRange:c,yRange:d}=fe({left:o,top:i,width:s,height:r,rotate:u});t=c[0],l=c[1],a=d[0],n=d[1]}else t=e.left,l=e.left+e.width,a=e.top,n=e.top+e.height;return{minX:t,maxX:l,minY:a,maxY:n}},we=e=>{const t=[],l=[],a=[],n=[];e.forEach((e=>{const{minX:o,maxX:i,minY:s,maxY:r}=ye(e);t.push(o),l.push(s),a.push(i),n.push(r)}));const o=Math.min(...t),i=Math.max(...a),s=Math.min(...l),r=Math.max(...n);return{minX:o,maxX:i,minY:s,maxY:r}},xe=e=>{const t=[];return e.forEach((e=>{const l=t.findIndex((t=>t.value===e.value));if(-1===l)t.push(e);else{const a=t[l],n=Math.min(a.range[0],e.range[0]),o=Math.max(a.range[1],e.range[1]),i=[n,o],s={value:e.value,range:i};t[l]=s}})),t},ke=e=>{const t={};for(const l of e)t[l.id]=(0,r.x0)(10);return t},be=e=>{const t={},l={};for(const a of e){const e=a.groupId;e&&!t[e]&&(t[e]=(0,r.x0)(10)),l[a.id]=(0,r.x0)(10)}return{groupIdMap:t,elIdMap:l}},_e=e=>{const t=(0,M.Z)(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Ie=e=>{const t=e.start.join(","),l=e.end.join(",");if(e.broken){const a=e.broken.join(",");return`M${t} L${a} L${l}`}if(e.curve){const a=e.curve.join(",");return`M${t} Q${a} ${l}`}if(e.cubic){const[a,n]=e.cubic,o=a.join(","),i=n.join(",");return`M${t} C${o} ${i} ${l}`}return`M${t} L${l}`};var Se=l(6108),Ce=l(1061),Le=l(8261),Ee=l(9512),Te=l(2025),Me=l(9872),Ue=l(1321),We=l(2696),De=l(3271),He=l(9015),Fe=l(5761),Ae=l(7559),Ze=l(4023),$e=l(4141),Oe=l(5010),ze=l(6492),Pe=l(1094),Re=l(2677),Be=l(683),Ne=l(7259),je=l(1258),Ye=l(9978),Ve=l(597),Je=l(85),qe=l(6071),Xe=l(2489),Ge=l(9925),Ke=l(5361),Qe=l(3185),et=l(139),tt=l(8461),lt=l(2882),at=l(3862),nt=l(3764),ot=l(9371),it=l(9912),st=l(3935),rt=l(3735),ut=l(3542),ct=l(7537),dt=l(5314),pt=l(3325),vt=l(3275),mt=l(3317),ht=l(7712),ft=l(9370),gt=l(2778),yt=l(4422),wt=l(4957),xt=l(7872),kt=l(5356),bt=l(8684),_t=l(9577),It=l(887),St=l(6866),Ct=l(509),Lt=l(7606),Et=l(4412),Tt=l(8814),Mt=l(2057),Ut=l(6048),Wt=l(5114),Dt=l(9917),Ht=l(7747),Ft=l(7425),At=l(6717),Zt=l(6302),$t=l(3060),Ot=l(7107),zt=l(2100),Pt=l(5460),Rt=l(5268),Bt=l(1432),Nt=l(5193),jt=l(4566),Yt=l(7091),Vt=l(9602),Jt=l(4891),qt=l(4012),Xt=l(3681),Gt=l(1440),Kt=l(3482),Qt=l(646),el=l(8e3),tl=l(4628),ll=l(9141),al=l(1060),nl=l(8389),ol=l(3467),il=l(6935),sl=l(3590),rl=l(6453),ul=l(5957),cl=l(4467),dl=l(5547),pl=l(5650),vl=l(2790),ml=l(5620),hl=l(3339),fl=l(4666),gl=l(5215),yl=l(904),wl=l(3650),xl=l(4296),kl=l(6519),bl=l(4790),_l=l(3260),Il=l(2146),Sl=l(6755),Cl=l(2849),Ll=l(6940),El=l(6116),Tl=l(5741),Ml=l(2939),Ul=l(9524),Wl=l(6135),Dl=l(6821),Hl=l(6149);const Fl={IconPlayOne:Hl.Z,IconFullScreenPlay:Dl.Z,IconLock:Wl.Z,IconUnlock:Ul.Z,IconPpt:Ml.Z,IconFormat:Tl.Z,IconPicture:El.Z,IconFullScreen:Ll.Z,IconList:Cl.Z,IconOrderedList:Sl.Z,IconFlipVertically:Il.Z,IconFlipHorizontally:_l.Z,IconFontSize:bl.Z,IconCode:kl.Z,IconTextBold:xl.Z,IconTextItalic:wl.Z,IconTextUnderline:yl.Z,IconStrikethrough:gl.Z,IconEdit:fl.Z,IconQuote:hl.Z,IconBackgroundColor:ml.Z,IconGroup:vl.Z,IconUngroup:pl.Z,IconBack:dl.Z,IconNext:cl.Z,IconFullwidth:ul.Z,IconAlignTop:rl.Z,IconAlignLeft:sl.Z,IconAlignRight:il.Z,IconAlignBottom:ol.Z,IconAlignVertically:nl.Z,IconAlignHorizontally:al.Z,IconBringToFront:ll.Z,IconSendToBack:tl.Z,IconAlignTextLeft:el.Z,IconAlignTextRight:Qt.Z,IconAlignTextCenter:Kt.Z,IconAlignTextBoth:Gt.Z,IconRowHeight:Xt.Z,IconWrite:qt.Z,IconInsertTable:Jt.Z,IconAddText:Vt.Z,IconFill:Yt.Z,IconTailoring:jt.Z,IconEffects:Nt.Z,IconColorFilter:Bt.Z,IconUp:Rt.Z,IconDown:Pt.Z,IconPlus:zt.Z,IconMinus:Ot.Z,IconConnection:$t.Z,IconBringToFrontOne:Zt.Z,IconSentToBack:At.Z,IconGithub:Ft.Z,IconChartProportion:Ht.Z,IconChartHistogram:Dt.Z,IconChartHistogramOne:Wt.Z,IconChartLineArea:Ut.Z,IconChartRing:Mt.Z,IconChartScatter:Tt.Z,IconChartLine:Et.Z,IconChartPie:Lt.Z,IconText:Ct.Z,IconRotate:St.Z,IconLeftTwo:It.Z,IconRightTwo:_t.Z,IconPlatte:bt.Z,IconClose:kt.Z,IconCloseSmall:xt.Z,IconUndo:wt.Z,IconTransform:yt.Z,IconClick:gt.Z,IconTheme:ft.Z,IconArrowCircleLeft:ht.Z,IconGraphicDesign:mt.Z,IconLogout:vt.Z,IconErase:pt.Z,IconClear:dt.Z,IconAlignTextTopOne:ct.Z,IconAlignTextBottomOne:ut.Z,IconAlignTextMiddleOne:rt.Z,IconPause:st.Z,IconVolumeMute:it.Z,IconVolumeNotice:ot.Z,IconVolumeSmall:nt.Z,IconVideoTwo:at.Z,IconFormula:lt.Z,IconLinkOne:tt.Z,IconFullScreenOne:et.Z,IconOffScreenOne:Qe.Z,IconPower:Ke.Z,IconListView:Ge.Z,IconMagic:Xe.Z,IconHighLight:qe.Z,IconDownload:Je.Z,IconIndentLeft:Ve.Z,IconIndentRight:Ye.Z,IconVerticalSpacingBetweenItems:je.Z,IconCopy:Ne.Z,IconDelete:Be.Z,IconSquare:Re.Z,IconRound:Pe.Z,IconNeedle:ze.Z,IconTextRotationNone:Oe.Z,IconTextRotationDown:$e.Z,IconFormatBrush:Ze.Z,IconPreviewOpen:Ae.Z,IconPreviewClose:Fe.Z,IconStopwatchStart:He.Z,IconSearch:De.Z,IconLeft:We.Z,IconRight:Ue.Z,IconMoveOne:Me.Z,IconHamburgerButton:Te.Z,IconAttention:Ee.Z,IconCheckOne:Le.Z,IconCloseOne:Ce.Z,IconInfo:Se.Z};var Al={install(e){for(const t of Object.keys(Fl))e.component(t,Fl[t])}};const Zl=["id"],$l={class:"icons"},Ol={class:"content"},zl={key:0,class:"title"},Pl={class:"description"},Rl={key:0,class:"control"};var Bl=(0,i.aZ)({__name:"Message",props:{id:{},message:{},type:{default:"success"},title:{default:""},duration:{default:3e3},closable:{type:Boolean,default:!1}},emits:["close","destroy"],setup(e,{expose:t,emit:l}){const a=e,{IconAttention:o,IconCheckOne:r,IconCloseOne:u,IconInfo:c,IconCloseSmall:d}=Fl,p=(0,s.iH)(!0),v=(0,s.iH)(null),m=()=>{a.duration<=0||(v.value=setTimeout(f,a.duration))},h=()=>{v.value&&clearTimeout(v.value)},f=()=>p.value=!1;return(0,i.wF)((()=>{h()})),(0,i.bv)((()=>{m()})),t({close:f}),(e,t)=>((0,i.wg)(),(0,i.j4)(n.uT,{name:"message-fade",appear:"",mode:"in-out",onBeforeLeave:t[3]||(t[3]=e=>l("close")),onAfterLeave:t[4]||(t[4]=e=>l("destroy"))},{default:(0,i.w5)((()=>[p.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"message",id:e.id},[(0,i._)("div",{class:"message-container",onMouseenter:t[1]||(t[1]=e=>h()),onMouseleave:t[2]||(t[2]=e=>m())},[(0,i._)("div",$l,["warning"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(o),{key:0,theme:"filled",size:"18",fill:"#faad14"})):(0,i.kq)("",!0),"success"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(r),{key:1,theme:"filled",size:"18",fill:"#52c41a"})):(0,i.kq)("",!0),"error"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(u),{key:2,theme:"filled",size:"18",fill:"#ff4d4f"})):(0,i.kq)("",!0),"info"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(c),{key:3,theme:"filled",size:"18",fill:"#1677ff"})):(0,i.kq)("",!0)]),(0,i._)("div",Ol,[e.title?((0,i.wg)(),(0,i.iD)("div",zl,(0,ae.zw)(e.title),1)):(0,i.kq)("",!0),(0,i._)("div",Pl,(0,ae.zw)(e.message),1)]),e.closable?((0,i.wg)(),(0,i.iD)("div",Rl,[(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>f())},[(0,i.Wm)((0,s.SU)(d))])])):(0,i.kq)("",!0)],32)],8,Zl)):(0,i.kq)("",!0)])),_:1}))}}),Nl=l(3744);const jl=(0,Nl.Z)(Bl,[["__scopeId","data-v-2231702e"]]);var Yl=jl;const Vl=[];let Jl=null,ql=0;const Xl={duration:3e3},Gl=e=>{const t="message-"+ql++,l={...Xl,...e,id:t};Jl||(Jl=document.createElement("div"),Jl.className="message-wrap",Jl.style.cssText="\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n ",document.body.appendChild(Jl));const a=(0,i.Wm)(Yl,l,null),o=document.createElement("div");a.appContext=e.ctx||Gl._context||null,a.props.onClose=e.onClose,a.props.onDestroy=()=>{Jl&&Jl.childNodes.length<=1&&(Jl.remove(),Jl=null),(0,n.sY)(null,o)},(0,n.sY)(a,o),Jl.appendChild(o.firstElementChild);const s={id:t,close:()=>a?.component?.exposed?.close()};return Vl.push(s),s};Gl.success=(e,t)=>Gl({...t,type:"success",message:e}),Gl.info=(e,t)=>Gl({...t,type:"info",message:e}),Gl.warning=(e,t)=>Gl({...t,type:"warning",message:e}),Gl.error=(e,t)=>Gl({...t,type:"error",message:e}),Gl.closeAll=function(){for(let e=Vl.length-1;e>=0;e--)Vl[e].close()};var Kl=Gl;const Ql=e=>{const t=e.replace(/[\n\r]+/g,"
"),l=t.split("
");let a="";for(const n of l)n&&(a+=`
${n}
`);return a},ea=e=>new Promise((t=>{const l=document.createElement("img");l.src=e,l.style.opacity="0",document.body.appendChild(l),l.onload=()=>{const e=l.clientWidth,a=l.clientHeight;l.onload=null,l.onerror=null,document.body.removeChild(l),t({width:e,height:a})},l.onerror=()=>{l.onload=null,l.onerror=null}})),ta=e=>new Promise((t=>{const l=new FileReader;l.addEventListener("load",(()=>{t(l.result)})),l.readAsDataURL(e)})),la=1e3;var aa,na;(function(e){e["ROUND_RECT"]="roundRect",e["ROUND_RECT_DIAGONAL"]="roundRectDiagonal",e["ROUND_RECT_SINGLE"]="roundRectSingle",e["ROUND_RECT_SAMESIDE"]="roundRectSameSide",e["CUT_RECT_DIAGONAL"]="cutRectDiagonal",e["CUT_RECT_SINGLE"]="cutRectSingle",e["CUT_RECT_SAMESIDE"]="cutRectSameSide",e["CUT_ROUND_RECT"]="cutRoundRect",e["MESSAGE"]="message",e["ROUND_MESSAGE"]="roundMessage",e["L"]="L",e["RING_RECT"]="ringRect",e["PLUS"]="plus",e["TRIANGLE"]="triangle",e["PARALLELOGRAM_LEFT"]="parallelogramLeft",e["PARALLELOGRAM_RIGHT"]="parallelogramRight",e["TRAPEZOID"]="trapezoid",e["BULLET"]="bullet",e["INDICATOR"]="indicator"})(aa||(aa={})),function(e){e["TEXT"]="text",e["IMAGE"]="image",e["SHAPE"]="shape",e["LINE"]="line",e["CHART"]="chart",e["TABLE"]="table",e["LATEX"]="latex",e["VIDEO"]="video",e["AUDIO"]="audio"}(na||(na={}));const oa={[aa.ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L ${a} ${t} Q 0 ${t} 0 ${t-a} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t-a} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L ${a} ${t} Z`}},[aa.CUT_RECT_SINGLE]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} Z`}},[aa.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:.2,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} L ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[aa.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:.125,range:[0,1],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e} 0 L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[aa.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} Q 0 0 ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[aa.CUT_ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.MESSAGE]:{formula:(e,t)=>{const l=.2*e,a=.2*t;return`M 0 0 L ${e} 0 L ${e} ${t-a} L ${e/2} ${t-a} L ${e/2-l} ${t} L ${e/2-l} ${t-a} L 0 ${t-a} Z`}},[aa.ROUND_MESSAGE]:{formula:(e,t)=>{const l=.125*Math.min(e,t),a=.2*e,n=.2*t;return`M 0 ${l} Q 0 0 ${l} 0 L ${e-l} 0 Q ${e} 0 ${e} ${l} L ${e} ${t-l-n} Q ${e} ${t-n} ${e-l} ${t-n} L ${e/2} ${t-n} L ${e/2-a} ${t} L ${e/2-a} ${t-n} L ${l} ${t-n} Q 0 ${t-n} 0 ${t-l-n} L 0 ${l} Z`}},[aa.L]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-a} L ${a} ${t-a} L ${a} 0 Z`}},[aa.RING_RECT]:{editable:!0,defaultValue:.25,range:[.1,.45],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${a} ${a} L ${a} ${t-a} L ${e-a} ${t-a} L ${e-a} ${a} Z`}},[aa.PLUS]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"center",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${e/2-a/2} 0 L ${e/2-a/2} ${t/2-a/2} L 0 ${t/2-a/2} L 0 ${t/2+a/2} L ${e/2-a/2} ${t/2+a/2} L ${e/2-a/2} ${t} L ${e/2+a/2} ${t} L ${e/2+a/2} ${t/2+a/2} L ${e} ${t/2+a/2} L ${e} ${t/2-a/2} L ${e/2+a/2} ${t/2-a/2} L ${e/2+a/2} 0 Z`}},[aa.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L 0 ${t} L ${e} ${t} Z`}},[aa.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e} 0 L ${e-a} ${t} L 0 ${t} Z`}},[aa.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M 0 0 L ${e-a} 0 L ${e} ${t} L ${a} ${t} Z`}},[aa.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${t} L 0 ${t} Z`}},[aa.BULLET]:{editable:!0,defaultValue:.2,range:[0,1],relative:"top",getBaseSize:(e,t)=>t,formula:(e,t,l)=>{const a=t*l;return`M ${e/2} 0 L 0 ${a} L 0 ${t} L ${e} ${t} L ${e} ${a} Z`}},[aa.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${e} ${t/2} L ${e-a} 0 L 0 0 L ${a} ${t/2} L 0 ${t} L ${e-a} ${t} Z`}}},ia=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",pptxShapeType:"rect"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:aa.ROUND_RECT,pptxShapeType:"roundRect"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:aa.CUT_RECT_SINGLE,pptxShapeType:"snip1Rect"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:aa.CUT_RECT_SAMESIDE,pptxShapeType:"snip2SameRect"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:aa.CUT_RECT_DIAGONAL,pptxShapeType:"snip2DiagRect"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:aa.CUT_ROUND_RECT,pptxShapeType:"snipRoundRect"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:aa.ROUND_RECT_SINGLE,pptxShapeType:"round1Rect"},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:aa.ROUND_RECT_SAMESIDE,pptxShapeType:"round2SameRect"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:aa.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"},{viewBox:[200,200],path:"M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z",title:"任意多边形"}]},{type:"常用形状",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",pptxShapeType:"ellipse"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:aa.TRIANGLE,pptxShapeType:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:aa.PARALLELOGRAM_LEFT,pptxShapeType:"parallelogram"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:aa.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:aa.TRAPEZOID,pptxShapeType:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z",pptxShapeType:"diamond"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:aa.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:aa.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z",pptxShapeType:"pie"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z",pptxShapeType:"chord"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z",pptxShapeType:"teardrop"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z",pptxShapeType:"pentagon"},{viewBox:[200,200],path:"M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z",pptxShapeType:"hexagon"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z",pptxShapeType:"octagon"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:aa.L},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:aa.RING_RECT},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:aa.PLUS},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:aa.MESSAGE},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:aa.ROUND_MESSAGE},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z",pptxShapeType:"star4"},{viewBox:[1024,1024],path:"M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z",pptxShapeType:"star5",special:!0},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z",pptxShapeType:"star6"},{viewBox:[200,200],path:"M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z"},{viewBox:[200,200],path:"M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z"}]},{type:"箭头",children:[{viewBox:[200,200],path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z",pptxShapeType:"upArrow"},{viewBox:[200,200],path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z",pptxShapeType:"downArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z",pptxShapeType:"leftArrow"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"rightArrow"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z",pptxShapeType:"upDownArrow"},{viewBox:[200,200],path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z",pptxShapeType:"leftRightArrow"},{viewBox:[200,200],path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"notchedRightArrow"},{viewBox:[200,200],path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z"},{viewBox:[200,200],path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z",pptxShapeType:"chevron"},{viewBox:[200,200],path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:[200,200],path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z",pptxShapeType:"homePlate"},{viewBox:[200,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",children:[{viewBox:[1024,1024],path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z",special:!0},{viewBox:[1024,1024],path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z",special:!0},{viewBox:[1024,1024],path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z",special:!0},{viewBox:[1024,1024],path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z",special:!0},{viewBox:[1024,1024],path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z",special:!0},{viewBox:[1024,1024],path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z",special:!0},{viewBox:[1024,1024],path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z",special:!0},{viewBox:[1024,1024],path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z",special:!0},{viewBox:[1024,1024],path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z",special:!0},{viewBox:[1024,1024],path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z",special:!0},{viewBox:[1024,1024],path:"M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z",special:!0},{viewBox:[1024,1024],path:"M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z",special:!0},{viewBox:[1024,1024],path:"M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z",special:!0},{viewBox:[1024,1024],path:"M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0}]}],sa={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var ra=()=>{const e=Y(),t=(0,U.debounce)((function(){e.addSnapshot()}),300,{trailing:!0}),l=(0,U.throttle)((function(){e.reDo()}),100,{leading:!0,trailing:!1}),a=(0,U.throttle)((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:a}},ua=()=>{const e=$(),t=F(),{creatingElement:l}=(0,o.Jk)(e),{theme:a,viewportRatio:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=ra(),s=(a,n)=>{t.addElement(a),e.setActiveElementIdList([a.id]),l.value&&e.setCreatingElement(null),setTimeout((()=>{e.setEditorareaFocus(!0)}),0),n&&n(),i()},u=e=>{ea(e).then((({width:t,height:l})=>{const a=l/t;ala?(t=la,l=t*a):l>la*n.value&&(l=la*n.value,t=l/a),s({type:"image",id:(0,r.x0)(10),src:e,width:t,height:l,left:(la-t)/2,top:(la*n.value-l)/2,fixedRatio:!0,rotate:0})}))},c=e=>{const t={type:"chart",id:(0,r.x0)(10),chartType:sa[e],left:300,top:81.25,width:400,height:400,rotate:0,themeColor:[a.value.themeColor],gridColor:a.value.fontColor,data:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1"],series:[[12,19,5,2,18]]}},l={..."bar"===e?{horizontalBars:!1,stackBars:!1}:{},..."horizontalBar"===e?{horizontalBars:!0,stackBars:!1}:{},..."line"===e?{showLine:!0,lineSmooth:!0,showArea:!1}:{},..."area"===e?{showLine:!0,lineSmooth:!0,showArea:!0}:{},..."scatter"===e?{showLine:!1,lineSmooth:!0,showArea:!1}:{},..."pie"===e?{donut:!1}:{},..."ring"===e?{donut:!0}:{}};s({...t,options:l})},d=(e,t)=>{const l={fontname:a.value.fontName,color:a.value.fontColor},o=[];for(let a=0;a{const{left:l,top:n,width:o,height:i}=e,u=t?.content||"",c=t?.vertical||!1,d=(0,r.x0)(10);s({type:"text",id:d,left:l,top:n,width:o,height:i,content:u,rotate:0,defaultFontName:a.value.fontName,defaultColor:a.value.fontColor,vertical:c},(()=>{setTimeout((()=>{const e=document.querySelector(`#editable-element-${d} .ProseMirror`);e&&e.focus()}),0)}))},v=(e,t)=>{const{left:l,top:n,width:o,height:i}=e,u={type:"shape",id:(0,r.x0)(10),left:l,top:n,width:o,height:i,viewBox:t.viewBox,path:t.path,fill:a.value.themeColor,fixedRatio:!1,rotate:0};if(t.special&&(u.special=!0),t.pathFormula){u.pathFormula=t.pathFormula,u.viewBox=[o,i];const e=oa[t.pathFormula];"editable"in e?(u.path=e.formula(o,i,e.defaultValue),u.keypoint=e.defaultValue):u.path=e.formula(o,i)}s(u)},m=(e,t)=>{const{left:l,top:n,start:o,end:i}=e,u={type:"line",id:(0,r.x0)(10),left:l,top:n,start:o,end:i,points:t.points,color:a.value.themeColor,style:t.style,width:2};t.isBroken&&(u.broken=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCurve&&(u.curve=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCubic&&(u.cubic=[[(o[0]+i[0])/2,(o[1]+i[1])/2],[(o[0]+i[0])/2,(o[1]+i[1])/2]]),s(u)},h=e=>{s({type:"latex",id:(0,r.x0)(10),width:e.w,height:e.h,rotate:0,left:(la-e.w)/2,top:(la*n.value-e.h)/2,path:e.path,latex:e.latex,color:a.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},f=e=>{s({type:"video",id:(0,r.x0)(10),width:500,height:300,rotate:0,left:(la-500)/2,top:(la*n.value-300)/2,src:e,autoplay:!1})},g=e=>{s({type:"audio",id:(0,r.x0)(10),width:50,height:50,rotate:0,left:(la-50)/2,top:(la*n.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:a.value.themeColor,src:e})};return{createImageElement:u,createChartElement:c,createTableElement:d,createTextElement:p,createShapeElement:v,createLineElement:m,createLatexElement:h,createVideoElement:f,createAudioElement:g}},ca=()=>{const e=$(),t=F(),{currentSlide:l,slides:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=ra(),s=a=>{const{groupIdMap:o,elIdMap:i}=be(a),s=a[0];let r,u=0;do{r=l.value.elements.find((e=>{if(e.type!==s.type)return!1;const{minX:t,maxX:l,minY:a,maxY:n}=ye(e),{minX:o,maxX:i,minY:r,maxY:c}=ye({...s,left:s.left+u,top:s.top+u});return t===o&&l===i&&a===r&&n===c})),r&&(u+=10)}while(r);for(const e of a)e.id=i[e.id],e.left=e.left+u,e.top=e.top+u,e.groupId&&(e.groupId=o[e.groupId]);t.addElement(a),e.setActiveElementIdList(Object.values(i)),n()},u=e=>{const l=ke(e),a=e.map((e=>{const{groupIdMap:t,elIdMap:a}=be(e.elements);for(const n of e.elements)n.id=a[n.id],n.groupId&&(n.groupId=t[n.groupId]),n.link&&"slide"===n.link.type&&(l[n.link.target]?n.link.target=l[n.link.target]:delete n.link);if(e.animations)for(const l of e.animations)l.id=(0,r.x0)(10),l.elId=a[l.elId];return{...e,id:l[e.id]}}));t.addSlide(a),n()},c=(0,i.Fl)((()=>!(a.value.length>1)&&!(a.value[0].elements.length>0)));return{addElementsFromData:s,addSlidesFromData:u,isEmptySlide:c}},da=()=>{const{createTextElement:e}=ua(),{addElementsFromData:t,addSlidesFromData:l}=ca(),a=t=>{e({left:0,top:0,width:600,height:50},{content:t})},n=(e,n)=>{const o=n?.onlySlide||!1,i=n?.onlyElements||!1,s=me(e);if("object"===typeof s){const{type:e,data:a}=s;"elements"!==e||o?"slides"!==e||i||l(a):t(a)}else if(!i&&!o){const e=Ql(s);a(e)}};return{pasteTextClipboardData:n}},pa=()=>{const e=$(),t=F(),{selectedSlidesIndex:l,activeElementIdList:a}=(0,o.Jk)(e),{currentSlide:n,slides:s,theme:u,slideIndex:c}=(0,o.Jk)(t),d=(0,i.Fl)((()=>[...l.value,c.value])),p=(0,i.Fl)((()=>s.value.filter(((e,t)=>d.value.includes(t))))),v=(0,i.Fl)((()=>p.value.map((e=>e.id)))),{pasteTextClipboardData:m}=da(),{addSlidesFromData:h}=ca(),{addHistorySnapshot:f}=ra(),g=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([l])},y=l=>{l===le.UP&&c.value>0?(a.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(c.value-1)):l===le.DOWN&&c.value{const t=ce(JSON.stringify({type:"slides",data:p.value}));pe(t).then((()=>{e.setThumbnailsFocus(!0)}))},x=()=>{ve().then((e=>{m(e,{onlySlide:!0})})).catch((e=>Kl.warning(e)))},k=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),f()},b=l=>{const{groupIdMap:a,elIdMap:n}=be(l.elements);for(const e of l.elements)e.id=n[e.id],e.groupId&&(e.groupId=a[e.groupId]);const o={...l,id:(0,r.x0)(10)};e.setActiveElementIdList([]),t.addSlide(o),f()},_=()=>{const e=JSON.parse(JSON.stringify(n.value));h([e])},I=(l=v.value)=>{s.value.length===l.length?g():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),f()},S=()=>{const e=[...v.value];w(),I(e)},C=()=>{const t=Array.from(Array(s.value.length),((e,t)=>t));e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},L=(e,l)=>{if(l===e)return;const a=JSON.parse(JSON.stringify(s.value)),n=a[l];a.splice(l,1),a.splice(e,0,n),t.setSlides(a),t.updateSlideIndex(e)};return{resetSlides:g,updateSlideIndex:y,copySlide:w,pasteSlide:x,createSlide:k,createSlideByTemplate:b,copyAndPasteSlide:_,deleteSlide:I,cutSlide:S,selectAllSlide:C,sortSlides:L}},va=()=>{const e=$(),t=F(),{activeElementIdList:l}=(0,o.Jk)(e),{currentSlide:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=ra(),i=()=>{const o=JSON.parse(JSON.stringify(a.value.elements));for(const e of o)l.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:o}),e.setActiveElementIdList([]),n()},s=l=>{const o=JSON.parse(JSON.stringify(a.value.elements));if(l.groupId){const a=[];for(const e of o)e.groupId===l.groupId&&(e.lock=!1,a.push(e.id));t.updateSlide({elements:o}),e.setActiveElementIdList(a)}else{for(const e of o)if(e.id===l.id){e.lock=!1;break}t.updateSlide({elements:o}),e.setActiveElementIdList([l.id])}n()};return{lockElement:i,unlockElement:s}},ma=()=>{const e=$(),t=F(),{activeElementIdList:l,activeGroupElementId:a}=(0,o.Jk)(e),{currentSlide:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=ra(),s=()=>{if(!l.value.length)return;let o=[];o=a.value?n.value.elements.filter((e=>e.id!==a.value)):n.value.elements.filter((e=>!l.value.includes(e.id))),e.setActiveElementIdList([]),t.updateSlide({elements:o}),i()},r=()=>{n.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),i())};return{deleteElement:s,deleteAllElements:r}},ha=()=>{const e=$(),t=F(),{activeElementIdList:l,activeElementList:a,handleElementId:n}=(0,o.Jk)(e),{currentSlide:s}=(0,o.Jk)(t),{addHistorySnapshot:u}=ra(),c=(0,i.Fl)((()=>{if(a.value.length<2)return!1;const e=a.value[0].groupId;if(!e)return!0;const t=a.value.every((t=>(t.groupId&&t.groupId)===e));return!t})),d=()=>{if(!a.value.length)return;let e=JSON.parse(JSON.stringify(s.value.elements));const n=(0,r.x0)(10),o=[];for(const t of e)l.value.includes(t.id)&&(t.groupId=n,o.push(t));const i=e.findIndex((e=>e.id===o[o.length-1].id)),c=o.map((e=>e.id));e=e.filter((e=>!c.includes(e.id)));const d=i-o.length+1;e.splice(d,0,...o),t.updateSlide({elements:e}),u()},p=()=>{if(!a.value.length)return;const o=a.value.some((e=>e.groupId));if(!o)return;const i=JSON.parse(JSON.stringify(s.value.elements));for(const e of i)l.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:i});const r=n.value?[n.value]:[];e.setActiveElementIdList(r),u()};return{canCombine:c,combineElements:d,uncombineElements:p}},fa=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(e),{pasteTextClipboardData:a}=da(),{deleteElement:n}=ma(),i=()=>{if(!t.value.length)return;const a=ce(JSON.stringify({type:"elements",data:l.value}));pe(a).then((()=>{e.setEditorareaFocus(!0)}))},s=()=>{i(),n()},r=()=>{ve().then((e=>{a(e)})).catch((e=>Kl.warning(e)))},u=()=>{i(),r()};return{copyElement:i,cutElement:s,pasteElement:r,quickCopyElement:u}},ga=()=>{const e=$(),{currentSlide:t}=(0,o.Jk)(F()),{hiddenElementIdList:l}=(0,o.Jk)(e),a=()=>{const a=t.value.elements.filter((e=>!e.lock&&!l.value.includes(e.id))),n=a.map((e=>e.id));e.setActiveElementIdList(n)};return{selectAllElement:a}},ya=()=>{const e=F(),{activeElementIdList:t,activeGroupElementId:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=(o,i=1)=>{let s=[];const r=e=>{let{left:t,top:l}=e;switch(o){case le.LEFT:t-=i;break;case le.RIGHT:t+=i;break;case le.UP:l-=i;break;case le.DOWN:l+=i;break;default:break}return{...e,left:t,top:l}};s=l.value?a.value.elements.map((e=>l.value===e.id?r(e):e)):a.value.elements.map((e=>t.value.includes(e.id)?r(e):e)),e.updateSlide({elements:s}),n()};return{moveElement:i}},wa=(l(541),()=>{const e=F(),{currentSlide:t}=(0,o.Jk)(e),{addHistorySnapshot:l}=ra(),a=(e,t)=>({minLevel:e.findIndex((e=>e.id===t[0].id)),maxLevel:e.findIndex((e=>e.id===t[t.length-1].id))}),n=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return;const s=l[i+1],r=l.splice(o,n.length);if(s.groupId){const e=l.filter((e=>e.groupId===s.groupId));l.splice(o+e.length,0,...r)}else l.splice(o+1,0,...r)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return;const n=l[a+1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a+e.length,0,o)}else l.splice(a+1,0,o)}return l},i=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l[o-1],s=l.splice(o,n.length);if(i.groupId){const e=l.filter((e=>e.groupId===i.groupId));l.splice(o-e.length,0,...s)}else l.splice(o-1,0,...s)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;const n=l[a-1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a-e.length,0,o)}else l.splice(a-1,0,o)}return l},s=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return null;const s=l.splice(o,n.length);l.push(...s)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return null;l.splice(a,1),l.push(t)}return l},r=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l.splice(o,n.length);l.unshift(...i)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;l.splice(a,1),l.unshift(t)}return l},u=(a,o)=>{let u;o===G.UP?u=n(t.value.elements,a):o===G.DOWN?u=i(t.value.elements,a):o===G.TOP?u=s(t.value.elements,a):o===G.BOTTOM&&(u=r(t.value.elements,a)),u&&(e.updateSlide({elements:u}),l())};return{orderElement:u}});const xa=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},ka=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},ba=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var _a=()=>{const e=J(),t=F(),l=()=>{xa(),e.setScreening(!0)},a=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),ba()&&ka()};return{enterScreening:l,enterScreeningFromStart:a,exitScreening:n}},Ia=()=>{const e=$(),{canvasPercentage:t,canvasScale:l,canvasDragged:a}=(0,o.Jk)(e),n=(0,i.Fl)((()=>Math.round(100*l.value)+"%")),s=l=>{let a=t.value;const n=5,o=200,i=30;"+"===l&&a<=o&&(a+=n),"-"===l&&a>=i&&(a-=n),e.setCanvasPercentage(a)},r=a=>{const n=Math.round(a/l.value*t.value)/100;e.setCanvasPercentage(n)},u=()=>{e.setCanvasPercentage(90),a&&e.setCanvasDragged(!1)};return{canvasScalePercentage:n,setCanvasScalePercentage:r,scaleCanvas:s,resetCanvas:u}},Sa=()=>{const e=$(),t=V(),{activeElementIdList:l,disableHotkeys:a,handleElement:n,handleElementId:s,editorAreaFocus:r,thumbnailsFocus:u,showSearchPanel:c}=(0,o.Jk)(e),{currentSlide:d}=(0,o.Jk)(F()),{ctrlKeyState:p,shiftKeyState:v,spaceKeyState:m}=(0,o.Jk)(t),{updateSlideIndex:h,copySlide:f,createSlide:g,deleteSlide:y,cutSlide:w,copyAndPasteSlide:x,selectAllSlide:k}=pa(),{combineElements:b,uncombineElements:_}=ha(),{deleteElement:I}=ma(),{lockElement:S}=va(),{copyElement:C,cutElement:L,quickCopyElement:E}=fa(),{selectAllElement:T}=ga(),{moveElement:M}=ya(),{orderElement:U}=wa(),{redo:W,undo:D}=ra(),{enterScreening:H,enterScreeningFromStart:A}=_a(),{scaleCanvas:Z,resetCanvas:O}=Ia(),z=()=>{l.value.length?C():u.value&&f()},P=()=>{l.value.length?L():u.value&&w()},R=()=>{l.value.length?E():u.value&&x()},B=()=>{r.value&&T(),u.value&&k()},N=()=>{r.value&&S()},j=()=>{r.value&&b()},Y=()=>{r.value&&_()},J=()=>{l.value.length?I():u.value&&y()},q=e=>{l.value.length?M(e):e!==le.UP&&e!==le.DOWN||h(e)},X=e=>{e===le.PAGEUP?h(le.UP):e===le.PAGEDOWN&&h(le.DOWN)},K=e=>{n.value&&U(n.value,e)},Q=()=>{u.value&&g()},ee=()=>{if(!d.value.elements.length)return;if(!s.value){const t=d.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=d.value.elements.findIndex((e=>e.id===s.value)),l=t>=d.value.elements.length-1?0:t+1,a=d.value.elements[l].id;e.setActiveElementIdList([a])},te=l=>{const{ctrlKey:n,shiftKey:o,altKey:i,metaKey:s}=l,d=n||s,m=l.key.toUpperCase();if(d&&!p.value&&t.setCtrlKeyState(!0),o&&!v.value&&t.setShiftKeyState(!0),a.value||m!==le.SPACE||t.setSpaceKeyState(!0),d&&m===le.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(o&&m===le.F5)return l.preventDefault(),H(),void t.setShiftKeyState(!1);if(m===le.F5)return l.preventDefault(),void A();if(n&&m===le.F)return l.preventDefault(),void e.setSearchPanelState(!c.value);if(r.value||u.value){if(d&&m===le.C){if(a.value)return;l.preventDefault(),z()}if(d&&m===le.X){if(a.value)return;l.preventDefault(),P()}if(d&&m===le.D){if(a.value)return;l.preventDefault(),R()}if(d&&m===le.Z){if(a.value)return;l.preventDefault(),D()}if(d&&m===le.Y){if(a.value)return;l.preventDefault(),W()}if(d&&m===le.A){if(a.value)return;l.preventDefault(),B()}if(d&&m===le.L){if(a.value)return;l.preventDefault(),N()}if(!o&&d&&m===le.G){if(a.value)return;l.preventDefault(),j()}if(o&&d&&m===le.G){if(a.value)return;l.preventDefault(),Y()}if(i&&m===le.F){if(a.value)return;l.preventDefault(),K(G.TOP)}if(i&&m===le.B){if(a.value)return;l.preventDefault(),K(G.BOTTOM)}if(m===le.DELETE||m===le.BACKSPACE){if(a.value)return;l.preventDefault(),J()}if(m===le.UP){if(a.value)return;l.preventDefault(),q(le.UP)}if(m===le.DOWN){if(a.value)return;l.preventDefault(),q(le.DOWN)}if(m===le.LEFT){if(a.value)return;l.preventDefault(),q(le.LEFT)}if(m===le.RIGHT){if(a.value)return;l.preventDefault(),q(le.RIGHT)}if(m===le.PAGEUP){if(a.value)return;l.preventDefault(),X(le.PAGEUP)}if(m===le.PAGEDOWN){if(a.value)return;l.preventDefault(),X(le.PAGEDOWN)}if(m===le.ENTER){if(a.value)return;l.preventDefault(),Q()}if(m===le.MINUS){if(a.value)return;l.preventDefault(),Z("-")}if(m===le.EQUAL){if(a.value)return;l.preventDefault(),Z("+")}if(m===le.DIGIT_0){if(a.value)return;l.preventDefault(),O()}if(m===le.TAB){if(a.value)return;l.preventDefault(),ee()}}},ae=()=>{p.value&&t.setCtrlKeyState(!1),v.value&&t.setShiftKeyState(!1),m.value&&t.setSpaceKeyState(!1)};(0,i.bv)((()=>{document.addEventListener("keydown",te),document.addEventListener("keyup",ae),window.addEventListener("blur",ae)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",te),document.removeEventListener("keyup",ae),window.removeEventListener("blur",ae)}))},Ca=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=(0,o.Jk)($()),{pasteTextClipboardData:a}=da(),{createImageElement:n}=ua(),s=e=>{ta(e).then((e=>n(e)))},r=n=>{if(!e.value&&!t.value)return;if(l.value)return;if(!n.clipboardData)return;const o=n.clipboardData.items,i=o[0];if(i){for(const e of o)if("file"===e.kind&&-1!==e.type.indexOf("image")){const t=e.getAsFile();return void(t&&s(t))}"string"===i.kind&&"text/plain"===i.type&&i.getAsString((e=>a(e)))}};(0,i.bv)((()=>{document.addEventListener("paste",r)})),(0,i.Ah)((()=>{document.removeEventListener("paste",r)}))},La=l(7536),Ea=()=>{const e=F(),{theme:t}=(0,o.Jk)(F()),{addSlidesFromData:l,isEmptySlide:a}=ca(),n=(0,s.iH)(!1),i=(t,n=!1)=>{const o=t[0],i=new FileReader;i.addEventListener("load",(()=>{try{const t=JSON.parse(de(i.result));n||a.value?e.setSlides(t):l(t)}catch{Kl.error("无法正确读取 / 解析该文件")}})),i.readAsText(o)},u=e=>{let t=[0,0],l=[0,0];return e.isFlipV||e.isFlipH?e.isFlipV&&e.isFlipH?(t=[e.width,e.height],l=[0,0]):e.isFlipV&&!e.isFlipH?(t=[0,e.height],l=[e.width,0]):(t=[e.width,0],l=[0,e.height]):(t=[0,0],l=[e.width,e.height]),{type:"line",id:(0,r.x0)(10),width:e.borderWidth||1,left:e.left,top:e.top,start:t,end:l,style:e.borderType,color:e.borderColor,points:["","straightConnector1"===e.shapType?"arrow":""]}},c=o=>{const i=o[0];if(!i)return;n.value=!0;const s=[];for(const e of ia)s.push(...e.children);const c=new FileReader;c.onload=async o=>{const i=await(0,La.Q)(o.target.result),c=i.size.width,d=la/c,p=[];for(const e of i.slides){const{type:l,value:a}=e.fill;let n;n="image"===l?{type:"image",image:a.picBase64,imageSize:"cover"}:"gradient"===l?{type:"gradient",gradientType:"linear",gradientColor:[a.colors[0],a.colors[1]],gradientRotate:a.rot}:{type:"solid",color:a};const o={id:(0,r.x0)(10),elements:[],background:n},i=e=>{for(const l of e)if(l.width=l.width*d,l.height=l.height*d,l.left=l.left*d,l.top=l.top*d,"text"===l.type)o.elements.push({type:"text",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,rotate:l.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:l.content,lineHeight:1,outline:{color:l.borderColor,width:l.borderWidth,style:l.borderType},fill:l.fillColor});else if("image"===l.type)o.elements.push({type:"image",id:(0,r.x0)(10),src:l.src,width:l.width,height:l.height,left:l.left,top:l.top,fixedRatio:!0,rotate:l.rotate});else if("shape"===l.type)if("line"===l.shapType||"straightConnector1"===l.shapType){const e=u(l);o.elements.push(e)}else{const e=s.find((e=>e.pptxShapeType===l.shapType)),a={type:"shape",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:l.fillColor||"none",fixedRatio:!1,rotate:l.rotate,outline:{color:l.borderColor,width:l.borderWidth,style:l.borderType},text:{content:l.content,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:"middle"}};if(e&&(a.path=e.path,a.viewBox=e.viewBox,e.pathFormula)){a.pathFormula=e.pathFormula,a.viewBox=[l.width,l.height];const t=oa[e.pathFormula];"editable"in t?(a.path=t.formula(l.width,l.height,t.defaultValue),a.keypoint=t.defaultValue):a.path=t.formula(l.width,l.height)}o.elements.push(a)}else if("table"===l.type){const e=l.data.length,a=l.data[0].length,n={fontname:t.value.fontName,color:t.value.fontColor},i=[];for(let t=0;te+"")),a=["系列1"],n=[l.data[1]]):(e=Object.values(l.data[0].xlabels),a=l.data.map((e=>e.key)),n=l.data.map((e=>e.values.map((e=>e.y)))));let i={},s="bar";"barChart"===l.chartType&&(s="bar"),"stackedBarChart"===l.chartType?(s="bar",i={stackBars:!0}):"lineChart"===l.chartType?s="line":"areaChart"===l.chartType?(s="line",i={showArea:!0}):"scatterChart"===l.chartType?(s="line",i={showLine:!1}):"pieChart"!==l.chartType&&"pie3DChart"!==l.chartType||(s="pie"),o.elements.push({type:"chart",id:(0,r.x0)(10),chartType:s,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,themeColor:[t.value.themeColor],gridColor:t.value.fontColor,data:{labels:e,legends:a,series:n},options:i})}else if("group"===l.type){const e=l.elements.map((e=>({...e,left:e.left+l.left,top:e.top+l.top})));i(e)}};i(e.elements),p.push(o)}a.value?e.setSlides(p):l(p),n.value=!1},c.readAsArrayBuffer(i)};return{importSpecificFile:i,importPPTXFile:c,exporting:n}};const Ta={class:"hotkey-doc"},Ma={class:"title"},Ua={class:"label"},Wa={class:"value"};var Da=(0,i.aZ)({__name:"HotkeyDoc",setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ta,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ne),(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.type},[(0,i._)("div",Ma,(0,ae.zw)(e.type),1),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"hotkey-item",key:e.label},[(0,i._)("div",Ua,(0,ae.zw)(e.label),1),(0,i._)("div",Wa,(0,ae.zw)(e.value),1)])))),128))],64)))),128))]))}});const Ha=(0,Nl.Z)(Da,[["__scopeId","data-v-a0322054"]]);var Fa=Ha;const Aa=["accept"];var Za=(0,i.aZ)({__name:"FileInput",props:{accept:{default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=(0,s.iH)(),a=()=>{l.value&&(l.value.value="",l.value.click())},n=e=>{const l=e.target.files;l&&t("change",l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"file-input",onClick:t[1]||(t[1]=e=>a())},[(0,i.WI)(e.$slots,"default"),(0,i._)("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:l,accept:e.accept,onChange:t[0]||(t[0]=e=>n(e))},null,40,Aa)]))}});const $a=(0,Nl.Z)(Za,[["__scopeId","data-v-64bedb34"]]);var Oa=$a;const za=e=>((0,i.dD)("data-v-a5c6b41c"),e=e(),(0,i.Cn)(),e),Pa={key:0,class:"fullscreen-spin"},Ra={class:"spin"},Ba=za((()=>(0,i._)("div",{class:"spinner"},null,-1))),Na={class:"text"};var ja=(0,i.aZ)({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{default:""}},setup(e){return(e,t)=>e.loading?((0,i.wg)(),(0,i.iD)("div",Pa,[(0,i._)("div",Ra,[Ba,(0,i._)("div",Na,(0,ae.zw)(e.tip),1)])])):(0,i.kq)("",!0)}});const Ya=(0,Nl.Z)(ja,[["__scopeId","data-v-a5c6b41c"]]);var Va=Ya;const Ja={class:"header"};var qa=(0,i.aZ)({__name:"Drawer",props:{visible:{type:Boolean},width:{default:320},contentStyle:{},placement:{default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(!1),o=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));return(e,s)=>{const r=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:`drawer-slide-${e.placement}`,onAfterLeave:s[1]||(s[1]=e=>a.value=!1),onBeforeEnter:s[2]||(s[2]=e=>a.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:(0,ae.C_)(["drawer",e.placement]),style:(0,ae.j5)({width:l.width+"px"})},[(0,i._)("div",Ja,[(0,i.WI)(e.$slots,"title"),(0,i._)("span",{class:"close-btn",onClick:s[0]||(s[0]=e=>t("update:visible",!1))},[(0,i.Wm)(r)])]),a.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"content",style:(0,ae.j5)(o.value)},[(0,i.WI)(e.$slots,"default")],4)):(0,i.kq)("",!0)],6),[[n.F8,e.visible]])])),_:3},8,["name"])])}}});const Xa=(0,Nl.Z)(qa,[["__scopeId","data-v-749dadac"]]);var Ga=Xa;const Ka={class:"prefix"},Qa=["disabled","value","placeholder"],en={class:"suffix"};var tn=(0,i.aZ)({__name:"Input",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{expose:t,emit:l}){const a=(0,s.iH)(!1),o=e=>{l("update:value",e.target.value)},r=e=>{a.value=!1,l("blur",e)},u=e=>{a.value=!0,l("focus",e)},c=(0,s.iH)(),d=()=>{c.value&&c.value.focus()};return t({focus:d}),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["input",{disabled:e.disabled,focused:a.value}])},[(0,i._)("span",Ka,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("input",{type:"text",ref_key:"inputRef",ref:c,disabled:e.disabled,value:e.value,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>o(e)),onFocus:t[1]||(t[1]=e=>u(e)),onBlur:t[2]||(t[2]=e=>r(e)),onChange:t[3]||(t[3]=e=>l("change",e)),onKeydown:t[4]||(t[4]=(0,n.D2)((e=>l("enter",e)),["enter"]))},null,40,Qa),(0,i._)("span",en,[(0,i.WI)(e.$slots,"suffix")])],2))}});const ln=(0,Nl.Z)(tn,[["__scopeId","data-v-a97ba0dc"]]);var an=ln,nn=l(6488),on=(l(8627),(0,i.aZ)({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(),n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(!1),u=(0,i.Fl)((()=>l.contentStyle||{}));return(0,i.YP)((()=>l.value),(()=>{a.value&&(l.value?a.value.show():a.value.hide())})),(0,i.bv)((()=>{a.value=(0,nn.ZP)(n.value,{content:o.value,allowHTML:!0,trigger:l.trigger,placement:l.placement,interactive:!0,appendTo:l.appendTo||document.body,maxWidth:"none",offset:[0,8],duration:200,animation:"scale",theme:"popover",onShow(){r.value=!0},onShown(){l.value||t("update:value",!0)},onHidden(){l.value&&t("update:value",!1),r.value=!1}})})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["popover",{center:e.center}]),ref_key:"triggerRef",ref:n},[(0,i._)("div",{class:"popover-content",style:(0,ae.j5)(u.value),ref_key:"contentRef",ref:o},[r.value?(0,i.WI)(e.$slots,"content",{key:0}):(0,i.kq)("",!0)],4),(0,i.WI)(e.$slots,"default")],2))}}));const sn=(0,Nl.Z)(on,[["__scopeId","data-v-70fabe9a"]]);var rn=sn,un=(0,i.aZ)({__name:"PopoverMenuItem",props:{center:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["popover-menu-item",{center:e.center}]),onClick:l[0]||(l[0]=e=>t("click"))},[(0,i.WI)(e.$slots,"default")],2))}});const cn=(0,Nl.Z)(un,[["__scopeId","data-v-2f137c4f"]]);var dn=cn;const pn={class:"editor-header"},vn={class:"left"},mn={class:"menu-item"},hn={class:"title"},fn=["title"],gn={class:"right"},yn={class:"group-menu-item"},wn={class:"arrow-btn"},xn={class:"github-link",href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},kn={class:"menu-item"};var bn=(0,i.aZ)({__name:"index",setup(e){const t=$(),l=F(),{title:a}=(0,o.Jk)(l),{enterScreening:n,enterScreeningFromStart:r}=_a(),{importSpecificFile:u,importPPTXFile:c,exporting:d}=Ea(),{resetSlides:p}=pa(),v=(0,s.iH)(!1),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(),g=(0,s.iH)(""),y=()=>{g.value=a.value,h.value=!0,(0,i.Y3)((()=>f.value?.focus()))},w=()=>{l.setTitle(g.value),h.value=!1},x=e=>{window.open(e),v.value=!1},k=e=>{t.setDialogForExport(e),v.value=!1};return(e,t)=>{const l=(0,i.up)("IconHamburgerButton"),o=(0,i.up)("IconPpt"),b=(0,i.up)("IconDown"),_=(0,i.up)("IconDownload"),I=(0,i.up)("IconGithub"),S=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",pn,[(0,i._)("div",vn,[(0,i.Wm)(rn,{trigger:"click",placement:"bottom-start",value:v.value,"onUpdate:value":t[7]||(t[7]=e=>v.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Oa,{accept:".pptist",onChange:t[0]||(t[0]=e=>{(0,s.SU)(u)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptist 文件")])),_:1})])),_:1}),(0,i.Wm)(Oa,{accept:"application/vnd.openxmlformats-officedocument.presentationml.presentation",onChange:t[1]||(t[1]=e=>{(0,s.SU)(c)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptx 文件(测试版)")])),_:1})])),_:1}),(0,i.Wm)(dn,{onClick:t[2]||(t[2]=e=>k("pptx"))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出文件")])),_:1}),(0,i.Wm)(dn,{onClick:t[3]||(t[3]=e=>{(0,s.SU)(p)(),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Uk)("重置幻灯片")])),_:1}),(0,i.Wm)(dn,{onClick:t[4]||(t[4]=e=>x("https://github.com/pipipi-pikachu/PPTist/issues"))},{default:(0,i.w5)((()=>[(0,i.Uk)("意见反馈")])),_:1}),(0,i.Wm)(dn,{onClick:t[5]||(t[5]=e=>x("https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md"))},{default:(0,i.w5)((()=>[(0,i.Uk)("常见问题")])),_:1}),(0,i.Wm)(dn,{onClick:t[6]||(t[6]=e=>{v.value=!1,m.value=!0})},{default:(0,i.w5)((()=>[(0,i.Uk)("快捷键")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",mn,[(0,i.Wm)(l,{class:"icon"})])])),_:1},8,["value"]),(0,i._)("div",hn,[h.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"title-input",ref_key:"titleInputRef",ref:f,value:g.value,"onUpdate:value":t[8]||(t[8]=e=>g.value=e),onBlur:t[9]||(t[9]=e=>w())},null,8,["value"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"title-text",onClick:t[10]||(t[10]=e=>y()),title:(0,s.SU)(a)},(0,ae.zw)((0,s.SU)(a)),9,fn))])]),(0,i._)("div",gn,[(0,i._)("div",yn,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[11]||(t[11]=e=>(0,s.SU)(n)())},[(0,i.Wm)(o,{class:"icon"})])),[[S,"幻灯片放映"]]),(0,i.Wm)(rn,{trigger:"click",center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:t[12]||(t[12]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从头开始")])),_:1}),(0,i.Wm)(dn,{onClick:t[13]||(t[13]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从当前页开始")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",wn,[(0,i.Wm)(b,{class:"arrow"})])])),_:1})]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[14]||(t[14]=e=>k("pptx"))},[(0,i.Wm)(_,{class:"icon"})])),[[S,"导出"]]),(0,i._)("a",xn,[(0,i._)("div",kn,[(0,i.Wm)(I,{class:"icon"})])])]),(0,i.Wm)(Ga,{width:320,visible:m.value,"onUpdate:visible":t[15]||(t[15]=e=>m.value=e),placement:"right"},{default:(0,i.w5)((()=>[(0,i.Wm)(Fa)])),_:1},8,["visible"]),(0,i.Wm)(Va,{loading:(0,s.SU)(d),tip:"正在导入..."},null,8,["loading"])])}}});const _n=(0,Nl.Z)(bn,[["__scopeId","data-v-2394d37c"]]);var In=_n;const Sn=Symbol(),Cn=Symbol(),Ln=Symbol(),En=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var Tn=e=>{const t=(0,s.iH)(0),l=(0,s.iH)(0),a=$(),{canvasPercentage:n,canvasDragged:r}=(0,o.Jk)(a),{viewportRatio:u}=(0,o.Jk)(F()),c=()=>{if(!e.value)return;const o=e.value.clientWidth,i=e.value.clientHeight;if(i/o>u.value){const e=o*(n.value/100);a.setCanvasScale(e/la),t.value=(o-e)/2,l.value=(i-e*u.value)/2}else{const e=i*(n.value/100);a.setCanvasScale(e/(la*u.value)),t.value=(o-e/u.value)/2,l.value=(i-e)/2}},d=(n,o)=>{if(!e.value)return;const i=e.value.clientWidth,s=e.value.clientHeight,r=i*(n/100),c=i*(o/100),d=s*(n/100),p=s*(o/100);s/i>u.value?a.setCanvasScale(r/la):a.setCanvasScale(d/(la*u.value)),t.value=t.value-(r-c)/2,l.value=l.value-(d-p)/2};(0,i.YP)(n,d),(0,i.YP)(u,c),(0,i.YP)(r,(()=>{r.value||c()}));const p=(0,i.Fl)((()=>({width:la,height:la*u.value,left:t.value,top:l.value}))),v=new ResizeObserver(c);(0,i.bv)((()=>{e.value&&v.observe(e.value)})),(0,i.Ah)((()=>{e.value&&v.unobserve(e.value)}));const m=e=>{let n=!0;const o=e.pageX,i=e.pageY,s=t.value,r=l.value;document.onmousemove=e=>{if(!n)return;const a=e.pageX,u=e.pageY;t.value=s+(a-o),l.value=r+(u-i)},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,a.setCanvasDragged(!0)}};return{viewportStyles:p,dragViewport:m}},Mn=(e,t)=>{const l=$(),{canvasScale:a,hiddenElementIdList:n}=(0,o.Jk)(l),i=(0,s.iH)(!1),r=(0,s.iH)(1),u=(0,s.iH)({top:0,left:0,width:0,height:0}),c=o=>{if(!t.value)return;let s=!0;const c=t.value.getBoundingClientRect(),d=5,p=o.pageX,v=o.pageY,m=(p-c.x)/a.value,h=(v-c.y)/a.value;u.value={top:h,left:m,width:0,height:0},i.value=!1,r.value=4,document.onmousemove=e=>{if(!s)return;const t=e.pageX,l=e.pageY,n=(t-p)/a.value,o=(l-v)/a.value,c=Math.abs(n),m=Math.abs(o);if(c0&&o>0?h=4:n<0&&o<0?h=2:n>0&&o<0?h=1:n<0&&o>0&&(h=3),u.value={...u.value,width:c,height:m},i.value=!0,r.value=h},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,s=!1;let t=[];for(let l=0;lo&&pi&&mo-s&&pi-c&&mo&&pi-c&&mo-s&&pi&&m{if(l.groupId){const a=t.map((e=>e.id)),n=e.value.filter((e=>e.groupId===l.groupId));return n.every((e=>a.includes(e.id)))}return!0}));const a=t.map((e=>e.id));l.setActiveElementIdList(a),i.value=!1}};return{mouseSelection:u,mouseSelectionVisible:i,mouseSelectionQuadrant:r,updateMouseSelection:c}},Un=e=>{const{disableHotkeys:t}=(0,o.Jk)($()),{createImageElement:l,createTextElement:a}=ua(),n=e=>{if(!e.dataTransfer||0===e.dataTransfer.items.length)return;const n=e.dataTransfer.items[0];if("file"===n.kind&&-1!==n.type.indexOf("image")){const e=n.getAsFile();e&&ta(e).then((e=>l(e)))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString((e=>{if(t.value)return;const l=Ql(e);a({left:0,top:0,width:600,height:50},{content:l})}))};(0,i.bv)((()=>{e.value&&e.value.addEventListener("drop",n),document.ondragleave=e=>e.preventDefault(),document.ondrop=e=>e.preventDefault(),document.ondragenter=e=>e.preventDefault(),document.ondragover=e=>e.preventDefault()})),(0,i.Ah)((()=>{e.value&&e.value.removeEventListener("drop",n),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null}))};const Wn=(e,t)=>{const l=Math.atan2(e,t),a=180/Math.PI*l;return a};var Dn=(e,t,l)=>{const a=F(),{addHistorySnapshot:n}=ra(),o=(o,i)=>{const s=!(o instanceof MouseEvent);if(s&&(!o.changedTouches||!o.changedTouches[0]))return;let r=!0,u=0;const c=i.rotate||0,d=i.left,p=i.top,v=i.width,m=i.height,h=d+v/2,f=p+m/2;if(!t.value)return;const g=t.value.getBoundingClientRect(),y=t=>{if(!r)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=(a-g.left)/l.value,s=(n-g.top)/l.value,c=o-h,d=f-s;u=Wn(c,d);const p=5;Math.abs(u)<=p?u=0:u>0&&Math.abs(u-45)<=p?u-=u-45:u<0&&Math.abs(u+45)<=p?u-=u+45:u>0&&Math.abs(u-90)<=p?u-=u-90:u<0&&Math.abs(u+90)<=p?u-=u+90:u>0&&Math.abs(u-135)<=p?u-=u-135:u<0&&Math.abs(u+135)<=p?u-=u+135:u>0&&Math.abs(u-180)<=p?u-=u-180:u<0&&Math.abs(u+180)<=p&&(u-=u+180),e.value=e.value.map((e=>i.id===e.id?{...e,rotate:u}:e))},w=()=>{r=!1,document.onmousemove=null,document.onmouseup=null,c!==u&&(a.updateSlide({elements:e.value}),n())};s?(document.ontouchmove=y,document.ontouchend=w):(document.onmousemove=y,document.onmouseup=w)};return{rotateElement:o}};const Hn={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},Fn={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20,latex:20},An=(e,t)=>{const{left:l,top:a,width:n,height:o}=e,i=Math.sqrt(Math.pow(n,2)+Math.pow(o,2))/2,s=180*Math.atan(o/n)/Math.PI,r=(180-t-s)*Math.PI/180,u=(s-t)*Math.PI/180,c=(90-t)*Math.PI/180,d=t*Math.PI/180,p=n/2,v=o/2,m=l+p,h=a+v,f={left:m+i*Math.cos(r),top:h-i*Math.sin(r)},g={left:m+v*Math.cos(c),top:h-v*Math.sin(c)},y={left:m+i*Math.cos(u),top:h-i*Math.sin(u)},w={left:m+p*Math.cos(d),top:h+p*Math.sin(d)},x={left:m-i*Math.cos(r),top:h+i*Math.sin(r)},k={left:m-v*Math.sin(d),top:h+v*Math.cos(d)},b={left:m-i*Math.cos(u),top:h+i*Math.sin(u)},_={left:m-p*Math.cos(d),top:h-p*Math.sin(d)};return{leftTopPoint:f,topPoint:g,rightTopPoint:y,rightPoint:w,rightBottomPoint:x,bottomPoint:k,leftBottomPoint:b,leftPoint:_}},Zn=(e,t)=>{const l={[ee.RIGHT_BOTTOM]:t.leftTopPoint,[ee.LEFT_BOTTOM]:t.rightTopPoint,[ee.LEFT_TOP]:t.rightBottomPoint,[ee.RIGHT_TOP]:t.leftBottomPoint,[ee.TOP]:t.bottomPoint,[ee.BOTTOM]:t.topPoint,[ee.LEFT]:t.rightPoint,[ee.RIGHT]:t.leftPoint};return l[e]};var $n,On,zn=(e,t,l)=>{const a=$(),n=F(),{activeElementIdList:i,activeGroupElementId:s}=(0,o.Jk)(a),{viewportRatio:r}=(0,o.Jk)(n),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(V()),{addHistorySnapshot:c}=ra(),d=(o,d,p)=>{const v=!(o instanceof MouseEvent);if(v&&(!o.changedTouches||!o.changedTouches[0]))return;let m=!0;a.setScalingState(!0);const h=d.left,f=d.top,g=d.width,y=d.height,w="table"===d.type?d.cellMinHeight:0,x="rotate"in d&&d.rotate?d.rotate:0,k=Math.PI*x/180,b=u.value||"fixedRatio"in d&&d.fixedRatio,_=g/y,I=v?o.changedTouches[0].pageX:o.pageX,S=v?o.changedTouches[0].pageY:o.pageY,C=Fn[d.type]||20,L=e=>e{const a=5,n=[];let o=!1,i=!1;const s={offsetX:0,offsetY:0};if(l||0===l)for(let t=0;t{if(!m)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=a-I,i=n-S;let s=g,r=y,u=h,c=f;if(x){const e=(Math.cos(k)*o+Math.sin(k)*i)/l.value;let t=(Math.cos(k)*i-Math.sin(k)*o)/l.value;b&&(p!==ee.RIGHT_BOTTOM&&p!==ee.LEFT_TOP||(t=e/_),p!==ee.LEFT_BOTTOM&&p!==ee.RIGHT_TOP||(t=-e/_)),p===ee.RIGHT_BOTTOM?(s=L(g+e),r=L(y+t)):p===ee.LEFT_BOTTOM?(s=L(g-e),r=L(y+t),u=h-(s-g)):p===ee.LEFT_TOP?(s=L(g-e),r=L(y-t),u=h-(s-g),c=f-(r-y)):p===ee.RIGHT_TOP?(s=L(g+e),r=L(y-t),c=f-(r-y)):p===ee.TOP?(r=L(y-t),c=f-(r-y)):p===ee.BOTTOM?r=L(y+t):p===ee.LEFT?(s=L(g-e),u=h-(s-g)):p===ee.RIGHT&&(s=L(g+e));const a=An({width:s,height:r,left:u,top:c},x),n=Zn(p,a),d=n.left,v=n.top,m=d-T,w=v-M;u-=m,c-=w}else{let e=o/l.value,t=i/l.value;if(b&&(p!==ee.RIGHT_BOTTOM&&p!==ee.LEFT_TOP||(t=e/_),p!==ee.LEFT_BOTTOM&&p!==ee.RIGHT_TOP||(t=-e/_)),p===ee.RIGHT_BOTTOM){const{offsetX:l,offsetY:a}=D(h+g+e,f+y+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g+e),r=L(y+t)}else if(p===ee.LEFT_BOTTOM){const{offsetX:l,offsetY:a}=D(h+e,f+y+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g-e),r=L(y+t),u=h-(s-g)}else if(p===ee.LEFT_TOP){const{offsetX:l,offsetY:a}=D(h+e,f+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g-e),r=L(y-t),u=h-(s-g),c=f-(r-y)}else if(p===ee.RIGHT_TOP){const{offsetX:l,offsetY:a}=D(h+g+e,f+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g+e),r=L(y-t),c=f-(r-y)}else if(p===ee.LEFT){const{offsetX:t}=D(h+e,null);e-=t,s=L(g-e),u=h-(s-g)}else if(p===ee.RIGHT){const{offsetX:t}=D(h+g+e,null);e-=t,s=L(g+e)}else if(p===ee.TOP){const{offsetY:e}=D(null,f+t);t-=e,r=L(y-t),c=f-(r-y)}else if(p===ee.BOTTOM){const{offsetY:e}=D(null,f+y+t);t-=e,r=L(y+t)}}e.value=e.value.map((e=>{if(d.id!==e.id)return e;if("shape"===e.type&&"pathFormula"in e&&e.pathFormula){const t=oa[e.pathFormula];let l="";return l="editable"in t?t.formula(s,r,e.keypoint):t.formula(s,r),{...e,left:u,top:c,width:s,height:r,viewBox:[s,r],path:l}}if("table"===e.type){let t=w+(r-y)/e.data.length;return t=t<36?36:t,t===w?{...e,left:u,width:s}:{...e,left:u,top:c,width:s,height:r,cellMinHeight:t<36?36:t}}return{...e,left:u,top:c,width:s,height:r}}))},F=l=>{m=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const o=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,i=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;I===o&&S===i||(n.updateSlide({elements:e.value}),a.setScalingState(!1),c())};v?(document.ontouchmove=H,document.ontouchend=F):(document.onmousemove=H,document.onmouseup=F)},p=(t,a,o)=>{let s=!0;const{minX:r,maxX:d,minY:p,maxY:v}=a,m=d-r,h=v-p,f=m/h,g=t.pageX,y=t.pageY,w=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!s)return;const a=t.pageX,n=t.pageY,c=(a-g)/l.value;let x=(n-y)/l.value;u.value&&(o!==ee.RIGHT_BOTTOM&&o!==ee.LEFT_TOP||(x=c/f),o!==ee.LEFT_BOTTOM&&o!==ee.RIGHT_TOP||(x=-c/f));let k=r,b=d,_=p,I=v;o===ee.RIGHT_BOTTOM?(b=d+c,I=v+x):o===ee.LEFT_BOTTOM?(k=r+c,I=v+x):o===ee.LEFT_TOP?(k=r+c,_=p+x):o===ee.RIGHT_TOP?(b=d+c,_=p+x):o===ee.TOP?_=p+x:o===ee.BOTTOM?I=v+x:o===ee.LEFT?k=r+c:o===ee.RIGHT&&(b=d+c);const S=b-k,C=I-_;let L=S/m,E=C/h;L<=0&&(L=0),E<=0&&(E=0),e.value=e.value.map((e=>{if(("image"===e.type||"shape"===e.type)&&i.value.includes(e.id)){const t=w.find((t=>t.id===e.id));return{...e,width:t.width*L,height:t.height*E,left:k+(t.left-r)*L,top:_+(t.top-p)*E}}return e}))},document.onmouseup=t=>{s=!1,document.onmousemove=null,document.onmouseup=null,g===t.pageX&&y===t.pageY||(n.updateSlide({elements:e.value}),c())}};return{scaleElement:d,scaleMultiElement:p}},Pn=(e,t)=>{const l=$(),{activeElementIdList:a,activeGroupElementId:n,handleElementId:i,editorAreaFocus:s}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(o,u,c=!0)=>{if(s.value||l.setEditorareaFocus(!0),a.value.includes(u.id)){if(r.value){let t=[];if(u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=a.value.filter((e=>!l.includes(e)))}else t=a.value.filter((e=>e!==u.id));t.length>0&&l.setActiveElementIdList(t)}else if(i.value!==u.id)l.setHandleElementId(u.id);else if(n.value!==u.id){const e=o instanceof MouseEvent?o.pageX:o.changedTouches[0].pageX,t=o instanceof MouseEvent?o.pageY:o.changedTouches[0].pageY;o.target.onmouseup=a=>{const n=a.pageX,o=a.pageY;e===n&&t===o&&(l.setActiveGroupElementId(u.id),a.target.onmouseup=null)}}}else{let t=[];if(t=r.value?[...a.value,u.id]:[u.id],u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=[...t,...l]}l.setActiveElementIdList((0,U.uniq)(t)),l.setHandleElementId(u.id)}c&&t(o,u)};return{selectElement:u}},Rn=(e,t,l)=>{const a=F(),{activeElementIdList:n,activeGroupElementId:i}=(0,o.Jk)($()),{shiftKeyState:s}=(0,o.Jk)(V()),{viewportRatio:r}=(0,o.Jk)(a),{addHistorySnapshot:u}=ra(),c=(o,c)=>{const d=!(o instanceof MouseEvent);if(d&&(!o.changedTouches||!o.changedTouches[0]))return;if(!n.value.includes(c.id))return;let p=!0;const v=la,m=la*r.value,h=5,f=JSON.parse(JSON.stringify(e.value)),g=f.filter((e=>n.value.includes(e.id))),y=c.left,w=c.top,x=c.width,k="height"in c&&c.height?c.height:0,b="rotate"in c&&c.rotate?c.rotate:0,_=d?o.changedTouches[0].pageX:o.pageX,I=d?o.changedTouches[0].pageY:o.pageY;let S=null;const C=c.id===i.value;let L=[],E=[];for(const t of e.value){if("line"===t.type)continue;if(C&&t.id===c.id)continue;if(!C&&n.value.includes(t.id))continue;let e,l,a,o;if("rotate"in t&&t.rotate){const{xRange:n,yRange:i}=fe({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=n[0],l=i[0],a=n[1]-n[0],o=i[1]-i[0]}else e=t.left,l=t.top,a=t.width,o=t.height;const i=e+a,s=l+o,r=l+o/2,u=e+a/2,d={value:l,range:[e,i]},p={value:s,range:[e,i]},v={value:r,range:[e,i]},m={value:e,range:[l,s]},h={value:i,range:[l,s]},f={value:u,range:[l,s]};L.push(d,p,v),E.push(m,h,f)}const T={value:0,range:[0,v]},M={value:m,range:[0,v]},U={value:m/2,range:[0,v]},W={value:0,range:[0,m]},D={value:v,range:[0,m]},H={value:v/2,range:[0,m]};L.push(T,M,U),E.push(W,D,H),L=xe(L),E=xe(E);const F=a=>{const o=a instanceof MouseEvent?a.pageX:a.changedTouches[0].pageX,i=a instanceof MouseEvent?a.pageY:a.changedTouches[0].pageY;if(!1!==S&&(S=Math.abs(_-o)Math.abs(u)&&(u=0),Math.abs(r)e.id===c.id?{...e,left:T,top:M}:e));else{const t=e.value.find((e=>e.id===c.id));if(!t)return;e.value=e.value.map((e=>n.value.includes(e.id)?e.id===c.id?{...e,left:T,top:M}:{...e,left:e.left+(T-t.left),top:e.top+(M-t.top)}:e))}},A=l=>{p=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const n=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,o=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;_===n&&I===o||(a.updateSlide({elements:e.value}),u())};d?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)};return{dragElement:c}},Bn=e=>{const t=F(),{canvasScale:l}=(0,o.Jk)($()),{addHistorySnapshot:a}=ra(),n=(n,o,i)=>{let s=!0;const r=8,u=n.pageX,c=n.pageY,d=[];for(let t=0;t{if(!s)return;const a=t.pageX,n=t.pageY,p=(a-u)/l.value,v=(n-c)/l.value;let m=o.left+o.start[0],h=o.top+o.start[1],f=o.left+o.end[0],g=o.top+o.end[1];const y=o.broken||o.curve||[0,0];let w=o.left+y[0],x=o.top+y[1];const[k,b]=o.cubic||[[0,0],[0,0]];let _=o.left+k[0],I=o.top+k[1],S=o.left+b[0],C=o.top+b[1];if(i===te.START){m+=p,h+=v,Math.abs(m-f)f&&(U[0]=T-L,W[0]=0),h>g&&(U[1]=M-E,W[1]=0),e.value=e.value.map((e=>{if(e.id===o.id){const t={...e,left:L,top:E,start:U,end:W};return i===te.START||i===te.END?(o.broken&&(t.broken=[(U[0]+W[0])/2,(U[1]+W[1])/2]),o.curve&&(t.curve=[(U[0]+W[0])/2,(U[1]+W[1])/2]),o.cubic&&(t.cubic=[[(U[0]+W[0])/2,(U[1]+W[1])/2],[(U[0]+W[0])/2,(U[1]+W[1])/2]])):i===te.C?(o.broken&&(t.broken=[w-L,x-E]),o.curve&&(t.curve=[w-L,x-E])):o.cubic&&(t.cubic=[[_-L,I-E],[S-L,C-E]]),t}return e}))},document.onmouseup=l=>{s=!1,document.onmousemove=null,document.onmouseup=null;const n=l.pageX,o=l.pageY;u===n&&c===o||(t.updateSlide({elements:e.value}),a())}};return{dragLineElement:n}},Nn=(e,t)=>{const l=F(),{addHistorySnapshot:a}=ra(),n=(n,o)=>{const i=!(n instanceof MouseEvent);if(i&&(!n.changedTouches||!n.changedTouches[0]))return;let s=!0;const r=i?n.changedTouches[0].pageX:n.pageX,u=i?n.changedTouches[0].pageY:n.pageY,c=oa[o.pathFormula];let d=null;if("editable"in c){const e=c.getBaseSize(o.width,o.height),t=e*o.keypoint,[l,a]=c.range,n=c.relative;d={baseSize:e,originPos:t,min:l,max:a,relative:n}}const p=l=>{if(!s)return;const a=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,n=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY,i=(a-r)/t.value,p=(n-u)/t.value;e.value=e.value.map((e=>{if(e.id===o.id&&d){const{baseSize:t,originPos:l,min:a,max:n,relative:o}=d,s=e;let r=0;return"left"===o&&(r=(l+i)/t),"right"===o&&(r=(l-i)/t),"center"===o&&(r=(l-2*i)/t),"top"===o&&(r=(l+p)/t),"bottom"===o&&(r=(l-p)/t),rn&&(r=n),{...e,keypoint:r,path:c.formula(s.width,s.height,r)}}return e}))},v=t=>{s=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const n=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,o=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;r===n&&u===o||(l.updateSlide({elements:e.value}),a())};i?(document.ontouchmove=p,document.ontouchend=v):(document.onmousemove=p,document.onmouseup=v)};return{moveShapeKeypoint:n}},jn=e=>{const t=$(),{canvasScale:l,creatingElement:a}=(0,o.Jk)(t),n=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value;return{left:m,top:h,width:f,height:g}},i=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value,y=[i===c?0:f,s===p?0:g],w=[r===c?0:f,u===p?0:g];return{left:m,top:h,start:y,end:w}},{createTextElement:s,createShapeElement:r,createLineElement:u}=ua(),c=e=>{if(!a.value)return;const l=a.value.type;if("text"===l){const t=n(e);t&&s(t,{vertical:a.value.vertical})}else if("shape"===l){const t=n(e);t&&r(t,a.value.data)}else if("line"===l){const t=i(e);t&&u(t,a.value.data)}t.setCreatingElement(null)};return{formatCreateSelection:n,insertElementFromCreateSelection:c}},Yn=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(e),{addHistorySnapshot:i}=ra(),s=o=>{const s=la,r=la*n.value,{minX:u,maxX:c,minY:d,maxY:p}=we(l.value),v=JSON.parse(JSON.stringify(a.value.elements));for(const e of v)if(t.value.includes(e.id)){if(o===K.CENTER){const t=d+(p-d)/2-r/2,l=u+(c-u)/2-s/2;e.top=e.top-t,e.left=e.left-l}if(o===K.TOP){const t=d-0;e.top=e.top-t}else if(o===K.VERTICAL){const t=d+(p-d)/2-r/2;e.top=e.top-t}else if(o===K.BOTTOM){const t=p-r;e.top=e.top-t}else if(o===K.LEFT){const t=u-0;e.left=e.left-t}else if(o===K.HORIZONTAL){const t=u+(c-u)/2-s/2;e.left=e.left-t}else if(o===K.RIGHT){const t=c-s;e.left=e.left-t}}e.updateSlide({elements:v}),i()};return{alignElementToCanvas:s}},Vn=e=>{const t=(0,i.Fl)((()=>{if(e.value){const{h:t,v:l,blur:a,color:n}=e.value;return`${t}px ${l}px ${a}px ${n}`}return""}));return{shadowStyle:t}},Jn=(e,t)=>{const l=(0,i.Fl)((()=>{let l="";return e.value&&t.value?l="rotateX(180deg) rotateY(180deg)":t.value?l="rotateX(180deg)":e.value&&(l="rotateY(180deg)"),l}));return{flipStyle:l}};(function(e){e["RECT"]="rect",e["ELLIPSE"]="ellipse",e["POLYGON"]="polygon"})($n||($n={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(On||(On={}));const qn={rect:{name:"矩形",type:$n.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:$n.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:$n.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L ${.2*e} ${t} L 0 ${.8*t} Z`},roundRect:{name:"圆角矩形",type:$n.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:$n.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:$n.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${.5*e} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:$n.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${.5*e} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:$n.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:"菱形",type:$n.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.5*t} L ${.5*e} ${t} L 0 ${.5*t} Z`},pentagon:{name:"五边形",type:$n.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:$n.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${.2*e} 0 L ${.8*e} 0 L ${e} ${.5*t} L ${.8*e} ${t} L ${.2*e} ${t} L 0 ${.5*t} Z`},heptagon:{name:"七边形",type:$n.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${.5*e} 0 L ${.9*e} ${.2*t} L ${e} ${.6*t} L ${.75*e} ${t} L ${.25*e} ${t} L 0 ${.6*t} L ${.1*e} ${.2*t} Z`},octagon:{name:"八边形",type:$n.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${.3*e} 0 L ${.7*e} 0 L ${e} ${.3*t} L ${e} ${.7*t} L ${.7*e} ${t} L ${.3*e} ${t} L 0 ${.7*t} L 0 ${.3*t} Z`},chevron:{name:"V形",type:$n.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} L ${.25*e} ${.5*t} L 0 0 Z`},point:{name:"点",type:$n.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:$n.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${.2*t} L ${.6*e} ${.2*t} L ${.6*e} 0 L ${e} ${.5*t} L ${.6*e} ${t} L ${.6*e} ${.8*t} L 0 ${.8*t} Z`},parallelogram:{name:"平行四边形",type:$n.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${.3*e} 0 L ${e} 0 L ${.7*e} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:$n.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${.3*e} ${t} L ${e} ${t} L ${.7*e} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:$n.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${.25*e} 0 L ${.75*e} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:$n.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${.75*e} ${t} L ${.25*e} ${t} Z`}};var Xn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return qn.rect;const t=e.value.shape||$n.RECT;return qn[t]})),l=(0,i.Fl)((()=>{if(!e.value)return{top:"0",left:"0",width:"100%",height:"100%"};const[t,l]=e.value.range,a=(l[0]-t[0])/100,n=(l[1]-t[1])/100,o=t[0]/a,i=t[1]/n;return{left:-o+"%",top:-i+"%",width:100/a+"%",height:100/n+"%"}}));return{clipShape:t,imgPosition:l}},Gn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return"";let t="";const l=Object.keys(e.value);for(const a of l)t+=`${a}(${e.value[a]}) `;return t}));return{filter:t}},Kn=e=>{const t=(0,i.Fl)((()=>e.value?.width??0)),l=(0,i.Fl)((()=>e.value?.style||"solid")),a=(0,i.Fl)((()=>e.value?.color||"#d14424")),n=(0,i.Fl)((()=>{if("dashed"!==l.value)return"0 0";const e=t.value;return e<=6?`${4.5*e} ${2*e}`:`${4*e} ${1.5*e}`}));return{outlineWidth:t,outlineStyle:l,outlineColor:a,strokeDashArray:n}};const Qn=["width","height"],eo=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var to=(0,i.aZ)({__name:"ImageRectOutline",props:{width:{},height:{},outline:{},radius:{default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,eo)],8,Qn)):(0,i.kq)("",!0)}});const lo=(0,Nl.Z)(to,[["__scopeId","data-v-35e36256"]]);var ao=lo;const no=["width","height"],oo=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var io=(0,i.aZ)({__name:"ImageEllipseOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,oo)],8,no)):(0,i.kq)("",!0)}});const so=(0,Nl.Z)(io,[["__scopeId","data-v-11836cf8"]]);var ro=so;const uo=["width","height"],co=["d","stroke","stroke-width","stroke-dasharray"];var po=(0,i.aZ)({__name:"ImagePolygonOutline",props:{width:{},height:{},createPath:{type:Function},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,co)],8,uo)):(0,i.kq)("",!0)}});const vo=(0,Nl.Z)(po,[["__scopeId","data-v-6e021ee2"]]);var mo=vo;const ho={class:"image-outline"};var fo=(0,i.aZ)({__name:"index",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:a}=Xn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ho,["rect"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(ao,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:(0,s.SU)(a).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(ro,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(mo,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:(0,s.SU)(a).createPath},null,8,["width","height","outline","createPath"])):(0,i.kq)("",!0)]))}});const go=fo;var yo=go;const wo=e=>((0,i.dD)("data-v-5984406b"),e=e(),(0,i.Cn)(),e),xo=["src"],ko=["src"],bo=["onMousedown"],_o=wo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})],-1))),Io=[_o],So=["onMousedown"],Co=wo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1))),Lo=[Co];var Eo=(0,i.aZ)({__name:"ImageClipHandler",props:{src:{},clipPath:{},width:{},height:{},top:{},left:{},rotate:{},clipData:{}},emits:["clip"],setup(e,{emit:t}){const l=e,{canvasScale:a}=(0,o.Jk)($()),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(0,s.iH)({top:"0",left:"0"}),c=(0,s.iH)(!1),d=(0,s.iH)(null),p=()=>{const[e,t]=l.clipData?l.clipData.range:[[0,0],[100,100]],a=(t[0]-e[0])/100,n=(t[1]-e[1])/100,o=e[0]/a,i=e[1]/n;return{widthScale:a,heightScale:n,left:o,top:i}},v=(0,i.Fl)((()=>{const{widthScale:e,heightScale:t,left:l,top:a}=p();return{left:-l,top:-a,width:100/e,height:100/t}})),m=(0,i.Fl)((()=>({top:v.value.top+"%",left:v.value.left+"%",width:v.value.width+"%",height:v.value.height+"%"}))),h=(0,s.iH)({top:0,left:0,width:0,height:0}),f=(0,i.Fl)((()=>{const{top:e,left:t,width:l,height:a}=h.value;return{top:e+"%",left:t+"%",width:l+"%",height:a+"%"}})),g=(0,i.Fl)((()=>{const e=v.value.width,t=v.value.height,{top:l,left:a,width:n,height:o}=h.value;return{left:100/n*-a+"%",top:100/o*-l+"%",width:e/n*100+"%",height:t/o*100+"%"}})),y=()=>{const{left:e,top:t}=p();h.value={left:e,top:t,width:100,height:100},u.value={top:-t+"%",left:-e+"%"}},w=()=>{if(c.value)return;if(!d.value)return void t("clip",null);const{left:e,top:a}=p(),n={left:(h.value.left-e)/100*l.width,top:(h.value.top-a)/100*l.height,width:(h.value.width-100)/100*l.width,height:(h.value.height-100)/100*l.height},o={range:d.value,position:n};t("clip",o)},x=e=>{const t=e.key.toUpperCase();t===le.ENTER&&w()};(0,i.bv)((()=>{y(),document.addEventListener("keydown",x)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",x)}));const k=()=>{const e={left:parseInt(g.value.left),top:parseInt(g.value.top),width:parseInt(g.value.width),height:parseInt(g.value.height)},t=100/e.width,l=100/e.height,a=[-e.left*t,-e.top*l],n=[100*t+a[0],100*l+a[1]];d.value=[a,n]},b=e=>{c.value=!0;let t=!0;const n=e.pageX,o=e.pageY,i=v.value,s={...h.value};document.onmousemove=e=>{if(!t)return;const r=e.pageX,u=e.pageY;let c=(r-n)/a.value/l.width*100,d=(u-o)/a.value/l.height*100;l.rotate>45&&l.rotate<135&&(c=(u-o)/a.value/l.width*100,d=-(r-n)/a.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(c=-c,d=-d),l.rotate>-135&&l.rotate<-45&&(c=-(u-o)/a.value/l.width*100,d=(r-n)/a.value/l.height*100);let p=s.left+c,v=s.top+d;p<0?p=0:p+s.width>i.width&&(p=i.width-s.width),v<0?v=0:v+s.height>i.height&&(v=i.height-s.height),h.value={...h.value,left:p,top:v}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,k(),setTimeout((()=>{c.value=!1}),0)}},_=(e,t)=>{c.value=!0;let n=!0;const o=50/l.width*100,i=50/l.height*100,s=e.pageX,u=e.pageY,d=v.value,p={...h.value},m=h.value.width/h.value.height;document.onmousemove=e=>{if(!n)return;const c=e.pageX,v=e.pageY;let f,g,y,w,x=(c-s)/a.value/l.width*100,k=(v-u)/a.value/l.height*100;l.rotate>45&&l.rotate<135&&(x=(v-u)/a.value/l.width*100,k=-(c-s)/a.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(x=-x,k=-k),l.rotate>-135&&l.rotate<-45&&(x=-(v-u)/a.value/l.width*100,k=(c-s)/a.value/l.height*100),r.value&&(t!==ee.RIGHT_BOTTOM&&t!==ee.LEFT_TOP||(k=x/m),t!==ee.LEFT_BOTTOM&&t!==ee.RIGHT_TOP||(k=-x/m)),t===ee.LEFT_TOP?(p.left+x<0&&(x=-p.left),p.top+k<0&&(k=-p.top),p.width-xd.width&&(x=d.width-(p.left+p.width)),p.top+k<0&&(k=-p.top),p.width+xd.height&&(k=d.height-(p.top+p.height)),p.width-xd.width&&(x=d.width-(p.left+p.width)),p.top+p.height+k>d.height&&(k=d.height-(p.top+p.height)),p.width+xd.height&&(k=d.height-(p.top+p.height)),p.height+kd.width&&(x=d.width-(p.left+p.width)),p.width+x{n=!1,document.onmousemove=null,document.onmouseup=null,k(),setTimeout((()=>c.value=!1),0)}},I=(0,i.Fl)((()=>{const e="rotate-",t=l.rotate;return t>-22.5&&t<=22.5?e+0:t>22.5&&t<=67.5?e+45:t>67.5&&t<=112.5?e+90:t>112.5&&t<=157.5?e+135:t>157.5||t<=-157.5?e+0:t>-157.5&&t<=-112.5?e+45:t>-112.5&&t<=-67.5?e+90:t>-67.5&&t<=-22.5?e+135:e+0})),S=[ee.LEFT_TOP,ee.RIGHT_TOP,ee.LEFT_BOTTOM,ee.RIGHT_BOTTOM],C=[ee.TOP,ee.BOTTOM,ee.LEFT,ee.RIGHT];return(e,t)=>{const l=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"image-clip-handler",style:(0,ae.j5)(u.value)},[(0,i._)("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:(0,ae.j5)(m.value)},null,12,xo),(0,i._)("div",{class:"top-image-content",style:(0,ae.j5)({...f.value,clipPath:e.clipPath})},[(0,i._)("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:(0,ae.j5)(g.value)},null,12,ko)],4),(0,i._)("div",{class:"operate",style:(0,ae.j5)(f.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>b(e)),["stop"]))},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(S,(e=>(0,i._)("div",{class:(0,ae.C_)(["clip-point",e,I.value]),key:e,onMousedown:(0,n.iM)((t=>_(t,e)),["stop"])},Io,42,bo))),64)),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,ae.C_)(["clip-point",e,I.value]),key:e,onMousedown:(0,n.iM)((t=>_(t,e)),["stop"])},Lo,42,So))),64))],36)],4)),[[l,w]])}}});const To=(0,Nl.Z)(Eo,[["__scopeId","data-v-5984406b"]]);var Mo=To;const Uo=["src"];var Wo=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{clipingImageElementId:r}=(0,o.Jk)(l),u=(0,i.Fl)((()=>r.value===t.elementInfo.id)),{addHistorySnapshot:c}=ra(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Vn(d),v=(0,i.Fl)((()=>t.elementInfo.flipH)),m=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:h}=Jn(v,m),f=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:g,imgPosition:y}=Xn(f),w=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:x}=Gn(w),k=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},b=e=>{if(l.setClipingImageElementId(""),!e)return;const{range:n,position:o}=e,i=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},s=t.elementInfo.left+o.left,r=t.elementInfo.top+o.top,u=t.elementInfo.width+o.width,d=t.elementInfo.height+o.height;let p=0,v=0;if(t.elementInfo.rotate){const e=s+u/2-(t.elementInfo.left+t.elementInfo.width/2),l=-(r+d/2-(t.elementInfo.top+t.elementInfo.height/2)),a=-t.elementInfo.rotate*Math.PI/180,n=e*Math.cos(a)-l*Math.sin(a),o=e*Math.sin(a)+l*Math.cos(a);p=n-e,v=-(o-l)}const m={clip:{...i,range:n},left:s+p,top:r+v,width:u,height:d};a.updateElement({id:t.elementInfo.id,props:m}),c()};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-image",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[u.value?((0,i.wg)(),(0,i.j4)(Mo,{key:0,src:e.elementInfo.src,clipData:e.elementInfo.clip,width:e.elementInfo.width,height:e.elementInfo.height,top:e.elementInfo.top,left:e.elementInfo.left,rotate:e.elementInfo.rotate,clipPath:(0,s.SU)(g).style,onClip:t[0]||(t[0]=e=>b(e))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:1,class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(p)?`drop-shadow(${(0,s.SU)(p)})`:"",transform:(0,s.SU)(h)}),onMousedown:t[2]||(t[2]=e=>k(e)),onTouchstart:t[3]||(t[3]=e=>k(e))},[(0,i.Wm)(yo,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,ae.j5)({clipPath:(0,s.SU)(g).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,ae.j5)({top:(0,s.SU)(y).top,left:(0,s.SU)(y).left,width:(0,s.SU)(y).width,height:(0,s.SU)(y).height,filter:(0,s.SU)(x)}),onDragstart:t[1]||(t[1]=(0,n.iM)((()=>{}),["prevent"])),alt:""},null,44,Uo),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,ae.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],36)),[[l,e.contextmenus]])],4)],6)}}});const Do=(0,Nl.Z)(Wo,[["__scopeId","data-v-1156b3e1"]]);var Ho=Do;const Fo=["width","height"],Ao=["d","stroke","stroke-width","stroke-dasharray"];var Zo=(0,i.aZ)({__name:"ElementOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,Ao)],8,Fo)):(0,i.kq)("",!0)}});const $o=(0,Nl.Z)(Zo,[["__scopeId","data-v-efb76626"]]);var Oo=$o,zo=l(2376),Po=l(4348),Ro=l(2806),Bo=l(728),No=l(8463),jo=l(4251),Yo=l(915),Vo=l(3833),Jo=l(6912);const qo=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",u.MI),l("Alt-ArrowDown",u.Ig),l("Mod-z",No.Yw),l("Mod-y",No.KX),l("Backspace",Jo.dU),l("Escape",u.N0),l("Mod-b",(0,u.w9)(e.marks.strong)),l("Mod-i",(0,u.w9)(e.marks.em)),l("Mod-u",(0,u.w9)(e.marks.underline)),l("Mod-d",(0,u.w9)(e.marks.strikethrough)),l("Mod-e",(0,u.w9)(e.marks.code)),l("Mod-;",(0,u.w9)(e.marks.superscript)),l("Mod-'",(0,u.w9)(e.marks.subscript)),l("Enter",(0,u.QF)((0,Vo.s6)(e.nodes.list_item),u.QK,u.mD,u.X0,u.$j)),l("Mod-[",(0,Vo.IB)(e.nodes.list_item)),l("Mod-]",(0,Vo.bw)(e.nodes.list_item)),l("Tab",(0,Vo.bw)(e.nodes.list_item)),t},Xo=e=>(0,Jo.S0)(/^\s*>\s$/,e),Go=e=>(0,Jo.S0)(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),Ko=e=>(0,Jo.S0)(/^\s*([-+*])\s$/,e),Qo=()=>{const e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new Jo.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(`${t[2]} `,l,a),i=n.marks.code.create();return o.addMark(l,l+t[2].length,i)}))},ei=()=>{const e=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new Jo.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(t[0],l,a),i=n.marks.link.create({href:t[0],title:t[0]});return o.addMark(l,l+t[0].length,i)}))},ti=e=>{const t=[...Jo.yR,Jo.LH,Jo.pR];return t.push(Xo(e.nodes.blockquote)),t.push(Go(e.nodes.ordered_list)),t.push(Ko(e.nodes.bullet_list)),t.push(Qo()),t.push(ei()),(0,Jo.Hw)({rules:t})},li=e=>[ti(e),(0,Bo.h)(qo(e)),(0,Bo.h)(u.YR),(0,jo.q)(),(0,Yo.d)(),(0,No.m8)()];var ai=l(4073);const ni={attrs:{order:{default:1},listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const t=(e.hasAttribute("start")?e.getAttribute("start"):1)||1,l={order:+t},{listStyleType:a}=e.style;return a&&(l["listStyleType"]=a),l}}],toDOM:e=>{const{order:t,listStyleType:l}=e.attrs;let a="";l&&(a+=`list-style-type: ${l};`);const n={style:a};return 1!==t&&(n["start"]=t),["ol",n,0]}},oi={attrs:{listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const{listStyleType:t}=e.style;return t?{listStyleType:t}:{}}}],toDOM:e=>{const{listStyleType:t}=e.attrs;let l="";return t&&(l+=`list-style-type: ${t};`),["ul",{style:l},0]}},ii={...Vo.qb,content:"paragraph block*",group:"block"},si={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t,textIndent:l}=e.style;let a=e.getAttribute("align")||t||"";a=/(left|right|center|justify)/.test(a)?a:"";let n=0;l&&(/em/.test(l)?n=parseInt(l):/px/.test(l)&&(n=Math.floor(parseInt(l)/20),n||(n=1)));const o=+(e.getAttribute("data-indent")||0);return{align:a,indent:o,textIndent:n}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:l,textIndent:a}=e.attrs;let n="";t&&"left"!==t&&(n+=`text-align: ${t};`),a&&(n+=`text-indent: ${20*a}px;`);const o={style:n};return l&&(o["data-indent"]=l),["p",o,0]}},{doc:ri,blockquote:ui,text:ci}=ai.nodes;var di={doc:ri,paragraph:si,blockquote:ui,text:ci,ordered_list:ni,bullet_list:oi,list_item:ii};const pi={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},vi={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},mi={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e&&null},{style:"text-decoration-line",getAttrs:e=>"line-through"===e&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},hi={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e&&null},{style:"text-decoration-line",getAttrs:e=>"underline"===e&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},fi={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let l="";return t&&(l+=`color: ${t};`),["span",{style:l},0]}},gi={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let l="";return t&&(l+=`background-color: ${t};`),["span",{style:l},0]}},yi={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let l="";return t&&(l+=`font-size: ${t};`),["span",{style:l},0]}},wi={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&"string"===typeof e?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let l="";return t&&(l+=`font-family: ${t};`),["span",{style:l},0]}},xi={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),l=e.getAttribute("title");return{href:t,title:l}}}],toDOM:e=>["a",e.attrs,0]},ki={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:e=>{const t=e.dataset.index;return{index:t}}}],toDOM:e=>["mark",{"data-index":e.attrs.index},0]},{em:bi,strong:_i,code:Ii}=ai.marks;var Si={em:bi,strong:_i,fontsize:yi,fontname:wi,code:Ii,forecolor:fi,backcolor:gi,subscript:pi,superscript:vi,strikethrough:mi,underline:hi,link:xi,mark:ki};const Ci=di,Li=Si,Ei=new Ro.V_({nodes:Ci,marks:Li}),Ti=e=>{const t=`
${e}
`,l=new window.DOMParser,a=l.parseFromString(t,"text/html").body.firstElementChild;return Ro.aw.fromSchema(Ei).parse(a)},Mi=(e,t,l={})=>new Po.tk(e,{state:zo.yy.create({doc:Ti(t),plugins:li(Ei)}),...l});var Ui,Wi=l(9391);(function(e){e["RICH_TEXT_COMMAND"]="RICH_TEXT_COMMAND",e["OPEN_CHART_DATA_EDITOR"]="OPEN_CHART_DATA_EDITOR",e["OPEN_LATEX_EDITOR"]="OPEN_LATEX_EDITOR"})(Ui||(Ui={}));const Di=(0,Wi.Z)();var Hi=Di;const Fi=(e,t,l)=>{const{selection:a,doc:n}=e;if(!a||!n)return e;const{from:o,to:i}=a,{nodes:s}=t,r=s.blockquote,u=s.list_item,c=s.paragraph,d=[];l=l||"";const p=new Set([r,u,c]);return n.nodesBetween(o,i,((e,t)=>{const a=e.type,n=e.attrs.align||"";return n!==l&&p.has(a)&&d.push({node:e,pos:t,nodeType:a}),!0})),d.length?(d.forEach((t=>{const{node:a,pos:n,nodeType:o}=t;let{attrs:i}=a;i=l?{...i,align:l}:{...i,align:null},e=e.setNodeMarkup(n,o,i,a.marks)})),e):e},Ai=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Fi(l.tr.setSelection(n),a,t);e.dispatch(o)},Zi=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,$i=(e,t,l)=>(a,n)=>{const{schema:o,selection:i}=a,{$from:s,$to:r}=i,u=s.blockRange(r);if(!u)return!1;const c=h((e=>Zi(e,o)))(i);if(u.depth>=1&&c&&u.depth-c.depth<=1){if(c.node.type===e&&!l)return(0,Vo.IB)(t)(a,n);if(Zi(c.node,o)&&e.validContent(c.node.content)){const{tr:t}=a;if(l){const a={...c.node.attrs,listStyleType:l};t.setNodeMarkup(c.pos,e,a)}else t.setNodeMarkup(c.pos,e);return n&&n(t),!1}}return l?(0,Vo.KI)(e,{listStyleType:l})(a,n):(0,Vo.KI)(e)(a,n)};function Oi(e,t,l,a){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const o=0,i=8;let s=(n.attrs[a]||0)+l;if(si&&(s=i),s===n.attrs[a])return e;const r={...n.attrs,[a]:s};return e.setNodeMarkup(t,n.type,r,n.marks)}const zi=(e,t,l,a)=>{const{selection:n,doc:o}=e;if(!n||!o)return e;if(!(n instanceof zo.Bs||n instanceof zo.C1))return e;const{from:i,to:s}=n;return o.nodesBetween(i,s,((n,o)=>{const i=n.type;return"paragraph"===i.name||"blockquote"===i.name?(e=Oi(e,o,l,a),!1):!Zi(n,t)})),e},Pi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=zi(l.tr.setSelection(n),a,t,"indent");return!!o.docChanged&&(e.dispatch(o),!0)},Ri=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=zi(l.tr.setSelection(n),a,t,"textIndent");return!!o.docChanged&&(e.dispatch(o),!0)};var Bi=(0,i.aZ)({__name:"ProsemirrorEditor",props:{elementId:{},defaultColor:{},defaultFontName:{},value:{},editable:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:l}){const a=e,n=$(),{handleElementId:r,textFormatPainter:v}=(0,o.Jk)(n),m=(0,s.iH)();let h;const f=(0,U.debounce)((function(){l("update",h.dom.innerHTML)}),300,{trailing:!0}),y=()=>{n.setDisableHotkeysState(!0),l("focus")},w=()=>{n.setDisableHotkeysState(!1),l("blur")},x=(0,U.debounce)((function(){const e=I(h,{color:a.defaultColor,fontname:a.defaultFontName});n.setRichtextAttrs(e)}),30,{trailing:!0}),b=()=>{f(),x()},_=(0,i.Fl)((()=>a.value));(0,i.YP)(_,(()=>{if(!h)return;if(h.hasFocus())return;const{doc:e,tr:t}=h.state;h.dispatch(t.replaceRangeWith(0,e.content.size,Ti(_.value)))})),(0,i.YP)((()=>a.editable),(()=>{h.setProps({editable:()=>a.editable})}));const C=()=>h.focus();t({focus:C});const L=({target:e,action:t})=>{if(!e&&r.value!==a.elementId)return;if(e&&e!==a.elementId)return;const l="command"in t?[t]:t;for(const a of l)if("fontname"===a.command&&a.value){const e=h.state.schema.marks.fontname.create({fontname:a.value});c(h),d(h,e)}else if("fontsize"===a.command&&a.value){const e=h.state.schema.marks.fontsize.create({fontsize:a.value});c(h),d(h,e)}else if("fontsize-add"===a.command){const e=a.value?+a.value:2;c(h);const t=S(h)+e+"px",l=h.state.schema.marks.fontsize.create({fontsize:t});d(h,l)}else if("fontsize-reduce"===a.command){const e=a.value?+a.value:2;c(h);let t=S(h)-e;t<12&&(t=12);const l=h.state.schema.marks.fontsize.create({fontsize:t+"px"});d(h,l)}else if("color"===a.command&&a.value){const e=h.state.schema.marks.forecolor.create({color:a.value});c(h),d(h,e)}else if("backcolor"===a.command&&a.value){const e=h.state.schema.marks.backcolor.create({backcolor:a.value});c(h),d(h,e)}else if("bold"===a.command)c(h),(0,u.w9)(h.state.schema.marks.strong)(h.state,h.dispatch);else if("em"===a.command)c(h),(0,u.w9)(h.state.schema.marks.em)(h.state,h.dispatch);else if("underline"===a.command)c(h),(0,u.w9)(h.state.schema.marks.underline)(h.state,h.dispatch);else if("strikethrough"===a.command)c(h),(0,u.w9)(h.state.schema.marks.strikethrough)(h.state,h.dispatch);else if("subscript"===a.command)(0,u.w9)(h.state.schema.marks.subscript)(h.state,h.dispatch);else if("superscript"===a.command)(0,u.w9)(h.state.schema.marks.superscript)(h.state,h.dispatch);else if("blockquote"===a.command){const e=g("blockquote",h.state);e?(0,u.xb)(h.state,h.dispatch):(0,u.ym)(h.state.schema.nodes.blockquote)(h.state,h.dispatch)}else if("code"===a.command)(0,u.w9)(h.state.schema.marks.code)(h.state,h.dispatch);else if("align"===a.command&&a.value)Ai(h,a.value);else if("indent"===a.command&&a.value)Pi(h,+a.value);else if("textIndent"===a.command&&a.value)Ri(h,+a.value);else if("bulletList"===a.command){const e=a.value||"",{bullet_list:t,list_item:l}=h.state.schema.nodes;$i(t,l,e)(h.state,h.dispatch)}else if("orderedList"===a.command){const e=a.value||"",{ordered_list:t,list_item:l}=h.state.schema.nodes;$i(t,l,e)(h.state,h.dispatch)}else if("clear"===a.command){c(h);const{$from:e,$to:t}=h.state.selection;h.dispatch(h.state.tr.removeMark(e.pos,t.pos))}else if("link"===a.command){const e=h.state.schema.marks.link,{from:t,to:l}=h.state.selection,n=p(h.state.doc,t,l,e);if(n)if(a.value){const e=h.state.schema.marks.link.create({href:a.value,title:a.value});d(h,e,{from:n.from.pos,to:n.to.pos+1})}else h.dispatch(h.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(k(h.state,e))if(a.value){const e=h.state.schema.marks.link.create({href:a.value,title:a.value});d(h,e)}else(0,u.w9)(e)(h.state,h.dispatch);else a.value&&(c(h),(0,u.w9)(e,{href:a.value,title:a.value})(h.state,h.dispatch))}else"insert"===a.command&&a.value&&h.dispatch(h.state.tr.insertText(a.value));h.focus(),f(),x()},E=()=>{if(!v.value)return;const{keep:e,...t}=v.value,l=[{command:"clear"}];for(const a of Object.keys(t)){const e=a,t=v.value[a];!0===t?l.push({command:e}):t&&l.push({command:e,value:t})}L({action:l}),e||n.setTextFormatPainter(null)};return(0,i.bv)((()=>{h=Mi(m.value,_.value,{handleDOMEvents:{focus:y,blur:w,keydown:b,click:x,mouseup:E},editable:()=>a.editable}),a.autoFocus&&h.focus()})),(0,i.Ah)((()=>{h&&h.destroy()})),Hi.on(Ui.RICH_TEXT_COMMAND,L),(0,i.Ah)((()=>{Hi.off(Ui.RICH_TEXT_COMMAND,L)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["prosemirror-editor",{"format-painter":(0,s.SU)(v)}]),ref_key:"editorViewRef",ref:m,onMousedown:t[0]||(t[0]=e=>l("mousedown",e))},null,34))}});const Ni=(0,Nl.Z)(Bi,[["__scopeId","data-v-3608adca"]]);var ji=Ni;const Yi=e=>((0,i.dD)("data-v-2a1e49ba"),e=e(),(0,i.Cn)(),e),Vi=Yi((()=>(0,i._)("div",{class:"drag-handler top"},null,-1))),Ji=Yi((()=>(0,i._)("div",{class:"drag-handler bottom"},null,-1)));var qi=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{handleElementId:n,isScaling:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=ra(),c=(0,s.iH)(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Vn(d),v=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},m=(0,s.iH)(-1),h=(0,s.iH)(-1);(0,i.YP)(r,(()=>{n.value===t.elementInfo.id&&(r.value||(t.elementInfo.vertical||-1===m.value||(a.updateElement({id:t.elementInfo.id,props:{height:m.value}}),m.value=-1),t.elementInfo.vertical&&-1!==h.value&&(a.updateElement({id:t.elementInfo.id,props:{width:h.value}}),h.value=-1)))}));const f=e=>{const l=e[0].contentRect;if(!c.value)return;const n=l.height+20,o=l.width+20;t.elementInfo.vertical||t.elementInfo.height===n||(r.value?m.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(r.value?h.value=o:a.updateElement({id:t.elementInfo.id,props:{width:o}}))},g=new ResizeObserver(f);(0,i.bv)((()=>{c.value&&g.observe(c.value)})),(0,i.Ah)((()=>{c.value&&g.unobserve(c.value)}));const y=e=>{a.updateElement({id:t.elementInfo.id,props:{content:e}}),u()},w=(0,U.debounce)((function(){const e=t.elementInfo.content.replaceAll(/<[^>]+>/g,"");e||a.deleteElement(t.elementInfo.id)}),300,{trailing:!0}),x=(0,i.Fl)((()=>n.value===t.elementInfo.id));return(0,i.YP)(x,(()=>{x.value||w()})),(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-text",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",ref_key:"elementRef",ref:c,style:(0,ae.j5)({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,s.SU)(p),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"}),onMousedown:t[2]||(t[2]=e=>v(e)),onTouchstart:t[3]||(t[3]=e=>v(e))},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(ji,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:(0,ae.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),onUpdate:t[0]||(t[0]=e=>y(e)),onMousedown:t[1]||(t[1]=e=>v(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),Vi,Ji],36)),[[l,e.contextmenus]])],4)],6)}}});const Xi=(0,Nl.Z)(qi,[["__scopeId","data-v-2a1e49ba"]]);var Gi=Xi;const Ki=["id","gradientTransform"],Qi=["stop-color"],es=["stop-color"],ts=["id"],ls=["stop-color"],as=["stop-color"];var ns=(0,i.aZ)({__name:"GradientDefs",props:{id:{},type:{},color1:{},color2:{},rotate:{default:0}},setup(e){return(e,t)=>"linear"===e.type?((0,i.wg)(),(0,i.iD)("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,Qi),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,es)],8,Ki)):((0,i.wg)(),(0,i.iD)("radialGradient",{key:1,id:e.id},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ls),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,as)],8,ts))}});const os=ns;var is=os;const ss=["width","height"],rs={key:0},us=["transform"],cs=["d","fill","stroke","stroke-width","stroke-dasharray"];var ds=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{handleElementId:n,shapeFormatPainter:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=ra(),c=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},d=()=>{if(!r.value)return;const{keep:e,...n}=r.value;a.updateElement({id:t.elementInfo.id,props:n}),u(),e||l.setShapeFormatPainter(null)},p=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:v,outlineColor:m,strokeDashArray:h}=Kn(p),f=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:g}=Vn(f),y=(0,i.Fl)((()=>t.elementInfo.flipH)),w=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:x}=Jn(y,w),k=(0,s.iH)(!1);(0,i.YP)(n,(()=>{n.value!==t.elementInfo.id&&k.value&&(k.value=!1)}));const b=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e})),_=e=>{const l={...b.value,content:e};a.updateElement({id:t.elementInfo.id,props:{text:l}}),u()},I=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(a.removeElementProps({id:t.elementInfo.id,propName:"text"}),u())},S=(0,s.iH)(),C=()=>{k.value=!0,(0,i.Y3)((()=>S.value&&S.value.focus()))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-shape",{lock:e.elementInfo.lock,"format-painter":(0,s.SU)(r)}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,ae.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(g)?`drop-shadow(${(0,s.SU)(g)})`:"",transform:(0,s.SU)(x),color:b.value.defaultColor,fontFamily:b.value.defaultFontName}),onMousedown:t[3]||(t[3]=e=>c(e)),onMouseup:t[4]||(t[4]=e=>d()),onTouchstart:t[5]||(t[5]=e=>c(e)),onDblclick:t[6]||(t[6]=e=>C())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",rs,[(0,i.Wm)(is,{id:`editabel-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#editabel-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(m),"stroke-width":(0,s.SU)(v),"stroke-dasharray":(0,s.SU)(h)},null,8,cs)],8,us)],8,ss)),(0,i._)("div",{class:(0,ae.C_)(["shape-text",[b.value.align,{editable:k.value||b.value.content}]])},[k.value||b.value.content?((0,i.wg)(),(0,i.j4)(ji,{key:0,ref_key:"prosemirrorEditorRef",ref:S,elementId:e.elementInfo.id,defaultColor:b.value.defaultColor,defaultFontName:b.value.defaultFontName,editable:!e.elementInfo.lock,value:b.value.content,onUpdate:t[0]||(t[0]=e=>_(e)),onBlur:t[1]||(t[1]=e=>I()),onMousedown:t[2]||(t[2]=e=>c(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):(0,i.kq)("",!0)],2)],36)),[[l,e.contextmenus]])],4)],6)}}});const ps=(0,Nl.Z)(ds,[["__scopeId","data-v-50bec549"]]);var vs=ps;const ms=["id","markerWidth","markerHeight","refX","refY"],hs=["d","fill","transform"];var fs=(0,i.aZ)({__name:"LinePointMarker",props:{id:{},position:{},type:{},baseSize:{},color:{}},setup(e){const t=e,l={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},a={"arrow-start":180,"arrow-end":0},n=(0,i.Fl)((()=>l[t.type])),o=(0,i.Fl)((()=>a[`${t.type}-${t.position}`]||0)),s=(0,i.Fl)((()=>t.baseSize<2?2:t.baseSize));return(e,t)=>((0,i.wg)(),(0,i.iD)("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*s.value,markerHeight:3*s.value,refX:1.5*s.value,refY:1.5*s.value},[(0,i._)("path",{d:n.value,fill:e.color,transform:`scale(${.3*s.value}, ${.3*s.value}) rotate(${o.value}, 5, 5)`},null,8,hs)],8,ms))}});const gs=fs;var ys=gs;const ws=["width","height"],xs=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],ks=["d"];var bs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:n}=Vn(a),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),r=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),u=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),c=(0,i.Fl)((()=>Ie(t.elementInfo)));return(e,t)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(n)?`drop-shadow(${(0,s.SU)(n)})`:""}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e))},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:o.value,height:r.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(ys,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(ys,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-point",d:c.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":u.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,xs),(0,i.wy)((0,i._)("path",{class:"line-path",d:c.value,stroke:"transparent","stroke-width":"20",fill:"none"},null,8,ks),[[a,e.contextmenus]])],8,ws))],36)],6)}}});const _s=(0,Nl.Z)(bs,[["__scopeId","data-v-16512454"]]);var Is=_s,Ss=l(7678),Cs=(l(4991),(0,i.aZ)({__name:"Chart",props:{width:{},height:{},type:{},data:{},themeColor:{},legends:{},options:{},gridColor:{},legend:{}},setup(e){const t=e,l=(0,s.iH)(),a=(0,i.f3)(Sn)||(0,s.iH)(1);let n;const o=(0,i.Fl)((()=>t.legend?t.height-20:t.height)),r=()=>({...t.data,series:t.data.series[0]}),u=()=>{const e=t.options||{};return{...e,width:t.width*a.value,height:o.value*a.value}},c=()=>{if(!l.value)return;const e=u();"bar"===t.type&&(n=new Ss.vz(l.value,t.data,e)),"line"===t.type&&(n=new Ss.wW(l.value,t.data,e)),"pie"===t.type&&(n=new Ss.uc(l.value,r(),e))},d=()=>{if(!n)return void c();const e=u(),l="pie"===t.type?r():t.data;n.update(l,e)};(0,i.YP)([()=>t.width,()=>t.height,()=>t.data,()=>t.options,a],d),(0,i.bv)(c);const p=(0,i.Fl)((()=>{let e=[];if(t.themeColor.length>=10)e=t.themeColor;else if(1===t.themeColor.length)e=(0,M.Z)(t.themeColor[0]).analogous(10).map((e=>e.toRgbString()));else{const l=t.themeColor.length,a=(0,M.Z)(t.themeColor[l-1]).analogous(11-l).map((e=>e.toRgbString()));e=[...t.themeColor.slice(0,l-1),...a]}return e})),v=()=>{if(l.value)for(let e=0;e<10;e++)l.value.style.setProperty(`--theme-color-${e+1}`,p.value[e])};(0,i.YP)(p,v),(0,i.bv)(v);const m=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return(0,i.YP)((()=>t.gridColor),m),(0,i.bv)(m),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"chart",style:(0,ae.j5)({flexDirection:"top"===e.legend?"column-reverse":"column"})},[(0,i._)("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:(0,ae.j5)({width:e.width+"px",height:o.value+"px",transform:`scale(${1/(0,s.SU)(a)})`})},null,4),e.legend?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"legends",style:(0,ae.j5)({transform:`scale(${1/(0,s.SU)(a)})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.legends,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"legend",key:l,style:(0,ae.j5)({color:e.gridColor})},[(0,i._)("div",{class:"block",style:(0,ae.j5)({backgroundColor:p.value[l]})},null,4),(0,i.Uk)(" "+(0,ae.zw)(t),1)],4)))),128))],4)):(0,i.kq)("",!0)],4))}}));const Ls=(0,Nl.Z)(Cs,[["__scopeId","data-v-ae2a96a6"]]);var Es=Ls,Ts=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Hi.emit(Ui.OPEN_CHART_DATA_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-chart",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,ae.j5)({backgroundColor:e.elementInfo.fill}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Es,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||""},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend"])],36)),[[n,e.contextmenus]])],4)],6)}}});const Ms=(0,Nl.Z)(Ts,[["__scopeId","data-v-6fc3de39"]]);var Us=Ms;const Ws=e=>{if(!e)return{};const{bold:t,em:l,underline:a,strikethrough:n,color:o,backcolor:i,fontsize:s,fontname:r,align:u}=e;let c=`${a?"underline":""} ${n?"line-through":""}`;return" "===c&&(c="none"),{fontWeight:t?"bold":"normal",fontStyle:l?"italic":"normal",textDecoration:c,color:o||"#000",backgroundColor:i||"",fontSize:s||"14px",fontFamily:r||"微软雅黑",textAlign:u||"left"}},Ds=e=>e.replace(/\n/g,"
").replace(/ /g," ");var Hs=e=>{const t=(0,i.Fl)((()=>{const t=[];for(let l=0;l1||n.rowspan>1)for(let a=l;a{const t=(0,s.iH)(["",""]);return(0,i.YP)((()=>e.value),(()=>{e.value&&(t.value=_e(e.value.color))}),{immediate:!0}),{subThemeColor:t}};const As=["innerHTML"];var Zs=(0,i.aZ)({__name:"CustomTextarea",props:{value:{default:""}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(),n=(0,s.iH)(""),o=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{o.value||(n.value=l.value,a.value&&(a.value.innerHTML=l.value))}),{immediate:!0});const r=()=>{if(!a.value)return;const e=a.value.innerHTML;t("updateValue",e)},u=()=>{o.value=!0,a.value&&(a.value.onpaste=e=>{if(e.preventDefault(),!e.clipboardData)return;const l=e.clipboardData.items[0];l&&"string"===l.kind&&"text/plain"===l.type&&l.getAsString((e=>{const l=me(e);if("object"===typeof l)return;const n=he(e);if(n)return t("insertExcelData",n),void(a.value&&(a.value.innerHTML=n[0][0]));document.execCommand("insertText",!1,e)}))})},c=()=>{o.value=!1,a.value&&(a.value.onpaste=null)};return(0,i.Jd)((()=>{a.value&&(a.value.onpaste=null)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"custom-textarea",ref_key:"textareaRef",ref:a,contenteditable:!0,onFocus:t[0]||(t[0]=e=>u()),onBlur:t[1]||(t[1]=e=>c()),onInput:t[2]||(t[2]=e=>r()),innerHTML:n.value},null,40,As))}});const $s=(0,Nl.Z)(Zs,[["__scopeId","data-v-7a7222ac"]]);var Os=$s;const zs={key:0,class:"handler"},Ps=["onMousedown"],Rs=["width"],Bs=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],Ns=["innerHTML"];var js=(0,i.aZ)({__name:"EditableTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,{canvasScale:a}=(0,o.Jk)($()),u=(0,s.iH)(!1),c=(0,s.iH)([]),d=(0,s.iH)([]),p=(0,i.Fl)({get(){return l.data},set(e){t("change",e)}}),v=(0,i.Fl)((()=>l.theme)),{subThemeColor:m}=Fs(v),h=(0,s.iH)([]),f=(0,i.Fl)((()=>h.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>l.colWidths,()=>l.width],(()=>{h.value=l.colWidths.map((e=>e*l.width))}),{immediate:!0});const g=()=>{c.value=[],d.value=[]};(0,i.YP)((()=>l.editable),(()=>{l.editable||g()}));const y=(0,i.Fl)((()=>{const e=[];for(let t=1;te+t));e.push(l)}return e})),w=(0,i.Fl)((()=>l.data)),{hideCells:x}=Hs(w),k=(0,i.Fl)((()=>{if(!c.value.length)return[];const[e,t]=c.value;if(!d.value.length)return[`${e}_${t}`];const[l,a]=d.value;if(e===l&&t===a)return[`${e}_${t}`];const n=[],o=Math.min(e,l),i=Math.min(t,a),s=Math.max(e,l),r=Math.max(t,a);for(let u=0;u=o&&u<=s&&t>=i&&t<=r&&n.push(`${u}_${t}`)}return n}));(0,i.YP)(k,((e,l)=>{(0,U.isEqual)(e,l)||t("changeSelectedCells",k.value)}));const b=(0,i.Fl)((()=>k.value.length>1?null:k.value[0])),_=()=>u.value=!1,I=(e,t,l)=>{0===e.button&&(d.value=[],u.value=!0,c.value=[t,l])},S=(e,t)=>{u.value&&(d.value=[e,t])};(0,i.bv)((()=>{document.addEventListener("mouseup",_)})),(0,i.Ah)((()=>{document.removeEventListener("mouseup",_)}));const C=(e,t)=>x.value.includes(`${e}_${t}`),L=e=>{const t=p.value.length-1;c.value=[0,e],d.value=[t,e]},E=e=>{const t=p.value[e].length-1;c.value=[e,0],d.value=[e,t]},T=()=>{const e=p.value.length-1,t=p.value[e].length-1;c.value=[0,0],d.value=[e,t]},M=e=>{const t=JSON.parse(JSON.stringify(p.value)),l=p.value[e],a=[];for(let n=0;n=0;l--)if(!C(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),p.value=t},W=e=>{const l=JSON.parse(JSON.stringify(p.value)),a=[];for(let t=0;t=0;a--)if(!C(t,a)){l[t][a].colspan=l[t][a].colspan-1;break}p.value=l.map((t=>(t.splice(e,1),t))),h.value.splice(e,1),t("changeColWidths",h.value)},D=e=>{const t=JSON.parse(JSON.stringify(p.value)),l=[];for(let a=0;a{p.value=p.value.map((t=>{const l={colspan:1,rowspan:1,text:"",id:(0,r.x0)(10)};return t.splice(e,0,l),t})),h.value.splice(e,0,100),t("changeColWidths",h.value)},F=(e,l)=>{let a=JSON.parse(JSON.stringify(p.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let l=0;l{const t=[];for(let a=0;a{const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.min(t,a),i=Math.max(e,l),s=Math.max(t,a),r=JSON.parse(JSON.stringify(p.value));r[n][o].rowspan=i-n+1,r[n][o].colspan=s-o+1,p.value=r,g()},Z=(e,t)=>{const l=JSON.parse(JSON.stringify(p.value));l[e][t].rowspan=1,l[e][t].colspan=1,p.value=l,g()},O=(e,l)=>{g();let n=!0;const o=h.value[l],i=e.pageX,s=50;document.onmousemove=e=>{if(!n)return;const t=(e.pageX-i)/a.value,r=o+t{n=!1,document.onmousemove=null,document.onmouseup=null,t("changeColWidths",h.value)}},z=()=>{const e=JSON.parse(JSON.stringify(p.value));for(let t=0;t{const e=(t,l)=>p.value[t]?p.value[t][l]?C(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;d.value=[];const t=c.value[0],l=c.value[1]+1,a=e(t,l);a?c.value=a:(D(t+1),c.value=[t+1,0]),(0,i.Y3)((()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()}))},R=e=>{if(!l.editable||!k.value.length)return;const t=e.key.toUpperCase();if(k.value.length<2){if(t===le.TAB&&(e.preventDefault(),P()),e.ctrlKey&&t===le.UP){e.preventDefault();const t=+k.value[0].split("_")[0];D(t)}if(e.ctrlKey&&t===le.DOWN){e.preventDefault();const t=+k.value[0].split("_")[0];D(t+1)}if(e.ctrlKey&&t===le.LEFT){e.preventDefault();const t=+k.value[0].split("_")[1];H(t)}if(e.ctrlKey&&t===le.RIGHT){e.preventDefault();const t=+k.value[0].split("_")[1];H(t+1)}}else t===le.DELETE&&z()};(0,i.bv)((()=>{document.addEventListener("keydown",R)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",R)}));const B=(0,U.debounce)((function(e,l,a){p.value[l][a].text=e,t("change",p.value)}),300,{trailing:!0}),N=(e,l,a)=>{const n=e.length,o=e[0].length;let s=0,r=0;l+n>p.value.length&&(s=l+n-p.value.length),a+o>p.value[0].length&&(r=a+o-p.value[0].length),(s||r)&&F(s,r),(0,i.Y3)((()=>{for(let t=0;t{const e=[];for(let t=0;t{const e=j(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},V=(e,t)=>{const l=k.value.length>1,a=p.value[e][t],n=l,o=!l&&(a.rowspan>1||a.colspan>1);return{canMerge:n,canSplit:o}},J=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],a=+t.split("_")[1];k.value.includes(`${l}_${a}`)||(c.value=[l,a],d.value=[]);const{canMerge:n,canSplit:o}=V(l,a),{canDeleteRow:i,canDeleteCol:s}=Y();return[{text:"插入列",children:[{text:"到左侧",handler:()=>H(a)},{text:"到右侧",handler:()=>H(a+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>D(l)},{text:"到下方",handler:()=>D(l+1)}]},{text:"删除列",disable:!s,handler:()=>W(a)},{text:"删除行",disable:!i,handler:()=>M(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:A},{text:"取消合并单元格",disable:!o,handler:()=>Z(l,a)},{divider:!0},{text:"选中当前列",handler:()=>L(a)},{text:"选中当前行",handler:()=>E(l)},{text:"选中全部单元格",handler:T}]};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:"editable-table",style:(0,ae.j5)({width:f.value+"px"})},[e.editable?((0,i.wg)(),(0,i.iD)("div",zs,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"drag-line",key:t,style:(0,ae.j5)({left:e+"px"}),onMousedown:e=>O(e,t)},null,44,Ps)))),128))])):(0,i.kq)("",!0),(0,i._)("table",{class:(0,ae.C_)({theme:v.value,"row-header":v.value?.rowHeader,"row-footer":v.value?.rowFooter,"col-header":v.value?.colHeader,"col-footer":v.value?.colFooter}),style:(0,ae.j5)(`--themeColor: ${v.value?.color}; --subThemeColor1: ${(0,s.SU)(m)[0]}; --subThemeColor2: ${(0,s.SU)(m)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(h.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,Rs)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,((t,a)=>((0,i.wg)(),(0,i.iD)("tr",{key:a,style:(0,ae.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,o)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:(0,ae.C_)(["cell",{selected:k.value.includes(`${a}_${o}`)&&k.value.length>1,active:b.value===`${a}_${o}`}]),style:(0,ae.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)(Ws)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${a}_${o}`,onMousedown:e=>I(e,a,o),onMouseenter:e=>S(a,o)},[b.value===`${a}_${o}`?((0,i.wg)(),(0,i.j4)(Os,{key:0,class:(0,ae.C_)(["cell-text",{active:b.value===`${a}_${o}`}]),style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),value:t.text,onUpdateValue:e=>(0,s.SU)(B)(e,a,o),onInsertExcelData:e=>N(e,a,o)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"cell-text",style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Ds)(t.text)},null,12,Ns))],46,Bs)),[[n.F8,!(0,s.SU)(x).includes(`${a}_${o}`)],[l,e=>J(e)]]))),128))],4)))),128))])],6)],4)}}});const Ys=(0,Nl.Z)(js,[["__scopeId","data-v-0236a619"]]);var Vs=Ys;const Js={class:"element-content"};var qs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{canvasScale:r,handleElementId:u,isScaling:c}=(0,o.Jk)(l),d=(0,s.iH)(),{addHistorySnapshot:p}=ra(),v=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},m=(0,s.iH)(!1);(0,i.YP)(u,(()=>{u.value!==t.elementInfo.id&&(m.value=!1)})),(0,i.YP)(m,(()=>{l.setDisableHotkeysState(m.value)}));const h=()=>{t.elementInfo.lock||(m.value=!0)},f=(0,s.iH)(-1);(0,i.YP)(c,(()=>{u.value===t.elementInfo.id&&(c.value&&(m.value=!1),c.value||-1===f.value||(a.updateElement({id:t.elementInfo.id,props:{height:f.value}}),f.value=-1))}));const g=e=>{const l=e[0].contentRect;if(!d.value)return;const n=l.height;t.elementInfo.height!==n&&(c.value?f.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}}))},y=new ResizeObserver(g);(0,i.bv)((()=>{d.value&&y.observe(d.value)})),(0,i.Ah)((()=>{d.value&&y.unobserve(d.value)}));const w=e=>{a.updateElement({id:t.elementInfo.id,props:{data:e}}),p()},x=e=>{const l=e.reduce(((e,t)=>e+t)),n=e.map((e=>e/l));a.updateElement({id:t.elementInfo.id,props:{width:l,colWidths:n}}),p()},k=e=>{(0,i.Y3)((()=>l.setSelectedTableCells(e)))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:d,style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",Js,[(0,i.Wm)(Vs,{onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:m.value,onChange:t[1]||(t[1]=e=>w(e)),onChangeColWidths:t[2]||(t[2]=e=>x(e)),onChangeSelectedCells:t[3]||(t[3]=e=>k(e))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!m.value||e.elementInfo.lock?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:t[4]||(t[4]=e=>h()),onMousedown:t[5]||(t[5]=e=>v(e)),onTouchstart:t[6]||(t[6]=e=>v(e))},[(0,s.SU)(u)===e.elementInfo.id?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"mask-tip",style:(0,ae.j5)({transform:`scale(${1/(0,s.SU)(r)})`})},"双击编辑",4)):(0,i.kq)("",!0)],34)):(0,i.kq)("",!0)])),[[l,e.contextmenus]])],4)],6)}}});const Xs=(0,Nl.Z)(qs,[["__scopeId","data-v-742a731e"]]);var Gs=Xs;const Ks=["width","height","stroke","stroke-width"],Qs=["transform"],er=["d"];var tr=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Hi.emit(Ui.OPEN_LATEX_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-latex",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,er)],8,Qs)],8,Ks))],32)),[[n,e.contextmenus]])],4)],6)}}});const lr=(0,Nl.Z)(tr,[["__scopeId","data-v-35c33b80"]]);var ar=lr,nr=(e,t)=>{(0,i.bv)((()=>{if(!t.value)return;let l="normal";if(/m3u8(#|\?|$)/i.exec(e)?l="hls":/.flv(#|\?|$)/i.exec(e)&&(l="flv"),t.value&&"hls"===l&&(t.value.canPlayType("application/x-mpegURL")||t.value.canPlayType("application/vnd.apple.mpegURL"))&&(l="normal"),"hls"===l){const l=window.Hls;if(l&&l.isSupported()){const a=new l;a.loadSource(e),a.attachMedia(t.value)}}else if("flv"===l){const l=window.flvjs;if(l&&l.isSupported()){const a=l.createPlayer({type:"flv",url:e});a.attachMediaElement(t.value),a.load()}}}))};const or=e=>((0,i.dD)("data-v-e55352ca"),e=e(),(0,i.Cn)(),e),ir={key:0,class:"load-error"},sr=["src","autoplay","poster"],rr={class:"bezel"},ur=or((()=>(0,i._)("div",{class:"controller-mask"},null,-1))),cr={class:"controller"},dr={class:"icons icons-left"},pr={class:"icon-content"},vr={class:"volume"},mr={class:"icon-content"},hr=or((()=>(0,i._)("span",{class:"thumb"},null,-1))),fr=[hr],gr={class:"time"},yr={class:"ptime"},wr={class:"dtime"},xr={class:"icons icons-right"},kr={class:"speed"},br={class:"icon speed-icon"},_r=["onClick"],Ir={class:"icon-content"},Sr={class:"bar"},Cr=or((()=>(0,i._)("span",{class:"thumb"},null,-1))),Lr=[Cr];var Er=(0,i.aZ)({__name:"index",props:{width:{},height:{},src:{},poster:{default:""},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e){const t=e,l=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(.5),c=(0,s.iH)(!0),d=(0,s.iH)(0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(1),g=(0,s.iH)(!1),y=(0,s.iH)("00:00"),w=(0,s.iH)("0"),x=(0,i.Fl)((()=>l(d.value))),k=(0,i.Fl)((()=>l(p.value))),b=(0,i.Fl)((()=>d.value/p.value*100+"%")),_=(0,i.Fl)((()=>v.value/p.value*100+"%")),I=(0,i.Fl)((()=>100*u.value+"%")),S=(0,s.iH)(!1),C=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],L=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,p.value),n.value.currentTime=e,d.value=e)},E=()=>{n.value&&(c.value=!1,n.value.play(),h.value=!0)},T=()=>{n.value&&(c.value=!0,n.value.pause(),h.value=!0)},M=()=>{c.value?E():T()},U=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,1),n.value.volume=e,u.value=e,n.value.muted&&0!==e&&(n.value.muted=!1))},W=e=>{n.value&&(n.value.playbackRate=e),f.value=e},D=()=>{p.value=n.value?.duration||0},H=()=>{d.value=n.value?.currentTime||0},F=()=>{m.value?(L(0),E()):T()},A=()=>{v.value=n.value?.buffered.length?n.value.buffered.end(n.value.buffered.length-1):0},Z=(0,s.iH)(!1),$=()=>Z.value=!0,O=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i},z=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i,document.removeEventListener("mousemove",O),document.removeEventListener("touchmove",O),document.removeEventListener("mouseup",z),document.removeEventListener("touchend",z)},P=()=>{document.addEventListener("mousemove",O),document.addEventListener("touchmove",O),document.addEventListener("mouseup",z),document.addEventListener("touchend",z)},R=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-a(r.value))/45;U(l)},B=()=>{document.removeEventListener("mousemove",R),document.removeEventListener("touchmove",R),document.removeEventListener("mouseup",B),document.removeEventListener("touchend",B)},N=()=>{document.addEventListener("mousemove",R),document.addEventListener("touchmove",R),document.addEventListener("mouseup",B),document.addEventListener("touchend",B)},j=e=>{if(!r.value)return;const t=(e.clientX-a(r.value))/45;U(t)},Y=e=>{if(p.value&&o.value){const t=o.value.getBoundingClientRect().left,a=e.clientX-t;if(a<0||a>o.value.offsetWidth)return;const n=p.value*(a/o.value.offsetWidth);w.value=a-(n>=3600?25:20)+"px",y.value=l(n),g.value=!0}},V=()=>{n.value&&(n.value.muted?(n.value.muted=!1,U(.5)):(n.value.muted=!0,U(0)))},J=()=>{m.value=!m.value},q=(0,s.iH)(-1),X=(0,s.iH)(!1),G=()=>{X.value=!1,clearTimeout(q.value),q.value=setTimeout((()=>{n.value?.played.length&&(X.value=!0)}),3e3)};return nr(t.src,n),(e,t)=>{const l=(0,i.up)("IconPause"),a=(0,i.up)("IconPlayOne"),s=(0,i.up)("IconVolumeMute"),d=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["video-player",{"hide-controller":X.value}]),style:(0,ae.j5)({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:t[22]||(t[22]=e=>G()),onClick:t[23]||(t[23]=e=>G())},[(0,i._)("div",{class:"video-wrap",onClick:t[8]||(t[8]=e=>M())},[Z.value?((0,i.wg)(),(0,i.iD)("div",ir,"视频加载失败")):(0,i.kq)("",!0),(0,i._)("video",{class:"video",ref_key:"videoRef",ref:n,src:e.src,autoplay:e.autoplay,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:t[0]||(t[0]=e=>D()),onTimeupdate:t[1]||(t[1]=e=>H()),onEnded:t[2]||(t[2]=e=>F()),onProgress:t[3]||(t[3]=e=>A()),onPlay:t[4]||(t[4]=e=>{G(),c.value=!1}),onPause:t[5]||(t[5]=e=>G()),onError:t[6]||(t[6]=e=>$())},null,40,sr),(0,i._)("div",rr,[(0,i._)("span",{class:(0,ae.C_)(["bezel-icon",{"bezel-transition":h.value}]),onAnimationend:t[7]||(t[7]=e=>h.value=!1)},[c.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))],34)])]),ur,(0,i._)("div",cr,[(0,i._)("div",dr,[(0,i._)("div",{class:"icon play-icon",onClick:t[9]||(t[9]=e=>M())},[(0,i._)("span",pr,[c.value?((0,i.wg)(),(0,i.j4)(a,{key:0})):((0,i.wg)(),(0,i.j4)(l,{key:1}))])]),(0,i._)("div",vr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[10]||(t[10]=e=>V())},[(0,i._)("span",mr,[0===u.value?((0,i.wg)(),(0,i.j4)(s,{key:0})):1===u.value?((0,i.wg)(),(0,i.j4)(d,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[11]||(t[11]=e=>N()),onTouchstart:t[12]||(t[12]=e=>N()),onClick:t[13]||(t[13]=e=>j(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[(0,i._)("div",{class:"volume-bar-inner",style:(0,ae.j5)({width:I.value})},fr,4)],512)],32)]),(0,i._)("span",gr,[(0,i._)("span",yr,(0,ae.zw)(x.value),1),(0,i.Uk)(" / "),(0,i._)("span",wr,(0,ae.zw)(k.value),1)])]),(0,i._)("div",xr,[(0,i._)("div",kr,[(0,i._)("div",br,[(0,i._)("span",{class:"icon-content",onClick:t[14]||(t[14]=e=>S.value=!S.value)},(0,ae.zw)(1===f.value?"倍速":f.value+"x"),1),S.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"speed-menu",onMouseleave:t[15]||(t[15]=e=>S.value=!1)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,ae.C_)(["speed-menu-item",{active:e.value===f.value}]),key:e.label,onClick:t=>W(e.value)},(0,ae.zw)(e.label),11,_r))),64))],32)):(0,i.kq)("",!0)])]),(0,i._)("div",{class:"loop",onClick:t[16]||(t[16]=e=>J())},[(0,i._)("div",{class:(0,ae.C_)(["icon loop-icon",{active:m.value}])},[(0,i._)("span",Ir,"循环"+(0,ae.zw)(m.value?"开":"关"),1)],2)])]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:o,onMousedown:t[17]||(t[17]=e=>P()),onTouchstart:t[18]||(t[18]=e=>P()),onMousemove:t[19]||(t[19]=e=>Y(e)),onMouseenter:t[20]||(t[20]=e=>g.value=!0),onMouseleave:t[21]||(t[21]=e=>g.value=!1)},[(0,i._)("div",{class:(0,ae.C_)(["bar-time",{hidden:!g.value}]),style:(0,ae.j5)({left:w.value})},(0,ae.zw)(y.value),7),(0,i._)("div",Sr,[(0,i._)("div",{class:"loaded",style:(0,ae.j5)({width:_.value})},null,4),(0,i._)("div",{class:"played",style:(0,ae.j5)({width:b.value})},Lr,4)])],544)])],38)}}});const Tr=(0,Nl.Z)(Er,[["__scopeId","data-v-e55352ca"]]);var Mr=Tr,Ur=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-video",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[2]||(t[2]=e=>a(e,!1)),onTouchstart:t[3]||(t[3]=e=>a(e,!1))},[(0,i.Wm)(Mr,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","scale"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(["t","b","l","r"],(e=>(0,i._)("div",{class:(0,ae.C_)(["handler-border",e]),key:e,onMousedown:t[0]||(t[0]=e=>a(e)),onTouchstart:t[1]||(t[1]=e=>a(e))},null,34))),64))],32)),[[n,e.contextmenus]])],4)],6)}}});const Wr=(0,Nl.Z)(Ur,[["__scopeId","data-v-5dc89f2a"]]);var Dr=Wr;const Hr=e=>((0,i.dD)("data-v-44037f56"),e=e(),(0,i.Cn)(),e),Fr=["src","autoplay"],Ar={class:"controller"},Zr={class:"icons"},$r={class:"icon-content"},Or={class:"volume"},zr={class:"icon-content"},Pr=Hr((()=>(0,i._)("span",{class:"thumb"},null,-1))),Rr=[Pr],Br={class:"time"},Nr={class:"ptime"},jr={class:"dtime"},Yr={class:"bar"},Vr=Hr((()=>(0,i._)("span",{class:"thumb"},null,-1))),Jr=[Vr];var qr=(0,i.aZ)({__name:"AudioPlayer",props:{src:{},loop:{type:Boolean},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e,{expose:t}){const l=e,a=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},n=e=>e.getBoundingClientRect().left,o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(),c=(0,s.iH)(.5),d=(0,s.iH)(!0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(0),h=(0,s.iH)(!1),f=(0,s.iH)("00:00"),g=(0,s.iH)("0"),y=(0,i.Fl)((()=>a(p.value))),w=(0,i.Fl)((()=>a(v.value))),x=(0,i.Fl)((()=>p.value/v.value*100+"%")),k=(0,i.Fl)((()=>m.value/v.value*100+"%")),b=(0,i.Fl)((()=>100*c.value+"%")),_=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,v.value),o.value.currentTime=e,p.value=e)},I=()=>{o.value&&(d.value=!1,o.value.play())},S=()=>{o.value&&(d.value=!0,o.value.pause())},C=()=>{d.value?I():S()},L=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,1),o.value.volume=e,c.value=e,o.value.muted&&0!==e&&(o.value.muted=!1))},E=()=>{v.value=o.value?.duration||0},T=()=>{p.value=o.value?.currentTime||0},M=()=>{d.value=!1},U=()=>{l.loop?(_(0),I()):S()},W=()=>{m.value=o.value?.buffered.length?o.value.buffered.end(o.value.buffered.length-1):0},D=()=>Kl.error("视频加载失败"),H=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a},F=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a,document.removeEventListener("mousemove",H),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",F),document.removeEventListener("touchend",F)},A=()=>{document.addEventListener("mousemove",H),document.addEventListener("touchmove",H),document.addEventListener("mouseup",F),document.addEventListener("touchend",F)},Z=e=>{if(!u.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-n(u.value))/45;L(l)},$=()=>{document.removeEventListener("mousemove",Z),document.removeEventListener("touchmove",Z),document.removeEventListener("mouseup",$),document.removeEventListener("touchend",$)},O=()=>{document.addEventListener("mousemove",Z),document.addEventListener("touchmove",Z),document.addEventListener("mouseup",$),document.addEventListener("touchend",$)},z=e=>{if(!u.value)return;const t=(e.clientX-n(u.value))/45;L(t)},P=e=>{if(v.value&&r.value){const t=r.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>r.value.offsetWidth)return;const n=v.value*(l/r.value.offsetWidth);g.value=l-(n>=3600?25:20)+"px",f.value=a(n),h.value=!0}},R=()=>{o.value&&(o.value.muted?(o.value.muted=!1,L(.5)):(o.value.muted=!0,L(0)))};return t({toggle:C}),(e,t)=>{const l=(0,i.up)("IconPlayOne"),a=(0,i.up)("IconPause"),n=(0,i.up)("IconVolumeMute"),s=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:"audio-player",style:(0,ae.j5)({transform:`scale(${1/e.scale})`})},[(0,i._)("audio",{class:"audio",ref_key:"audioRef",ref:o,src:e.src,autoplay:e.autoplay,onDurationchange:t[0]||(t[0]=e=>E()),onTimeupdate:t[1]||(t[1]=e=>T()),onPlay:t[2]||(t[2]=e=>M()),onEnded:t[3]||(t[3]=e=>U()),onProgress:t[4]||(t[4]=e=>W()),onError:t[5]||(t[5]=e=>D())},null,40,Fr),(0,i._)("div",Ar,[(0,i._)("div",Zr,[(0,i._)("div",{class:"icon play-icon",onClick:t[6]||(t[6]=e=>C())},[(0,i._)("span",$r,[d.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))])]),(0,i._)("div",Or,[(0,i._)("div",{class:"icon volume-icon",onClick:t[7]||(t[7]=e=>R())},[(0,i._)("span",zr,[0===c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):1===c.value?((0,i.wg)(),(0,i.j4)(s,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[8]||(t[8]=e=>O()),onTouchstart:t[9]||(t[9]=e=>O()),onClick:t[10]||(t[10]=e=>z(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:u},[(0,i._)("div",{class:"volume-bar-inner",style:(0,ae.j5)({width:b.value})},Rr,4)],512)],32)])]),(0,i._)("span",Br,[(0,i._)("span",Nr,(0,ae.zw)(y.value),1),(0,i.Uk)(" / "),(0,i._)("span",jr,(0,ae.zw)(w.value),1)]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:r,onMousedown:t[11]||(t[11]=e=>A()),onTouchstart:t[12]||(t[12]=e=>A()),onMousemove:t[13]||(t[13]=e=>P(e)),onMouseenter:t[14]||(t[14]=e=>h.value=!0),onMouseleave:t[15]||(t[15]=e=>h.value=!1)},[(0,i._)("div",{class:(0,ae.C_)(["bar-time",{hidden:!h.value}]),style:(0,ae.j5)({left:g.value})},(0,ae.zw)(f.value),7),(0,i._)("div",Yr,[(0,i._)("div",{class:"loaded",style:(0,ae.j5)({width:k.value})},null,4),(0,i._)("div",{class:"played",style:(0,ae.j5)({width:x.value})},Jr,4)])],544)])],4)}}});const Xr=(0,Nl.Z)(qr,[["__scopeId","data-v-44037f56"]]);var Gr=Xr,Kr=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:a}=(0,o.Jk)($()),{viewportRatio:r}=(0,o.Jk)(F()),u=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),c=(0,i.Fl)((()=>{const e=la,a=la*r.value,n=280/l.value,o=50/l.value,i=t.elementInfo.width,s=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=s;return u+n>=e&&(d=i-n),c+s+o>=a&&(p=-o),{left:d+"px",top:p+"px"}})),d=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))};return(e,t)=>{const o=(0,i.up)("IconVolumeNotice"),r=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-audio",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[1]||(t[1]=e=>d(e)),onTouchstart:t[2]||(t[2]=e=>d(e))},[(0,i.Wm)(o,{class:"audio-icon",style:(0,ae.j5)({fontSize:u.value,color:e.elementInfo.color})},null,8,["style"]),(0,s.SU)(a)===e.elementInfo.id?((0,i.wg)(),(0,i.j4)(Gr,{key:0,class:"audio-player",style:(0,ae.j5)({...c.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:(0,s.SU)(l),onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["style","src","loop","scale"])):(0,i.kq)("",!0)],32)),[[r,e.contextmenus]])],4)],6)}}});const Qr=(0,Nl.Z)(Kr,[["__scopeId","data-v-53bdc956"]]);var eu=Qr;const tu=["id"];var lu=(0,i.aZ)({__name:"EditableElement",props:{elementInfo:{},elementIndex:{},isMultiSelect:{type:Boolean},selectElement:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Ho,[na.TEXT]:Gi,[na.SHAPE]:vs,[na.LINE]:Is,[na.CHART]:Us,[na.TABLE]:Gs,[na.LATEX]:ar,[na.VIDEO]:Dr,[na.AUDIO]:eu};return e[t.elementInfo.type]||null})),{orderElement:a}=wa(),{alignElementToCanvas:n}=Yn(),{combineElements:o,uncombineElements:s}=ha(),{deleteElement:r}=ma(),{lockElement:u,unlockElement:c}=va(),{copyElement:d,pasteElement:p,cutElement:v}=fa(),{selectAllElement:m}=ga(),h=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>c(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:v},{text:"复制",subText:"Ctrl + C",handler:d},{text:"粘贴",subText:"Ctrl + V",handler:p},{divider:!0},{text:"水平居中",handler:()=>n(K.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>n(K.CENTER)},{text:"水平居中",handler:()=>n(K.HORIZONTAL)},{text:"左对齐",handler:()=>n(K.LEFT)},{text:"右对齐",handler:()=>n(K.RIGHT)}]},{text:"垂直居中",handler:()=>n(K.VERTICAL),children:[{text:"水平垂直居中",handler:()=>n(K.CENTER)},{text:"垂直居中",handler:()=>n(K.VERTICAL)},{text:"顶部对齐",handler:()=>n(K.TOP)},{text:"底部对齐",handler:()=>n(K.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,G.TOP),children:[{text:"置于顶层",handler:()=>a(t.elementInfo,G.TOP)},{text:"上移一层",handler:()=>a(t.elementInfo,G.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,G.BOTTOM),children:[{text:"置于底层",handler:()=>a(t.elementInfo,G.BOTTOM)},{text:"下移一层",handler:()=>a(t.elementInfo,G.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?s:o,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:m},{text:"锁定",subText:"Ctrl + L",handler:u},{text:"删除",subText:"Delete",handler:r}];return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:h},null,8,["elementInfo","selectElement"]))],12,tu))}});const au=lu;var nu=au,ou=(0,i.aZ)({__name:"MouseSelection",props:{top:{},left:{},width:{},height:{},quadrant:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(`mouse-selection quadrant-${e.quadrant}`),style:(0,ae.j5)({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});const iu=(0,Nl.Z)(ou,[["__scopeId","data-v-2c5e1d42"]]);var su=iu;const ru={class:"grid-lines"},uu=["d","stroke"];var cu=(0,i.aZ)({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=(0,o.Jk)($()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(F()),r=(0,i.Fl)((()=>a.value?.background)),u=(0,i.Fl)((()=>{const e=r.value?.color||"#fff",t=["#000","#fff"];return M.Z.mostReadable(e,t,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()})),c=(0,i.Fl)((()=>{const e=la,t=la*n.value;let a="";for(let n=0;n<=Math.floor(t/l.value);n++)a+=`M0 ${n*l.value} L${e} ${n*l.value} `;for(let n=0;n<=Math.floor(e/l.value);n++)a+=`M${n*l.value} 0 L${n*l.value} ${t} `;return a}));return(e,l)=>((0,i.wg)(),(0,i.iD)("svg",ru,[(0,i._)("path",{style:(0,ae.j5)({transform:`scale(${(0,s.SU)(t)})`}),d:c.value,fill:"none",stroke:u.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,uu)]))}});const du=(0,Nl.Z)(cu,[["__scopeId","data-v-05484a24"]]);var pu=du,vu=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:t,color:l,image:a,imageSize:n,gradientColor:o,gradientRotate:i,gradientType:s}=e.value;if("solid"===t)return{backgroundColor:l};if("image"===t)return a?"repeat"===n?{backgroundImage:`url(${a}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${a}`,backgroundRepeat:"no-repeat",backgroundSize:n||"cover"}:{backgroundColor:"#fff"};if("gradient"===t){const e=i||0,t=o?o[0]:"#fff",l=o?o[1]:"#fff";return"radial"===s?{backgroundImage:`radial-gradient(${t}, ${l}`}:{backgroundImage:`linear-gradient(${e}deg, ${t}, ${l}`}}return{backgroundColor:"#fff"}}));return{backgroundStyle:t}},mu=(0,i.aZ)({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=(0,o.Jk)($()),{currentSlide:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>l.value?.background)),{backgroundStyle:n}=vu(a);return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"viewport-background",style:(0,ae.j5)((0,s.SU)(n))},[(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(pu,{key:0})):(0,i.kq)("",!0)],4))}});const hu=(0,Nl.Z)(mu,[["__scopeId","data-v-b6b18502"]]);var fu=hu,gu=(0,i.aZ)({__name:"AlignmentLine",props:{type:{},axis:{},length:{},canvasScale:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.axis.x*t.canvasScale+"px")),a=(0,i.Fl)((()=>t.axis.y*t.canvasScale+"px")),n=(0,i.Fl)((()=>"vertical"===t.type?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"alignment-line",style:(0,ae.j5)({left:l.value,top:a.value})},[(0,i._)("div",{class:(0,ae.C_)(["line",e.type]),style:(0,ae.j5)(n.value)},null,6)],4))}});const yu=(0,Nl.Z)(gu,[["__scopeId","data-v-ed6fc00a"]]);var wu=yu;const xu={class:"ruler"};var ku=(0,i.aZ)({__name:"Ruler",props:{viewportStyles:{}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.viewportStyles.width*l.value/10));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",xu,[(0,i._)("div",{class:"h",style:(0,ae.j5)({width:e.viewportStyles.width*(0,s.SU)(l)+"px",left:e.viewportStyles.left+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,ae.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:`marker-100-${e}`},[(0,i._)("span",null,(0,ae.zw)(e),1)],2))),64))],4),(0,i._)("div",{class:"v",style:(0,ae.j5)({height:e.viewportStyles.height*(0,s.SU)(l)+"px",top:e.viewportStyles.top+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,ae.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:e,style:(0,ae.j5)({height:a.value+"px"})},[(0,i._)("span",null,(0,ae.zw)(e),1)],6))),64))],4)]))}});const bu=(0,Nl.Z)(ku,[["__scopeId","data-v-2963c74c"]]);var _u=bu;const Iu=["width","height"],Su=["d"];var Cu=(0,i.aZ)({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=$(),{creatingElement:a}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(0,s.iH)(),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!d.value)return;const{x:e,y:t}=d.value.getBoundingClientRect();p.value={x:e,y:t}}));const v=e=>{let n=!0;const o=e.pageX,i=e.pageY;u.value=[o,i],document.onmousemove=e=>{if(!a.value||!n)return;let t=e.pageX,l=e.pageY;if(r.value){const e=t-o,n=l-i,s=Math.abs(e),r=Math.abs(n);if("shape"===a.value.type){const a=n>0&&e<0||n<0&&e>0;s>r?l=a?i-e:i+e:t=a?o-n:o+n}else"line"===a.value.type&&(s>r?l=i:t=o)}c.value=[t,l]},document.onmouseup=e=>{if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout((()=>l.setCreatingElement(null)),0);n=!1;const s=e.pageX,r=e.pageY,d=30;if("line"===a.value?.type&&(Math.abs(s-o)>=d||Math.abs(r-i)>=d))t("created",{start:u.value,end:c.value});else if("line"!==a.value?.type&&Math.abs(s-o)>=d&&Math.abs(r-i)>=d)t("created",{start:u.value,end:c.value});else{const e=200,l=Math.min(s,o),a=Math.min(r,i),n=Math.max(s,o),u=Math.max(r,i),c=n-l>=d?n-l:e,p=u-a>=d?u-a:e;t("created",{start:[l,a],end:[l+c,a+p]})}}},m=(0,i.Fl)((()=>{if(!u.value||!c.value)return null;if(!a.value||"line"!==a.value.type)return null;const[e,t]=u.value,[l,n]=c.value,o=Math.min(e,l),i=Math.max(e,l),s=Math.min(t,n),r=Math.max(t,n),d=i-o>=24?i-o:24,p=r-s>=24?r-s:24,v=e===o?0:i-o,m=t===s?0:r-s,h=l===o?0:i-o,f=n===s?0:r-s,g=`M${v}, ${m} L${h}, ${f}`;return{svgWidth:d,svgHeight:p,startX:v,startY:m,endX:h,endY:f,path:g}})),h=(0,i.Fl)((()=>{if(!u.value||!c.value)return{};const[e,t]=u.value,[l,a]=c.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),r=o-n,d=s-i;return{left:n-p.value.x+"px",top:i-p.value.y+"px",width:r+"px",height:d+"px"}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"element-create-selection",ref_key:"selectionRef",ref:d,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>v(e)),["stop"])),onContextmenu:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop","prevent"]))},[u.value&&c.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["selection",(0,s.SU)(a)?.type]),style:(0,ae.j5)(h.value)},["line"===(0,s.SU)(a)?.type&&m.value?((0,i.wg)(),(0,i.iD)("svg",{key:0,overflow:"visible",width:m.value.svgWidth,height:m.value.svgHeight},[(0,i._)("path",{d:m.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,Su)],8,Iu)):(0,i.kq)("",!0)],6)):(0,i.kq)("",!0)],544))}});const Lu=(0,Nl.Z)(Cu,[["__scopeId","data-v-85b0bbaa"]]);var Eu=Lu;const Tu={overflow:"visible"},Mu=["d","fill"];var Uu=(0,i.aZ)({__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const l=$(),{ctrlOrShiftKeyActive:a}=(0,o.Jk)(V()),r=(0,s.iH)(),u=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!r.value)return;const{x:e,y:t}=r.value.getBoundingClientRect();u.value={x:e,y:t}}));const c=(0,s.iH)(),d=(0,s.iH)([]),p=(0,s.iH)(!1),v=e=>{let t=e.pageX-u.value.x,l=e.pageY-u.value.y;if(a.value&&d.value.length){const[e,a]=d.value[d.value.length-1];Math.abs(e-t)-Math.abs(a-l)>0?l=a:t=e}return{pageX:t,pageY:l}},m=e=>{const{pageX:t,pageY:l}=v(e);if(c.value=[t,l],d.value.length>=2){const[e,a]=d.value[0];Math.abs(e-t)<5&&Math.abs(a-l)<5?p.value=!0:p.value=!1}else p.value=!1},h=(0,i.Fl)((()=>{let e="";for(let t=0;t{const{pageX:l,pageY:a}=v(e);if(p.value){const e=d.value.map((e=>e[0])),l=d.value.map((e=>e[1])),a=Math.min(...e),n=Math.min(...l),o=Math.max(...e),i=Math.max(...l),s=d.value.map((e=>[e[0]-a,e[1]-n]));let r="";for(let t=0;t{l.setCreatingCustomShapeState(!1)},y=e=>{const t=e.key.toUpperCase();t===le.ESC&&g()};return(0,i.bv)((()=>{Kl.success("点击开始绘制任意多边形,首尾闭合完成绘制,按 ESC 键或鼠标右键关闭"),document.addEventListener("keydown",y)})),(0,i.Ah)((()=>document.removeEventListener("keydown",y))),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:r,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>f(e)),["stop"])),onMousemove:t[1]||(t[1]=e=>m(e)),onContextmenu:t[2]||(t[2]=(0,n.iM)((e=>g()),["stop","prevent"]))},[((0,i.wg)(),(0,i.iD)("svg",Tu,[(0,i._)("path",{d:h.value,stroke:"#d14424",fill:p.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,Mu)]))],544))}});const Wu=(0,Nl.Z)(Uu,[["__scopeId","data-v-224f36be"]]);var Du=Wu,Hu=(e,t)=>{const l=(0,i.Fl)((()=>[{direction:ee.LEFT_TOP,style:{}},{direction:ee.TOP,style:{left:e.value/2+"px"}},{direction:ee.RIGHT_TOP,style:{left:e.value+"px"}},{direction:ee.LEFT,style:{top:t.value/2+"px"}},{direction:ee.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:ee.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:ee.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:ee.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}])),a=(0,i.Fl)((()=>[{direction:ee.LEFT,style:{top:t.value/2+"px"}},{direction:ee.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}])),n=(0,i.Fl)((()=>[{direction:ee.TOP,style:{left:e.value/2+"px"}},{direction:ee.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}])),o=(0,i.Fl)((()=>[{type:Q.T,style:{width:e.value+"px"}},{type:Q.B,style:{top:t.value+"px",width:e.value+"px"}},{type:Q.L,style:{height:t.value+"px"}},{type:Q.R,style:{left:e.value+"px",height:t.value+"px"}}]));return{resizeHandlers:l,textElementResizeHandlers:a,verticalTextElementResizeHandlers:n,borderLines:o}},Fu=(0,i.aZ)({__name:"ResizeHandler",props:{type:{},rotate:{default:0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e="rotate-",l=t.rotate;return l>-22.5&&l<=22.5?e+0:l>22.5&&l<=67.5?e+45:l>67.5&&l<=112.5?e+90:l>112.5&&l<=157.5?e+135:l>157.5||l<=-157.5?e+0:l>-157.5&&l<=-112.5?e+45:l>-112.5&&l<=-67.5?e+90:l>-67.5&&l<=-22.5?e+135:e+0}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["resize-handler",l.value,e.type])},null,2))}});const Au=(0,Nl.Z)(Fu,[["__scopeId","data-v-1e66197f"]]);var Zu=Au,$u=(0,i.aZ)({__name:"BorderLine",props:{type:{},isWide:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["border-line",e.type,{wide:e.isWide}])},null,2))}});const Ou=(0,Nl.Z)($u,[["__scopeId","data-v-8346cf6c"]]);var zu=Ou,Pu=(0,i.aZ)({__name:"MultiSelectOperate",props:{elementList:{},scaleMultiElement:{type:Function}},setup(e){const t=e,{activeElementIdList:l,canvasScale:a}=(0,o.Jk)($()),r=(0,i.Fl)((()=>t.elementList.filter((e=>l.value.includes(e.id))))),u=(0,s.iH)({minX:0,maxX:0,minY:0,maxY:0}),c=(0,i.Fl)((()=>(u.value.maxX-u.value.minX)*a.value)),d=(0,i.Fl)((()=>(u.value.maxY-u.value.minY)*a.value)),{resizeHandlers:p,borderLines:v}=Hu(c,d),m=()=>{const{minX:e,maxX:t,minY:l,maxY:a}=we(r.value);u.value={minX:e,maxX:t,minY:l,maxY:a}};(0,i.m0)(m);const h=(0,i.Fl)((()=>r.value.some((e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"multi-select-operate",style:(0,ae.j5)({left:u.value.minX*(0,s.SU)(a)+"px",top:u.value.minY*(0,s.SU)(a)+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),(e=>((0,i.wg)(),(0,i.j4)(zu,{key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),h.value?(0,i.kq)("",!0):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:0},(0,i.Ko)((0,s.SU)(p),(t=>((0,i.wg)(),(0,i.j4)(Zu,{key:t.direction,type:t.direction,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleMultiElement(l,u.value,t.direction)),["stop"])},null,8,["type","style","onMousedown"])))),128))],4))}});const Ru=(0,Nl.Z)(Pu,[["__scopeId","data-v-97dc9b9a"]]);var Bu=Ru;const Nu={class:"rotate-handler"};function ju(e,t){return(0,i.wg)(),(0,i.iD)("div",Nu)}const Yu={},Vu=(0,Nl.Z)(Yu,[["render",ju],["__scopeId","data-v-b99d8dae"]]);var Ju=Vu;const qu={inheritAttrs:!1};var Xu=(0,i.aZ)({...qu,__name:"ImageElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:a}=(0,o.Jk)($()),r=(0,i.Fl)((()=>a.value===t.elementInfo.id)),u=(0,i.Fl)((()=>t.elementInfo.width*l.value)),c=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:d,borderLines:p}=Hu(u,c);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["image-element-operate",{cliping:r.value}])},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(p),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Ju,{class:"operate-rotate-handler",style:(0,ae.j5)({left:u.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)],2))}});const Gu=(0,Nl.Z)(Xu,[["__scopeId","data-v-7bcad5a9"]]);var Ku=Gu;const Qu={class:"text-element-operate"},ec={inheritAttrs:!1};var tc=(0,i.aZ)({...ec,__name:"TextElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{textElementResizeHandlers:u,verticalTextElementResizeHandlers:c,borderLines:d}=Hu(a,r),p=(0,i.Fl)((()=>t.elementInfo.vertical?c.value:u.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Qu,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Ju,{class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const lc=tc;var ac=lc;const nc={class:"shape-element-operate"},oc={inheritAttrs:!1};var ic=(0,i.aZ)({...oc,__name:"ShapeElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},moveShapeKeypoint:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Hu(a,r),d=(0,i.Fl)((()=>{if(!t.elementInfo.pathFormula||!t.elementInfo.keypoint)return{};const e=oa[t.elementInfo.pathFormula];if("editable"in e){const a=e.getBaseSize(t.elementInfo.width,t.elementInfo.height)*t.elementInfo.keypoint;if("left"===e.relative)return{left:a*l.value+"px"};if("right"===e.relative)return{left:(t.elementInfo.width-a)*l.value+"px"};if("center"===e.relative)return{left:(t.elementInfo.width-a)/2*l.value+"px"};if("top"===e.relative)return{top:a*l.value+"px"};if("bottom"===e.relative)return{top:(t.elementInfo.height-a)*l.value+"px"}}return{}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",nc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Ju,{class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]),void 0!==e.elementInfo.keypoint?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"operate-keypoint-handler",style:(0,ae.j5)(d.value),onMousedown:t[1]||(t[1]=(0,n.iM)((t=>e.moveShapeKeypoint(t,e.elementInfo)),["stop"]))},null,36)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)]))}});const sc=(0,Nl.Z)(ic,[["__scopeId","data-v-d1eb5d90"]]);var rc=sc;const uc={class:"line-element-operate"},cc=["width","height","stroke"],dc={key:0},pc=["x1","y1","x2","y2"],vc=["x1","y1","x2","y2"],mc=["x1","y1","x2","y2"],hc=["x1","y1","x2","y2"],fc={inheritAttrs:!1};var gc=(0,i.aZ)({...fc,__name:"LineElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},dragLineElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0]))),r=(0,i.Fl)((()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1]))),u=(0,i.Fl)((()=>{const e=[{handler:te.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:te.END,style:{left:t.elementInfo.end[0]*l.value+"px",top:t.elementInfo.end[1]*l.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken){const a=t.elementInfo.curve||t.elementInfo.broken;e.push({handler:te.C,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}})}else if(t.elementInfo.cubic){const[a,n]=t.elementInfo.cubic;e.push({handler:te.C1,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}}),e.push({handler:te.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",uc,[e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.handler,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.dragLineElement(l,e.elementInfo,t.handler)),["stop"])},null,8,["style","onMousedown"])))),128)),((0,i.wg)(),(0,i.iD)("svg",{width:a.value||1,height:r.value||1,stroke:e.elementInfo.color,overflow:"visible",style:(0,ae.j5)({transform:`scale(${(0,s.SU)(l)})`})},[e.elementInfo.curve?((0,i.wg)(),(0,i.iD)("g",dc,[(0,i._)("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,pc),(0,i._)("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,vc)])):(0,i.kq)("",!0),e.elementInfo.cubic?((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)(e.elementInfo.cubic,((t,l)=>((0,i.wg)(),(0,i.iD)("g",{key:l},[0===l?((0,i.wg)(),(0,i.iD)("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:t[0],y2:t[1]},null,8,mc)):(0,i.kq)("",!0),1===l?((0,i.wg)(),(0,i.iD)("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:t[0],y2:t[1]},null,8,hc)):(0,i.kq)("",!0)])))),128)):(0,i.kq)("",!0)],12,cc))],64)):(0,i.kq)("",!0)]))}});const yc=(0,Nl.Z)(gc,[["__scopeId","data-v-3aa5cc44"]]);var wc=yc;const xc={class:"table-element-operate"},kc={inheritAttrs:!1};var bc=(0,i.aZ)({...kc,__name:"TableElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.outline.width||1)),r=(0,i.Fl)((()=>(t.elementInfo.width+a.value)*l.value)),u=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:c,borderLines:d}=Hu(r,u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",xc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Ju,{class:"operate-rotate-handler",style:(0,ae.j5)({left:r.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const _c=bc;var Ic=_c;const Sc={class:"common-element-operate"},Cc={inheritAttrs:!1};var Lc=(0,i.aZ)({...Cc,__name:"CommonElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Hu(a,r),d=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Sc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),d.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Ju,{key:0,class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)]))}});const Ec=Lc;var Tc=Ec,Mc=()=>{const e=F(),{addHistorySnapshot:t}=ra(),l=(l,a)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===a.type&&!n.test(a.target))return Kl.error("不是正确的网页链接地址"),!1;if("slide"===a.type&&!a.target)return Kl.error("请先选择链接目标"),!1;const o={link:a};return e.updateElement({id:l.id,props:o}),t(),!0},a=l=>{e.removeElementProps({id:l.id,propName:"link"}),t()};return{setLink:l,removeLink:a}},Uc=(0,i.aZ)({__name:"Divider",props:{type:{default:"horizontal"},margin:{default:0}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["divider",e.type]),style:(0,ae.j5)({margin:"horizontal"===e.type?`${e.margin||24}px 0`:`0 ${e.margin||8}px`})},null,6))}});const Wc=(0,Nl.Z)(Uc,[["__scopeId","data-v-6b66cde8"]]);var Dc=Wc;const Hc=["href"],Fc={class:"btns"};var Ac=(0,i.aZ)({__name:"LinkHandler",props:{elementInfo:{},link:{},openLinkDialog:{type:Function}},setup(e){const t=e,l=$(),a=F(),{canvasScale:n}=(0,o.Jk)(l),{slides:r}=(0,o.Jk)(a),{removeLink:u}=Mc(),c=(0,i.Fl)((()=>"line"===t.elementInfo.type?0:t.elementInfo.height)),d=e=>{const t=r.value.findIndex((t=>t.id===e));-1!==t&&(l.setActiveElementIdList([]),a.updateSlideIndex(t))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"link-handler",style:(0,ae.j5)({top:c.value*(0,s.SU)(n)+10+"px"})},["web"===e.link.type?((0,i.wg)(),(0,i.iD)("a",{key:0,class:"link",href:e.link.target,target:"_blank"},(0,ae.zw)(e.link.target),9,Hc)):((0,i.wg)(),(0,i.iD)("a",{key:1,class:"link",onClick:t[0]||(t[0]=t=>d(e.link.target))},"幻灯片页面 "+(0,ae.zw)(e.link.target),1)),(0,i._)("div",Fc,[(0,i._)("div",{class:"btn",onClick:t[1]||(t[1]=t=>e.openLinkDialog())},"更换"),(0,i.Wm)(Dc,{type:"vertical"}),(0,i._)("div",{class:"btn",onClick:t[2]||(t[2]=t=>(0,s.SU)(u)(e.elementInfo))},"移除")])],4))}});const Zc=(0,Nl.Z)(Ac,[["__scopeId","data-v-316c4664"]]);var $c=Zc;const Oc={key:1,class:"animation-index"};var zc=(0,i.aZ)({__name:"index",props:{elementInfo:{},isSelected:{type:Boolean},isActive:{type:Boolean},isActiveGroupElement:{type:Boolean},isMultiSelect:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},dragLineElement:{type:Function},moveShapeKeypoint:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,{canvasScale:l,toolbarState:a}=(0,o.Jk)($()),{formatedAnimations:r}=(0,o.Jk)(F()),u=(0,i.Fl)((()=>{const e={[na.IMAGE]:Ku,[na.TEXT]:ac,[na.SHAPE]:rc,[na.LINE]:wc,[na.TABLE]:Ic,[na.CHART]:Tc,[na.LATEX]:Tc,[na.VIDEO]:Tc,[na.AUDIO]:Tc};return e[t.elementInfo.type]||null})),c=(0,i.Fl)((()=>{const e=[];for(let l=0;le.elId));a.includes(t.elementInfo.id)&&e.push(l)}return e})),d=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),p=(0,i.Fl)((()=>"height"in t.elementInfo?t.elementInfo.height:0));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:(0,ae.j5)({top:e.elementInfo.top*(0,s.SU)(l)+"px",left:e.elementInfo.left*(0,s.SU)(l)+"px",transform:`rotate(${d.value}deg)`,transformOrigin:`${e.elementInfo.width*(0,s.SU)(l)/2}px ${p.value*(0,s.SU)(l)/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.j4)((0,i.LL)(u.value),{key:0,elementInfo:e.elementInfo,handlerVisible:!e.elementInfo.lock&&(e.isActiveGroupElement||!e.isMultiSelect),rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement,moveShapeKeypoint:e.moveShapeKeypoint},null,8,["elementInfo","handlerVisible","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])):(0,i.kq)("",!0),"elAnimation"===(0,s.SU)(a)&&c.value.length?((0,i.wg)(),(0,i.iD)("div",Oc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"index-item",key:e},(0,ae.zw)(e+1),1)))),128))])):(0,i.kq)("",!0),e.isActive&&e.elementInfo.link?((0,i.wg)(),(0,i.j4)($c,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):(0,i.kq)("",!0)],6))}});const Pc=(0,Nl.Z)(zc,[["__scopeId","data-v-5ec1ff35"]]);var Rc=Pc;const Bc=["src"];var Nc=(0,i.aZ)({__name:"BaseImageElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l),n=(0,i.Fl)((()=>t.elementInfo.flipH)),o=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:r}=Jn(n,o),u=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:c,imgPosition:d}=Xn(u),p=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:v}=Gn(p);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-image",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:"",transform:(0,s.SU)(r)})},[(0,i.Wm)(yo,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,ae.j5)({clipPath:(0,s.SU)(c).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,ae.j5)({top:(0,s.SU)(d).top,left:(0,s.SU)(d).left,width:(0,s.SU)(d).width,height:(0,s.SU)(d).height,filter:(0,s.SU)(v)}),alt:""},null,12,Bc),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,ae.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],4)],4)],4))}});const jc=(0,Nl.Z)(Nc,[["__scopeId","data-v-24fef706"]]);var Yc=jc;const Vc=["innerHTML"];var Jc=(0,i.aZ)({__name:"BaseTextElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-text",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,s.SU)(a),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i._)("div",{class:"text ProseMirror-static",style:(0,ae.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,12,Vc)],4)],4)],4))}});const qc=(0,Nl.Z)(Jc,[["__scopeId","data-v-52a206f2"]]);var Xc=qc;const Gc=["width","height"],Kc={key:0},Qc=["transform"],ed=["d","fill","stroke","stroke-width","stroke-dasharray"],td=["innerHTML"];var ld=(0,i.aZ)({__name:"BaseShapeElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:a,outlineColor:n,strokeDashArray:o}=Kn(l),r=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:u}=Vn(r),c=(0,i.Fl)((()=>t.elementInfo.flipH)),d=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:p}=Jn(c,d),v=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-shape",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(u)?`drop-shadow(${(0,s.SU)(u)})`:"",transform:(0,s.SU)(p),color:v.value.defaultColor,fontFamily:v.value.defaultFontName})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",Kc,[(0,i.Wm)(is,{id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#base-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(n),"stroke-width":(0,s.SU)(a),"stroke-dasharray":(0,s.SU)(o)},null,8,ed)],8,Qc)],8,Gc)),(0,i._)("div",{class:(0,ae.C_)(["shape-text",v.value.align])},[(0,i._)("div",{class:"ProseMirror-static",innerHTML:v.value.content},null,8,td)],2)],4)],4)],4))}});const ad=(0,Nl.Z)(ld,[["__scopeId","data-v-b13f8fa8"]]);var nd=ad;const od=["width","height"],id=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var sd=(0,i.aZ)({__name:"BaseLineElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l),n=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),r=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),u=(0,i.Fl)((()=>Ie(t.elementInfo)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-line",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:""})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:n.value,height:o.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(ys,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(ys,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0)]),(0,i._)("path",{d:u.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":r.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,id)],8,od))],4)],4))}});const rd=(0,Nl.Z)(sd,[["__scopeId","data-v-443e2f82"]]);var ud=rd,cd=(0,i.aZ)({__name:"BaseChartElement",props:{elementInfo:{}},setup(e){const t=(0,i.f3)(Sn)||(0,s.iH)(1),l=(0,i.Fl)((()=>t.value<1)),a=(0,i.Fl)((()=>l.value?1/t.value:1));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-chart",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({backgroundColor:e.elementInfo.fill})},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Es,{width:e.elementInfo.width*a.value,height:e.elementInfo.height*a.value,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||"",style:(0,ae.j5)({zoom:1/a.value})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});const dd=(0,Nl.Z)(cd,[["__scopeId","data-v-7c03d68d"]]);var pd=dd;const vd=["width"],md=["rowspan","colspan"],hd=["innerHTML"];var fd=(0,i.aZ)({__name:"StaticTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},setup(e){const t=e,l=(0,s.iH)([]),a=(0,i.Fl)((()=>l.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>t.colWidths,()=>t.width],(()=>{l.value=t.colWidths.map((e=>e*t.width))}),{immediate:!0});const o=(0,i.Fl)((()=>t.data)),{hideCells:r}=Hs(o),u=(0,i.Fl)((()=>t.theme)),{subThemeColor:c}=Fs(u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"static-table",style:(0,ae.j5)({width:a.value+"px"})},[(0,i._)("table",{class:(0,ae.C_)({theme:u.value,"row-header":u.value?.rowHeader,"row-footer":u.value?.rowFooter,"col-header":u.value?.colHeader,"col-footer":u.value?.colFooter}),style:(0,ae.j5)(`--themeColor: ${u.value?.color}; --subThemeColor1: ${(0,s.SU)(c)[0]}; --subThemeColor2: ${(0,s.SU)(c)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,vd)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.data,((t,l)=>((0,i.wg)(),(0,i.iD)("tr",{key:l,style:(0,ae.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,a)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:"cell",style:(0,ae.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)(Ws)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[(0,i._)("div",{class:"cell-text",style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Ds)(t.text)},null,12,hd)],12,md)),[[n.F8,!(0,s.SU)(r).includes(`${l}_${a}`)]]))),128))],4)))),128))])],6)],4))}});const gd=(0,Nl.Z)(fd,[["__scopeId","data-v-5d949d4d"]]);var yd=gd;const wd={class:"element-content"};var xd=(0,i.aZ)({__name:"BaseTableElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-table",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",wd,[(0,i.Wm)(yd,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}});const kd=(0,Nl.Z)(xd,[["__scopeId","data-v-3eff7eba"]]);var bd=kd;const _d={class:"element-content"},Id=["width","height","stroke","stroke-width"],Sd=["transform"],Cd=["d"];var Ld=(0,i.aZ)({__name:"BaseLatexElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-latex",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",_d,[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,Cd)],8,Sd)],8,Id))])],4)],4))}});const Ed=(0,Nl.Z)(Ld,[["__scopeId","data-v-1587280d"]]);var Td=Ed,Md=(0,i.aZ)({__name:"BaseVideoElement",props:{elementInfo:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlayOne");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-video",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[(0,i.Wm)(l,{class:"icon"})],4)],4)],4)}}});const Ud=(0,Nl.Z)(Md,[["__scopeId","data-v-09436dde"]]);var Wd=Ud;const Dd={class:"element-content"};var Hd=(0,i.aZ)({__name:"BaseAudioElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"));return(e,t)=>{const a=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Dd,[(0,i.Wm)(a,{class:"audio-icon",style:(0,ae.j5)({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});const Fd=(0,Nl.Z)(Hd,[["__scopeId","data-v-5da834d7"]]);var Ad=Fd,Zd=(0,i.aZ)({__name:"ThumbnailElement",props:{elementInfo:{},elementIndex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Yc,[na.TEXT]:Xc,[na.SHAPE]:nd,[na.LINE]:ud,[na.CHART]:pd,[na.TABLE]:bd,[na.LATEX]:Td,[na.VIDEO]:Wd,[na.AUDIO]:Ad};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["base-element",`base-element-${e.elementInfo.id}`]),style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const $d=Zd;var Od=$d;const zd={key:1,class:"placeholder"};var Pd=(0,i.aZ)({__name:"index",props:{slide:{},size:{},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=vu(a),r=(0,i.Fl)((()=>t.size/la));return(0,i.JJ)(Sn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-slide",style:(0,ae.j5)({width:e.size+"px",height:e.size*(0,s.SU)(l)+"px"})},[e.visible?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"elements",style:(0,ae.j5)({width:(0,s.SU)(la)+"px",height:(0,s.SU)(la)*(0,s.SU)(l)+"px",transform:`scale(${r.value})`})},[(0,i._)("div",{class:"background",style:(0,ae.j5)((0,s.SU)(n))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((e,t)=>((0,i.wg)(),(0,i.j4)(Od,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"])))),128))],4)):((0,i.wg)(),(0,i.iD)("div",zd,"加载中 ..."))],4))}});const Rd=(0,Nl.Z)(Pd,[["__scopeId","data-v-43dcaa52"]]);var Bd=Rd;const Nd=["onClick"];var jd=(0,i.aZ)({__name:"Tabs",props:{value:{},tabs:{},card:{type:Boolean,default:!1},tabsStyle:{},tabStyle:{},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:(0,ae.j5)(e.tabsStyle||{})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.tabs,(l=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["tab",{active:l.key===e.value}]),key:l.key,style:(0,ae.j5)({...e.tabStyle||{},"--color":l.color}),onClick:e=>t("update:value",l.key)},(0,ae.zw)(l.label),15,Nd)))),128))],6))}});const Yd=(0,Nl.Z)(jd,[["__scopeId","data-v-5e3d7626"]]);var Vd=Yd,Jd=(0,i.aZ)({__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"default"},size:{default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const l=e,a=()=>{l.disabled||t("click")};return(e,t)=>((0,i.wg)(),(0,i.iD)("button",{class:(0,ae.C_)(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&"default"===e.type,primary:!e.disabled&&"primary"===e.type,checkbox:!e.disabled&&"checkbox"===e.type,radio:!e.disabled&&"radio"===e.type,small:"small"===e.size,first:e.first,last:e.last}]),onClick:t[0]||(t[0]=e=>a())},[(0,i.WI)(e.$slots,"default")],2))}});const qd=(0,Nl.Z)(Jd,[["__scopeId","data-v-52c90330"]]);var Xd=qd;const Gd={key:0,class:"select-wrap"},Kd={class:"selector"},Qd={class:"icon"},ep=["onClick"],tp={class:"selector"},lp={class:"icon"};var ap=(0,i.aZ)({__name:"Select",props:{value:{},options:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.options.find((e=>e.value===l.value))?.label||l.value)),n=(0,s.iH)(!1),o=(0,s.iH)(),r=(0,s.iH)(0),u=()=>{o.value&&(r.value=o.value.clientWidth)},c=new ResizeObserver(u);(0,i.bv)((()=>{o.value&&c.observe(o.value)})),(0,i.Ah)((()=>{o.value&&c.unobserve(o.value)}));const d=e=>{e.disabled||(t("update:value",e.value),n.value=!1)};return(e,t)=>{const l=(0,i.up)("IconDown");return e.disabled?((0,i.wg)(),(0,i.iD)("div",Gd,[(0,i._)("div",{class:"select disabled",ref_key:"selectRef",ref:o},[(0,i._)("div",Kd,(0,ae.zw)(e.value),1),(0,i._)("div",Qd,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])):((0,i.wg)(),(0,i.j4)(rn,{key:1,class:"select-wrap",trigger:"click",value:n.value,"onUpdate:value":t[0]||(t[0]=e=>n.value=e),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:(0,i.w5)((()=>[(0,i._)("div",{class:"options",style:(0,ae.j5)({width:r.value+2+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.options,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["option",{disabled:t.disabled,selected:t.value===e.value}]),key:t.value,onClick:e=>d(t)},(0,ae.zw)(t.label),11,ep)))),128))],4)])),default:(0,i.w5)((()=>[(0,i._)("div",{class:"select",ref_key:"selectRef",ref:o},[(0,i._)("div",tp,(0,ae.zw)(a.value),1),(0,i._)("div",lp,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])),_:3},8,["value","contentStyle"]))}}});const np=(0,Nl.Z)(ap,[["__scopeId","data-v-5bf3b141"]]);var op=np;const ip=e=>((0,i.dD)("data-v-cc39ee16"),e=e(),(0,i.Cn)(),e),sp={class:"link-dialog"},rp={key:2,class:"preview"},up=ip((()=>(0,i._)("div",null,"预览:",-1))),cp={class:"btns"};var dp=(0,i.aZ)({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){const{handleElement:l}=(0,o.Jk)($()),{slides:a,currentSlide:n}=(0,o.Jk)(F()),r=(0,s.iH)("web"),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,i.Fl)((()=>a.value.map(((e,t)=>({label:`幻灯片 ${t+1}`,value:e.id,disabled:n.value.id===e.id})))));c.value=a.value.find((e=>e.id!==n.value.id))?.id||"";const p=(0,i.Fl)((()=>c.value&&a.value.find((e=>e.id===c.value))||null)),v=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:m}=Mc();(0,i.bv)((()=>{l.value?.link&&("web"===l.value.link.type?u.value=l.value.link.target:"slide"===l.value.link.type&&(c.value=l.value.link.target),r.value=l.value.link.type)}));const h=()=>{const e={type:r.value,target:"web"===r.value?u.value:c.value};if(l.value){const a=m(l.value,e);a?t("close"):u.value=""}};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",sp,[(0,i.Wm)(Vd,{tabs:v,value:r.value,"onUpdate:value":l[0]||(l[0]=e=>r.value=e),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),"web"===r.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"input",value:u.value,"onUpdate:value":l[1]||(l[1]=e=>u.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):(0,i.kq)("",!0),"slide"===r.value?((0,i.wg)(),(0,i.j4)(op,{key:1,class:"input",value:c.value,"onUpdate:value":l[2]||(l[2]=e=>c.value=e),options:d.value},null,8,["value","options"])):(0,i.kq)("",!0),"slide"===r.value&&p.value?((0,i.wg)(),(0,i.iD)("div",rp,[up,(0,i.Wm)(Bd,{class:"thumbnail",slide:p.value,size:500},null,8,["slide"])])):(0,i.kq)("",!0),(0,i._)("div",cp,[(0,i.Wm)(Xd,{onClick:l[3]||(l[3]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{type:"primary",onClick:l[4]||(l[4]=e=>h())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])]))}});const pp=(0,Nl.Z)(dp,[["__scopeId","data-v-cc39ee16"]]);var vp=pp,mp=(0,i.aZ)({__name:"Modal",props:{visible:{type:Boolean},width:{default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{}},emits:["update:visible","closed"],setup(e,{emit:t}){const l=e,{IconClose:a}=Fl,o=(0,s.iH)(),r=(0,s.iH)(!1),u=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));(0,i.YP)((()=>l.visible),(()=>{l.visible&&(0,i.Y3)((()=>o.value.focus()))}));const c=()=>{t("update:visible",!1),t("closed")},d=()=>{l.visible&&l.closeOnEsc&&c()},p=()=>{l.closeOnClickMask&&c()};return(e,t)=>((0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:"modal-fade"},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal",ref_key:"modalRef",ref:o,tabindex:"-1",onKeyup:t[4]||(t[4]=(0,n.D2)((e=>d()),["esc"]))},[(0,i._)("div",{class:"mask",onClick:t[0]||(t[0]=e=>p())}),(0,i.Wm)(n.uT,{name:"modal-zoom",onAfterLeave:t[2]||(t[2]=e=>r.value=!1),onBeforeEnter:t[3]||(t[3]=e=>r.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal-content",style:(0,ae.j5)(u.value)},[e.closeButton?((0,i.wg)(),(0,i.iD)("span",{key:0,class:"close-btn",onClick:t[1]||(t[1]=e=>c())},[(0,i.Wm)((0,s.SU)(a))])):(0,i.kq)("",!0),r.value?(0,i.WI)(e.$slots,"default",{key:1}):(0,i.kq)("",!0)],4),[[n.F8,e.visible]])])),_:3})],544),[[n.F8,e.visible]])])),_:3})]))}});const hp=(0,Nl.Z)(mp,[["__scopeId","data-v-fea8edcc"]]);var fp=hp;const gp={class:"operates"},yp={key:2,class:"drag-mask"};var wp=(0,i.aZ)({__name:"index",setup(e){const t=$(),{activeElementIdList:l,activeGroupElementId:a,handleElementId:r,hiddenElementIdList:u,editorAreaFocus:c,gridLineSize:d,showRuler:p,creatingElement:v,creatingCustomShape:m,canvasScale:h,textFormatPainter:f}=(0,o.Jk)(t),{currentSlide:g}=(0,o.Jk)(F()),{ctrlKeyState:y,spaceKeyState:w}=(0,o.Jk)(V()),x=(0,s.iH)(),k=(0,s.iH)([]),b=(0,s.iH)(!1),_=()=>b.value=!0;(0,i.YP)(r,(()=>{t.setActiveGroupElementId("")}));const I=(0,s.iH)([]),S=()=>{I.value=g.value?JSON.parse(JSON.stringify(g.value.elements)):[]};(0,i.m0)(S);const C=(0,s.iH)(),{dragViewport:L,viewportStyles:E}=Tn(C);Un(C);const{mouseSelection:T,mouseSelectionVisible:M,mouseSelectionQuadrant:W,updateMouseSelection:D}=Mn(I,x),{dragElement:H}=Rn(I,k,h),{dragLineElement:A}=Bn(I),{selectElement:Z}=Pn(I,H),{scaleElement:O,scaleMultiElement:z}=zn(I,k,h),{rotateElement:P}=Dn(I,x,h),{moveShapeKeypoint:R}=Nn(I,h),{selectAllElement:B}=ga(),{deleteAllElements:N}=ma(),{pasteElement:j}=fa(),{enterScreeningFromStart:Y}=_a(),{updateSlideIndex:J}=pa(),{createTextElement:q,createShapeElement:X}=ua();(0,i.bv)((()=>{l.value.length&&(0,i.Y3)((()=>t.setActiveElementIdList([])))}));const G=e=>{l.value.length&&t.setActiveElementIdList([]),w.value?L(e):D(e),c.value||t.setEditorareaFocus(!0),f.value&&t.setTextFormatPainter(null),En()},K=e=>{if(l.value.length||v.value||m.value)return;if(!x.value)return;const t=x.value.getBoundingClientRect(),a=(e.pageX-t.x)/h.value,n=(e.pageY-t.y)/h.value;q({left:a,top:n,width:200/h.value,height:0})};(0,i.Ah)((()=>{f.value&&t.setTextFormatPainter(null)}));const Q=()=>{c.value&&t.setEditorareaFocus(!1)},{scaleCanvas:ee}=Ia(),te=(0,U.throttle)(ee,100,{leading:!0,trailing:!1}),ne=(0,U.throttle)(J,300,{leading:!0,trailing:!1}),oe=e=>{e.preventDefault(),y.value?e.deltaY>0?te("-"):e.deltaY<0&&te("+"):e.deltaY>0?ne(le.DOWN):e.deltaY<0&&ne(le.UP)},ie=()=>{t.setRulerState(!p.value)},{insertElementFromCreateSelection:se,formatCreateSelection:re}=jn(x),ue=e=>{const{start:l,end:a,path:n,viewBox:o}=e,i=re({start:l,end:a});i&&X(i,{path:n,viewBox:o}),t.setCreatingCustomShapeState(!1)},ce=()=>[{text:"粘贴",subText:"Ctrl + V",handler:j},{text:"全选",subText:"Ctrl + A",handler:B},{text:"标尺",subText:p.value?"√":"",handler:ie},{text:"网格线",handler:()=>t.setGridLineSize(d.value?0:50),children:[{text:"无",subText:0===d.value?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:25===d.value?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:50===d.value?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:100===d.value?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:"重置当前页",handler:N},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:Y}];return(0,i.JJ)(Sn,h),(e,t)=>{const o=(0,i.Q2)("contextmenu"),c=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"canvas",ref_key:"canvasRef",ref:C,onWheel:t[4]||(t[4]=e=>oe(e)),onMousedown:t[5]||(t[5]=e=>G(e)),onDblclick:t[6]||(t[6]=e=>K(e))},[(0,s.SU)(v)?((0,i.wg)(),(0,i.j4)(Eu,{key:0,onCreated:t[0]||(t[0]=e=>(0,s.SU)(se)(e))})):(0,i.kq)("",!0),(0,s.SU)(m)?((0,i.wg)(),(0,i.j4)(Du,{key:1,onCreated:t[1]||(t[1]=e=>ue(e))})):(0,i.kq)("",!0),(0,i._)("div",{class:"viewport-wrapper",style:(0,ae.j5)({width:(0,s.SU)(E).width*(0,s.SU)(h)+"px",height:(0,s.SU)(E).height*(0,s.SU)(h)+"px",left:(0,s.SU)(E).left+"px",top:(0,s.SU)(E).top+"px"})},[(0,i._)("div",gp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(k.value,((e,t)=>((0,i.wg)(),(0,i.j4)(wu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:(0,s.SU)(h)},null,8,["type","axis","length","canvasScale"])))),128)),(0,s.SU)(l).length>1?((0,i.wg)(),(0,i.j4)(Bu,{key:0,elementList:I.value,scaleMultiElement:(0,s.SU)(z)},null,8,["elementList","scaleMultiElement"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,(e=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rc,{key:e.id,elementInfo:e,isSelected:(0,s.SU)(l).includes(e.id),isActive:(0,s.SU)(r)===e.id,isActiveGroupElement:(0,s.SU)(a)===e.id,isMultiSelect:(0,s.SU)(l).length>1,rotateElement:(0,s.SU)(P),scaleElement:(0,s.SU)(O),openLinkDialog:_,dragLineElement:(0,s.SU)(A),moveShapeKeypoint:(0,s.SU)(R)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128)),(0,i.Wm)(fu)]),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:x,style:(0,ae.j5)({transform:`scale(${(0,s.SU)(h)})`})},[(0,s.SU)(M)?((0,i.wg)(),(0,i.j4)(su,{key:0,top:(0,s.SU)(T).top,left:(0,s.SU)(T).left,width:(0,s.SU)(T).width,height:(0,s.SU)(T).height,quadrant:(0,s.SU)(W)},null,8,["top","left","width","height","quadrant"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,((e,t)=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(nu,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:(0,s.SU)(l).length>1,selectElement:(0,s.SU)(Z),openLinkDialog:_},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128))],4)],4),(0,s.SU)(w)?((0,i.wg)(),(0,i.iD)("div",yp)):(0,i.kq)("",!0),(0,s.SU)(p)?((0,i.wg)(),(0,i.j4)(_u,{key:3,viewportStyles:(0,s.SU)(E)},null,8,["viewportStyles"])):(0,i.kq)("",!0),(0,i.Wm)(fp,{visible:b.value,"onUpdate:visible":t[3]||(t[3]=e=>b.value=e),width:540},{default:(0,i.w5)((()=>[(0,i.Wm)(vp,{onClose:t[2]||(t[2]=e=>b.value=!1)})])),_:1},8,["visible"])],32)),[[o,ce],[c,Q]])}}});const xp=(0,Nl.Z)(wp,[["__scopeId","data-v-ce64755c"]]);var kp=xp;const bp={class:"shape-item-thumbnail"},_p={class:"shape-content"},Ip={overflow:"visible",width:"18",height:"18"},Sp=["transform"],Cp=["fill","stroke","d"];var Lp=(0,i.aZ)({__name:"ShapeItemThumbnail",props:{shape:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",bp,[(0,i._)("div",_p,[((0,i.wg)(),(0,i.iD)("svg",Ip,[(0,i._)("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:(0,ae.C_)(["shape-path",{outlined:e.shape.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.shape.outlined?"#999":"transparent",stroke:e.shape.outlined?"transparent":"#999","stroke-width":"2",d:e.shape.path},null,10,Cp)],8,Sp)]))])]))}});const Ep=(0,Nl.Z)(Lp,[["__scopeId","data-v-8603ad34"]]);var Tp=Ep;const Mp={class:"shape-pool"},Up={class:"category-name"},Wp={class:"shape-list"};var Dp=(0,i.aZ)({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Mp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ia),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Up,(0,ae.zw)(e.type),1),(0,i._)("div",Wp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.j4)(Tp,{class:"shape-item",key:t,shape:e,onClick:t=>l(e)},null,8,["shape","onClick"])))),128))])])))),128))]))}});const Hp=(0,Nl.Z)(Dp,[["__scopeId","data-v-8b994b42"]]);var Fp=Hp;const Ap=[{type:"直线",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"]}]},{type:"折线、曲线",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0}]}],Zp={class:"line-pool"},$p={class:"category-name"},Op={class:"line-list"},zp=["onClick"],Pp={overflow:"visible",width:"20",height:"20"},Rp=["d","stroke-dasharray","marker-start","marker-end"];var Bp=(0,i.aZ)({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Zp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Ap),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",$p,(0,ae.zw)(e.type),1),(0,i._)("div",Op,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"line-item",key:a},[(0,i._)("div",{class:"line-content",onClick:t=>l(e)},[((0,i.wg)(),(0,i.iD)("svg",Pp,[(0,i._)("defs",null,[e.points[0]?((0,i.wg)(),(0,i.j4)(ys,{key:0,class:"line-marker",id:`preset-line-${t}-${a}`,position:"start",type:e.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0),e.points[1]?((0,i.wg)(),(0,i.j4)(ys,{key:1,class:"line-marker",id:`preset-line-${t}-${a}`,position:"end",type:e.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-path",d:e.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":"solid"===e.style?"0, 0":"4, 1","marker-start":e.points[0]?`url(#preset-line-${t}-${a}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${a}-${e.points[1]}-end)`:""},null,8,Rp)]))],8,zp)])))),128))])])))),128))]))}});const Np=(0,Nl.Z)(Bp,[["__scopeId","data-v-554824b6"]]);var jp=Np;const Yp={class:"chart-pool"},Vp=["onClick"];var Jp=(0,i.aZ)({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=["bar","horizontalBar","line","area","scatter","pie","ring"],a=e=>{t("select",e)};return(e,t)=>{const n=(0,i.up)("IconChartLine"),o=(0,i.up)("IconChartHistogram"),s=(0,i.up)("IconChartPie"),r=(0,i.up)("IconChartHistogramOne"),u=(0,i.up)("IconChartLineArea"),c=(0,i.up)("IconChartRing"),d=(0,i.up)("IconChartScatter");return(0,i.wg)(),(0,i.iD)("ul",Yp,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,((e,t)=>(0,i._)("li",{class:"chart-item",key:t},[(0,i._)("div",{class:"chart-content",onClick:t=>a(e)},["line"===e?((0,i.wg)(),(0,i.j4)(n,{key:0,size:"24"})):"bar"===e?((0,i.wg)(),(0,i.j4)(o,{key:1,size:"24"})):"pie"===e?((0,i.wg)(),(0,i.j4)(s,{key:2,size:"24"})):"horizontalBar"===e?((0,i.wg)(),(0,i.j4)(r,{key:3,size:"24"})):"area"===e?((0,i.wg)(),(0,i.j4)(u,{key:4,size:"24"})):"ring"===e?((0,i.wg)(),(0,i.j4)(c,{key:5,size:"24"})):"scatter"===e?((0,i.wg)(),(0,i.j4)(d,{key:6,size:"24"})):(0,i.kq)("",!0)],8,Vp)]))),64))])}}});const qp=(0,Nl.Z)(Jp,[["__scopeId","data-v-398f5699"]]);var Xp=qp;const Gp=e=>((0,i.dD)("data-v-268948c2"),e=e(),(0,i.Cn)(),e),Kp={class:"prefix"},Qp={class:"input-wrap"},ev=["disabled","placeholder"],tv={class:"handlers"},lv=Gp((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"})],-1))),av=[lv],nv=Gp((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})],-1))),ov=[nv],iv={class:"suffix"};var sv=(0,i.aZ)({__name:"NumberInput",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""},min:{default:0},max:{default:1/0},step:{default:1}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),o=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{l.value!==a.value&&(a.value=l.value)}),{immediate:!0}),(0,i.YP)(a,(()=>{let e=+a.value;isNaN(e)?e=l.min:e>l.max?e=l.max:e{o.value=!1,t("blur",e)},u=e=>{o.value=!0,t("focus",e)};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["number-input",{disabled:e.disabled,focused:o.value}])},[(0,i._)("span",Kp,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("div",Qp,[(0,i.wy)((0,i._)("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),placeholder:e.placeholder,onInput:l[1]||(l[1]=e=>t("input",e)),onFocus:l[2]||(l[2]=e=>u(e)),onBlur:l[3]||(l[3]=e=>r(e)),onChange:l[4]||(l[4]=e=>t("change",e)),onKeydown:l[5]||(l[5]=(0,n.D2)((e=>t("enter",e)),["enter"]))},null,40,ev),[[n.nr,a.value]]),(0,i._)("div",tv,[(0,i._)("span",{class:"handler",onClick:l[6]||(l[6]=t=>a.value+=e.step)},av),(0,i._)("span",{class:"handler",onClick:l[7]||(l[7]=t=>a.value-=e.step)},ov)])]),(0,i._)("span",iv,[(0,i.WI)(e.$slots,"suffix")])],2))}});const rv=(0,Nl.Z)(sv,[["__scopeId","data-v-268948c2"]]);var uv=rv;const cv=e=>((0,i.dD)("data-v-372c6730"),e=e(),(0,i.Cn)(),e),dv={class:"table-generator"},pv={class:"title"},vv={class:"lef"},mv=["onMouseenter"],hv={key:1,class:"custom"},fv={class:"row"},gv=cv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"行数:",-1))),yv={class:"row"},wv=cv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"列数:",-1))),xv={class:"btns"};var kv=(0,i.aZ)({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=(0,s.iH)([]),a=(0,s.iH)(3),n=(0,s.iH)(3),o=(0,s.iH)(!1),r=()=>{if(!l.value.length)return;const[e,a]=l.value;t("insert",{row:e,col:a})},u=()=>a.value<1||a.value>20||n.value<1||n.value>20?Kl.warning("行数/列数必须在0~20之间!"):(t("insert",{row:a.value,col:n.value}),void(o.value=!1)),c=()=>{t("close"),o.value=!1};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",dv,[(0,i._)("div",pv,[(0,i._)("div",vv,"表格 "+(0,ae.zw)(l.value.length?`${l.value[0]} x ${l.value[1]}`:""),1),(0,i._)("div",{class:"right",onClick:t[0]||(t[0]=e=>o.value=!o.value)},(0,ae.zw)(o.value?"返回":"自定义"),1)]),o.value?((0,i.wg)(),(0,i.iD)("div",hv,[(0,i._)("div",fv,[gv,(0,i.Wm)(uv,{min:1,max:20,value:a.value,"onUpdate:value":t[3]||(t[3]=e=>a.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",yv,[wv,(0,i.Wm)(uv,{min:1,max:20,value:n.value,"onUpdate:value":t[4]||(t[4]=e=>n.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",xv,[(0,i.Wm)(Xd,{class:"btn",onClick:t[5]||(t[5]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])):((0,i.wg)(),(0,i.iD)("table",{key:0,onMouseleave:t[1]||(t[1]=e=>l.value=[]),onClick:t[2]||(t[2]=e=>r())},[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(t=>(0,i._)("td",{onMouseenter:a=>l.value=[e,t],key:t},[(0,i._)("div",{class:(0,ae.C_)(["cell",{active:l.value.length&&e<=l.value[0]&&t<=l.value[1]}])},null,2)],40,mv))),64))]))),64))])],32))]))}});const bv=(0,Nl.Z)(kv,[["__scopeId","data-v-372c6730"]]);var _v=bv;const Iv={class:"media-input"},Sv={class:"btns"},Cv={class:"btns"};var Lv=(0,i.aZ)({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=(0,s.iH)("video"),a=(0,s.iH)("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),n=(0,s.iH)("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),o=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],r=()=>{if(!a.value)return Kl.error("请先输入正确的视频地址");t("insertVideo",a.value)},u=()=>{if(!n.value)return Kl.error("请先输入正确的音频地址");t("insertAudio",n.value)};return(e,s)=>((0,i.wg)(),(0,i.iD)("div",Iv,[(0,i.Wm)(Vd,{tabs:o,value:l.value,"onUpdate:value":s[0]||(s[0]=e=>l.value=e),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),"video"===l.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i.Wm)(an,{value:a.value,"onUpdate:value":s[1]||(s[1]=e=>a.value=e),placeholder:"请输入视频地址,e.g. https://xxx.mp4"},null,8,["value"]),(0,i._)("div",Sv,[(0,i.Wm)(Xd,{onClick:s[2]||(s[2]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{type:"primary",onClick:s[3]||(s[3]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0),"audio"===l.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(an,{value:n.value,"onUpdate:value":s[4]||(s[4]=e=>n.value=e),placeholder:"请输入音频地址,e.g. https://xxx.mp3"},null,8,["value"]),(0,i._)("div",Cv,[(0,i.Wm)(Xd,{onClick:s[5]||(s[5]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{type:"primary",onClick:s[6]||(s[6]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Ev=(0,Nl.Z)(Lv,[["__scopeId","data-v-35a1214c"]]);var Tv=Ev,Mv=l(3576);Mv.kh.SUB_SUP_SCALE=.5;const Uv=[{label:"高斯公式",latex:"\\int\\int\\int _ { \\Omega } \\left( \\frac { \\partial {P} } { \\partial {x} } + \\frac { \\partial {Q} } { \\partial {y} } + \\frac { \\partial {R} }{ \\partial {z} } \\right) \\mathrm { d } V = \\oint _ { \\partial \\Omega } ( P \\cos \\alpha + Q \\cos \\beta + R \\cos \\gamma ) \\mathrm{ d} S"},{label:"傅里叶级数",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",latex:"\\lim_ { n \\rightarrow + \\infty } \\sum _ { i = 1 } ^ { n } f \\left[ a + \\frac { i } { n } ( b - a ) \\right] \\frac { b - a } { n } = \\int _ { a } ^ { b } f ( x ) dx"},{label:"三角恒等式1",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],Wv=[{type:"operators",label:"数学",children:[{latex:"\\cdot"},{latex:"\\pm"},{latex:"\\mp"},{latex:"+"},{latex:"-"},{latex:"\\times"},{latex:"\\div"},{latex:"<"},{latex:">"},{latex:"="},{latex:"\\neq\\ne"},{latex:"\\leqq"},{latex:"\\geqq"},{latex:"\\leq"},{latex:"\\geq"},{latex:"\\propto"},{latex:"\\sim"},{latex:"\\equiv"},{latex:"\\dagger"},{latex:"\\ddagger"},{latex:"\\ell"},{latex:"\\#"},{latex:"\\$"},{latex:"\\&"},{latex:"\\%"},{latex:"\\langle\\rangle"},{latex:"()"},{latex:"[]"},{latex:"\\{\\}"},{latex:"||"},{latex:"\\|"},{latex:"\\exists"},{latex:"\\in"},{latex:"\\subset"},{latex:"\\supset"},{latex:"\\cup"},{latex:"\\cap"},{latex:"\\infty"},{latex:"\\partial"},{latex:"\\nabla"},{latex:"\\aleph"},{latex:"\\wp"},{latex:"\\therefore"},{latex:"\\mid"},{latex:"\\sum"},{latex:"\\prod"},{latex:"\\bigoplus"},{latex:"\\bigodot"},{latex:"\\int"},{latex:"\\oint"},{latex:"\\oplus"},{latex:"\\odot"},{latex:"\\perp"},{latex:"\\angle"},{latex:"\\triangle"},{latex:"\\Box"},{latex:"\\rightarrow"},{latex:"\\to"},{latex:"\\leftarrow"},{latex:"\\gets"},{latex:"\\circ"},{latex:"\\bigcirc"},{latex:"\\bullet"},{latex:"\\star"},{latex:"\\diamond"},{latex:"\\ast"},{latex:","},{latex:"."},{latex:";"},{latex:"!"}]},{type:"group",label:"组合",children:[{latex:"\\frac{a}{b}"},{latex:"\\frac{dx}{dx}"},{latex:"\\frac{\\partial a}{\\partial b}"},{latex:"\\sqrt{x}"},{latex:"\\sqrt[n]{x}"},{latex:"x^{n}"},{latex:"x_{n}"},{latex:"x_a^b"},{latex:"\\int_{a}^{b}"},{latex:"\\oint_a^b"},{latex:"\\lim_{a \\rightarrow b}"},{latex:"\\prod_a^b"},{latex:"\\sum_a^b"},{latex:"\\left(\\begin{array}a \\\\ b\\end{array}\\right)"},{latex:"\\begin{bmatrix}a & b \\\\ c & d \\end{bmatrix}"},{latex:"\\begin{cases}a & x = 0 \\\\ b & x > 0\\end{cases}"},{latex:"\\hat{a}"},{latex:"\\breve{a}"},{latex:"\\acute{a}"},{latex:"\\grave{a}"},{latex:"\\tilde{a}"},{latex:"\\bar{a}"},{latex:"\\vec{a}"},{latex:"\\underline{a}"},{latex:"\\overline{a}"},{latex:"\\widehat{ab}"},{latex:"\\overleftarrow{ab}"},{latex:"\\overrightarrow{ab}"}]},{type:"verbatim",label:"函数",children:[{latex:"\\log"},{latex:"\\ln"},{latex:"\\exp"},{latex:"\\mod"},{latex:"\\lim"},{latex:"\\sin"},{latex:"\\cos"},{latex:"\\tan"},{latex:"\\csc"},{latex:"\\sec"},{latex:"\\cot"},{latex:"\\sinh"},{latex:"\\cosh"},{latex:"\\tanh"},{latex:"\\csch"},{latex:"\\sech"},{latex:"\\coth"},{latex:"\\arcsin"},{latex:"\\arccos"},{latex:"\\arctan"},{latex:"\\arccsc"},{latex:"\\arcsec"},{latex:"\\arccot"}]},{type:"greek",label:"希腊字母",children:[{latex:"\\alpha"},{latex:"\\beta"},{latex:"\\gamma"},{latex:"\\delta"},{latex:"\\varepsilon"},{latex:"\\zeta"},{latex:"\\eta"},{latex:"\\vartheta"},{latex:"\\iota"},{latex:"\\kappa"},{latex:"\\lambda"},{latex:"\\mu"},{latex:"\\nu"},{latex:"\\xi"},{latex:"\\omicron"},{latex:"\\pi"},{latex:"\\rho"},{latex:"\\sigma"},{latex:"\\tau"},{latex:"\\upsilon"},{latex:"\\varphi"},{latex:"\\chi"},{latex:"\\psi"},{latex:"\\omega"},{latex:"\\epsilon"},{latex:"\\theta"},{latex:"\\phi"},{latex:"\\varsigma"},{latex:"\\Alpha"},{latex:"\\Beta"},{latex:"\\Gamma"},{latex:"\\Delta"},{latex:"\\Epsilon"},{latex:"\\Zeta"},{latex:"\\Eta"},{latex:"\\Theta"},{latex:"\\Iota"},{latex:"\\Kappa"},{latex:"\\Lambda"},{latex:"\\Mu"},{latex:"\\Nu"},{latex:"\\Xi"},{latex:"\\Omicron"},{latex:"\\Pi"},{latex:"\\Rho"},{latex:"\\Sigma"},{latex:"\\Tau"},{latex:"\\Upsilon"},{latex:"\\Phi"},{latex:"\\Chi"},{latex:"\\Psi"},{latex:"\\Omega"}]}],Dv=["width","height"],Hv=["transform"],Fv=["d"];var Av=(0,i.aZ)({__name:"FormulaContent",props:{latex:{},width:{},height:{}},setup(e){const t=e,l=(0,s.iH)({x:0,y:0,w:0,h:0}),a=(0,s.iH)("");(0,i.YP)((()=>t.latex),(()=>{const e=new Mv._q(t.latex);a.value=e.pathd({}),l.value=e.box({})}),{immediate:!0});const n=(0,i.Fl)((()=>{const e=l.value.w+32,a=l.value.h+32;return e>t.width||a>t.height?e/a>t.width/t.height?t.width/e:t.height/a:1}));return(e,t)=>((0,i.wg)(),(0,i.iD)("svg",{class:"formula-content",overflow:"visible",width:l.value.w+32,height:l.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${n.value}, ${n.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[(0,i._)("path",{d:a.value},null,8,Fv)],8,Hv)],8,Dv))}});const Zv=(0,Nl.Z)(Av,[["__scopeId","data-v-567417d3"]]);var $v=Zv;const Ov=["innerHTML"];var zv=(0,i.aZ)({__name:"SymbolContent",props:{latex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=new Mv._q(t.latex);return e.svg({SCALE_X:10,SCALE_Y:10})}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-content",innerHTML:l.value},null,8,Ov))}});const Pv=zv;var Rv=Pv;const Bv=["disabled","value","rows","placeholder"];var Nv=(0,i.aZ)({__name:"TextArea",props:{value:{},rows:{default:4},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value"],setup(e,{emit:t}){const l=e=>{t("update:value",e.target.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("textarea",{class:(0,ae.C_)(["textarea",{disabled:e.disabled,resizable:e.resizable}]),disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>l(e))},null,42,Bv))}});const jv=(0,Nl.Z)(Nv,[["__scopeId","data-v-326ac8a0"]]);var Yv=jv;const Vv={class:"latex-editor"},Jv={class:"container"},qv={class:"left"},Xv={class:"input-area"},Gv={class:"preview"},Kv={key:0,class:"placeholder"},Qv={key:1,class:"preview-content"},em={class:"right"},tm={class:"content"},lm={key:0,class:"symbol"},am={class:"symbol-pool"},nm=["onClick"],om={key:1,class:"formula"},im={class:"formula-title"},sm=["onClick"],rm={class:"footer"};var um=(0,i.aZ)({__name:"index",props:{value:{default:""}},emits:["update","close"],setup(e,{emit:t}){const l=e,a=[{label:"常用符号",key:"symbol"},{label:"预置公式",key:"formula"}],n=Uv,o=Wv.map((e=>({label:e.label,key:e.type}))),r=(0,s.iH)(""),u=(0,s.iH)("symbol"),c=(0,s.iH)(),d=(0,s.iH)(Wv[0].type),p=(0,i.Fl)((()=>{const e=Wv.find((e=>e.type===d.value));return e?.children||[]}));(0,i.bv)((()=>{l.value&&(r.value=l.value)}));const v=()=>{if(!r.value)return Kl.error("公式不能为空");const e=new Mv._q(r.value),l=e.pathd({}),a=e.box({});t("update",{latex:r.value,path:l,w:a.w+32,h:a.h+32})},m=e=>{c.value&&(c.value.focus(),document.execCommand("insertText",!1,e))};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",Vv,[(0,i._)("div",Jv,[(0,i._)("div",qv,[(0,i._)("div",Xv,[(0,i.Wm)(Yv,{value:r.value,"onUpdate:value":l[0]||(l[0]=e=>r.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:c},null,8,["value"])]),(0,i._)("div",Gv,[r.value?((0,i.wg)(),(0,i.iD)("div",Qv,[(0,i.Wm)($v,{width:518,height:138,latex:r.value},null,8,["latex"])])):((0,i.wg)(),(0,i.iD)("div",Kv,"公式预览"))])]),(0,i._)("div",em,[(0,i.Wm)(Vd,{tabs:a,value:u.value,"onUpdate:value":l[1]||(l[1]=e=>u.value=e),card:""},null,8,["value"]),(0,i._)("div",tm,["symbol"===u.value?((0,i.wg)(),(0,i.iD)("div",lm,[(0,i.Wm)(Vd,{tabs:(0,s.SU)(o),value:d.value,"onUpdate:value":l[2]||(l[2]=e=>d.value=e),spaceBetween:"",tabsStyle:{margin:"10px 10px 0"}},null,8,["tabs","value"]),(0,i._)("div",am,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:e.latex,onClick:t=>m(e.latex)},[(0,i.Wm)(Rv,{latex:e.latex},null,8,["latex"])],8,nm)))),128))])])):((0,i.wg)(),(0,i.iD)("div",om,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(n),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"formula-item",key:e.label},[(0,i._)("div",im,(0,ae.zw)(e.label),1),(0,i._)("div",{class:"formula-item-content",onClick:t=>r.value=e.latex},[(0,i.Wm)($v,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,sm)])))),128))]))])])]),(0,i._)("div",rm,[(0,i.Wm)(Xd,{class:"btn",onClick:l[3]||(l[3]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{class:"btn",type:"primary",onClick:l[4]||(l[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Uk)("确定")])),_:1})])]))}});const cm=(0,Nl.Z)(um,[["__scopeId","data-v-46e48b5e"]]);var dm=cm;const pm={class:"canvas-tool"},vm={class:"left-handler"},mm={class:"add-element-handler"},hm={class:"handler-item group-btn"},fm={class:"right-handler"},gm={class:"text"};var ym=(0,i.aZ)({__name:"index",setup(e){const t=$(),{creatingElement:l,creatingCustomShape:a}=(0,o.Jk)(t),{canUndo:n,canRedo:r}=(0,o.Jk)(Y()),{redo:u,undo:c}=ra(),{scaleCanvas:d,setCanvasScalePercentage:p,resetCanvas:v,canvasScalePercentage:m}=Ia(),h=[200,150,100,80,50],f=(0,s.iH)(!1),g=e=>{p(e),f.value=!1},{createImageElement:y,createChartElement:w,createTableElement:x,createLatexElement:k,createVideoElement:b,createAudioElement:_}=ua(),I=e=>{const t=e[0];t&&ta(t).then((e=>y(e)))},S=(0,s.iH)(!1),C=(0,s.iH)(!1),L=(0,s.iH)(!1),E=(0,s.iH)(!1),T=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},D=e=>{"任意多边形"===e.title?t.setCreatingCustomShapeState(!0):t.setCreatingElement({type:"shape",data:e}),S.value=!1},H=e=>{t.setCreatingElement({type:"line",data:e}),C.value=!1},F=()=>{t.setSelectPanelState(!0)},A=()=>{t.setSearchPanelState(!0)};return(e,t)=>{const o=(0,i.up)("IconBack"),p=(0,i.up)("IconNext"),y=(0,i.up)("IconMoveOne"),Z=(0,i.up)("IconSearch"),$=(0,i.up)("IconFontSize"),O=(0,i.up)("IconTextRotationNone"),z=(0,i.up)("IconTextRotationDown"),P=(0,i.up)("IconDown"),R=(0,i.up)("IconPicture"),B=(0,i.up)("IconGraphicDesign"),N=(0,i.up)("IconConnection"),j=(0,i.up)("IconChartProportion"),Y=(0,i.up)("IconInsertTable"),V=(0,i.up)("IconFormula"),J=(0,i.up)("IconVideoTwo"),q=(0,i.up)("IconMinus"),X=(0,i.up)("IconPlus"),G=(0,i.up)("IconFullScreen"),K=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",pm,[(0,i._)("div",vm,[(0,i.wy)((0,i.Wm)(o,{class:(0,ae.C_)(["handler-item",{disable:!(0,s.SU)(n)}]),onClick:t[0]||(t[0]=e=>(0,s.SU)(c)())},null,8,["class"]),[[K,"撤销"]]),(0,i.wy)((0,i.Wm)(p,{class:(0,ae.C_)(["handler-item",{disable:!(0,s.SU)(r)}]),onClick:t[1]||(t[1]=e=>(0,s.SU)(u)())},null,8,["class"]),[[K,"重做"]]),(0,i.Wm)(Dc,{type:"vertical",style:{height:"20px"}}),(0,i.wy)((0,i.Wm)(y,{class:"handler-item",onClick:t[2]||(t[2]=e=>F())},null,512),[[K,"选择窗格"]]),(0,i.wy)((0,i.Wm)(Z,{class:"handler-item",onClick:t[3]||(t[3]=e=>A())},null,512),[[K,"查找/替换"]])]),(0,i._)("div",mm,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",hm,[(0,i.Wm)($,{class:(0,ae.C_)(["icon",{active:"text"===(0,s.SU)(l)?.type}]),onClick:t[4]||(t[4]=e=>W())},null,8,["class"]),(0,i.Wm)(rn,{trigger:"click",value:U.value,"onUpdate:value":t[7]||(t[7]=e=>U.value=e),style:{height:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{center:"",onClick:t[5]||(t[5]=()=>{W(),U.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(O),(0,i.Uk)(" 横向文本框")])),_:1}),(0,i.Wm)(dn,{center:"",onClick:t[6]||(t[6]=()=>{W(!0),U.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(z),(0,i.Uk)(" 竖向文本框")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(P,{class:"arrow"})])),_:1},8,["value"])])),[[K,"插入文字"]]),(0,i.Wm)(Oa,{onChange:t[8]||(t[8]=e=>I(e))},{default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(R,{class:"handler-item"},null,512),[[K,"插入图片"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",value:S.value,"onUpdate:value":t[10]||(t[10]=e=>S.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Fp,{onSelect:t[9]||(t[9]=e=>D(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(B,{class:(0,ae.C_)(["handler-item",{active:(0,s.SU)(a)||"shape"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[K,"插入形状"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:C.value,"onUpdate:value":t[12]||(t[12]=e=>C.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(jp,{onSelect:t[11]||(t[11]=e=>H(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(N,{class:(0,ae.C_)(["handler-item",{active:"line"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[K,"插入线条"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:L.value,"onUpdate:value":t[14]||(t[14]=e=>L.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Xp,{onSelect:t[13]||(t[13]=e=>{(0,s.SU)(w)(e),L.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(j,{class:"handler-item"},null,512),[[K,"插入图表"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:E.value,"onUpdate:value":t[17]||(t[17]=e=>E.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(_v,{onClose:t[15]||(t[15]=e=>E.value=!1),onInsert:t[16]||(t[16]=({row:e,col:t})=>{(0,s.SU)(x)(e,t),E.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(Y,{class:"handler-item"},null,512),[[K,"插入表格"]])])),_:1},8,["value"]),(0,i.wy)((0,i.Wm)(V,{class:"handler-item",onClick:t[18]||(t[18]=e=>M.value=!0)},null,512),[[K,"插入公式"]]),(0,i.Wm)(rn,{trigger:"click",value:T.value,"onUpdate:value":t[22]||(t[22]=e=>T.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Tv,{onClose:t[19]||(t[19]=e=>T.value=!1),onInsertVideo:t[20]||(t[20]=e=>{(0,s.SU)(b)(e),T.value=!1}),onInsertAudio:t[21]||(t[21]=e=>{(0,s.SU)(_)(e),T.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(J,{class:"handler-item"},null,512),[[K,"插入音视频"]])])),_:1},8,["value"])]),(0,i._)("div",fm,[(0,i.Wm)(q,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>(0,s.SU)(d)("-"))}),(0,i.Wm)(rn,{trigger:"click",value:f.value,"onUpdate:value":t[24]||(t[24]=e=>f.value=e)},{content:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(h,(e=>(0,i.Wm)(dn,{center:"",key:e,onClick:t=>g(e)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ae.zw)(e)+"%",1)])),_:2},1032,["onClick"]))),64))])),default:(0,i.w5)((()=>[(0,i._)("span",gm,(0,ae.zw)((0,s.SU)(m)),1)])),_:1},8,["value"]),(0,i.Wm)(X,{class:"handler-item viewport-size",onClick:t[25]||(t[25]=e=>(0,s.SU)(d)("+"))}),(0,i.wy)((0,i.Wm)(G,{class:"handler-item viewport-size-adaptation",onClick:t[26]||(t[26]=e=>(0,s.SU)(v)())},null,512),[[K,"适应屏幕"]])]),(0,i.Wm)(fp,{visible:M.value,"onUpdate:visible":t[29]||(t[29]=e=>M.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(dm,{onClose:t[27]||(t[27]=e=>M.value=!1),onUpdate:t[28]||(t[28]=e=>{(0,s.SU)(k)(e),M.value=!1})})])),_:1},8,["visible"])])}}});const wm=(0,Nl.Z)(ym,[["__scopeId","data-v-75f4dda6"]]);var xm=wm,km=()=>{const{slides:e}=(0,o.Jk)(F()),t=(0,s.iH)(null),l=(0,s.iH)(50),a=()=>{e.value.length>l.value?t.value=setTimeout((()=>{l.value=l.value+20,a()}),600):l.value=9999};return(0,i.bv)(a),(0,i.Ah)((()=>{t.value&&clearTimeout(t.value)})),{slidesLoadLimit:l}};const bm={class:"layout-pool"},_m=["onClick"];var Im=(0,i.aZ)({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const{layouts:l}=(0,o.Jk)(F()),a=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",bm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"layout-item",key:e.id,onClick:t=>a(e)},[(0,i.Wm)(Bd,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,_m)))),128))]))}});const Sm=(0,Nl.Z)(Im,[["__scopeId","data-v-8ee3e590"]]);var Cm=Sm,Lm=l(9980),Em=l.n(Lm);const Tm={class:"add-slide"},Mm={class:"select-btn"},Um=["onMousedown"],Wm={class:"page-number"};var Dm=(0,i.aZ)({__name:"index",setup(e){const t=$(),l=F(),a=V(),{selectedSlidesIndex:n,thumbnailsFocus:r}=(0,o.Jk)(t),{slides:u,slideIndex:c}=(0,o.Jk)(l),{ctrlKeyState:d,shiftKeyState:p}=(0,o.Jk)(a),{slidesLoadLimit:v}=km(),m=(0,i.Fl)((()=>[...n.value,c.value])),h=(0,s.iH)(!1),{copySlide:f,pasteSlide:g,createSlide:y,createSlideByTemplate:w,copyAndPasteSlide:x,deleteSlide:k,cutSlide:b,selectAllSlide:_,sortSlides:I}=pa(),S=e=>{t.setActiveElementIdList([]),c.value!==e&&l.updateSlideIndex(e)},C=(e,l)=>{const a=m.value.length>1;if(!a||!m.value.includes(l)||0===e.button)if(d.value)if(c.value===l){if(!a)return;const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e),S(m.value[0])}else if(m.value.includes(l)){const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e)}else{const e=[...m.value,l];t.updateSelectedSlidesIndex(e),S(l)}else if(p.value){if(c.value===l&&!a)return;let e=Math.min(...m.value),n=l;l{r.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},E=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&I(t,l)},{enterScreening:T,enterScreeningFromStart:M}=_a(),U=()=>[{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{text:"新建页面",subText:"Enter",handler:y},{text:"幻灯片放映",subText:"F5",handler:M}],W=()=>[{text:"剪切",subText:"Ctrl + X",handler:b},{text:"复制",subText:"Ctrl + C",handler:f},{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{divider:!0},{text:"新建页面",subText:"Enter",handler:y},{text:"复制页面",subText:"Ctrl + D",handler:x},{text:"删除页面",subText:"Delete",handler:()=>k()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:T}];return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconDown"),n=(0,i.Q2)("contextmenu"),o=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"thumbnails",onMousedown:t[4]||(t[4]=()=>L(!0))},[(0,i._)("div",Tm,[(0,i._)("div",{class:"btn",onClick:t[0]||(t[0]=e=>(0,s.SU)(y)())},[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)("添加幻灯片")]),(0,i.Wm)(rn,{trigger:"click",placement:"bottom-start",value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e),center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(Cm,{onSelect:t[1]||(t[1]=e=>{(0,s.SU)(w)(e),h.value=!1})})])),default:(0,i.w5)((()=>[(0,i._)("div",Mm,[(0,i.Wm)(a)])])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(Em()),{class:"thumbnail-list",modelValue:(0,s.SU)(u),animation:200,scroll:!0,scrollSensitivity:50,onEnd:E,itemKey:"id"},{item:(0,i.w5)((({element:e,index:l})=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail-item",{active:(0,s.SU)(c)===l,selected:m.value.includes(l)}]),onMousedown:e=>C(e,l),onDblclick:t[3]||(t[3]=e=>(0,s.SU)(T)())},[(0,i._)("div",{class:(0,ae.C_)(["label",{"offset-left":l>=99}])},(0,ae.zw)((0,s.SU)(q)(l+1,2)),3),(0,i.Wm)(Bd,{class:"thumbnail",slide:e,size:120,visible:l<(0,s.SU)(v)},null,8,["slide","visible"])],42,Um)),[[n,W]])])),_:1},8,["modelValue"]),(0,i._)("div",Wm,"幻灯片 "+(0,ae.zw)((0,s.SU)(c)+1)+" / "+(0,ae.zw)((0,s.SU)(u).length),1)],32)),[[o,()=>L(!1)],[n,U]])}}});const Hm=(0,Nl.Z)(Dm,[["__scopeId","data-v-d525da14"]]);var Fm=Hm,Am=()=>{const e=$(),{richTextAttrs:t,textFormatPainter:l}=(0,o.Jk)(e),a=(a=!1)=>{l.value?e.setTextFormatPainter(null):e.setTextFormatPainter({keep:a,bold:t.value.bold,em:t.value.em,underline:t.value.underline,strikethrough:t.value.strikethrough,color:t.value.color,backcolor:t.value.backcolor,fontname:t.value.fontname,fontsize:t.value.fontsize,align:t.value.align})};return{toggleTextFormatPainter:a}},Zm=l(8374);const $m={class:"bar"},Om=["data-tooltip"],zm=["data-tooltip"],Pm=["data-tooltip"];var Rm=(0,i.aZ)({__name:"Slider",props:{value:{},disabled:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)("end"),d=e=>{let t=e/100*(l.max-l.min);if(l.step>=1)t=Math.fround(t);else{const e=l.step.toString(),a=e.match(/^[0.]*([1-9])/);if(a){const l=a[1],n=e.indexOf(l)-1;if(n>0){const e=Math.pow(10,n);t=Math.fround(t*e)/e}}}return Zm.ZP.plus(t,l.min)},p=(0,i.Fl)((()=>d(o.value))),v=(0,i.Fl)((()=>d(r.value))),m=(0,i.Fl)((()=>d(u.value)));(0,i.YP)((()=>l.value),(()=>{l.max!==l.min&&("number"===typeof l.value?o.value=(l.value-l.min)/(l.max-l.min)*100:(r.value=(l.value[0]-l.min)/(l.max-l.min)*100,u.value=(l.value[1]-l.min)/(l.max-l.min)*100))}),{immediate:!0});const h=e=>{if(!n.value)return 0;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let o=(t-a(n.value))/n.value.clientWidth;o=Math.max(o,0),o=Math.min(o,1);let i=100*o;const s=l.step/(l.max-l.min)*100,r=i%s;return r>0&&(r<=s/2?i-=r:i=i-r+s),i},f=e=>{const t=h(e);"start"===c.value?r.value=t:u.value=t},g=e=>{y(e);const a=d(o.value),n=l.value,i="start"===c.value?[a,n[1]]:[n[0],a];i[0]>i[1]&&([i[0],i[1]]=[i[1],i[0]]),t("update:value",i),document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",f),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)},y=e=>{o.value=h(e)},w=e=>{y(e);const l=d(o.value);t("update:value",l),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y),document.removeEventListener("mouseup",w),document.removeEventListener("touchend",w)},x=e=>{if(!l.disabled)if(l.range){const t=h(e);Math.abs(t-r.value)((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:n,onMousedown:t[0]||(t[0]=e=>x(e))},[(0,i._)("div",$m,[e.range?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",{class:"track",style:(0,ae.j5)({width:u.value-r.value+"%",left:`${r.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${r.value}%`}),"data-tooltip":v.value},null,12,zm),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${u.value}%`}),"data-tooltip":m.value},null,12,Pm)],64)):((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"track",style:(0,ae.j5)({width:`${o.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${o.value}%`}),"data-tooltip":p.value},null,12,Om)],64))])],34))}});const Bm=(0,Nl.Z)(Rm,[["__scopeId","data-v-563bd2a0"]]);var Nm=Bm;const jm=e=>((0,i.dD)("data-v-03715c20"),e=e(),(0,i.Cn)(),e),Ym={class:"element-opacity"},Vm={class:"row"},Jm=jm((()=>(0,i._)("div",{style:{width:"40%"}},"不透明度:",-1)));var qm=(0,i.aZ)({__name:"ElementOpacity",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(1);(0,i.YP)(l,(()=>{l.value&&(a.value="opacity"in l.value&&void 0!==l.value.opacity?l.value.opacity:1)}),{deep:!0,immediate:!0});const{addHistorySnapshot:n}=ra(),r=e=>{if(!l.value)return;const a={opacity:e};t.updateElement({id:l.value.id,props:a}),n()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ym,[(0,i._)("div",Vm,[Jm,(0,i.Wm)(Nm,{min:0,max:1,step:.1,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>r(e)),style:{width:"60%"}},null,8,["value"])])]))}});const Xm=(0,Nl.Z)(qm,[["__scopeId","data-v-03715c20"]]);var Gm=Xm;const Km={class:"color-block"};var Qm=(0,i.aZ)({__name:"ColorButton",props:{color:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlatte");return(0,i.wg)(),(0,i.j4)(Xd,{class:"color-btn"},{default:(0,i.w5)((()=>[(0,i._)("div",Km,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundColor:e.color})},null,4)]),(0,i.Wm)(l,{class:"color-btn-icon"})])),_:1})}}});const eh=(0,Nl.Z)(Qm,[["__scopeId","data-v-7fa73bdc"]]);var th=eh,lh=l(6459),ah=(0,i.aZ)({__name:"Checkboard",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(e){const t=e,l={},a=(e,t,l)=>{const a=document.createElement("canvas");a.width=a.height=2*l;const n=a.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,a.width,a.height),n.fillStyle=t,n.fillRect(0,0,l,l),n.translate(l,l),n.fillRect(0,0,l,l),a.toDataURL()):null},n=(e,t,n)=>{const o=e+","+t+","+n;if(l[o])return l[o];const i=a(e,t,n);return l[o]=i,i},o=(0,i.Fl)((()=>{const e=n(t.white,t.grey,t.size);return{backgroundImage:`url(${e})`}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"checkerboard",style:(0,ae.j5)(o.value)},null,4))}});const nh=(0,Nl.Z)(ah,[["__scopeId","data-v-fa191ace"]]);var oh=nh;const ih=e=>((0,i.dD)("data-v-84628bc8"),e=e(),(0,i.Cn)(),e),sh={class:"alpha"},rh={class:"alpha-checkboard-wrap"},uh=ih((()=>(0,i._)("div",{class:"alpha-picker"},null,-1))),ch=[uh];var dh=(0,i.aZ)({__name:"Alpha",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.value)),n=(0,i.Fl)((()=>{const e=[a.value.r,a.value.g,a.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`})),o=(0,s.iH)(),r=e=>{if(e.preventDefault(),!o.value)return;const l=o.value.clientWidth,n=o.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-n;let s;s=i<0?0:i>l?1:Math.round(100*i/l)/100,a.value.a!==s&&t("colorChange",{r:a.value.r,g:a.value.g,b:a.value.b,a:s})},u=()=>{window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",u)},c=e=>{r(e),window.addEventListener("mousemove",r),window.addEventListener("mouseup",u)};return(0,i.Ah)(u),(e,t)=>((0,i.wg)(),(0,i.iD)("div",sh,[(0,i._)("div",rh,[(0,i.Wm)(oh)]),(0,i._)("div",{class:"alpha-gradient",style:(0,ae.j5)({background:n.value})},null,4),(0,i._)("div",{class:"alpha-container",ref_key:"alphaRef",ref:o,onMousedown:t[0]||(t[0]=e=>c(e))},[(0,i._)("div",{class:"alpha-pointer",style:(0,ae.j5)({left:100*a.value.a+"%"})},ch,4)],544)]))}});const ph=(0,Nl.Z)(dh,[["__scopeId","data-v-84628bc8"]]);var vh=ph;const mh=e=>((0,i.dD)("data-v-5711e710"),e=e(),(0,i.Cn)(),e),hh={class:"hue"},fh=mh((()=>(0,i._)("div",{class:"hue-picker"},null,-1))),gh=[fh];var yh=(0,i.aZ)({__name:"Hue",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),n=(0,s.iH)(""),o=(0,i.Fl)((()=>{const e=(0,M.Z)(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e})),r=(0,i.Fl)((()=>0===o.value.h&&"right"===n.value?"100%":100*o.value.h/360+"%"));(0,i.YP)((()=>l.value),(()=>{const e=(0,M.Z)(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-a.value>0&&(n.value="right"),0!==t&&t-a.value<0&&(n.value="left"),a.value=t}));const u=(0,s.iH)(),c=e=>{if(e.preventDefault(),!u.value)return;const a=u.value.clientWidth,n=u.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-n;let s,r;i<0?s=0:i>a?s=360:(r=100*i/a,s=360*r/100),-1!==l.hue&&o.value.h===s||t("colorChange",{h:s,l:o.value.l,s:o.value.s,a:o.value.a})},d=()=>{window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",d)},p=e=>{c(e),window.addEventListener("mousemove",c),window.addEventListener("mouseup",d)};return(0,i.Ah)(d),(e,t)=>((0,i.wg)(),(0,i.iD)("div",hh,[(0,i._)("div",{class:"hue-container",ref_key:"hueRef",ref:u,onMousedown:t[0]||(t[0]=e=>p(e))},[(0,i._)("div",{class:"hue-pointer",style:(0,ae.j5)({left:r.value})},gh,4)],544)]))}});const wh=(0,Nl.Z)(yh,[["__scopeId","data-v-5711e710"]]);var xh=wh;const kh=e=>((0,i.dD)("data-v-c79c0446"),e=e(),(0,i.Cn)(),e),bh=kh((()=>(0,i._)("div",{class:"saturation-white"},null,-1))),_h=kh((()=>(0,i._)("div",{class:"saturation-black"},null,-1))),Ih=kh((()=>(0,i._)("div",{class:"saturation-circle"},null,-1))),Sh=[Ih];var Ch=(0,i.aZ)({__name:"Saturation",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>{const e=(0,M.Z)(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e})),n=(0,i.Fl)((()=>`hsl(${a.value.h}, 100%, 50%)`)),o=(0,i.Fl)((()=>-100*a.value.v+1+100+"%")),r=(0,i.Fl)((()=>100*a.value.s+"%")),u=(0,U.throttle)((function(e){t("colorChange",e)}),20,{leading:!0,trailing:!1}),c=(0,s.iH)(),d=e=>{if(e.preventDefault(),!c.value)return;const t=c.value.clientWidth,l=c.value.clientHeight,n=c.value.getBoundingClientRect().left+window.pageXOffset,o=c.value.getBoundingClientRect().top+window.pageYOffset,i=(0,U.clamp)(e.pageX-n,0,t),s=(0,U.clamp)(e.pageY-o,0,l),r=i/t,d=(0,U.clamp)(-s/l+1,0,1);u({h:a.value.h,s:r,v:d,a:a.value.a})},p=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p)},v=e=>{d(e),window.addEventListener("mousemove",d),window.addEventListener("mouseup",p)};return(0,i.Ah)(p),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"saturation",ref_key:"saturationRef",ref:c,style:(0,ae.j5)({background:n.value}),onMousedown:t[0]||(t[0]=e=>v(e))},[bh,_h,(0,i._)("div",{class:"saturation-pointer",style:(0,ae.j5)({top:o.value,left:r.value})},Sh,4)],36))}});const Lh=(0,Nl.Z)(Ch,[["__scopeId","data-v-c79c0446"]]);var Eh=Lh;const Th={class:"editable-input"},Mh=["value"];var Uh=(0,i.aZ)({__name:"EditableInput",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>{let e="";return e=l.value.a<1?(0,M.Z)(l.value).toHex8String().toUpperCase():(0,M.Z)(l.value).toHexString().toUpperCase(),e.replace("#","")})),n=e=>{const l=e.target.value;l.length>=6&&t("colorChange",(0,M.Z)(l).toRgb())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Th,[(0,i._)("input",{class:"input-content",value:a.value,onInput:t[0]||(t[0]=e=>n(e))},null,40,Mh)]))}});const Wh=(0,Nl.Z)(Uh,[["__scopeId","data-v-eb50f8e8"]]);var Dh=Wh;const Hh={class:"color-picker"},Fh={class:"picker-saturation-wrap"},Ah={class:"picker-controls"},Zh={class:"picker-color-wrap"},$h={class:"picker-sliders"},Oh={class:"picker-hue-wrap"},zh={class:"picker-alpha-wrap"},Ph={class:"picker-field"},Rh={class:"picker-presets"},Bh=["onClick"],Nh={class:"picker-gradient-presets"},jh=["onClick"],Yh={class:"picker-presets"},Vh=["onClick"],Jh={key:0,class:"recent-colors-title"},qh={class:"picker-presets"},Xh=["onClick"],Gh="RECENT_COLORS";var Kh=(0,i.aZ)({__name:"index",props:{modelValue:{default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],n=(e,t,l)=>{const a=(0,M.Z)(e).toRgb(),n=(0,M.Z)(t).toRgb(),o=(n.r-a.r)/l,i=(n.g-a.g)/l,s=(n.b-a.b)/l,r=[];for(let u=0;u{const e=[];for(const t of a)e.push(n(t[1],t[0],5));return e},r=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],u=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],c=(0,s.iH)(-1),d=(0,s.iH)([]),p=(0,i.Fl)({get(){return(0,M.Z)(l.modelValue).toRgb()},set(e){const l=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;t("update:modelValue",l)}}),v=o(),m=(0,i.Fl)((()=>`rgba(${[p.value.r,p.value.g,p.value.b,p.value.a].join(",")})`)),h=e=>{c.value=(0,M.Z)(e).toHsl().h,t("update:modelValue",e)},f=(0,U.debounce)((function(){const e=(0,M.Z)(p.value).toRgbString();if(!d.value.includes(e)){d.value=[e,...d.value];const t=10;d.value.length>t&&(d.value=d.value.slice(0,t))}}),300,{trailing:!0});(0,i.bv)((()=>{const e=localStorage.getItem(Gh);e&&(d.value=JSON.parse(e))})),(0,i.YP)(d,(()=>{const e=JSON.stringify(d.value);localStorage.setItem(Gh,e)}));const g=e=>{"h"in e?(c.value=e.h,p.value=(0,M.Z)(e).toRgb()):(c.value=(0,M.Z)(e).toHsl().h,p.value=e),f()},y=()=>{const e="EyeDropper"in window;e?w():x()},w=()=>{Kl.success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then((e=>{const t=(0,M.Z)(e.sRGBHex);c.value=t.toHsl().h,p.value=t.toRgb(),f()})).catch((()=>{Kl.success("关闭取色吸管")}))},x=()=>{const e=document.querySelector(".canvas");if(!e)return;const t=document.createElement("div");t.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(t);const l=document.createElement("div");l.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",t.appendChild(l);const{left:a,top:n,width:o,height:i}=e.getBoundingClientRect(),s=e=>(!e.tagName||"FOREIGNOBJECT"!==e.tagName.toUpperCase())&&(!e.classList||!e.classList.contains("operate"));(0,lh.rT)(e,{filter:s,fontEmbedCSS:"",width:o,height:i,canvasWidth:o,canvasHeight:i,pixelRatio:1}).then((e=>{e.style.cssText=`position: absolute; top: ${n}px; left: ${a}px; cursor: crosshair;`,t.style.cursor="default",t.appendChild(e);const o=e.getContext("2d");if(!o)return;let i="";const s=e=>{const t=e.x,s=e.y,r=t-a,u=s-n,[c,d,p,v]=o.getImageData(r,u,1,1).data;i=`rgba(${c}, ${d}, ${p}, ${(v/255).toFixed(2)})`,l.style.left=t+10+"px",l.style.top=s+10+"px",l.style.backgroundColor=i},r=()=>{i="",l.style.left="-100px",l.style.top="-100px",l.style.backgroundColor=""},u=l=>{if(i&&0===l.button){const e=(0,M.Z)(i);c.value=e.toHsl().h,p.value=e.toRgb(),f()}document.body.removeChild(t),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",r),window.removeEventListener("mousedown",u)};e.addEventListener("mousemove",s),e.addEventListener("mouseleave",r),window.addEventListener("mousedown",u)})).catch((()=>{Kl.error("取色吸管初始化失败"),document.body.removeChild(t)}))};return(e,t)=>{const l=(0,i.up)("IconNeedle");return(0,i.wg)(),(0,i.iD)("div",Hh,[(0,i._)("div",Fh,[(0,i.Wm)(Eh,{value:p.value,hue:c.value,onColorChange:t[0]||(t[0]=e=>g(e))},null,8,["value","hue"])]),(0,i._)("div",Ah,[(0,i._)("div",Zh,[(0,i._)("div",{class:"picker-current-color",style:(0,ae.j5)({background:m.value})},null,4),(0,i.Wm)(oh)]),(0,i._)("div",$h,[(0,i._)("div",Oh,[(0,i.Wm)(xh,{value:p.value,hue:c.value,onColorChange:t[1]||(t[1]=e=>g(e))},null,8,["value","hue"])]),(0,i._)("div",zh,[(0,i.Wm)(vh,{value:p.value,onColorChange:t[2]||(t[2]=e=>g(e))},null,8,["value"])])])]),(0,i._)("div",Ph,[(0,i.Wm)(Dh,{class:"input",value:p.value,onColorChange:t[3]||(t[3]=e=>g(e))},null,8,["value"]),(0,i._)("div",{class:"straw",onClick:t[4]||(t[4]=e=>y())},[(0,i.Wm)(l)]),(0,i._)("div",{class:"transparent",onClick:t[5]||(t[5]=e=>h("#00000000"))},[(0,i.Wm)(oh)])]),(0,i._)("div",Rh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(r,(e=>(0,i._)("div",{class:"picker-presets-color",key:e,style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,Bh))),64))]),(0,i._)("div",Nh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-col",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-color",key:e,style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,jh)))),128))])))),128))]),(0,i._)("div",Yh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(u,(e=>(0,i._)("div",{key:e,class:"picker-presets-color",style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,Vh))),64))]),d.value.length?((0,i.wg)(),(0,i.iD)("div",Jh,"最近使用:")):(0,i.kq)("",!0),(0,i._)("div",qh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(d.value,(e=>((0,i.wg)(),(0,i.iD)("div",{key:e,class:"picker-presets-color alpha",onClick:t=>h(e)},[(0,i._)("div",{class:"picker-presets-color-content",style:(0,ae.j5)({background:e})},null,4)],8,Xh)))),128))])])}}});const Qh=(0,Nl.Z)(Kh,[["__scopeId","data-v-fec0b01a"]]);var ef=Qh;const tf=e=>((0,i.dD)("data-v-0566b060"),e=e(),(0,i.Cn)(),e),lf=tf((()=>(0,i._)("span",{class:"switch-core"},null,-1))),af=[lf];var nf=(0,i.aZ)({__name:"Switch",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=()=>{l.disabled||t("update:value",!l.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("span",{class:(0,ae.C_)(["switch",{active:e.value,disabled:e.disabled}]),onClick:t[0]||(t[0]=e=>a())},af,2))}});const of=(0,Nl.Z)(nf,[["__scopeId","data-v-0566b060"]]);var sf=of;const rf=e=>((0,i.dD)("data-v-36e0c182"),e=e(),(0,i.Cn)(),e),uf={class:"element-outline"},cf={key:0,class:"row"},df=rf((()=>(0,i._)("div",{style:{width:"40%"}},"启用边框:",-1))),pf={class:"switch-wrapper",style:{width:"60%"}},vf={class:"row"},mf=rf((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),hf={class:"row"},ff=rf((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),gf={class:"row"},yf=rf((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var wf=(0,i.aZ)({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{l.value&&(a.value="outline"in l.value?l.value.outline:void 0,n.value=!!a.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{if(!l.value)return;const n={outline:{...a.value,...e}};t.updateElement({id:l.value.id,props:n}),r()},c=e=>{if(l.value){if(e){const e={width:2,color:"#000",style:"solid"};t.updateElement({id:l.value.id,props:{outline:e}})}else t.removeElementProps({id:l.value.id,propName:"outline"});r()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",uf,[e.fixed?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",cf,[df,(0,i._)("div",pf,[(0,i.Wm)(sf,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])])),n.value&&a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",vf,[mf,(0,i.Wm)(op,{style:{width:"60%"},value:a.value.style||"","onUpdate:value":t[1]||(t[1]=e=>u({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",hf,[ff,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:a.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:a.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",gf,[yf,(0,i.Wm)(uv,{value:a.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>u({width:e})),style:{width:"60%"}},null,8,["value"])])],64)):(0,i.kq)("",!0)]))}});const xf=(0,Nl.Z)(wf,[["__scopeId","data-v-36e0c182"]]);var kf=xf;const bf=e=>((0,i.dD)("data-v-5507f822"),e=e(),(0,i.Cn)(),e),_f={class:"element-shadow"},If={class:"row"},Sf=bf((()=>(0,i._)("div",{style:{width:"40%"}},"启用阴影:",-1))),Cf={class:"switch-wrapper",style:{width:"60%"}},Lf={class:"row"},Ef=bf((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Tf={class:"row"},Mf=bf((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Uf={class:"row"},Wf=bf((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Df={class:"row"},Hf=bf((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1)));var Ff=(0,i.aZ)({__name:"ElementShadow",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{l.value&&(a.value="shadow"in l.value?l.value.shadow:void 0,n.value=!!a.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{if(!l.value||!a.value)return;const n={...a.value,...e};t.updateElement({id:l.value.id,props:{shadow:n}}),r()},c=e=>{if(l.value){if(e){const e={h:1,v:1,blur:2,color:"#000"};t.updateElement({id:l.value.id,props:{shadow:e}})}else t.removeElementProps({id:l.value.id,propName:"shadow"});r()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",_f,[(0,i._)("div",If,[Sf,(0,i._)("div",Cf,[(0,i.Wm)(sf,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),n.value&&a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Lf,[Ef,(0,i.Wm)(Nm,{style:{width:"60%"},min:-10,max:10,step:1,value:a.value.h,"onUpdate:value":t[1]||(t[1]=e=>u({h:e}))},null,8,["value"])]),(0,i._)("div",Tf,[Mf,(0,i.Wm)(Nm,{style:{width:"60%"},min:-10,max:10,step:1,value:a.value.v,"onUpdate:value":t[2]||(t[2]=e=>u({v:e}))},null,8,["value"])]),(0,i._)("div",Uf,[Wf,(0,i.Wm)(Nm,{style:{width:"60%"},min:1,max:20,step:1,value:a.value.blur,"onUpdate:value":t[3]||(t[3]=e=>u({blur:e}))},null,8,["value"])]),(0,i._)("div",Df,[Hf,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:a.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:a.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Af=(0,Nl.Z)(Ff,[["__scopeId","data-v-5507f822"]]);var Zf=Af;const $f={class:"text-color-block"};var Of=(0,i.aZ)({__name:"TextColorButton",props:{color:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(Xd,{class:"text-color-btn"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default"),(0,i._)("div",$f,[(0,i._)("div",{class:"text-color-block-content",style:(0,ae.j5)({backgroundColor:e.color})},null,4)])])),_:3}))}});const zf=(0,Nl.Z)(Of,[["__scopeId","data-v-37449800"]]);var Pf=zf,Rf=(0,i.aZ)({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(Xd,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const Bf=Rf;var Nf=Bf,jf=(0,i.aZ)({__name:"ButtonGroup",props:{passive:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["button-group",{passive:e.passive}]),ref:"groupRef"},[(0,i.WI)(e.$slots,"default")],2))}});const Yf=(0,Nl.Z)(jf,[["__scopeId","data-v-4db942e2"]]);var Vf=Yf,Jf=(0,i.aZ)({__name:"RadioButton",props:{value:{},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:l}=(0,i.f3)(Ln);return(e,a)=>((0,i.wg)(),(0,i.j4)(Xd,{checked:!e.disabled&&(0,s.SU)(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=t=>!e.disabled&&(0,s.SU)(l)(e.value))},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const qf=Jf;var Xf=qf,Gf=(0,i.aZ)({__name:"RadioGroup",props:{value:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>{l.disabled||t("update:value",e)},n=(0,i.Fl)((()=>l.value));return(0,i.JJ)(Ln,{value:n,updateValue:a}),(e,t)=>((0,i.wg)(),(0,i.j4)(Vf,{class:"radio-group"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3}))}});const Kf=Gf;var Qf=Kf;const eg={class:"select-group"};function tg(e,t){return(0,i.wg)(),(0,i.iD)("div",eg,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])}const lg={},ag=(0,Nl.Z)(lg,[["render",tg],["__scopeId","data-v-d2acb09c"]]);var ng=ag;const og=e=>((0,i.dD)("data-v-478ca737"),e=e(),(0,i.Cn)(),e),ig={class:"text-style-panel"},sg={class:"preset-style"},rg=["onClick"],ug={class:"link-popover"},cg={class:"btns"},dg={class:"row",passive:""},pg={class:"list-wrap"},vg=["onClick"],mg=og((()=>(0,i._)("span",null,null,-1))),hg=[mg],fg=og((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),gg={class:"list-wrap"},yg=["onClick"],wg=og((()=>(0,i._)("span",null,null,-1))),xg=[wg],kg={class:"row"},bg=og((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),_g={class:"row"},Ig=og((()=>(0,i._)("div",{style:{width:"40%"}},"行间距:",-1))),Sg={class:"row"},Cg=og((()=>(0,i._)("div",{style:{width:"40%"}},"段间距:",-1))),Lg={class:"row"},Eg=og((()=>(0,i._)("div",{style:{width:"40%"}},"字间距:",-1))),Tg={class:"row"},Mg=og((()=>(0,i._)("div",{style:{width:"40%"}},"文本框填充:",-1)));var Ug=(0,i.aZ)({__name:"TextStylePanel",setup(e){const t=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"66px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"40px"},{command:"align",value:"center"}]},{label:"正文",style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:"正文[小]",style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:"注释 1",style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:"注释 2",style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],l=$(),a=F(),{handleElement:n,handleElementId:r,richTextAttrs:u,availableFonts:c,textFormatPainter:d}=(0,o.Jk)(l),{addHistorySnapshot:p}=ra(),{toggleTextFormatPainter:v}=Am(),m=e=>{a.updateElement({id:r.value,props:e}),p()},h=(0,s.iH)(!1),f=(0,s.iH)(!1),g=(0,s.iH)(!1),y=(0,s.iH)(!1),w=(0,s.iH)(["disc","circle","square"]),x=(0,s.iH)(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),k=(0,s.iH)("#000"),b=(0,s.iH)(),_=(0,s.iH)(),I=(0,s.iH)();(0,i.YP)(n,(()=>{n.value&&"text"===n.value.type&&(k.value=n.value.fill||"#fff",b.value=n.value.lineHeight||1.5,_.value=n.value.wordSpace||0,I.value=void 0===n.value.paragraphSpace?5:n.value.paragraphSpace)}),{deep:!0,immediate:!0});const S=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],C=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],L=[0,1,2,3,4,5,6,8,10],T=[0,5,10,15,20,25,30,40,50,80],M=e=>{m({lineHeight:e})},U=e=>{m({paragraphSpace:e})},W=e=>{m({wordSpace:e})},D=e=>{m({fill:e})},H=(e,t)=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},A=e=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:e})},Z=(0,s.iH)(""),O=(0,s.iH)(!1);(0,i.YP)(u,(()=>O.value=!1));const z=()=>{Z.value=u.value.link},P=e=>{const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!e||!t.test(e))return Kl.error("不是正确的网页链接地址");H("link",e),O.value=!1};return(e,l)=>{const a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),r=(0,i.up)("IconHighLight"),p=(0,i.up)("IconTextBold"),m=(0,i.up)("IconTextItalic"),F=(0,i.up)("IconTextUnderline"),$=(0,i.up)("IconStrikethrough"),R=(0,i.up)("IconCode"),B=(0,i.up)("IconQuote"),N=(0,i.up)("IconFormat"),j=(0,i.up)("IconFormatBrush"),Y=(0,i.up)("IconLinkOne"),V=(0,i.up)("IconAlignTextLeft"),J=(0,i.up)("IconAlignTextCenter"),q=(0,i.up)("IconAlignTextRight"),X=(0,i.up)("IconAlignTextBoth"),G=(0,i.up)("IconList"),K=(0,i.up)("IconDown"),Q=(0,i.up)("IconOrderedList"),ee=(0,i.up)("IconIndentLeft"),te=(0,i.up)("IconIndentRight"),le=(0,i.up)("IconRowHeight"),ne=(0,i.up)("IconVerticalSpacingBetweenItems"),oe=(0,i.up)("IconFullwidth"),ie=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",ig,[(0,i._)("div",sg,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"preset-style-item",key:e.label,style:(0,ae.j5)(e.style),onClick:t=>A(e.cmd)},(0,ae.zw)(e.label),13,rg))),64))]),(0,i.Wm)(Dc),(0,i.Wm)(ng,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(op,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(u).fontname,"onUpdate:value":l[0]||(l[0]=e=>H("fontname",e)),options:[...(0,s.SU)(c),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(op,{style:{width:"40%"},value:(0,s.SU)(u).fontsize,"onUpdate:value":l[1]||(l[1]=e=>H("fontsize",e)),options:S.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Vf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).color,"onUpdate:modelValue":l[2]||(l[2]=e=>H("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Pf,{first:"",color:(0,s.SU)(u).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[ie,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).backcolor,"onUpdate:modelValue":l[3]||(l[3]=e=>H("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Pf,{color:(0,s.SU)(u).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[ie,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:l[4]||(l[4]=e=>H("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[ie,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:l[5]||(l[5]=e=>H("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[ie,"减小字号"]])])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[6]||(l[6]=e=>H("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1},8,["checked"])),[[ie,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[7]||(l[7]=e=>H("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1},8,["checked"])),[[ie,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[8]||(l[8]=e=>H("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1},8,["checked"])),[[ie,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[9]||(l[9]=e=>H("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1},8,["checked"])),[[ie,"删除线"]])])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).superscript,onClick:l[10]||(l[10]=e=>H("superscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A²")])),_:1},8,["checked"])),[[ie,"上标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).subscript,onClick:l[11]||(l[11]=e=>H("subscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A₂")])),_:1},8,["checked"])),[[ie,"下标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).code,onClick:l[12]||(l[12]=e=>H("code"))},{default:(0,i.w5)((()=>[(0,i.Wm)(R)])),_:1},8,["checked"])),[[ie,"行内代码"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).blockquote,onClick:l[13]||(l[13]=e=>H("blockquote"))},{default:(0,i.w5)((()=>[(0,i.Wm)(B)])),_:1},8,["checked"])),[[ie,"引用"]])])),_:1}),(0,i.Wm)(Vf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{first:"",style:{flex:"1"},onClick:l[14]||(l[14]=e=>H("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(N)])),_:1})),[[ie,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:l[15]||(l[15]=e=>(0,s.SU)(v)()),onDblclick:l[16]||(l[16]=e=>(0,s.SU)(v)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(j)])),_:1},8,["checked"])),[[ie,"格式刷(双击连续使用)"]]),(0,i.Wm)(rn,{placement:"bottom-end",trigger:"click",value:O.value,"onUpdate:value":l[21]||(l[21]=e=>O.value=e),style:{width:"33.33%"}},{content:(0,i.w5)((()=>[(0,i._)("div",ug,[(0,i.Wm)(an,{value:Z.value,"onUpdate:value":l[17]||(l[17]=e=>Z.value=e),placeholder:"请输入超链接"},null,8,["value"]),(0,i._)("div",cg,[(0,i.Wm)(Xd,{size:"small",disabled:!(0,s.SU)(u).link,onClick:l[18]||(l[18]=e=>P()),style:{"margin-right":"5px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("移除")])),_:1},8,["disabled"]),(0,i.Wm)(Xd,{size:"small",type:"primary",onClick:l[19]||(l[19]=e=>P(Z.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{last:"",style:{width:"100%"},checked:!!(0,s.SU)(u).link,onClick:l[20]||(l[20]=e=>z())},{default:(0,i.w5)((()=>[(0,i.Wm)(Y)])),_:1},8,["checked"])),[[ie,"超链接"]])])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Dc),(0,i.Wm)(Qf,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[22]||(l[22]=e=>H("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(V)])),_:1})),[[ie,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(J)])),_:1})),[[ie,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(q)])),_:1})),[[ie,"右对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"justify",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(X)])),_:1})),[[ie,"两端对齐"]])])),_:1},8,["value"]),(0,i._)("div",dg,[(0,i.Wm)(Vf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{first:"",type:(0,s.SU)(u).bulletList?"primary":"default",style:{flex:"1"},onClick:l[23]||(l[23]=e=>H("bulletList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(G)])),_:1},8,["type"])),[[ie,"项目符号"]]),(0,i.Wm)(rn,{trigger:"click",value:h.value,"onUpdate:value":l[24]||(l[24]=e=>h.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",pg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,ae.j5)({listStyleType:e}),onClick:t=>H("bulletList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},hg))),64))],12,vg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),fg,(0,i.Wm)(Vf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{first:"",type:(0,s.SU)(u).orderedList?"primary":"default",style:{flex:"1"},onClick:l[25]||(l[25]=e=>H("orderedList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(Q)])),_:1},8,["type"])),[[ie,"编号"]]),(0,i.Wm)(rn,{trigger:"click",value:f.value,"onUpdate:value":l[26]||(l[26]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",gg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(x.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,ae.j5)({listStyleType:e}),onClick:t=>H("orderedList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},xg))),64))],12,yg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i._)("div",kg,[(0,i.Wm)(Vf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{first:"",style:{flex:"1"},onClick:l[27]||(l[27]=e=>H("indent","-1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(ee)])),_:1})),[[ie,"减小段落缩进"]]),(0,i.Wm)(rn,{trigger:"click",value:g.value,"onUpdate:value":l[29]||(l[29]=e=>g.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:l[28]||(l[28]=e=>H("textIndent","-1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("减小首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),bg,(0,i.Wm)(Vf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{first:"",style:{flex:"1"},onClick:l[30]||(l[30]=e=>H("indent","+1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(te)])),_:1})),[[ie,"增大段落缩进"]]),(0,i.Wm)(rn,{trigger:"click",value:y.value,"onUpdate:value":l[32]||(l[32]=e=>y.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:l[31]||(l[31]=e=>H("textIndent","+1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("增大首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i.Wm)(Dc),(0,i._)("div",_g,[Ig,(0,i.Wm)(op,{style:{width:"60%"},value:b.value||1,"onUpdate:value":l[33]||(l[33]=e=>M(e)),options:C.map((e=>({label:e+"倍",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(le)])),_:1},8,["value","options"])]),(0,i._)("div",Sg,[Cg,(0,i.Wm)(op,{style:{width:"60%"},value:I.value||0,"onUpdate:value":l[34]||(l[34]=e=>U(e)),options:T.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ne)])),_:1},8,["value","options"])]),(0,i._)("div",Lg,[Eg,(0,i.Wm)(op,{style:{width:"60%"},value:_.value||0,"onUpdate:value":l[35]||(l[35]=e=>W(e)),options:L.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(oe)])),_:1},8,["value","options"])]),(0,i._)("div",Tg,[Mg,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:k.value,"onUpdate:modelValue":l[36]||(l[36]=e=>D(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:k.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Dc),(0,i.Wm)(kf),(0,i.Wm)(Dc),(0,i.Wm)(Zf),(0,i.Wm)(Dc),(0,i.Wm)(Gm)])}}});const Wg=(0,Nl.Z)(Ug,[["__scopeId","data-v-478ca737"]]);var Dg=Wg;const Hg={class:"element-flip"};var Fg=(0,i.aZ)({__name:"ElementFlip",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(!1),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{!l.value||"image"!==l.value.type&&"shape"!==l.value.type||(a.value=!!l.value.flipH,n.value=!!l.value.flipV)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())};return(e,t)=>{const l=(0,i.up)("IconFlipVertically"),o=(0,i.up)("IconFlipHorizontally");return(0,i.wg)(),(0,i.iD)("div",Hg,[(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Nf,{style:{flex:"1"},checked:n.value,onClick:t[0]||(t[0]=e=>u({flipV:!n.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(l),(0,i.Uk)(" 垂直翻转")])),_:1},8,["checked"]),(0,i.Wm)(Nf,{style:{flex:"1"},checked:a.value,onClick:t[1]||(t[1]=e=>u({flipH:!a.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(o),(0,i.Uk)(" 水平翻转")])),_:1},8,["checked"])])),_:1})])}}});const Ag=(0,Nl.Z)(Fg,[["__scopeId","data-v-7571b056"]]);var Zg=Ag;const $g=e=>((0,i.dD)("data-v-2c8acf3c"),e=e(),(0,i.Cn)(),e),Og={class:"element-filter"},zg={class:"row"},Pg=$g((()=>(0,i._)("div",{style:{flex:"2"}},"启用滤镜:",-1))),Rg={class:"switch-wrapper",style:{flex:"3"}},Bg={key:0,class:"filter"},Ng={class:"name"};var jg=(0,i.aZ)({__name:"ElementFilter",setup(e){const t=[{label:"模糊",key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:"亮度",key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:"对比度",key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:"灰度",key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:"饱和度",key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:"色相",key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:"不透明度",key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],l=F(),{handleElement:a,handleElementId:n}=(0,o.Jk)($()),r=(0,s.iH)(JSON.parse(JSON.stringify(t))),u=(0,s.iH)(!1),{addHistorySnapshot:c}=ra();(0,i.YP)(a,(()=>{if(!a.value||"image"!==a.value.type)return;const e=a.value.filters;e?(r.value=t.map((t=>{const l=e[t.key];return l?{...t,value:parseInt(l)}:t})),u.value=!0):(r.value=JSON.parse(JSON.stringify(t)),u.value=!1)}),{deep:!0,immediate:!0});const d=(e,t)=>{const o=a.value,i=o.filters||{},s={...i,[e.key]:`${t}${e.unit}`};l.updateElement({id:n.value,props:{filters:s}}),c()},p=e=>{a.value&&(e?l.updateElement({id:a.value.id,props:{filters:{}}}):l.removeElementProps({id:a.value.id,propName:"filters"}),c())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Og,[(0,i._)("div",zg,[Pg,(0,i._)("div",Rg,[(0,i.Wm)(sf,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["value"])])]),u.value?((0,i.wg)(),(0,i.iD)("div",Bg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(r.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"filter-item",key:e.key},[(0,i._)("div",Ng,(0,ae.zw)(e.label),1),(0,i.Wm)(Nm,{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,"onUpdate:value":t=>d(e,t)},null,8,["max","step","value","onUpdate:value"])])))),128))])):(0,i.kq)("",!0)]))}});const Yg=(0,Nl.Z)(jg,[["__scopeId","data-v-2c8acf3c"]]);var Vg=Yg;const Jg=e=>((0,i.dD)("data-v-0ae0ff99"),e=e(),(0,i.Cn)(),e),qg={class:"element-color-mask"},Xg={class:"row"},Gg=Jg((()=>(0,i._)("div",{style:{width:"40%"}},"着色(蒙版):",-1))),Kg={class:"switch-wrapper",style:{width:"60%"}},Qg={key:0,class:"row",style:{"margin-top":"15px"}},ey=Jg((()=>(0,i._)("div",{style:{width:"40%"}},"蒙版颜色:",-1))),ty="rgba(226, 83, 77, 0.5)";var ly=(0,i.aZ)({__name:"ElementColorMask",setup(e){const t=F(),{handleElement:l,handleElementId:a}=(0,o.Jk)($()),n=(0,s.iH)(ty),r=(0,s.iH)(!1),{addHistorySnapshot:u}=ra();(0,i.YP)(l,(()=>{l.value&&"image"===l.value.type&&(l.value.colorMask?(n.value=l.value.colorMask,r.value=!0):r.value=!1)}),{deep:!0,immediate:!0});const c=e=>{l.value&&(e?t.updateElement({id:l.value.id,props:{colorMask:ty}}):t.removeElementProps({id:l.value.id,propName:"colorMask"}),u())},d=e=>{t.updateElement({id:a.value,props:{colorMask:e}}),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",qg,[(0,i._)("div",Xg,[Gg,(0,i._)("div",Kg,[(0,i.Wm)(sf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),r.value?((0,i.wg)(),(0,i.iD)("div",Qg,[ey,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>d(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:n.value},null,8,["color"])])),_:1})])):(0,i.kq)("",!0)]))}});const ay=(0,Nl.Z)(ly,[["__scopeId","data-v-0ae0ff99"]]);var ny=ay;const oy=e=>((0,i.dD)("data-v-2e186970"),e=e(),(0,i.Cn)(),e),iy={class:"image-style-panel"},sy={class:"clip"},ry=oy((()=>(0,i._)("div",{class:"title"},"按形状:",-1))),uy={class:"shape-clip"},cy=["onClick"],dy={key:0,class:"title"};var py=(0,i.aZ)({__name:"ImageStylePanel",setup(e){const t=qn,l=[{label:"纵横比(方形)",children:[{key:"1:1",ratio:1}]},{label:"纵横比(纵向)",children:[{key:"2:3",ratio:1.5},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:"纵横比(横向)",children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:.6},{key:"5:4",ratio:.8}]},{children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:.625}]}],a=$(),n=F(),{handleElement:r,handleElementId:u}=(0,o.Jk)(a),{currentSlide:c}=(0,o.Jk)(n),d=r,p=(0,s.iH)(!1),{addHistorySnapshot:v}=ra(),m=()=>{a.setClipingImageElementId(u.value),p.value=!1},h=()=>{const e=r.value,t=e.width,l=e.height,a=e.left,n=e.top,o=e.clip?e.clip.range:[[0,0],[100,100]],i=t/((o[1][0]-o[0][0])/100),s=l/((o[1][1]-o[0][1])/100),u=a-i*(o[0][0]/100),c=n-s*(o[0][1]/100);return{originClipRange:o,originWidth:i,originHeight:s,originLeft:u,originTop:c}},f=(e,t=0)=>{const l=r.value,{originClipRange:a,originWidth:o,originHeight:i,originLeft:s,originTop:c}=h();if(t){const a=i/o,r=0,d=100;let p;if(a>t){const e=(1-t/a)/2*100;p=[[r,e],[d,d-e]]}else{const e=(1-a/t)/2*100;p=[[e,r],[d-e,d]]}n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:p},left:s+o*(p[0][0]/100),top:c+i*(p[0][1]/100),width:o*(p[1][0]-p[0][0])/100,height:i*(p[1][1]-p[0][1])/100}})}else n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:a}}});m(),v()},g=e=>{const t=e[0];t&&(ta(t).then((e=>{const t={src:e};n.updateElement({id:u.value,props:t})})),v())},y=()=>{const e=r.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:a}=h();n.updateElement({id:u.value,props:{left:l,top:a,width:e,height:t}})}n.removeElementProps({id:u.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),v()},w=()=>{const e=r.value,t={...c.value.background,type:"image",image:e.src,imageSize:"cover"};n.updateSlide({background:t}),v()};return(e,a)=>{const n=(0,i.up)("IconTailoring"),o=(0,i.up)("IconDown"),r=(0,i.up)("IconTransform"),u=(0,i.up)("IconUndo"),c=(0,i.up)("IconTheme");return(0,i.wg)(),(0,i.iD)("div",iy,[(0,i._)("div",{class:"origin-image",style:(0,ae.j5)({backgroundImage:`url(${(0,s.SU)(d).src})`})},null,4),(0,i.Wm)(Zg),(0,i.Wm)(Vf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{first:"",style:{width:"calc(100% / 6 * 5)"},onClick:a[0]||(a[0]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{class:"btn-icon"}),(0,i.Uk)(" 裁剪图片")])),_:1}),(0,i.Wm)(rn,{trigger:"click",value:p.value,"onUpdate:value":a[1]||(a[1]=e=>p.value=e),style:{width:"calc(100% / 6)"}},{content:(0,i.w5)((()=>[(0,i._)("div",sy,[ry,(0,i._)("div",uy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-clip-item",key:t,onClick:e=>f(t)},[(0,i._)("div",{class:"shape",style:(0,ae.j5)({clipPath:e.style})},null,4)],8,cy)))),128))]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.label},[e.label?((0,i.wg)(),(0,i.iD)("div",dy,"按"+(0,ae.zw)(e.label)+":",1)):(0,i.kq)("",!0),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},key:e.key,onClick:t=>f("rect",e.ratio)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ae.zw)(e.key),1)])),_:2},1032,["onClick"])))),128))])),_:2},1024)],64)))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{last:"",class:"popover-btn",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Dc),(0,i.Wm)(ny),(0,i.Wm)(Dc),(0,i.Wm)(Vg),(0,i.Wm)(Dc),(0,i.Wm)(kf),(0,i.Wm)(Dc),(0,i.Wm)(Zf),(0,i.Wm)(Dc),(0,i.Wm)(Oa,{onChange:a[2]||(a[2]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"full-width-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 替换图片")])),_:1})])),_:1}),(0,i.Wm)(Xd,{class:"full-width-btn",onClick:a[3]||(a[3]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(u,{class:"btn-icon"}),(0,i.Uk)(" 重置样式")])),_:1}),(0,i.Wm)(Xd,{class:"full-width-btn",onClick:a[4]||(a[4]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"btn-icon"}),(0,i.Uk)(" 设为背景")])),_:1})])}}});const vy=(0,Nl.Z)(py,[["__scopeId","data-v-2e186970"]]);var my=vy,hy=()=>{const e=$(),{shapeFormatPainter:t,handleElement:l}=(0,o.Jk)(e),a=(a=!1)=>{const n=l.value;t.value?e.setShapeFormatPainter(null):e.setShapeFormatPainter({keep:a,fill:n.fill,gradient:n.gradient,outline:n.outline,opacity:n.opacity,shadow:n.shadow})};return{toggleShapeFormatPainter:a}};const fy=e=>((0,i.dD)("data-v-0674f2cf"),e=e(),(0,i.Cn)(),e),gy={class:"shape-style-panel"},yy={class:"title"},wy=fy((()=>(0,i._)("span",null,"点击替换形状",-1))),xy={class:"shape-pool"},ky={class:"shape-list"},by={class:"row"},_y=fy((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Iy={class:"row"},Sy=fy((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Cy={class:"row"},Ly=fy((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),Ey={key:0,class:"row"},Ty=fy((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),My={class:"row"};var Uy=(0,i.aZ)({__name:"ShapeStylePanel",setup(e){const t=$(),l=F(),{handleElement:a,handleElementId:n,richTextAttrs:r,availableFonts:u,textFormatPainter:c,shapeFormatPainter:d}=(0,o.Jk)(t),p=a,v=(0,s.iH)("#000"),m=(0,s.iH)({type:"linear",rotate:0,color:["#fff","#fff"]}),h=(0,s.iH)("fill"),f=(0,s.iH)("middle");(0,i.YP)(a,(()=>{a.value&&"shape"===a.value.type&&(v.value=a.value.fill||"#fff",m.value=a.value.gradient||{type:"linear",rotate:0,color:[v.value,"#fff"]},h.value=a.value.gradient?"gradient":"fill",f.value=a.value?.text?.align||"middle")}),{deep:!0,immediate:!0});const{addHistorySnapshot:g}=ra(),{toggleTextFormatPainter:y}=Am(),{toggleShapeFormatPainter:w}=hy(),x=e=>{l.updateElement({id:n.value,props:e}),g()},k=e=>{"fill"===e?(l.removeElementProps({id:n.value,propName:"gradient"}),g()):x({gradient:m.value})},b=e=>{if(!m.value)return;const t={...m.value,...e};x({gradient:t})},_=e=>{x({fill:e})},I=e=>{const{width:t,height:l}=a.value,n={viewBox:e.viewBox,path:e.path,special:e.special};if(e.pathFormula){n.pathFormula=e.pathFormula,n.viewBox=[t,l];const a=oa[e.pathFormula];"editable"in a?(n.path=a.formula(t,l,a.defaultValue),n.keypoint=a.defaultValue):n.path=a.formula(t,l)}else n.pathFormula=void 0,n.keypoint=void 0;x(n)},S=e=>{const t=a.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},n=t.text||l;x({text:{...n,align:e}})},C=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],L=(e,t)=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,t)=>{const l=(0,i.up)("IconDown"),a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),g=(0,i.up)("IconHighLight"),x=(0,i.up)("IconTextBold"),T=(0,i.up)("IconTextItalic"),M=(0,i.up)("IconTextUnderline"),U=(0,i.up)("IconStrikethrough"),W=(0,i.up)("IconFormat"),D=(0,i.up)("IconFormatBrush"),H=(0,i.up)("IconAlignTextLeft"),F=(0,i.up)("IconAlignTextCenter"),A=(0,i.up)("IconAlignTextRight"),Z=(0,i.up)("IconAlignTextTopOne"),$=(0,i.up)("IconAlignTextMiddleOne"),O=(0,i.up)("IconAlignTextBottomOne"),z=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",gy,[(0,i._)("div",yy,[wy,(0,i.Wm)(l)]),(0,i._)("div",xy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ia),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",ky,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,["任意多边形"!==e.title?((0,i.wg)(),(0,i.j4)(Tp,{class:"shape-item",key:t,shape:e,onClick:t=>I(e)},null,8,["shape","onClick"])):(0,i.kq)("",!0)],64)))),256))])])))),128))]),(0,i._)("div",by,[(0,i.Wm)(op,{style:{flex:"1"},value:h.value,"onUpdate:value":t[0]||(t[0]=e=>k(e)),options:[{label:"纯色填充",value:"fill"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),_y,"fill"===h.value?((0,i.wg)(),(0,i.j4)(rn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:v.value,"onUpdate:modelValue":t[1]||(t[1]=e=>_(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:v.value},null,8,["color"])])),_:1})):((0,i.wg)(),(0,i.j4)(op,{key:1,style:{flex:"1"},value:m.value.type,"onUpdate:value":t[2]||(t[2]=e=>b({type:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"gradient"===h.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Iy,[Sy,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:m.value.color[0],"onUpdate:modelValue":t[3]||(t[3]=e=>b({color:[e,m.value.color[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:m.value.color[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Cy,[Ly,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:m.value.color[1],"onUpdate:modelValue":t[4]||(t[4]=e=>b({color:[m.value.color[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:m.value.color[1]},null,8,["color"])])),_:1})]),"linear"===m.value.type?((0,i.wg)(),(0,i.iD)("div",Ey,[Ty,(0,i.Wm)(Nm,{style:{width:"60%"},min:0,max:360,step:15,value:m.value.rotate,"onUpdate:value":t[5]||(t[5]=e=>b({rotate:e}))},null,8,["value"])])):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0),(0,i.Wm)(Zg),(0,i.Wm)(Dc),(0,s.SU)(p).text?.content?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(ng,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(op,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(r).fontname,"onUpdate:value":t[6]||(t[6]=e=>L("fontname",e)),options:[...(0,s.SU)(u),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(op,{style:{width:"40%"},value:(0,s.SU)(r).fontsize,"onUpdate:value":t[7]||(t[7]=e=>L("fontsize",e)),options:C.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Vf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(r).color,"onUpdate:modelValue":t[8]||(t[8]=e=>L("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Pf,{first:"",color:(0,s.SU)(r).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[z,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(r).backcolor,"onUpdate:modelValue":t[9]||(t[9]=e=>L("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Pf,{color:(0,s.SU)(r).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["color"])),[[z,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:t[10]||(t[10]=e=>L("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[z,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[11]||(t[11]=e=>L("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[z,"减小字号"]])])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(r).bold,onClick:t[12]||(t[12]=e=>L("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1},8,["checked"])),[[z,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(r).em,onClick:t[13]||(t[13]=e=>L("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["checked"])),[[z,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(r).underline,onClick:t[14]||(t[14]=e=>L("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1},8,["checked"])),[[z,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(r).strikethrough,onClick:t[15]||(t[15]=e=>L("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1},8,["checked"])),[[z,"删除线"]])])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},onClick:t[16]||(t[16]=e=>L("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[z,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:!!(0,s.SU)(c),onClick:t[17]||(t[17]=e=>(0,s.SU)(y)()),onDblclick:t[18]||(t[18]=e=>(0,s.SU)(y)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D)])),_:1},8,["checked"])),[[z,"格式刷(双击连续使用)"]])])),_:1}),(0,i.Wm)(Dc),(0,i.Wm)(Qf,{class:"row","button-style":"solid",value:(0,s.SU)(r).align,"onUpdate:value":t[19]||(t[19]=e=>L("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1})),[[z,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1})),[[z,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(A)])),_:1})),[[z,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Qf,{class:"row","button-style":"solid",value:f.value,"onUpdate:value":t[20]||(t[20]=e=>S(e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"top",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Z)])),_:1})),[[z,"顶对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"middle",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1})),[[z,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"bottom",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(O)])),_:1})),[[z,"底对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Dc)],64)):(0,i.kq)("",!0),(0,i.Wm)(kf),(0,i.Wm)(Dc),(0,i.Wm)(Zf),(0,i.Wm)(Dc),(0,i.Wm)(Gm),(0,i.Wm)(Dc),(0,i._)("div",My,[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:t[21]||(t[21]=e=>(0,s.SU)(w)()),onDblclick:t[22]||(t[22]=e=>(0,s.SU)(w)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D),(0,i.Uk)(" 形状格式刷")])),_:1},8,["checked"])),[[z,"双击连续使用"]])])])}}});const Wy=(0,Nl.Z)(Uy,[["__scopeId","data-v-0674f2cf"]]);var Dy=Wy;const Hy=e=>((0,i.dD)("data-v-ae80032c"),e=e(),(0,i.Cn)(),e),Fy={class:"line-style-panel"},Ay={class:"row"},Zy=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"线条样式:",-1))),$y={class:"row"},Oy=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"线条颜色:",-1))),zy={class:"row"},Py=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"线条宽度:",-1))),Ry={class:"row"},By=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"起点样式:",-1))),Ny={class:"row"},jy=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"终点样式:",-1)));var Yy=(0,i.aZ)({__name:"LineStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Fy,[(0,i._)("div",Ay,[Zy,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(a).style,"onUpdate:value":t[0]||(t[0]=e=>r({style:e})),options:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",$y,[Oy,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",zy,[Py,(0,i.Wm)(uv,{value:(0,s.SU)(a).width,"onUpdate:value":t[2]||(t[2]=e=>r({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",Ry,[By,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(a).points[0],"onUpdate:value":t[3]||(t[3]=e=>r({points:[e,(0,s.SU)(a).points[1]]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i._)("div",Ny,[jy,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(a).points[1],"onUpdate:value":t[4]||(t[4]=e=>r({points:[(0,s.SU)(a).points[0],e]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i.Wm)(Dc),(0,i.Wm)(Zf)]))}});const Vy=(0,Nl.Z)(Yy,[["__scopeId","data-v-ae80032c"]]);var Jy=Vy;const qy={class:"chart-data-editor"},Xy={class:"editor-content"},Gy={class:"range-box"},Ky=["id","onFocus","onPaste"],Qy={class:"btns"},ew={class:"left"},tw={class:"right"},lw=100,aw=32;var nw=(0,i.aZ)({__name:"ChartDataEditor",props:{data:{}},emits:["save","close"],setup(e,{emit:t}){const l=e,a=(0,s.iH)([0,0]),o=(0,s.iH)({width:0,height:0}),r=(0,s.iH)(null),u=(0,i.Fl)((()=>{const e=a.value[0]*lw,t=a.value[1]*aw;return[{type:"t",style:{width:e+"px"}},{type:"b",style:{top:t+"px",width:e+"px"}},{type:"l",style:{height:t+"px"}},{type:"r",style:{left:e+"px",height:t+"px"}}]})),c=(0,i.Fl)((()=>{const e=a.value[0]*lw,t=a.value[1]*aw;return{left:e+"px",top:t+"px"}})),d=()=>{const e=[],{labels:t,legends:n,series:o}=l.data,i=t.length,s=o.length;e.push(["",...n]);for(let l=0;l{if(!r.value)return;const[e,t]=r.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},v=e=>{const t=e.key.toUpperCase();t===le.ENTER&&p()};(0,i.bv)((()=>{document.addEventListener("keydown",v)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",v)}));const m=()=>{const[e,l]=a.value,n=[],o=[],i=[];for(let t=1;t{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},f=(e,t,l)=>{if(e.preventDefault(),!e.clipboardData)return;const a=e.clipboardData.items[0];a&&"string"===a.kind&&"text/plain"===a.type&&a.getAsString((e=>{const a=me(e);if("object"===typeof a)return;const n=he(e);if(n){const e=t+n.length,a=l+n[0].length;for(let o=t;ot("close"),y=e=>{let t=!0;const l=e.pageX,n=e.pageY,i=a.value[0]*lw,s=a.value[1]*aw;document.onmousemove=e=>{if(!t)return;const a=e.pageX,r=e.pageY,u=a-l,c=r-n,d=i+u,p=s+c;o.value={width:d,height:p}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const i=e.pageX,s=e.pageY;if(l===i&&n===s)return;let r=o.value.width,u=o.value.height;r%lw>.5*lw&&(r+=lw-r%lw),u%aw>.5*aw&&(u+=aw-u%aw);let c=Math.round(u/aw),d=Math.round(r/lw);c<3&&(c=3),d<2&&(d=2),a.value=[d,c],o.value={width:0,height:0}}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",qy,[(0,i._)("div",Xy,[(0,i._)("div",Gy,[(0,i._)("div",{class:"temp-range",style:(0,ae.j5)({width:o.value.width+"px",height:o.value.height+"px"})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["range-line",e.type]),key:e.type,style:(0,ae.j5)(e.style)},null,6)))),128)),(0,i._)("div",{class:"resizable",style:(0,ae.j5)(c.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>y(e)),["stop"]))},null,36)]),(0,i._)("table",null,[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(31,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(7,(t=>(0,i._)("td",{key:t,class:(0,ae.C_)({head:1===t&&e<=a.value[1]||1===e&&t<=a.value[0]})},[(0,i._)("input",{class:(0,ae.C_)(["item",{selected:e<=a.value[1]&&t<=a.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>r.value=[e-1,t-1],onPaste:l=>f(l,e-1,t-1)},null,42,Ky)],2))),64))]))),64))])])]),(0,i._)("div",Qy,[(0,i._)("div",ew,[(0,i.Wm)(Xd,{class:"btn",onClick:t[1]||(t[1]=e=>h())},{default:(0,i.w5)((()=>[(0,i.Uk)("清空")])),_:1})]),(0,i._)("div",tw,[(0,i.Wm)(Xd,{class:"btn",onClick:t[2]||(t[2]=e=>g())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>m()),style:{"margin-left":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])]))}});const ow=(0,Nl.Z)(nw,[["__scopeId","data-v-f7b59928"]]);var iw=ow;const sw=e=>((0,i.dD)("data-v-26bf4835"),e=e(),(0,i.Cn)(),e),rw=sw((()=>(0,i._)("span",{class:"checkbox-input"},null,-1))),uw=sw((()=>(0,i._)("input",{class:"checkbox-original",type:"checkbox"},null,-1))),cw={class:"checkbox-label"};var dw=(0,i.aZ)({__name:"Checkbox",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>{l.disabled||t("update:value",e.target.checked)};return(e,t)=>((0,i.wg)(),(0,i.iD)("label",{class:(0,ae.C_)(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:t[0]||(t[0]=e=>a(e))},[rw,uw,(0,i._)("span",cw,[(0,i.WI)(e.$slots,"default")])],34))}});const pw=(0,Nl.Z)(dw,[["__scopeId","data-v-26bf4835"]]);var vw=pw;const mw=e=>((0,i.dD)("data-v-45827db6"),e=e(),(0,i.Cn)(),e),hw={class:"chart-style-panel"},fw={class:"row"},gw={class:"row"},yw={key:1,class:"row"},ww={key:2,class:"row"},xw={class:"row"},kw=mw((()=>(0,i._)("div",{style:{width:"40%"}},"图例:",-1))),bw={class:"row"},_w=mw((()=>(0,i._)("div",{style:{width:"40%"}},"背景填充:",-1))),Iw={class:"row"},Sw=mw((()=>(0,i._)("div",{style:{width:"40%"}},"网格颜色:",-1))),Cw={style:{width:"40%"}},Lw={class:"color-btn-wrap",style:{width:"100%"}},Ew=["onClick"],Tw={class:"preset-themes"},Mw=["onClick","onMouseenter"];var Uw=(0,i.aZ)({__name:"index",setup(e){const t=[["#d87c7c","#919e8b","#d7ab82","#6e7074","#61a0a8","#efa18d"],["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78"],["#516b91","#59c4e6","#edafda","#93b7e3","#a5e7f0","#cbb0e3"],["#893448","#d95850","#eb8146","#ffb248","#f2d643","#ebdba4"],["#4ea397","#22c3aa","#7bd9a5","#d0648a","#f58db2","#f2b3c9"],["#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463"],["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3"],["#e01f54","#001852","#f5e8c8","#b8d2c7","#c6b38e","#a4d8c2"],["#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8"],["#8a7ca8","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc"]],l=$(),a=F(),{handleElement:r,handleElementId:u}=(0,o.Jk)(l),{theme:c}=(0,o.Jk)(a),d=r,p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)([-1,-1]),{addHistorySnapshot:h}=ra(),f=(0,s.iH)("#000"),g=(0,s.iH)([]),y=(0,s.iH)(""),w=(0,s.iH)(""),x=(0,s.iH)(!0),k=(0,s.iH)(!0),b=(0,s.iH)(!1),_=(0,s.iH)(!1),I=(0,s.iH)(!1),S=(0,s.iH)(!1);(0,i.YP)(r,(()=>{if(r.value&&"chart"===r.value.type){if(f.value=r.value.fill||"#fff",r.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:a,donut:n,stackBars:o}=r.value.options;x.value=!!e,k.value=!!t,b.value=!!l,_.value=!!a,I.value=!!n,S.value=!!o}g.value=r.value.themeColor,y.value=r.value.gridColor||"#333",w.value=r.value.legend||""}}),{deep:!0,immediate:!0});const C=e=>{a.updateElement({id:u.value,props:e}),h()},L=e=>{p.value=!1,C({data:e})},E=e=>{C({fill:e})},T=e=>{const t=r.value,l={...t.options,...e};C({options:l})},M=(e,t)=>{const l={themeColor:g.value.map(((l,a)=>a===t?e:l))};C(l)},U=()=>{const e={themeColor:[...g.value,c.value.themeColor]};C(e)},W=(e,t)=>{const l=e.slice(0,t+1);C({themeColor:l}),v.value=!1},D=e=>{const t={themeColor:g.value.filter(((t,l)=>l!==e))};C(t)},H=e=>{C({gridColor:e})},A=e=>{C({legend:e})},Z=()=>p.value=!0;return Hi.on(Ui.OPEN_CHART_DATA_EDITOR,Z),(0,i.Ah)((()=>{Hi.off(Ui.OPEN_CHART_DATA_EDITOR,Z)})),(e,l)=>{const a=(0,i.up)("IconEdit"),o=(0,i.up)("IconCloseSmall"),r=(0,i.up)("IconPlus"),u=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",hw,[(0,i.Wm)(Xd,{class:"full-width-btn",onClick:l[0]||(l[0]=e=>p.value=!0)},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 编辑图表数据 ")])),_:1}),(0,i.Wm)(Dc),"line"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",fw,[(0,i.Wm)(vw,{"onUpdate:value":l[1]||(l[1]=e=>T({showArea:e})),value:b.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("面积图样式")])),_:1},8,["value"]),(0,i.Wm)(vw,{"onUpdate:value":l[2]||(l[2]=e=>T({showLine:e})),value:!k.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("散点图样式")])),_:1},8,["value"])]),(0,i._)("div",gw,[(0,i.Wm)(vw,{"onUpdate:value":l[3]||(l[3]=e=>T({lineSmooth:e})),value:x.value},{default:(0,i.w5)((()=>[(0,i.Uk)("使用平滑曲线")])),_:1},8,["value"])])],64)):(0,i.kq)("",!0),"bar"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",yw,[(0,i.Wm)(vw,{"onUpdate:value":l[4]||(l[4]=e=>T({horizontalBars:e})),value:_.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("条形图样式")])),_:1},8,["value"]),(0,i.Wm)(vw,{"onUpdate:value":l[5]||(l[5]=e=>T({stackBars:e})),value:S.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("堆叠样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),"pie"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",ww,[(0,i.Wm)(vw,{"onUpdate:value":l[6]||(l[6]=e=>T({donut:e})),value:I.value},{default:(0,i.w5)((()=>[(0,i.Uk)("环形图样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),(0,i.Wm)(Dc),(0,i._)("div",xw,[kw,(0,i.Wm)(op,{style:{width:"60%"},value:w.value,"onUpdate:value":l[7]||(l[7]=e=>A(e)),options:[{label:"不显示",value:""},{label:"显示在上方",value:"top"},{label:"显示在下方",value:"bottom"}]},null,8,["value"])]),(0,i.Wm)(Dc),(0,i._)("div",bw,[_w,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:f.value,"onUpdate:modelValue":l[8]||(l[8]=e=>E(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:f.value},null,8,["color"])])),_:1})]),(0,i._)("div",Iw,[Sw,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:y.value,"onUpdate:modelValue":l[9]||(l[9]=e=>H(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:y.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Dc),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(g.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"row",key:t},[(0,i._)("div",Cw,(0,ae.zw)(0===t?"主题配色:":""),1),(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:e,"onUpdate:modelValue":e=>M(e,t)},null,8,["modelValue","onUpdate:modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("div",Lw,[(0,i.Wm)(th,{color:e},null,8,["color"]),0!==t?(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:0,class:"delete-color-btn",onClick:(0,n.iM)((e=>D(t)),["stop"])},[(0,i.Wm)(o)],8,Ew)),[[u,"删除"]]):(0,i.kq)("",!0)])])),_:2},1024)])))),128)),(0,i.Wm)(Vf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",open:v.value,"onUpdate:open":l[11]||(l[11]=e=>v.value=e),style:{width:"40%"}},{content:(0,i.w5)((()=>[(0,i._)("div",Tw,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((e,t)=>(0,i._)("div",{class:"preset-theme",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,((a,n)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["preset-theme-color",{select:m.value[0]===t&&n<=m.value[1]}]),key:a,style:(0,ae.j5)({backgroundColor:a}),onClick:t=>W(e,n),onMouseenter:e=>m.value=[t,n],onMouseleave:l[10]||(l[10]=e=>m.value=[-1,-1])},null,46,Mw)))),128))]))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{first:"",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Uk)("推荐主题")])),_:1})])),_:1},8,["open"]),(0,i.Wm)(Xd,{last:"",disabled:g.value.length>=10,style:{width:"60%"},onClick:l[12]||(l[12]=e=>U())},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 添加主题色 ")])),_:1},8,["disabled"])])),_:1}),(0,i.Wm)(Dc),(0,i.Wm)(kf),(0,i.Wm)(fp,{visible:p.value,"onUpdate:visible":l[15]||(l[15]=e=>p.value=e),width:640},{default:(0,i.w5)((()=>[(0,i.Wm)(iw,{data:(0,s.SU)(d).data,onClose:l[13]||(l[13]=e=>p.value=!1),onSave:l[14]||(l[14]=e=>L(e))},null,8,["data"])])),_:1},8,["visible"])])}}});const Ww=(0,Nl.Z)(Uw,[["__scopeId","data-v-45827db6"]]);var Dw=Ww;const Hw=e=>((0,i.dD)("data-v-e5523cbc"),e=e(),(0,i.Cn)(),e),Fw={class:"table-style-panel"},Aw={class:"row"},Zw=Hw((()=>(0,i._)("div",{style:{width:"40%"}},"行数:",-1))),$w={class:"set-count",style:{width:"60%"}},Ow={class:"count-text"},zw={class:"row"},Pw=Hw((()=>(0,i._)("div",{style:{width:"40%"}},"列数:",-1))),Rw={class:"set-count",style:{width:"60%"}},Bw={class:"count-text"},Nw={class:"row theme-switch"},jw=Hw((()=>(0,i._)("div",{style:{width:"40%"}},"启用主题表格:",-1))),Yw={class:"switch-wrapper",style:{width:"60%"}},Vw={class:"row"},Jw={class:"row"},qw={class:"row"},Xw=Hw((()=>(0,i._)("div",{style:{width:"40%"}},"主题颜色:",-1)));var Gw=(0,i.aZ)({__name:"TableStylePanel",setup(e){const t=F(),{handleElement:l,handleElementId:a,selectedTableCells:n,availableFonts:u}=(0,o.Jk)($()),c=(0,i.Fl)((()=>t.theme.themeColor)),d=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],p=(0,s.iH)({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}),v=(0,s.iH)(),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,s.iH)(0);(0,i.YP)(l,(()=>{l.value&&"table"===l.value.type&&(v.value=l.value.theme,m.value=!!v.value,h.value=l.value.data.length,f.value=l.value.data[0].length,g.value=l.value.data.length,y.value=l.value.data[0].length)}),{deep:!0,immediate:!0});const{addHistorySnapshot:w}=ra(),x=()=>{if(!l.value||"table"!==l.value.type)return;let e=0,t=0;if(n.value.length){const l=n.value[0];e=+l.split("_")[0],t=+l.split("_")[1]}const a=l.value.data[e][t].style;p.value=a?{bold:!!a.bold,em:!!a.em,underline:!!a.underline,strikethrough:!!a.strikethrough,color:a.color||"#000",backcolor:a.backcolor||"",fontsize:a.fontsize||"12px",fontname:a.fontname||"微软雅黑",align:a.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}};(0,i.bv)((()=>{n.value.length&&x()})),(0,i.YP)(n,x);const k=e=>{t.updateElement({id:a.value,props:e}),w()},b=e=>{const t=l.value,a=JSON.parse(JSON.stringify(t.data));for(let l=0;l{if(!v.value)return;const t={...v.value,...e};k({theme:t})},I=e=>{if(e){const e={theme:{color:c.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};k(e)}else t.removeElementProps({id:a.value,propName:"theme"}),w()},S=e=>{const t=l.value,a=t.data.length;if(e>a){const l=new Array(f.value).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""}),n=new Array(e-a).fill(l),o=JSON.parse(JSON.stringify(t.data));o.push(...n),k({data:o})}else{const l=t.data.slice(0,e);k({data:l})}},C=e=>{const t=l.value,a=t.data[0].length;let n=t.data,o=t.colWidths.map((e=>e*t.width));if(e>a){n=n.map((t=>{const l=new Array(e-a).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""});return t.push(...l),t}));const t=new Array(e-a).fill(100);o.push(...t)}else n=n.map((t=>t.slice(0,e))),o=o.slice(0,e);const i=o.reduce(((e,t)=>e+t)),s=o.map((e=>e/i)),u={width:i,data:n,colWidths:s};k(u)};return(e,t)=>{const l=(0,i.up)("IconFontSize"),a=(0,i.up)("IconAddText"),n=(0,i.up)("IconText"),o=(0,i.up)("IconFill"),r=(0,i.up)("IconTextBold"),c=(0,i.up)("IconTextItalic"),g=(0,i.up)("IconTextUnderline"),y=(0,i.up)("IconStrikethrough"),w=(0,i.up)("IconAlignTextLeft"),x=(0,i.up)("IconAlignTextCenter"),k=(0,i.up)("IconAlignTextRight"),L=(0,i.up)("IconMinus"),T=(0,i.up)("IconPlus"),M=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Fw,[(0,i.Wm)(ng,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(op,{style:{width:"50%"},value:p.value.fontname,"onUpdate:value":t[0]||(t[0]=e=>b({fontname:e})),options:[...(0,s.SU)(u),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(l)])),_:1},8,["value","options"]),(0,i.Wm)(op,{style:{width:"50%"},value:p.value.fontsize,"onUpdate:value":t[1]||(t[1]=e=>b({fontsize:e})),options:d.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Vf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>b({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Pf,{first:"",color:p.value.color},{default:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["color"])),[[M,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:p.value.backcolor,"onUpdate:modelValue":t[3]||(t[3]=e=>b({backcolor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Pf,{last:"",color:p.value.backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[M,"单元格填充"]])])),_:1})])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:p.value.bold,onClick:t[4]||(t[4]=e=>b({bold:!p.value.bold}))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"])),[[M,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:p.value.em,onClick:t[5]||(t[5]=e=>b({em:!p.value.em}))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])),[[M,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:p.value.underline,onClick:t[6]||(t[6]=e=>b({underline:!p.value.underline}))},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["checked"])),[[M,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:p.value.strikethrough,onClick:t[7]||(t[7]=e=>b({strikethrough:!p.value.strikethrough}))},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1},8,["checked"])),[[M,"删除线"]])])),_:1}),(0,i.Wm)(Qf,{class:"row","button-style":"solid",value:p.value.align,"onUpdate:value":t[8]||(t[8]=e=>b({align:e}))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(w)])),_:1})),[[M,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1})),[[M,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(k)])),_:1})),[[M,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Dc),(0,i.Wm)(kf,{fixed:!0}),(0,i.Wm)(Dc),(0,i._)("div",Aw,[Zw,(0,i._)("div",$w,[(0,i.Wm)(Xd,{class:"btn",disabled:h.value<=1,onClick:t[9]||(t[9]=e=>S(h.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Ow,(0,ae.zw)(h.value),1),(0,i.Wm)(Xd,{class:"btn",disabled:h.value>=30,onClick:t[10]||(t[10]=e=>S(h.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i._)("div",zw,[Pw,(0,i._)("div",Rw,[(0,i.Wm)(Xd,{class:"btn",disabled:f.value<=1,onClick:t[11]||(t[11]=e=>C(f.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Bw,(0,ae.zw)(f.value),1),(0,i.Wm)(Xd,{class:"btn",disabled:f.value>=30,onClick:t[12]||(t[12]=e=>C(f.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i.Wm)(Dc),(0,i._)("div",Nw,[jw,(0,i._)("div",Yw,[(0,i.Wm)(sf,{value:m.value,"onUpdate:value":t[13]||(t[13]=e=>I(e))},null,8,["value"])])]),v.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Vw,[(0,i.Wm)(vw,{"onUpdate:value":t[14]||(t[14]=e=>_({rowHeader:e})),value:v.value.rowHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("标题行")])),_:1},8,["value"]),(0,i.Wm)(vw,{"onUpdate:value":t[15]||(t[15]=e=>_({rowFooter:e})),value:v.value.rowFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("汇总行")])),_:1},8,["value"])]),(0,i._)("div",Jw,[(0,i.Wm)(vw,{"onUpdate:value":t[16]||(t[16]=e=>_({colHeader:e})),value:v.value.colHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("第一列")])),_:1},8,["value"]),(0,i.Wm)(vw,{"onUpdate:value":t[17]||(t[17]=e=>_({colFooter:e})),value:v.value.colFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("最后一列")])),_:1},8,["value"])]),(0,i._)("div",qw,[Xw,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:v.value.color,"onUpdate:modelValue":t[18]||(t[18]=e=>_({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:v.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)])}}});const Kw=(0,Nl.Z)(Gw,[["__scopeId","data-v-e5523cbc"]]);var Qw=Kw;const ex=e=>((0,i.dD)("data-v-3a5ca316"),e=e(),(0,i.Cn)(),e),tx={class:"latex-style-panel"},lx={class:"row"},ax={class:"row"},nx=ex((()=>(0,i._)("div",{style:{width:"40%"}},"颜色:",-1))),ox={class:"row"},ix=ex((()=>(0,i._)("div",{style:{width:"40%"}},"粗细:",-1)));var sx=(0,i.aZ)({__name:"LatexStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,n=(0,s.iH)(!1),{addHistorySnapshot:r}=ra(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())},c=e=>{u({path:e.path,latex:e.latex,width:e.w,height:e.h,viewBox:[e.w,e.h]})},d=()=>n.value=!0;return Hi.on(Ui.OPEN_LATEX_EDITOR,d),(0,i.Ah)((()=>{Hi.off(Ui.OPEN_LATEX_EDITOR,d)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",tx,[(0,i._)("div",lx,[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>n.value=!0)},{default:(0,i.w5)((()=>[(0,i.Uk)("编辑 LaTeX")])),_:1})]),(0,i.Wm)(Dc),(0,i._)("div",ax,[nx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",ox,[ix,(0,i.Wm)(uv,{min:1,max:3,value:(0,s.SU)(a).strokeWidth,"onUpdate:value":t[2]||(t[2]=e=>u({strokeWidth:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(fp,{visible:n.value,"onUpdate:visible":t[5]||(t[5]=e=>n.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(dm,{value:(0,s.SU)(a).latex,onClose:t[3]||(t[3]=e=>n.value=!1),onUpdate:t[4]||(t[4]=e=>{c(e),n.value=!1})},null,8,["value"])])),_:1},8,["visible"])]))}});const rx=(0,Nl.Z)(sx,[["__scopeId","data-v-3a5ca316"]]);var ux=rx;const cx=e=>((0,i.dD)("data-v-b3551c8c"),e=e(),(0,i.Cn)(),e),dx={class:"video-style-panel"},px=cx((()=>(0,i._)("div",{class:"title"},"视频预览封面",-1))),vx={class:"background-image-wrapper"},mx={class:"background-image"},hx={class:"row"},fx={class:"row switch-row"},gx=cx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),yx={class:"switch-wrapper",style:{width:"60%"}};var wx=(0,i.aZ)({__name:"VideoStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())},u=e=>{const t=e[0];t&&ta(t).then((e=>r({poster:e})))};return(e,t)=>{const l=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",dx,[px,(0,i._)("div",vx,[(0,i.Wm)(Oa,{onChange:t[0]||(t[0]=e=>u(e))},{default:(0,i.w5)((()=>[(0,i._)("div",mx,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundImage:(0,s.SU)(a).poster?`url(${(0,s.SU)(a).poster})`:""})},[(0,i.Wm)(l)],4)])])),_:1})]),(0,i._)("div",hx,[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>r({poster:""}))},{default:(0,i.w5)((()=>[(0,i.Uk)("重置封面")])),_:1})]),(0,i._)("div",fx,[gx,(0,i._)("div",yx,[(0,i.Wm)(sf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[2]||(t[2]=e=>r({autoplay:e}))},null,8,["value"])])])])}}});const xx=(0,Nl.Z)(wx,[["__scopeId","data-v-b3551c8c"]]);var kx=xx;const bx=e=>((0,i.dD)("data-v-32517bcf"),e=e(),(0,i.Cn)(),e),_x={class:"audio-style-panel"},Ix={class:"row"},Sx=bx((()=>(0,i._)("div",{style:{width:"40%"}},"图标颜色:",-1))),Cx={class:"row switch-row"},Lx=bx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),Ex={class:"switch-wrapper",style:{width:"60%"}},Tx={class:"row switch-row"},Mx=bx((()=>(0,i._)("div",{style:{width:"40%"}},"循环播放:",-1))),Ux={class:"switch-wrapper",style:{width:"60%"}};var Wx=(0,i.aZ)({__name:"AudioStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",_x,[(0,i._)("div",Ix,[Sx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[0]||(t[0]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",Cx,[Lx,(0,i._)("div",Ex,[(0,i.Wm)(sf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[1]||(t[1]=e=>r({autoplay:e}))},null,8,["value"])])]),(0,i._)("div",Tx,[Mx,(0,i._)("div",Ux,[(0,i.Wm)(sf,{value:(0,s.SU)(a).loop,"onUpdate:value":t[2]||(t[2]=e=>r({loop:e}))},null,8,["value"])])])]))}});const Dx=(0,Nl.Z)(Wx,[["__scopeId","data-v-32517bcf"]]);var Hx=Dx;const Fx=e=>((0,i.dD)("data-v-80f1bc4e"),e=e(),(0,i.Cn)(),e),Ax={class:"multi-style-panel"},Zx={class:"row"},$x=Fx((()=>(0,i._)("div",{style:{width:"40%"}},"填充颜色:",-1))),Ox={class:"row"},zx=Fx((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),Px={class:"row"},Rx=Fx((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),Bx={class:"row"},Nx=Fx((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var jx=(0,i.aZ)({__name:"MultiStylePanel",setup(e){const t=F(),{richTextAttrs:l,availableFonts:a,activeElementList:n}=(0,o.Jk)($()),{addHistorySnapshot:r}=ra(),u=(e,l)=>{t.updateElement({id:e,props:l}),r()},c=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],d=(0,s.iH)("#fff"),p=(0,s.iH)({width:0,color:"#fff",style:"solid"}),v=e=>{for(const t of n.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||u(t.id,{fill:e}),"table"===t.type){const l=JSON.parse(JSON.stringify(t.data));for(let t=0;t{for(const t of n.value){if("text"===t.type||"image"===t.type||"shape"===t.type||"table"===t.type||"chart"===t.type){const l=t.outline||{width:2,color:"#000",style:"solid"},a={outline:{...l,...e}};u(t.id,a)}"line"===t.type&&u(t.id,e)}p.value={...p.value,...e}},h=(e,t)=>{for(const l of n.value){if(("text"===l.type||"shape"===l.type&&l.text?.content)&&Hi.emit(Ui.RICH_TEXT_COMMAND,{target:l.id,action:{command:e,value:t}}),"table"===l.type){const a=JSON.parse(JSON.stringify(l.data));for(let l=0;l{const n=(0,i.up)("IconFontSize"),o=(0,i.up)("IconAddText"),r=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),f=(0,i.up)("IconAlignTextLeft"),g=(0,i.up)("IconAlignTextCenter"),y=(0,i.up)("IconAlignTextRight"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Ax,[(0,i._)("div",Zx,[$x,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=e=>v(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:d.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Dc),(0,i._)("div",Ox,[zx,(0,i.Wm)(op,{style:{width:"60%"},value:p.value.style||"","onUpdate:value":t[1]||(t[1]=e=>m({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",Px,[Rx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>m({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:p.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",Bx,[Nx,(0,i.Wm)(uv,{value:p.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>m({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(Dc),(0,i.Wm)(ng,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(l).fontname,"onUpdate:value":t[4]||(t[4]=e=>h("fontname",e)),options:[...(0,s.SU)(a),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"]),(0,i.Wm)(op,{style:{width:"40%"},value:(0,s.SU)(l).fontsize,"onUpdate:value":t[5]||(t[5]=e=>h("fontsize",e)),options:c.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Vf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(l).color,"onUpdate:modelValue":t[6]||(t[6]=e=>h("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Pf,{first:"",color:(0,s.SU)(l).color},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[w,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(l).backcolor,"onUpdate:modelValue":t[7]||(t[7]=e=>h("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Pf,{color:(0,s.SU)(l).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(u)])),_:1},8,["color"])),[[w,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:t[8]||(t[8]=e=>h("fontsize-add","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("+")])),_:1})),[[w,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[9]||(t[9]=e=>h("fontsize-reduce","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("-")])),_:1})),[[w,"减小字号"]])])),_:1}),(0,i.Wm)(Qf,{class:"row","button-style":"solid",value:(0,s.SU)(l).align,"onUpdate:value":t[10]||(t[10]=e=>h("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1})),[[w,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1})),[[w,"右对齐"]])])),_:1},8,["value"])])}}});const Yx=(0,Nl.Z)(jx,[["__scopeId","data-v-80f1bc4e"]]);var Vx=Yx;const Jx={class:"element-style-panel"};var qx=(0,i.aZ)({__name:"index",setup(e){const t={[na.TEXT]:Dg,[na.IMAGE]:my,[na.SHAPE]:Dy,[na.LINE]:Jy,[na.CHART]:Dw,[na.TABLE]:Qw,[na.LATEX]:ux,[na.VIDEO]:kx,[na.AUDIO]:Hx},{activeElementIdList:l,activeElementList:a,handleElement:n,activeGroupElementId:s}=(0,o.Jk)($()),r=(0,i.Fl)((()=>{if(l.value.length>1){if(!s.value)return Vx;const e=a.value.find((e=>e.id===s.value));return e&&t[e.type]||null}return n.value&&t[n.value.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Jx,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value)))]))}});const Xx=qx;var Gx=Xx;const Kx=e=>((0,i.dD)("data-v-a2bcea28"),e=e(),(0,i.Cn)(),e),Qx={class:"element-positopn-panel"},ek=Kx((()=>(0,i._)("div",{class:"title"},"层级:",-1))),tk=Kx((()=>(0,i._)("div",{class:"title"},"对齐:",-1))),lk={class:"row"},ak=Kx((()=>(0,i._)("div",{style:{width:"10%"}},null,-1))),nk={key:0,class:"row"},ok={key:1,style:{width:"10%"}},ik={class:"row"},sk=Kx((()=>(0,i._)("div",{style:{width:"7%"}},null,-1)));var rk=(0,i.aZ)({__name:"ElementPositionPanel",setup(e){const t=F(),{handleElement:l,handleElementId:a}=(0,o.Jk)($()),n=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)(0),p=(0,s.iH)(!1),v=(0,i.Fl)((()=>l.value&&Fn[l.value.type]||20)),m=(0,i.Fl)((()=>"text"===l.value?.type&&!l.value.vertical)),h=(0,i.Fl)((()=>"text"===l.value?.type&&l.value.vertical));(0,i.YP)(l,(()=>{l.value&&(n.value=(0,U.round)(l.value.left,1),r.value=(0,U.round)(l.value.top,1),p.value="fixedRatio"in l.value&&!!l.value.fixedRatio,"line"!==l.value.type&&(u.value=(0,U.round)(l.value.width,1),c.value=(0,U.round)(l.value.height,1),d.value="rotate"in l.value&&void 0!==l.value.rotate?(0,U.round)(l.value.rotate,1):0))}),{deep:!0,immediate:!0});const{orderElement:f}=wa(),{alignElementToCanvas:g}=Yn(),{addHistorySnapshot:y}=ra(),w=e=>{const l={left:e};t.updateElement({id:a.value,props:l}),y()},x=e=>{const l={top:e};t.updateElement({id:a.value,props:l}),y()},k=(e,t)=>{if(l.value&&"shape"===l.value.type&&"pathFormula"in l.value&&l.value.pathFormula){const a=oa[l.value.pathFormula];let n="";return n="editable"in a?a.formula(e,t,l.value.keypoint):a.formula(e,t),{viewBox:[e,t],path:n}}return null},b=e=>{let l={width:e};const n=k(e,c.value);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},_=e=>{let l={height:e};const n=k(u.value,e);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},I=e=>{const l={rotate:e};t.updateElement({id:a.value,props:l}),y()},S=e=>{const l={fixedRatio:e};t.updateElement({id:a.value,props:l}),y()},C=e=>{let l=45*Math.floor(d.value/45);"+"===e?l+=45:"-"===e&&(l-=45),l<-180&&(l=-180),l>180&&(l=180);const n={rotate:l};t.updateElement({id:a.value,props:n}),y()};return(e,t)=>{const a=(0,i.up)("IconSendToBack"),o=(0,i.up)("IconBringToFrontOne"),y=(0,i.up)("IconBringToFront"),k=(0,i.up)("IconSentToBack"),L=(0,i.up)("IconAlignLeft"),E=(0,i.up)("IconAlignVertically"),T=(0,i.up)("IconAlignRight"),M=(0,i.up)("IconAlignTop"),U=(0,i.up)("IconAlignHorizontally"),W=(0,i.up)("IconAlignBottom"),D=(0,i.up)("IconLock"),H=(0,i.up)("IconUnlock"),F=(0,i.up)("IconRotate"),A=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Qx,[ek,(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"btn-icon"}),(0,i.Uk)(" 置底")])),_:1})])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"btn-icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(k,{class:"btn-icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Dc),tk,(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>(0,s.SU)(g)((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1})),[[A,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[5]||(t[5]=e=>(0,s.SU)(g)((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1})),[[A,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>(0,s.SU)(g)((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1})),[[A,"右对齐"]])])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>(0,s.SU)(g)((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1})),[[A,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>(0,s.SU)(g)((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1})),[[A,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[9]||(t[9]=e=>(0,s.SU)(g)((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[A,"下对齐"]])])),_:1}),(0,i.Wm)(Dc),(0,i._)("div",lk,[(0,i.Wm)(uv,{step:5,value:n.value,"onUpdate:value":t[10]||(t[10]=e=>w(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 水平: ")])),_:1},8,["value"]),ak,(0,i.Wm)(uv,{step:5,value:r.value,"onUpdate:value":t[11]||(t[11]=e=>x(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 垂直: ")])),_:1},8,["value"])]),"line"!==(0,s.SU)(l).type?((0,i.wg)(),(0,i.iD)("div",nk,[(0,i.Wm)(uv,{min:v.value,max:1500,step:5,disabled:h.value,value:u.value,"onUpdate:value":t[12]||(t[12]=e=>b(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 宽度: ")])),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes((0,s.SU)(l).type)?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[p.value?(0,i.wy)(((0,i.wg)(),(0,i.j4)(D,{key:0,style:{width:"10%"},class:"icon-btn",onClick:t[13]||(t[13]=e=>S(!1))},null,512)),[[A,"解除宽高比锁定"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(H,{key:1,style:{width:"10%"},class:"icon-btn",onClick:t[14]||(t[14]=e=>S(!0))},null,512)),[[A,"宽高比锁定"]])],64)):((0,i.wg)(),(0,i.iD)("div",ok)),(0,i.Wm)(uv,{min:v.value,max:800,step:5,disabled:m.value||"table"===(0,s.SU)(l).type,value:c.value,"onUpdate:value":t[15]||(t[15]=e=>_(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 高度: ")])),_:1},8,["min","disabled","value"])])):(0,i.kq)("",!0),["line","video","audio"].includes((0,s.SU)(l).type)?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(Dc),(0,i._)("div",ik,[(0,i.Wm)(uv,{min:-180,max:180,step:5,value:d.value,"onUpdate:value":t[16]||(t[16]=e=>I(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 旋转: ")])),_:1},8,["value"]),sk,(0,i._)("div",{class:"text-btn",onClick:t[17]||(t[17]=e=>C("-")),style:{width:"24%"}},[(0,i.Wm)(F),(0,i.Uk)(" -45°")]),(0,i._)("div",{class:"text-btn",onClick:t[18]||(t[18]=e=>C("+")),style:{width:"24%"}},[(0,i.Wm)(F,{style:(0,ae.j5)({transform:"rotateY(180deg)"})},null,8,["style"]),(0,i.Uk)(" +45°")])])],64))])}}});const uk=(0,Nl.Z)(rk,[["__scopeId","data-v-a2bcea28"]]);var ck=uk;const dk=1e3,pk="click",vk="animate__",mk=[{type:"bounce",name:"弹跳",children:[{name:"弹入",value:"bounceIn"},{name:"向右弹入",value:"bounceInLeft"},{name:"向左弹入",value:"bounceInRight"},{name:"向上弹入",value:"bounceInUp"},{name:"向下弹入",value:"bounceInDown"}]},{type:"fade",name:"浮现",children:[{name:"浮入",value:"fadeIn"},{name:"向下浮入",value:"fadeInDown"},{name:"向下长距浮入",value:"fadeInDownBig"},{name:"向右浮入",value:"fadeInLeft"},{name:"向右长距浮入",value:"fadeInLeftBig"},{name:"向左浮入",value:"fadeInRight"},{name:"向左长距浮入",value:"fadeInRightBig"},{name:"向上浮入",value:"fadeInUp"},{name:"向上长距浮入",value:"fadeInUpBig"},{name:"从左上浮入",value:"fadeInTopLeft"},{name:"从右上浮入",value:"fadeInTopRight"},{name:"从左下浮入",value:"fadeInBottomLeft"},{name:"从右下浮入",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转进入",value:"rotateIn"},{name:"绕左下进入",value:"rotateInDownLeft"},{name:"绕右下进入",value:"rotateInDownRight"},{name:"绕左上进入",value:"rotateInUpLeft"},{name:"绕右上进入",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"放大进入",value:"zoomIn"},{name:"向下放大进入",value:"zoomInDown"},{name:"从左放大进入",value:"zoomInLeft"},{name:"从右放大进入",value:"zoomInRight"},{name:"向上放大进入",value:"zoomInUp"}]},{type:"slide",name:"滑入",children:[{name:"向下滑入",value:"slideInDown"},{name:"从右滑入",value:"slideInLeft"},{name:"从左滑入",value:"slideInRight"},{name:"向上滑入",value:"slideInUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转进入",value:"flipInX"},{name:"Y轴翻转进入",value:"flipInY"}]},{type:"back",name:"放大滑入",children:[{name:"向下放大滑入",value:"backInDown"},{name:"从左放大滑入",value:"backInLeft"},{name:"从右放大滑入",value:"backInRight"},{name:"向上放大滑入",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",children:[{name:"从右飞入",value:"lightSpeedInRight"},{name:"从左飞入",value:"lightSpeedInLeft"}]}],hk=[{type:"bounce",name:"弹跳",children:[{name:"弹出",value:"bounceOut"},{name:"向左弹出",value:"bounceOutLeft"},{name:"向右弹出",value:"bounceOutRight"},{name:"向上弹出",value:"bounceOutUp"},{name:"向下弹出",value:"bounceOutDown"}]},{type:"fade",name:"浮现",children:[{name:"浮出",value:"fadeOut"},{name:"向下浮出",value:"fadeOutDown"},{name:"向下长距浮出",value:"fadeOutDownBig"},{name:"向左浮出",value:"fadeOutLeft"},{name:"向左长距浮出",value:"fadeOutLeftBig"},{name:"向右浮出",value:"fadeOutRight"},{name:"向右长距浮出",value:"fadeOutRightBig"},{name:"向上浮出",value:"fadeOutUp"},{name:"向上长距浮出",value:"fadeOutUpBig"},{name:"从左上浮出",value:"fadeOutTopLeft"},{name:"从右上浮出",value:"fadeOutTopRight"},{name:"从左下浮出",value:"fadeOutBottomLeft"},{name:"从右下浮出",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转退出",value:"rotateOut"},{name:"绕左下退出",value:"rotateOutDownLeft"},{name:"绕右下退出",value:"rotateOutDownRight"},{name:"绕左上退出",value:"rotateOutUpLeft"},{name:"绕右上退出",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"缩小退出",value:"zoomOut"},{name:"向下缩小退出",value:"zoomOutDown"},{name:"从左缩小退出",value:"zoomOutLeft"},{name:"从右缩小退出",value:"zoomOutRight"},{name:"向上缩小退出",value:"zoomOutUp"}]},{type:"slide",name:"滑出",children:[{name:"向下滑出",value:"slideOutDown"},{name:"从左滑出",value:"slideOutLeft"},{name:"从右滑出",value:"slideOutRight"},{name:"向上滑出",value:"slideOutUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转退出",value:"flipOutX"},{name:"Y轴翻转退出",value:"flipOutY"}]},{type:"back",name:"缩小滑出",children:[{name:"向下缩小滑出",value:"backOutDown"},{name:"从左缩小滑出",value:"backOutLeft"},{name:"从右缩小滑出",value:"backOutRight"},{name:"向上缩小滑出",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",children:[{name:"从右飞出",value:"lightSpeedOutRight"},{name:"从左飞出",value:"lightSpeedOutLeft"}]}],fk=[{type:"shake",name:"晃动",children:[{name:"左右摇晃",value:"shakeX"},{name:"上下摇晃",value:"shakeY"},{name:"摇头",value:"headShake"},{name:"摆动",value:"swing"},{name:"晃动",value:"wobble"},{name:"惊恐",value:"tada"},{name:"果冻",value:"jello"}]},{type:"other",name:"其他",children:[{name:"弹跳",value:"bounce"},{name:"闪烁",value:"flash"},{name:"脉搏",value:"pulse"},{name:"橡皮筋",value:"rubberBand"},{name:"心跳(快)",value:"heartBeat"}]}],gk=[{label:"无",value:"no"},{label:"随机",value:"random"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"},{label:"左右推移(3D)",value:"slideX3D"},{label:"上下推移(3D)",value:"slideY3D"},{label:"淡入淡出",value:"fade"},{label:"旋转",value:"rotate"},{label:"上下展开",value:"scaleY"},{label:"左右展开",value:"scaleX"},{label:"放大",value:"scale"},{label:"缩小",value:"scaleReverse"}],yk=e=>((0,i.dD)("data-v-2455b3a4"),e=e(),(0,i.Cn)(),e),wk={class:"element-animation-panel"},xk={key:0,class:"element-animation"},kk={class:"type-title"},bk={class:"pool-item-wrapper"},_k=["onMouseenter","onClick"],Ik={key:0,class:"mask"},Sk={key:1,class:"tip"},Ck={class:"sequence-content"},Lk={class:"index"},Ek={class:"text"},Tk={class:"handler"},Mk={key:0,class:"configs"},Uk={class:"config-item"},Wk=yk((()=>(0,i._)("div",{style:{width:"35%"}},"持续时长:",-1))),Dk={class:"config-item"},Hk=yk((()=>(0,i._)("div",{style:{width:"35%"}},"触发方式:",-1))),Fk={class:"config-item"};var Ak=(0,i.aZ)({__name:"ElementAnimationPanel",setup(e){const t={};for(const o of mk)for(const e of o.children)t[e.value]=e.name;for(const o of hk)for(const e of o.children)t[e.value]=e.name;for(const o of fk)for(const e of o.children)t[e.value]=e.name;const l=["in","out","attention"],a=F(),{handleElement:n,handleElementId:u}=(0,o.Jk)($()),{currentSlide:c,formatedAnimations:d,currentSlideAnimations:p}=(0,o.Jk)(a),v=[{key:"in",label:"入场",color:"#68a490"},{key:"out",label:"退场",color:"#d86344"},{key:"attention",label:"强调",color:"#e8b76a"}],m=(0,s.iH)("in");(0,i.YP)((()=>u.value),(()=>{f.value=!1}));const h=(0,s.iH)(""),f=(0,s.iH)(!1),{addHistorySnapshot:g}=ra(),y=(0,i.Fl)((()=>{const e=[];for(let l=0;le.id===o.elId));if(!i)continue;const s=Hn[i.type],r=t[o.effect];e.push({...o,index:0===n?l+1:"",elType:s,animationEffect:r})}}return e})),w=(0,i.Fl)((()=>{const e=p.value,t=e.filter((e=>e.elId===u.value));return t||[]})),x=e=>{const t=p.value.filter((t=>t.id!==e));a.updateSlide({animations:t}),g()},k=e=>{const{newIndex:t,oldIndex:l}=e;if(void 0===t||void 0===l||t===l)return;const n=JSON.parse(JSON.stringify(p.value)),o=n[l];n.splice(l,1),n.splice(t,0,o),a.updateSlide({animations:n}),g()},b=(e,t,l)=>{const a=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(a){const e=`${vk}${t}`;document.documentElement.style.setProperty("--animate-duration",`${l}ms`),a.classList.add(`${vk}animated`,e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),a.classList.remove(`${vk}animated`,e)};a.addEventListener("animationend",n,{once:!0})}},_=(e,t)=>{if(t<100||t>5e3)return;const l=p.value.map((l=>l.id===e?{...l,duration:t}:l));a.updateSlide({animations:l}),g()},I=(e,t)=>{const l=p.value.map((l=>l.id===e?{...l,trigger:t}:l));a.updateSlide({animations:l}),g()},S=(e,t)=>{const l=p.value.map((l=>l.id===C.value?{...l,type:e,effect:t}:l));a.updateSlide({animations:l}),f.value=!1,g();const n=p.value.find((e=>e.elId===u.value)),o=n?.duration||dk;b(u.value,t,o)},C=(0,s.iH)(""),L=(e,t)=>{if(C.value)return void S(e,t);const l=JSON.parse(JSON.stringify(p.value));l.push({id:(0,r.x0)(10),elId:u.value,type:e,effect:t,duration:dk,trigger:pk}),a.updateSlide({animations:l}),f.value=!1,g(),b(u.value,t,dk)},E=(0,s.iH)(!1),T=e=>{e?setTimeout((()=>E.value=!0),600):E.value=!1},M=e=>{f.value=!0,C.value=e,T(!0)},U={in:mk,out:hk,attention:fk};return(e,t)=>{const a=(0,i.up)("IconEffects"),o=(0,i.up)("IconClick"),r=(0,i.up)("IconPlayOne"),u=(0,i.up)("IconCloseSmall"),c=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",wk,[(0,s.SU)(n)?((0,i.wg)(),(0,i.iD)("div",xk,[(0,i.Wm)(rn,{trigger:"click",value:f.value,"onUpdate:value":[t[3]||(t[3]=e=>f.value=e),t[4]||(t[4]=e=>T(e))],style:{width:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(Vd,{tabs:v,value:m.value,"onUpdate:value":t[0]||(t[0]=e=>m.value=e),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,null,[m.value===e?((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["animation-pool",e]),key:e},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(U[e],(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-type",key:l.name},[(0,i._)("div",kk,(0,ae.zw)(l.name)+":",1),(0,i._)("div",bk,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.children,(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-item",key:l.name,onMouseenter:e=>h.value=l.value,onMouseleave:t[1]||(t[1]=e=>h.value=""),onClick:t=>L(e,l.value)},[(0,i._)("div",{class:(0,ae.C_)(["animation-box",[`${(0,s.SU)(vk)}animated`,`${(0,s.SU)(vk)}fast`,h.value===l.value&&`${(0,s.SU)(vk)}${l.value}`]])},(0,ae.zw)(l.name),3)],40,_k)))),128))])])))),128)),E.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",Ik))],2)):(0,i.kq)("",!0)],64)))),64))])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"element-animation-btn",onClick:t[2]||(t[2]=e=>C.value="")},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 添加动画 ")])),_:1})])),_:1},8,["value"])])):((0,i.wg)(),(0,i.iD)("div",Sk,[(0,i.Wm)(o,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 选中画布中的元素添加动画")])),(0,i.Wm)(Dc),(0,i.Wm)((0,s.SU)(Em()),{class:"animation-sequence",modelValue:y.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:k},{item:(0,i.w5)((({element:e})=>[(0,i._)("div",{class:(0,ae.C_)(["sequence-item",[e.type,{active:(0,s.SU)(n)?.id===e.elId}]])},[(0,i._)("div",Ck,[(0,i._)("div",Lk,(0,ae.zw)(e.index),1),(0,i._)("div",Ek,"【"+(0,ae.zw)(e.elType)+"】"+(0,ae.zw)(e.animationEffect),1),(0,i._)("div",Tk,[(0,i.wy)((0,i.Wm)(r,{class:"handler-btn",onClick:t=>b(e.elId,e.effect,e.duration)},null,8,["onClick"]),[[c,"预览"]]),(0,i.wy)((0,i.Wm)(u,{class:"handler-btn",onClick:t=>x(e.id)},null,8,["onClick"]),[[c,"删除"]])])]),w.value[0]?.elId===e.elId?((0,i.wg)(),(0,i.iD)("div",Mk,[(0,i.Wm)(Dc,{style:{margin:"16px 0"}}),(0,i._)("div",Uk,[Wk,(0,i.Wm)(uv,{min:500,max:3e3,step:500,value:e.duration,"onUpdate:value":t=>_(e.id,t),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),(0,i._)("div",Dk,[Hk,(0,i.Wm)(op,{value:e.trigger,"onUpdate:value":t=>I(e.id,t),style:{width:"65%"},options:[{label:"主动触发",value:"click"},{label:"与上一动画同时",value:"meantime"},{label:"上一动画之后",value:"auto"}]},null,8,["value","onUpdate:value"])]),(0,i._)("div",Fk,[(0,i.Wm)(Xd,{style:{width:"100%"},onClick:t=>M(e.id)},{default:(0,i.w5)((()=>[(0,i.Uk)("更换动画")])),_:2},1032,["onClick"])])])):(0,i.kq)("",!0)],2)])),_:1},8,["modelValue"])])}}});const Zk=(0,Nl.Z)(Ak,[["__scopeId","data-v-2455b3a4"]]);var $k=Zk;const Ok=[{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529"]},{background:"#333333",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]}];var zk=()=>{const e=F(),{slides:t,currentSlide:l,theme:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==(0,M.Z)(l.theme.color).getAlpha()){const e=(0,M.Z)(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==(0,M.Z)(l.color).getAlpha()){const e=(0,M.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==(0,M.Z)(l.color).getAlpha()){const e=(0,M.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}}return t},s=(e,t)=>{const l=i(e),a={};if(l.length>t.length){const e=(0,M.Z)(t[0]).analogous(l.length-t.length+10),a=e.map((e=>e.toHexString())).slice(1);t.push(...a)}for(let n=0;n{const l=s(e,t.colors);e.background&&"image"===e.background.type||(e.background={type:"solid",color:t.background});for(const a of e.elements){if("shape"===a.type&&(a.fill=l[(0,M.Z)(a.fill).toRgbString()]||a.fill,a.gradient&&delete a.gradient),"text"===a.type&&(a.fill&&(a.fill=l[(0,M.Z)(a.fill).toRgbString()]||a.fill),a.defaultColor=t.fontColor,a.defaultFontName=t.fontname),"table"===a.type){a.theme&&(a.theme.color=l[(0,M.Z)(a.theme.color).toRgbString()]||a.theme.color);for(const e of a.data)for(const l of e)l.style&&(l.style.color=t.fontColor,l.style.fontname=t.fontname)}"chart"===a.type&&(a.themeColor=[l[(0,M.Z)(a.themeColor[0]).toRgbString()]]||0,a.gridColor=t.fontColor),"line"===a.type&&(a.color=l[(0,M.Z)(a.color).toRgbString()]||a.color),"audio"===a.type&&(a.color=l[(0,M.Z)(a.color).toRgbString()]||a.color),"latex"===a.type&&(a.color=t.fontColor)}},u=t=>{const a=JSON.parse(JSON.stringify(l.value));r(a,t),e.updateSlide({background:a.background,elements:a.elements}),n()},c=l=>{const a=JSON.parse(JSON.stringify(t.value));for(const e of a)r(e,l);e.setTheme({backgroundColor:l.background,themeColor:l.colors[0],fontColor:l.fontColor,fontName:l.fontname}),e.setSlides(a),n()},d=()=>{const l=JSON.parse(JSON.stringify(t.value)),{themeColor:o,backgroundColor:i,fontColor:s,fontName:r}=a.value;for(const e of l){e.background&&"image"===e.background.type||(e.background={type:"solid",color:i});for(const t of e.elements)if("shape"===t.type)t.fill=o;else if("line"===t.type)t.color=o;else if("text"===t.type)t.defaultColor=s,t.defaultFontName=r,t.fill&&(t.fill=o);else if("table"===t.type){t.theme&&(t.theme.color=o);for(const e of t.data)for(const t of e)t.style&&(t.style.color=s,t.style.fontname=r)}else"chart"===t.type?(t.themeColor=[o],t.gridColor=s):"latex"===t.type?t.color=s:"audio"===t.type&&(t.color=o)}e.setSlides(l),n()};return{applyPresetThemeToSingleSlide:u,applyPresetThemeToAllSlides:c,applyThemeToAllSlides:d}};const Pk=e=>((0,i.dD)("data-v-475ddcb8"),e=e(),(0,i.Cn)(),e),Rk={class:"slide-design-panel"},Bk=Pk((()=>(0,i._)("div",{class:"title"},"背景填充",-1))),Nk={class:"row"},jk=Pk((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Yk={key:0,class:"background-image-wrapper"},Vk={class:"background-image"},Jk={key:1,class:"background-gradient-wrapper"},qk={class:"row"},Xk=Pk((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Gk={class:"row"},Kk=Pk((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),Qk={key:0,class:"row"},eb=Pk((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),tb={class:"row"},lb={class:"row"},ab=Pk((()=>(0,i._)("div",{style:{width:"40%"}},"画布尺寸:",-1))),nb=Pk((()=>(0,i._)("div",{class:"title"},"全局主题",-1))),ob={class:"row"},ib=Pk((()=>(0,i._)("div",{style:{width:"40%"}},"字体:",-1))),sb={class:"row"},rb=Pk((()=>(0,i._)("div",{style:{width:"40%"}},"字体颜色:",-1))),ub={class:"row"},cb=Pk((()=>(0,i._)("div",{style:{width:"40%"}},"背景颜色:",-1))),db={class:"row"},pb=Pk((()=>(0,i._)("div",{style:{width:"40%"}},"主题色:",-1))),vb={class:"row"},mb=Pk((()=>(0,i._)("div",{class:"title"},"预置主题",-1))),hb={class:"theme-list"},fb={class:"theme-item-content"},gb={class:"colors"},yb={class:"btns"},wb=["onClick"],xb=["onClick"];var kb=(0,i.aZ)({__name:"SlideDesignPanel",setup(e){const t=F(),{availableFonts:l}=(0,o.Jk)($()),{slides:a,currentSlide:n,viewportRatio:r,theme:u}=(0,o.Jk)(t),c=(0,i.Fl)((()=>n.value.background?n.value.background:{type:"solid",value:"#fff"})),{addHistorySnapshot:d}=ra(),{applyPresetThemeToSingleSlide:p,applyPresetThemeToAllSlides:v,applyThemeToAllSlides:m}=zk(),h=e=>{if("solid"===e){const e={...c.value,type:"solid",color:c.value.color||"#fff"};t.updateSlide({background:e})}else if("image"===e){const e={...c.value,type:"image",image:c.value.image||"",imageSize:c.value.imageSize||"cover"};t.updateSlide({background:e})}else{const e={...c.value,type:"gradient",gradientType:c.value.gradientType||"linear",gradientColor:c.value.gradientColor||["#fff","#fff"],gradientRotate:c.value.gradientRotate||0};t.updateSlide({background:e})}d()},f=e=>{t.updateSlide({background:{...c.value,...e}}),d()},g=e=>{const t=e[0];t&&ta(t).then((e=>f({image:e})))},y=()=>{const e=a.value.map((e=>({...e,background:n.value.background})));t.setSlides(e),d()},w=e=>{t.setTheme(e)},x=e=>{t.setViewportRatio(e)};return(e,t)=>{const a=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",Rk,[Bk,(0,i._)("div",Nk,[(0,i.Wm)(op,{style:{flex:"1"},value:c.value.type,"onUpdate:value":t[0]||(t[0]=e=>h(e)),options:[{label:"纯色填充",value:"solid"},{label:"图片填充",value:"image"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),jk,"solid"===c.value.type?((0,i.wg)(),(0,i.j4)(rn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:c.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>f({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:c.value.color||"#fff"},null,8,["color"])])),_:1})):"image"===c.value.type?((0,i.wg)(),(0,i.j4)(op,{key:1,style:{flex:"1"},value:c.value.imageSize||"cover","onUpdate:value":t[2]||(t[2]=e=>f({imageSize:e})),options:[{label:"缩放",value:"contain"},{label:"拼贴",value:"repeat"},{label:"缩放铺满",value:"cover"}]},null,8,["value"])):((0,i.wg)(),(0,i.j4)(op,{key:2,style:{flex:"1"},value:c.value.gradientType||"","onUpdate:value":t[3]||(t[3]=e=>f({gradientType:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"image"===c.value.type?((0,i.wg)(),(0,i.iD)("div",Yk,[(0,i.Wm)(Oa,{onChange:t[4]||(t[4]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i._)("div",Vk,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundImage:`url(${c.value.image})`})},[(0,i.Wm)(a)],4)])])),_:1})])):(0,i.kq)("",!0),"gradient"===c.value.type?((0,i.wg)(),(0,i.iD)("div",Jk,[(0,i._)("div",qk,[Xk,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:c.value.gradientColor[0],"onUpdate:modelValue":t[5]||(t[5]=e=>f({gradientColor:[e,c.value.gradientColor[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:c.value.gradientColor[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Gk,[Kk,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:c.value.gradientColor[1],"onUpdate:modelValue":t[6]||(t[6]=e=>f({gradientColor:[c.value.gradientColor[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:c.value.gradientColor[1]},null,8,["color"])])),_:1})]),"linear"===c.value.gradientType?((0,i.wg)(),(0,i.iD)("div",Qk,[eb,(0,i.Wm)(Nm,{min:0,max:360,step:15,value:c.value.gradientRotate||0,"onUpdate:value":t[7]||(t[7]=e=>f({gradientRotate:e})),style:{width:"60%"}},null,8,["value"])])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",tb,[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用背景到全部")])),_:1})]),(0,i.Wm)(Dc),(0,i._)("div",lb,[ab,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(r),"onUpdate:value":t[9]||(t[9]=e=>x(e)),options:[{label:"宽屏 16 : 9",value:.5625},{label:"宽屏 16 : 10",value:.625},{label:"标准 4 : 3",value:.75},{label:"纸张 A3 / A4",value:.70710678}]},null,8,["value"])]),(0,i.Wm)(Dc),nb,(0,i._)("div",ob,[ib,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(u).fontName,"onUpdate:value":t[10]||(t[10]=e=>w({fontName:e})),options:[...(0,s.SU)(l),...(0,s.SU)(E)]},null,8,["value","options"])]),(0,i._)("div",sb,[rb,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).fontColor,"onUpdate:modelValue":t[11]||(t[11]=e=>w({fontColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(u).fontColor},null,8,["color"])])),_:1})]),(0,i._)("div",ub,[cb,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).backgroundColor,"onUpdate:modelValue":t[12]||(t[12]=e=>w({backgroundColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(u).backgroundColor},null,8,["color"])])),_:1})]),(0,i._)("div",db,[pb,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).themeColor,"onUpdate:modelValue":t[13]||(t[13]=e=>w({themeColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(u).themeColor},null,8,["color"])])),_:1})]),(0,i._)("div",vb,[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[14]||(t[14]=e=>(0,s.SU)(m)())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用主题到全部")])),_:1})]),(0,i.Wm)(Dc),mb,(0,i._)("div",hb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Ok),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"theme-item",key:t,style:(0,ae.j5)({backgroundColor:e.background,fontFamily:e.fontname})},[(0,i._)("div",fb,[(0,i._)("div",{class:"text",style:(0,ae.j5)({color:e.fontColor})},"文字 Aa",4),(0,i._)("div",gb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.colors,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"color-block",key:t,style:(0,ae.j5)({backgroundColor:e})},null,4)))),128))]),(0,i._)("div",yb,[(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(p)(e)},"应用",8,wb),(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(v)(e)},"应用全局",8,xb)])])],4)))),128))])])}}});const bb=(0,Nl.Z)(kb,[["__scopeId","data-v-475ddcb8"]]);var _b=bb;const Ib={class:"slide-animation-panel"},Sb={class:"animation-pool"},Cb=["onClick"],Lb={class:"animation-text"};var Eb=(0,i.aZ)({__name:"SlideAnimationPanel",setup(e){const t=F(),{slides:l,currentSlide:a}=(0,o.Jk)(t),n=(0,i.Fl)((()=>a.value.turningMode||"slideY")),r=gk,{addHistorySnapshot:u}=ra(),c=e=>{e!==n.value&&(t.updateSlide({turningMode:e}),u())},d=()=>{const e=l.value.map((e=>({...e,turningMode:a.value.turningMode})));t.setSlides(e),Kl.success("已应用到全部"),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ib,[(0,i._)("div",Sb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["animation-item",{active:n.value===e.value}]),key:e.label,onClick:t=>c(e.value)},[(0,i._)("div",{class:(0,ae.C_)(["animation-block",e.value])},null,2),(0,i._)("div",Lb,(0,ae.zw)(e.label),1)],10,Cb)))),128))]),(0,i.Wm)(Xd,{style:{width:"100%"},onClick:t[0]||(t[0]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用到全部")])),_:1})]))}});const Tb=(0,Nl.Z)(Eb,[["__scopeId","data-v-da618e26"]]);var Mb=Tb,Ub=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=o=>{const{minX:i,maxX:s,minY:r,maxY:u}=we(l.value),c=JSON.parse(JSON.stringify(a.value.elements)),d={};for(const e of l.value)if(e.groupId&&!d[e.groupId]){const t=l.value.filter((t=>t.groupId===e.groupId));d[e.groupId]=we(t)}if(o===K.LEFT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minX-i;e.left=e.left-l}else if("rotate"in e&&e.rotate){const{offsetX:t}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=i-t}else e.left=i}));else if(o===K.RIGHT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxX-s;e.left=e.left-l}else{const t="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;if("rotate"in e&&e.rotate){const{offsetX:l}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=s-t+l}else e.left=s-t}}));else if(o===K.TOP)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minY-r;e.top=e.top-l}else if("rotate"in e&&e.rotate){const{offsetY:t}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=r-t}else e.top=r}));else if(o===K.BOTTOM)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxY-u;e.top=e.top-l}else{const t="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;if("rotate"in e&&e.rotate){const{offsetY:l}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=u-t+l}else e.top=u-t}}));else if(o===K.HORIZONTAL){const e=(i+s)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxX+t.minX)/2,n=a-e;l.left=l.left-n}else{const t="line"===l.type?Math.max(l.start[0],l.end[0]):l.width;l.left=e-t/2}}))}else if(o===K.VERTICAL){const e=(r+u)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxY+t.minY)/2,n=a-e;l.top=l.top-n}else{const t="line"===l.type?Math.max(l.start[1],l.end[1]):l.height;l.top=e-t/2}}))}e.updateSlide({elements:c}),n()};return{alignActiveElement:i}},Wb=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),s=(0,i.Fl)((()=>{let e=0;const t=[];for(const a of l.value)a.groupId?t.includes(a.groupId)||(t.push(a.groupId),e+=1):e+=1;return e})),r=()=>{const{minX:o,maxX:i}=we(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minX:t,maxX:l}=ye(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minX:t,maxX:l}=we(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minX:t}=ye(e);h.push({pos:t,el:e})}for(let e=1;e{const{minY:o,maxY:i}=we(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minY:t,maxY:l}=ye(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minY:t,maxY:l}=we(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minY:t}=ye(e);h.push({pos:t,el:e})}for(let e=1;e{t.value?n(e):o(e)};return(e,n)=>{const o=(0,i.up)("IconAlignLeft"),p=(0,i.up)("IconAlignHorizontally"),v=(0,i.up)("IconAlignRight"),m=(0,i.up)("IconAlignTop"),h=(0,i.up)("IconAlignVertically"),f=(0,i.up)("IconAlignBottom"),g=(0,i.up)("IconGroup"),y=(0,i.up)("IconUngroup"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Db,[(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[0]||(n[0]=e=>d((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[1]||(n[1]=e=>d((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1})),[[w,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[2]||(n[2]=e=>d((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1})),[[w,"右对齐"]])])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[3]||(n[3]=e=>d((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1})),[[w,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[4]||(n[4]=e=>d((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(h)])),_:1})),[[w,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[5]||(n[5]=e=>d((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"下对齐"]])])),_:1}),(0,s.SU)(r)>2?((0,i.wg)(),(0,i.j4)(Vf,{key:0,class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:n[6]||(n[6]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Uk)("水平均匀分布")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:n[7]||(n[7]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Uk)("垂直均匀分布")])),_:1})])),_:1})):(0,i.kq)("",!0),(0,i.Wm)(Dc),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{disabled:!(0,s.SU)(t),onClick:n[8]||(n[8]=e=>(0,s.SU)(l)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g,{style:{"margin-right":"3px"}}),(0,i.Uk)("组合")])),_:1},8,["disabled"]),(0,i.Wm)(Xd,{disabled:(0,s.SU)(t),onClick:n[9]||(n[9]=e=>(0,s.SU)(a)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{style:{"margin-right":"3px"}}),(0,i.Uk)("取消组合")])),_:1},8,["disabled"])])),_:1})])}}});const Fb=(0,Nl.Z)(Hb,[["__scopeId","data-v-e95a4c6c"]]);var Ab=Fb;const Zb=[{key:"letter",label:"字母",children:["α","β","γ","δ","ϵ","ε","ζ","η","θ","ϑ","ι","κ","λ","μ","ν","ξ","π","ϖ","ρ","ϱ","σ","ς","τ","υ","ϕ","φ","χ","ψ","ω","Γ","Δ","Θ","Λ","Ξ","Π","Σ","Υ","Φ","Ψ","Ω","𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙","𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳","𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩","𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃"]},{key:"number",label:"序号",children:["①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","⑴","⑵","⑶","⑷","⑸","⑹","⑺","⑻","⑼","⑽","⑾","⑿","⒀","⒁","⒂","⒃","⒄","⒅","⒆","⒇","º","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","Ⅰ","Ⅱ","Ⅲ","Ⅳ","Ⅴ","Ⅵ","Ⅶ","Ⅷ","Ⅸ","Ⅹ","Ⅺ","Ⅻ","Ⅼ","Ⅽ","Ⅾ","Ⅿ","ⅰ","ⅱ","ⅲ","ⅳ","ⅴ","ⅵ","ⅶ","ⅷ","ⅸ","ⅹ","ⅺ","ⅻ","ⅼ","ⅽ","ⅾ","ⅿ","ↀ","ↁ","ↂ","㊀","㊁","㊂","㊃","㊄","㊅","㊆","㊇","㊈","㊉","㈠","㈡","㈢","㈣","㈤","㈥","㈦","㈧","㈨","㈩","𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"]},{key:"math",label:"数学",children:["+","-","×","÷","=","~","¬","±","%","°","ǃ","‰","‱","½","⅓","⅔","¼","¾","<",">","l","o","g","l","g","l","n","⨂","⨁","⨄","⨃","⨅","⨆","√","∛","∜","∝","∞","∟","∠","∡","∢","∧","∨","∩","∪","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","∼","∽","∾","∿","≃","≄","≅","≆","≇","≈","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≤","≥","≦","≧","≨","≩","≪","≫","≺","≻","≼","≽","≾","≿","⊀","⊁","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⊓","⊔","⊢","⊣","⊤","⊥","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⊲","⊳","⊴","⊵","⋀","⋁","⋂","⋃","⋉","⋊","⋋","⋌","⟨","⟩","⟪","⟫","⟮","⟯","⧼","⧽","⦰"]},{key:"arrow",label:"箭头",children:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},{key:"graph",label:"图形",children:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],$b={class:"symbol-panel"},Ob={class:"pool"},zb=["onClick"],Pb={class:"symbol"};var Rb=(0,i.aZ)({__name:"SymbolPanel",setup(e){const t=(0,s.iH)(Zb[0].key),l=(0,i.Fl)((()=>{const e=Zb.find((e=>e.key===t.value));return e?.children||[]})),a=Zb.map((e=>({key:e.key,label:e.label}))),n=e=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,o)=>((0,i.wg)(),(0,i.iD)("div",$b,[(0,i.Wm)(Vd,{tabs:(0,s.SU)(a),value:t.value,"onUpdate:value":o[0]||(o[0]=e=>t.value=e),tabsStyle:{marginBottom:"8px"},spaceBetween:""},null,8,["tabs","value"]),(0,i._)("div",Ob,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:t,onClick:t=>n(e)},[(0,i._)("div",Pb,(0,ae.zw)(e),1)],8,zb)))),128))])]))}});const Bb=(0,Nl.Z)(Rb,[["__scopeId","data-v-2bb5f257"]]);var Nb=Bb;const jb={class:"toolbar"},Yb={class:"content"};var Vb=(0,i.aZ)({__name:"index",setup(e){const t=$(),{activeElementIdList:l,handleElement:n,toolbarState:r}=(0,o.Jk)(t),u=(0,i.Fl)((()=>"text"===n.value?.type?[{label:"样式",key:a.EL_STYLE},{label:"符号",key:a.SYMBOL},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}]:[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}])),c=[{label:"设计",key:a.SLIDE_DESIGN},{label:"切换",key:a.SLIDE_ANIMATION},{label:"动画",key:a.EL_ANIMATION}],d=[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.MULTI_POSITION}],p=e=>{t.setToolbarState(e)},v=(0,i.Fl)((()=>l.value.length?l.value.length>1?d:u.value:c));(0,i.YP)(v,(()=>{const e=v.value.map((e=>e.key));e.includes(r.value)||t.setToolbarState(e[0])}));const m=(0,i.Fl)((()=>{const e={[a.EL_STYLE]:Gx,[a.EL_POSITION]:ck,[a.EL_ANIMATION]:$k,[a.SLIDE_DESIGN]:_b,[a.SLIDE_ANIMATION]:Mb,[a.MULTI_POSITION]:Ab,[a.SYMBOL]:Nb};return e[r.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",jb,[(0,i.Wm)(Vd,{tabs:v.value,value:(0,s.SU)(r),card:"","onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["tabs","value"]),(0,i._)("div",Yb,[((0,i.wg)(),(0,i.j4)((0,i.LL)(m.value)))])]))}});const Jb=(0,Nl.Z)(Vb,[["__scopeId","data-v-6c9ece83"]]);var qb=Jb;const Xb={class:"remark"},Gb=["value"];var Kb=(0,i.aZ)({__name:"index",props:{height:{}},emits:["update:height"],setup(e,{emit:t}){const l=e,a=F(),{currentSlide:n}=(0,o.Jk)(a),s=(0,i.Fl)((()=>n.value?.remark||"")),r=e=>{const t=e.target.value;a.updateSlide({remark:t})},u=e=>{let a=!0;const n=e.pageY,o=l.height;document.onmousemove=e=>{if(!a)return;const l=e.pageY,i=l-n;let s=-i+o;s<40&&(s=40),s>360&&(s=360),t("update:height",s)},document.onmouseup=()=>{a=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Xb,[(0,i._)("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>u(e))},null,32),(0,i._)("textarea",{value:s.value,placeholder:"点击输入演讲者备注",onInput:t[1]||(t[1]=e=>r(e))},null,40,Gb)]))}});const Qb=(0,Nl.Z)(Kb,[["__scopeId","data-v-d996ff36"]]);var e_=Qb,t_=l(3162),l_=l(3907);const a_=["style","script","template"],n_=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],o_={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},i_=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],s_=(e,t)=>{const l=t-e.position;r_(e,l)},r_=(e,t)=>{e.position=e.position+t},u_=(e,t)=>{const l=!1;while(!l){const l=e.indexOf("<",t);if(-1===l)return l;const a=e.charAt(l+1);if("/"===a||"!"===a||/[A-Za-z0-9]/.test(a))return l;t=l+1}return-1},c_=e=>{const{str:t}=e;let l=u_(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const a=t.slice(e.position,l);s_(e,l),e.tokens.push({type:"text",content:a})},d_=e=>{const{str:t}=e;r_(e,4);let l=t.indexOf("--\x3e",e.position),a=l+3;-1===l&&(l=a=t.length);const n=t.slice(e.position,l);s_(e,a),e.tokens.push({type:"comment",content:n})},p_=e=>{const{str:t}=e,l=t.length;let a=e.position;while(a"===e);if(l)break;a++}let n=a+1;while(n"===e);if(!l)break;n++}s_(e,n);const o=t.slice(a,n);return e.tokens.push({type:"tag",content:o}),o},v_=e=>{const{str:t,tokens:l}=e;let a=e.position,n=null,o=a;const i=[],s=t.length;while(a"===e;if(l){a!==o&&i.push(t.slice(o,a));break}const s=/\s/.test(e);if(s){a!==o&&i.push(t.slice(o,a)),o=a+1,a++;continue}const r="'"===e||'"'===e;r?(n=e,a++):a++}s_(e,a);const r="attribute";for(let u=0;u1){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=i[u+2];if(u+=1,a){const t=e+"="+a;l.push({type:r,content:t}),u+=1;continue}}}if((0,U.endsWith)(e,"=")){const t=i[u+1];if(t&&-1===t.indexOf("=")){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=e.slice(0,-1);l.push({type:r,content:a})}else l.push({type:r,content:e})}},m_=(e,t)=>{const{str:l,tokens:a}=t,n=e.toLowerCase(),o=l.length;let i=t.position;while(i{const{str:t}=e,l=t.charAt(e.position+1),a="/"===l;r_(e,a?2:1),e.tokens.push({type:"tag-start",close:a});const n=p_(e);v_(e);const o=t.charAt(e.position),i="/"===o;return r_(e,i?2:1),e.tokens.push({type:"tag-end",close:i}),n},f_=e=>{const t=e.str,l=t.length;while(e.position{const t={str:e,position:0,tokens:[]};return f_(t),t.tokens},y_=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return k_(l),t.children},w_=(e,t)=>{const l=o_[e];if(l){let a=t.length-1;while(a>=0){const n=t[a].tagName;if(n===e)break;if(n&&l.includes(n))return!0;a--}}return!1},x_=(e,t)=>{e.splice(t)},k_=e=>{const{stack:t,tokens:l}=e;let{cursor:a}=e,n=t[t.length-1].children;const o=l.length;while(a-1)if(t[e].tagName===s){n=!0;break}while(a0){if(s===t[e].tagName){x_(t,e);const l=e-1;n=t[l].children;break}e-=1}}const c=[];let d;while(a{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},__=e=>{const t=e.charAt(0),l=e.length-1,a='"'===t||"'"===t;return a&&t===e.charAt(l)?e.slice(1,l):e},I_=e=>e.map((e=>{const t=b_(e.trim(),"="),l=t[0],a="string"===typeof t[1]?__(t[1]):null;return{key:l,value:a}})),S_=e=>e.map((e=>{if("element"===e.type){const t=S_(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:I_(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t})),C_=e=>{const t=g_(e),l=y_(t);return S_(l)};var L_=l(5851),E_=l(7943);const T_={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},M_=e=>{const t=new L_.OU(e),l=[];for(const a of t.commands){const e=T_[a.type];if(2!==a.type&&16!==a.type||l.push({x:a.x,y:a.y,relative:a.relative,type:e}),32===a.type)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:a.relative,type:e});else if(128===a.type)l.push({x:a.x,y:a.y,curve:{type:"quadratic",x1:a.x1,y1:a.y1},relative:a.relative,type:e});else if(512===a.type){const e=l[l.length-1];if(!["M","L","Q","C"].includes(e.type))continue;const t=(0,E_.Z)({px:e.x,py:e.y,cx:a.x,cy:a.y,rx:a.rX,ry:a.rY,xAxisRotation:a.xRot,largeArcFlag:a.lArcFlag,sweepFlag:a.sweepFlag});for(const a of t)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:!1,type:"C"})}else{if(1!==a.type)continue;l.push({close:!0,type:e})}}return l},U_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",W_="data:image/svg+xml;base64,",D_=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let l=0;l127&&a<2048?(t+=String.fromCharCode(a>>6|192),t+=String.fromCharCode(63&a|128)):(t+=String.fromCharCode(a>>12|224),t+=String.fromCharCode(a>>6&63|128),t+=String.fromCharCode(63&a|128))}return t},H_=e=>{let t,l,a,n,o,i,s,r="",u=0;e=D_(e);while(u>2,o=(3&t)<<4|l>>4,i=(15&l)<<2|a>>6,s=63&a,isNaN(l)?i=s=64:isNaN(a)&&(s=64),r=r+U_.charAt(n)+U_.charAt(o)+U_.charAt(i)+U_.charAt(s);return r},F_=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return W_+H_(l)},A_=100,Z_=.75;var $_=()=>{const e=F(),{slides:t,theme:l,viewportRatio:a,title:n}=(0,o.Jk)(e),i=(0,s.iH)(!1),r=(e,t,l,a=!0)=>{i.value=!0;const o="png"===t?lh.YM:lh.hi,s=e.querySelectorAll("foreignObject [xmlns]");s.forEach((e=>e.removeAttribute("xmlns"))),setTimeout((()=>{const s={quality:l,width:1600};a&&(s.fontEmbedCSS=""),o(e,s).then((e=>{i.value=!1,(0,t_.saveAs)(e,`${n.value}.${t}`)})).catch((()=>{i.value=!1,Kl.error("导出图片失败")}))}),200)},u=e=>{const t=new Blob([ce(JSON.stringify(e))],{type:""});(0,t_.saveAs)(t,`${n.value}.pptist`)},c=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});(0,t_.saveAs)(e,`${n.value}.json`)},d=e=>{const t=(0,M.Z)(e),l=t.getAlpha(),a=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:a}},p=e=>{const t=C_(e);let l=!1,a=0;const n=[],o=(e,t={})=>{for(const i of e){const e="tagName"in i&&["div","li","p"].includes(i.tagName);if(e&&n.length){const e=n[n.length-1];e.options||(e.options={}),e.options.breakLine=!0}const s={...t},r="attributes"in i?i.attributes.find((e=>"style"===e.key)):null;if(r&&r.value){const e=r.value.split(";");for(const t of e){const[e,l]=t.split(": "),[a,n]=[(0,U.trim)(e),(0,U.trim)(l)];a&&n&&(s[a]=n)}}if("tagName"in i){if("em"===i.tagName&&(s["font-style"]="italic"),"strong"===i.tagName&&(s["font-weight"]="bold"),"sup"===i.tagName&&(s["vertical-align"]="super"),"sub"===i.tagName&&(s["vertical-align"]="sub"),"a"===i.tagName){const e=i.attributes.find((e=>"href"===e.key));s["href"]=e?.value||""}if("ul"===i.tagName&&(s["list-type"]="ul"),"ol"===i.tagName&&(s["list-type"]="ol"),"li"===i.tagName&&(l=!0),"p"===i.tagName&&"attributes"in i){const e=i.attributes.find((e=>"data-indent"===e.key));e&&e.value&&(a=+e.value)}}if("tagName"in i&&"br"===i.tagName)n.push({text:"",options:{breakLine:!0}});else if("content"in i){const e=i.content.replace(/ /g," ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,""),t={};s["font-size"]&&(t.fontSize=parseInt(s["font-size"])*Z_),s["color"]&&(t.color=d(s["color"]).color),s["background-color"]&&(t.highlight=d(s["background-color"]).color),s["text-decoration-line"]&&(-1!==s["text-decoration-line"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration-line"].indexOf("line-through")&&(t.strike="sngStrike")),s["text-decoration"]&&(-1!==s["text-decoration"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration"].indexOf("line-through")&&(t.strike="sngStrike")),s["vertical-align"]&&("super"===s["vertical-align"]&&(t.superscript=!0),"sub"===s["vertical-align"]&&(t.subscript=!0)),s["text-align"]&&(t.align=s["text-align"]),s["font-weight"]&&(t.bold="bold"===s["font-weight"]),s["font-style"]&&(t.italic="italic"===s["font-style"]),s["font-family"]&&(t.fontFace=s["font-family"]),s["href"]&&(t.hyperlink={url:s["href"]}),l&&"ol"===s["list-type"]&&(t.bullet={type:"number",indent:20*Z_},t.paraSpaceBefore=.1,l=!1),l&&"ul"===s["list-type"]&&(t.bullet={indent:20*Z_},t.paraSpaceBefore=.1,l=!1),a&&(t.indentLevel=a,a=0),n.push({text:e,options:t})}else"children"in i&&o(i.children,s)}};return o(t),n},v=(e,t={x:1,y:1})=>e.map((e=>{if(void 0!==e.close)return{close:!0};if("M"===e.type)return{x:e.x/A_*t.x,y:e.y/A_*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/A_*t.x,y:e.y/A_*t.y,curve:{type:"cubic",x1:e.curve.x1/A_*t.x,y1:e.curve.y1/A_*t.y,x2:e.curve.x2/A_*t.x,y2:e.curve.y2/A_*t.y}};if("quadratic"===e.curve.type)return{x:e.x/A_*t.x,y:e.y/A_*t.y,curve:{type:"quadratic",x1:e.curve.x1/A_*t.x,y1:e.curve.y1/A_*t.y}}}return{x:e.x/A_*t.x,y:e.y/A_*t.y}})),m=e=>{const t=d(e.color),{h:l,v:a}=e;let n=4,o=45;return 0===l&&0===a?(n=4,o=45):0===l?a>0?(n=a,o=90):(n=-a,o=270):0===a?l>0?(n=l,o=1):(n=-l,o=180):l>0&&a>0?(n=Math.max(l,a),o=45):l>0&&a<0?(n=Math.max(l,-a),o=315):l<0&&a>0?(n=Math.max(-l,a),o=135):l<0&&a<0&&(n=Math.max(-l,-a),o=225),{type:"outer",color:t.color.replace("#",""),opacity:t.alpha,blur:e.blur*Z_,offset:n,angle:o}},h=e=>{const t=d(e?.color||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:(e.width||1)*Z_,dashType:"solid"===e.style?"solid":"dash"}},f=e=>{const{type:l,target:a}=e;if("web"===l)return{url:a};if("slide"===l){const e=t.value.findIndex((e=>e.id===a));if(-1!==e)return{slide:e+1}}return null},g=(e,t,o)=>{i.value=!0;const s=new l_.Z;if(.625===a.value?s.layout="LAYOUT_16x10":.75===a.value?s.layout="LAYOUT_4x3":.70710678===a.value?(s.defineLayout({name:"A3",width:10,height:7.0710678}),s.layout="A3"):s.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=d(l.value.backgroundColor);s.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=s.addSlide();if(l.background){const t=l.background;if("image"===t.type&&t.image)e.background={data:t.image};else if("solid"===t.type&&t.color){const l=d(t.color);e.background={color:l.color,transparency:100*(1-l.alpha)}}else if("gradient"===t.type&&t.gradientColor){const[l,a]=t.gradientColor,n=M.Z.mix(l,a).toHexString(),o=d(n);e.background={color:o.color,transparency:100*(1-o.alpha)}}}if(l.remark&&e.addNotes(l.remark),l.elements)for(const t of l.elements)if("text"===t.type){const l=p(t.content),a={x:t.left/A_,y:t.top/A_,w:t.width/A_,h:t.height/A_,fontSize:20*Z_,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10*Z_,paraSpaceBefore:5*Z_,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(a.rotate=t.rotate),t.wordSpace&&(a.charSpacing=t.wordSpace*Z_),t.lineHeight&&(a.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=d(t.fill),l=void 0===t.opacity?1:t.opacity;a.fill={color:e.color,transparency:100*(1-e.alpha*l)}}t.defaultColor&&(a.color=d(t.defaultColor).color),t.defaultFontName&&(a.fontFace=t.defaultFontName),t.shadow&&(a.shadow=m(t.shadow)),t.outline?.width&&(a.line=h(t.outline)),void 0!==t.opacity&&(a.transparency=100*(1-t.opacity)),void 0!==t.paragraphSpace&&(a.paraSpaceBefore=t.paragraphSpace*Z_),t.vertical&&(a.vert="eaVert"),e.addText(l,a)}else if("image"===t.type){const l={path:t.src,x:t.left/A_,y:t.top/A_,w:t.width/A_,h:t.height/A_};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=f(t.link);e&&(l.hyperlink=e)}if(t.filters?.opacity&&(l.transparency=100-parseInt(t.filters?.opacity)),t.clip){"ellipse"===t.clip.shape&&(l.rounding=!0);const[e,a]=t.clip.range,[n,o]=e,[i,s]=a,r=t.width/((i-n)/A_),u=t.height/((s-o)/A_);l.w=r/A_,l.h=u/A_,l.sizing={type:"crop",x:n/A_*r/A_,y:o/A_*u/A_,w:(i-n)/A_*r/A_,h:(s-o)/A_*u/A_}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=F_(l),n={data:a,x:t.left/A_,y:t.top/A_,w:t.width/A_,h:t.height/A_};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else{const l={x:t.width/t.viewBox[0],y:t.height/t.viewBox[1]},a=v(M_(t.path),l),n=d(t.fill),o=void 0===t.opacity?1:t.opacity,i={x:t.left/A_,y:t.top/A_,w:t.width/A_,h:t.height/A_,fill:{color:n.color,transparency:100*(1-n.alpha*o)},points:a};if(t.flipH&&(i.flipH=t.flipH),t.flipV&&(i.flipV=t.flipV),t.shadow&&(i.shadow=m(t.shadow)),t.outline?.width&&(i.line=h(t.outline)),t.rotate&&(i.rotate=t.rotate),t.link){const e=f(t.link);e&&(i.hyperlink=e)}e.addShape("custGeom",i)}if(t.text){const l=p(t.text.content),a={x:t.left/A_,y:t.top/A_,w:t.width/A_,h:t.height/A_,fontSize:20*Z_,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5*Z_,valign:t.text.align};t.rotate&&(a.rotate=t.rotate),t.text.defaultColor&&(a.color=d(t.text.defaultColor).color),t.text.defaultFontName&&(a.fontFace=t.text.defaultFontName),e.addText(l,a)}}else if("line"===t.type){const l=Ie(t),a=v(M_(l)),{minX:n,maxX:o,minY:i,maxY:s}=ye(t),r=d(t.color),u={x:t.left/A_,y:t.top/A_,w:(o-n)/A_,h:(s-i)/A_,line:{color:r.color,transparency:100*(1-r.alpha),width:t.width*Z_,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:a};t.shadow&&(u.shadow=m(t.shadow)),e.addShape("custGeom",u)}else if("chart"===t.type){const l=[];for(let e=0;ed(e).color));else if(1===t.themeColor.length)a=(0,M.Z)(t.themeColor[0]).analogous(10).map((e=>d(e.toHexString()).color));else{const e=t.themeColor.length,l=(0,M.Z)(t.themeColor[e-1]).analogous(11-e).map((e=>e.toHexString()));a=[...t.themeColor.slice(0,e-1),...l].map((e=>d(e).color))}const n={x:t.left/A_,y:t.top/A_,w:t.width/A_,h:t.height/A_,chartColors:"pie"===t.chartType?a:a.slice(0,t.data.series.length)};t.fill&&(n.plotArea={fill:{color:d(t.fill).color}}),t.legend&&(n.showLegend=!0,n.legendPos="top"===t.legend?"t":"b",n.legendColor=d(t.gridColor||"#000000").color,n.legendFontSize=14*Z_);let o=s.ChartType.bar;"bar"===t.chartType?(o=s.ChartType.bar,n.barDir=t.options?.horizontalBars?"bar":"col"):"line"===t.chartType?(t.options?.showArea?o=s.ChartType.area:!1===t.options?.showLine?(o=s.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map(((e,t)=>t))}),n.lineSize=0):o=s.ChartType.line,t.options?.lineSmooth&&(n.lineSmooth=!0)):"pie"===t.chartType&&(t.options?.donut?(o=s.ChartType.doughnut,n.holeSize=75):o=s.ChartType.pie),e.addChart(o,l,n)}else if("table"===t.type){const l=[];for(let e=0;e1||n.rowspan>1)for(let a=e;ad(e))));for(let e=0;et.width*e/A_))};t.theme&&(s.fill={color:"#ffffff"}),t.outline.width&&t.outline.color&&(s.border={type:"solid"===t.outline.style?"solid":"dash",pt:t.outline.width*Z_,color:d(t.outline.color).color}),e.addTable(a,s)}else if("latex"===t.type){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=F_(l),n={data:a,x:t.left/A_,y:t.top/A_,w:t.width/A_,h:t.height/A_};if(t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else if(!o&&("video"===t.type||"audio"===t.type)){const l={x:t.left/A_,y:t.top/A_,w:t.width/A_,h:t.height/A_,path:t.src,type:t.type};"video"===t.type&&t.poster&&(l.cover=t.poster);const a=t.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);a&&a[1]?l.extn=a[1]:t.ext&&(l.extn=t.ext);const n=["avi","mp4","m4v","mov","wmv"],o=["mp3","m4a","mp4","wav","wma"];l.extn&&[...n,...o].includes(l.extn)&&e.addMedia(l)}}setTimeout((()=>{s.writeFile({fileName:`${n.value}.pptx`}).then((()=>i.value=!1)).catch((()=>{i.value=!1,Kl.error("导出失败")}))}),200)};return{exporting:i,exportImage:r,exportJSON:c,exportSpecificFile:u,exportPPTX:g}};const O_=e=>((0,i.dD)("data-v-1df3f398"),e=e(),(0,i.Cn)(),e),z_={class:"export-img-dialog"},P_={class:"thumbnails-view"},R_={class:"configs"},B_={class:"row"},N_=O_((()=>(0,i._)("div",{class:"title"},"导出格式:",-1))),j_={class:"row"},Y_=O_((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),V_={key:0,class:"row"},J_=["data-range"],q_={class:"row"},X_=O_((()=>(0,i._)("div",{class:"title"},"图片质量:",-1))),G_={class:"row"},K_=O_((()=>(0,i._)("div",{class:"title"},"忽略在线字体:",-1))),Q_={class:"config-item"},eI={class:"btns"};var tI=(0,i.aZ)({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),n=(0,s.iH)(),r=(0,s.iH)("all"),u=(0,s.iH)([1,l.value.length]),c=(0,s.iH)("jpeg"),d=(0,s.iH)(1),p=(0,s.iH)(!0),v=(0,i.Fl)((()=>"all"===r.value?l.value:"current"===r.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=u.value;return t>=l-1&&t<=a-1})))),{exportImage:m,exporting:h}=$_(),f=()=>{n.value&&m(n.value,c.value,d.value,p.value)};return(e,a)=>{const o=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",z_,[(0,i._)("div",P_,[(0,i._)("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:n},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,(e=>((0,i.wg)(),(0,i.j4)(Bd,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"])))),128))],512)]),(0,i._)("div",R_,[(0,i._)("div",B_,[N_,(0,i.Wm)(Qf,{class:"config-item",value:c.value,"onUpdate:value":a[0]||(a[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Xf,{style:{width:"50%"},value:"jpeg"},{default:(0,i.w5)((()=>[(0,i.Uk)("JPEG")])),_:1}),(0,i.Wm)(Xf,{style:{width:"50%"},value:"png"},{default:(0,i.w5)((()=>[(0,i.Uk)("PNG")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",j_,[Y_,(0,i.Wm)(Qf,{class:"config-item",value:r.value,"onUpdate:value":a[1]||(a[1]=e=>r.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===r.value?((0,i.wg)(),(0,i.iD)("div",V_,[(0,i._)("div",{class:"title","data-range":`(${u.value[0]} ~ ${u.value[1]})`},"自定义范围:",8,J_),(0,i.Wm)(Nm,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:u.value,"onUpdate:value":a[2]||(a[2]=e=>u.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",q_,[X_,(0,i.Wm)(Nm,{class:"config-item",min:0,max:1,step:.1,value:d.value,"onUpdate:value":a[3]||(a[3]=e=>d.value=e)},null,8,["value"])]),(0,i._)("div",G_,[K_,(0,i._)("div",Q_,[(0,i.wy)((0,i.Wm)(sf,{value:p.value,"onUpdate:value":a[4]||(a[4]=e=>p.value=e)},null,8,["value"]),[[o,"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"]])])])]),(0,i._)("div",eI,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:a[5]||(a[5]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出图片")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:a[6]||(a[6]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Va,{loading:(0,s.SU)(h),tip:"正在导出..."},null,8,["loading"])])}}});const lI=(0,Nl.Z)(tI,[["__scopeId","data-v-1df3f398"]]);var aI=lI;const nI={class:"export-json-dialog"},oI={class:"preview"},iI={class:"btns"};var sI=(0,i.aZ)({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const{slides:l}=(0,o.Jk)(F()),{exportJSON:a}=$_();return(e,n)=>((0,i.wg)(),(0,i.iD)("div",nI,[(0,i._)("div",oI,[(0,i._)("pre",null,(0,ae.zw)((0,s.SU)(l)),1)]),(0,i._)("div",iI,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:n[0]||(n[0]=e=>(0,s.SU)(a)())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 JSON")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:n[1]||(n[1]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const rI=(0,Nl.Z)(sI,[["__scopeId","data-v-6a7223ca"]]);var uI=rI;const cI=()=>{const e=document.createElement("iframe");return e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.border="0",document.body.appendChild(e),e},dI=(e,t,l)=>{const a="";let n="";const o=document.styleSheets;if(o)for(const d of o)if(d.cssRules)for(const e of d.cssRules)n+=e.cssText;const{width:i,height:s,margin:r}=l,u=`\n \n \n \n `,c=""+t.innerHTML+"";e.open(),e.write(`\n ${a}\n \n ${u}\n ${c}\n \n `),e.close()},pI=(e,t)=>{const l=cI(),a=l.contentWindow;if(!l.contentDocument||!a)return;dI(l.contentDocument,e,t);const n=()=>{a.focus(),a.print()},o=()=>{l.removeEventListener("load",n),a.removeEventListener("afterprint",o),document.body.removeChild(l)};l.addEventListener("load",n),a.addEventListener("afterprint",o)},vI=e=>((0,i.dD)("data-v-1668f898"),e=e(),(0,i.Cn)(),e),mI={class:"export-pdf-dialog"},hI={class:"thumbnails-view"},fI={class:"configs"},gI={class:"row"},yI=vI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),wI={class:"row"},xI=vI((()=>(0,i._)("div",{class:"title"},"每页数量:",-1))),kI={class:"row"},bI=vI((()=>(0,i._)("div",{class:"title"},"边缘留白:",-1))),_I={class:"config-item"},II=vI((()=>(0,i._)("div",{class:"tip"}," 提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1))),SI={class:"btns"};var CI=(0,i.aZ)({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a,viewportRatio:n}=(0,o.Jk)(F()),r=(0,s.iH)(),u=(0,s.iH)("all"),c=(0,s.iH)(1),d=(0,s.iH)(!0),p=()=>{if(!r.value)return;const e={width:1600,height:"all"===u.value?1600*n.value*c.value:1600*n.value,margin:d.value?50:0};pI(r.value,e)};return(e,n)=>((0,i.wg)(),(0,i.iD)("div",mI,[(0,i._)("div",hI,[(0,i._)("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:r},["current"===u.value?((0,i.wg)(),(0,i.j4)(Bd,{key:0,class:"thumbnail",slide:(0,s.SU)(a),size:1600},null,8,["slide"])):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.j4)(Bd,{class:(0,ae.C_)(["thumbnail",{"break-page":(t+1)%c.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"])))),128))],512)]),(0,i._)("div",fI,[(0,i._)("div",gI,[yI,(0,i.Wm)(Qf,{class:"config-item",value:u.value,"onUpdate:value":n[0]||(n[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Xf,{style:{width:"50%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Xf,{style:{width:"50%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",wI,[xI,(0,i.Wm)(op,{class:"config-item",value:c.value,"onUpdate:value":n[1]||(n[1]=e=>c.value=e),options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}]},null,8,["value"])]),(0,i._)("div",kI,[bI,(0,i._)("div",_I,[(0,i.Wm)(sf,{value:d.value,"onUpdate:value":n[2]||(n[2]=e=>d.value=e)},null,8,["value"])])]),II]),(0,i._)("div",SI,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:n[3]||(n[3]=e=>p())},{default:(0,i.w5)((()=>[(0,i.Uk)("打印 / 导出 PDF")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:n[4]||(n[4]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const LI=(0,Nl.Z)(CI,[["__scopeId","data-v-1668f898"]]);var EI=LI;const TI=e=>((0,i.dD)("data-v-265d4b60"),e=e(),(0,i.Cn)(),e),MI={class:"export-pptx-dialog"},UI={class:"configs"},WI={class:"row"},DI=TI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),HI={key:0,class:"row"},FI=["data-range"],AI={class:"row"},ZI=TI((()=>(0,i._)("div",{class:"title"},"忽略音频/视频:",-1))),$I={class:"config-item"},OI={class:"row"},zI=TI((()=>(0,i._)("div",{class:"title"},"覆盖默认母版:",-1))),PI={class:"config-item"},RI={key:1,class:"tip"},BI={class:"btns"};var NI=(0,i.aZ)({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),{exportPPTX:n,exporting:r}=$_(),u=(0,s.iH)("all"),c=(0,s.iH)([1,l.value.length]),d=(0,s.iH)(!0),p=(0,s.iH)(!0),v=(0,i.Fl)((()=>"all"===u.value?l.value:"current"===u.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1}))));return(e,a)=>{const o=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",MI,[(0,i._)("div",UI,[(0,i._)("div",WI,[DI,(0,i.Wm)(Qf,{class:"config-item",value:u.value,"onUpdate:value":a[0]||(a[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",HI,[(0,i._)("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},"自定义范围:",8,FI),(0,i.Wm)(Nm,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:c.value,"onUpdate:value":a[1]||(a[1]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",AI,[ZI,(0,i._)("div",$I,[(0,i.wy)((0,i.Wm)(sf,{value:p.value,"onUpdate:value":a[2]||(a[2]=e=>p.value=e)},null,8,["value"]),[[o,"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。"]])])]),(0,i._)("div",OI,[zI,(0,i._)("div",PI,[(0,i.Wm)(sf,{value:d.value,"onUpdate:value":a[3]||(a[3]=e=>d.value=e)},null,8,["value"])])]),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",RI," 提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。 "))]),(0,i._)("div",BI,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:a[4]||(a[4]=e=>(0,s.SU)(n)(v.value,d.value,p.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 PPTX")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:a[5]||(a[5]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Va,{loading:(0,s.SU)(r),tip:"正在导出..."},null,8,["loading"])])}}});const jI=(0,Nl.Z)(NI,[["__scopeId","data-v-265d4b60"]]);var YI=jI;const VI=e=>((0,i.dD)("data-v-26422ed7"),e=e(),(0,i.Cn)(),e),JI={class:"export-pptist-dialog"},qI={class:"configs"},XI={class:"row"},GI=VI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),KI={key:0,class:"row"},QI=["data-range"],eS=VI((()=>(0,i._)("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1))),tS={class:"btns"};var lS=(0,i.aZ)({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),{exportSpecificFile:n}=$_(),r=(0,s.iH)("all"),u=(0,s.iH)([1,l.value.length]),c=(0,i.Fl)((()=>"all"===r.value?l.value:"current"===r.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=u.value;return t>=l-1&&t<=a-1}))));return(e,a)=>((0,i.wg)(),(0,i.iD)("div",JI,[(0,i._)("div",qI,[(0,i._)("div",XI,[GI,(0,i.Wm)(Qf,{class:"config-item",value:r.value,"onUpdate:value":a[0]||(a[0]=e=>r.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Xf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===r.value?((0,i.wg)(),(0,i.iD)("div",KI,[(0,i._)("div",{class:"title","data-range":`(${u.value[0]} ~ ${u.value[1]})`},"自定义范围:",8,QI),(0,i.Wm)(Nm,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:u.value,"onUpdate:value":a[1]||(a[1]=e=>u.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),eS]),(0,i._)("div",tS,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:a[2]||(a[2]=e=>(0,s.SU)(n)(c.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 .pptist 文件")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:a[3]||(a[3]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const aS=(0,Nl.Z)(lS,[["__scopeId","data-v-26422ed7"]]);var nS=aS;const oS={class:"export-dialog"},iS={class:"content"};var sS=(0,i.aZ)({__name:"index",setup(e){const t=$(),{dialogForExport:l}=(0,o.Jk)(t),a=t.setDialogForExport,n=[{key:"pptist",label:"导出 pptist 文件"},{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],r=(0,i.Fl)((()=>{const e={image:aI,json:uI,pdf:EI,pptx:YI,pptist:nS};return l.value&&e[l.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",oS,[(0,i.Wm)(Vd,{tabs:n,value:(0,s.SU)(l),card:"","onUpdate:value":t[0]||(t[0]=e=>(0,s.SU)(a)(e))},null,8,["value"]),(0,i._)("div",iS,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value),{onClose:t[1]||(t[1]=e=>(0,s.SU)(a)(""))},null,32))])]))}});const rS=(0,Nl.Z)(sS,[["__scopeId","data-v-b20137f0"]]);var uS=rS;const cS={class:"title"},dS={class:"content"};var pS=(0,i.aZ)({__name:"MoveablePanel",props:{width:{},height:{},left:{default:10},top:{default:10},title:{default:""},moveable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),n=(0,s.iH)(0),o=(0,s.iH)(),r=(0,i.Fl)((()=>l.height?l.height:o.value?.clientHeight||0));(0,i.bv)((()=>{l.left>=0?a.value=l.left:a.value=document.body.clientWidth+l.left-l.width,l.top>=0?n.value=l.top:n.value=document.body.clientHeight+l.top-r.value}));const u=e=>{if(!l.moveable)return;let t=!0;const o=document.body.clientWidth,i=document.body.clientHeight,s=e.pageX,u=e.pageY,c=a.value,d=n.value;document.onmousemove=e=>{if(!t)return;const p=e.pageX-s,v=e.pageY-u;let m=c+p,h=d+v;m<0&&(m=0),h<0&&(h=0),m+l.width>o&&(m=o-l.width),h+r.value>i&&(h=i-r.value),a.value=m,n.value=h},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,l)=>{const s=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.iD)("div",{class:"moveable-panel",ref_key:"moveablePanelRef",ref:o,style:(0,ae.j5)({width:e.width+"px",height:e.height?e.height+"px":"auto",left:a.value+"px",top:n.value+"px"})},[e.title?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"header",onMousedown:l[1]||(l[1]=e=>u(e))},[(0,i._)("div",cS,(0,ae.zw)(e.title),1),(0,i._)("div",{class:"close-btn",onClick:l[0]||(l[0]=e=>t("close"))},[(0,i.Wm)(s)])],32),(0,i._)("div",dS,[(0,i.WI)(e.$slots,"default")])],64)):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"content",onMousedown:l[2]||(l[2]=e=>u(e))},[(0,i.WI)(e.$slots,"default")],32))],4)}}});const vS=(0,Nl.Z)(pS,[["__scopeId","data-v-fc791e00"]]);var mS=vS;const hS=e=>((0,i.dD)("data-v-15470598"),e=e(),(0,i.Cn)(),e),fS={key:0,class:"handler"},gS={class:"btns"},yS={key:0,class:"icon-btns"},wS={class:"element-list"},xS={key:0,class:"group-els"},kS=hS((()=>(0,i._)("div",{class:"group-title"},"组合",-1))),bS=["onClick","onDblclick"],_S=["id","value","onBlur","onKeydown"],IS={key:1,class:"name"},SS={class:"icons"},CS=["onClick","onDblclick"],LS=["id","value","onBlur","onKeydown"],ES={key:1,class:"name"},TS={class:"icons"};var MS=(0,i.aZ)({__name:"SelectPanel",setup(e){const t=F(),l=$(),{currentSlide:a}=(0,o.Jk)(t),{handleElement:r,handleElementId:u,activeElementIdList:c,activeGroupElementId:d,hiddenElementIdList:p}=(0,o.Jk)(l),{orderElement:v}=wa(),m=(0,i.Fl)((()=>{const e=[];for(const t of a.value.elements)if(t.groupId){const l=e[e.length-1];l&&"group"===l.type&&l.id&&l.id===t.groupId?l.elements.push(t):e.push({type:"group",id:t.groupId,elements:[t]})}else e.push(t);return e})),h=(e,t)=>{if(u.value===t)return;if(p.value.includes(t))return;const a=e.elements.map((e=>e.id));l.setActiveElementIdList(a),l.setHandleElementId(t),(0,i.Y3)((()=>l.setActiveGroupElementId(t)))},f=e=>{u.value!==e&&(p.value.includes(e)||l.setActiveElementIdList([e]))},g=e=>{p.value.includes(e)?l.setHiddenElementIdList(p.value.filter((t=>t!==e))):l.setHiddenElementIdList([...p.value,e]),c.value.includes(e)&&l.setActiveElementIdList([])},y=()=>{const e=a.value.elements.map((e=>e.id)),t=p.value.filter((t=>!e.includes(t)));l.setHiddenElementIdList(t)},w=()=>{const e=a.value.elements.map((e=>e.id));l.setHiddenElementIdList([...p.value,...e]),c.value.length&&l.setActiveElementIdList([])},x=(0,s.iH)(""),k=(e,l)=>{const a=e.target.value;t.updateElement({id:l,props:{name:a}}),x.value=""},b=e=>{x.value=e,(0,i.Y3)((()=>{const t=document.querySelector(`#input-${e}`);t.focus()}))},_=()=>{l.setSelectPanelState(!1)};return(e,t)=>{const l=(0,i.up)("IconDown"),o=(0,i.up)("IconUp"),u=(0,i.up)("IconPreviewClose"),I=(0,i.up)("IconPreviewOpen");return(0,i.wg)(),(0,i.j4)(mS,{class:"select-panel",width:200,height:360,title:`选择(${(0,s.SU)(c).length}/${(0,s.SU)(a).elements.length})`,left:-270,top:90,onClose:t[4]||(t[4]=e=>_())},{default:(0,i.w5)((()=>[m.value.length?((0,i.wg)(),(0,i.iD)("div",fS,[(0,i._)("div",gS,[(0,i.Wm)(Xd,{size:"small",style:{"margin-right":"5px"},onClick:t[0]||(t[0]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部显示")])),_:1}),(0,i.Wm)(Xd,{size:"small",onClick:t[1]||(t[1]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部隐藏")])),_:1})]),(0,s.SU)(r)?((0,i.wg)(),(0,i.iD)("div",yS,[(0,i.Wm)(l,{class:"icon-btn",onClick:t[2]||(t[2]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(G).UP))}),(0,i.Wm)(o,{class:"icon-btn",onClick:t[3]||(t[3]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(G).DOWN))})])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",wS,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["group"===e.type?((0,i.wg)(),(0,i.iD)("div",xS,[kS,((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.elements,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["item",{active:(0,s.SU)(c).includes(t.id),"group-active":(0,s.SU)(d).includes(t.id)}]),key:t.id,onClick:l=>h(e,t.id),onDblclick:e=>b(t.id)},[x.value===t.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${t.id}`,value:t.name||(0,s.SU)(Hn)[t.type],class:"input",type:"text",onBlur:e=>k(e,t.id),onKeydown:(0,n.D2)((e=>k(e,t.id)),["enter"])},null,40,_S)):((0,i.wg)(),(0,i.iD)("div",IS,(0,ae.zw)(t.name||(0,s.SU)(Hn)[t.type]),1)),(0,i._)("div",SS,[(0,s.SU)(p).includes(t.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"]))])],42,bS)))),128))])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:(0,ae.C_)(["item",{active:(0,s.SU)(c).includes(e.id)}]),onClick:t=>f(e.id),onDblclick:t=>b(e.id)},[x.value===e.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${e.id}`,value:e.name||(0,s.SU)(Hn)[e.type],class:"input",type:"text",onBlur:t=>k(t,e.id),onKeydown:(0,n.D2)((t=>k(t,e.id)),["enter"])},null,40,LS)):((0,i.wg)(),(0,i.iD)("div",ES,(0,ae.zw)(e.name||(0,s.SU)(Hn)[e.type]),1)),(0,i._)("div",TS,[(0,s.SU)(p).includes(e.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"]))])],42,CS))],64)))),128))])])),_:1},8,["title"])}}});const US=(0,Nl.Z)(MS,[["__scopeId","data-v-15470598"]]);var WS=US,DS=()=>{const e=$(),t=F(),{handleElement:l}=(0,o.Jk)(e),{slides:a,slideIndex:n,currentSlide:r}=(0,o.Jk)(t),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,s.iH)([]),p=(0,s.iH)(-1),v=()=>{const e=[],t=new RegExp(u.value,"g"),l=/(<([^>]+)>)/g;for(const n of a.value)for(const a of n.elements)if("text"===a.type){const o=a.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("shape"===a.type&&a.text&&a.text.content){const o=a.text.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("table"===a.type)for(let o=0;o{const t=[...e.childNodes],l=[];while(t.length){const e=t.shift();e.nodeType===e.TEXT_NODE?e.wholeText&&l.push(e):t.unshift(...e.childNodes)}return l},h=e=>{let t=0;const l=e.map((e=>{const l=t,a=t+e.wholeText.length;return t=a,{text:e.wholeText,startIdx:l,endIdx:a}}));return l},f=(e,t)=>{const l=new RegExp(t,"g"),a=[];let n=l.exec(e);while(n)a.push(n),n=l.exec(e);return a},g=(e,t,l,a)=>{for(let n=l.length-1;n>=0;n--){const o=l[n],i=o.index,s=i+o[0].length;for(let l=0;l=s)break;let c=e[l];const d=Math.max(0,i-r),p=Math.min(u,s)-r-d;d>0&&(c=c.splitText(d)),p{for(const l of e)l.innerHTML=l.innerHTML.replace(new RegExp(u.value,"g"),(()=>`${u.value}`))},w=()=>{const e=document.querySelectorAll(".editable-element mark");for(const t of e)setTimeout((()=>{const e=t.parentNode,l=t.textContent;e.replaceChild(document.createTextNode(l),t)}),0)},x=()=>{w(),setTimeout((()=>{for(let e=0;ee)).join(""),o=f(n,u.value);g(t,l,o,e)}}}),0)},k=()=>{const e=document.querySelectorAll("mark[data-index]");for(const t of e)setTimeout((()=>{const e=t.dataset.index;void 0!==e&&+e===p.value?t.classList.add("active"):t.classList.remove("active")}),0)},b=()=>{if(-1===p.value)return;const e=d.value[p.value];if(e.slideId===r.value.id)setTimeout(k,0);else{const l=a.value.findIndex((t=>t.id===e.slideId));-1!==l&&t.updateSlideIndex(l)}},_=()=>{if(!u.value)return Kl.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?v():p.value{if(!u.value)return Kl.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?v():p.value>0?p.value-=1:p.value=d.value.length-1,b()},S=()=>{if(!u.value)return;if(-1===p.value)return void _();const e=d.value[p.value];let l=null;if("table"===e.elType){const[t,a]=e.cellIndex;l=document.querySelector(`#editable-element-${e.elId} .cell[data-cell-index="${t}_${a}"] .cell-text`)}else l=document.querySelector(`#editable-element-${e.elId} .ProseMirror`);if(!l)return;const a=document.createElement("div");a.innerHTML=l.innerHTML;let n=!1;const o=a.querySelectorAll("mark[data-index]");for(const t of o){const e=t.parentNode;if(t.classList.contains("active"))n?e.removeChild(t):(e.replaceChild(document.createTextNode(c.value),t),n=!0);else{const l=t.textContent;e.replaceChild(document.createTextNode(l),t)}}if("text"===e.elType){const l={content:a.innerHTML};t.updateElement({id:e.elId,props:l})}else if("shape"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"shape"===l.type&&l.text){const n={text:{...l.text,content:a.innerHTML}};t.updateElement({id:e.elId,props:n})}}else if("table"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"table"===l.type){const n=l.data.map(((t,l)=>l===e.cellIndex[0]?t.map(((t,l)=>l===e.cellIndex[1]?{...t,text:a.innerHTML}:t)):t)),o={data:n};t.updateElement({id:e.elId,props:o})}}d.value.splice(p.value,1),d.value.length?(p.value>d.value.length-1&&(p.value=0),(0,i.Y3)((()=>{x(),b()}))):p.value=-1},C=()=>{if(u.value)if(-1!==p.value){for(let e=0;ee.id===n.slideId));if(!o)continue;const i=o.elements.find((e=>e.id===n.elId));if(!i)continue;const s=document.createElement("div");if("text"===i.type?s.innerHTML=i.content:"shape"===i.type&&(s.innerHTML=i.text?.content||""),"table"===n.elType){const e=i.data.map((e=>e.map((e=>e.text?{...e,text:e.text.replaceAll(u.value,c.value)}:e)))),l={data:e};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}else{const l=m(s),a=h(l),o=a.map((({text:e})=>e)).join(""),i=f(o,u.value);g(l,a,i,e);const d=s.querySelectorAll("mark[data-index]");let p=-1;for(const e of d){const t=+e.dataset.index,l=e.parentNode;t===p?l.removeChild(e):(l.replaceChild(document.createTextNode(c.value),e),p=t)}if("text"===n.elType){const e={content:s.innerHTML};t.updateElement({id:n.elId,slideId:n.slideId,props:e})}else if("shape"===n.elType){const e=r.value.elements.find((e=>e.id===n.elId));if(e&&"shape"===e.type&&e.text){const l={text:{...e.text,content:s.innerHTML}};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}}}}d.value=[],p.value=-1}else _()};return(0,i.YP)(u,(()=>{p.value=-1,d.value=[],u.value||w()})),(0,i.YP)(n,(()=>{(0,i.Y3)((()=>{x(),setTimeout(k,0)}))})),(0,i.YP)(l,(()=>{l.value&&(p.value=-1,d.value=[],w())})),(0,i.Jd)(w),{searchWord:u,replaceWord:c,searchResults:d,searchIndex:p,searchNext:_,searchPrev:I,replace:S,replaceAll:C}};const HS={class:"count"},FS={key:1,class:"footer"};var AS=(0,i.aZ)({__name:"SearchPanel",setup(e){const t=$(),{searchWord:l,replaceWord:a,searchResults:o,searchIndex:r,searchNext:u,searchPrev:c,replace:d,replaceAll:p}=DS(),v=(0,s.iH)("search"),m=[{key:"search",label:"查找"},{key:"replace",label:"替换"}],h=()=>{t.setSearchPanelState(!1)},f=(0,s.iH)();return(0,i.bv)((()=>{f.value.focus()})),(0,i.YP)(v,(()=>{(0,i.Y3)((()=>{f.value.focus()}))})),(e,t)=>{const g=(0,i.up)("IconClose"),y=(0,i.up)("IconLeft"),w=(0,i.up)("IconRight");return(0,i.wg)(),(0,i.j4)(mS,{class:"search-panel",width:300,height:0,left:-270,top:90},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>h()),onMousedown:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(g)],32),(0,i.Wm)(Vd,{tabs:m,value:v.value,"onUpdate:value":t[2]||(t[2]=e=>v.value=e)},null,8,["value"]),(0,i._)("div",{class:(0,ae.C_)(["content",v.value]),onMousedown:t[11]||(t[11]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(an,{class:"input",value:(0,s.SU)(l),"onUpdate:value":t[5]||(t[5]=e=>(0,s.dq)(l)?l.value=e:null),placeholder:"输入查找内容",onEnter:t[6]||(t[6]=e=>(0,s.SU)(u)()),ref_key:"searchInpRef",ref:f},{suffix:(0,i.w5)((()=>[(0,i._)("span",HS,(0,ae.zw)((0,s.SU)(r)+1)+"/"+(0,ae.zw)((0,s.SU)(o).length),1),(0,i.Wm)(Dc,{type:"vertical"}),(0,i.Wm)(y,{class:"next-btn left",onClick:t[3]||(t[3]=e=>(0,s.SU)(c)())}),(0,i.Wm)(w,{class:"next-btn right",onClick:t[4]||(t[4]=e=>(0,s.SU)(u)())})])),_:1},8,["value"]),"replace"===v.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"input",value:(0,s.SU)(a),"onUpdate:value":t[7]||(t[7]=e=>(0,s.dq)(a)?a.value=e:null),placeholder:"输入替换内容",onEnter:t[8]||(t[8]=e=>(0,s.SU)(d)())},null,8,["value"])):(0,i.kq)("",!0),"replace"===v.value?((0,i.wg)(),(0,i.iD)("div",FS,[(0,i.Wm)(Xd,{disabled:!(0,s.SU)(l),style:{"margin-left":"5px"},onClick:t[9]||(t[9]=e=>(0,s.SU)(d)())},{default:(0,i.w5)((()=>[(0,i.Uk)("替换")])),_:1},8,["disabled"]),(0,i.Wm)(Xd,{disabled:!(0,s.SU)(l),type:"primary",style:{"margin-left":"5px"},onClick:t[10]||(t[10]=e=>(0,s.SU)(p)())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部替换")])),_:1},8,["disabled"])])):(0,i.kq)("",!0)],34)])),_:1})}}});const ZS=(0,Nl.Z)(AS,[["__scopeId","data-v-43ff4a2e"]]);var $S=ZS;const OS={class:"pptist-editor"},zS={class:"layout-content"},PS={class:"layout-content-center"};var RS=(0,i.aZ)({__name:"index",setup(e){const t=$(),{dialogForExport:l,showSelectPanel:a,showSearchPanel:n}=(0,o.Jk)(t),r=()=>t.setDialogForExport(""),u=(0,s.iH)(40);return Sa(),Ca(),(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",OS,[(0,i.Wm)(In,{class:"layout-header"}),(0,i._)("div",zS,[(0,i.Wm)(Fm,{class:"layout-content-left"}),(0,i._)("div",PS,[(0,i.Wm)(xm,{class:"center-top"}),(0,i.Wm)(kp,{class:"center-body",style:(0,ae.j5)({height:`calc(100% - ${u.value+40}px)`})},null,8,["style"]),(0,i.Wm)(e_,{class:"center-bottom",height:u.value,"onUpdate:height":t[0]||(t[0]=e=>u.value=e),style:(0,ae.j5)({height:`${u.value}px`})},null,8,["height","style"])]),(0,i.Wm)(qb,{class:"layout-content-right"})])]),(0,s.SU)(a)?((0,i.wg)(),(0,i.j4)(WS,{key:0})):(0,i.kq)("",!0),(0,s.SU)(n)?((0,i.wg)(),(0,i.j4)($S,{key:1})):(0,i.kq)("",!0),(0,i.Wm)(fp,{visible:!!(0,s.SU)(l),width:680,onClosed:t[1]||(t[1]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Wm)(uS)])),_:1},8,["visible"])],64))}});const BS=(0,Nl.Z)(RS,[["__scopeId","data-v-1e00f97b"]]);var NS=BS,jS=()=>{const e=F(),{slides:t,slideIndex:l,formatedAnimations:a}=(0,o.Jk)(e),n=(0,s.iH)(0),r=(0,s.iH)(!1),u=(0,s.iH)(l.value),c=()=>{if(r.value)return;const{animations:e,autoNext:t}=a.value[n.value];n.value+=1,r.value=!0;let l=0;for(const a of e){const n=document.querySelector(`#screen-element-${a.elId} [class^=base-element-]`);if(!n){l+=1;continue}const o=`${vk}${a.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(vk)&&n.classList.remove(e,`${vk}animated`);n.style.setProperty("--animate-duration",`${a.duration}ms`),n.classList.add(o,`${vk}animated`);const i=()=>{"out"!==a.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(o,`${vk}animated`)),l+=1,l===e.length&&(r.value=!1,t&&c())};n.addEventListener("animationend",i,{once:!0})}},d=()=>{n.value-=1;const{animations:e}=a.value[n.value];for(const t of e){const e=document.querySelector(`#screen-element-${t.elId} [class^=base-element-]`);if(e){e.style.removeProperty("--animate-duration");for(const t of e.classList)-1!==t.indexOf(vk)&&e.classList.remove(t,`${vk}animated`)}}e.every((e=>"attention"===e.type))&&g()},p=(0,s.iH)(0),v=()=>{p.value&&(clearInterval(p.value),p.value=0)};(0,i.Ah)(v);const m=(0,s.iH)(!1),h=e=>{m.value=e},f=(0,U.throttle)((function(e){Kl.success(e)}),1e3,{leading:!0,trailing:!1}),g=()=>{a.value.length&&n.value>0?d():l.value>0?(e.updateSlideIndex(l.value-1),l.value{a.value.length&&n.value{v(),Kl.success("开始自动放映"),p.value=setInterval(y,w.value)},k=e=>{v(),w.value=e,x()},b=(0,U.throttle)((function(e){e.deltaY<0?g():e.deltaY>0&&y()}),500,{leading:!0,trailing:!1}),_=(0,s.iH)(null),I=e=>{_.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},S=e=>{if(!_.value)return;const t=Math.abs(_.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-_.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(_.value=null,l>0?g():y())},C=e=>{const t=e.key.toUpperCase();t===le.UP||t===le.LEFT||t===le.PAGEUP?g():t!==le.DOWN&&t!==le.RIGHT&&t!==le.SPACE&&t!==le.ENTER&&t!==le.PAGEDOWN||y()};(0,i.bv)((()=>document.addEventListener("keydown",C))),(0,i.Ah)((()=>document.removeEventListener("keydown",C)));const L=()=>{e.updateSlideIndex(l.value-1),n.value=0},E=()=>{e.updateSlideIndex(l.value+1),n.value=0},T=t=>{e.updateSlideIndex(t),n.value=0},M=l=>{const a=t.value.findIndex((e=>e.id===l));-1!==a&&(e.updateSlideIndex(a),n.value=0)};return{autoPlayTimer:p,autoPlayInterval:w,setAutoPlayInterval:k,autoPlay:x,closeAutoPlay:v,loopPlay:m,setLoopPlay:h,mousewheelListener:b,touchStartListener:I,touchEndListener:S,turnPrevSlide:L,turnNextSlide:E,turnSlideToIndex:T,turnSlideToId:M,execPrev:g,execNext:y,animationIndex:n}},YS=e=>{const t=F(),{viewportRatio:l}=(0,o.Jk)(t),a=(0,s.iH)(0),n=(0,s.iH)(0),r=()=>{const t=e?.value||document.body,o=t.clientWidth,i=t.clientHeight;let s,r;i/o===l.value?(s=o,r=i):i/o>l.value?(s=o,r=o*l.value):(s=i/l.value,r=i),a.value=s,n.value=r};return(0,i.bv)((()=>{r(),window.addEventListener("resize",r)})),(0,i.Ah)((()=>{window.removeEventListener("resize",r)})),{slideWidth:a,slideHeight:n}},VS=()=>{const e=(0,s.iH)(!0),t=(0,s.iH)(!0),{exitScreening:l}=_a(),a=()=>{e.value=ba(),!e.value&&t.value&&l(),t.value=!0};(0,i.bv)((()=>{e.value=ba(),document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a)})),(0,i.Ah)((()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}));const n=()=>{e.value&&(t.value=!1,ka())};return{fullscreenState:e,manualExitFullscreen:n}},JS=(0,i.aZ)({__name:"ScreenChartElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(pd,{class:"screen-element-chart",elementInfo:e.elementInfo},null,8,["elementInfo"]))}});const qS=JS;var XS=qS;const GS={class:"element-content"};var KS=(0,i.aZ)({__name:"ScreenVideoElement",props:{elementInfo:{}},setup(e){const{currentSlide:t}=(0,o.Jk)(F()),l=(0,i.f3)(Sn)||(0,s.iH)(1),a=(0,i.f3)(Cn)||(0,s.iH)(""),n=(0,i.Fl)((()=>t.value.id===a.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-element-video",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",GS,[n.value?((0,i.wg)(),(0,i.j4)(Mr,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4))}});const QS=(0,Nl.Z)(KS,[["__scopeId","data-v-a7e738aa"]]);var eC=QS;const tC={class:"element-content"};var lC=(0,i.aZ)({__name:"ScreenAudioElement",props:{elementInfo:{}},setup(e){const t=e,{viewportRatio:l,currentSlide:a}=(0,o.Jk)(F()),n=(0,i.f3)(Sn)||(0,s.iH)(1),r=(0,i.f3)(Cn)||(0,s.iH)(""),u=(0,i.Fl)((()=>a.value.id===r.value)),c=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),d=(0,i.Fl)((()=>{const e=la,a=la*l.value,o=280/n.value,i=50/n.value,s=t.elementInfo.width,r=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=r;return u+o>=e&&(d=s-o),c+r+i>=a&&(p=-i),{left:d+"px",top:p+"px"}})),p=(0,s.iH)(),v=()=>{p.value&&p.value.toggle()};return(e,t)=>{const l=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"screen-element-audio",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",tC,[(0,i.Wm)(l,{class:"audio-icon",style:(0,ae.j5)({fontSize:c.value,color:e.elementInfo.color}),onClick:t[0]||(t[0]=e=>v())},null,8,["style"]),u.value?((0,i.wg)(),(0,i.j4)(Gr,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:p,style:(0,ae.j5)({...d.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(n)},null,8,["style","src","loop","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4)}}});const aC=(0,Nl.Z)(lC,[["__scopeId","data-v-7a9a13d6"]]);var nC=aC;const oC=["id","title"];var iC=(0,i.aZ)({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Yc,[na.TEXT]:Xc,[na.SHAPE]:nd,[na.LINE]:ud,[na.CHART]:XS,[na.TABLE]:bd,[na.LATEX]:Td,[na.VIDEO]:eC,[na.AUDIO]:nC};return e[t.elementInfo.type]||null})),{formatedAnimations:a,theme:n}=(0,o.Jk)(F()),r=(0,i.Fl)((()=>{const e=a.value.findIndex((e=>{const l=e.animations.map((e=>e.elId));return l.includes(t.elementInfo.id)}));if(-1===e)return!1;if(ee.elId===t.elementInfo.id));return"in"===l?.type})),u=()=>{const e=t.elementInfo.link;e&&("web"===e.type?(t.manualExitFullscreen(),window.open(e.target)):"slide"===e.type&&t.turnSlideToId(e.target))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:(0,ae.j5)({zIndex:e.elementIndex,color:(0,s.SU)(n).fontColor,fontFamily:(0,s.SU)(n).fontName,visibility:r.value?"hidden":"visible"}),title:e.elementInfo.link?.target||"",onClick:t[0]||(t[0]=e=>u())},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,oC))}});const sC=(0,Nl.Z)(iC,[["__scopeId","data-v-69b7fb9e"]]);var rC=sC,uC=(0,i.aZ)({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=vu(a),r=(0,i.Fl)((()=>t.slide.id));return(0,i.JJ)(Cn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-slide",style:(0,ae.j5)({width:(0,s.SU)(la)+"px",height:(0,s.SU)(la)*(0,s.SU)(l)+"px",transform:`scale(${e.scale})`})},[(0,i._)("div",{class:"background",style:(0,ae.j5)({...(0,s.SU)(n)})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((t,l)=>((0,i.wg)(),(0,i.j4)(rC,{key:t.id,elementInfo:t,elementIndex:l+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"])))),128))],4))}});const cC=(0,Nl.Z)(uC,[["__scopeId","data-v-016af5da"]]);var dC=cC;const pC={class:"screen-slide-list"};var vC=(0,i.aZ)({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)(F()),n=(0,i.Fl)((()=>l.value.map((e=>{let t=e.turningMode;if(t||(t="slideY"),"random"===t){const e=gk.filter((e=>!["random","no"].includes(e.value))).map((e=>e.value));t=e[Math.floor(Math.random()*e.length)]}return{...e,turningMode:t}})))),r=(0,i.Fl)((()=>t.slideWidth/la));return(0,i.JJ)(Sn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",pC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(n.value,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slide-item",`turning-mode-${t.turningMode}`,{current:l===(0,s.SU)(a),before:l<(0,s.SU)(a),after:l>(0,s.SU)(a),hide:(l===(0,s.SU)(a)-1||l===(0,s.SU)(a)+1)&&t.turningMode!==n.value[(0,s.SU)(a)].turningMode}]),key:t.id},[Math.abs((0,s.SU)(a)-l)<2||t.animations?.length?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,ae.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(dC,{slide:t,scale:r.value,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):(0,i.kq)("",!0)],2)))),128))]))}});const mC=(0,Nl.Z)(vC,[["__scopeId","data-v-552b63d2"]]);var hC=mC;const fC={class:"slide-thumbnails"},gC={class:"return-button"},yC={class:"slide-thumbnails-content"},wC=["onClick"];var xC=(0,i.aZ)({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(e,{emit:t}){const l=e,{slides:a,slideIndex:n}=(0,o.Jk)(F()),{slidesLoadLimit:r}=km(),u=e=>{l.turnSlideToIndex(e),t("close")};return(e,l)=>{const o=(0,i.up)("IconArrowCircleLeft");return(0,i.wg)(),(0,i.iD)("div",fC,[(0,i._)("div",gC,[(0,i.Wm)(o,{class:"icon",onClick:l[0]||(l[0]=e=>t("close"))})]),(0,i._)("div",yC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(a),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail",{active:t===(0,s.SU)(n)}]),key:e.id,onClick:e=>u(t)},[(0,i.Wm)(Bd,{slide:e,size:150,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,wC)))),128))])])}}});const kC=(0,Nl.Z)(xC,[["__scopeId","data-v-15912b32"]]);var bC=kC;const _C={key:0,class:"blackboard"};var IC=(0,i.aZ)({__name:"WritingBoard",props:{color:{default:"#ffcc00"},model:{default:"pen"},blackboard:{type:Boolean,default:!1},penSize:{default:6},markSize:{default:24},rubberSize:{default:80}},emits:["end"],setup(e,{expose:t,emit:l}){const a=e;let n=null;const o=(0,s.iH)(),r=(0,s.iH)();let u={x:0,y:0},c=!1,d=0,p=-1;const v=(0,s.iH)({x:0,y:0}),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,i.Fl)((()=>r.value?h.value/r.value.width:1)),y=(0,i.Fl)((()=>r.value?f.value/r.value.height:1)),w=()=>{o.value&&(h.value=o.value.clientWidth,f.value=o.value.clientHeight)},x=new ResizeObserver(w);(0,i.bv)((()=>{o.value&&x.observe(o.value)})),(0,i.Ah)((()=>{o.value&&x.unobserve(o.value)}));const k=()=>{r.value&&o.value&&(n=r.value.getContext("2d"),n&&(r.value.width=o.value.clientWidth,r.value.height=o.value.clientHeight,n.lineCap="round",n.lineJoin="round"))};(0,i.bv)(k);const b=()=>{n&&("mark"===a.model?(n.globalCompositeOperation="xor",n.globalAlpha=.5):"pen"===a.model&&(n.globalCompositeOperation="source-over",n.globalAlpha=1))};(0,i.YP)((()=>a.model),b);const _=(e,t,l)=>{if(!n)return;const o=u.x,i=u.y;n.lineWidth=l,n.strokeStyle=a.color,n.beginPath(),n.moveTo(o,i),n.lineTo(e,t),n.stroke(),n.closePath()},I=(e,t)=>{if(!n||!r.value)return;const l=u.x,o=u.y,i=a.rubberSize/2,s=i*Math.sin(Math.atan((t-o)/(e-l))),c=i*Math.cos(Math.atan((t-o)/(e-l))),d=[l+s,o-c],p=[l-s,o+c],v=[e+s,t-c],m=[e-s,t+c];n.save(),n.beginPath(),n.arc(e,t,i,0,2*Math.PI),n.clip(),n.clearRect(0,0,r.value.width,r.value.height),n.restore(),n.save(),n.beginPath(),n.moveTo(...d),n.lineTo(...v),n.lineTo(...m),n.lineTo(...p),n.closePath(),n.clip(),n.clearRect(0,0,r.value.width,r.value.height),n.restore()},S=(e,t)=>{const l=u.x,a=u.y;return Math.sqrt((e-l)*(e-l)+(t-a)*(t-a))},C=(e,t)=>{const l=10,n=.1,o=a.penSize,i=3,s=e/t;let r;return r=s<=n?o:s>=l?i:o-s/l*o,-1===p?r:1*r/3+2*p/3},L=(e,t)=>{const l=(new Date).getTime();if("pen"===a.model){const a=S(e,t),n=l-d,o=C(a,n);_(e,t,o),p=o}else"mark"===a.model?_(e,t,a.markSize):I(e,t);u={x:e,y:t},d=(new Date).getTime()},E=e=>{if(!r.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=r.value.getBoundingClientRect(),a=t.pageX-l.x,n=t.pageY-l.y;return[a,n]},T=e=>{const[t,l]=E(e),a=t/g.value,n=l/y.value;c=!0,u={x:a,y:n},d=(new Date).getTime(),e instanceof MouseEvent||(v.value={x:t,y:l},m.value=!0)},M=e=>{const[t,l]=E(e),a=t/g.value,n=l/y.value;v.value={x:t,y:l},c&&L(a,n)},U=()=>{c&&(c=!1,l("end"))},W=()=>{n&&r.value&&(n.clearRect(0,0,r.value.width,r.value.height),l("end"))},D=()=>r.value?.toDataURL(),H=e=>{if(n&&r.value&&(n.clearRect(0,0,r.value.width,r.value.height),e)){n.globalCompositeOperation="source-over",n.globalAlpha=1;const t=new Image;t.src=e,t.onload=()=>{n.drawImage(t,0,0),b()}}};return t({clearCanvas:W,getImageDataURL:D,setImageDataURL:H}),(e,t)=>{const l=(0,i.up)("IconWrite"),a=(0,i.up)("IconHighLight");return(0,i.wg)(),(0,i.iD)("div",{class:"writing-board",ref_key:"writingBoardRef",ref:o},[e.blackboard?((0,i.wg)(),(0,i.iD)("div",_C)):(0,i.kq)("",!0),(0,i._)("canvas",{class:"canvas",ref_key:"canvasRef",ref:r,style:(0,ae.j5)({width:h.value+"px",height:f.value+"px"}),onMousedown:t[0]||(t[0]=e=>T(e)),onMousemove:t[1]||(t[1]=e=>M(e)),onMouseup:t[2]||(t[2]=e=>U()),onTouchstart:t[3]||(t[3]=e=>T(e)),onTouchmove:t[4]||(t[4]=e=>M(e)),onTouchend:t[5]||(t[5]=e=>{U(),m.value=!1}),onMouseleave:t[6]||(t[6]=e=>{U(),m.value=!1}),onMouseenter:t[7]||(t[7]=e=>m.value=!0)},null,36),m.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},["eraser"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"eraser",style:(0,ae.j5)({left:v.value.x-e.rubberSize/2+"px",top:v.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):(0,i.kq)("",!0),"pen"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:1,class:"pen",style:(0,ae.j5)({left:v.value.x-e.penSize/2+"px",top:v.value.y-6*e.penSize+e.penSize/2+"px",color:e.color})},["pen"===e.model?((0,i.wg)(),(0,i.j4)(l,{key:0,class:"icon",size:6*e.penSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0),"mark"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:2,class:"pen",style:(0,ae.j5)({left:v.value.x-e.markSize/2+"px",top:v.value.y+"px",color:e.color})},["mark"===e.model?((0,i.wg)(),(0,i.j4)(a,{key:0,class:"icon",size:1.5*e.markSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)],512)}}});const SC=(0,Nl.Z)(IC,[["__scopeId","data-v-d8027742"]]);var CC=SC;const LC=e=>((0,i.dD)("data-v-fc2e4b2c"),e=e(),(0,i.Cn)(),e),EC={class:"writing-board-tool"},TC={class:"tool-content"},MC={class:"size"},UC=LC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),WC={class:"size"},DC=LC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),HC={class:"size"},FC=LC((()=>(0,i._)("div",{class:"label"},"橡皮大小:",-1))),AC={class:"colors"},ZC=["onClick"];var $C=(0,i.aZ)({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],{currentSlide:a}=(0,o.Jk)(F()),r=(0,s.iH)(),u=(0,s.iH)("#e2534d"),c=(0,s.iH)("pen"),d=(0,s.iH)(!1),p=(0,s.iH)(""),v=(0,s.iH)(6),m=(0,s.iH)(24),h=(0,s.iH)(80),f=e=>{c.value===e?p.value=p.value===e?"":e:(p.value&&(p.value=""),c.value=e)},g=()=>{r.value.clearCanvas()},y=e=>{"eraser"===c.value&&(c.value="pen"),u.value=e},w=()=>{t("close")};(0,i.YP)(a,(()=>{j.writingBoardImgs.where("id").equals(a.value.id).toArray().then((e=>{const t=e[0];r.value.setImageDataURL(t?.dataURL||"")}))}),{immediate:!0});const x=()=>{const e=r.value.getImageDataURL();j.writingBoardImgs.where("id").equals(a.value.id).toArray().then((t=>{const l=t[0];l?j.writingBoardImgs.update(l,{dataURL:e}):j.writingBoardImgs.add({id:a.value.id,dataURL:e})}))};return(e,t)=>{const a=(0,i.up)("IconWrite"),o=(0,i.up)("IconHighLight"),s=(0,i.up)("IconErase"),k=(0,i.up)("IconClear"),b=(0,i.up)("IconFill"),_=(0,i.up)("IconClose"),I=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",EC,[(0,i._)("div",{class:"writing-board-wrap",style:(0,ae.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(CC,{ref_key:"writingBoardRef",ref:r,color:u.value,blackboard:d.value,model:c.value,penSize:v.value,markSize:m.value,rubberSize:h.value,onEnd:t[0]||(t[0]=e=>x())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),(0,i.Wm)(mS,{class:"tools-panel",width:520,height:50,left:e.left,top:e.top,moveable:""===p.value},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"tools",onMousedown:t[10]||(t[10]=(0,n.iM)((()=>{}),["stop"]))},[(0,i._)("div",TC,[(0,i.Wm)(rn,{trigger:"manual",value:"pen"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",MC,[UC,(0,i.Wm)(Nm,{class:"size-slider",min:4,max:10,step:2,value:v.value,"onUpdate:value":t[1]||(t[1]=e=>v.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"pen"===c.value}]),onClick:t[2]||(t[2]=e=>f("pen"))},[(0,i.Wm)(a,{class:"icon"})],2)),[[I,"画笔"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"manual",value:"mark"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",WC,[DC,(0,i.Wm)(Nm,{class:"size-slider",min:16,max:40,step:4,value:m.value,"onUpdate:value":t[3]||(t[3]=e=>m.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"mark"===c.value}]),onClick:t[4]||(t[4]=e=>f("mark"))},[(0,i.Wm)(o,{class:"icon"})],2)),[[I,"荧光笔"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"manual",value:"eraser"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",HC,[FC,(0,i.Wm)(Nm,{class:"size-slider",min:20,max:200,step:20,value:h.value,"onUpdate:value":t[5]||(t[5]=e=>h.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"eraser"===c.value}]),onClick:t[6]||(t[6]=e=>f("eraser"))},[(0,i.Wm)(s,{class:"icon"})],2)),[[I,"橡皮擦"]])])),_:1},8,["value"]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[7]||(t[7]=e=>g())},[(0,i.Wm)(k,{class:"icon"})])),[[I,"清除墨迹"]]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:d.value}]),onClick:t[8]||(t[8]=e=>d.value=!d.value)},[(0,i.Wm)(b,{class:"icon"})],2)),[[I,"黑板"]]),(0,i._)("div",AC,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>(0,i._)("div",{class:(0,ae.C_)(["color",{active:e===u.value}]),key:e,style:(0,ae.j5)({backgroundColor:e}),onClick:t=>y(e)},null,14,ZC))),64))])]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[9]||(t[9]=e=>w())},[(0,i.Wm)(_,{class:"icon"})])),[[I,"关闭画笔"]])],32)])),_:1},8,["left","top","moveable"])])}}});const OC=(0,Nl.Z)($C,[["__scopeId","data-v-fc2e4b2c"]]);var zC=OC;const PC=e=>((0,i.dD)("data-v-83a589f0"),e=e(),(0,i.Cn)(),e),RC={class:"header"},BC={class:"content"},NC={class:"timer"},jC=["value","disabled"],YC=PC((()=>(0,i._)("div",{class:"colon"},":",-1))),VC={class:"timer"},JC=["value","disabled"];var qC=(0,i.aZ)({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(e,{emit:t}){const l=(0,s.iH)(null),a=(0,s.iH)(!1),o=(0,s.iH)(!1),r=(0,s.iH)(0),u=(0,i.Fl)((()=>Math.floor(r.value/60))),c=(0,i.Fl)((()=>r.value%60)),d=(0,i.Fl)((()=>!o.value||a.value)),p=()=>{l.value&&clearInterval(l.value)};(0,i.Ah)(p);const v=()=>{p(),a.value=!1},m=()=>{p(),a.value=!1,o.value?r.value=600:r.value=0},h=()=>{p(),o.value?l.value=setInterval((()=>{r.value=r.value-1,r.value<=0&&m()}),1e3):l.value=setInterval((()=>{r.value=r.value+1,r.value>36e3&&v()}),1e3),a.value=!0},f=()=>{a.value?v():h()},g=()=>{o.value=!o.value,m()},y=(e,t)=>{const l=e.target;let a=l.value;const n=/^(\d)+$/.test(a);n?("second"===t&&+a>=60&&(a="59"),r.value="minute"===t?60*+a+c.value:+a+60*u.value):l.value=q("minute"===t?u.value:c.value,2)};return(e,l)=>{const r=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(mS,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:(0,i.w5)((()=>[(0,i._)("div",RC,[(0,i._)("span",{class:"text-btn",onClick:l[0]||(l[0]=e=>f())},(0,ae.zw)(a.value?"暂停":"开始"),1),(0,i._)("span",{class:"text-btn",onClick:l[1]||(l[1]=e=>m())},"重置"),(0,i._)("span",{class:(0,ae.C_)(["text-btn",{active:o.value}]),onClick:l[2]||(l[2]=e=>g())},"倒计时",2)]),(0,i._)("div",BC,[(0,i._)("div",NC,[(0,i._)("input",{type:"text",value:(0,s.SU)(q)(u.value,2),maxlength:3,disabled:d.value,onMousedown:l[3]||(l[3]=(0,n.iM)((()=>{}),["stop"])),onBlur:l[4]||(l[4]=e=>y(e,"minute")),onKeydown:[l[5]||(l[5]=(0,n.iM)((()=>{}),["stop"])),l[6]||(l[6]=(0,n.D2)((0,n.iM)((e=>y(e,"minute")),["stop"]),["enter"]))]},null,40,jC)]),YC,(0,i._)("div",VC,[(0,i._)("input",{type:"text",value:(0,s.SU)(q)(c.value,2),maxlength:3,disabled:d.value,onMousedown:l[7]||(l[7]=(0,n.iM)((()=>{}),["stop"])),onBlur:l[8]||(l[8]=e=>y(e,"second")),onKeydown:[l[9]||(l[9]=(0,n.iM)((()=>{}),["stop"])),l[10]||(l[10]=(0,n.D2)((0,n.iM)((e=>y(e,"second")),["stop"]),["enter"]))]},null,40,JC)])]),(0,i._)("div",{class:"close-btn",onClick:l[11]||(l[11]=e=>t("close"))},[(0,i.Wm)(r,{class:"icon"})])])),_:1},8,["left","top"])}}});const XC=(0,Nl.Z)(qC,[["__scopeId","data-v-83a589f0"]]);var GC=XC;const KC={class:"tools-left"},QC={class:"content"};var eL=(0,i.aZ)({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)(F()),{autoPlayTimer:n,autoPlay:r,closeAutoPlay:u,autoPlayInterval:c,setAutoPlayInterval:d,loopPlay:p,setLoopPlay:v,mousewheelListener:m,touchStartListener:h,touchEndListener:f,turnPrevSlide:g,turnNextSlide:y,turnSlideToIndex:w,turnSlideToId:x,execPrev:k,execNext:b,animationIndex:_}=jS(),{slideWidth:I,slideHeight:S}=YS(),{exitScreening:C}=_a(),{fullscreenState:L,manualExitFullscreen:E}=VS(),T=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>g()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>y()},{text:"第一页",disable:0===a.value,handler:()=>w(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>w(l.value.length-1)},{divider:!0},{text:n.value?"取消自动放映":"自动放映",handler:n.value?u:r,children:[{text:"2.5秒",subText:2500===c.value?"√":"",handler:()=>d(2500)},{text:"5秒",subText:5e3===c.value?"√":"",handler:()=>d(5e3)},{text:"7.5秒",subText:7500===c.value?"√":"",handler:()=>d(7500)},{text:"10秒",subText:1e4===c.value?"√":"",handler:()=>d(1e4)}]},{text:"循环放映",subText:p.value?"√":"",handler:()=>v(!p.value)},{divider:!0},{text:"显示工具栏",handler:()=>T.value=!0},{text:"查看所有幻灯片",handler:()=>W.value=!0},{text:"画笔工具",handler:()=>M.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:"结束放映",subText:"ESC",handler:C}];return(e,t)=>{const n=(0,i.up)("IconLeftTwo"),o=(0,i.up)("IconRightTwo"),r=(0,i.up)("IconWrite"),u=(0,i.up)("IconMagic"),c=(0,i.up)("IconStopwatchStart"),d=(0,i.up)("IconListView"),p=(0,i.up)("IconOffScreenOne"),v=(0,i.up)("IconFullScreenOne"),g=(0,i.up)("IconPower"),y=(0,i.Q2)("contextmenu"),F=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["base-view",{"laser-pen":D.value}])},[(0,i.wy)((0,i.Wm)(hC,{slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),animationIndex:(0,s.SU)(_),turnSlideToId:(0,s.SU)(x),manualExitFullscreen:(0,s.SU)(E),onWheel:t[0]||(t[0]=e=>(0,s.SU)(m)(e)),onTouchstart:t[1]||(t[1]=e=>(0,s.SU)(h)(e)),onTouchend:t[2]||(t[2]=e=>(0,s.SU)(f)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[y,H]]),W.value?((0,i.wg)(),(0,i.j4)(bC,{key:0,turnSlideToIndex:(0,s.SU)(w),onClose:t[3]||(t[3]=e=>W.value=!1)},null,8,["turnSlideToIndex"])):(0,i.kq)("",!0),M.value?((0,i.wg)(),(0,i.j4)(zC,{key:1,slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),onClose:t[4]||(t[4]=e=>M.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),U.value?((0,i.wg)(),(0,i.j4)(GC,{key:2,onClose:t[5]||(t[5]=e=>U.value=!1)})):(0,i.kq)("",!0),(0,i._)("div",KC,[(0,i.Wm)(n,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[6]||(t[6]=e=>(0,s.SU)(k)())}),(0,i.Wm)(o,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[7]||(t[7]=e=>(0,s.SU)(b)())})]),(0,i._)("div",{class:(0,ae.C_)(["tools-right",{visible:T.value}]),onMouseleave:t[16]||(t[16]=e=>T.value=!1),onMouseenter:t[17]||(t[17]=e=>T.value=!0)},[(0,i._)("div",QC,[(0,i._)("div",{class:"tool-btn page-number",onClick:t[8]||(t[8]=e=>W.value=!0)},"幻灯片 "+(0,ae.zw)((0,s.SU)(a)+1)+" / "+(0,ae.zw)((0,s.SU)(l).length),1),(0,i.wy)((0,i.Wm)(r,{class:"tool-btn",onClick:t[9]||(t[9]=e=>M.value=!0)},null,512),[[F,"画笔工具"]]),(0,i.wy)((0,i.Wm)(u,{class:(0,ae.C_)(["tool-btn",{active:D.value}]),onClick:t[10]||(t[10]=e=>D.value=!D.value)},null,8,["class"]),[[F,"激光笔"]]),(0,i.wy)((0,i.Wm)(c,{class:(0,ae.C_)(["tool-btn",{active:U.value}]),onClick:t[11]||(t[11]=e=>U.value=!U.value)},null,8,["class"]),[[F,"计时器"]]),(0,i.wy)((0,i.Wm)(d,{class:"tool-btn",onClick:t[12]||(t[12]=t=>e.changeViewMode("presenter"))},null,512),[[F,"演讲者视图"]]),(0,s.SU)(L)?(0,i.wy)(((0,i.wg)(),(0,i.j4)(p,{key:0,class:"tool-btn",onClick:t[13]||(t[13]=e=>(0,s.SU)(E)())},null,512)),[[F,"退出全屏"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(v,{key:1,class:"tool-btn",onClick:t[14]||(t[14]=e=>(0,s.SU)(xa)())},null,512)),[[F,"进入全屏"]]),(0,i.wy)((0,i.Wm)(g,{class:"tool-btn",onClick:t[15]||(t[15]=e=>(0,s.SU)(C)())},null,512),[[F,"结束放映"]])])],34)],2)}}});const tL=(0,Nl.Z)(eL,[["__scopeId","data-v-e9c1efea"]]);var lL=tL;const aL=e=>((0,i.dD)("data-v-0fc2d7b2"),e=e(),(0,i.Cn)(),e),nL={class:"presenter-view"},oL={class:"toolbar"},iL=aL((()=>(0,i._)("span",null,"普通视图",-1))),sL=aL((()=>(0,i._)("span",null,"画笔",-1))),rL=aL((()=>(0,i._)("span",null,"激光笔",-1))),uL=aL((()=>(0,i._)("span",null,"计时器",-1))),cL=aL((()=>(0,i._)("span",null,"结束放映",-1))),dL={class:"content"},pL=["onClick"],vL={class:"remark"},mL={class:"header"},hL=aL((()=>(0,i._)("span",null,"演讲者备注",-1))),fL=["innerHTML"],gL={class:"remark-scale"};var yL=(0,i.aZ)({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a,viewportRatio:r,currentSlide:u}=(0,o.Jk)(F()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)(!1),{mousewheelListener:h,touchStartListener:f,touchEndListener:g,turnPrevSlide:y,turnNextSlide:w,turnSlideToIndex:x,turnSlideToId:k,animationIndex:b}=jS(),{slideWidth:_,slideHeight:I}=YS(c),{exitScreening:S}=_a(),{slidesLoadLimit:C}=km(),{fullscreenState:L,manualExitFullscreen:E}=VS(),T=(0,s.iH)(16),M=(0,i.Fl)((()=>Ql(u.value.remark||"无备注"))),U=e=>{d.value&&d.value.scrollBy(e.deltaY,0)},W=e=>{e<12||e>40||(T.value=e)};(0,i.YP)(a,(()=>{(0,i.Y3)((()=>{if(!d.value)return;const e=d.value.querySelector(".thumbnail.active");if(!e)return;const t=d.value.offsetWidth,l=e.offsetLeft;d.value.scrollTo({left:l-t/2,behavior:"smooth"})}))}));const D=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>y()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>w()},{text:"第一页",disable:0===a.value,handler:()=>x(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>x(l.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>p.value=!0},{text:"普通视图",handler:()=>t.changeViewMode("base")},{divider:!0},{text:"结束放映",subText:"ESC",handler:S}];return(e,t)=>{const o=(0,i.up)("IconListView"),u=(0,i.up)("IconWrite"),y=(0,i.up)("IconMagic"),w=(0,i.up)("IconStopwatchStart"),H=(0,i.up)("IconOffScreenOne"),F=(0,i.up)("IconPower"),A=(0,i.up)("IconMinus"),Z=(0,i.up)("IconPlus"),$=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",nL,[(0,i._)("div",oL,[(0,i._)("div",{class:"tool-btn",onClick:t[0]||(t[0]=t=>e.changeViewMode("base"))},[(0,i.Wm)(o,{class:"tool-icon"}),iL]),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:p.value}]),onClick:t[1]||(t[1]=e=>p.value=!p.value)},[(0,i.Wm)(u,{class:"tool-icon"}),sL],2),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:m.value}]),onClick:t[2]||(t[2]=e=>m.value=!m.value)},[(0,i.Wm)(y,{class:"tool-icon"}),rL],2),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:v.value}]),onClick:t[3]||(t[3]=e=>v.value=!v.value)},[(0,i.Wm)(w,{class:"tool-icon"}),uL],2),(0,i._)("div",{class:"tool-btn",onClick:t[4]||(t[4]=()=>(0,s.SU)(L)?(0,s.SU)(E)():(0,s.SU)(xa)())},[(0,s.SU)(L)?((0,i.wg)(),(0,i.j4)(H,{key:0,class:"tool-icon"})):((0,i.wg)(),(0,i.j4)(H,{key:1,class:"tool-icon"})),(0,i._)("span",null,(0,ae.zw)((0,s.SU)(L)?"退出全屏":"全屏"),1)]),(0,i.Wm)(Dc,{class:"divider"}),(0,i._)("div",{class:"tool-btn",onClick:t[5]||(t[5]=e=>(0,s.SU)(S)())},[(0,i.Wm)(F,{class:"tool-icon"}),cL])]),(0,i._)("div",dL,[(0,i._)("div",{class:(0,ae.C_)(["slide-list-wrap",{"laser-pen":m.value}]),ref_key:"slideListWrapRef",ref:c},[(0,i.wy)((0,i.Wm)(hC,{slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),animationIndex:(0,s.SU)(b),turnSlideToId:(0,s.SU)(k),manualExitFullscreen:(0,s.SU)(E),onWheel:t[6]||(t[6]=e=>(0,s.SU)(h)(e)),onTouchstart:t[7]||(t[7]=e=>(0,s.SU)(f)(e)),onTouchend:t[8]||(t[8]=e=>(0,s.SU)(g)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[$,D]]),p.value?((0,i.wg)(),(0,i.j4)(zC,{key:0,slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),left:-365,top:-155,onClose:t[9]||(t[9]=e=>p.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),v.value?((0,i.wg)(),(0,i.j4)(GC,{key:1,left:75,onClose:t[10]||(t[10]=e=>v.value=!1)})):(0,i.kq)("",!0)],2),(0,i._)("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:d,onWheel:t[11]||(t[11]=(0,n.iM)((e=>U(e)),["prevent"]))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail",{active:t===(0,s.SU)(a)}]),key:e.id,onClick:e=>(0,s.SU)(x)(t)},[(0,i.Wm)(Bd,{slide:e,size:120/(0,s.SU)(r),visible:t<(0,s.SU)(C)},null,8,["slide","size","visible"])],10,pL)))),128))],544)]),(0,i._)("div",vL,[(0,i._)("div",mL,[hL,(0,i._)("span",null,"P "+(0,ae.zw)((0,s.SU)(a)+1)+" / "+(0,ae.zw)((0,s.SU)(l).length),1)]),(0,i._)("div",{class:"remark-content",style:(0,ae.j5)({fontSize:T.value+"px"}),innerHTML:M.value},null,12,fL),(0,i._)("div",gL,[(0,i._)("div",{class:(0,ae.C_)(["scale-btn",{disable:12===T.value}]),onClick:t[12]||(t[12]=e=>W(T.value-2))},[(0,i.Wm)(A)],2),(0,i._)("div",{class:(0,ae.C_)(["scale-btn",{disable:40===T.value}]),onClick:t[13]||(t[13]=e=>W(T.value+2))},[(0,i.Wm)(Z)],2)])])])}}});const wL=(0,Nl.Z)(yL,[["__scopeId","data-v-0fc2d7b2"]]);var xL=wL;const kL={class:"pptist-screen"};var bL=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("base"),l=e=>{t.value=e},{exitScreening:a}=_a(),n=e=>{const t=e.key.toUpperCase();t===le.ESC&&a()};return(0,i.bv)((()=>document.addEventListener("keydown",n))),(0,i.Ah)((()=>document.removeEventListener("keydown",n))),(e,a)=>((0,i.wg)(),(0,i.iD)("div",kL,["base"===t.value?((0,i.wg)(),(0,i.j4)(lL,{key:0,changeViewMode:l})):"presenter"===t.value?((0,i.wg)(),(0,i.j4)(xL,{key:1,changeViewMode:l})):(0,i.kq)("",!0)]))}});const _L=(0,Nl.Z)(bL,[["__scopeId","data-v-6bf3d190"]]);var IL=_L,SL=(0,i.aZ)({__name:"MobileEditableElement",props:{elementInfo:{},elementIndex:{},selectElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Ho,[na.TEXT]:Gi,[na.SHAPE]:vs,[na.LINE]:Is,[na.CHART]:Us,[na.TABLE]:Gs,[na.LATEX]:ar,[na.VIDEO]:Dr,[na.AUDIO]:eu};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-editable-element",style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement"]))],4))}});const CL=SL;var LL=CL,EL=(0,i.aZ)({__name:"MobileOperate",props:{elementInfo:{},isSelected:{type:Boolean},canvasScale:{},scaleElement:{type:Function},rotateElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),a=(0,i.Fl)((()=>t.elementInfo.width*t.canvasScale)),o=(0,i.Fl)((()=>t.elementInfo.height*t.canvasScale)),{borderLines:r,resizeHandlers:u,textElementResizeHandlers:c}=Hu(a,o),d="text"===t.elementInfo.type||"table"===t.elementInfo.type?c:u,p=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-operate",style:(0,ae.j5)({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${l.value}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onTouchstart:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onTouchstart"])))),128)),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Ju,{key:0,class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onTouchstart:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)],4))}});const TL=(0,Nl.Z)(EL,[["__scopeId","data-v-fd451ff6"]]);var ML=TL;const UL={class:"mobile-thumbnails"},WL=["onClick"],DL={class:"label"};var HL=(0,i.aZ)({__name:"MobileThumbnails",setup(e){const t=F(),{slides:l,slideIndex:a}=(0,o.Jk)(t),{sortSlides:n}=pa(),{slidesLoadLimit:r}=km(),u=e=>{t.updateSlideIndex(e)},c=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&n(t,l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",UL,[(0,i.Wm)((0,s.SU)(Em()),{class:"thumbnail-list",modelValue:(0,s.SU)(l),animation:200,scroll:!0,scrollSensitivity:50,delayOnTouchOnly:!0,delay:800,itemKey:"id",onEnd:c},{item:(0,i.w5)((({element:e,index:t})=>[(0,i._)("div",{class:(0,ae.C_)(["thumbnail-item",{active:(0,s.SU)(a)===t}]),onClick:e=>u(t)},[(0,i._)("div",DL,(0,ae.zw)(t+1),1),(0,i.Wm)(Bd,{class:"thumbnail",slide:e,size:120,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,WL)])),_:1},8,["modelValue"])]))}});const FL=(0,Nl.Z)(HL,[["__scopeId","data-v-2c80920e"]]);var AL=FL;const ZL={class:"slide-toolbar"},$L={class:"remark"},OL=["value"],zL={class:"toolbar"};var PL=(0,i.aZ)({__name:"SlideToolbar",setup(e){const t=F(),{viewportRatio:l,currentSlide:a}=(0,o.Jk)(t),{createSlide:n,copyAndPasteSlide:r,deleteSlide:u}=pa(),{createTextElement:c,createImageElement:d,createShapeElement:p}=ua(),v=()=>{const e=400,t=56;c({left:(la-e)/2,top:(la*l.value-t)/2,width:e,height:t},{content:"

新添加文本

"})},m=e=>{e&&e[0]&&ta(e[0]).then((e=>d(e)))},h=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},a={viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},n={square:t,round:a},o=200;p({left:(la-o)/2,top:(la*l.value-o)/2,width:o,height:o},n[e])},f=(0,i.Fl)((()=>a.value?.remark||"")),g=e=>{const l=e.target.value;t.updateSlide({remark:l})};return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconCopy"),o=(0,i.up)("IconDelete"),c=(0,i.up)("IconFontSize"),d=(0,i.up)("IconPicture"),p=(0,i.up)("IconSquare"),y=(0,i.up)("IconRound");return(0,i.wg)(),(0,i.iD)("div",ZL,[(0,i._)("div",$L,[(0,i._)("textarea",{value:f.value,placeholder:"点击输入演讲者备注",onInput:t[0]||(t[0]=e=>g(e))},null,40,OL)]),(0,i._)("div",zL,[(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)(" 新幻灯片")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"icon"}),(0,i.Uk)(" 文字")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Oa,{onChange:t[5]||(t[5]=e=>m(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:"icon"}),(0,i.Uk)("图片 ")])),_:1})])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>h("square"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p,{class:"icon"}),(0,i.Uk)(" 矩形")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>h("round"))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"icon"}),(0,i.Uk)(" 圆形")])),_:1})])),_:1})]),(0,i.Wm)(AL)])}}});const RL=(0,Nl.Z)(PL,[["__scopeId","data-v-24150aba"]]);var BL=RL;const NL=e=>((0,i.dD)("data-v-f3d1ac70"),e=e(),(0,i.Cn)(),e),jL={class:"element-toolbar"},YL={class:"content"},VL={key:0,class:"style"},JL={class:"row-block"},qL=NL((()=>(0,i._)("div",{class:"label"},"文字颜色:",-1))),XL={class:"colors"},GL=["onClick"],KL={class:"row-block"},QL=NL((()=>(0,i._)("div",{class:"label"},"填充色:",-1))),eE={class:"colors"},tE=["onClick"],lE={key:1,class:"common"};var aE=(0,i.aZ)({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],l=$(),a=F(),{handleElement:n,handleElementId:r,richTextAttrs:u}=(0,o.Jk)(l),{addHistorySnapshot:c}=ra(),d=(e,t)=>{a.updateElement({id:e,props:t}),c()},p=[{key:"style",label:"样式"},{key:"common",label:"布局"}],v=(0,s.iH)("common"),{orderElement:m}=wa(),{alignElementToCanvas:h}=Yn(),{addElementsFromData:f}=ca(),{deleteElement:g}=ma(),y=()=>{const e=JSON.parse(JSON.stringify(n.value));f([e])},w=(e,t)=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},x=e=>{if(n.value){if(("text"===n.value.type||"shape"===n.value.type&&n.value.text?.content)&&Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:"color",value:e}}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{if(n.value){if("text"!==n.value.type&&"shape"!==n.value.type&&"chart"!==n.value.type||d(r.value,{fill:e}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{const a=(0,i.up)("IconTextBold"),o=(0,i.up)("IconTextItalic"),r=(0,i.up)("IconTextUnderline"),c=(0,i.up)("IconStrikethrough"),d=(0,i.up)("IconFontSize"),f=(0,i.up)("IconAlignTextLeft"),b=(0,i.up)("IconAlignTextCenter"),_=(0,i.up)("IconAlignTextRight"),I=(0,i.up)("IconCopy"),S=(0,i.up)("IconDelete"),C=(0,i.up)("IconSendToBack"),L=(0,i.up)("IconBringToFrontOne"),E=(0,i.up)("IconBringToFront"),T=(0,i.up)("IconSentToBack"),M=(0,i.up)("IconAlignLeft"),U=(0,i.up)("IconAlignVertically"),W=(0,i.up)("IconAlignRight"),D=(0,i.up)("IconAlignTop"),H=(0,i.up)("IconAlignHorizontally"),F=(0,i.up)("IconAlignBottom");return(0,i.wg)(),(0,i.iD)("div",jL,[(0,i.Wm)(Vd,{tabs:p,value:v.value,"onUpdate:value":l[0]||(l[0]=e=>v.value=e),tabsStyle:{marginBottom:"8px"},tabStyle:{width:"30%",margin:"0 10%"}},null,8,["value"]),(0,i._)("div",YL,["style"===v.value?((0,i.wg)(),(0,i.iD)("div",VL,[(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[1]||(l[1]=e=>w("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["checked"]),(0,i.Wm)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[2]||(l[2]=e=>w("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["checked"]),(0,i.Wm)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[3]||(l[3]=e=>w("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"]),(0,i.Wm)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[4]||(l[4]=e=>w("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[5]||(l[5]=e=>w("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("+")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[6]||(l[6]=e=>w("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("-")])),_:1})])),_:1}),(0,i.Wm)(Dc,{style:{margin:"20px 0"}}),(0,i.Wm)(Qf,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[7]||(l[7]=e=>w("align",e))},{default:(0,i.w5)((()=>[(0,i.Wm)(Xf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1}),(0,i.Wm)(Xf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(b)])),_:1}),(0,i.Wm)(Xf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(_)])),_:1})])),_:1},8,["value"]),(0,i.Wm)(Dc,{style:{margin:"20px 0"}}),(0,i._)("div",JL,[qL,(0,i._)("div",XL,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>x(e)},[(0,i._)("div",{class:"color-block",style:(0,ae.j5)({backgroundColor:e})},null,4)],8,GL))),64))])]),(0,i._)("div",KL,[QL,(0,i._)("div",eE,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>k(e)},[(0,i._)("div",{class:"color-block",style:(0,ae.j5)({backgroundColor:e})},null,4)],8,tE))),64))])])])):(0,i.kq)("",!0),"common"===v.value?((0,i.wg)(),(0,i.iD)("div",lE,[(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[8]||(l[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(I,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[9]||(l[9]=e=>(0,s.SU)(g)())},{default:(0,i.w5)((()=>[(0,i.Wm)(S,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Dc,{style:{margin:"20px 0"}}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[10]||(l[10]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(C,{class:"icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[11]||(l[11]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(L,{class:"icon"}),(0,i.Uk)(" 置底")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[12]||(l[12]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(E,{class:"icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[13]||(l[13]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{class:"icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Dc,{style:{margin:"20px 0"}}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[14]||(l[14]=e=>(0,s.SU)(h)((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(M,{class:"icon"}),(0,i.Uk)(" 左对齐")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[15]||(l[15]=e=>(0,s.SU)(h)((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U,{class:"icon"}),(0,i.Uk)(" 水平居中")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[16]||(l[16]=e=>(0,s.SU)(h)((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(W,{class:"icon"}),(0,i.Uk)(" 右对齐")])),_:1})])),_:1}),(0,i.Wm)(Vf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[17]||(l[17]=e=>(0,s.SU)(h)((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(D,{class:"icon"}),(0,i.Uk)(" 上对齐")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[18]||(l[18]=e=>(0,s.SU)(h)((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(H,{class:"icon"}),(0,i.Uk)(" 垂直居中")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[19]||(l[19]=e=>(0,s.SU)(h)((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(F,{class:"icon"}),(0,i.Uk)(" 下对齐")])),_:1})])),_:1})])):(0,i.kq)("",!0)])])}}});const nE=(0,Nl.Z)(aE,[["__scopeId","data-v-f3d1ac70"]]);var oE=nE;const iE={class:"mobile-editor-header"},sE={class:"history"};var rE=(0,i.aZ)({__name:"Header",props:{changeMode:{type:Function}},setup(e){const{canUndo:t,canRedo:l}=(0,o.Jk)(Y()),{redo:a,undo:r}=ra();return(e,o)=>{const u=(0,i.up)("IconBack"),c=(0,i.up)("IconNext"),d=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",iE,[(0,i._)("div",sE,[(0,i._)("div",{class:(0,ae.C_)(["history-item",{disable:!(0,s.SU)(t)}]),onClick:o[0]||(o[0]=(0,n.iM)((e=>(0,s.SU)(r)()),["stop"]))},[(0,i.Wm)(u),(0,i.Uk)(" 撤销")],2),(0,i._)("div",{class:(0,ae.C_)(["history-item",{disable:!(0,s.SU)(l)}]),onClick:o[1]||(o[1]=(0,n.iM)((e=>(0,s.SU)(a)()),["stop"]))},[(0,i.Wm)(c),(0,i.Uk)(" 重做")],2)]),(0,i._)("div",{class:"back",onClick:o[2]||(o[2]=t=>e.changeMode("preview"))},[(0,i.Wm)(d),(0,i.Uk)(" 退出编辑")])])}}});const uE=(0,Nl.Z)(rE,[["__scopeId","data-v-5c34ab81"]]);var cE=uE;const dE={class:"mobile-editor"};var pE=(0,i.aZ)({__name:"index",props:{changeMode:{type:Function}},setup(e){const t=F(),l=$(),{slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),{activeElementIdList:u,handleElement:c}=(0,o.Jk)(l),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)([]),m=(0,i.Fl)((()=>n.value.background)),{backgroundStyle:h}=vu(m),f=(0,i.Fl)((()=>{if(!d.value)return 1;const e=d.value.clientWidth,t=d.value.clientHeight,l=t/e;return l>=r.value?(e-20)/la:(t-20)/r.value/la}));(0,i.bv)((()=>{u.value.length&&l.setActiveElementIdList([]),0!==a.value&&t.updateSlideIndex(0)}));const g=(0,i.Fl)((()=>({width:la*f.value+"px",height:la*r.value*f.value+"px"}))),y=(0,s.iH)([]),w=()=>{y.value=n.value?JSON.parse(JSON.stringify(n.value.elements)):[]};(0,i.m0)(w);const{dragElement:x}=Rn(y,v,f),{scaleElement:k}=zn(y,v,f),{rotateElement:b}=Dn(y,p,f),_=(e,t,a=!0)=>{u.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),a&&x(e,t)},I=()=>{l.setActiveElementIdList([])};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",dE,[(0,i.Wm)(cE,{changeMode:e.changeMode},null,8,["changeMode"]),(0,i._)("div",{class:"content",ref_key:"contentRef",ref:d,onTouchstart:t[0]||(t[0]=e=>I())},[(0,i._)("div",{class:"viewport-wrapper",style:(0,ae.j5)(g.value)},[(0,i._)("div",{class:"background",style:(0,ae.j5)((0,s.SU)(h))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((e,t)=>((0,i.wg)(),(0,i.j4)(wu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:f.value},null,8,["type","axis","length","canvasScale"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["line"!==e.type?((0,i.wg)(),(0,i.j4)(ML,{key:0,elementInfo:e,isSelected:(0,s.SU)(u).includes(e.id),canvasScale:f.value,scaleElement:(0,s.SU)(k),rotateElement:(0,s.SU)(b)},null,8,["elementInfo","isSelected","canvasScale","scaleElement","rotateElement"])):(0,i.kq)("",!0)],64)))),128)),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:p,style:(0,ae.j5)({transform:`scale(${f.value})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.j4)(LL,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:_},null,8,["elementInfo","elementIndex"])))),128))],4)],4)],544),(0,i.Wm)(BL),(0,s.SU)(c)?((0,i.wg)(),(0,i.j4)(oE,{key:0})):(0,i.kq)("",!0)]))}});const vE=(0,Nl.Z)(pE,[["__scopeId","data-v-3756d058"]]);var mE=vE;const hE={class:"header"};var fE=(0,i.aZ)({__name:"MobilePlayer",props:{changeMode:{type:Function}},setup(e){const t=F(),{slides:l,slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),u=(0,s.iH)(!1),c=(0,s.iH)({width:0,height:0});(0,i.bv)((()=>{0!==a.value&&t.updateSlideIndex(0),c.value={width:document.body.clientHeight,height:document.body.clientWidth}}));const d=(0,i.Fl)((()=>{const e=c.value.height/c.value.width;let t=0,l=0;return e>=r.value?(t=c.value.width,l=t*r.value):(l=c.value.height,t=l/r.value),{width:t,height:l}})),p=(0,s.iH)(null),v=e=>{p.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},m=e=>{if(!p.value)return;const n=Math.abs(p.value.y-e.changedTouches[0].pageY),o=e.changedTouches[0].pageX-p.value.x;Math.abs(o)>n&&Math.abs(o)>50&&(p.value=null,o<0&&a.value>0&&t.updateSlideIndex(a.value-1),o>0&&a.value{const o=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-player",style:(0,ae.j5)({width:c.value.width+"px",height:c.value.height+"px",transform:`rotate(90deg) translateY(-${c.value.height}px)`})},[(0,i._)("div",{class:"screen-slide-list",onClick:t[0]||(t[0]=e=>u.value=!u.value),onTouchstart:t[1]||(t[1]=e=>v(e)),onTouchend:t[2]||(t[2]=e=>m(e))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slide-item",`turning-mode-${e.turningMode||"slideY"}`,{current:t===(0,s.SU)(a),before:t<(0,s.SU)(a),after:t>(0,s.SU)(a),hide:(t===(0,s.SU)(a)-1||t===(0,s.SU)(a)+1)&&e.turningMode!==(0,s.SU)(n).turningMode}]),key:e.id},[Math.abs((0,s.SU)(a)-t)<2?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,ae.j5)({width:d.value.width+"px",height:d.value.height+"px"})},[(0,i.Wm)(Bd,{slide:e,size:d.value.width},null,8,["slide","size"])],4)):(0,i.kq)("",!0)],2)))),128))],32),u.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",hE,[(0,i._)("div",{class:"back",onClick:t[3]||(t[3]=t=>e.changeMode("preview"))},[(0,i.Wm)(o),(0,i.Uk)(" 退出播放")])]),(0,i.Wm)(AL,{class:"thumbnails"})],64)):(0,i.kq)("",!0)],4)}}});const gE=(0,Nl.Z)(fE,[["__scopeId","data-v-62f26eba"]]);var yE=gE;const wE={class:"thumbnail-list"},xE={class:"menu"};var kE=(0,i.aZ)({__name:"MobilePreview",props:{changeMode:{type:Function}},setup(e){const{slides:t}=(0,o.Jk)(F()),{slidesLoadLimit:l}=km(),a=(0,s.iH)(),n=(0,s.iH)(0);return(0,i.bv)((()=>{a.value&&(n.value=a.value.clientWidth)})),(e,o)=>{const r=(0,i.up)("IconEdit"),u=(0,i.up)("IconFullScreenPlay");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-preview",ref_key:"mobileRef",ref:a},[(0,i._)("div",wE,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-item",key:e.id},[(0,i.Wm)(Bd,{slide:e,size:n.value-20,visible:t<(0,s.SU)(l)},null,8,["slide","size","visible"])])))),128))]),(0,i._)("div",xE,[(0,i._)("div",{class:"menu-item",onClick:o[0]||(o[0]=t=>e.changeMode("editor"))},[(0,i.Wm)(r,{class:"icon"}),(0,i.Uk)(" 编辑")]),(0,i.Wm)(Dc,{type:"vertical",style:{height:"30px"}}),(0,i._)("div",{class:"menu-item",onClick:o[1]||(o[1]=t=>e.changeMode("player"))},[(0,i.Wm)(u,{class:"icon"}),(0,i.Uk)(" 播放")])])],512)}}});const bE=(0,Nl.Z)(kE,[["__scopeId","data-v-53dd42dc"]]);var _E=bE;const IE={class:"mobile"};var SE=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("preview"),l=e=>t.value=e,a=(0,i.Fl)((()=>{const e={editor:mE,player:yE,preview:_E};return e[t.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",IE,[((0,i.wg)(),(0,i.j4)((0,i.LL)(a.value),{changeMode:l}))]))}});const CE=(0,Nl.Z)(SE,[["__scopeId","data-v-9826ff08"]]);var LE=CE,EE=(0,i.aZ)({__name:"App",setup(e){const t=X(),l=$(),a=Y(),{databaseId:n}=(0,o.Jk)(l),{screening:r}=(0,o.Jk)(J());return window.onbeforeunload=()=>!1,(0,i.bv)((async()=>{await B(),a.initSnapshotDatabase(),l.setAvailableFonts()})),window.addEventListener("unload",(()=>{const e=localStorage.getItem(P),t=e?JSON.parse(e):[];t.push(n.value);const l=JSON.stringify(t);localStorage.setItem(P,l)})),(e,l)=>(0,s.SU)(r)?((0,i.wg)(),(0,i.j4)(IL,{key:0})):(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(NS,{key:1})):((0,i.wg)(),(0,i.j4)(LE,{key:2}))}});const TE=EE;var ME=TE,UE=l(5205);(0,UE.z)("service-worker.js",{ready(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered(){console.log("Service worker has been registered.")},cached(){console.log("Content has been cached for offline use.")},updatefound(){console.log("New content is downloading.")},updated(){console.log("New content is available; please refresh.")},offline(){console.log("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});l(9744),l(9091);const WE={class:"menu-content"},DE=["onClick"],HE={class:"text"},FE={key:0,class:"sub-text"};var AE=(0,i.aZ)({__name:"MenuContent",props:{menus:{},handleClickMenuItem:{type:Function}},setup(e){return(e,t)=>{const l=(0,i.up)("menu-content",!0);return(0,i.wg)(),(0,i.iD)("ul",WE,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.menus,((t,a)=>((0,i.wg)(),(0,i.iD)(i.HY,{key:t.text||a},[t.hide?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("li",{key:0,class:(0,ae.C_)(["menu-item",{divider:t.divider,disable:t.disable}]),onClick:(0,n.iM)((l=>e.handleClickMenuItem(t)),["stop"])},[t.divider?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[(0,i._)("span",HE,(0,ae.zw)(t.text),1),t.subText&&!t.children?((0,i.wg)(),(0,i.iD)("span",FE,(0,ae.zw)(t.subText),1)):(0,i.kq)("",!0),t.children&&t.children.length?((0,i.wg)(),(0,i.j4)(l,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):(0,i.kq)("",!0)],2))],10,DE))],64)))),128))])}}});const ZE=(0,Nl.Z)(AE,[["__scopeId","data-v-77e74b43"]]);var $E=ZE,OE=(0,i.aZ)({__name:"index",props:{axis:{},el:{},menus:{},removeContextmenu:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=170,l=30,a=11,n=5,{x:o,y:i}=t.axis,s=t.menus.filter((e=>!(e.divider||e.hide))).length,r=t.menus.filter((e=>e.divider)).length,u=e,c=s*l+r*a+2*n,d=document.body.clientWidth,p=document.body.clientHeight;return{left:d<=o+u?o-u:o,top:p<=i+c?i-c:i}})),a=e=>{e.disable||e.children&&!e.handler||(e.handler&&e.handler(t.el),t.removeContextmenu())};return(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",{class:"mask",onContextmenu:t[0]||(t[0]=(0,n.iM)((t=>e.removeContextmenu()),["prevent"])),onMousedown:t[1]||(t[1]=t=>e.removeContextmenu())},null,32),(0,i._)("div",{class:"contextmenu",style:(0,ae.j5)({left:l.value.left+"px",top:l.value.top+"px"}),onContextmenu:t[2]||(t[2]=(0,n.iM)((()=>{}),["prevent"]))},[(0,i.Wm)($E,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}});const zE=OE;var PE=zE;const RE="CTX_CONTEXTMENU_HANDLER",BE=(e,t,l)=>{t.stopPropagation(),t.preventDefault();const a=l.value(e);if(!a)return;let o=null;const s=()=>{o&&(document.body.removeChild(o),o=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",s),window.removeEventListener("resize",s)},r={axis:{x:t.x,y:t.y},el:e,menus:a,removeContextmenu:s};o=document.createElement("div");const u=(0,i.Wm)(PE,r,null);(0,n.sY)(u,o),document.body.appendChild(o),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",s),window.addEventListener("resize",s)},NE={mounted(e,t){e[RE]=l=>BE(e,l,t),e.addEventListener("contextmenu",e[RE])},unmounted(e){e&&e[RE]&&(e.removeEventListener("contextmenu",e[RE]),delete e[RE])}};var jE=NE;const YE="CTX_CLICK_OUTSIDE_HANDLER",VE=(e,t,l)=>{const a=l.value,n=t.composedPath(),o=n?n.indexOf(e)<0:!e.contains(t.target);o&&a(t)},JE={mounted(e,t){e[YE]=l=>VE(e,l,t),setTimeout((()=>{document.addEventListener("click",e[YE])}),0)},unmounted(e){e[YE]&&(document.removeEventListener("click",e[YE]),delete e[YE])}};var qE=JE;const XE="TOOLTIP_INSTANCE",GE={mounted(e,t){let l="",a="top",n=[300,0];"string"===typeof t.value?l=t.value:(l=t.value.content,void 0!==t.value.placement&&(a=t.value.placement),void 0!==t.value.delay&&(n=t.value.delay)),e[XE]=(0,nn.ZP)(e,{content:l,theme:"tooltip",duration:100,animation:"scale",allowHTML:!0,placement:a,delay:n})},updated(e,t){let l="";l="string"===typeof t.value?t.value:t.value.content,e[XE]&&e[XE].setContent(l)},unmounted(e){e[XE]&&e[XE].destroy()}};var KE=GE,QE={install(e){e.directive("contextmenu",jE),e.directive("click-outside",qE),e.directive("tooltip",KE)}};const eT=(0,n.ri)(ME);eT.use(Al),eT.use(QE),eT.use((0,o.WB)()),eT.mount("#app")},2480:function(){},3180:function(){},7687:function(){}},t={};function l(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,l),o.loaded=!0,o.exports}l.m=e,function(){var e=[];l.O=function(t,a,n,o){if(!a){var i=1/0;for(c=0;c=o)&&Object.keys(l.O).every((function(e){return l.O[e](a[r])}))?a.splice(r--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,n,o]}}(),function(){l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,{a:t}),t}}(),function(){l.d=function(e,t){for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){l.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};l.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,o,i=a[0],s=a[1],r=a[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(n in s)l.o(s,n)&&(l.m[n]=s[n]);if(r)var c=r(l)}for(t&&t(a);u {\n const { empty } = view.state.selection\n if (empty) selectAll(view.state, view.dispatch)\n}\n\nexport const addMark = (editorView: EditorView, mark: Mark, selection?: { from: number; to: number; }) => {\n if (selection) {\n editorView.dispatch(editorView.state.tr.addMark(selection.from, selection.to, mark))\n }\n else {\n const { $from, $to } = editorView.state.selection\n editorView.dispatch(editorView.state.tr.addMark($from.pos, $to.pos, mark))\n }\n}\n\nexport const findNodesWithSameMark = (doc: Node, from: number, to: number, markType: MarkType) => {\n let ii = from\n const finder = (mark: Mark) => mark.type === markType\n let firstMark = null\n let fromNode = null\n let toNode = null\n\n while (ii <= to) {\n const node = doc.nodeAt(ii)\n if (!node || !node.marks) return null\n\n const mark = node.marks.find(finder)\n if (!mark) return null\n\n if (firstMark && mark !== firstMark) return null\n\n fromNode = fromNode || node\n firstMark = firstMark || mark\n toNode = node\n ii++\n }\n\n let fromPos = from\n let toPos = to\n\n let jj = 0\n ii = from - 1\n while (ii > jj) {\n const node = doc.nodeAt(ii)\n const mark = node && node.marks.find(finder)\n if (!mark || mark !== firstMark) break\n fromPos = ii\n fromNode = node\n ii--\n }\n\n ii = to + 1\n jj = doc.nodeSize - 2\n while (ii < jj) {\n const node = doc.nodeAt(ii)\n const mark = node && node.marks.find(finder)\n if (!mark || mark !== firstMark) break\n toPos = ii\n toNode = node\n ii++\n }\n\n return {\n mark: firstMark,\n from: {\n node: fromNode,\n pos: fromPos,\n },\n to: {\n node: toNode,\n pos: toPos,\n },\n }\n}\n\nconst equalNodeType = (nodeType: NodeType, node: Node) => {\n return Array.isArray(nodeType) && nodeType.indexOf(node.type) > -1 || node.type === nodeType\n}\n\nconst findParentNodeClosestToPos = ($pos: ResolvedPos, predicate: (node: Node) => boolean) => {\n for (let i = $pos.depth; i > 0; i--) {\n const node = $pos.node(i)\n if (predicate(node)) {\n return {\n pos: i > 0 ? $pos.before(i) : 0,\n start: $pos.start(i),\n depth: i,\n node,\n }\n }\n }\n}\n\nexport const findParentNode = (predicate: (node: Node) => boolean) => {\n return (_ref: Selection) => findParentNodeClosestToPos(_ref.$from, predicate)\n}\n\nexport const findParentNodeOfType = (nodeType: NodeType) => {\n return (selection: Selection) => {\n return findParentNode((node: Node) => {\n return equalNodeType(nodeType, node)\n })(selection)\n }\n}\n\nexport const isActiveOfParentNodeType = (nodeType: string, state: EditorState) => {\n const node = state.schema.nodes[nodeType]\n return !!findParentNodeOfType(node)(state.selection)\n}\n\nexport const getMarkAttrs = (view: EditorView) => {\n const { selection, doc } = view.state\n const { from } = selection\n\n let node = doc.nodeAt(from) || doc.nodeAt(from - 1)\n if (node?.lastChild) node = node.lastChild\n\n return node?.marks || []\n}\n\nexport const getAttrValue = (marks: readonly Mark[], markType: string, attr: string): string | null => {\n for (const mark of marks) {\n if (mark.type.name === markType && mark.attrs[attr]) return mark.attrs[attr]\n }\n return null\n}\n\nexport const isActiveMark = (marks: readonly Mark[], markType: string) => {\n for (const mark of marks) {\n if (mark.type.name === markType) return true\n }\n return false\n}\n\nexport const markActive = (state: EditorState, type: MarkType) => {\n const { from, $from, to, empty } = state.selection\n if (empty) return type.isInSet(state.storedMarks || $from.marks())\n return state.doc.rangeHasMark(from, to, type)\n}\n\nexport const getAttrValueInSelection = (view: EditorView, attr: string) => {\n const { selection, doc } = view.state\n const { from, to } = selection\n\n let keepChecking = true\n let value = ''\n doc.nodesBetween(from, to, node => {\n if (keepChecking && node.attrs[attr]) {\n keepChecking = false\n value = node.attrs[attr]\n }\n return keepChecking\n })\n return value\n}\n\ntype Align = 'left' | 'right' | 'center'\n\ninterface DefaultAttrs {\n color: string\n backcolor: string\n fontsize: string\n fontname: string\n align: Align\n}\nconst _defaultAttrs: DefaultAttrs = {\n color: '#000',\n backcolor: '',\n fontsize: '20px',\n fontname: '微软雅黑',\n align: 'left',\n}\nexport const getTextAttrs = (view: EditorView, attrs: Partial = {}) => {\n const defaultAttrs: DefaultAttrs = { ..._defaultAttrs, ...attrs }\n\n const marks = getMarkAttrs(view)\n\n const isBold = isActiveMark(marks, 'strong')\n const isEm = isActiveMark(marks, 'em')\n const isUnderline = isActiveMark(marks, 'underline')\n const isStrikethrough = isActiveMark(marks, 'strikethrough')\n const isSuperscript = isActiveMark(marks, 'superscript')\n const isSubscript = isActiveMark(marks, 'subscript')\n const isCode = isActiveMark(marks, 'code')\n const color = getAttrValue(marks, 'forecolor', 'color') || defaultAttrs.color\n const backcolor = getAttrValue(marks, 'backcolor', 'backcolor') || defaultAttrs.backcolor\n const fontsize = getAttrValue(marks, 'fontsize', 'fontsize') || defaultAttrs.fontsize\n const fontname = getAttrValue(marks, 'fontname', 'fontname') || defaultAttrs.fontname\n const link = getAttrValue(marks, 'link', 'href') || ''\n const align = (getAttrValueInSelection(view, 'align') || defaultAttrs.align) as Align\n const isBulletList = isActiveOfParentNodeType('bullet_list', view.state)\n const isOrderedList = isActiveOfParentNodeType('ordered_list', view.state)\n const isBlockquote = isActiveOfParentNodeType('blockquote', view.state)\n\n return {\n bold: isBold,\n em: isEm,\n underline: isUnderline,\n strikethrough: isStrikethrough,\n superscript: isSuperscript,\n subscript: isSubscript,\n code: isCode,\n color: color,\n backcolor: backcolor,\n fontsize: fontsize,\n fontname: fontname,\n link: link,\n align: align,\n bulletList: isBulletList,\n orderedList: isOrderedList,\n blockquote: isBlockquote,\n }\n}\n\nexport type TextAttrs = ReturnType\n\nexport const getFontsize = (view: EditorView) => {\n const marks = getMarkAttrs(view)\n const fontsize = getAttrValue(marks, 'fontsize', 'fontsize') || _defaultAttrs.fontsize\n return parseInt(fontsize)\n}\n\nexport const defaultRichTextAttrs: TextAttrs = {\n bold: false,\n em: false,\n underline: false,\n strikethrough: false,\n superscript: false,\n subscript: false,\n code: false,\n color: '#000',\n backcolor: '',\n fontsize: '20px',\n fontname: '微软雅黑',\n link: '',\n align: 'left',\n bulletList: false,\n orderedList: false,\n blockquote: false,\n}","export const SYS_FONTS = [\n { label: 'Arial', value: 'Arial' },\n { label: '微软雅黑', value: 'Microsoft Yahei' },\n { label: '宋体', value: 'SimSun' },\n { label: '黑体', value: 'SimHei' },\n { label: '楷体', value: 'KaiTi' },\n { label: '新宋体', value: 'NSimSun' },\n { label: '仿宋', value: 'FangSong' },\n { label: '苹方', value: 'PingFang SC' },\n { label: '华文黑体', value: 'STHeiti' },\n { label: '华文楷体', value: 'STKaiti' },\n { label: '华文宋体', value: 'STSong' },\n { label: '华文仿宋', value: 'STFangSong' },\n { label: '华文中宋', value: 'STZhongSong' },\n { label: '华文琥珀', value: 'STHupo' },\n { label: '华文新魏', value: 'STXinwei' },\n { label: '华文隶书', value: 'STLiti' },\n { label: '华文行楷', value: 'STXingkai' },\n { label: '冬青黑体', value: 'Hiragino Sans GB' },\n { label: '兰亭黑', value: 'Lantinghei SC' },\n { label: '偏偏体', value: 'Hanzipen SC' },\n { label: '手札体', value: 'Hannotate SC' },\n { label: '宋体', value: 'Songti SC' },\n { label: '娃娃体', value: 'Wawati SC' },\n { label: '行楷', value: 'Xingkai SC' },\n { label: '圆体', value: 'Yuanti SC' },\n { label: '华文细黑', value: 'STXihei' },\n { label: '幼圆', value: 'YouYuan' },\n { label: '隶书', value: 'LiSu' },\n]\n\nexport const WEB_FONTS = [\n { label: '得意黑', value: '得意黑' },\n { label: '仓耳小丸子', value: '仓耳小丸子' },\n { label: '优设标题黑', value: '优设标题黑' },\n { label: '峰广明锐体', value: '峰广明锐体' },\n { label: '摄图摩登小方体', value: '摄图摩登小方体' },\n { label: '站酷快乐体', value: '站酷快乐体' },\n { label: '字制区喜脉体', value: '字制区喜脉体' },\n { label: '素材集市康康体', value: '素材集市康康体' },\n { label: '素材集市酷方体', value: '素材集市酷方体' },\n { label: '途牛类圆体', value: '途牛类圆体' },\n { label: '锐字真言体', value: '锐字真言体' },\n]","/**\n * 判断操作系统是否存在某字体\n * @param fontName 字体名\n */\nexport const isSupportFont = (fontName: string) => {\n if (typeof fontName !== 'string') return false\n\n const arial = 'Arial'\n if (fontName.toLowerCase() === arial.toLowerCase()) return true\n\n const size = 100\n const width = 100\n const height = 100\n const str = 'a'\n\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d', { willReadFrequently: true })\n\n if (!ctx) return false\n\n canvas.width = width\n canvas.height = height\n ctx.textAlign = 'center'\n ctx.fillStyle = 'black'\n ctx.textBaseline = 'middle'\n\n const getDotArray = (_fontFamily: string) => {\n ctx.clearRect(0, 0, width, height)\n ctx.font = `${size}px ${_fontFamily}, ${arial}`\n ctx.fillText(str, width / 2, height / 2)\n const imageData = ctx.getImageData(0, 0, width, height).data\n return [].slice.call(imageData).filter(item => item !== 0)\n }\n\n return getDotArray(arial).join('') !== getDotArray(fontName).join('')\n}","import type { Slide } from '@/types/slides'\n\nexport const slides: Slide[] = [\n {\n id: 'test-slide-1',\n elements: [\n {\n type: 'shape',\n id: '4cbRxp',\n left: 0,\n top: 200,\n width: 546,\n height: 362.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n opacity: 0.7,\n rotate: 0\n },\n {\n type: 'shape',\n id: 'ookHrf',\n left: 0,\n top: 0,\n width: 300,\n height: 320,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n flipV: true,\n rotate: 0\n },\n {\n type: 'text',\n id: 'idn7Mx',\n left: 355,\n top: 65.25,\n width: 585,\n height: 188,\n lineHeight: 1.2,\n content: '

PPTIST

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333'\n },\n {\n type: 'text',\n id: '7stmVP',\n left: 355,\n top: 253.25,\n width: 585,\n height: 56,\n content: '

基于 Vue 3.x + TypeScript 的在线演示文稿应用

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333'\n },\n {\n type: 'line',\n id: 'FnpZs4',\n left: 361,\n top: 238,\n start: [0, 0],\n end: [549, 0],\n points: ['', ''],\n color: '#5b9bd5',\n style: 'solid',\n width: 2,\n },\n ],\n background: {\n type: 'solid',\n color: '#ffffff',\n },\n },\n {\n id: 'test-slide-2',\n elements: [\n {\n type: 'text',\n id: 'ptNnUJ',\n left: 145,\n top: 148,\n width: 711,\n height: 77,\n lineHeight: 1.2,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n }, \n {\n type: 'text',\n id: 'mRHvQN',\n left: 207.50000000000003,\n top: 249.84259259259264,\n width: 585,\n height: 56,\n content: '

在此处添加副标题

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n }, \n {\n type: 'line',\n id: '7CQDwc',\n left: 323.09259259259267,\n top: 238.33333333333334,\n start: [0, 0],\n end: [354.8148148148148, 0],\n points: ['', ''],\n color: '#5b9bd5',\n style: 'solid',\n width: 4\n }, \n {\n type: 'shape',\n id: '09wqWw',\n left: -27.648148148148138,\n top: 432.73148148148147,\n width: 1056.2962962962963,\n height: 162.96296296296296,\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '#fff',\n },\n },\n {\n id: 'test-slide-3',\n elements: [\n {\n type: 'shape',\n id: 'vSheCJ',\n left: 183.5185185185185,\n top: 175.5092592592593,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0\n }, \n {\n type: 'shape',\n id: 'Mpwv7x',\n left: 211.29629629629628,\n top: 201.80555555555557,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0,\n opacity: 0.7\n }, \n {\n type: 'text',\n id: 'WQOTAp',\n left: 304.9074074074074,\n top: 198.10185185185182,\n width: 417.9629629629629,\n height: 140,\n content: '

感谢观看

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n wordSpace: 5\n }\n ],\n background: {\n type: 'solid',\n color: '#fff',\n },\n },\n]","import type { SlideTheme } from '@/types/slides'\n\nexport const theme: SlideTheme = {\n themeColor: '#5b9bd5',\n fontColor: '#333',\n fontName: 'Microsoft Yahei',\n backgroundColor: '#fff',\n}","/* eslint-disable max-lines */\n\nimport type { Slide } from '@/types/slides'\n\nexport const layouts: Slide[] = [\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: '4cbRxp',\n left: 0,\n top: 200,\n width: 546,\n height: 362.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n opacity: 0.7,\n rotate: 0\n },\n {\n type: 'shape',\n id: 'ookHrf',\n left: 0,\n top: 0,\n width: 300,\n height: 320,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n flipV: true,\n rotate: 0\n },\n {\n type: 'text',\n id: 'AkIh3E',\n left: 355,\n top: 95.11111111111111,\n width: 585,\n height: 116,\n lineHeight: 1.2,\n content: '

输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 6\n },\n {\n type: 'text',\n id: '7stmVP',\n left: 355,\n top: 253.25,\n width: 585,\n height: 56,\n content: '

请在此处输入副标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n },\n {\n type: 'line',\n id: 'FnpZs4',\n left: 361,\n top: 238,\n start: [0, 0],\n end: [549, 0],\n points: ['', ''],\n color: '{{themeColor}}',\n style: 'solid',\n width: 2,\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'ptNnUJ',\n left: 145,\n top: 148,\n width: 711,\n height: 77,\n lineHeight: 1.2,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'mRHvQN',\n left: 207.50000000000003,\n top: 249.84259259259264,\n width: 585,\n height: 56,\n content: '

在此处添加副标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'line',\n id: '7CQDwc',\n left: 323.09259259259267,\n top: 238.33333333333334,\n start: [0, 0],\n end: [354.8148148148148, 0],\n points: ['', ''],\n color: '{{themeColor}}',\n style: 'solid',\n width: 4\n }, \n {\n type: 'shape',\n id: '09wqWw',\n left: -27.648148148148138,\n top: 432.73148148148147,\n width: 1056.2962962962963,\n height: 162.96296296296296,\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'vSheCJ',\n left: 183.5185185185185,\n top: 175.5092592592593,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n }, \n {\n type: 'shape',\n id: 'Mpwv7x',\n left: 211.29629629629628,\n top: 201.80555555555557,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n opacity: 0.7\n }, \n {\n type: 'text',\n id: 'WQOTAp',\n left: 304.9074074074074,\n top: 198.10185185185182,\n width: 417.9629629629629,\n height: 140,\n content: '

感谢观看

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 5\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'MZVO1kkj',\n elements: [\n {\n type: 'shape',\n id: 'cql0h8',\n left: 0,\n top: 0,\n width: 352.59259259259255,\n height: 562.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n },\n {\n type: 'shape',\n id: '_RTaF4',\n left: 171.4814814814814,\n top: 100.13888888888887,\n width: 362.22222222222223,\n height: 362.22222222222223,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: 'rgba(255,255,255,0)',\n fixedRatio: false,\n rotate: 0,\n outline: {\n width: 10,\n color: '{{backgroundColor}}',\n style: 'solid'\n }\n },\n {\n type: 'shape',\n id: 'UZfo8N',\n left: 216.66666666666663,\n top: 145.32407407407408,\n width: 271.85185185185185,\n height: 271.85185185185185,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

01

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n },\n {\n type: 'text',\n id: 'ysqtBg',\n left: 561.4814814814814,\n top: 100.1388888888889,\n width: 359.25925925925924,\n height: 80,\n content: '

在此处输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n },\n {\n type: 'text',\n id: 'lXsoHa',\n left: 572.5925925925925,\n top: 202.3611111111111,\n width: 257.77777777777777,\n height: 260,\n content: '
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n lineHeight: 2,\n fill: '{{subColor}}'\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'EBBnTr',\n left: 360.5996472663139,\n top: 141.8496472663139,\n width: 278.80070546737215,\n height: 278.80070546737215,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 0,\n color: '{{backgroundColor}}',\n style: 'solid'\n }\n }, \n {\n type: 'shape',\n id: 'gDIWDH',\n left: 456.4373897707231,\n top: 98.287037037037,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

1

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'DUWT7E',\n left: 317.037037037037,\n top: 237.68738977072314,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

4

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'pbhn38',\n left: 456.43738977072303,\n top: 377.08774250440916,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

3

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'CvMKrO',\n left: 595.8377425044091,\n top: 237.6873897707231,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

2

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'adudHB',\n left: 402.962962962963,\n top: 39.39814814814815,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: '9UpDwg',\n left: 402.962962962963,\n top: 473.1018518518518,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'GERdpB',\n left: 111.48148148148151,\n top: 256.25,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'G5qoho',\n left: 691.1111111111111,\n top: 256.25,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'shape',\n id: 'vdZcI6',\n left: 415.18518518518516,\n top: 196.4351851851852,\n width: 169.62962962962962,\n height: 169.62962962962962,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'tYUmrx',\n left: 156.66666666666683,\n top: 149.02777777777771,\n width: 264.4444444444445,\n height: 264.4444444444445,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

01

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n },\n {\n type: 'shape',\n id: '0GVHf8',\n left: 342.2222222222223,\n top: 217.17592592592587,\n width: 128.14814814814812,\n height: 128.14814814814812,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0\n },\n {\n type: 'text',\n id: 'BO33Sv',\n left: 378.8888888888889,\n top: 235.24999999999994,\n width: 464.4444444444444,\n height: 92,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'Hj7ttp',\n left: 69.35185185185185,\n top: 49.21759259259262,\n width: 420,\n height: 63,\n lineHeight: 1.2,\n content: '

1.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'FmKMNB',\n left: 69.35185185185185,\n top: 129.28240740740745,\n width: 420,\n height: 384,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'rI7ZeO',\n left: 510.64814814814815,\n top: 49.21759259259262,\n width: 420,\n height: 63,\n lineHeight: 1.2,\n content: '

2.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'KspwGc',\n left: 510.64814814814815,\n top: 129.28240740740745,\n width: 420,\n height: 384,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'Rx63Jo',\n left: 69.35185185185179,\n top: 51.71759259259262,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

1.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'ulyuzE',\n left: 69.35185185185179,\n top: 131.78240740740745,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'kr35Ca',\n left: 510.6481481481481,\n top: 51.71759259259262,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

2.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'BNQSpC',\n left: 510.6481481481481,\n top: 131.78240740740745,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'Vr38Nu',\n left: 69.35185185185185,\n top: 301.71759259259255,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

3.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'IwKRSu',\n left: 69.35185185185185,\n top: 381.7824074074074,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: '0Opr1v',\n left: 510.64814814814815,\n top: 301.71759259259255,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

4.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: '4L9Uzz',\n left: 510.64814814814815,\n top: 381.7824074074074,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'GdEGxg',\n left: 134.53703703703704,\n top: 127.25,\n width: 152.77777777777777,\n height: 308,\n lineHeight: 1.8,\n content: '

请在此处输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 8,\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'y5sAfw',\n left: 332.8703703703704,\n top: 127.25,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容1

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'VeuocM',\n left: 332.8703703703704,\n top: 212.0648148148148,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容2

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'RyFWQe',\n left: 332.8703703703704,\n top: 296.8796296296296,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容3

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'Q56viI',\n left: 332.8703703703704,\n top: 381.69444444444446,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容4

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'SUWirT',\n left: 73.8888888888889,\n top: 64.21296296296302,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

1

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'YjzN1M',\n left: 148.70370370370372,\n top: 64.21296296296302,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'fS09I7',\n left: 527.5925925925926,\n top: 64.21296296296302,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

2

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'qCnfB1',\n left: 602.4074074074074,\n top: 64.21296296296302,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n },\n {\n type: 'shape',\n id: 'difAAT',\n left: 73.8888888888889,\n top: 221.25000000000003,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

3

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'EUlvMo',\n left: 148.70370370370372,\n top: 221.25000000000003,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'US_9jB',\n left: 527.5925925925926,\n top: 221.25000000000003,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

4

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '243MnQ',\n left: 602.4074074074074,\n top: 221.25000000000003,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'Y_KUj0',\n left: 73.8888888888889,\n top: 378.287037037037,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

5

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '9GglMe',\n left: 148.70370370370372,\n top: 378.287037037037,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'eSInje',\n left: 527.5925925925926,\n top: 378.287037037037,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

6

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '0S3yUg',\n left: 602.4074074074074,\n top: 378.287037037037,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n]","import { defineStore } from 'pinia'\nimport tinycolor from 'tinycolor2'\nimport { omit } from 'lodash'\nimport type { Slide, SlideTheme, PPTElement, PPTAnimation } from '@/types/slides'\nimport { slides } from '@/mocks/slides'\nimport { theme } from '@/mocks/theme'\nimport { layouts } from '@/mocks/layout'\n\ninterface RemoveElementPropData {\n id: string\n propName: string | string[]\n}\n\ninterface UpdateElementData {\n id: string | string[]\n props: Partial\n slideId?: string\n}\n\ninterface FormatedAnimation {\n animations: PPTAnimation[]\n autoNext: boolean\n}\n\nexport interface SlidesState {\n title: string\n theme: SlideTheme\n slides: Slide[]\n slideIndex: number\n viewportRatio: number\n}\n\nexport const useSlidesStore = defineStore('slides', {\n state: (): SlidesState => ({\n title: '未命名演示文稿', // 幻灯片标题\n theme: theme, // 主题样式\n slides: slides, // 幻灯片页面数据\n slideIndex: 0, // 当前页面索引\n viewportRatio: 0.5625, // 可视区域比例,默认16:9\n }),\n\n getters: {\n currentSlide(state) {\n return state.slides[state.slideIndex]\n },\n \n currentSlideAnimations(state) {\n const currentSlide = state.slides[state.slideIndex]\n if (!currentSlide?.animations) return []\n\n const els = currentSlide.elements\n const elIds = els.map(el => el.id)\n return currentSlide.animations.filter(animation => elIds.includes(animation.elId))\n },\n\n // 格式化的当前页动画\n // 将触发条件为“与上一动画同时”的项目向上合并到序列中的同一位置\n // 为触发条件为“上一动画之后”项目的上一项添加自动向下执行标记\n formatedAnimations(state) {\n const currentSlide = state.slides[state.slideIndex]\n if (!currentSlide?.animations) return []\n\n const els = currentSlide.elements\n const elIds = els.map(el => el.id)\n const animations = currentSlide.animations.filter(animation => elIds.includes(animation.elId))\n\n const formatedAnimations: FormatedAnimation[] = []\n for (const animation of animations) {\n if (animation.trigger === 'click' || !formatedAnimations.length) {\n formatedAnimations.push({ animations: [animation], autoNext: false })\n }\n else if (animation.trigger === 'meantime') {\n const last = formatedAnimations[formatedAnimations.length - 1]\n last.animations = last.animations.filter(item => item.elId !== animation.elId)\n last.animations.push(animation)\n formatedAnimations[formatedAnimations.length - 1] = last\n }\n else if (animation.trigger === 'auto') {\n const last = formatedAnimations[formatedAnimations.length - 1]\n last.autoNext = true\n formatedAnimations[formatedAnimations.length - 1] = last\n formatedAnimations.push({ animations: [animation], autoNext: false })\n }\n }\n return formatedAnimations\n },\n \n layouts(state) {\n const {\n themeColor,\n fontColor,\n fontName,\n backgroundColor,\n } = state.theme\n \n const subColor = tinycolor(fontColor).isDark() ? 'rgba(230, 230, 230, 0.5)' : 'rgba(180, 180, 180, 0.5)'\n \n const layoutsString = JSON.stringify(layouts)\n .replaceAll('{{themeColor}}', themeColor)\n .replaceAll('{{fontColor}}', fontColor)\n .replaceAll('{{fontName}}', fontName)\n .replaceAll('{{backgroundColor}}', backgroundColor)\n .replaceAll('{{subColor}}', subColor)\n \n return JSON.parse(layoutsString)\n },\n },\n\n actions: {\n setTitle(title: string) {\n if (!title) this.title = '未命名演示文稿'\n else this.title = title\n },\n\n setTheme(themeProps: Partial) {\n this.theme = { ...this.theme, ...themeProps }\n },\n \n setViewportRatio(viewportRatio: number) {\n this.viewportRatio = viewportRatio\n },\n \n setSlides(slides: Slide[]) {\n this.slides = slides\n },\n \n addSlide(slide: Slide | Slide[]) {\n const slides = Array.isArray(slide) ? slide : [slide]\n const addIndex = this.slideIndex + 1\n this.slides.splice(addIndex, 0, ...slides)\n this.slideIndex = addIndex\n },\n \n updateSlide(props: Partial) {\n const slideIndex = this.slideIndex\n this.slides[slideIndex] = { ...this.slides[slideIndex], ...props }\n },\n \n deleteSlide(slideId: string | string[]) {\n const slidesId = Array.isArray(slideId) ? slideId : [slideId]\n \n const deleteSlidesIndex = []\n for (let i = 0; i < slidesId.length; i++) {\n const index = this.slides.findIndex(item => item.id === slidesId[i])\n deleteSlidesIndex.push(index)\n }\n let newIndex = Math.min(...deleteSlidesIndex)\n \n const maxIndex = this.slides.length - slidesId.length - 1\n if (newIndex > maxIndex) newIndex = maxIndex\n \n this.slideIndex = newIndex\n this.slides = this.slides.filter(item => !slidesId.includes(item.id))\n },\n \n updateSlideIndex(index: number) {\n this.slideIndex = index\n },\n \n addElement(element: PPTElement | PPTElement[]) {\n const elements = Array.isArray(element) ? element : [element]\n const currentSlideEls = this.slides[this.slideIndex].elements\n const newEls = [...currentSlideEls, ...elements]\n this.slides[this.slideIndex].elements = newEls\n },\n\n deleteElement(elementId: string | string[]) {\n const elementIdList = Array.isArray(elementId) ? elementId : [elementId]\n const currentSlideEls = this.slides[this.slideIndex].elements\n const newEls = currentSlideEls.filter(item => !elementIdList.includes(item.id))\n this.slides[this.slideIndex].elements = newEls\n },\n \n updateElement(data: UpdateElementData) {\n const { id, props, slideId } = data\n const elIdList = typeof id === 'string' ? [id] : id\n\n const slideIndex = slideId ? this.slides.findIndex(item => item.id === slideId) : this.slideIndex\n const slide = this.slides[slideIndex]\n const elements = slide.elements.map(el => {\n return elIdList.includes(el.id) ? { ...el, ...props } : el\n })\n this.slides[slideIndex].elements = (elements as PPTElement[])\n },\n \n removeElementProps(data: RemoveElementPropData) {\n const { id, propName } = data\n const propsNames = typeof propName === 'string' ? [propName] : propName\n \n const slideIndex = this.slideIndex\n const slide = this.slides[slideIndex]\n const elements = slide.elements.map(el => {\n return el.id === id ? omit(el, propsNames) : el\n })\n this.slides[slideIndex].elements = (elements as PPTElement[])\n },\n },\n})","import { customAlphabet } from 'nanoid'\nimport { defineStore } from 'pinia'\nimport { ToolbarStates } from '@/types/toolbar'\nimport type { CreatingElement, ShapeFormatPainter, TextFormatPainter } from '@/types/edit'\nimport type { DialogForExportTypes } from '@/types/export'\nimport { type TextAttrs, defaultRichTextAttrs } from '@/utils/prosemirror/utils'\nimport { SYS_FONTS } from '@/configs/font'\nimport { isSupportFont } from '@/utils/font'\n\nimport { useSlidesStore } from './slides'\n\nexport interface MainState {\n activeElementIdList: string[]\n handleElementId: string\n activeGroupElementId: string\n hiddenElementIdList: string[]\n canvasPercentage: number\n canvasScale: number\n canvasDragged: boolean\n thumbnailsFocus: boolean\n editorAreaFocus: boolean\n disableHotkeys: boolean\n gridLineSize: number\n showRuler: boolean\n creatingElement: CreatingElement | null\n creatingCustomShape: boolean\n availableFonts: typeof SYS_FONTS\n toolbarState: ToolbarStates\n clipingImageElementId: string\n isScaling: boolean\n richTextAttrs: TextAttrs\n selectedTableCells: string[]\n selectedSlidesIndex: number[]\n dialogForExport: DialogForExportTypes\n databaseId: string\n textFormatPainter: TextFormatPainter | null\n shapeFormatPainter: ShapeFormatPainter | null\n showSelectPanel: boolean\n showSearchPanel: boolean\n}\n\nconst nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')\nexport const databaseId = nanoid(10)\n\nexport const useMainStore = defineStore('main', {\n state: (): MainState => ({\n activeElementIdList: [], // 被选中的元素ID集合,包含 handleElementId\n handleElementId: '', // 正在操作的元素ID\n activeGroupElementId: '', // 组合元素成员中,被选中可独立操作的元素ID\n hiddenElementIdList: [], // 被隐藏的元素ID集合\n canvasPercentage: 90, // 画布可视区域百分比\n canvasScale: 1, // 画布缩放比例(基于宽度1000px)\n canvasDragged: false, // 画布被拖拽移动\n thumbnailsFocus: false, // 左侧导航缩略图区域聚焦\n editorAreaFocus: false, // 编辑区域聚焦\n disableHotkeys: false, // 禁用快捷键\n gridLineSize: 0, // 网格线尺寸(0表示不显示网格线)\n showRuler: false, // 显示标尺\n creatingElement: null, // 正在插入的元素信息,需要通过绘制插入的元素(文字、形状、线条)\n creatingCustomShape: false, // 正在绘制任意多边形\n availableFonts: SYS_FONTS, // 当前环境可用字体\n toolbarState: ToolbarStates.SLIDE_DESIGN, // 右侧工具栏状态\n clipingImageElementId: '', // 当前正在裁剪的图片ID \n richTextAttrs: defaultRichTextAttrs, // 富文本状态\n selectedTableCells: [], // 选中的表格单元格\n isScaling: false, // 正在进行元素缩放\n selectedSlidesIndex: [], // 当前被选中的页面索引集合\n dialogForExport: '', // 导出面板\n databaseId, // 标识当前应用的indexedDB数据库ID\n textFormatPainter: null, // 文字格式刷\n shapeFormatPainter: null, // 形状格式刷\n showSelectPanel: false, // 打开选择面板\n showSearchPanel: false, // 打开查找替换面板\n }),\n\n getters: {\n activeElementList(state) {\n const slidesStore = useSlidesStore()\n const currentSlide = slidesStore.currentSlide\n if (!currentSlide || !currentSlide.elements) return []\n return currentSlide.elements.filter(element => state.activeElementIdList.includes(element.id))\n },\n \n handleElement(state) {\n const slidesStore = useSlidesStore()\n const currentSlide = slidesStore.currentSlide\n if (!currentSlide || !currentSlide.elements) return null\n return currentSlide.elements.find(element => state.handleElementId === element.id) || null\n },\n },\n\n actions: {\n setActiveElementIdList(activeElementIdList: string[]) {\n if (activeElementIdList.length === 1) this.handleElementId = activeElementIdList[0]\n else this.handleElementId = ''\n \n this.activeElementIdList = activeElementIdList\n },\n \n setHandleElementId(handleElementId: string) {\n this.handleElementId = handleElementId\n },\n \n setActiveGroupElementId(activeGroupElementId: string) {\n this.activeGroupElementId = activeGroupElementId\n },\n \n setHiddenElementIdList(hiddenElementIdList: string[]) {\n this.hiddenElementIdList = hiddenElementIdList\n },\n \n setCanvasPercentage(percentage: number) {\n this.canvasPercentage = percentage\n },\n \n setCanvasScale(scale: number) {\n this.canvasScale = scale\n },\n \n setCanvasDragged(isDragged: boolean) {\n this.canvasDragged = isDragged\n },\n \n setThumbnailsFocus(isFocus: boolean) {\n this.thumbnailsFocus = isFocus\n },\n \n setEditorareaFocus(isFocus: boolean) {\n this.editorAreaFocus = isFocus\n },\n \n setDisableHotkeysState(disable: boolean) {\n this.disableHotkeys = disable\n },\n \n setGridLineSize(size: number) {\n this.gridLineSize = size\n },\n \n setRulerState(show: boolean) {\n this.showRuler = show\n },\n \n setCreatingElement(element: CreatingElement | null) {\n this.creatingElement = element\n },\n \n setCreatingCustomShapeState(state: boolean) {\n this.creatingCustomShape = state\n },\n \n setAvailableFonts() {\n this.availableFonts = SYS_FONTS.filter(font => isSupportFont(font.value))\n },\n \n setToolbarState(toolbarState: ToolbarStates) {\n this.toolbarState = toolbarState\n },\n \n setClipingImageElementId(elId: string) {\n this.clipingImageElementId = elId\n },\n \n setRichtextAttrs(attrs: TextAttrs) {\n this.richTextAttrs = attrs\n },\n \n setSelectedTableCells(cells: string[]) {\n this.selectedTableCells = cells\n },\n \n setScalingState(isScaling: boolean) {\n this.isScaling = isScaling\n },\n \n updateSelectedSlidesIndex(selectedSlidesIndex: number[]) {\n this.selectedSlidesIndex = selectedSlidesIndex\n },\n\n setDialogForExport(type: DialogForExportTypes) {\n this.dialogForExport = type\n },\n\n setTextFormatPainter(textFormatPainter: TextFormatPainter | null) {\n this.textFormatPainter = textFormatPainter\n },\n\n setShapeFormatPainter(shapeFormatPainter: ShapeFormatPainter | null) {\n this.shapeFormatPainter = shapeFormatPainter\n },\n\n setSelectPanelState(show: boolean) {\n this.showSelectPanel = show\n },\n\n setSearchPanelState(show: boolean) {\n this.showSearchPanel = show\n },\n },\n})","export const LOCALSTORAGE_KEY_DISCARDED_DB = 'PPTIST_DISCARDED_DB'","import Dexie from 'dexie'\nimport { databaseId } from '@/store/main'\nimport type { Slide } from '@/types/slides'\nimport { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'\n\nexport interface writingBoardImg {\n id: string\n dataURL: string\n}\n\nexport interface Snapshot {\n index: number\n slides: Slide[]\n}\n\nconst databaseNamePrefix = 'PPTist'\n\n// 删除失效/过期的数据库\n// 应用关闭时(关闭或刷新浏览器),会将其数据库ID记录在 localStorage 中,表示该ID指向的数据库已失效\n// 当应用初始化时,检查当前所有数据库,将被记录失效的数据库删除\n// 另外,距离初始化时间超过12小时的数据库也将被删除(这是为了防止出现因意外未被正确删除的库)\nexport const deleteDiscardedDB = async () => {\n const now = new Date().getTime()\n\n const localStorageDiscardedDB = localStorage.getItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n const localStorageDiscardedDBList: string[] = localStorageDiscardedDB ? JSON.parse(localStorageDiscardedDB) : []\n\n const databaseNames = await Dexie.getDatabaseNames()\n const discardedDBNames = databaseNames.filter(name => {\n if (name.indexOf(databaseNamePrefix) === -1) return false\n \n const [prefix, id, time] = name.split('_')\n if (prefix !== databaseNamePrefix || !id || !time) return true\n if (localStorageDiscardedDBList.includes(id)) return true\n if (now - (+time) >= 1000 * 60 * 60 * 12) return true\n\n return false\n })\n\n for (const name of discardedDBNames) Dexie.delete(name)\n localStorage.removeItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n}\n\nclass PPTistDB extends Dexie {\n public snapshots: Dexie.Table\n public writingBoardImgs: Dexie.Table\n\n public constructor() {\n super(`${databaseNamePrefix}_${databaseId}_${new Date().getTime()}`)\n this.version(1).stores({\n snapshots: '++id',\n writingBoardImgs: '++id',\n })\n this.snapshots = this.table('snapshots')\n this.writingBoardImgs = this.table('writingBoardImgs')\n }\n}\n\nexport const db = new PPTistDB()","import { defineStore } from 'pinia'\nimport type { IndexableTypeArray } from 'dexie'\nimport { db, type Snapshot } from '@/utils/database'\n\nimport { useSlidesStore } from './slides'\nimport { useMainStore } from './main'\n\nexport interface ScreenState {\n snapshotCursor: number\n snapshotLength: number\n}\n\nexport const useSnapshotStore = defineStore('snapshot', {\n state: (): ScreenState => ({\n snapshotCursor: -1, // 历史快照指针\n snapshotLength: 0, // 历史快照长度\n }),\n\n getters: {\n canUndo(state) {\n return state.snapshotCursor > 0\n },\n canRedo(state) {\n return state.snapshotCursor < state.snapshotLength - 1\n },\n },\n\n actions: {\n setSnapshotCursor(cursor: number) {\n this.snapshotCursor = cursor\n },\n setSnapshotLength(length: number) {\n this.snapshotLength = length\n },\n\n async initSnapshotDatabase() {\n const slidesStore = useSlidesStore()\n \n const newFirstSnapshot = {\n index: slidesStore.slideIndex,\n slides: slidesStore.slides,\n }\n await db.snapshots.add(newFirstSnapshot)\n this.setSnapshotCursor(0)\n this.setSnapshotLength(1)\n },\n \n async addSnapshot() {\n const slidesStore = useSlidesStore()\n\n // 获取当前indexeddb中全部快照的ID\n const allKeys = await db.snapshots.orderBy('id').keys()\n \n let needDeleteKeys: IndexableTypeArray = []\n \n // 记录需要删除的快照ID\n // 若当前快照指针不处在最后一位,那么再添加快照时,应该将当前指针位置后面的快照全部删除,对应的实际情况是:\n // 用户撤回多次后,再进行操作(添加快照),此时原先被撤销的快照都应该被删除\n if (this.snapshotCursor >= 0 && this.snapshotCursor < allKeys.length - 1) {\n needDeleteKeys = allKeys.slice(this.snapshotCursor + 1)\n }\n \n // 添加新快照\n const snapshot = {\n index: slidesStore.slideIndex,\n slides: slidesStore.slides,\n }\n await db.snapshots.add(snapshot)\n \n // 计算当前快照长度,用于设置快照指针的位置(此时指针应该处在最后一位,即:快照长度 - 1)\n let snapshotLength = allKeys.length - needDeleteKeys.length + 1\n \n // 快照数量超过长度限制时,应该将头部多余的快照删除\n const snapshotLengthLimit = 20\n if (snapshotLength > snapshotLengthLimit) {\n needDeleteKeys.push(allKeys[0])\n snapshotLength--\n }\n \n // 快照数大于1时,需要保证撤回操作后维持页面焦点不变:也就是将倒数第二个快照对应的索引设置为当前页的索引\n // https://github.com/pipipi-pikachu/PPTist/issues/27\n if (snapshotLength >= 2) {\n db.snapshots.update(allKeys[snapshotLength - 2] as number, { index: slidesStore.slideIndex })\n }\n \n await db.snapshots.bulkDelete(needDeleteKeys)\n \n this.setSnapshotCursor(snapshotLength - 1)\n this.setSnapshotLength(snapshotLength)\n },\n \n async unDo() {\n if (this.snapshotCursor <= 0) return\n\n const slidesStore = useSlidesStore()\n const mainStore = useMainStore()\n \n const snapshotCursor = this.snapshotCursor - 1\n const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray()\n const snapshot = snapshots[snapshotCursor]\n const { index, slides } = snapshot\n \n const slideIndex = index > slides.length - 1 ? slides.length - 1 : index\n \n slidesStore.setSlides(slides)\n slidesStore.updateSlideIndex(slideIndex)\n this.setSnapshotCursor(snapshotCursor)\n mainStore.setActiveElementIdList([])\n },\n \n async reDo() {\n if (this.snapshotCursor >= this.snapshotLength - 1) return\n\n const slidesStore = useSlidesStore()\n const mainStore = useMainStore()\n \n const snapshotCursor = this.snapshotCursor + 1\n const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray()\n const snapshot = snapshots[snapshotCursor]\n const { index, slides } = snapshot\n \n const slideIndex = index > slides.length - 1 ? slides.length - 1 : index\n \n slidesStore.setSlides(slides)\n slidesStore.updateSlideIndex(slideIndex)\n this.setSnapshotCursor(snapshotCursor)\n mainStore.setActiveElementIdList([])\n },\n },\n})","import { defineStore } from 'pinia'\n\nexport interface KeyboardState {\n ctrlKeyState: boolean\n shiftKeyState: boolean\n spaceKeyState: boolean\n}\n\nexport const useKeyboardStore = defineStore('keyboard', {\n state: (): KeyboardState => ({\n ctrlKeyState: false, // ctrl键按下状态\n shiftKeyState: false, // shift键按下状态\n spaceKeyState: false, // space键按下状态\n }),\n\n getters: {\n ctrlOrShiftKeyActive(state) {\n return state.ctrlKeyState || state.shiftKeyState\n },\n },\n\n actions: {\n setCtrlKeyState(active: boolean) {\n this.ctrlKeyState = active\n },\n setShiftKeyState(active: boolean) {\n this.shiftKeyState = active\n },\n setSpaceKeyState(active: boolean) {\n this.spaceKeyState = active\n },\n },\n})","import { defineStore } from 'pinia'\n\nexport interface ScreenState {\n screening: boolean\n}\n\nexport const useScreenStore = defineStore('screen', {\n state: (): ScreenState => ({\n screening: false, // 是否进入放映状态\n }),\n\n actions: {\n setScreening(screening: boolean) {\n this.screening = screening\n },\n },\n})","import { padStart } from 'lodash'\n\n/**\n * 补足数字位数\n * @param digit 数字\n * @param len 位数\n */\nexport const fillDigit = (digit: number, len: number) => {\n return padStart('' + digit, len, '0')\n}\n\n/**\n * 判断设备\n */\nexport const isPC = () => {\n return !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i)\n}","import type { ShapePoolItem } from '@/configs/shapes'\r\nimport type { LinePoolItem } from '@/configs/lines'\r\nimport type { ImageClipDataRange, PPTElementOutline, PPTElementShadow, ShapeGradient } from './slides'\r\n\r\nexport enum ElementOrderCommands {\r\n UP = 'up',\r\n DOWN = 'down',\r\n TOP = 'top',\r\n BOTTOM = 'bottom',\r\n}\r\n\r\nexport enum ElementAlignCommands {\r\n TOP = 'top',\r\n BOTTOM = 'bottom',\r\n LEFT = 'left',\r\n RIGHT = 'right',\r\n VERTICAL = 'vertical',\r\n HORIZONTAL = 'horizontal',\r\n CENTER = 'center',\r\n}\r\n\r\nexport const enum OperateBorderLines {\r\n T = 'top',\r\n B = 'bottom',\r\n L = 'left',\r\n R = 'right',\r\n}\r\n\r\nexport const enum OperateResizeHandlers {\r\n LEFT_TOP = 'left-top',\r\n TOP = 'top',\r\n RIGHT_TOP = 'right-top',\r\n LEFT = 'left',\r\n RIGHT = 'right',\r\n LEFT_BOTTOM = 'left-bottom',\r\n BOTTOM = 'bottom',\r\n RIGHT_BOTTOM = 'right-bottom',\r\n}\r\n\r\nexport const enum OperateLineHandlers {\r\n START = 'start',\r\n END = 'end',\r\n C = 'ctrl',\r\n C1 = 'ctrl1',\r\n C2 = 'ctrl2',\r\n}\r\n\r\nexport interface AlignmentLineAxis {\r\n x: number\r\n y: number\r\n}\r\n\r\nexport interface AlignmentLineProps {\r\n type: 'vertical' | 'horizontal'\r\n axis: AlignmentLineAxis\r\n length: number\r\n}\r\n\r\nexport interface MultiSelectRange {\r\n minX: number\r\n maxX: number\r\n minY: number\r\n maxY: number\r\n}\r\n\r\nexport interface ImageClipedEmitData {\r\n range: ImageClipDataRange\r\n position: {\r\n left: number\r\n top: number\r\n width: number\r\n height: number\r\n }\r\n}\r\n\r\nexport interface CreateElementSelectionData {\r\n start: [number, number]\r\n end: [number, number]\r\n}\r\n\r\nexport interface CreateCustomShapeData {\r\n start: [number, number]\r\n end: [number, number]\r\n path: string\r\n viewBox: [number, number]\r\n}\r\n\r\nexport interface CreatingTextElement {\r\n type: 'text'\r\n vertical?: boolean\r\n}\r\nexport interface CreatingShapeElement {\r\n type: 'shape'\r\n data: ShapePoolItem\r\n}\r\nexport interface CreatingLineElement {\r\n type: 'line'\r\n data: LinePoolItem\r\n}\r\nexport type CreatingElement = CreatingTextElement | CreatingShapeElement | CreatingLineElement\r\n\r\nexport type TextFormatPainterKeys = 'bold' | 'em' | 'underline' | 'strikethrough' | 'color' | 'backcolor' | 'fontsize' | 'fontname' | 'align'\r\n\r\nexport interface TextFormatPainter {\r\n keep: boolean\r\n bold?: boolean\r\n em?: boolean\r\n underline?: boolean\r\n strikethrough?: boolean\r\n color?: string\r\n backcolor?: string\r\n fontsize?: string\r\n fontname?: string\r\n align?: 'left' | 'right' | 'center'\r\n}\r\n\r\nexport interface ShapeFormatPainter {\r\n keep: boolean\r\n fill?: string\r\n gradient?: ShapeGradient\r\n outline?: PPTElementOutline\r\n opacity?: number\r\n shadow?: PPTElementShadow\r\n}","export const enum KEYS {\n C = 'C',\n X = 'X',\n Z = 'Z',\n Y = 'Y',\n A = 'A',\n G = 'G',\n L = 'L',\n F = 'F',\n D = 'D',\n B = 'B',\n P = 'P',\n MINUS = '-',\n EQUAL = '=',\n DIGIT_0 = '0',\n DELETE = 'DELETE',\n UP = 'ARROWUP',\n DOWN = 'ARROWDOWN',\n LEFT = 'ARROWLEFT',\n RIGHT = 'ARROWRIGHT',\n ENTER = 'ENTER',\n SPACE = ' ',\n TAB = 'TAB',\n BACKSPACE = 'BACKSPACE',\n ESC = 'ESCAPE',\n PAGEUP = 'PAGEUP',\n PAGEDOWN = 'PAGEDOWN',\n F5 = 'F5',\n}\n\nexport const HOTKEY_DOC = [\n {\n type: '通用',\n children: [\n { label: '剪切', value: 'Ctrl + X' },\n { label: '复制', value: 'Ctrl + C' },\n { label: '粘贴', value: 'Ctrl + V' },\n { label: '粘贴为纯文本', value: 'Ctrl + Shift + V' },\n { label: '快速复制粘贴', value: 'Ctrl + D' },\n { label: '全选', value: 'Ctrl + A' },\n { label: '撤销', value: 'Ctrl + Z' },\n { label: '恢复', value: 'Ctrl + Y' },\n { label: '删除', value: 'Delete / Backspace' },\n { label: '多选', value: '按住 Ctrl 或 Shift' },\n { label: '打开搜索替换', value: 'Ctrl + F' },\n { label: '打印', value: 'Ctrl + P' },\n { label: '关闭弹窗', value: 'ESC' },\n ],\n },\n {\n type: '幻灯片放映',\n children: [\n { label: '从头开始放映幻灯片', value: 'F5' },\n { label: '从当前开始放映幻灯片', value: 'Shift + F5' },\n { label: '切换上一页', value: '↑ / ← / PgUp' },\n { label: '切换下一页', value: '↓ / → / PgDown' },\n { label: '切换下一页', value: 'Enter / Space' },\n { label: '退出放映', value: 'ESC' },\n ],\n },\n {\n type: '幻灯片编辑',\n children: [\n { label: '新建幻灯片', value: 'Enter' },\n { label: '移动画布', value: 'Space + 鼠标拖拽' },\n { label: '缩放画布', value: 'Ctrl + 鼠标滚轮' },\n { label: '放大画布', value: 'Ctrl + =' },\n { label: '缩小画布', value: 'Ctrl + -' },\n { label: '使画布适应当前屏幕', value: 'Ctrl + 0' },\n { label: '上一页(未选中元素)', value: '↑ / ←' },\n { label: '下一页(未选中元素)', value: '↓ / →' },\n { label: '上一页', value: '鼠标上滚 / PgUp' },\n { label: '下一页', value: '鼠标下滚 / PgDown' },\n ],\n },\n {\n type: '元素操作',\n children: [\n { label: '移动', value: '↑ / ← / ↓ / →' },\n { label: '锁定', value: 'Ctrl + L' },\n { label: '组合', value: 'Ctrl + G' },\n { label: '取消组合', value: 'Ctrl + Shift + G' },\n { label: '置顶层', value: 'Alt + F' },\n { label: '置底层', value: 'Alt + B' },\n { label: '锁定宽高比例', value: '按住 Ctrl 或 Shift' },\n { label: '创建水平 / 垂直线条', value: '按住 Ctrl 或 Shift' },\n { label: '切换焦点元素', value: 'Tab' },\n { label: '确认图片裁剪', value: 'Enter' },\n ],\n },\n {\n type: '表格编辑',\n children: [\n { label: '聚焦到下一个单元格', value: 'Tab' },\n { label: '在上方插入一行', value: 'Ctrl + ↑' },\n { label: '在下方插入一行', value: 'Ctrl + ↓' },\n { label: '在左侧插入一列', value: 'Ctrl + ←' },\n { label: '在右侧插入一列', value: 'Ctrl + →' },\n ],\n },\n {\n type: '图表数据编辑',\n children: [\n { label: '聚焦到下一行', value: 'Enter' },\n ],\n },\n {\n type: '文本编辑',\n children: [\n { label: '加粗', value: 'Ctrl + B' },\n { label: '斜体', value: 'Ctrl + I' },\n { label: '下划线', value: 'Ctrl + U' },\n { label: '行内代码', value: 'Ctrl + E' },\n { label: '上角标', value: 'Ctrl + ;' },\n { label: '下角标', value: `Ctrl + '` },\n { label: '选中段落', value: `ESC` },\n ],\n },\n]","import CryptoJS from 'crypto-js'\n\nconst CRYPTO_KEY = 'pptist'\n\n/**\n * 加密\n * @param msg 待加密字符串\n */\nexport const encrypt = (msg: string) => {\n return CryptoJS.AES.encrypt(msg, CRYPTO_KEY).toString()\n}\n\n/**\n * 解密\n * @param ciphertext 待解密字符串\n */\nexport const decrypt = (ciphertext: string) => {\n const bytes = CryptoJS.AES.decrypt(ciphertext, CRYPTO_KEY)\n return bytes.toString(CryptoJS.enc.Utf8)\n}","import Clipboard from 'clipboard'\nimport { decrypt } from '@/utils/crypto'\n\n/**\n * 复制文本到剪贴板\n * @param text 文本内容\n */\nexport const copyText = (text: string) => {\n return new Promise((resolve, reject) => {\n const fakeElement = document.createElement('button')\n const clipboard = new Clipboard(fakeElement, {\n text: () => text,\n action: () => 'copy',\n container: document.body,\n })\n clipboard.on('success', e => {\n clipboard.destroy()\n resolve(e)\n })\n clipboard.on('error', e => {\n clipboard.destroy()\n reject(e)\n })\n document.body.appendChild(fakeElement)\n fakeElement.click()\n document.body.removeChild(fakeElement)\n })\n}\n\n// 读取剪贴板\nexport const readClipboard = (): Promise => {\n return new Promise((resolve, reject) => {\n if (navigator.clipboard?.readText) {\n navigator.clipboard.readText().then(text => {\n if (!text) reject('剪贴板为空或者不包含文本')\n return resolve(text)\n })\n }\n else reject('浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V')\n })\n}\n\n// 解析加密后的剪贴板内容\nexport const pasteCustomClipboardString = (text: string) => {\n let clipboardData\n try {\n clipboardData = JSON.parse(decrypt(text))\n }\n catch {\n clipboardData = text\n }\n\n return clipboardData\n}\n\n// 尝试解析剪贴板内容是否为Excel表格(或类似的)数据格式\nexport const pasteExcelClipboardString = (text: string): string[][] | null => {\n const lines: string[] = text.split('\\r\\n')\n\n if (lines[lines.length - 1] === '') lines.pop()\n\n let colCount = -1\n const data: string[][] = []\n for (const index in lines) {\n data[index] = lines[index].split('\\t')\n\n if (data[index].length === 1) return null\n if (colCount === -1) colCount = data[index].length\n else if (colCount !== data[index].length) return null\n }\n return data\n}","import tinycolor from 'tinycolor2'\r\nimport { nanoid } from 'nanoid'\r\nimport type { PPTElement, PPTLineElement, Slide } from '@/types/slides'\r\n\r\ninterface RotatedElementData {\r\n left: number\r\n top: number\r\n width: number\r\n height: number\r\n rotate: number\r\n}\r\n\r\ninterface IdMap {\r\n [id: string]: string\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的矩形范围旋转后的新位置范围\r\n * @param element 元素的位置大小和旋转角度信息\r\n */\r\nexport const getRectRotatedRange = (element: RotatedElementData) => {\r\n const { left, top, width, height, rotate = 0 } = element\r\n\r\n const radius = Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ) / 2\r\n const auxiliaryAngle = Math.atan(height / width) * 180 / Math.PI\r\n\r\n const tlbraRadian = (180 - rotate - auxiliaryAngle) * Math.PI / 180\r\n const trblaRadian = (auxiliaryAngle - rotate) * Math.PI / 180\r\n\r\n const middleLeft = left + width / 2\r\n const middleTop = top + height / 2\r\n\r\n const xAxis = [\r\n middleLeft + radius * Math.cos(tlbraRadian),\r\n middleLeft + radius * Math.cos(trblaRadian),\r\n middleLeft - radius * Math.cos(tlbraRadian),\r\n middleLeft - radius * Math.cos(trblaRadian),\r\n ]\r\n const yAxis = [\r\n middleTop - radius * Math.sin(tlbraRadian),\r\n middleTop - radius * Math.sin(trblaRadian),\r\n middleTop + radius * Math.sin(tlbraRadian),\r\n middleTop + radius * Math.sin(trblaRadian),\r\n ]\r\n\r\n return {\r\n xRange: [Math.min(...xAxis), Math.max(...xAxis)],\r\n yRange: [Math.min(...yAxis), Math.max(...yAxis)],\r\n }\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的矩形范围旋转后的新位置与旋转之前位置的偏离距离\r\n * @param element 元素的位置大小和旋转角度信息\r\n */\r\nexport const getRectRotatedOffset = (element: RotatedElementData) => {\r\n const { xRange: originXRange, yRange: originYRange } = getRectRotatedRange({\r\n left: element.left,\r\n top: element.top,\r\n width: element.width,\r\n height: element.height,\r\n rotate: 0,\r\n })\r\n const { xRange: rotatedXRange, yRange: rotatedYRange } = getRectRotatedRange({\r\n left: element.left,\r\n top: element.top,\r\n width: element.width,\r\n height: element.height,\r\n rotate: element.rotate,\r\n })\r\n return {\r\n offsetX: rotatedXRange[0] - originXRange[0],\r\n offsetY: rotatedYRange[0] - originYRange[0],\r\n }\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的位置范围\r\n * @param element 元素信息\r\n */\r\nexport const getElementRange = (element: PPTElement) => {\r\n let minX, maxX, minY, maxY\r\n\r\n if (element.type === 'line') {\r\n minX = element.left\r\n maxX = element.left + Math.max(element.start[0], element.end[0])\r\n minY = element.top\r\n maxY = element.top + Math.max(element.start[1], element.end[1])\r\n }\r\n else if ('rotate' in element && element.rotate) {\r\n const { left, top, width, height, rotate } = element\r\n const { xRange, yRange } = getRectRotatedRange({ left, top, width, height, rotate })\r\n minX = xRange[0]\r\n maxX = xRange[1]\r\n minY = yRange[0]\r\n maxY = yRange[1]\r\n }\r\n else {\r\n minX = element.left\r\n maxX = element.left + element.width\r\n minY = element.top\r\n maxY = element.top + element.height\r\n }\r\n return { minX, maxX, minY, maxY }\r\n}\r\n\r\n/**\r\n * 计算一组元素在画布中的位置范围\r\n * @param elementList 一组元素信息\r\n */\r\nexport const getElementListRange = (elementList: PPTElement[]) => {\r\n const leftValues: number[] = []\r\n const topValues: number[] = []\r\n const rightValues: number[] = []\r\n const bottomValues: number[] = []\r\n\r\n elementList.forEach(element => {\r\n const { minX, maxX, minY, maxY } = getElementRange(element)\r\n leftValues.push(minX)\r\n topValues.push(minY)\r\n rightValues.push(maxX)\r\n bottomValues.push(maxY)\r\n })\r\n\r\n const minX = Math.min(...leftValues)\r\n const maxX = Math.max(...rightValues)\r\n const minY = Math.min(...topValues)\r\n const maxY = Math.max(...bottomValues)\r\n\r\n return { minX, maxX, minY, maxY }\r\n}\r\n\r\nexport interface AlignLine {\r\n value: number\r\n range: [number, number]\r\n}\r\n\r\n/**\r\n * 将一组对齐吸附线进行去重:同位置的的多条对齐吸附线仅留下一条,取该位置所有对齐吸附线的最大值和最小值为新的范围\r\n * @param lines 一组对齐吸附线信息\r\n */\r\nexport const uniqAlignLines = (lines: AlignLine[]) => {\r\n const uniqLines: AlignLine[] = []\r\n lines.forEach(line => {\r\n const index = uniqLines.findIndex(_line => _line.value === line.value)\r\n if (index === -1) uniqLines.push(line)\r\n else {\r\n const uniqLine = uniqLines[index]\r\n const rangeMin = Math.min(uniqLine.range[0], line.range[0])\r\n const rangeMax = Math.max(uniqLine.range[1], line.range[1])\r\n const range: [number, number] = [rangeMin, rangeMax]\r\n const _line = { value: line.value, range }\r\n uniqLines[index] = _line\r\n }\r\n })\r\n return uniqLines\r\n}\r\n\r\n/**\r\n * 以页面列表为基础,为每一个页面生成新的ID,并关联到旧ID形成一个字典\r\n * 主要用于页面元素时,维持数据中各处页面ID原有的关系\r\n * @param slides 页面列表\r\n */\r\nexport const createSlideIdMap = (slides: Slide[]) => {\r\n const slideIdMap: IdMap = {}\r\n for (const slide of slides) {\r\n slideIdMap[slide.id] = nanoid(10)\r\n }\r\n return slideIdMap\r\n}\r\n\r\n/**\r\n * 以元素列表为基础,为每一个元素生成新的ID,并关联到旧ID形成一个字典\r\n * 主要用于复制元素时,维持数据中各处元素ID原有的关系\r\n * 例如:原本两个组合的元素拥有相同的groupId,复制后依然会拥有另一个相同的groupId\r\n * @param elements 元素列表数据\r\n */\r\nexport const createElementIdMap = (elements: PPTElement[]) => {\r\n const groupIdMap: IdMap = {}\r\n const elIdMap: IdMap = {}\r\n for (const element of elements) {\r\n const groupId = element.groupId\r\n if (groupId && !groupIdMap[groupId]) {\r\n groupIdMap[groupId] = nanoid(10)\r\n }\r\n elIdMap[element.id] = nanoid(10)\r\n }\r\n return {\r\n groupIdMap,\r\n elIdMap,\r\n }\r\n}\r\n\r\n/**\r\n * 根据表格的主题色,获取对应用于配色的子颜色\r\n * @param themeColor 主题色\r\n */\r\nexport const getTableSubThemeColor = (themeColor: string) => {\r\n const rgba = tinycolor(themeColor)\r\n return [\r\n rgba.setAlpha(0.3).toRgbString(),\r\n rgba.setAlpha(0.1).toRgbString(),\r\n ]\r\n}\r\n\r\n/**\r\n * 获取线条元素路径字符串\r\n * @param element 线条元素\r\n */\r\nexport const getLineElementPath = (element: PPTLineElement) => {\r\n const start = element.start.join(',')\r\n const end = element.end.join(',')\r\n if (element.broken) {\r\n const mid = element.broken.join(',')\r\n return `M${start} L${mid} L${end}`\r\n }\r\n else if (element.curve) {\r\n const mid = element.curve.join(',')\r\n return `M${start} Q${mid} ${end}`\r\n }\r\n else if (element.cubic) {\r\n const [c1, c2] = element.cubic\r\n const p1 = c1.join(',')\r\n const p2 = c2.join(',')\r\n return `M${start} C${p1} ${p2} ${end}`\r\n }\r\n return `M${start} L${end}`\r\n}","// https://iconpark.bytedance.com/official\n\nimport type { App } from 'vue'\nimport {\n PlayOne,\n FullScreenPlay,\n Lock,\n Unlock,\n Ppt,\n Format,\n Picture,\n FullScreen,\n List,\n OrderedList,\n FlipVertically,\n FlipHorizontally,\n FontSize,\n Code,\n TextBold,\n TextItalic,\n TextUnderline,\n Strikethrough,\n Edit,\n Quote,\n BackgroundColor,\n Group,\n Ungroup,\n Back,\n Next,\n Fullwidth,\n AlignTop,\n AlignLeft,\n AlignRight,\n AlignBottom,\n AlignVertically,\n AlignHorizontally,\n BringToFront,\n SendToBack,\n AlignTextLeft,\n AlignTextRight,\n AlignTextCenter,\n AlignTextBoth,\n RowHeight,\n Write,\n InsertTable,\n AddText,\n Fill,\n Tailoring,\n Effects,\n ColorFilter,\n Up,\n Down,\n Plus,\n Minus,\n Connection,\n BringToFrontOne,\n SentToBack,\n Github,\n ChartProportion,\n ChartHistogram,\n ChartHistogramOne,\n ChartLineArea,\n ChartRing,\n ChartScatter,\n ChartLine,\n ChartPie,\n Text,\n Rotate,\n LeftTwo,\n RightTwo,\n Platte,\n Close,\n CloseSmall,\n Undo,\n Transform,\n Click,\n Theme,\n ArrowCircleLeft,\n GraphicDesign,\n Logout,\n Erase,\n Clear,\n AlignTextTopOne,\n AlignTextBottomOne,\n AlignTextMiddleOne,\n Pause,\n VolumeMute,\n VolumeNotice,\n VolumeSmall,\n VideoTwo,\n Formula,\n LinkOne,\n FullScreenOne,\n OffScreenOne,\n Power,\n ListView,\n Magic,\n HighLight,\n Download,\n IndentLeft,\n IndentRight,\n VerticalSpacingBetweenItems,\n Copy,\n Delete,\n Square,\n Round,\n Needle,\n TextRotationNone,\n TextRotationDown,\n FormatBrush,\n PreviewOpen,\n PreviewClose,\n StopwatchStart,\n Search,\n Left,\n Right,\n MoveOne,\n HamburgerButton,\n Attention,\n CheckOne,\n CloseOne,\n Info,\n} from '@icon-park/vue-next'\n\nexport interface Icons {\n [key: string]: typeof PlayOne\n}\n\nexport const icons: Icons = {\n IconPlayOne: PlayOne,\n IconFullScreenPlay: FullScreenPlay,\n IconLock: Lock,\n IconUnlock: Unlock,\n IconPpt: Ppt,\n IconFormat: Format,\n IconPicture: Picture,\n IconFullScreen: FullScreen,\n IconList: List,\n IconOrderedList: OrderedList,\n IconFlipVertically: FlipVertically,\n IconFlipHorizontally: FlipHorizontally,\n IconFontSize: FontSize,\n IconCode: Code,\n IconTextBold: TextBold,\n IconTextItalic: TextItalic,\n IconTextUnderline: TextUnderline,\n IconStrikethrough: Strikethrough,\n IconEdit: Edit,\n IconQuote: Quote,\n IconBackgroundColor: BackgroundColor,\n IconGroup: Group,\n IconUngroup: Ungroup,\n IconBack: Back,\n IconNext: Next,\n IconFullwidth: Fullwidth,\n IconAlignTop: AlignTop,\n IconAlignLeft: AlignLeft,\n IconAlignRight: AlignRight,\n IconAlignBottom: AlignBottom,\n IconAlignVertically: AlignVertically,\n IconAlignHorizontally: AlignHorizontally,\n IconBringToFront: BringToFront,\n IconSendToBack: SendToBack,\n IconAlignTextLeft: AlignTextLeft,\n IconAlignTextRight: AlignTextRight,\n IconAlignTextCenter: AlignTextCenter,\n IconAlignTextBoth: AlignTextBoth,\n IconRowHeight: RowHeight,\n IconWrite: Write,\n IconInsertTable: InsertTable,\n IconAddText: AddText,\n IconFill: Fill,\n IconTailoring: Tailoring,\n IconEffects: Effects,\n IconColorFilter: ColorFilter,\n IconUp: Up,\n IconDown: Down,\n IconPlus: Plus,\n IconMinus: Minus,\n IconConnection: Connection,\n IconBringToFrontOne: BringToFrontOne,\n IconSentToBack: SentToBack,\n IconGithub: Github,\n IconChartProportion: ChartProportion,\n IconChartHistogram: ChartHistogram,\n IconChartHistogramOne: ChartHistogramOne,\n IconChartLineArea: ChartLineArea,\n IconChartRing: ChartRing,\n IconChartScatter: ChartScatter,\n IconChartLine: ChartLine,\n IconChartPie: ChartPie,\n IconText: Text,\n IconRotate: Rotate,\n IconLeftTwo: LeftTwo,\n IconRightTwo: RightTwo,\n IconPlatte: Platte,\n IconClose: Close,\n IconCloseSmall: CloseSmall,\n IconUndo: Undo,\n IconTransform: Transform,\n IconClick: Click,\n IconTheme: Theme,\n IconArrowCircleLeft: ArrowCircleLeft,\n IconGraphicDesign: GraphicDesign,\n IconLogout: Logout,\n IconErase: Erase,\n IconClear: Clear,\n IconAlignTextTopOne: AlignTextTopOne,\n IconAlignTextBottomOne: AlignTextBottomOne,\n IconAlignTextMiddleOne: AlignTextMiddleOne,\n IconPause: Pause,\n IconVolumeMute: VolumeMute,\n IconVolumeNotice: VolumeNotice,\n IconVolumeSmall: VolumeSmall,\n IconVideoTwo: VideoTwo,\n IconFormula: Formula,\n IconLinkOne: LinkOne,\n IconFullScreenOne: FullScreenOne,\n IconOffScreenOne: OffScreenOne,\n IconPower: Power,\n IconListView: ListView,\n IconMagic: Magic,\n IconHighLight: HighLight,\n IconDownload: Download,\n IconIndentLeft: IndentLeft,\n IconIndentRight: IndentRight,\n IconVerticalSpacingBetweenItems: VerticalSpacingBetweenItems,\n IconCopy: Copy,\n IconDelete: Delete,\n IconSquare: Square,\n IconRound: Round,\n IconNeedle: Needle,\n IconTextRotationNone: TextRotationNone,\n IconTextRotationDown: TextRotationDown,\n IconFormatBrush: FormatBrush,\n IconPreviewOpen: PreviewOpen,\n IconPreviewClose: PreviewClose,\n IconStopwatchStart: StopwatchStart,\n IconSearch: Search,\n IconLeft: Left,\n IconRight: Right,\n IconMoveOne: MoveOne,\n IconHamburgerButton: HamburgerButton,\n IconAttention: Attention,\n IconCheckOne: CheckOne,\n IconCloseOne: CloseOne,\n IconInfo: Info,\n}\n\nexport default {\n install(app: App) {\n for (const key of Object.keys(icons)) {\n app.component(key, icons[key])\n }\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Transition as _Transition, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2231702e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = { class: \"icons\" }\nconst _hoisted_3 = { class: \"content\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"title\"\n}\nconst _hoisted_5 = { class: \"description\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"control\"\n}\n\nimport { onMounted, ref, onBeforeMount } from 'vue'\nimport { icons } from '@/plugins/icon'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Message',\n props: {\n id: {},\n message: {},\n type: { default: 'success' },\n title: { default: '' },\n duration: { default: 3000 },\n closable: { type: Boolean, default: false }\n },\n emits: [\"close\", \"destroy\"],\n setup(__props: any, { expose: __expose, emit }) {\n\nconst props = __props;\n\nconst {\n IconAttention,\n IconCheckOne,\n IconCloseOne,\n IconInfo,\n IconCloseSmall,\n} = icons\n\n\n\n\n\nconst visible = ref(true)\nconst timer = ref(null)\n\nconst startTimer = () => {\n if (props.duration <= 0) return\n timer.value = setTimeout(close, props.duration)\n}\nconst clearTimer = () => {\n if (timer.value) clearTimeout(timer.value)\n}\n\nconst close = () => visible.value = false\n\nonBeforeMount(() => {\n clearTimer()\n})\nonMounted(() => {\n startTimer()\n})\n\n__expose({\n close,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Transition, {\n name: \"message-fade\",\n appear: \"\",\n mode: \"in-out\",\n onBeforeLeave: _cache[3] || (_cache[3] = ($event: any) => (emit('close'))),\n onAfterLeave: _cache[4] || (_cache[4] = ($event: any) => (emit('destroy')))\n }, {\n default: _withCtx(() => [\n (visible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"message\",\n id: _ctx.id\n }, [\n _createElementVNode(\"div\", {\n class: \"message-container\",\n onMouseenter: _cache[1] || (_cache[1] = ($event: any) => (clearTimer())),\n onMouseleave: _cache[2] || (_cache[2] = ($event: any) => (startTimer()))\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.type === 'warning')\n ? (_openBlock(), _createBlock(_unref(IconAttention), {\n key: 0,\n theme: \"filled\",\n size: \"18\",\n fill: \"#faad14\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'success')\n ? (_openBlock(), _createBlock(_unref(IconCheckOne), {\n key: 1,\n theme: \"filled\",\n size: \"18\",\n fill: \"#52c41a\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'error')\n ? (_openBlock(), _createBlock(_unref(IconCloseOne), {\n key: 2,\n theme: \"filled\",\n size: \"18\",\n fill: \"#ff4d4f\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'info')\n ? (_openBlock(), _createBlock(_unref(IconInfo), {\n key: 3,\n theme: \"filled\",\n size: \"18\",\n fill: \"#1677ff\"\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, _toDisplayString(_ctx.title), 1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(_ctx.message), 1)\n ]),\n (_ctx.closable)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createElementVNode(\"span\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (close()))\n }, [\n _createVNode(_unref(IconCloseSmall))\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ], 32)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }))\n}\n}\n\n})","\n\n\n\n","import script from \"./Message.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Message.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Message.vue?vue&type=style&index=0&id=2231702e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2231702e\"]])\n\nexport default __exports__","import { createVNode, render, type AppContext } from 'vue'\nimport MessageComponent from '@/components/Message.vue'\n\nexport interface MessageOptions {\n type?: 'info' | 'success' | 'warning' | 'error'\n title?: string\n message?: string\n duration?: number\n closable?: boolean\n ctx?: AppContext\n onClose?: () => void\n}\n\nexport type MessageTypeOptions = Omit\nexport interface MessageIntance {\n id: string\n close: () => void\n}\n\nexport type MessageFn = (message: string, options?: MessageTypeOptions) => MessageIntance\nexport interface Message {\n (options: MessageOptions): MessageIntance\n info: MessageFn\n success: MessageFn\n error: MessageFn\n warning: MessageFn\n closeAll: () => void\n _context?: AppContext | null\n}\n\nconst instances: MessageIntance[] = []\nlet wrap: HTMLDivElement | null = null\nlet seed = 0\nconst defaultOptions: MessageOptions = {\n duration: 3000,\n}\n\nconst message: Message = (options: MessageOptions) => {\n const id = 'message-' + seed++\n const props = {\n ...defaultOptions,\n ...options,\n id,\n }\n\n if (!wrap) {\n wrap = document.createElement('div')\n wrap.className = 'message-wrap'\n wrap.style.cssText = `\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n `\n document.body.appendChild(wrap)\n }\n\n const vm = createVNode(MessageComponent, props, null)\n const div = document.createElement('div')\n\n vm.appContext = options.ctx || message._context || null\n vm.props!.onClose = options.onClose\n vm.props!.onDestroy = () => {\n if (wrap && wrap.childNodes.length <= 1) {\n wrap.remove()\n wrap = null\n }\n render(null, div)\n }\n\n render(vm, div)\n wrap.appendChild(div.firstElementChild!)\n\n const instance = {\n id,\n close: () => vm?.component?.exposed?.close(),\n }\n\n instances.push(instance)\n return instance\n}\n\nmessage.success = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'success', message: msg })\nmessage.info = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'info', message: msg })\nmessage.warning = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'warning', message: msg })\nmessage.error = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'error', message: msg })\n\nmessage.closeAll = function() {\n for (let i = instances.length - 1; i >= 0; i--) {\n instances[i].close()\n }\n}\n\nexport default message","/**\r\n * 将普通文本转为带段落信息的HTML字符串\r\n * @param text 文本\r\n */\r\nexport const parseText2Paragraphs = (text: string) => {\r\n const htmlText = text.replace(/[\\n\\r]+/g, '
')\r\n const paragraphs = htmlText.split('
')\r\n let string = ''\r\n for (const paragraph of paragraphs) {\r\n if (paragraph) string += `
${paragraph}
`\r\n }\r\n return string\r\n}","interface ImageSize {\n width: number\n height: number\n}\n\n/**\n * 获取图片的原始宽高\n * @param src 图片地址\n */\nexport const getImageSize = (src: string): Promise => {\n return new Promise(resolve => {\n const img = document.createElement('img')\n img.src = src\n img.style.opacity = '0'\n document.body.appendChild(img)\n\n img.onload = () => {\n const imgWidth = img.clientWidth\n const imgHeight = img.clientHeight\n \n img.onload = null\n img.onerror = null\n\n document.body.removeChild(img)\n\n resolve({ width: imgWidth, height: imgHeight })\n }\n\n img.onerror = () => {\n img.onload = null\n img.onerror = null\n }\n })\n}\n\n/**\n * 读取图片文件的dataURL\n * @param file 图片文件\n */\nexport const getImageDataURL = (file: File): Promise => {\n return new Promise(resolve => {\n const reader = new FileReader()\n reader.addEventListener('load', () => {\n resolve(reader.result as string)\n })\n reader.readAsDataURL(file)\n })\n}","export const VIEWPORT_SIZE = 1000","import type { BarChartOptions, LineChartOptions, PieChartOptions } from 'chartist'\n\nexport const enum ShapePathFormulasKeys {\n ROUND_RECT = 'roundRect',\n ROUND_RECT_DIAGONAL = 'roundRectDiagonal',\n ROUND_RECT_SINGLE = 'roundRectSingle',\n ROUND_RECT_SAMESIDE = 'roundRectSameSide',\n CUT_RECT_DIAGONAL = 'cutRectDiagonal',\n CUT_RECT_SINGLE = 'cutRectSingle',\n CUT_RECT_SAMESIDE = 'cutRectSameSide',\n CUT_ROUND_RECT = 'cutRoundRect',\n MESSAGE = 'message',\n ROUND_MESSAGE = 'roundMessage',\n L = 'L',\n RING_RECT = 'ringRect',\n PLUS = 'plus',\n TRIANGLE = 'triangle',\n PARALLELOGRAM_LEFT = 'parallelogramLeft',\n PARALLELOGRAM_RIGHT = 'parallelogramRight',\n TRAPEZOID = 'trapezoid',\n BULLET = 'bullet',\n INDICATOR = 'indicator',\n}\n\nexport const enum ElementTypes {\n TEXT = 'text',\n IMAGE = 'image',\n SHAPE = 'shape',\n LINE = 'line',\n CHART = 'chart',\n TABLE = 'table',\n LATEX = 'latex',\n VIDEO = 'video',\n AUDIO = 'audio',\n}\n\n/**\n * 元素阴影\n * \n * h: 水平偏移量\n * \n * v: 垂直偏移量\n * \n * blur: 模糊程度\n * \n * color: 阴影颜色\n */\nexport interface PPTElementShadow {\n h: number\n v: number\n blur: number\n color: string\n}\n\n/**\n * 元素边框\n * \n * style?: 边框样式(实线或虚线)\n * \n * width?: 边框宽度\n * \n * color?: 边框颜色\n */\nexport interface PPTElementOutline {\n style?: 'dashed' | 'solid'\n width?: number\n color?: string\n}\n\n/**\n * 元素超链接\n * \n * type: 链接类型(网页、幻灯片页面)\n * \n * target: 目标地址(网页链接、幻灯片页面ID)\n */\nexport interface PPTElementLink {\n type: 'web' | 'slide'\n target: string\n}\n\n\n/**\n * 元素通用属性\n * \n * id: 元素ID\n * \n * left: 元素水平方向位置(距离画布左侧)\n * \n * top: 元素垂直方向位置(距离画布顶部)\n * \n * lock?: 锁定元素\n * \n * groupId?: 组合ID(拥有相同组合ID的元素即为同一组合元素成员)\n * \n * width: 元素宽度\n * \n * height: 元素高度\n * \n * rotate: 旋转角度\n * \n * link?: 超链接\n * \n * name?: 元素名\n */\ninterface PPTBaseElement {\n id: string\n left: number\n top: number\n lock?: boolean\n groupId?: string\n width: number\n height: number\n rotate: number\n link?: PPTElementLink\n name?: string\n}\n\n\n/**\n * 文本元素\n * \n * type: 元素类型(text)\n * \n * content: 文本内容(HTML字符串)\n * \n * defaultFontName: 默认字体(会被文本内容中的HTML内联样式覆盖)\n * \n * defaultColor: 默认颜色(会被文本内容中的HTML内联样式覆盖)\n * \n * outline?: 边框\n * \n * fill?: 填充色\n * \n * lineHeight?: 行高(倍),默认1.5\n * \n * wordSpace?: 字间距,默认0\n * \n * opacity?: 不透明度,默认1\n * \n * shadow?: 阴影\n * \n * paragraphSpace?: 段间距,默认 5px\n * \n * vertical?: 竖向文本\n */\nexport interface PPTTextElement extends PPTBaseElement {\n type: 'text'\n content: string\n defaultFontName: string\n defaultColor: string\n outline?: PPTElementOutline\n fill?: string\n lineHeight?: number\n wordSpace?: number\n opacity?: number\n shadow?: PPTElementShadow\n paragraphSpace?: number\n vertical?: boolean\n}\n\n\n/**\n * 图片翻转、形状翻转\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n */\nexport interface ImageOrShapeFlip {\n flipH?: boolean\n flipV?: boolean\n}\n\n/**\n * 图片滤镜\n * \n * https://developer.mozilla.org/zh-CN/docs/Web/CSS/filter\n * \n * 'blur'?: 模糊,默认0(px)\n * \n * 'brightness'?: 亮度,默认100(%)\n * \n * 'contrast'?: 对比度,默认100(%)\n * \n * 'grayscale'?: 灰度,默认0(%)\n * \n * 'saturate'?: 饱和度,默认100(%)\n * \n * 'hue-rotate'?: 色相旋转,默认0(deg)\n * \n * 'opacity'?: 不透明度,默认100(%)\n */\nexport type ImageElementFilterKeys = 'blur' | 'brightness' | 'contrast' | 'grayscale' | 'saturate' | 'hue-rotate' | 'opacity'\nexport interface ImageElementFilters {\n 'blur'?: string\n 'brightness'?: string\n 'contrast'?: string\n 'grayscale'?: string\n 'saturate'?: string\n 'hue-rotate'?: string\n 'opacity'?: string\n}\n\nexport type ImageClipDataRange = [[number, number], [number, number]]\n\n/**\n * 图片裁剪\n * \n * range: 裁剪范围,例如:[[10, 10], [90, 90]] 表示裁取原图从左上角 10%, 10% 到 90%, 90% 的范围\n * \n * shape: 裁剪形状,见 configs/imageClip.ts CLIPPATHS \n */\nexport interface ImageElementClip {\n range: ImageClipDataRange\n shape: string\n}\n\n/**\n * 图片元素\n * \n * type: 元素类型(image)\n * \n * fixedRatio: 固定图片宽高比例\n * \n * src: 图片地址\n * \n * outline?: 边框\n * \n * filters?: 图片滤镜\n * \n * clip?: 裁剪信息\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n * \n * shadow?: 阴影\n */\nexport interface PPTImageElement extends PPTBaseElement {\n type: 'image'\n fixedRatio: boolean\n src: string\n outline?: PPTElementOutline\n filters?: ImageElementFilters\n clip?: ImageElementClip\n flipH?: boolean\n flipV?: boolean\n shadow?: PPTElementShadow\n colorMask?: string\n}\n\n\n/**\n * 形状渐变\n * \n * type: 渐变类型(径向、线性)\n * \n * color: 渐变颜色\n * \n * rotate: 渐变角度(线性渐变)\n */\nexport interface ShapeGradient {\n type: 'linear' | 'radial'\n color: [string, string]\n rotate: number\n}\n\n/**\n * 形状内文本\n * \n * content: 文本内容(HTML字符串)\n * \n * defaultFontName: 默认字体(会被文本内容中的HTML内联样式覆盖)\n * \n * defaultColor: 默认颜色(会被文本内容中的HTML内联样式覆盖)\n * \n * align: 文本对齐方向(垂直方向)\n */\nexport interface ShapeText {\n content: string\n defaultFontName: string\n defaultColor: string\n align: 'top' | 'middle' | 'bottom'\n}\n\n/**\n * 形状元素\n * \n * type: 元素类型(shape)\n * \n * viewBox: SVG的viewBox属性,例如 [1000, 1000] 表示 '0 0 1000 1000'\n * \n * path: 形状路径,SVG path 的 d 属性\n * \n * fixedRatio: 固定形状宽高比例\n * \n * fill: 填充,不存在渐变时生效\n * \n * gradient?: 渐变,该属性存在时将优先作为填充\n * \n * outline?: 边框\n * \n * opacity?: 不透明度\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n * \n * shadow?: 阴影\n * \n * special?: 特殊形状(标记一些难以解析的形状,例如路径使用了 L Q C A 以外的类型,该类形状在导出后将变为图片的形式)\n * \n * text?: 形状内文本\n * \n * pathFormula?: 形状路径计算公式\n * 一般情况下,形状的大小变化时仅由宽高基于 viewBox 的缩放比例来调整形状,而 viewBox 本身和 path 不会变化,\n * 但也有一些形状希望能更精确的控制一些关键点的位置,此时就需要提供路径计算公式,通过在缩放时更新 viewBox 并重新计算 path 来重新绘制形状\n * \n * keypoint?: 关键点位置百分比\n */\nexport interface PPTShapeElement extends PPTBaseElement {\n type: 'shape'\n viewBox: [number, number]\n path: string\n fixedRatio: boolean\n fill: string\n gradient?: ShapeGradient\n outline?: PPTElementOutline\n opacity?: number\n flipH?: boolean\n flipV?: boolean\n shadow?: PPTElementShadow\n special?: boolean\n text?: ShapeText\n pathFormula?: ShapePathFormulasKeys\n keypoint?: number\n}\n\n\nexport type LinePoint = '' | 'arrow' | 'dot' \n\n/**\n * 线条元素\n * \n * type: 元素类型(line)\n * \n * start: 起点位置([x, y])\n * \n * end: 终点位置([x, y])\n * \n * style: 线条样式(实线、虚线)\n * \n * color: 线条颜色\n * \n * points: 端点样式([起点样式, 终点样式],可选:无、箭头、圆点)\n * \n * shadow?: 阴影\n * \n * broken?: 折线控制点位置([x, y])\n * \n * curve?: 二次曲线控制点位置([x, y])\n * \n * cubic?: 三次曲线控制点位置([[x1, y1], [x2, y2]])\n */\nexport interface PPTLineElement extends Omit {\n type: 'line'\n start: [number, number]\n end: [number, number]\n style: 'solid' | 'dashed'\n color: string\n points: [LinePoint, LinePoint]\n shadow?: PPTElementShadow\n broken?: [number, number]\n curve?: [number, number]\n cubic?: [[number, number], [number, number]]\n}\n\n\nexport type PresetChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'scatter' | 'pie' | 'ring'\nexport type ChartType = 'bar' | 'line' | 'pie'\nexport type ChartOptions = LineChartOptions & BarChartOptions & PieChartOptions\nexport interface ChartData {\n labels: string[]\n legends: string[]\n series: number[][]\n}\n\n/**\n * 图表元素\n * \n * type: 元素类型(chart)\n * \n * fill?: 填充色\n * \n * chartType: 图表基础类型(bar/line/pie),所有图表类型都是由这三种基本类型衍生而来\n * \n * data: 图表数据\n * \n * options?: 图表配置项\n * \n * outline?: 边框\n * \n * themeColor: 主题色\n * \n * gridColor?: 网格&坐标颜色\n * \n * legend?: 图例/位置\n */\nexport interface PPTChartElement extends PPTBaseElement {\n type: 'chart'\n fill?: string\n chartType: ChartType\n data: ChartData\n options?: ChartOptions\n outline?: PPTElementOutline\n themeColor: string[]\n gridColor?: string\n legend?: '' | 'top' | 'bottom'\n}\n\n\n/**\n * 表格单元格样式\n * \n * bold?: 加粗\n * \n * em?: 斜体\n * \n * underline?: 下划线\n * \n * strikethrough?: 删除线\n * \n * color?: 字体颜色\n * \n * backcolor?: 填充色\n * \n * fontsize?: 字体大小\n * \n * fontname?: 字体\n * \n * align?: 对齐方式\n */\nexport interface TableCellStyle {\n bold?: boolean\n em?: boolean\n underline?: boolean\n strikethrough?: boolean\n color?: string\n backcolor?: string\n fontsize?: string\n fontname?: string\n align?: 'left' | 'center' | 'right'\n}\n\n\n/**\n * 表格单元格\n * \n * id: 单元格ID\n * \n * colspan: 合并列数\n * \n * rowspan: 合并行数\n * \n * text: 文字内容\n * \n * style?: 单元格样式\n */\nexport interface TableCell {\n id: string\n colspan: number\n rowspan: number\n text: string\n style?: TableCellStyle\n}\n\n/**\n * 表格主题\n * \n * color: 主题色\n * \n * rowHeader: 标题行\n * \n * rowFooter: 汇总行\n * \n * colHeader: 第一列\n * \n * colFooter: 最后一列\n */\nexport interface TableTheme {\n color: string\n rowHeader: boolean\n rowFooter: boolean\n colHeader: boolean\n colFooter: boolean\n}\n\n/**\n * 表格元素\n * \n * type: 元素类型(table)\n * \n * outline: 边框\n * \n * theme?: 主题\n * \n * colWidths: 列宽数组,如[30, 50, 20]表示三列宽度分别为30%, 50%, 20%\n * \n * cellMinHeight: 单元格最小高度\n * \n * data: 表格数据\n */\nexport interface PPTTableElement extends PPTBaseElement {\n type: 'table'\n outline: PPTElementOutline\n theme?: TableTheme\n colWidths: number[]\n cellMinHeight: number\n data: TableCell[][]\n}\n\n\n/**\n * LaTeX元素(公式)\n * \n * type: 元素类型(latex)\n * \n * latex: latex代码\n * \n * path: svg path\n * \n * color: 颜色\n * \n * strokeWidth: 路径宽度\n * \n * viewBox: SVG的viewBox属性\n * \n * fixedRatio: 固定形状宽高比例\n */\nexport interface PPTLatexElement extends PPTBaseElement {\n type: 'latex'\n latex: string\n path: string\n color: string\n strokeWidth: number\n viewBox: [number, number]\n fixedRatio: boolean\n}\n\n/**\n * 视频元素\n * \n * type: 元素类型(video)\n * \n * src: 视频地址\n * \n * autoplay: 自动播放\n * \n * poster: 预览封面\n * \n * ext: 视频后缀,当资源链接缺少后缀时用该字段确认资源类型\n */\nexport interface PPTVideoElement extends PPTBaseElement {\n type: 'video'\n src: string\n autoplay: boolean\n poster?: string\n ext?: string\n}\n\n/**\n * 音频元素\n * \n * type: 元素类型(audio)\n * \n * fixedRatio: 固定图标宽高比例\n * \n * color: 图标颜色\n * \n * loop: 循环播放\n * \n * autoplay: 自动播放\n * \n * src: 音频地址\n * \n * ext: 音频后缀,当资源链接缺少后缀时用该字段确认资源类型\n */\nexport interface PPTAudioElement extends PPTBaseElement {\n type: 'audio'\n fixedRatio: boolean\n color: string\n loop: boolean\n autoplay: boolean\n src: string\n ext?: string\n}\n\n\nexport type PPTElement = PPTTextElement | PPTImageElement | PPTShapeElement | PPTLineElement | PPTChartElement | PPTTableElement | PPTLatexElement | PPTVideoElement | PPTAudioElement\n\n\n/**\n * 元素动画\n * \n * id: 动画id\n * \n * elId: 元素ID\n * \n * effect: 动画效果\n * \n * type: 动画类型(入场、退场、强调)\n * \n * duration: 动画持续时间\n * \n * trigger: 动画触发方式(click - 单击时、meantime - 与上一动画同时、auto - 上一动画之后)\n */\nexport interface PPTAnimation {\n id: string\n elId: string\n effect: string\n type: 'in' | 'out' | 'attention'\n duration: number\n trigger: 'click' | 'meantime' | 'auto'\n}\n\n/**\n * 幻灯片背景\n * \n * type: 背景类型(纯色、图片、渐变)\n * \n * color?: 背景颜色(纯色)\n * \n * image?: 图片地址(图片)\n * \n * imageSize?: 图片填充方式\n * \n * gradientType?: 渐变类型(线性、径向)\n * \n * gradientColor?: 渐变颜色\n * \n * gradientRotate?: 渐变角度(线性)\n */\nexport interface SlideBackground {\n type: 'solid' | 'image' | 'gradient'\n color?: string\n image?: string\n imageSize?: 'cover' | 'contain' | 'repeat'\n gradientType?: 'linear' | 'radial'\n gradientColor?: [string, string]\n gradientRotate?: number\n}\n\n\nexport type TurningMode = 'no' | 'fade' | 'slideX' | 'slideY' | 'random' | 'slideX3D' | 'slideY3D' | 'rotate' | 'scaleY' | 'scaleX' | 'scale' | 'scaleReverse'\n\n/**\n * 幻灯片页面\n * \n * id: 页面ID\n * \n * elements: 元素集合\n * \n * remark?: 备注\n * \n * background?: 页面背景\n * \n * animations?: 元素动画集合\n * \n * turningMode?: 翻页方式\n */\nexport interface Slide {\n id: string\n elements: PPTElement[]\n remark?: string\n background?: SlideBackground\n animations?: PPTAnimation[]\n turningMode?: TurningMode\n}\n\n/**\n * 幻灯片主题\n * \n * backgroundColor: 页面背景颜色\n * \n * themeColor: 主题色,用于默认创建的形状颜色等\n * \n * fontColor: 字体颜色\n * \n * fontName: 字体\n */\nexport interface SlideTheme {\n backgroundColor: string\n themeColor: string\n fontColor: string\n fontName: string\n}\n","/* eslint-disable max-lines */\n\n// 非专业设计人士可以用该应用绘制基本形状:https://github.com/pipipi-pikachu/svgPathCreator\n\nimport { ShapePathFormulasKeys } from '@/types/slides'\n\nexport interface ShapePoolItem {\n viewBox: [number, number]\n path: string\n special?: boolean\n pathFormula?: ShapePathFormulasKeys\n outlined?: boolean\n pptxShapeType?: string\n title?: string\n}\n\ninterface ShapeListItem {\n type: string\n children: ShapePoolItem[]\n}\n\nexport const SHAPE_PATH_FORMULAS = {\n [ShapePathFormulasKeys.ROUND_RECT]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height - radius} Q ${width} ${height} ${width - radius} ${height} L ${radius} ${height} Q 0 ${height} 0 ${height - radius} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_DIAGONAL]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${height - radius} L 0 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L ${radius} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_SINGLE]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${height} L 0 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_SAMESIDE]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${radius} L ${radius} 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_DIAGONAL]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 1],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width} 0 L ${width} ${height - radius} Q ${width} ${height} ${width - radius} ${height} L 0 ${height} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_SINGLE]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 1],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height} L 0 ${height} L 0 0 Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_SAMESIDE]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${radius} Q 0 0 ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_ROUND_RECT]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L 0 ${height} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.MESSAGE]: {\n formula: (width: number, height: number) => {\n const arrowWidth = width * 0.2\n const arrowheight = height * 0.2\n return `M 0 0 L ${width} 0 L ${width} ${height - arrowheight} L ${width / 2} ${height - arrowheight} L ${width / 2 - arrowWidth} ${height} L ${width / 2 - arrowWidth} ${height - arrowheight} L 0 ${height - arrowheight} Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_MESSAGE]: {\n formula: (width: number, height: number) => {\n const radius = Math.min(width, height) * 0.125\n const arrowWidth = width * 0.2\n const arrowheight = height * 0.2\n return `M 0 ${radius} Q 0 0 ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height - radius - arrowheight} Q ${width} ${height - arrowheight} ${width - radius} ${height - arrowheight} L ${width / 2} ${height - arrowheight} L ${width / 2 - arrowWidth} ${height} L ${width / 2 - arrowWidth} ${height - arrowheight} L ${radius} ${height - arrowheight} Q 0 ${height - arrowheight} 0 ${height - radius - arrowheight} L 0 ${radius} Z`\n }\n },\n [ShapePathFormulasKeys.L]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.9],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M 0 0 L 0 ${height} L ${width} ${height} L ${width} ${height - lineWidth} L ${lineWidth} ${height - lineWidth} L ${lineWidth} 0 Z`\n }\n },\n [ShapePathFormulasKeys.RING_RECT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.45],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M 0 0 ${width} 0 ${width} ${height} L 0 ${height} L 0 0 Z M ${lineWidth} ${lineWidth} L ${lineWidth} ${height - lineWidth} L ${width - lineWidth} ${height - lineWidth} L ${width - lineWidth} ${lineWidth} Z`\n }\n },\n [ShapePathFormulasKeys.PLUS]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.9],\n relative: 'center',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M ${width / 2 - lineWidth / 2} 0 L ${width / 2 - lineWidth / 2} ${height / 2 - lineWidth / 2} L 0 ${height / 2 - lineWidth / 2} L 0 ${height / 2 + lineWidth / 2} L ${width / 2 - lineWidth / 2} ${height / 2 + lineWidth / 2} L ${width / 2 - lineWidth / 2} ${height} L ${width / 2 + lineWidth / 2} ${height} L ${width / 2 + lineWidth / 2} ${height / 2 + lineWidth / 2} L ${width} ${height / 2 + lineWidth / 2} L ${width} ${height / 2 - lineWidth / 2} L ${width / 2 + lineWidth / 2} ${height / 2 - lineWidth / 2} L ${width / 2 + lineWidth / 2} 0 Z`\n }\n },\n [ShapePathFormulasKeys.TRIANGLE]: {\n editable: true,\n defaultValue: 0.5,\n range: [0, 1],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const vertex = width * value\n return `M ${vertex} 0 L 0 ${height} L ${width} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.PARALLELOGRAM_LEFT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.9],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${point} 0 L ${width} 0 L ${width - point} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.PARALLELOGRAM_RIGHT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M 0 0 L ${width - point} 0 L ${width} ${height} L ${point} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.TRAPEZOID]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${point} 0 L ${width - point} 0 L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.BULLET]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 1],\n relative: 'top',\n getBaseSize: (width: number, height: number) => height,\n formula: (width: number, height: number, value: number) => {\n const point = height * value\n return `M ${width / 2} 0 L 0 ${point} L 0 ${height} L ${width} ${height} L ${width} ${point} Z`\n }\n },\n [ShapePathFormulasKeys.INDICATOR]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${width} ${height / 2} L ${width - point} 0 L 0 0 L ${point} ${height / 2} L 0 ${height} L ${width - point} ${height} Z`\n }\n },\n}\n\nexport const SHAPE_LIST: ShapeListItem[] = [\n {\n type: '矩形',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n pptxShapeType: 'rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT,\n pptxShapeType: 'roundRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_SINGLE,\n pptxShapeType: 'snip1Rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_SAMESIDE,\n pptxShapeType: 'snip2SameRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_DIAGONAL,\n pptxShapeType: 'snip2DiagRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.CUT_ROUND_RECT,\n pptxShapeType: 'snipRoundRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_SINGLE,\n pptxShapeType: 'round1Rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_SAMESIDE,\n pptxShapeType: 'round2SameRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_DIAGONAL,\n pptxShapeType: 'round2DiagRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z',\n title: '任意多边形',\n },\n ]\n },\n\n {\n type: '常用形状',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n pptxShapeType: 'ellipse',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 200 L 200 200 L 100 0 Z',\n pathFormula: ShapePathFormulasKeys.TRIANGLE,\n pptxShapeType: 'triangle',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z',\n pathFormula: ShapePathFormulasKeys.PARALLELOGRAM_LEFT,\n pptxShapeType: 'parallelogram',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.PARALLELOGRAM_RIGHT,\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z',\n pathFormula: ShapePathFormulasKeys.TRAPEZOID,\n pptxShapeType: 'trapezoid',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z',\n pptxShapeType: 'diamond',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z',\n pathFormula: ShapePathFormulasKeys.BULLET,\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z',\n pathFormula: ShapePathFormulasKeys.INDICATOR,\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z',\n pptxShapeType: 'pie',\n },\n {\n viewBox: [200, 200],\n path: 'M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z',\n pptxShapeType: 'chord',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z',\n pptxShapeType: 'teardrop',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z',\n pptxShapeType: 'pentagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z',\n pptxShapeType: 'hexagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z',\n pptxShapeType: 'octagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.L\n },\n {\n viewBox: [200, 200],\n path: 'M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z',\n pathFormula: ShapePathFormulasKeys.RING_RECT,\n },\n {\n viewBox: [200, 200],\n path: 'M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z',\n pathFormula: ShapePathFormulasKeys.PLUS,\n },\n {\n viewBox: [200, 200],\n path: 'M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z',\n pathFormula: ShapePathFormulasKeys.MESSAGE,\n },\n {\n viewBox: [200, 200],\n path: 'M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_MESSAGE,\n },\n {\n viewBox: [200, 200],\n path: 'M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z',\n pptxShapeType: 'star4',\n },\n {\n viewBox: [1024, 1024],\n path: 'M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z',\n pptxShapeType: 'star5',\n special: true,\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z',\n pptxShapeType: 'star6',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z',\n },\n ],\n },\n \n {\n type: '箭头',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z',\n pptxShapeType: 'upArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z',\n pptxShapeType: 'downArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z',\n pptxShapeType: 'leftArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z',\n pptxShapeType: 'rightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z',\n pptxShapeType: 'upDownArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z',\n pptxShapeType: 'leftRightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z',\n pptxShapeType: 'notchedRightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z',\n pptxShapeType: 'chevron',\n },\n {\n viewBox: [200, 200],\n path: 'M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z',\n pptxShapeType: 'homePlate',\n },\n {\n viewBox: [200, 200],\n path: 'M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z'\n },\n {\n viewBox: [1024, 1024],\n path: 'M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z',\n special: true,\n },\n ],\n },\n\n {\n type: '其他形状',\n children: [\n {\n viewBox: [1024, 1024],\n path: 'M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z',\n special: true,\n },\n ],\n },\n\n {\n type: '线性',\n children: [\n {\n viewBox: [1024, 1024],\n path: 'M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z',\n special: true,\n outlined: true,\n },\n ],\n }\n]","import type { ChartType } from '@/types/slides'\n\ninterface ChartTypes {\n [propName: string]: ChartType\n}\n\nexport const CHART_TYPES: ChartTypes = {\n bar: 'bar',\n horizontalBar: 'bar',\n line: 'line',\n area: 'line',\n scatter: 'line',\n pie: 'pie',\n ring: 'pie',\n}","import { debounce, throttle} from 'lodash'\nimport { useSnapshotStore } from '@/store'\n\nexport default () => {\n const snapshotStore = useSnapshotStore()\n\n // 添加历史快照(历史记录)\n const addHistorySnapshot = debounce(function() {\n snapshotStore.addSnapshot()\n }, 300, { trailing: true })\n\n // 重做\n const redo = throttle(function() {\n snapshotStore.reDo()\n }, 100, { leading: true, trailing: false })\n\n // 撤销\n const undo = throttle(function() {\n snapshotStore.unDo()\n }, 100, { leading: true, trailing: false })\n\n return {\n addHistorySnapshot,\n redo,\n undo,\n }\n}","import { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { getImageSize } from '@/utils/image'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport type { PPTLineElement, PPTElement, TableCell, TableCellStyle, PPTShapeElement, PPTChartElement, ChartOptions, PresetChartType } from '@/types/slides'\nimport { type ShapePoolItem, SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport type { LinePoolItem } from '@/configs/lines'\nimport { CHART_TYPES } from '@/configs/chartTypes'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface CommonElementPosition {\n top: number\n left: number\n width: number\n height: number\n}\n\ninterface LineElementPosition {\n top: number\n left: number\n start: [number, number]\n end: [number, number]\n}\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { creatingElement } = storeToRefs(mainStore)\n const { theme, viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 创建(插入)一个元素并将其设置为被选中元素\n const createElement = (element: PPTElement, callback?: () => void) => {\n slidesStore.addElement(element)\n mainStore.setActiveElementIdList([element.id])\n\n if (creatingElement.value) mainStore.setCreatingElement(null)\n\n setTimeout(() => {\n mainStore.setEditorareaFocus(true)\n }, 0)\n\n if (callback) callback()\n\n addHistorySnapshot()\n }\n\n /**\n * 创建图片元素\n * @param src 图片地址\n */\n const createImageElement = (src: string) => {\n getImageSize(src).then(({ width, height }) => {\n const scale = height / width\n \n if (scale < viewportRatio.value && width > VIEWPORT_SIZE) {\n width = VIEWPORT_SIZE\n height = width * scale\n }\n else if (height > VIEWPORT_SIZE * viewportRatio.value) {\n height = VIEWPORT_SIZE * viewportRatio.value\n width = height / scale\n }\n\n createElement({\n type: 'image',\n id: nanoid(10),\n src,\n width,\n height,\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n fixedRatio: true,\n rotate: 0,\n })\n })\n }\n \n /**\n * 创建图表元素\n * @param chartType 图表类型\n */\n const createChartElement = (type: PresetChartType) => {\n const newElement: PPTChartElement = {\n type: 'chart',\n id: nanoid(10),\n chartType: CHART_TYPES[type],\n left: 300,\n top: 81.25,\n width: 400,\n height: 400,\n rotate: 0,\n themeColor: [theme.value.themeColor],\n gridColor: theme.value.fontColor,\n data: {\n labels: ['类别1', '类别2', '类别3', '类别4', '类别5'],\n legends: ['系列1'],\n series: [\n [12, 19, 5, 2, 18],\n ],\n },\n }\n\n const options: ChartOptions = {\n ...(type === 'bar' ? { horizontalBars: false, stackBars: false } : {}),\n ...(type === 'horizontalBar' ? { horizontalBars: true, stackBars: false } : {}),\n ...(type === 'line' ? { showLine: true, lineSmooth: true, showArea: false } : {}),\n ...(type === 'area' ? { showLine: true, lineSmooth: true, showArea: true } : {}),\n ...(type === 'scatter' ? { showLine: false, lineSmooth: true, showArea: false } : {}),\n ...(type === 'pie' ? { donut: false } : {}),\n ...(type === 'ring' ? { donut: true } : {}),\n }\n\n createElement({\n ...newElement,\n options,\n })\n }\n \n /**\n * 创建表格元素\n * @param row 行数\n * @param col 列数\n */\n const createTableElement = (row: number, col: number) => {\n const style: TableCellStyle = {\n fontname: theme.value.fontName,\n color: theme.value.fontColor,\n }\n const data: TableCell[][] = []\n for (let i = 0; i < row; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < col; j++) {\n rowCells.push({ id: nanoid(10), colspan: 1, rowspan: 1, text: '', style })\n }\n data.push(rowCells)\n }\n\n const DEFAULT_CELL_WIDTH = 100\n const DEFAULT_CELL_HEIGHT = 36\n\n const colWidths: number[] = new Array(col).fill(1 / col)\n\n const width = col * DEFAULT_CELL_WIDTH\n const height = row * DEFAULT_CELL_HEIGHT\n\n createElement({\n type: 'table',\n id: nanoid(10),\n width,\n height,\n colWidths,\n rotate: 0,\n data,\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n outline: {\n width: 2,\n style: 'solid',\n color: '#eeece1',\n },\n theme: {\n color: theme.value.themeColor,\n rowHeader: true,\n rowFooter: false,\n colHeader: false,\n colFooter: false,\n },\n cellMinHeight: 36,\n })\n }\n \n /**\n * 创建文本元素\n * @param position 位置大小信息\n * @param content 文本内容\n */\n \n interface CreateTextData {\n content?: string\n vertical?: boolean\n }\n const createTextElement = (position: CommonElementPosition, data?: CreateTextData) => {\n const { left, top, width, height } = position\n const content = data?.content || ''\n const vertical = data?.vertical || false\n\n const id = nanoid(10)\n createElement({\n type: 'text',\n id,\n left, \n top, \n width, \n height,\n content,\n rotate: 0,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n vertical,\n }, () => {\n setTimeout(() => {\n const editorRef: HTMLElement | null = document.querySelector(`#editable-element-${id} .ProseMirror`)\n if (editorRef) editorRef.focus()\n }, 0)\n })\n }\n \n /**\n * 创建形状元素\n * @param position 位置大小信息\n * @param data 形状路径信息\n */\n const createShapeElement = (position: CommonElementPosition, data: ShapePoolItem) => {\n const { left, top, width, height } = position\n const newElement: PPTShapeElement = {\n type: 'shape',\n id: nanoid(10),\n left, \n top, \n width, \n height,\n viewBox: data.viewBox,\n path: data.path,\n fill: theme.value.themeColor,\n fixedRatio: false,\n rotate: 0,\n }\n if (data.special) newElement.special = true\n if (data.pathFormula) {\n newElement.pathFormula = data.pathFormula\n newElement.viewBox = [width, height]\n\n const pathFormula = SHAPE_PATH_FORMULAS[data.pathFormula]\n if ('editable' in pathFormula) {\n newElement.path = pathFormula.formula(width, height, pathFormula.defaultValue)\n newElement.keypoint = pathFormula.defaultValue\n }\n else newElement.path = pathFormula.formula(width, height)\n }\n createElement(newElement)\n }\n \n /**\n * 创建线条元素\n * @param position 位置大小信息\n * @param data 线条的路径和样式\n */\n const createLineElement = (position: LineElementPosition, data: LinePoolItem) => {\n const { left, top, start, end } = position\n\n const newElement: PPTLineElement = {\n type: 'line',\n id: nanoid(10),\n left, \n top, \n start,\n end,\n points: data.points,\n color: theme.value.themeColor,\n style: data.style,\n width: 2,\n }\n if (data.isBroken) newElement.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (data.isCurve) newElement.curve = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (data.isCubic) newElement.cubic = [[(start[0] + end[0]) / 2, (start[1] + end[1]) / 2], [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]]\n createElement(newElement)\n }\n \n /**\n * 创建LaTeX元素\n * @param svg SVG代码\n */\n const createLatexElement = (data: { path: string; latex: string; w: number; h: number; }) => {\n createElement({\n type: 'latex',\n id: nanoid(10),\n width: data.w,\n height: data.h,\n rotate: 0,\n left: (VIEWPORT_SIZE - data.w) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - data.h) / 2,\n path: data.path,\n latex: data.latex,\n color: theme.value.fontColor,\n strokeWidth: 2,\n viewBox: [data.w, data.h],\n fixedRatio: true,\n })\n }\n \n /**\n * 创建视频元素\n * @param src 视频地址\n */\n const createVideoElement = (src: string) => {\n createElement({\n type: 'video',\n id: nanoid(10),\n width: 500,\n height: 300,\n rotate: 0,\n left: (VIEWPORT_SIZE - 500) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - 300) / 2,\n src,\n autoplay: false,\n })\n }\n \n /**\n * 创建音频元素\n * @param src 音频地址\n */\n const createAudioElement = (src: string) => {\n createElement({\n type: 'audio',\n id: nanoid(10),\n width: 50,\n height: 50,\n rotate: 0,\n left: (VIEWPORT_SIZE - 50) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - 50) / 2,\n loop: false,\n autoplay: false,\n fixedRatio: true,\n color: theme.value.themeColor,\n src,\n })\n }\n\n return {\n createImageElement,\n createChartElement,\n createTableElement,\n createTextElement,\n createShapeElement,\n createLineElement,\n createLatexElement,\n createVideoElement,\n createAudioElement,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useSlidesStore, useMainStore } from '@/store'\nimport type { PPTElement, Slide } from '@/types/slides'\nimport { createSlideIdMap, createElementIdMap, getElementRange } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { currentSlide, slides } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 添加指定的元素数据(一组)\n * @param elements 元素列表数据\n */\n const addElementsFromData = (elements: PPTElement[]) => {\n const { groupIdMap, elIdMap } = createElementIdMap(elements)\n\n const firstElement = elements[0]\n let offset = 0\n let lastSameElement: PPTElement | undefined\n \n do {\n lastSameElement = currentSlide.value.elements.find(el => {\n if (el.type !== firstElement.type) return false\n \n const { minX: oMinX, maxX: oMaxX, minY: oMinY, maxY: oMaxY } = getElementRange(el)\n const { minX: nMinX, maxX: nMaxX, minY: nMinY, maxY: nMaxY } = getElementRange({\n ...firstElement,\n left: firstElement.left + offset,\n top: firstElement.top + offset\n })\n if (\n oMinX === nMinX &&\n oMaxX === nMaxX &&\n oMinY === nMinY &&\n oMaxY === nMaxY\n ) return true\n \n return false\n })\n if (lastSameElement) offset += 10\n\n } while (lastSameElement)\n \n for (const element of elements) {\n element.id = elIdMap[element.id]\n\n element.left = element.left + offset\n element.top = element.top + offset\n\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n }\n slidesStore.addElement(elements)\n mainStore.setActiveElementIdList(Object.values(elIdMap))\n addHistorySnapshot()\n }\n\n /**\n * 添加指定的页面数据\n * @param slide 页面数据\n */\n const addSlidesFromData = (slides: Slide[]) => {\n const slideIdMap = createSlideIdMap(slides)\n const newSlides = slides.map(slide => {\n const { groupIdMap, elIdMap } = createElementIdMap(slide.elements)\n\n for (const element of slide.elements) {\n element.id = elIdMap[element.id]\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n\t\t\n // 若元素绑定了页面跳转链接\n if (element.link && element.link.type === 'slide') {\n\n // 待添加页面中包含该页面,则替换相关绑定关系\n if (slideIdMap[element.link.target]) {\n element.link.target = slideIdMap[element.link.target]\n }\n // 待添加页面中不包含该页面,则删除该元素绑定的页面跳转\n else delete element.link\n }\n }\n // 动画id替换\n if (slide.animations) {\n for (const animation of slide.animations) {\n animation.id = nanoid(10)\n animation.elId = elIdMap[animation.elId]\n }\n }\n return {\n ...slide,\n id: slideIdMap[slide.id],\n }\n })\n slidesStore.addSlide(newSlides)\n addHistorySnapshot()\n }\n\n const isEmptySlide = computed(() => {\n if (slides.value.length > 1) return false\n if (slides.value[0].elements.length > 0) return false\n return true\n })\n\n return {\n addElementsFromData,\n addSlidesFromData,\n isEmptySlide,\n }\n}","import { pasteCustomClipboardString } from '@/utils/clipboard'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useCreateElement from '@/hooks/useCreateElement'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\n\ninterface PasteTextClipboardDataOptions {\n onlySlide?: boolean\n onlyElements?: boolean\n}\n\nexport default () => {\n const { createTextElement } = useCreateElement()\n const { addElementsFromData, addSlidesFromData } = useAddSlidesOrElements()\n\n /**\n * 粘贴普通文本:创建为新的文本元素\n * @param text 文本\n */\n const createTextElementFromClipboard = (text: string) => {\n createTextElement({\n left: 0,\n top: 0,\n width: 600,\n height: 50,\n }, { content: text })\n }\n\n /**\n * 解析剪贴板内容,根据解析结果选择合适的粘贴方式\n * @param text 剪贴板内容\n * @param options 配置项:onlySlide -- 仅处理页面粘贴;onlyElements -- 仅处理元素粘贴;\n */\n const pasteTextClipboardData = (text: string, options?: PasteTextClipboardDataOptions) => {\n const onlySlide = options?.onlySlide || false\n const onlyElements = options?.onlyElements || false\n\n const clipboardData = pasteCustomClipboardString(text)\n\n // 元素或页面\n if (typeof clipboardData === 'object') {\n const { type, data } = clipboardData\n\n if (type === 'elements' && !onlySlide) addElementsFromData(data)\n else if (type === 'slides' && !onlyElements) addSlidesFromData(data)\n }\n\n // 普通文本\n else if (!onlyElements && !onlySlide) {\n const string = parseText2Paragraphs(clipboardData)\n createTextElementFromClipboard(string)\n }\n }\n\n return {\n pasteTextClipboardData,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { copyText, readClipboard } from '@/utils/clipboard'\nimport { encrypt } from '@/utils/crypto'\nimport { createElementIdMap } from '@/utils/element'\nimport { KEYS } from '@/configs/hotkey'\nimport message from '@/utils/message'\nimport usePasteTextClipboardData from '@/hooks/usePasteTextClipboardData'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport useAddSlidesOrElements from '@/hooks//useAddSlidesOrElements'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { selectedSlidesIndex: _selectedSlidesIndex, activeElementIdList } = storeToRefs(mainStore)\n const { currentSlide, slides, theme, slideIndex } = storeToRefs(slidesStore)\n\n const selectedSlidesIndex = computed(() => [..._selectedSlidesIndex.value, slideIndex.value])\n const selectedSlides = computed(() => slides.value.filter((item, index) => selectedSlidesIndex.value.includes(index)))\n const selectedSlidesId = computed(() => selectedSlides.value.map(item => item.id))\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { addSlidesFromData } = useAddSlidesOrElements()\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 重置幻灯片\n const resetSlides = () => {\n const emptySlide: Slide = {\n id: nanoid(10),\n elements: [],\n background: {\n type: 'solid',\n color: theme.value.backgroundColor,\n },\n }\n slidesStore.updateSlideIndex(0)\n mainStore.setActiveElementIdList([])\n slidesStore.setSlides([emptySlide])\n }\n\n /**\n * 移动页面焦点\n * @param command 移动页面焦点命令:上移、下移\n */\n const updateSlideIndex = (command: string) => {\n if (command === KEYS.UP && slideIndex.value > 0) {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(slideIndex.value - 1)\n }\n else if (command === KEYS.DOWN && slideIndex.value < slides.value.length - 1) {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(slideIndex.value + 1)\n }\n }\n\n // 将当前页面数据加密后复制到剪贴板\n const copySlide = () => {\n const text = encrypt(JSON.stringify({\n type: 'slides',\n data: selectedSlides.value,\n }))\n\n copyText(text).then(() => {\n mainStore.setThumbnailsFocus(true)\n })\n }\n\n // 尝试将剪贴板页面数据解密后添加到下一页(粘贴)\n const pasteSlide = () => {\n readClipboard().then(text => {\n pasteTextClipboardData(text, { onlySlide: true })\n }).catch(err => message.warning(err))\n }\n\n // 创建一页空白页并添加到下一页\n const createSlide = () => {\n const emptySlide: Slide = {\n id: nanoid(10),\n elements: [],\n background: {\n type: 'solid',\n color: theme.value.backgroundColor,\n },\n }\n mainStore.setActiveElementIdList([])\n slidesStore.addSlide(emptySlide)\n addHistorySnapshot()\n }\n\n // 根据模板创建新页面\n const createSlideByTemplate = (slide: Slide) => {\n const { groupIdMap, elIdMap } = createElementIdMap(slide.elements)\n\n for (const element of slide.elements) {\n element.id = elIdMap[element.id]\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n }\n const newSlide = {\n ...slide,\n id: nanoid(10),\n }\n mainStore.setActiveElementIdList([])\n slidesStore.addSlide(newSlide)\n addHistorySnapshot()\n }\n\n // 将当前页复制一份到下一页\n const copyAndPasteSlide = () => {\n const slide = JSON.parse(JSON.stringify(currentSlide.value))\n addSlidesFromData([slide])\n }\n\n // 删除当前页,若将删除全部页面,则执行重置幻灯片操作\n const deleteSlide = (targetSlidesId = selectedSlidesId.value) => {\n if (slides.value.length === targetSlidesId.length) resetSlides()\n else slidesStore.deleteSlide(targetSlidesId)\n\n mainStore.updateSelectedSlidesIndex([])\n\n addHistorySnapshot()\n }\n\n // 将当前页复制后删除(剪切)\n // 由于复制操作会导致多选状态消失,所以需要提前将需要删除的页面ID进行缓存\n const cutSlide = () => {\n const targetSlidesId = [...selectedSlidesId.value]\n copySlide()\n deleteSlide(targetSlidesId)\n }\n\n // 选中全部幻灯片\n const selectAllSlide = () => {\n const newSelectedSlidesIndex = Array.from(Array(slides.value.length), (item, index) => index)\n mainStore.setActiveElementIdList([])\n mainStore.updateSelectedSlidesIndex(newSelectedSlidesIndex)\n }\n\n // 拖拽调整幻灯片顺序同步数据\n const sortSlides = (newIndex: number, oldIndex: number) => {\n if (oldIndex === newIndex) return\n \n const _slides = JSON.parse(JSON.stringify(slides.value))\n const _slide = _slides[oldIndex]\n _slides.splice(oldIndex, 1)\n _slides.splice(newIndex, 0, _slide)\n slidesStore.setSlides(_slides)\n slidesStore.updateSlideIndex(newIndex)\n }\n\n return {\n resetSlides,\n updateSlideIndex,\n copySlide,\n pasteSlide,\n createSlide,\n createSlideByTemplate,\n copyAndPasteSlide,\n deleteSlide,\n cutSlide,\n selectAllSlide,\n sortSlides,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 锁定选中的元素,并清空选中元素状态\n const lockElement = () => {\n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n \n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id)) element.lock = true\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList([])\n addHistorySnapshot()\n }\n\n /**\n * 解除元素的锁定状态,并将其设置为当前选择元素\n * @param handleElement 需要解锁的元素\n */\n const unlockElement = (handleElement: PPTElement) => {\n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n\n if (handleElement.groupId) {\n const groupElementIdList = []\n for (const element of newElementList) {\n if (element.groupId === handleElement.groupId) {\n element.lock = false\n groupElementIdList.push(element.id)\n }\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList(groupElementIdList)\n }\n else {\n for (const element of newElementList) {\n if (element.id === handleElement.id) {\n element.lock = false\n break\n }\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList([handleElement.id])\n }\n addHistorySnapshot()\n }\n\n return {\n lockElement,\n unlockElement,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 删除全部选中元素\n // 组合元素成员中,存在被选中可独立操作的元素时,优先删除该元素。否则默认删除所有被选中的元素\n const deleteElement = () => {\n if (!activeElementIdList.value.length) return\n\n let newElementList: PPTElement[] = []\n if (activeGroupElementId.value) {\n newElementList = currentSlide.value.elements.filter(el => el.id !== activeGroupElementId.value)\n }\n else {\n newElementList = currentSlide.value.elements.filter(el => !activeElementIdList.value.includes(el.id))\n }\n\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n // 删除内面内全部元素(无论是否选中)\n const deleteAllElements = () => {\n if (!currentSlide.value.elements.length) return\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlide({ elements: [] })\n addHistorySnapshot()\n }\n\n return {\n deleteElement,\n deleteAllElements,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeElementList, handleElementId } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 判断当前选中的元素是否可以组合\n */\n const canCombine = computed(() => {\n if (activeElementList.value.length < 2) return false\n\n const firstGroupId = activeElementList.value[0].groupId\n if (!firstGroupId) return true\n\n const inSameGroup = activeElementList.value.every(el => (el.groupId && el.groupId) === firstGroupId)\n return !inSameGroup\n })\n\n /**\n * 组合当前选中的元素:给当前选中的元素赋予一个相同的分组ID\n */\n const combineElements = () => {\n if (!activeElementList.value.length) return\n\n // 生成一个新元素列表进行后续操作\n let newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n\n // 生成分组ID\n const groupId = nanoid(10)\n\n // 收集需要组合的元素列表,并赋上唯一分组ID\n const combineElementList: PPTElement[] = []\n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id)) {\n element.groupId = groupId\n combineElementList.push(element)\n }\n }\n\n // 确保该组合内所有元素成员的层级是连续的,具体操作方法为:\n // 先获取到该组合内最上层元素的层级,将本次需要组合的元素从新元素列表中移除,\n // 再根据最上层元素的层级位置,将上面收集到的需要组合的元素列表一起插入到新元素列表中合适的位置\n const combineElementMaxLevel = newElementList.findIndex(_element => _element.id === combineElementList[combineElementList.length - 1].id)\n const combineElementIdList = combineElementList.map(_element => _element.id)\n newElementList = newElementList.filter(_element => !combineElementIdList.includes(_element.id))\n\n const insertLevel = combineElementMaxLevel - combineElementList.length + 1\n newElementList.splice(insertLevel, 0, ...combineElementList)\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n /**\n * 取消组合元素:移除选中元素的分组ID\n */\n const uncombineElements = () => {\n if (!activeElementList.value.length) return\n const hasElementInGroup = activeElementList.value.some(item => item.groupId)\n if (!hasElementInGroup) return\n \n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id) && element.groupId) delete element.groupId\n }\n slidesStore.updateSlide({ elements: newElementList })\n\n // 取消组合后,需要重置激活元素状态\n // 默认重置为当前正在操作的元素,如果不存在则重置为空\n const handleElementIdList = handleElementId.value ? [handleElementId.value] : []\n mainStore.setActiveElementIdList(handleElementIdList)\n\n addHistorySnapshot()\n }\n\n return {\n canCombine,\n combineElements,\n uncombineElements,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { copyText, readClipboard } from '@/utils/clipboard'\nimport { encrypt } from '@/utils/crypto'\nimport message from '@/utils/message'\nimport usePasteTextClipboardData from '@/hooks/usePasteTextClipboardData'\nimport useDeleteElement from './useDeleteElement'\n\nexport default () => {\n const mainStore = useMainStore()\n const { activeElementIdList, activeElementList } = storeToRefs(mainStore)\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { deleteElement } = useDeleteElement()\n\n // 将选中元素数据加密后复制到剪贴板\n const copyElement = () => {\n if (!activeElementIdList.value.length) return\n\n const text = encrypt(JSON.stringify({\n type: 'elements',\n data: activeElementList.value,\n }))\n\n copyText(text).then(() => {\n mainStore.setEditorareaFocus(true)\n })\n }\n\n // 将选中元素复制后删除(剪切)\n const cutElement = () => {\n copyElement()\n deleteElement()\n }\n\n // 尝试将剪贴板元素数据解密后进行粘贴\n const pasteElement = () => {\n readClipboard().then(text => {\n pasteTextClipboardData(text)\n }).catch(err => message.warning(err))\n }\n\n // 将选中元素复制后立刻粘贴\n const quickCopyElement = () => {\n copyElement()\n pasteElement()\n }\n\n return {\n copyElement,\n cutElement,\n pasteElement,\n quickCopyElement,\n }\n}","import { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\n\r\nexport default () => {\r\n const mainStore = useMainStore()\r\n const { currentSlide } = storeToRefs(useSlidesStore())\r\n const { hiddenElementIdList } = storeToRefs(mainStore)\r\n\r\n // 将当前页面全部元素设置为被选择状态\r\n const selectAllElement = () => {\r\n const unlockedElements = currentSlide.value.elements.filter(el => !el.lock && !hiddenElementIdList.value.includes(el.id))\r\n const newActiveElementIdList = unlockedElements.map(el => el.id)\r\n mainStore.setActiveElementIdList(newActiveElementIdList)\r\n }\r\n\r\n return {\r\n selectAllElement,\r\n }\r\n}","import { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\nimport type { PPTElement } from '@/types/slides'\r\nimport { KEYS } from '@/configs/hotkey'\r\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\r\n\r\nexport default () => {\r\n const slidesStore = useSlidesStore()\r\n const { activeElementIdList, activeGroupElementId } = storeToRefs(useMainStore())\r\n const { currentSlide } = storeToRefs(slidesStore)\r\n\r\n const { addHistorySnapshot } = useHistorySnapshot()\r\n\r\n /**\r\n * 将元素向指定方向移动指定的距离\r\n * 组合元素成员中,存在被选中可独立操作的元素时,优先移动该元素。否则默认移动所有被选中的元素\r\n * @param command 移动方向\r\n * @param step 移动距离\r\n */\r\n const moveElement = (command: string, step = 1) => {\r\n let newElementList: PPTElement[] = []\r\n\r\n const move = (el: PPTElement) => {\r\n let { left, top } = el\r\n switch (command) {\r\n case KEYS.LEFT: \r\n left = left - step\r\n break\r\n case KEYS.RIGHT: \r\n left = left + step\r\n break\r\n case KEYS.UP: \r\n top = top - step\r\n break\r\n case KEYS.DOWN: \r\n top = top + step\r\n break\r\n default: break\r\n }\r\n return { ...el, left, top }\r\n }\r\n\r\n if (activeGroupElementId.value) {\r\n newElementList = currentSlide.value.elements.map(el => {\r\n return activeGroupElementId.value === el.id ? move(el) : el\r\n })\r\n }\r\n else {\r\n newElementList = currentSlide.value.elements.map(el => {\r\n return activeElementIdList.value.includes(el.id) ? move(el) : el\r\n })\r\n }\r\n\r\n slidesStore.updateSlide({ elements: newElementList })\r\n addHistorySnapshot()\r\n }\r\n\r\n return {\r\n moveElement,\r\n }\r\n}","import { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ElementOrderCommands } from '@/types/edit'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 获取组合元素层级范围\n * @param elementList 本页所有元素列表\n * @param combineElementList 组合元素列表\n */\n const getCombineElementLevelRange = (elementList: PPTElement[], combineElementList: PPTElement[]) => {\n return {\n minLevel: elementList.findIndex(_element => _element.id === combineElementList[0].id),\n maxLevel: elementList.findIndex(_element => _element.id === combineElementList[combineElementList.length - 1].id),\n }\n }\n\n /**\n * 上移一层\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveUpElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n // 如果被操作的元素是组合元素成员,需要将该组合全部成员一起进行移动\n if (element.groupId) {\n\n // 获取到该组合全部成员,以及所有成员的层级范围\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel, maxLevel } = getCombineElementLevelRange(elementList, combineElementList)\n\n // 已经处在顶层,无法继续移动\n if (maxLevel === elementList.length - 1) return\n\n // 通过组合成员范围的最大值,获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n // 若上层元素处在另一个组合中,则将上述被移除的组合元素插入到该上层组合上方\n // 若上层元素不处于任何分组中,则将上述被移除的组合元素插入到该上层元素上方\n const nextElement = copyOfElementList[maxLevel + 1]\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n\n if (nextElement.groupId) {\n const nextCombineElementList = copyOfElementList.filter(_element => _element.groupId === nextElement.groupId)\n copyOfElementList.splice(minLevel + nextCombineElementList.length, 0, ...movedElementList)\n }\n else copyOfElementList.splice(minLevel + 1, 0, ...movedElementList)\n }\n\n // 如果被操作的元素不是组合元素成员\n else {\n\n // 获取该元素在列表中的层级\n const level = elementList.findIndex(item => item.id === element.id)\n\n // 已经处在顶层,无法继续移动\n if (level === elementList.length - 1) return\n\n // 获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n const nextElement = copyOfElementList[level + 1]\n const movedElement = copyOfElementList.splice(level, 1)[0]\n\n // 通过组合成员范围的最大值,获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n // 若上层元素处在另一个组合中,则将上述被移除的组合元素插入到该上层组合上方\n // 若上层元素不处于任何分组中,则将上述被移除的组合元素插入到该上层元素上方\n if (nextElement.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === nextElement.groupId)\n copyOfElementList.splice(level + combineElementList.length, 0, movedElement)\n }\n else copyOfElementList.splice(level + 1, 0, movedElement)\n }\n\n return copyOfElementList\n }\n\n /**\n * 下移一层,操作方式同上移\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveDownElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n if (element.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel } = getCombineElementLevelRange(elementList, combineElementList)\n if (minLevel === 0) return\n\n const prevElement = copyOfElementList[minLevel - 1]\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n\n if (prevElement.groupId) {\n const prevCombineElementList = copyOfElementList.filter(_element => _element.groupId === prevElement.groupId)\n copyOfElementList.splice(minLevel - prevCombineElementList.length, 0, ...movedElementList)\n }\n else copyOfElementList.splice(minLevel - 1, 0, ...movedElementList)\n }\n\n else {\n const level = elementList.findIndex(item => item.id === element.id)\n if (level === 0) return\n\n const prevElement = copyOfElementList[level - 1]\n const movedElement = copyOfElementList.splice(level, 1)[0]\n\n if (prevElement.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === prevElement.groupId)\n copyOfElementList.splice(level - combineElementList.length, 0, movedElement)\n }\n else copyOfElementList.splice(level - 1, 0, movedElement)\n }\n\n return copyOfElementList\n }\n\n /**\n * 置顶层\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveTopElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n // 如果被操作的元素是组合元素成员,需要将该组合全部成员一起进行移动\n if (element.groupId) {\n\n // 获取到该组合全部成员,以及所有成员的层级范围\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel, maxLevel } = getCombineElementLevelRange(elementList, combineElementList)\n\n // 已经处在顶层,无法继续移动\n if (maxLevel === elementList.length - 1) return null\n\n // 将该组合元素从元素列表中移除,然后将被移除的元素添加到元素列表顶部\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n copyOfElementList.push(...movedElementList)\n }\n\n // 如果被操作的元素不是组合元素成员\n else {\n\n // 获取该元素在列表中的层级\n const level = elementList.findIndex(item => item.id === element.id)\n\n // 已经处在顶层,无法继续移动\n if (level === elementList.length - 1) return null\n\n // 将该组合元素从元素列表中移除,然后将被移除的元素添加到元素列表底部\n copyOfElementList.splice(level, 1)\n copyOfElementList.push(element)\n }\n\n return copyOfElementList\n }\n\n /**\n * 置底层,操作方式同置顶\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveBottomElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n if (element.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel } = getCombineElementLevelRange(elementList, combineElementList)\n if (minLevel === 0) return\n\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n copyOfElementList.unshift(...movedElementList)\n }\n\n else {\n const level = elementList.findIndex(item => item.id === element.id)\n if (level === 0) return\n\n copyOfElementList.splice(level, 1)\n copyOfElementList.unshift(element)\n }\n\n return copyOfElementList\n }\n\n /**\n * 调整元素层级\n * @param element 需要调整层级的元素\n * @param command 调整命令:上移、下移、置顶、置底\n */\n const orderElement = (element: PPTElement, command: ElementOrderCommands) => {\n let newElementList\n \n if (command === ElementOrderCommands.UP) newElementList = moveUpElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.DOWN) newElementList = moveDownElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.TOP) newElementList = moveTopElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.BOTTOM) newElementList = moveBottomElement(currentSlide.value.elements, element)\n\n if (!newElementList) return\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n return {\n orderElement,\n }\n}","// 进入全屏\nexport const enterFullscreen = () => {\n const docElm = document.documentElement\n if (docElm.requestFullscreen) docElm.requestFullscreen() \n else if (docElm.mozRequestFullScreen) docElm.mozRequestFullScreen() \n else if (docElm.webkitRequestFullScreen) docElm.webkitRequestFullScreen()\n else if (docElm.msRequestFullscreen) docElm.msRequestFullscreen()\n}\n\n// 退出全屏\nexport const exitFullscreen = () => {\n if (document.exitFullscreen) document.exitFullscreen()\n else if (document.mozCancelFullScreen) document.mozCancelFullScreen()\n else if (document.webkitExitFullscreen) document.webkitExitFullscreen()\n else if (document.msExitFullscreen) document.msExitFullscreen()\n}\n\n// 判断是否全屏\nexport const isFullscreen = () => {\n const fullscreenElement = \n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement ||\n document.msFullscreenElement ||\n document.webkitCurrentFullScreenElement\n return !!fullscreenElement\n}","import { useScreenStore, useSlidesStore } from '@/store'\nimport { enterFullscreen, exitFullscreen, isFullscreen } from '@/utils/fullscreen'\n\nexport default () => {\n const screenStore = useScreenStore()\n const slidesStore = useSlidesStore()\n\n // 进入放映状态(从当前页开始)\n const enterScreening = () => {\n enterFullscreen()\n screenStore.setScreening(true)\n }\n\n // 进入放映状态(从第一页开始)\n const enterScreeningFromStart = () => {\n slidesStore.updateSlideIndex(0)\n enterScreening()\n }\n\n // 退出放映状态\n const exitScreening = () => {\n screenStore.setScreening(false)\n if (isFullscreen()) exitFullscreen()\n }\n\n return {\n enterScreening,\n enterScreeningFromStart,\n exitScreening,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\n\nexport default () => {\n const mainStore = useMainStore()\n const { canvasPercentage, canvasScale, canvasDragged } = storeToRefs(mainStore)\n\n const canvasScalePercentage = computed(() => Math.round(canvasScale.value * 100) + '%')\n\n /**\n * 缩放画布百分比\n * @param command 缩放命令:放大、缩小\n */\n const scaleCanvas = (command: '+' | '-') => {\n let percentage = canvasPercentage.value\n const step = 5\n const max = 200\n const min = 30\n if (command === '+' && percentage <= max) percentage += step\n if (command === '-' && percentage >= min) percentage -= step\n\n mainStore.setCanvasPercentage(percentage)\n }\n\n /**\n * 设置画布缩放比例\n * 但不是直接设置该值,而是通过设置画布可视区域百分比来动态计算\n * @param value 目标画布缩放比例\n */\n const setCanvasScalePercentage = (value: number) => {\n const percentage = Math.round(value / canvasScale.value * canvasPercentage.value) / 100\n mainStore.setCanvasPercentage(percentage)\n }\n\n /**\n * 重置画布尺寸和位置\n */\n const resetCanvas = () => {\n mainStore.setCanvasPercentage(90)\n if (canvasDragged) mainStore.setCanvasDragged(false)\n }\n\n return {\n canvasScalePercentage,\n setCanvasScalePercentage,\n scaleCanvas,\n resetCanvas,\n }\n}","import { onMounted, onUnmounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport { ElementOrderCommands } from '@/types/edit'\nimport { KEYS } from '@/configs/hotkey'\n\nimport useSlideHandler from './useSlideHandler'\nimport useLockElement from './useLockElement'\nimport useDeleteElement from './useDeleteElement'\nimport useCombineElement from './useCombineElement'\nimport useCopyAndPasteElement from './useCopyAndPasteElement'\nimport useSelectAllElement from './useSelectAllElement'\nimport useMoveElement from './useMoveElement'\nimport useOrderElement from './useOrderElement'\nimport useHistorySnapshot from './useHistorySnapshot'\nimport useScreening from './useScreening'\nimport useScaleCanvas from './useScaleCanvas'\n\nexport default () => {\n const mainStore = useMainStore()\n const keyboardStore = useKeyboardStore()\n const {\n activeElementIdList,\n disableHotkeys,\n handleElement,\n handleElementId,\n editorAreaFocus,\n thumbnailsFocus,\n showSearchPanel,\n } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(useSlidesStore())\n const { ctrlKeyState, shiftKeyState, spaceKeyState } = storeToRefs(keyboardStore)\n\n const {\n updateSlideIndex,\n copySlide,\n createSlide,\n deleteSlide,\n cutSlide,\n copyAndPasteSlide,\n selectAllSlide,\n } = useSlideHandler()\n\n const { combineElements, uncombineElements } = useCombineElement()\n const { deleteElement } = useDeleteElement()\n const { lockElement } = useLockElement()\n const { copyElement, cutElement, quickCopyElement } = useCopyAndPasteElement()\n const { selectAllElement } = useSelectAllElement()\n const { moveElement } = useMoveElement()\n const { orderElement } = useOrderElement()\n const { redo, undo } = useHistorySnapshot()\n const { enterScreening, enterScreeningFromStart } = useScreening()\n const { scaleCanvas, resetCanvas } = useScaleCanvas()\n\n const copy = () => {\n if (activeElementIdList.value.length) copyElement()\n else if (thumbnailsFocus.value) copySlide()\n }\n\n const cut = () => {\n if (activeElementIdList.value.length) cutElement()\n else if (thumbnailsFocus.value) cutSlide()\n }\n\n const quickCopy = () => {\n if (activeElementIdList.value.length) quickCopyElement()\n else if (thumbnailsFocus.value) copyAndPasteSlide()\n }\n\n const selectAll = () => {\n if (editorAreaFocus.value) selectAllElement()\n if (thumbnailsFocus.value) selectAllSlide()\n }\n\n const lock = () => {\n if (!editorAreaFocus.value) return\n lockElement()\n }\n const combine = () => {\n if (!editorAreaFocus.value) return\n combineElements()\n }\n\n const uncombine = () => {\n if (!editorAreaFocus.value) return\n uncombineElements()\n }\n\n const remove = () => {\n if (activeElementIdList.value.length) deleteElement()\n else if (thumbnailsFocus.value) deleteSlide()\n }\n\n const move = (key: string) => {\n if (activeElementIdList.value.length) moveElement(key)\n else if (key === KEYS.UP || key === KEYS.DOWN) updateSlideIndex(key)\n }\n\n const moveSlide = (key: string) => {\n if (key === KEYS.PAGEUP) updateSlideIndex(KEYS.UP)\n else if (key === KEYS.PAGEDOWN) updateSlideIndex(KEYS.DOWN)\n }\n\n const order = (command: ElementOrderCommands) => {\n if (!handleElement.value) return\n orderElement(handleElement.value, command)\n }\n\n const create = () => {\n if (!thumbnailsFocus.value) return\n createSlide()\n }\n\n const tabActiveElement = () => {\n if (!currentSlide.value.elements.length) return\n if (!handleElementId.value) {\n const firstElement = currentSlide.value.elements[0]\n mainStore.setActiveElementIdList([firstElement.id])\n return\n }\n const currentIndex = currentSlide.value.elements.findIndex(el => el.id === handleElementId.value)\n const nextIndex = currentIndex >= currentSlide.value.elements.length - 1 ? 0 : currentIndex + 1\n const nextElementId = currentSlide.value.elements[nextIndex].id\n\n mainStore.setActiveElementIdList([nextElementId])\n }\n\n const keydownListener = (e: KeyboardEvent) => {\n const { ctrlKey, shiftKey, altKey, metaKey } = e\n const ctrlOrMetaKeyActive = ctrlKey || metaKey\n \n const key = e.key.toUpperCase()\n\n if (ctrlOrMetaKeyActive && !ctrlKeyState.value) keyboardStore.setCtrlKeyState(true)\n if (shiftKey && !shiftKeyState.value) keyboardStore.setShiftKeyState(true)\n if (!disableHotkeys.value && key === KEYS.SPACE) keyboardStore.setSpaceKeyState(true)\n\n \n if (ctrlOrMetaKeyActive && key === KEYS.P) {\n e.preventDefault()\n mainStore.setDialogForExport('pdf')\n return\n }\n if (shiftKey && key === KEYS.F5) {\n e.preventDefault()\n enterScreening()\n keyboardStore.setShiftKeyState(false)\n return\n }\n if (key === KEYS.F5) {\n e.preventDefault()\n enterScreeningFromStart()\n return\n }\n if (ctrlKey && key === KEYS.F) {\n e.preventDefault()\n mainStore.setSearchPanelState(!showSearchPanel.value)\n return\n }\n \n if (!editorAreaFocus.value && !thumbnailsFocus.value) return \n\n if (ctrlOrMetaKeyActive && key === KEYS.C) {\n if (disableHotkeys.value) return\n e.preventDefault()\n copy()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.X) {\n if (disableHotkeys.value) return\n e.preventDefault()\n cut()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.D) {\n if (disableHotkeys.value) return\n e.preventDefault()\n quickCopy()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.Z) {\n if (disableHotkeys.value) return\n e.preventDefault()\n undo()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.Y) {\n if (disableHotkeys.value) return\n e.preventDefault()\n redo()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.A) {\n if (disableHotkeys.value) return\n e.preventDefault()\n selectAll()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.L) {\n if (disableHotkeys.value) return\n e.preventDefault()\n lock()\n }\n if (!shiftKey && ctrlOrMetaKeyActive && key === KEYS.G) {\n if (disableHotkeys.value) return\n e.preventDefault()\n combine()\n }\n if (shiftKey && ctrlOrMetaKeyActive && key === KEYS.G) {\n if (disableHotkeys.value) return\n e.preventDefault()\n uncombine()\n }\n if (altKey && key === KEYS.F) {\n if (disableHotkeys.value) return\n e.preventDefault()\n order(ElementOrderCommands.TOP)\n }\n if (altKey && key === KEYS.B) {\n if (disableHotkeys.value) return\n e.preventDefault()\n order(ElementOrderCommands.BOTTOM)\n }\n if (key === KEYS.DELETE || key === KEYS.BACKSPACE) {\n if (disableHotkeys.value) return\n e.preventDefault()\n remove()\n }\n if (key === KEYS.UP) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.UP)\n }\n if (key === KEYS.DOWN) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.DOWN)\n }\n if (key === KEYS.LEFT) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.LEFT)\n }\n if (key === KEYS.RIGHT) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.RIGHT)\n }\n if (key === KEYS.PAGEUP) {\n if (disableHotkeys.value) return\n e.preventDefault()\n moveSlide(KEYS.PAGEUP)\n }\n if (key === KEYS.PAGEDOWN) {\n if (disableHotkeys.value) return\n e.preventDefault()\n moveSlide(KEYS.PAGEDOWN)\n }\n if (key === KEYS.ENTER) {\n if (disableHotkeys.value) return\n e.preventDefault()\n create()\n }\n if (key === KEYS.MINUS) {\n if (disableHotkeys.value) return\n e.preventDefault()\n scaleCanvas('-')\n }\n if (key === KEYS.EQUAL) {\n if (disableHotkeys.value) return\n e.preventDefault()\n scaleCanvas('+')\n }\n if (key === KEYS.DIGIT_0) {\n if (disableHotkeys.value) return\n e.preventDefault()\n resetCanvas()\n }\n if (key === KEYS.TAB) {\n if (disableHotkeys.value) return\n e.preventDefault()\n tabActiveElement()\n }\n }\n \n const keyupListener = () => {\n if (ctrlKeyState.value) keyboardStore.setCtrlKeyState(false)\n if (shiftKeyState.value) keyboardStore.setShiftKeyState(false)\n if (spaceKeyState.value) keyboardStore.setSpaceKeyState(false)\n }\n\n onMounted(() => {\n document.addEventListener('keydown', keydownListener)\n document.addEventListener('keyup', keyupListener)\n window.addEventListener('blur', keyupListener)\n })\n onUnmounted(() => {\n document.removeEventListener('keydown', keydownListener)\n document.removeEventListener('keyup', keyupListener)\n window.removeEventListener('blur', keyupListener)\n })\n}","import { onMounted, onUnmounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { getImageDataURL } from '@/utils/image'\nimport usePasteTextClipboardData from './usePasteTextClipboardData'\nimport useCreateElement from './useCreateElement'\n\nexport default () => {\n const { editorAreaFocus, thumbnailsFocus, disableHotkeys } = storeToRefs(useMainStore())\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { createImageElement } = useCreateElement()\n\n // 粘贴图片到幻灯片元素\n const pasteImageFile = (imageFile: File) => {\n getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))\n }\n\n /**\n * 粘贴事件监听\n * @param e ClipboardEvent\n */\n const pasteListener = (e: ClipboardEvent) => {\n if (!editorAreaFocus.value && !thumbnailsFocus.value) return\n if (disableHotkeys.value) return\n\n if (!e.clipboardData) return\n\n const clipboardDataItems = e.clipboardData.items\n const clipboardDataFirstItem = clipboardDataItems[0]\n\n if (!clipboardDataFirstItem) return\n\n // 如果剪贴板内有图片,优先尝试读取图片\n for (const item of clipboardDataItems) {\n if (item.kind === 'file' && item.type.indexOf('image') !== -1) {\n const imageFile = item.getAsFile()\n if (imageFile) pasteImageFile(imageFile)\n return\n }\n }\n \n // 如果剪贴板内没有图片,但有文字内容,尝试解析文字内容\n if (clipboardDataFirstItem.kind === 'string' && clipboardDataFirstItem.type === 'text/plain') {\n clipboardDataFirstItem.getAsString(text => pasteTextClipboardData(text))\n }\n }\n\n onMounted(() => {\n document.addEventListener('paste', pasteListener)\n })\n onUnmounted(() => {\n document.removeEventListener('paste', pasteListener)\n })\n}","import { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { parse, type Shape, type Element } from 'pptxtojson'\nimport { nanoid } from 'nanoid'\nimport type { Slide, TableCellStyle, TableCell, ChartType, ChartOptions, SlideBackground, PPTShapeElement, PPTLineElement } from '@/types/slides'\nimport { useSlidesStore } from '@/store'\nimport { decrypt } from '@/utils/crypto'\nimport { type ShapePoolItem, SHAPE_LIST, SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\nimport message from '@/utils/message'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { theme } = storeToRefs(useSlidesStore())\n\n const { addSlidesFromData, isEmptySlide } = useAddSlidesOrElements()\n\n const exporting = ref(false)\n\n // 导入pptist文件\n const importSpecificFile = (files: FileList, cover = false) => {\n const file = files[0]\n\n const reader = new FileReader()\n reader.addEventListener('load', () => {\n try {\n const slides = JSON.parse(decrypt(reader.result as string))\n if (cover) slidesStore.setSlides(slides)\n else if (isEmptySlide.value) slidesStore.setSlides(slides)\n else addSlidesFromData(slides)\n }\n catch {\n message.error('无法正确读取 / 解析该文件')\n }\n })\n reader.readAsText(file)\n }\n\n const parseLineElement = (el: Shape): PPTLineElement => {\n let start: [number, number] = [0, 0]\n let end: [number, number] = [0, 0]\n\n if (!el.isFlipV && !el.isFlipH) { // 右下\n start = [0, 0]\n end = [el.width, el.height]\n }\n else if (el.isFlipV && el.isFlipH) { // 左上\n start = [el.width, el.height]\n end = [0, 0]\n }\n else if (el.isFlipV && !el.isFlipH) { // 右上\n start = [0, el.height]\n end = [el.width, 0]\n }\n else { // 左下\n start = [el.width, 0]\n end = [0, el.height]\n }\n return {\n type: 'line',\n id: nanoid(10),\n width: el.borderWidth || 1,\n left: el.left,\n top: el.top,\n start,\n end,\n style: el.borderType,\n color: el.borderColor,\n points: ['', el.shapType === 'straightConnector1' ? 'arrow' : '']\n }\n }\n\n // 导入PPTX文件\n const importPPTXFile = (files: FileList) => {\n const file = files[0]\n if (!file) return\n\n exporting.value = true\n\n const shapeList: ShapePoolItem[] = []\n for (const item of SHAPE_LIST) {\n shapeList.push(...item.children)\n }\n \n const reader = new FileReader()\n reader.onload = async e => {\n const json = await parse(e.target!.result as ArrayBuffer)\n\n const width = json.size.width\n const scale = VIEWPORT_SIZE / width\n\n const slides: Slide[] = []\n for (const item of json.slides) {\n const { type, value } = item.fill\n let background: SlideBackground\n if (type === 'image') {\n background = {\n type: 'image',\n image: value.picBase64,\n imageSize: 'cover',\n }\n }\n else if (type === 'gradient') {\n background = {\n type: 'gradient',\n gradientType: 'linear',\n gradientColor: [value.colors[0], value.colors[1]],\n gradientRotate: value.rot,\n }\n }\n else {\n background = {\n type: 'solid',\n color: value,\n }\n }\n\n const slide: Slide = {\n id: nanoid(10),\n elements: [],\n background,\n }\n\n const parseElements = (elements: Element[]) => {\n for (const el of elements) {\n el.width = el.width * scale\n el.height = el.height * scale\n el.left = el.left * scale\n el.top = el.top * scale\n \n if (el.type === 'text') {\n slide.elements.push({\n type: 'text',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: el.rotate,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n content: el.content,\n lineHeight: 1,\n outline: {\n color: el.borderColor,\n width: el.borderWidth,\n style: el.borderType,\n },\n fill: el.fillColor,\n })\n }\n else if (el.type === 'image') {\n slide.elements.push({\n type: 'image',\n id: nanoid(10),\n src: el.src,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n fixedRatio: true,\n rotate: el.rotate,\n })\n }\n else if (el.type === 'shape') {\n if (el.shapType === 'line' || el.shapType === 'straightConnector1') {\n const lineElement = parseLineElement(el)\n slide.elements.push(lineElement)\n }\n else {\n const shape = shapeList.find(item => item.pptxShapeType === el.shapType)\n \n const element: PPTShapeElement = {\n type: 'shape',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: el.fillColor || 'none',\n fixedRatio: false,\n rotate: el.rotate,\n outline: {\n color: el.borderColor,\n width: el.borderWidth,\n style: el.borderType,\n },\n text: {\n content: el.content,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n align: 'middle',\n }\n }\n \n if (shape) {\n element.path = shape.path\n element.viewBox = shape.viewBox\n \n if (shape.pathFormula) {\n element.pathFormula = shape.pathFormula\n element.viewBox = [el.width, el.height]\n \n const pathFormula = SHAPE_PATH_FORMULAS[shape.pathFormula]\n if ('editable' in pathFormula) {\n element.path = pathFormula.formula(el.width, el.height, pathFormula.defaultValue)\n element.keypoint = pathFormula.defaultValue\n }\n else element.path = pathFormula.formula(el.width, el.height)\n }\n }\n \n slide.elements.push(element)\n }\n }\n else if (el.type === 'table') {\n const row = el.data.length\n const col = el.data[0].length\n \n const style: TableCellStyle = {\n fontname: theme.value.fontName,\n color: theme.value.fontColor,\n }\n const data: TableCell[][] = []\n for (let i = 0; i < row; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < col; j++) {\n const cellData = el.data[i][j]\n rowCells.push({\n id: nanoid(10),\n colspan: 1,\n rowspan: cellData.rowSpan || 1,\n text: cellData.text,\n style,\n })\n }\n data.push(rowCells)\n }\n \n const colWidths: number[] = new Array(col).fill(1 / col)\n \n slide.elements.push({\n type: 'table',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n colWidths,\n rotate: 0,\n data,\n outline: {\n width: 2,\n style: 'solid',\n color: '#eeece1',\n },\n theme: {\n color: theme.value.themeColor,\n rowHeader: true,\n rowFooter: false,\n colHeader: false,\n colFooter: false,\n },\n cellMinHeight: 36,\n })\n }\n else if (el.type === 'chart') {\n let labels: string[]\n let legends: string[]\n let series: number[][]\n \n if (el.chartType === 'scatterChart') {\n labels = el.data[0].map(item => item + '')\n legends = ['系列1']\n series = [el.data[1]]\n }\n else {\n labels = Object.values(el.data[0].xlabels)\n legends = el.data.map(item => item.key)\n series = el.data.map(item => item.values.map(v => v.y))\n }\n \n let options: ChartOptions = {}\n \n let chartType: ChartType = 'bar'\n if (el.chartType === 'barChart') {\n chartType = 'bar'\n }\n if (el.chartType === 'stackedBarChart') {\n chartType = 'bar'\n options = { stackBars: true }\n }\n else if (el.chartType === 'lineChart') {\n chartType = 'line'\n }\n else if (el.chartType === 'areaChart') {\n chartType = 'line'\n options = { showArea: true }\n }\n else if (el.chartType === 'scatterChart') {\n chartType = 'line'\n options = { showLine: false }\n }\n else if (el.chartType === 'pieChart' || el.chartType === 'pie3DChart') {\n chartType = 'pie'\n }\n \n slide.elements.push({\n type: 'chart',\n id: nanoid(10),\n chartType: chartType,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: 0,\n themeColor: [theme.value.themeColor],\n gridColor: theme.value.fontColor,\n data: {\n labels,\n legends,\n series,\n },\n options,\n })\n }\n else if (el.type === 'group') {\n const elements = el.elements.map(_el => ({\n ..._el,\n left: _el.left + el.left,\n top: _el.top + el.top,\n }))\n parseElements(elements)\n }\n }\n }\n parseElements(item.elements)\n slides.push(slide)\n }\n if (isEmptySlide.value) slidesStore.setSlides(slides)\n else addSlidesFromData(slides)\n exporting.value = false\n }\n reader.readAsArrayBuffer(file)\n }\n\n return {\n importSpecificFile,\n importPPTXFile,\n exporting,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a0322054\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"hotkey-doc\" }\nconst _hoisted_2 = { class: \"title\" }\nconst _hoisted_3 = { class: \"label\" }\nconst _hoisted_4 = { class: \"value\" }\n\nimport { HOTKEY_DOC } from '@/configs/hotkey' \n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'HotkeyDoc',\n setup(__props) {\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(HOTKEY_DOC), (item) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (hotkey) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"hotkey-item\",\n key: hotkey.label\n }, [\n _createElementVNode(\"div\", _hoisted_3, _toDisplayString(hotkey.label), 1),\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(hotkey.value), 1)\n ]))\n }), 128))\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./HotkeyDoc.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./HotkeyDoc.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./HotkeyDoc.vue?vue&type=style&index=0&id=a0322054&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a0322054\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-64bedb34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"accept\"]\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FileInput',\n props: {\n accept: { default: 'image/*' }\n },\n emits: [\"change\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nconst inputRef = ref()\n\nconst handleClick = () => {\n if (!inputRef.value) return\n inputRef.value.value = ''\n inputRef.value.click()\n}\nconst handleChange = (e: Event) => {\n const files = (e.target as HTMLInputElement).files\n if (files) emit('change', files)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"file-input\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (handleClick()))\n }, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"input\", {\n class: \"input\",\n type: \"file\",\n name: \"upload\",\n ref_key: \"inputRef\",\n ref: inputRef,\n accept: _ctx.accept,\n onChange: _cache[0] || (_cache[0] = $event => handleChange($event))\n }, null, 40, _hoisted_1)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./FileInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FileInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FileInput.vue?vue&type=style&index=0&id=64bedb34&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-64bedb34\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a5c6b41c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"fullscreen-spin\"\n}\nconst _hoisted_2 = { class: \"spin\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"spinner\" }, null, -1))\nconst _hoisted_4 = { class: \"text\" }\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FullscreenSpin',\n props: {\n loading: { type: Boolean, default: false },\n tip: { default: '' }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(_ctx.tip), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./FullscreenSpin.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FullscreenSpin.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FullscreenSpin.vue?vue&type=style&index=0&id=a5c6b41c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a5c6b41c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, vShow as _vShow, normalizeClass as _normalizeClass, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, Teleport as _Teleport, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-749dadac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\n\nimport { computed, ref, type CSSProperties } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Drawer',\n props: {\n visible: { type: Boolean },\n width: { default: 320 },\n contentStyle: {},\n placement: { default: 'right' }\n },\n emits: [\"update:visible\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return {\n width: props.width + 'px',\n ...(props.contentStyle || {})\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconClose = _resolveComponent(\"IconClose\")!\n\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, {\n name: `drawer-slide-${_ctx.placement}`,\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (contentVisible.value = false)),\n onBeforeEnter: _cache[2] || (_cache[2] = ($event: any) => (contentVisible.value = true))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: _normalizeClass(['drawer', _ctx.placement]),\n style: _normalizeStyle({ width: props.width + 'px' })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"title\"),\n _createElementVNode(\"span\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('update:visible', false)))\n }, [\n _createVNode(_component_IconClose)\n ])\n ]),\n (contentVisible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"content\",\n style: _normalizeStyle(contentStyle.value)\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 6), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n }, 8, [\"name\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Drawer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Drawer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Drawer.vue?vue&type=style&index=0&id=749dadac&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-749dadac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, withKeys as _withKeys, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a97ba0dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"prefix\" }\nconst _hoisted_2 = [\"disabled\", \"value\", \"placeholder\"]\nconst _hoisted_3 = { class: \"suffix\" }\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Input',\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n placeholder: { default: '' }\n },\n emits: [\"update:value\", \"input\", \"change\", \"blur\", \"focus\", \"enter\"],\n setup(__props: any, { expose: __expose, emit }) {\n\n\n\n\n\nconst focused = ref(false)\n\nconst handleInput = (e: Event) => {\n emit('update:value', (e.target as HTMLInputElement).value)\n}\nconst handleBlur = (e: Event) => {\n focused.value = false\n emit('blur', e)\n}\nconst handleFocus = (e: Event) => {\n focused.value = true\n emit('focus', e)\n}\n\nconst inputRef = ref()\nconst focus = () => {\n if (inputRef.value) inputRef.value.focus()\n}\n\n__expose({\n focus,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"input\", {\n 'disabled': _ctx.disabled,\n 'focused': focused.value,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prefix\")\n ]),\n _createElementVNode(\"input\", {\n type: \"text\",\n ref_key: \"inputRef\",\n ref: inputRef,\n disabled: _ctx.disabled,\n value: _ctx.value,\n placeholder: _ctx.placeholder,\n onInput: _cache[0] || (_cache[0] = $event => handleInput($event)),\n onFocus: _cache[1] || (_cache[1] = $event => handleFocus($event)),\n onBlur: _cache[2] || (_cache[2] = $event => handleBlur($event)),\n onChange: _cache[3] || (_cache[3] = $event => emit('change', $event)),\n onKeydown: _cache[4] || (_cache[4] = _withKeys($event => emit('enter', $event), [\"enter\"]))\n }, null, 40, _hoisted_2),\n _createElementVNode(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"suffix\")\n ])\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./Input.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Input.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Input.vue?vue&type=style&index=0&id=a97ba0dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a97ba0dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { type CSSProperties, onMounted, ref, watch, computed } from 'vue'\nimport tippy, { type Instance, type Placement } from 'tippy.js'\n\nimport 'tippy.js/animations/scale.css'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Popover',\n props: {\n value: { type: Boolean, default: false },\n trigger: { default: 'click' },\n placement: { default: 'bottom' },\n appendTo: {},\n contentStyle: {},\n center: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst instance = ref()\nconst triggerRef = ref()\nconst contentRef = ref()\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return props.contentStyle || {}\n})\n\nwatch(() => props.value, () => {\n if (!instance.value) return\n if (props.value) instance.value.show()\n else instance.value.hide()\n})\n\nonMounted(() => {\n instance.value = tippy(triggerRef.value!, {\n content: contentRef.value!,\n allowHTML: true,\n trigger: props.trigger,\n placement: props.placement,\n interactive: true,\n appendTo: props.appendTo || document.body,\n maxWidth: 'none',\n offset: [0, 8],\n duration: 200,\n animation: 'scale',\n theme: 'popover',\n onShow() {\n contentVisible.value = true\n },\n onShown() {\n if (!props.value) emit('update:value', true)\n },\n onHidden() {\n if (props.value) emit('update:value', false)\n contentVisible.value = false\n },\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"popover\", { 'center': _ctx.center }]),\n ref_key: \"triggerRef\",\n ref: triggerRef\n }, [\n _createElementVNode(\"div\", {\n class: \"popover-content\",\n style: _normalizeStyle(contentStyle.value),\n ref_key: \"contentRef\",\n ref: contentRef\n }, [\n (contentVisible.value)\n ? _renderSlot(_ctx.$slots, \"content\", { key: 0 })\n : _createCommentVNode(\"\", true)\n ], 4),\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./Popover.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Popover.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Popover.vue?vue&type=style&index=0&id=70fabe9a&lang=scss&scoped=true\"\nimport \"./Popover.vue?vue&type=style&index=1&id=70fabe9a&lang=scss\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-70fabe9a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'PopoverMenuItem',\n props: {\n center: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"popover-menu-item\", { 'center': _ctx.center }]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('click')))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","import script from \"./PopoverMenuItem.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./PopoverMenuItem.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./PopoverMenuItem.vue?vue&type=style&index=0&id=2f137c4f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2f137c4f\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, resolveComponent as _resolveComponent, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2394d37c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"editor-header\" }\nconst _hoisted_2 = { class: \"left\" }\nconst _hoisted_3 = { class: \"menu-item\" }\nconst _hoisted_4 = { class: \"title\" }\nconst _hoisted_5 = [\"title\"]\nconst _hoisted_6 = { class: \"right\" }\nconst _hoisted_7 = { class: \"group-menu-item\" }\nconst _hoisted_8 = { class: \"arrow-btn\" }\nconst _hoisted_9 = {\n class: \"github-link\",\n href: \"https://github.com/pipipi-pikachu/PPTist\",\n target: \"_blank\"\n}\nconst _hoisted_10 = { class: \"menu-item\" }\n\nimport { nextTick, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport useScreening from '@/hooks/useScreening'\nimport useImport from '@/hooks/useImport'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport type { DialogForExportTypes } from '@/types/export'\n\nimport HotkeyDoc from './HotkeyDoc.vue'\nimport FileInput from '@/components/FileInput.vue'\nimport FullscreenSpin from '@/components/FullscreenSpin.vue'\nimport Drawer from '@/components/Drawer.vue'\nimport Input from '@/components/Input.vue'\nimport Popover from '@/components/Popover.vue'\nimport PopoverMenuItem from '@/components/PopoverMenuItem.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { title } = storeToRefs(slidesStore)\nconst { enterScreening, enterScreeningFromStart } = useScreening()\nconst { importSpecificFile, importPPTXFile, exporting } = useImport()\nconst { resetSlides } = useSlideHandler()\n\nconst mainMenuVisible = ref(false)\nconst hotkeyDrawerVisible = ref(false)\nconst editingTitle = ref(false)\nconst titleInputRef = ref()\nconst titleValue = ref('')\n\nconst startEditTitle = () => {\n titleValue.value = title.value\n editingTitle.value = true\n nextTick(() => titleInputRef.value?.focus())\n}\n\nconst handleUpdateTitle = () => {\n slidesStore.setTitle(titleValue.value)\n editingTitle.value = false\n}\n\nconst goLink = (url: string) => {\n window.open(url)\n mainMenuVisible.value = false\n}\n\nconst setDialogForExport = (type: DialogForExportTypes) => {\n mainStore.setDialogForExport(type)\n mainMenuVisible.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconHamburgerButton = _resolveComponent(\"IconHamburgerButton\")!\n const _component_IconPpt = _resolveComponent(\"IconPpt\")!\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n const _component_IconDownload = _resolveComponent(\"IconDownload\")!\n const _component_IconGithub = _resolveComponent(\"IconGithub\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Popover, {\n trigger: \"click\",\n placement: \"bottom-start\",\n value: mainMenuVisible.value,\n \"onUpdate:value\": _cache[7] || (_cache[7] = ($event: any) => ((mainMenuVisible).value = $event))\n }, {\n content: _withCtx(() => [\n _createVNode(FileInput, {\n accept: \".pptist\",\n onChange: _cache[0] || (_cache[0] = files => {\n _unref(importSpecificFile)(files)\n mainMenuVisible.value = false\n })\n }, {\n default: _withCtx(() => [\n _createVNode(PopoverMenuItem, null, {\n default: _withCtx(() => [\n _createTextVNode(\"导入 pptist 文件\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(FileInput, {\n accept: \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n onChange: _cache[1] || (_cache[1] = files => {\n _unref(importPPTXFile)(files)\n mainMenuVisible.value = false\n })\n }, {\n default: _withCtx(() => [\n _createVNode(PopoverMenuItem, null, {\n default: _withCtx(() => [\n _createTextVNode(\"导入 pptx 文件(测试版)\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (setDialogForExport('pptx')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"导出文件\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[3] || (_cache[3] = ($event: any) => {_unref(resetSlides)(); mainMenuVisible.value = false})\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"重置幻灯片\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (goLink('https://github.com/pipipi-pikachu/PPTist/issues')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"意见反馈\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (goLink('https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"常见问题\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[6] || (_cache[6] = ($event: any) => {mainMenuVisible.value = false; hotkeyDrawerVisible.value = true})\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"快捷键\")\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(_component_IconHamburgerButton, { class: \"icon\" })\n ])\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_4, [\n (editingTitle.value)\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"title-input\",\n ref_key: \"titleInputRef\",\n ref: titleInputRef,\n value: titleValue.value,\n \"onUpdate:value\": _cache[8] || (_cache[8] = ($event: any) => ((titleValue).value = $event)),\n onBlur: _cache[9] || (_cache[9] = ($event: any) => (handleUpdateTitle()))\n }, null, 8, [\"value\"]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"title-text\",\n onClick: _cache[10] || (_cache[10] = ($event: any) => (startEditTitle())),\n title: _unref(title)\n }, _toDisplayString(_unref(title)), 9, _hoisted_5))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"menu-item\",\n onClick: _cache[11] || (_cache[11] = ($event: any) => (_unref(enterScreening)()))\n }, [\n _createVNode(_component_IconPpt, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '幻灯片放映']\n ]),\n _createVNode(Popover, {\n trigger: \"click\",\n center: \"\"\n }, {\n content: _withCtx(() => [\n _createVNode(PopoverMenuItem, {\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_unref(enterScreeningFromStart)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"从头开始\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(enterScreening)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"从当前页开始\")\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(_component_IconDown, { class: \"arrow\" })\n ])\n ]),\n _: 1\n })\n ]),\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"menu-item\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (setDialogForExport('pptx')))\n }, [\n _createVNode(_component_IconDownload, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '导出']\n ]),\n _createElementVNode(\"a\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(_component_IconGithub, { class: \"icon\" })\n ])\n ])\n ]),\n _createVNode(Drawer, {\n width: 320,\n visible: hotkeyDrawerVisible.value,\n \"onUpdate:visible\": _cache[15] || (_cache[15] = ($event: any) => ((hotkeyDrawerVisible).value = $event)),\n placement: \"right\"\n }, {\n default: _withCtx(() => [\n _createVNode(HotkeyDoc)\n ]),\n _: 1\n }, 8, [\"visible\"]),\n _createVNode(FullscreenSpin, {\n loading: _unref(exporting),\n tip: \"正在导入...\"\n }, null, 8, [\"loading\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=2394d37c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2394d37c\"]])\n\nexport default __exports__","import type { InjectionKey, Ref } from 'vue'\n\nexport type SlideScale = Ref\nexport type SlideId = Ref\nexport type RadioGroupValue = {\n value: Ref\n updateValue: (value: string) => void\n}\n\nexport const injectKeySlideScale: InjectionKey = Symbol()\nexport const injectKeySlideId: InjectionKey = Symbol()\nexport const injectKeyRadioGroupValue: InjectionKey = Symbol()","// 清除文字选区\nexport const removeAllRanges = () => {\n const selection = window.getSelection()\n selection && selection.removeAllRanges()\n}","import { ref, computed, onMounted, onUnmounted, watch, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nexport default (canvasRef: Ref) => {\n const viewportLeft = ref(0)\n const viewportTop = ref(0)\n\n const mainStore = useMainStore()\n const { canvasPercentage, canvasDragged } = storeToRefs(mainStore)\n const { viewportRatio } = storeToRefs(useSlidesStore())\n\n // 初始化画布可视区域的位置\n const initViewportPosition = () => {\n if (!canvasRef.value) return\n const canvasWidth = canvasRef.value.clientWidth\n const canvasHeight = canvasRef.value.clientHeight\n\n if (canvasHeight / canvasWidth > viewportRatio.value) {\n const viewportActualWidth = canvasWidth * (canvasPercentage.value / 100)\n mainStore.setCanvasScale(viewportActualWidth / VIEWPORT_SIZE)\n viewportLeft.value = (canvasWidth - viewportActualWidth) / 2\n viewportTop.value = (canvasHeight - viewportActualWidth * viewportRatio.value) / 2\n }\n else {\n const viewportActualHeight = canvasHeight * (canvasPercentage.value / 100)\n mainStore.setCanvasScale(viewportActualHeight / (VIEWPORT_SIZE * viewportRatio.value))\n viewportLeft.value = (canvasWidth - viewportActualHeight / viewportRatio.value) / 2\n viewportTop.value = (canvasHeight - viewportActualHeight) / 2\n }\n }\n\n // 更新画布可视区域的位置\n const setViewportPosition = (newValue: number, oldValue: number) => {\n if (!canvasRef.value) return\n const canvasWidth = canvasRef.value.clientWidth\n const canvasHeight = canvasRef.value.clientHeight\n\n const newViewportActualWidth = canvasWidth * (newValue / 100)\n const oldViewportActualWidth = canvasWidth * (oldValue / 100)\n const newViewportActualHeight = canvasHeight * (newValue / 100)\n const oldViewportActualHeight = canvasHeight * (oldValue / 100)\n\n if (canvasHeight / canvasWidth > viewportRatio.value) {\n mainStore.setCanvasScale(newViewportActualWidth / VIEWPORT_SIZE)\n }\n else {\n mainStore.setCanvasScale(newViewportActualHeight / (VIEWPORT_SIZE * viewportRatio.value))\n }\n viewportLeft.value = viewportLeft.value - (newViewportActualWidth - oldViewportActualWidth) / 2\n viewportTop.value = viewportTop.value - (newViewportActualHeight - oldViewportActualHeight) / 2\n }\n\n // 可视区域缩放或比例变化时,重置/更新可视区域的位置\n watch(canvasPercentage, setViewportPosition)\n watch(viewportRatio, initViewportPosition)\n\n // 画布拖拽状态改变(复原)时,重置可视区域的位置\n watch(canvasDragged, () => {\n if (!canvasDragged.value) initViewportPosition()\n })\n\n // 画布可视区域位置和大小的样式\n const viewportStyles = computed(() => ({\n width: VIEWPORT_SIZE,\n height: VIEWPORT_SIZE * viewportRatio.value,\n left: viewportLeft.value,\n top: viewportTop.value,\n }))\n\n // 监听画布尺寸发生变化时,重置可视区域的位置\n const resizeObserver = new ResizeObserver(initViewportPosition)\n\n onMounted(() => {\n if (canvasRef.value) resizeObserver.observe(canvasRef.value)\n })\n onUnmounted(() => {\n if (canvasRef.value) resizeObserver.unobserve(canvasRef.value)\n })\n\n // 拖拽画布\n const dragViewport = (e: MouseEvent) => {\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originLeft = viewportLeft.value\n const originTop = viewportTop.value\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n viewportLeft.value = originLeft + (currentPageX - startPageX)\n viewportTop.value = originTop + (currentPageY - startPageY)\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n mainStore.setCanvasDragged(true)\n }\n }\n\n return {\n viewportStyles,\n dragViewport,\n }\n}","import { type Ref, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { getElementRange } from '@/utils/element'\n\nexport default (elementList: Ref, viewportRef: Ref) => {\n const mainStore = useMainStore()\n const { canvasScale, hiddenElementIdList } = storeToRefs(mainStore)\n\n const mouseSelectionVisible = ref(false)\n const mouseSelectionQuadrant = ref(1)\n const mouseSelection = ref({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n })\n\n // 更新鼠标框选范围\n const updateMouseSelection = (e: MouseEvent) => {\n if (!viewportRef.value) return\n\n let isMouseDown = true\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const minSelectionRange = 5\n \n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const left = (startPageX - viewportRect.x) / canvasScale.value\n const top = (startPageY - viewportRect.y) / canvasScale.value\n\n // 确定框选的起始位置和其他默认值初始化\n mouseSelection.value = {\n top: top,\n left: left,\n width: 0,\n height: 0,\n }\n mouseSelectionVisible.value = false\n mouseSelectionQuadrant.value = 4\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const offsetWidth = (currentPageX - startPageX) / canvasScale.value\n const offsetHeight = (currentPageY - startPageY) / canvasScale.value\n\n const width = Math.abs(offsetWidth)\n const height = Math.abs(offsetHeight)\n\n if ( width < minSelectionRange || height < minSelectionRange ) return\n \n // 计算鼠标框选(移动)的方向\n // 按四个象限的位置区分,如右下角为第四象限\n let quadrant = 0\n if ( offsetWidth > 0 && offsetHeight > 0 ) quadrant = 4\n else if ( offsetWidth < 0 && offsetHeight < 0 ) quadrant = 2\n else if ( offsetWidth > 0 && offsetHeight < 0 ) quadrant = 1\n else if ( offsetWidth < 0 && offsetHeight > 0 ) quadrant = 3\n\n // 更新框选范围\n mouseSelection.value = {\n ...mouseSelection.value,\n width: width,\n height: height,\n }\n mouseSelectionVisible.value = true\n mouseSelectionQuadrant.value = quadrant\n }\n\n document.onmouseup = () => {\n document.onmousemove = null\n document.onmouseup = null\n isMouseDown = false\n\n // 计算画布中的元素是否处在鼠标选择范围中,处在范围中的元素设置为被选中状态\n let inRangeElementList: PPTElement[] = []\n for (let i = 0; i < elementList.value.length; i++) {\n const element = elementList.value[i]\n const mouseSelectionLeft = mouseSelection.value.left\n const mouseSelectionTop = mouseSelection.value.top\n const mouseSelectionWidth = mouseSelection.value.width\n const mouseSelectionHeight = mouseSelection.value.height\n\n const { minX, maxX, minY, maxY } = getElementRange(element)\n\n // 计算元素是否处在框选范围内时,四个框选方向的计算方式有差异\n let isInclude = false\n if (mouseSelectionQuadrant.value === 4) {\n isInclude = minX > mouseSelectionLeft && \n maxX < mouseSelectionLeft + mouseSelectionWidth && \n minY > mouseSelectionTop && \n maxY < mouseSelectionTop + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 2) {\n isInclude = minX > (mouseSelectionLeft - mouseSelectionWidth) && \n maxX < (mouseSelectionLeft - mouseSelectionWidth) + mouseSelectionWidth && \n minY > (mouseSelectionTop - mouseSelectionHeight) && \n maxY < (mouseSelectionTop - mouseSelectionHeight) + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 1) {\n isInclude = minX > mouseSelectionLeft && \n maxX < mouseSelectionLeft + mouseSelectionWidth && \n minY > (mouseSelectionTop - mouseSelectionHeight) && \n maxY < (mouseSelectionTop - mouseSelectionHeight) + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 3) {\n isInclude = minX > (mouseSelectionLeft - mouseSelectionWidth) && \n maxX < (mouseSelectionLeft - mouseSelectionWidth) + mouseSelectionWidth && \n minY > mouseSelectionTop && \n maxY < mouseSelectionTop + mouseSelectionHeight\n }\n\n // 被锁定或被隐藏的元素即使在范围内,也不需要设置为选中状态\n if (isInclude && !element.lock && !hiddenElementIdList.value.includes(element.id)) inRangeElementList.push(element)\n }\n\n // 如果范围内有组合元素的成员,需要该组全部成员都处在范围内,才会被设置为选中状态\n inRangeElementList = inRangeElementList.filter(inRangeElement => {\n if (inRangeElement.groupId) {\n const inRangeElementIdList = inRangeElementList.map(inRangeElement => inRangeElement.id)\n const groupElementList = elementList.value.filter(element => element.groupId === inRangeElement.groupId)\n return groupElementList.every(groupElement => inRangeElementIdList.includes(groupElement.id))\n }\n return true\n })\n const inRangeElementIdList = inRangeElementList.map(inRangeElement => inRangeElement.id)\n mainStore.setActiveElementIdList(inRangeElementIdList)\n\n mouseSelectionVisible.value = false\n }\n }\n\n return {\n mouseSelection,\n mouseSelectionVisible,\n mouseSelectionQuadrant,\n updateMouseSelection,\n }\n}","import { onMounted, onUnmounted, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { getImageDataURL } from '@/utils/image'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nexport default (elementRef: Ref) => {\n const { disableHotkeys } = storeToRefs(useMainStore())\n\n const { createImageElement, createTextElement } = useCreateElement()\n\n // 拖拽元素到画布中\n const handleDrop = (e: DragEvent) => {\n if (!e.dataTransfer || e.dataTransfer.items.length === 0) return\n const dataTransferItem = e.dataTransfer.items[0]\n\n // 检查事件对象中是否存在图片,存在则插入图片,否则继续检查是否存在文字,存在则插入文字\n if (dataTransferItem.kind === 'file' && dataTransferItem.type.indexOf('image') !== -1) {\n const imageFile = dataTransferItem.getAsFile()\n if (imageFile) {\n getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))\n }\n }\n else if (dataTransferItem.kind === 'string' && dataTransferItem.type === 'text/plain') {\n dataTransferItem.getAsString(text => {\n if (disableHotkeys.value) return\n const string = parseText2Paragraphs(text)\n createTextElement({\n left: 0,\n top: 0,\n width: 600,\n height: 50,\n }, { content: string })\n })\n }\n }\n\n onMounted(() => {\n elementRef.value && elementRef.value.addEventListener('drop', handleDrop)\n\n document.ondragleave = e => e.preventDefault()\n document.ondrop = e => e.preventDefault()\n document.ondragenter = e => e.preventDefault()\n document.ondragover = e => e.preventDefault()\n })\n onUnmounted(() => {\n elementRef.value && elementRef.value.removeEventListener('drop', handleDrop)\n\n document.ondragleave = null\n document.ondrop = null\n document.ondragenter = null\n document.ondragover = null\n })\n}","import type { Ref } from 'vue'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTLineElement, PPTVideoElement, PPTAudioElement, PPTChartElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\n/**\n * 计算给定坐标到原点连线的弧度\n * @param x 坐标x\n * @param y 坐标y\n */\nconst getAngleFromCoordinate = (x: number, y: number) => {\n const radian = Math.atan2(x, y)\n const angle = 180 / Math.PI * radian\n return angle\n}\n\nexport default (\n elementList: Ref,\n viewportRef: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 旋转元素\n const rotateElement = (e: MouseEvent | TouchEvent, element: Exclude) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n \n let isMouseDown = true\n let angle = 0\n const elOriginRotate = element.rotate || 0\n\n const elLeft = element.left\n const elTop = element.top\n const elWidth = element.width\n const elHeight = element.height\n\n // 元素中心点(旋转中心点)\n const centerX = elLeft + elWidth / 2\n const centerY = elTop + elHeight / 2\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n \n // 计算当前鼠标位置相对元素中心点连线的角度(弧度)\n const mouseX = (currentPageX - viewportRect.left) / canvasScale.value\n const mouseY = (currentPageY - viewportRect.top) / canvasScale.value\n const x = mouseX - centerX\n const y = centerY - mouseY\n\n angle = getAngleFromCoordinate(x, y)\n\n // 靠近45倍数的角度时有吸附效果\n const sorptionRange = 5\n if ( Math.abs(angle) <= sorptionRange ) angle = 0\n else if ( angle > 0 && Math.abs(angle - 45) <= sorptionRange ) angle -= (angle - 45)\n else if ( angle < 0 && Math.abs(angle + 45) <= sorptionRange ) angle -= (angle + 45)\n else if ( angle > 0 && Math.abs(angle - 90) <= sorptionRange ) angle -= (angle - 90)\n else if ( angle < 0 && Math.abs(angle + 90) <= sorptionRange ) angle -= (angle + 90)\n else if ( angle > 0 && Math.abs(angle - 135) <= sorptionRange ) angle -= (angle - 135)\n else if ( angle < 0 && Math.abs(angle + 135) <= sorptionRange ) angle -= (angle + 135)\n else if ( angle > 0 && Math.abs(angle - 180) <= sorptionRange ) angle -= (angle - 180)\n else if ( angle < 0 && Math.abs(angle + 180) <= sorptionRange ) angle -= (angle + 180)\n\n elementList.value = elementList.value.map(el => element.id === el.id ? { ...el, rotate: angle } : el)\n }\n\n const handleMouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n if (elOriginRotate === angle) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n rotateElement,\n }\n}","export const ELEMENT_TYPE_ZH: { [key: string]: string } = {\n text: '文本',\n image: '图片',\n shape: '形状',\n line: '线条',\n chart: '图表',\n table: '表格',\n video: '视频',\n audio: '音频',\n latex: '公式',\n}\n\nexport const MIN_SIZE: { [key: string]: number } = {\n text: 20,\n image: 20,\n shape: 15,\n chart: 200,\n table: 20,\n video: 250,\n audio: 20,\n latex: 20,\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { PPTElement, PPTImageElement, PPTLineElement, PPTShapeElement } from '@/types/slides'\nimport { OperateResizeHandlers, type AlignmentLineProps, type MultiSelectRange } from '@/types/edit'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { MIN_SIZE } from '@/configs/element'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport { type AlignLine, uniqAlignLines } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface RotateElementData {\n left: number\n top: number\n width: number\n height: number\n}\n\n/**\n * 计算旋转后的元素八个缩放点的位置\n * @param element 元素原始位置大小信息\n * @param angle 旋转角度\n */\nconst getRotateElementPoints = (element: RotateElementData, angle: number) => {\n const { left, top, width, height } = element\n\n const radius = Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ) / 2\n const auxiliaryAngle = Math.atan(height / width) * 180 / Math.PI\n\n const tlbraRadian = (180 - angle - auxiliaryAngle) * Math.PI / 180\n const trblaRadian = (auxiliaryAngle - angle) * Math.PI / 180\n const taRadian = (90 - angle) * Math.PI / 180\n const raRadian = angle * Math.PI / 180\n\n const halfWidth = width / 2\n const halfHeight = height / 2\n\n const middleLeft = left + halfWidth\n const middleTop = top + halfHeight\n\n const leftTopPoint = {\n left: middleLeft + radius * Math.cos(tlbraRadian),\n top: middleTop - radius * Math.sin(tlbraRadian),\n }\n const topPoint = {\n left: middleLeft + halfHeight * Math.cos(taRadian),\n top: middleTop - halfHeight * Math.sin(taRadian),\n }\n const rightTopPoint = {\n left: middleLeft + radius * Math.cos(trblaRadian),\n top: middleTop - radius * Math.sin(trblaRadian),\n }\n const rightPoint = {\n left: middleLeft + halfWidth * Math.cos(raRadian),\n top: middleTop + halfWidth * Math.sin(raRadian),\n }\n const rightBottomPoint = {\n left: middleLeft - radius * Math.cos(tlbraRadian),\n top: middleTop + radius * Math.sin(tlbraRadian),\n }\n const bottomPoint = {\n left: middleLeft - halfHeight * Math.sin(raRadian),\n top: middleTop + halfHeight * Math.cos(raRadian),\n }\n const leftBottomPoint = {\n left: middleLeft - radius * Math.cos(trblaRadian),\n top: middleTop + radius * Math.sin(trblaRadian),\n }\n const leftPoint = {\n left: middleLeft - halfWidth * Math.cos(raRadian),\n top: middleTop - halfWidth * Math.sin(raRadian),\n }\n\n return { leftTopPoint, topPoint, rightTopPoint, rightPoint, rightBottomPoint, bottomPoint, leftBottomPoint, leftPoint }\n}\n\n/**\n * 获取元素某缩放点相对的另一个点的位置,如:【上】对应【下】、【左上】对应【右下】\n * @param direction 当前操作的缩放点\n * @param points 旋转后的元素八个缩放点的位置\n */\nconst getOppositePoint = (direction: OperateResizeHandlers, points: ReturnType): { left: number; top: number } => {\n const oppositeMap = {\n [OperateResizeHandlers.RIGHT_BOTTOM]: points.leftTopPoint,\n [OperateResizeHandlers.LEFT_BOTTOM]: points.rightTopPoint,\n [OperateResizeHandlers.LEFT_TOP]: points.rightBottomPoint,\n [OperateResizeHandlers.RIGHT_TOP]: points.leftBottomPoint,\n [OperateResizeHandlers.TOP]: points.bottomPoint,\n [OperateResizeHandlers.BOTTOM]: points.topPoint,\n [OperateResizeHandlers.LEFT]: points.rightPoint,\n [OperateResizeHandlers.RIGHT]: points.leftPoint,\n }\n return oppositeMap[direction]\n}\n\nexport default (\n elementList: Ref,\n alignmentLines: Ref,\n canvasScale: Ref,\n) => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(mainStore)\n const { viewportRatio } = storeToRefs(slidesStore)\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 缩放元素\n const scaleElement = (e: MouseEvent | TouchEvent, element: Exclude, command: OperateResizeHandlers) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n let isMouseDown = true\n mainStore.setScalingState(true)\n\n const elOriginLeft = element.left\n const elOriginTop = element.top\n const elOriginWidth = element.width\n const elOriginHeight = element.height\n\n const originTableCellMinHeight = element.type === 'table' ? element.cellMinHeight : 0\n \n const elRotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n const rotateRadian = Math.PI * elRotate / 180\n\n const fixedRatio = ctrlOrShiftKeyActive.value || ('fixedRatio' in element && element.fixedRatio)\n const aspectRatio = elOriginWidth / elOriginHeight\n\n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n // 元素最小缩放限制\n const minSize = MIN_SIZE[element.type] || 20\n const getSizeWithinRange = (size: number) => size < minSize ? minSize : size\n\n let points: ReturnType\n let baseLeft = 0\n let baseTop = 0\n let horizontalLines: AlignLine[] = []\n let verticalLines: AlignLine[] = []\n\n // 旋转后的元素进行缩放时,引入基点的概念,以当前操作的缩放点相对的点为基点\n // 例如拖动右下角缩放时,左上角为基点,需要保持左上角不变然后修改其他的点的位置来达到所放的效果\n if ('rotate' in element && element.rotate) {\n const { left, top, width, height } = element\n points = getRotateElementPoints({ left, top, width, height }, elRotate)\n const oppositePoint = getOppositePoint(command, points)\n\n baseLeft = oppositePoint.left\n baseTop = oppositePoint.top\n }\n\n // 未旋转的元素具有缩放时的对齐吸附功能,在此处收集对齐对齐吸附线\n // 包括页面内除目标元素外的其他元素在画布中的各个可吸附对齐位置:上下左右四边\n // 其中线条和被旋转过的元素不参与吸附对齐\n else {\n const edgeWidth = VIEWPORT_SIZE\n const edgeHeight = VIEWPORT_SIZE * viewportRatio.value\n const isActiveGroupElement = element.id === activeGroupElementId.value\n \n for (const el of elementList.value) {\n if ('rotate' in el && el.rotate) continue\n if (el.type === 'line') continue\n if (isActiveGroupElement && el.id === element.id) continue\n if (!isActiveGroupElement && activeElementIdList.value.includes(el.id)) continue\n\n const left = el.left\n const top = el.top\n const width = el.width\n const height = el.height\n const right = left + width\n const bottom = top + height\n\n const topLine: AlignLine = { value: top, range: [left, right] }\n const bottomLine: AlignLine = { value: bottom, range: [left, right] }\n const leftLine: AlignLine = { value: left, range: [top, bottom] }\n const rightLine: AlignLine = { value: right, range: [top, bottom] }\n\n horizontalLines.push(topLine, bottomLine)\n verticalLines.push(leftLine, rightLine)\n }\n\n // 画布可视区域的四个边界、水平中心、垂直中心\n const edgeTopLine: AlignLine = { value: 0, range: [0, edgeWidth] }\n const edgeBottomLine: AlignLine = { value: edgeHeight, range: [0, edgeWidth] }\n const edgeHorizontalCenterLine: AlignLine = { value: edgeHeight / 2, range: [0, edgeWidth] }\n const edgeLeftLine: AlignLine = { value: 0, range: [0, edgeHeight] }\n const edgeRightLine: AlignLine = { value: edgeWidth, range: [0, edgeHeight] }\n const edgeVerticalCenterLine: AlignLine = { value: edgeWidth / 2, range: [0, edgeHeight] }\n\n horizontalLines.push(edgeTopLine, edgeBottomLine, edgeHorizontalCenterLine)\n verticalLines.push(edgeLeftLine, edgeRightLine, edgeVerticalCenterLine)\n \n horizontalLines = uniqAlignLines(horizontalLines)\n verticalLines = uniqAlignLines(verticalLines)\n }\n \n // 对齐吸附方法\n // 将收集到的对齐吸附线与计算的目标元素当前的位置大小相关数据做对比,差值小于设定的值时执行自动缩放校正\n // 水平和垂直两个方向需要分开计算\n const alignedAdsorption = (currentX: number | null, currentY: number | null) => {\n const sorptionRange = 5\n\n const _alignmentLines: AlignmentLineProps[] = []\n let isVerticalAdsorbed = false\n let isHorizontalAdsorbed = false\n const correctionVal = { offsetX: 0, offsetY: 0 }\n \n if (currentY || currentY === 0) {\n for (let i = 0; i < horizontalLines.length; i++) {\n const { value, range } = horizontalLines[i]\n const min = Math.min(...range, currentX || 0)\n const max = Math.max(...range, currentX || 0)\n \n if (Math.abs(currentY - value) < sorptionRange && !isHorizontalAdsorbed) {\n correctionVal.offsetY = currentY - value\n isHorizontalAdsorbed = true\n _alignmentLines.push({ type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100 })\n }\n }\n }\n if (currentX || currentX === 0) {\n for (let i = 0; i < verticalLines.length; i++) {\n const { value, range } = verticalLines[i]\n const min = Math.min(...range, (currentY || 0))\n const max = Math.max(...range, (currentY || 0))\n\n if (Math.abs(currentX - value) < sorptionRange && !isVerticalAdsorbed) {\n correctionVal.offsetX = currentX - value\n isVerticalAdsorbed = true\n _alignmentLines.push({ type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100 })\n }\n }\n }\n alignmentLines.value = _alignmentLines\n return correctionVal\n }\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n const x = currentPageX - startPageX\n const y = currentPageY - startPageY\n\n let width = elOriginWidth\n let height = elOriginHeight\n let left = elOriginLeft\n let top = elOriginTop\n \n // 元素被旋转的情况下,需要根据元素旋转的角度,重新计算需要缩放的距离(鼠标按下后移动的距离)\n if (elRotate) {\n const revisedX = (Math.cos(rotateRadian) * x + Math.sin(rotateRadian) * y) / canvasScale.value\n let revisedY = (Math.cos(rotateRadian) * y - Math.sin(rotateRadian) * x) / canvasScale.value\n\n // 锁定宽高比例(仅四个角可能触发,四条边不会触发)\n // 以水平方向上缩放的距离为基础,计算垂直方向上的缩放距离,保持二者具有相同的缩放比例\n if (fixedRatio) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) revisedY = revisedX / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) revisedY = -revisedX / aspectRatio\n }\n\n // 根据不同的操作点分别计算元素缩放后的大小和位置\n // 需要注意:\n // 此处计算的位置需要在后面重新进行校正,因为旋转后再缩放事实上会改变元素基点的位置(虽然视觉上基点保持不动,但这是【旋转】+【移动】共同作用的结果)\n // 但此处计算的大小不需要重新校正,因为前面已经重新计算需要缩放的距离,相当于大小已经经过了校正\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n height = getSizeWithinRange(elOriginHeight + revisedY)\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n height = getSizeWithinRange(elOriginHeight + revisedY)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n height = getSizeWithinRange(elOriginHeight - revisedY)\n left = elOriginLeft - (width - elOriginWidth)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n height = getSizeWithinRange(elOriginHeight - revisedY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.TOP) {\n height = getSizeWithinRange(elOriginHeight - revisedY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n height = getSizeWithinRange(elOriginHeight + revisedY)\n }\n else if (command === OperateResizeHandlers.LEFT) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n }\n\n // 获取当前元素的基点坐标,与初始状态时的基点坐标进行对比,并计算差值进行元素位置的校正\n const currentPoints = getRotateElementPoints({ width, height, left, top }, elRotate)\n const currentOppositePoint = getOppositePoint(command, currentPoints)\n const currentBaseLeft = currentOppositePoint.left\n const currentBaseTop = currentOppositePoint.top\n\n const offsetX = currentBaseLeft - baseLeft\n const offsetY = currentBaseTop - baseTop\n\n left = left - offsetX\n top = top - offsetY\n }\n\n // 元素未被旋转的情况下,正常计算新的位置大小即可,无需复杂的校正等工作\n // 额外需要处理对齐吸附相关的操作\n // 锁定宽高比例相关的操作同上,不再赘述\n else {\n let moveX = x / canvasScale.value\n let moveY = y / canvasScale.value\n\n if (fixedRatio) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) moveY = moveX / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) moveY = -moveX / aspectRatio\n }\n\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, elOriginTop + elOriginHeight + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = moveY * aspectRatio\n else moveY = moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth + moveX)\n height = getSizeWithinRange(elOriginHeight + moveY)\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + moveX, elOriginTop + elOriginHeight + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = -moveY * aspectRatio\n else moveY = -moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth - moveX)\n height = getSizeWithinRange(elOriginHeight + moveY)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + moveX, elOriginTop + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = moveY * aspectRatio\n else moveY = moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth - moveX)\n height = getSizeWithinRange(elOriginHeight - moveY)\n left = elOriginLeft - (width - elOriginWidth)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, elOriginTop + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = -moveY * aspectRatio\n else moveY = -moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth + moveX)\n height = getSizeWithinRange(elOriginHeight - moveY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.LEFT) {\n const { offsetX } = alignedAdsorption(elOriginLeft + moveX, null)\n moveX = moveX - offsetX\n width = getSizeWithinRange(elOriginWidth - moveX)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n const { offsetX } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, null)\n moveX = moveX - offsetX\n width = getSizeWithinRange(elOriginWidth + moveX)\n }\n else if (command === OperateResizeHandlers.TOP) {\n const { offsetY } = alignedAdsorption(null, elOriginTop + moveY)\n moveY = moveY - offsetY\n height = getSizeWithinRange(elOriginHeight - moveY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n const { offsetY } = alignedAdsorption(null, elOriginTop + elOriginHeight + moveY)\n moveY = moveY - offsetY\n height = getSizeWithinRange(elOriginHeight + moveY)\n }\n }\n \n elementList.value = elementList.value.map(el => {\n if (element.id !== el.id) return el\n if (el.type === 'shape' && 'pathFormula' in el && el.pathFormula) {\n const pathFormula = SHAPE_PATH_FORMULAS[el.pathFormula]\n\n let path = ''\n if ('editable' in pathFormula) path = pathFormula.formula(width, height, el.keypoint!)\n else path = pathFormula.formula(width, height)\n\n return {\n ...el, left, top, width, height,\n viewBox: [width, height],\n path,\n }\n }\n if (el.type === 'table') {\n let cellMinHeight = originTableCellMinHeight + (height - elOriginHeight) / el.data.length\n cellMinHeight = cellMinHeight < 36 ? 36 : cellMinHeight\n\n if (cellMinHeight === originTableCellMinHeight) return { ...el, left, width }\n return {\n ...el, left, top, width, height,\n cellMinHeight: cellMinHeight < 36 ? 36 : cellMinHeight,\n }\n }\n return { ...el, left, top, width, height }\n })\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n alignmentLines.value = []\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n \n if (startPageX === currentPageX && startPageY === currentPageY) return\n \n slidesStore.updateSlide({ elements: elementList.value })\n mainStore.setScalingState(false)\n \n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n // 多选元素缩放\n const scaleMultiElement = (e: MouseEvent, range: MultiSelectRange, command: OperateResizeHandlers) => {\n let isMouseDown = true\n \n const { minX, maxX, minY, maxY } = range\n const operateWidth = maxX - minX\n const operateHeight = maxY - minY\n const aspectRatio = operateWidth / operateHeight\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList.value))\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n \n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const x = (currentPageX - startPageX) / canvasScale.value\n let y = (currentPageY - startPageY) / canvasScale.value\n\n // 锁定宽高比例,逻辑同上\n if (ctrlOrShiftKeyActive.value) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) y = x / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) y = -x / aspectRatio\n }\n\n // 所有选中元素的整体范围\n let currentMinX = minX\n let currentMaxX = maxX\n let currentMinY = minY\n let currentMaxY = maxY\n\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n currentMaxX = maxX + x\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n currentMinX = minX + x\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n currentMinX = minX + x\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n currentMaxX = maxX + x\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.TOP) {\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT) {\n currentMinX = minX + x\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n currentMaxX = maxX + x\n }\n\n // 所有选中元素的整体宽高\n const currentOppositeWidth = currentMaxX - currentMinX\n const currentOppositeHeight = currentMaxY - currentMinY\n\n // 当前正在操作元素宽高占所有选中元素的整体宽高的比例\n let widthScale = currentOppositeWidth / operateWidth\n let heightScale = currentOppositeHeight / operateHeight\n\n if (widthScale <= 0) widthScale = 0\n if (heightScale <= 0) heightScale = 0\n \n // 根据前面计算的比例,计算并修改所有选中元素的位置大小\n elementList.value = elementList.value.map(el => {\n if ((el.type === 'image' || el.type === 'shape') && activeElementIdList.value.includes(el.id)) {\n const originElement = originElementList.find(originEl => originEl.id === el.id) as PPTImageElement | PPTShapeElement\n return {\n ...el,\n width: originElement.width * widthScale,\n height: originElement.height * heightScale,\n left: currentMinX + (originElement.left - minX) * widthScale,\n top: currentMinY + (originElement.top - minY) * heightScale,\n }\n }\n return el\n })\n }\n\n document.onmouseup = e => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n if (startPageX === e.pageX && startPageY === e.pageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n }\n\n return {\n scaleElement,\n scaleMultiElement,\n }\n}","export const enum ClipPathTypes {\n RECT = 'rect',\n ELLIPSE = 'ellipse',\n POLYGON = 'polygon',\n}\n\nexport const enum ClipPaths {\n RECT = 'rect',\n ROUNDRECT = 'roundRect',\n ELLIPSE = 'ellipse',\n TRIANGLE = 'triangle',\n PENTAGON = 'pentagon',\n RHOMBUS = 'rhombus',\n STAR = 'star',\n}\n\ninterface ClipPath {\n [key: string]: {\n name: string\n type: ClipPathTypes\n style: string\n radius?: string\n createPath?: (width: number, height: number) => string\n }\n}\n\nexport const CLIPPATHS: ClipPath = {\n rect: {\n name: '矩形',\n type: ClipPathTypes.RECT,\n radius: '0',\n style: '',\n },\n rect2: {\n name: '矩形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.8} 0 L ${width} ${height * 0.2} L ${width} ${height} L 0 ${height} Z`\n },\n },\n rect3: {\n name: '矩形3',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.8} 0 L ${width} ${height * 0.2} L ${width} ${height} L ${width * 0.2} ${height} L 0 ${height * 0.8} Z`\n },\n },\n roundRect: {\n name: '圆角矩形',\n type: ClipPathTypes.RECT,\n radius: '10px',\n style: 'inset(0 0 0 0 round 10px 10px 10px 10px)',\n },\n ellipse: {\n name: '圆形',\n type: ClipPathTypes.ELLIPSE,\n style: 'ellipse(50% 50% at 50% 50%)',\n },\n triangle: {\n name: '三角形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 0% 100%, 100% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L 0 ${height} L ${width} ${height} Z`\n },\n },\n triangle2: {\n name: '三角形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 100%, 0% 0%, 100% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} ${height} L 0 0 L ${width} 0 Z`\n },\n },\n triangle3: {\n name: '三角形3',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 0% 100%, 100% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L 0 ${height} L ${width} ${height} Z`\n },\n },\n rhombus: {\n name: '菱形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width} ${height * 0.5} L ${width * 0.5} ${height} L 0 ${height * 0.5} Z`\n },\n },\n pentagon: {\n name: '五边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width} ${0.38 * height} L ${0.82 * width} ${height} L ${0.18 * width} ${height} L 0 ${0.38 * height} Z`\n },\n },\n hexagon: {\n name: '六边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.2} 0 L ${width * 0.8} 0 L ${width} ${height * 0.5} L ${width * 0.8} ${height} L ${width * 0.2} ${height} L 0 ${height * 0.5} Z`\n },\n },\n heptagon: {\n name: '七边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width * 0.9} ${height * 0.2} L ${width} ${height * 0.6} L ${width * 0.75} ${height} L ${width * 0.25} ${height} L 0 ${height * 0.6} L ${width * 0.1} ${height * 0.2} Z`\n },\n },\n octagon: {\n name: '八边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} 0 L ${width * 0.7} 0 L ${width} ${height * 0.3} L ${width} ${height * 0.7} L ${width * 0.7} ${height} L ${width * 0.3} ${height} L 0 ${height * 0.7} L 0 ${height * 0.3} Z`\n },\n },\n chevron: {\n name: 'V形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.75} 0 L ${width} ${height * 0.5} L ${width * 0.75} ${height} L 0 ${height} L ${width * 0.25} ${height * 0.5} L 0 0 Z`\n },\n },\n point: {\n name: '点',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.75} 0 L ${width} ${height * 0.5} L ${width * 0.75} ${height} L 0 ${height} Z`\n },\n },\n arrow: {\n name: '箭头',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)',\n createPath: (width: number, height: number) => {\n return `M 0 ${height * 0.2} L ${width * 0.6} ${height * 0.2} L ${width * 0.6} 0 L ${width} ${height * 0.5} L ${width * 0.6} ${height} L ${width * 0.6} ${height * 0.8} L 0 ${height * 0.8} Z`\n },\n },\n parallelogram: {\n name: '平行四边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} 0 L ${width} 0 L ${width * 0.7} ${height} L 0 ${height} Z`\n },\n },\n parallelogram2: {\n name: '平行四边形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} ${height} L ${width} ${height} L ${width * 0.7} 0 L 0 0 Z`\n },\n },\n trapezoid: {\n name: '梯形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.25} 0 L ${width * 0.75} 0 L ${width} ${height} L 0 ${height} Z`\n },\n },\n trapezoid2: {\n name: '梯形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width} 0 L ${width * 0.75} ${height} L ${width * 0.25} ${height} Z`\n },\n },\n}","import type { Ref } from 'vue'\nimport { uniq } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\n\nexport default (\n elementList: Ref,\n moveElement: (e: MouseEvent | TouchEvent, element: PPTElement) => void,\n) => {\n const mainStore = useMainStore()\n const { activeElementIdList, activeGroupElementId, handleElementId, editorAreaFocus } = storeToRefs(mainStore)\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\n // 选中元素\n // startMove 表示是否需要再选中操作后进入到开始移动的状态\n const selectElement = (e: MouseEvent | TouchEvent, element: PPTElement, startMove = true) => {\n if (!editorAreaFocus.value) mainStore.setEditorareaFocus(true)\n\n // 如果目标元素当前未被选中,则将他设为选中状态\n // 此时如果按下Ctrl键或Shift键,则进入多选状态,将当前已选中的元素和目标元素一起设置为选中状态,否则仅将目标元素设置为选中状态\n // 如果目标元素是分组成员,需要将该组合的其他元素一起设置为选中状态\n if (!activeElementIdList.value.includes(element.id)) {\n let newActiveIdList: string[] = []\n\n if (ctrlOrShiftKeyActive.value) {\n newActiveIdList = [...activeElementIdList.value, element.id]\n }\n else newActiveIdList = [element.id]\n \n if (element.groupId) {\n const groupMembersId: string[] = []\n elementList.value.forEach((el: PPTElement) => {\n if (el.groupId === element.groupId) groupMembersId.push(el.id)\n })\n newActiveIdList = [...newActiveIdList, ...groupMembersId]\n }\n\n mainStore.setActiveElementIdList(uniq(newActiveIdList))\n mainStore.setHandleElementId(element.id)\n }\n\n // 如果目标元素已被选中,且按下了Ctrl键或Shift键,则取消其被选中状态\n // 除非目标元素是最后的一个被选中元素,或者目标元素所在的组合是最后一组选中组合\n // 如果目标元素是分组成员,需要将该组合的其他元素一起取消选中状态\n else if (ctrlOrShiftKeyActive.value) {\n let newActiveIdList: string[] = []\n\n if (element.groupId) {\n const groupMembersId: string[] = []\n elementList.value.forEach((el: PPTElement) => {\n if (el.groupId === element.groupId) groupMembersId.push(el.id)\n })\n newActiveIdList = activeElementIdList.value.filter(id => !groupMembersId.includes(id))\n }\n else {\n newActiveIdList = activeElementIdList.value.filter(id => id !== element.id)\n }\n\n if (newActiveIdList.length > 0) {\n mainStore.setActiveElementIdList(newActiveIdList)\n }\n }\n\n // 如果目标元素已被选中,同时目标元素不是当前操作元素,则将其设置为当前操作元素\n else if (handleElementId.value !== element.id) {\n mainStore.setHandleElementId(element.id)\n }\n\n // 如果目标元素已被选中,同时也是当前操作元素,那么当目标元素在该状态下再次被点击时,将被设置为多选元素中的激活成员\n else if (activeGroupElementId.value !== element.id) {\n const startPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const startPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n ;(e.target as HTMLElement).onmouseup = (e: MouseEvent) => {\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) {\n mainStore.setActiveGroupElementId(element.id)\n ;(e.target as HTMLElement).onmouseup = null\n }\n }\n }\n\n if (startMove) moveElement(e, element)\n }\n\n return {\n selectElement,\n }\n}\n","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps } from '@/types/edit'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { getRectRotatedRange, uniqAlignLines, type AlignLine } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default (\n elementList: Ref,\n alignmentLines: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(useMainStore())\n const { shiftKeyState } = storeToRefs(useKeyboardStore())\n const { viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const dragElement = (e: MouseEvent | TouchEvent, element: PPTElement) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n if (!activeElementIdList.value.includes(element.id)) return\n let isMouseDown = true\n\n const edgeWidth = VIEWPORT_SIZE\n const edgeHeight = VIEWPORT_SIZE * viewportRatio.value\n \n const sorptionRange = 5\n\n const originElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList.value))\n const originActiveElementList = originElementList.filter(el => activeElementIdList.value.includes(el.id))\n \n const elOriginLeft = element.left\n const elOriginTop = element.top\n const elOriginWidth = element.width\n const elOriginHeight = ('height' in element && element.height) ? element.height : 0\n const elOriginRotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n \n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n let isMisoperation: boolean | null = null\n\n const isActiveGroupElement = element.id === activeGroupElementId.value\n\n // 收集对齐对齐吸附线\n // 包括页面内除目标元素外的其他元素在画布中的各个可吸附对齐位置:上下左右四边,水平中心、垂直中心\n // 其中线条和被旋转过的元素需要重新计算他们在画布中的中心点位置的范围\n let horizontalLines: AlignLine[] = []\n let verticalLines: AlignLine[] = []\n\n for (const el of elementList.value) {\n if (el.type === 'line') continue\n if (isActiveGroupElement && el.id === element.id) continue\n if (!isActiveGroupElement && activeElementIdList.value.includes(el.id)) continue\n\n let left, top, width, height\n if ('rotate' in el && el.rotate) {\n const { xRange, yRange } = getRectRotatedRange({\n left: el.left,\n top: el.top,\n width: el.width,\n height: el.height,\n rotate: el.rotate,\n })\n left = xRange[0]\n top = yRange[0]\n width = xRange[1] - xRange[0]\n height = yRange[1] - yRange[0]\n }\n else {\n left = el.left\n top = el.top\n width = el.width\n height = el.height\n }\n \n const right = left + width\n const bottom = top + height\n const centerX = top + height / 2\n const centerY = left + width / 2\n\n const topLine: AlignLine = { value: top, range: [left, right] }\n const bottomLine: AlignLine = { value: bottom, range: [left, right] }\n const horizontalCenterLine: AlignLine = { value: centerX, range: [left, right] }\n const leftLine: AlignLine = { value: left, range: [top, bottom] }\n const rightLine: AlignLine = { value: right, range: [top, bottom] }\n const verticalCenterLine: AlignLine = { value: centerY, range: [top, bottom] }\n\n horizontalLines.push(topLine, bottomLine, horizontalCenterLine)\n verticalLines.push(leftLine, rightLine, verticalCenterLine)\n }\n\n // 画布可视区域的四个边界、水平中心、垂直中心\n const edgeTopLine: AlignLine = { value: 0, range: [0, edgeWidth] }\n const edgeBottomLine: AlignLine = { value: edgeHeight, range: [0, edgeWidth] }\n const edgeHorizontalCenterLine: AlignLine = { value: edgeHeight / 2, range: [0, edgeWidth] }\n const edgeLeftLine: AlignLine = { value: 0, range: [0, edgeHeight] }\n const edgeRightLine: AlignLine = { value: edgeWidth, range: [0, edgeHeight] }\n const edgeVerticalCenterLine: AlignLine = { value: edgeWidth / 2, range: [0, edgeHeight] }\n\n horizontalLines.push(edgeTopLine, edgeBottomLine, edgeHorizontalCenterLine)\n verticalLines.push(edgeLeftLine, edgeRightLine, edgeVerticalCenterLine)\n \n // 对齐吸附线去重\n horizontalLines = uniqAlignLines(horizontalLines)\n verticalLines = uniqAlignLines(verticalLines)\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n // 如果鼠标滑动距离过小,则将操作判定为误操作:\n // 如果误操作标记为null,表示是第一次触发移动,需要计算当前是否是误操作\n // 如果误操作标记为true,表示当前还处在误操作范围内,但仍然需要继续计算检查后续操作是否还处于误操作\n // 如果误操作标记为false,表示已经脱离了误操作范围,不需要再次计算\n if (isMisoperation !== false) {\n isMisoperation = Math.abs(startPageX - currentPageX) < sorptionRange && \n Math.abs(startPageY - currentPageY) < sorptionRange\n }\n if (!isMouseDown || isMisoperation) return\n \n let moveX = (currentPageX - startPageX) / canvasScale.value\n let moveY = (currentPageY - startPageY) / canvasScale.value\n\n if (shiftKeyState.value) {\n if (Math.abs(moveX) > Math.abs(moveY)) moveY = 0\n if (Math.abs(moveX) < Math.abs(moveY)) moveX = 0\n }\n\n // 基础目标位置\n let targetLeft = elOriginLeft + moveX\n let targetTop = elOriginTop + moveY\n\n // 计算目标元素在画布中的位置范围,用于吸附对齐\n // 需要区分单选和多选两种情况,其中多选状态下需要计算多选元素的整体范围;单选状态下需要继续区分线条、普通元素、旋转后的普通元素三种情况\n let targetMinX: number, targetMaxX: number, targetMinY: number, targetMaxY: number\n\n if (activeElementIdList.value.length === 1 || isActiveGroupElement) {\n if (elOriginRotate) {\n const { xRange, yRange } = getRectRotatedRange({\n left: targetLeft,\n top: targetTop,\n width: elOriginWidth,\n height: elOriginHeight,\n rotate: elOriginRotate,\n })\n targetMinX = xRange[0]\n targetMaxX = xRange[1]\n targetMinY = yRange[0]\n targetMaxY = yRange[1]\n }\n else if (element.type === 'line') {\n targetMinX = targetLeft\n targetMaxX = targetLeft + Math.max(element.start[0], element.end[0])\n targetMinY = targetTop\n targetMaxY = targetTop + Math.max(element.start[1], element.end[1])\n }\n else {\n targetMinX = targetLeft\n targetMaxX = targetLeft + elOriginWidth\n targetMinY = targetTop\n targetMaxY = targetTop + elOriginHeight\n }\n }\n else {\n const leftValues = []\n const topValues = []\n const rightValues = []\n const bottomValues = []\n \n for (let i = 0; i < originActiveElementList.length; i++) {\n const element = originActiveElementList[i]\n const left = element.left + moveX\n const top = element.top + moveY\n const width = element.width\n const height = ('height' in element && element.height) ? element.height : 0\n const rotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n\n if ('rotate' in element && element.rotate) {\n const { xRange, yRange } = getRectRotatedRange({ left, top, width, height, rotate })\n leftValues.push(xRange[0])\n topValues.push(yRange[0])\n rightValues.push(xRange[1])\n bottomValues.push(yRange[1])\n }\n else if (element.type === 'line') {\n leftValues.push(left)\n topValues.push(top)\n rightValues.push(left + Math.max(element.start[0], element.end[0]))\n bottomValues.push(top + Math.max(element.start[1], element.end[1]))\n }\n else {\n leftValues.push(left)\n topValues.push(top)\n rightValues.push(left + width)\n bottomValues.push(top + height)\n }\n }\n\n targetMinX = Math.min(...leftValues)\n targetMaxX = Math.max(...rightValues)\n targetMinY = Math.min(...topValues)\n targetMaxY = Math.max(...bottomValues)\n }\n \n const targetCenterX = targetMinX + (targetMaxX - targetMinX) / 2\n const targetCenterY = targetMinY + (targetMaxY - targetMinY) / 2\n\n // 将收集到的对齐吸附线与计算的目标元素位置范围做对比,二者的差小于设定的值时执行自动对齐校正\n // 水平和垂直两个方向需要分开计算\n const _alignmentLines: AlignmentLineProps[] = []\n let isVerticalAdsorbed = false\n let isHorizontalAdsorbed = false\n for (let i = 0; i < horizontalLines.length; i++) {\n const { value, range } = horizontalLines[i]\n const min = Math.min(...range, targetMinX, targetMaxX)\n const max = Math.max(...range, targetMinX, targetMaxX)\n \n if (Math.abs(targetMinY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetMinY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n if (Math.abs(targetMaxY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetMaxY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n if (Math.abs(targetCenterY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetCenterY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n }\n for (let i = 0; i < verticalLines.length; i++) {\n const { value, range } = verticalLines[i]\n const min = Math.min(...range, targetMinY, targetMaxY)\n const max = Math.max(...range, targetMinY, targetMaxY)\n\n if (Math.abs(targetMinX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetMinX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n if (Math.abs(targetMaxX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetMaxX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n if (Math.abs(targetCenterX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetCenterX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n }\n alignmentLines.value = _alignmentLines\n \n // 单选状态下,或者当前选中的多个元素中存在正在操作的元素时,仅修改正在操作的元素的位置\n if (activeElementIdList.value.length === 1 || isActiveGroupElement) {\n elementList.value = elementList.value.map(el => {\n return el.id === element.id ? { ...el, left: targetLeft, top: targetTop } : el\n })\n }\n\n // 多选状态下,除了修改正在操作的元素的位置,其他被选中的元素也需要修改位置信息\n // 其他被选中的元素的位置信息通过正在操作的元素的移动偏移量来进行计算\n else {\n const handleElement = elementList.value.find(el => el.id === element.id)\n if (!handleElement) return\n\n elementList.value = elementList.value.map(el => {\n if (activeElementIdList.value.includes(el.id)) {\n if (el.id === element.id) {\n return {\n ...el,\n left: targetLeft,\n top: targetTop,\n }\n }\n return {\n ...el,\n left: el.left + (targetLeft - handleElement.left),\n top: el.top + (targetTop - handleElement.top),\n }\n }\n return el\n })\n }\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n alignmentLines.value = []\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n dragElement,\n }\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, PPTLineElement } from '@/types/slides'\nimport { OperateLineHandlers } from '@/types/edit'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface AdsorptionPoint {\n x: number\n y: number\n}\n\nexport default (elementList: Ref) => {\n const slidesStore = useSlidesStore()\n const { canvasScale } = storeToRefs(useMainStore())\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 拖拽线条端点\n const dragLineElement = (e: MouseEvent, element: PPTLineElement, command: OperateLineHandlers) => {\n let isMouseDown = true\n\n const sorptionRange = 8\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const adsorptionPoints: AdsorptionPoint[] = []\n\n // 获取所有线条以外的未旋转的元素的8个缩放点作为吸附位置\n for (let i = 0; i < elementList.value.length; i++) {\n const _element = elementList.value[i]\n if (_element.type === 'line' || _element.rotate) continue\n\n const left = _element.left\n const top = _element.top\n const width = _element.width\n const height = _element.height\n \n const right = left + width\n const bottom = top + height\n const centerX = top + height / 2\n const centerY = left + width / 2\n\n const topPoint = { x: centerY, y: top }\n const bottomPoint = { x: centerY, y: bottom }\n const leftPoint = { x: left, y: centerX }\n const rightPoint = { x: right, y: centerX }\n\n const leftTopPoint = { x: left, y: top }\n const rightTopPoint = { x: right, y: top }\n const leftBottomPoint = { x: left, y: bottom }\n const rightBottomPoint = { x: right, y: bottom }\n\n adsorptionPoints.push(\n topPoint,\n bottomPoint,\n leftPoint,\n rightPoint,\n leftTopPoint,\n rightTopPoint,\n leftBottomPoint,\n rightBottomPoint,\n )\n }\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const moveX = (currentPageX - startPageX) / canvasScale.value\n const moveY = (currentPageY - startPageY) / canvasScale.value\n \n // 线条起点和终点在编辑区域中的位置\n let startX = element.left + element.start[0]\n let startY = element.top + element.start[1]\n let endX = element.left + element.end[0]\n let endY = element.top + element.end[1]\n\n const mid = element.broken || element.curve || [0, 0]\n let midX = element.left + mid[0]\n let midY = element.top + mid[1]\n\n const [c1, c2] = element.cubic || [[0, 0], [0, 0]]\n let c1X = element.left + c1[0]\n let c1Y = element.top + c1[1]\n let c2X = element.left + c2[0]\n let c2Y = element.top + c2[1]\n\n // 拖拽起点或终点的位置\n // 水平和垂直方向上有吸附\n if (command === OperateLineHandlers.START) {\n startX = startX + moveX\n startY = startY + moveY\n\n if (Math.abs(startX - endX) < sorptionRange) startX = endX\n if (Math.abs(startY - endY) < sorptionRange) startY = endY\n\n for (const adsorptionPoint of adsorptionPoints) {\n const { x, y } = adsorptionPoint\n if (Math.abs(x - startX) < sorptionRange && Math.abs(y - startY) < sorptionRange) {\n startX = x\n startY = y\n break\n }\n }\n }\n else if (command === OperateLineHandlers.END) {\n endX = endX + moveX\n endY = endY + moveY\n\n if (Math.abs(startX - endX) < sorptionRange) endX = startX\n if (Math.abs(startY - endY) < sorptionRange) endY = startY\n\n for (const adsorptionPoint of adsorptionPoints) {\n const { x, y } = adsorptionPoint\n if (Math.abs(x - endX) < sorptionRange && Math.abs(y - endY) < sorptionRange) {\n endX = x\n endY = y\n break\n }\n }\n }\n else if (command === OperateLineHandlers.C) {\n midX = midX + moveX\n midY = midY + moveY\n\n if (Math.abs(midX - startX) < sorptionRange) midX = startX\n if (Math.abs(midY - startY) < sorptionRange) midY = startY\n if (Math.abs(midX - endX) < sorptionRange) midX = endX\n if (Math.abs(midY - endY) < sorptionRange) midY = endY\n if (Math.abs(midX - (startX + endX) / 2) < sorptionRange && Math.abs(midY - (startY + endY) / 2) < sorptionRange) {\n midX = (startX + endX) / 2\n midY = (startY + endY) / 2\n }\n }\n else if (command === OperateLineHandlers.C1) {\n c1X = c1X + moveX\n c1Y = c1Y + moveY\n\n if (Math.abs(c1X - startX) < sorptionRange) c1X = startX\n if (Math.abs(c1Y - startY) < sorptionRange) c1Y = startY\n if (Math.abs(c1X - endX) < sorptionRange) c1X = endX\n if (Math.abs(c1Y - endY) < sorptionRange) c1Y = endY\n }\n else if (command === OperateLineHandlers.C2) {\n c2X = c2X + moveX\n c2Y = c2Y + moveY\n\n if (Math.abs(c2X - startX) < sorptionRange) c2X = startX\n if (Math.abs(c2Y - startY) < sorptionRange) c2Y = startY\n if (Math.abs(c2X - endX) < sorptionRange) c2X = endX\n if (Math.abs(c2Y - endY) < sorptionRange) c2Y = endY\n }\n\n // 计算更新起点和终点基于自身元素位置的坐标\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n const start: [number, number] = [0, 0]\n const end: [number, number] = [maxX - minX, maxY - minY]\n if (startX > endX) {\n start[0] = maxX - minX\n end[0] = 0\n }\n if (startY > endY) {\n start[1] = maxY - minY\n end[1] = 0\n }\n\n elementList.value = elementList.value.map(el => {\n if (el.id === element.id) {\n const newEl: PPTLineElement = {\n ...(el as PPTLineElement),\n left: minX,\n top: minY,\n start: start,\n end: end,\n }\n if (command === OperateLineHandlers.START || command === OperateLineHandlers.END) {\n if (element.broken) newEl.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (element.curve) newEl.curve = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (element.cubic) newEl.cubic = [[(start[0] + end[0]) / 2, (start[1] + end[1]) / 2], [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]]\n }\n else if (command === OperateLineHandlers.C) {\n if (element.broken) newEl.broken = [midX - minX, midY - minY]\n if (element.curve) newEl.curve = [midX - minX, midY - minY]\n }\n else {\n if (element.cubic) newEl.cubic = [[c1X - minX, c1Y - minY], [c2X - minX, c2Y - minY]]\n }\n return newEl\n }\n return el\n })\n }\n\n document.onmouseup = e => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n }\n\n return {\n dragLineElement,\n }\n}","import type { Ref } from 'vue'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTShapeElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\n\ninterface ShapePathData {\n baseSize: number,\n originPos: number,\n min: number,\n max: number,\n relative: string,\n}\n\nexport default (\n elementList: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const moveShapeKeypoint = (e: MouseEvent | TouchEvent, element: PPTShapeElement) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n let isMouseDown = true\n \n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n const pathFormula = SHAPE_PATH_FORMULAS[element.pathFormula!]\n let shapePathData: ShapePathData | null = null\n if ('editable' in pathFormula) {\n const baseSize = pathFormula.getBaseSize(element.width, element.height)\n const originPos = baseSize * element.keypoint!\n const [min, max] = pathFormula.range\n const relative = pathFormula.relative\n\n shapePathData = { baseSize, originPos, min, max, relative }\n }\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n const moveX = (currentPageX - startPageX) / canvasScale.value\n const moveY = (currentPageY - startPageY) / canvasScale.value\n\n elementList.value = elementList.value.map(el => {\n if (el.id === element.id && shapePathData) {\n const { baseSize, originPos, min, max, relative } = shapePathData\n const shapeElement = el as PPTShapeElement\n\n let keypoint = 0\n\n if (relative === 'left') keypoint = (originPos + moveX) / baseSize\n if (relative === 'right') keypoint = (originPos - moveX) / baseSize\n if (relative === 'center') keypoint = (originPos - moveX * 2) / baseSize\n if (relative === 'top') keypoint = (originPos + moveY) / baseSize\n if (relative === 'bottom') keypoint = (originPos - moveY) / baseSize\n\n if (keypoint < min) keypoint = min\n if (keypoint > max) keypoint = max\n\n return {\n ...el,\n keypoint,\n path: pathFormula.formula(shapeElement.width, shapeElement.height, keypoint),\n }\n }\n return el\n })\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n moveShapeKeypoint,\n }\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { CreateElementSelectionData } from '@/types/edit'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nexport default (viewportRef: Ref) => {\n const mainStore = useMainStore()\n const { canvasScale, creatingElement } = storeToRefs(mainStore)\n\n // 通过鼠标框选时的起点和终点,计算选区的位置大小\n const formatCreateSelection = (selectionData: CreateElementSelectionData) => {\n const { start, end } = selectionData\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const [startX, startY] = start\n const [endX, endY] = end\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const left = (minX - viewportRect.x) / canvasScale.value\n const top = (minY - viewportRect.y) / canvasScale.value\n const width = (maxX - minX) / canvasScale.value\n const height = (maxY - minY) / canvasScale.value\n\n return { left, top, width, height }\n }\n\n // 通过鼠标框选时的起点和终点,计算线条在画布中的位置和起点终点\n const formatCreateSelectionForLine = (selectionData: CreateElementSelectionData) => {\n const { start, end } = selectionData\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const [startX, startY] = start\n const [endX, endY] = end\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const left = (minX - viewportRect.x) / canvasScale.value\n const top = (minY - viewportRect.y) / canvasScale.value\n const width = (maxX - minX) / canvasScale.value\n const height = (maxY - minY) / canvasScale.value\n\n const _start: [number, number] = [\n startX === minX ? 0 : width,\n startY === minY ? 0 : height,\n ]\n const _end: [number, number] = [\n endX === minX ? 0 : width,\n endY === minY ? 0 : height,\n ]\n\n return {\n left,\n top,\n start: _start,\n end: _end,\n }\n }\n\n const { createTextElement, createShapeElement, createLineElement } = useCreateElement()\n\n // 根据鼠标选区的位置大小插入元素\n const insertElementFromCreateSelection = (selectionData: CreateElementSelectionData) => {\n if (!creatingElement.value) return\n\n const type = creatingElement.value.type\n if (type === 'text') {\n const position = formatCreateSelection(selectionData)\n position && createTextElement(position, { vertical: creatingElement.value.vertical })\n }\n else if (type === 'shape') {\n const position = formatCreateSelection(selectionData)\n position && createShapeElement(position, creatingElement.value.data)\n }\n else if (type === 'line') {\n const position = formatCreateSelectionForLine(selectionData)\n position && createLineElement(position, creatingElement.value.data)\n }\n mainStore.setCreatingElement(null)\n }\n\n return {\n formatCreateSelection,\n insertElementFromCreateSelection,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ElementAlignCommands } from '@/types/edit'\nimport { getElementListRange } from '@/utils/element'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useHistorySnapshot from './useHistorySnapshot'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeElementList } = storeToRefs(useMainStore())\n const { currentSlide, viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 将所有选中的元素对齐到画布\n * @param command 对齐方向\n */\n const alignElementToCanvas = (command: ElementAlignCommands) => {\n const viewportWidth = VIEWPORT_SIZE\n const viewportHeight = VIEWPORT_SIZE * viewportRatio.value\n const { minX, maxX, minY, maxY } = getElementListRange(activeElementList.value)\n \n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n for (const element of newElementList) {\n if (!activeElementIdList.value.includes(element.id)) continue\n \n // 水平垂直居中\n if (command === ElementAlignCommands.CENTER) {\n const offsetY = minY + (maxY - minY) / 2 - viewportHeight / 2\n const offsetX = minX + (maxX - minX) / 2 - viewportWidth / 2\n element.top = element.top - offsetY \n element.left = element.left - offsetX \n }\n\n // 顶部对齐\n if (command === ElementAlignCommands.TOP) {\n const offsetY = minY - 0\n element.top = element.top - offsetY \n }\n\n // 垂直居中\n else if (command === ElementAlignCommands.VERTICAL) {\n const offsetY = minY + (maxY - minY) / 2 - viewportHeight / 2\n element.top = element.top - offsetY \n }\n\n // 底部对齐\n else if (command === ElementAlignCommands.BOTTOM) {\n const offsetY = maxY - viewportHeight\n element.top = element.top - offsetY \n }\n \n // 左侧对齐\n else if (command === ElementAlignCommands.LEFT) {\n const offsetX = minX - 0\n element.left = element.left - offsetX \n }\n\n // 水平居中\n else if (command === ElementAlignCommands.HORIZONTAL) {\n const offsetX = minX + (maxX - minX) / 2 - viewportWidth / 2\n element.left = element.left - offsetX \n }\n\n // 右侧对齐\n else if (command === ElementAlignCommands.RIGHT) {\n const offsetX = maxX - viewportWidth\n element.left = element.left - offsetX \n }\n }\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n return {\n alignElementToCanvas,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { PPTElementShadow } from '@/types/slides'\n\n// 计算元素的阴影样式\nexport default (shadow: Ref) => {\n const shadowStyle = computed(() => {\n if (shadow.value) {\n const { h, v, blur, color } = shadow.value\n return `${h}px ${v}px ${blur}px ${color}`\n }\n return ''\n })\n\n return {\n shadowStyle,\n }\n}","import { computed, type Ref } from 'vue'\n\n// 计算元素的翻转样式\nexport default (flipH: Ref, flipV: Ref) => {\n const flipStyle = computed(() => {\n let style = ''\n \n if (flipH.value && flipV.value) style = 'rotateX(180deg) rotateY(180deg)'\n else if (flipV.value) style = 'rotateX(180deg)'\n else if (flipH.value) style = 'rotateY(180deg)'\n\n return style\n })\n\n return {\n flipStyle,\n }\n}","import { computed, type Ref } from 'vue'\nimport { CLIPPATHS, ClipPathTypes } from '@/configs/imageClip'\nimport type { ImageElementClip } from '@/types/slides'\n\nexport default (clip: Ref) => {\n const clipShape = computed(() => {\n if (!clip.value) return CLIPPATHS.rect\n const shape = clip.value.shape || ClipPathTypes.RECT\n\n return CLIPPATHS[shape]\n })\n\n const imgPosition = computed(() => {\n if (!clip.value) {\n return {\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n }\n }\n\n const [start, end] = clip.value.range\n\n const widthScale = (end[0] - start[0]) / 100\n const heightScale = (end[1] - start[1]) / 100\n const left = start[0] / widthScale\n const top = start[1] / heightScale\n\n return {\n left: -left + '%',\n top: -top + '%',\n width: 100 / widthScale + '%',\n height: 100 / heightScale + '%',\n }\n })\n\n return {\n clipShape,\n imgPosition,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { ImageElementFilters, ImageElementFilterKeys } from '@/types/slides'\n\nexport default (filters: Ref) => {\n const filter = computed(() => {\n if (!filters.value) return ''\n let filter = ''\n const keys = Object.keys(filters.value) as ImageElementFilterKeys[]\n for (const key of keys) {\n filter += `${key}(${filters.value[key]}) `\n }\n return filter\n })\n\n return {\n filter,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\n\n// 计算边框相关属性值,主要是对默认值的处理\nexport default (outline: Ref) => {\n const outlineWidth = computed(() => outline.value?.width ?? 0)\n const outlineStyle = computed(() => outline.value?.style || 'solid')\n const outlineColor = computed(() => outline.value?.color || '#d14424')\n\n const strokeDashArray = computed(() => {\n if (outlineStyle.value !== 'dashed') return '0 0'\n const size = outlineWidth.value\n return size <= 6 ? `${size * 4.5} ${size * 2}` : `${size * 4} ${size * 1.5}`\n })\n\n return {\n outlineWidth,\n outlineStyle,\n outlineColor,\n strokeDashArray,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35e36256\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"rx\", \"ry\", \"width\", \"height\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageRectOutline',\n props: {\n width: {},\n height: {},\n outline: {},\n radius: { default: '0' }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-rect-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"rect\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n rx: _ctx.radius,\n ry: _ctx.radius,\n width: _ctx.width,\n height: _ctx.height,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageRectOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageRectOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageRectOutline.vue?vue&type=style&index=0&id=35e36256&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35e36256\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-11836cf8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"cx\", \"cy\", \"rx\", \"ry\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageEllipseOutline',\n props: {\n width: {},\n height: {},\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-ellipse-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"ellipse\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n cx: _ctx.width / 2,\n cy: _ctx.height / 2,\n rx: _ctx.width / 2,\n ry: _ctx.height / 2,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageEllipseOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageEllipseOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageEllipseOutline.vue?vue&type=style&index=0&id=11836cf8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-11836cf8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6e021ee2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImagePolygonOutline',\n props: {\n width: {},\n height: {},\n createPath: { type: Function },\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-polygon-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n d: _ctx.createPath(_ctx.width, _ctx.height),\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImagePolygonOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImagePolygonOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImagePolygonOutline.vue?vue&type=style&index=0&id=6e021ee2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6e021ee2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"image-outline\" }\n\nimport { computed } from 'vue'\nimport type { PPTImageElement } from '@/types/slides'\nimport useClipImage from '../useClipImage'\n\nimport ImageRectOutline from './ImageRectOutline.vue'\nimport ImageEllipseOutline from './ImageEllipseOutline.vue'\nimport ImagePolygonOutline from './ImagePolygonOutline.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape } = useClipImage(clip)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(clipShape).type === 'rect')\n ? (_openBlock(), _createBlock(ImageRectOutline, {\n key: 0,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n radius: _unref(clipShape).radius,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"radius\", \"outline\"]))\n : (_unref(clipShape).type === 'ellipse')\n ? (_openBlock(), _createBlock(ImageEllipseOutline, {\n key: 1,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]))\n : (_unref(clipShape).type === 'polygon')\n ? (_openBlock(), _createBlock(ImagePolygonOutline, {\n key: 2,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline,\n createPath: _unref(clipShape).createPath!\n }, null, 8, [\"width\", \"height\", \"outline\", \"createPath\"]))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5984406b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\nconst _hoisted_2 = [\"src\"]\nconst _hoisted_3 = [\"onMousedown\"]\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n width: \"16\",\n height: \"16\",\n fill: \"#fff\",\n stroke: \"#333\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"stroke-width\": \"0.3\",\n \"shape-rendering\": \"crispEdges\",\n d: \"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z\"\n })\n], -1))\nconst _hoisted_5 = [\n _hoisted_4\n]\nconst _hoisted_6 = [\"onMousedown\"]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n width: \"16\",\n height: \"16\",\n fill: \"#fff\",\n stroke: \"#333\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"stroke-width\": \"0.3\",\n \"shape-rendering\": \"crispEdges\",\n d: \"M 16 0 L 0 0 L 0 4 L 16 4 Z\"\n })\n], -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport { KEYS } from '@/configs/hotkey'\nimport { type ImageClipedEmitData, OperateResizeHandlers } from '@/types/edit'\nimport type { ImageClipDataRange, ImageElementClip } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageClipHandler',\n props: {\n src: {},\n clipPath: {},\n width: {},\n height: {},\n top: {},\n left: {},\n rotate: {},\n clipData: {}\n },\n emits: [\"clip\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst clipWrapperPositionStyle = ref({\n top: '0',\n left: '0',\n})\nconst isSettingClipRange = ref(false)\nconst currentRange = ref(null)\n\n// 获取裁剪区域信息(裁剪区域占原图的宽高比例,处在原图中的位置)\nconst getClipDataTransformInfo = () => {\n const [start, end] = props.clipData ? props.clipData.range : [[0, 0], [100, 100]]\n\n const widthScale = (end[0] - start[0]) / 100\n const heightScale = (end[1] - start[1]) / 100\n const left = start[0] / widthScale\n const top = start[1] / heightScale\n\n return { widthScale, heightScale, left, top }\n}\n\n// 底层图片位置大小(遮罩区域图片)\nconst imgPosition = computed(() => {\n const { widthScale, heightScale, left, top } = getClipDataTransformInfo()\n return {\n left: -left,\n top: -top,\n width: 100 / widthScale,\n height: 100 / heightScale,\n }\n})\n\n// 底层图片位置大小样式(遮罩区域图片)\nconst bottomImgPositionStyle = computed(() => {\n return {\n top: imgPosition.value.top + '%',\n left: imgPosition.value.left + '%',\n width: imgPosition.value.width + '%',\n height: imgPosition.value.height + '%',\n }\n})\n\n// 顶层图片容器位置大小(裁剪高亮区域)\nconst topImgWrapperPosition = ref({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n})\n\n// 顶层图片容器位置大小样式(裁剪高亮区域)\nconst topImgWrapperPositionStyle = computed(() => {\n const { top, left, width, height } = topImgWrapperPosition.value\n return {\n top: top + '%',\n left: left + '%',\n width: width + '%',\n height: height + '%',\n }\n})\n\n// 顶层图片位置大小样式(裁剪区域图片)\nconst topImgPositionStyle = computed(() => {\n const bottomWidth = imgPosition.value.width\n const bottomHeight = imgPosition.value.height\n \n const { top, left, width, height } = topImgWrapperPosition.value\n \n return {\n left: -left * (100 / width) + '%',\n top: -top * (100 / height) + '%',\n width: bottomWidth / width * 100 + '%',\n height: bottomHeight / height * 100 + '%',\n }\n})\n\n// 初始化裁剪位置信息\nconst initClipPosition = () => {\n const { left, top } = getClipDataTransformInfo()\n topImgWrapperPosition.value = {\n left: left,\n top: top,\n width: 100,\n height: 100,\n }\n \n clipWrapperPositionStyle.value = {\n top: -top + '%',\n left: -left + '%',\n }\n}\n\n// 执行裁剪:计算裁剪后的图片位置大小和裁剪信息,并将数据同步出去\nconst handleClip = () => {\n if (isSettingClipRange.value) return\n\n if (!currentRange.value) {\n emit('clip', null)\n return\n }\n\n const { left, top } = getClipDataTransformInfo()\n\n const position = {\n left: (topImgWrapperPosition.value.left - left) / 100 * props.width,\n top: (topImgWrapperPosition.value.top - top) / 100 * props.height,\n width: (topImgWrapperPosition.value.width - 100) / 100 * props.width,\n height: (topImgWrapperPosition.value.height - 100) / 100 * props.height,\n }\n\n const clipedEmitData: ImageClipedEmitData = {\n range: currentRange.value,\n position,\n }\n emit('clip', clipedEmitData)\n}\n\n// 快捷键监听:回车确认裁剪\nconst keyboardListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ENTER) handleClip()\n}\n\nonMounted(() => {\n initClipPosition()\n document.addEventListener('keydown', keyboardListener)\n})\nonUnmounted(() => {\n document.removeEventListener('keydown', keyboardListener)\n})\n\n// 计算并更新裁剪区域范围数据\nconst updateRange = () => {\n const retPosition = {\n left: parseInt(topImgPositionStyle.value.left),\n top: parseInt(topImgPositionStyle.value.top),\n width: parseInt(topImgPositionStyle.value.width),\n height: parseInt(topImgPositionStyle.value.height),\n }\n\n const widthScale = 100 / retPosition.width\n const heightScale = 100 / retPosition.height\n\n const start: [number, number] = [\n -retPosition.left * widthScale,\n -retPosition.top * heightScale,\n ]\n const end: [number, number] = [\n widthScale * 100 + start[0],\n heightScale * 100 + start[1],\n ]\n\n currentRange.value = [start, end]\n}\n\n// 移动裁剪区域\nconst moveClipRange = (e: MouseEvent) => {\n isSettingClipRange.value = true\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n const bottomPosition = imgPosition.value\n const originPositopn = { ...topImgWrapperPosition.value }\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n let moveX = (currentPageX - startPageX) / canvasScale.value / props.width * 100\n let moveY = (currentPageY - startPageY) / canvasScale.value / props.height * 100\n\n if (props.rotate > 45 && props.rotate < 135) {\n moveX = (currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = -(currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n if ((props.rotate >= 135 && props.rotate <= 180) || (props.rotate >= -180 && props.rotate <= -135)) {\n moveX = -moveX\n moveY = -moveY\n }\n if (props.rotate > -135 && props.rotate < -45) {\n moveX = -(currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = (currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n\n let targetLeft = originPositopn.left + moveX\n let targetTop = originPositopn.top + moveY\n\n if (targetLeft < 0) targetLeft = 0\n else if (targetLeft + originPositopn.width > bottomPosition.width) {\n targetLeft = bottomPosition.width - originPositopn.width\n }\n if (targetTop < 0) targetTop = 0\n else if (targetTop + originPositopn.height > bottomPosition.height) {\n targetTop = bottomPosition.height - originPositopn.height\n }\n \n topImgWrapperPosition.value = {\n ...topImgWrapperPosition.value,\n left: targetLeft,\n top: targetTop,\n }\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n updateRange()\n\n setTimeout(() => {\n isSettingClipRange.value = false\n }, 0)\n }\n}\n\n// 缩放裁剪区域\nconst scaleClipRange = (e: MouseEvent, type: OperateResizeHandlers) => {\n isSettingClipRange.value = true\n let isMouseDown = true\n\n const minWidth = 50 / props.width * 100\n const minHeight = 50 / props.height * 100\n \n const startPageX = e.pageX\n const startPageY = e.pageY\n const bottomPosition = imgPosition.value\n const originPositopn = { ...topImgWrapperPosition.value }\n\n const aspectRatio = topImgWrapperPosition.value.width / topImgWrapperPosition.value.height\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n let moveX = (currentPageX - startPageX) / canvasScale.value / props.width * 100\n let moveY = (currentPageY - startPageY) / canvasScale.value / props.height * 100\n\n if (props.rotate > 45 && props.rotate < 135) {\n moveX = (currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = -(currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n if ((props.rotate >= 135 && props.rotate <= 180) || (props.rotate >= -180 && props.rotate <= -135)) {\n moveX = -moveX\n moveY = -moveY\n }\n if (props.rotate > -135 && props.rotate < -45) {\n moveX = -(currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = (currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n\n if (ctrlOrShiftKeyActive.value) {\n if (type === OperateResizeHandlers.RIGHT_BOTTOM || type === OperateResizeHandlers.LEFT_TOP) moveY = moveX / aspectRatio\n if (type === OperateResizeHandlers.LEFT_BOTTOM || type === OperateResizeHandlers.RIGHT_TOP) moveY = -moveX / aspectRatio\n }\n\n let targetLeft, targetTop, targetWidth, targetHeight\n\n if (type === OperateResizeHandlers.LEFT_TOP) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.RIGHT_TOP) {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width + moveX\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.LEFT_BOTTOM) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.RIGHT_BOTTOM) {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width + moveX\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.TOP) {\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.BOTTOM) {\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.LEFT) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top\n }\n else {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n targetHeight = originPositopn.height\n targetWidth = originPositopn.width + moveX\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n\n topImgWrapperPosition.value = {\n left: targetLeft,\n top: targetTop,\n width: targetWidth,\n height: targetHeight,\n }\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n updateRange()\n\n setTimeout(() => isSettingClipRange.value = false, 0)\n }\n}\n\nconst rotateClassName = computed(() => {\n const prefix = 'rotate-'\n const rotate = props.rotate\n if (rotate > -22.5 && rotate <= 22.5) return prefix + 0\n else if (rotate > 22.5 && rotate <= 67.5) return prefix + 45\n else if (rotate > 67.5 && rotate <= 112.5) return prefix + 90\n else if (rotate > 112.5 && rotate <= 157.5) return prefix + 135\n else if (rotate > 157.5 || rotate <= -157.5) return prefix + 0\n else if (rotate > -157.5 && rotate <= -112.5) return prefix + 45\n else if (rotate > -112.5 && rotate <= -67.5) return prefix + 90\n else if (rotate > -67.5 && rotate <= -22.5) return prefix + 135\n return prefix + 0\n})\n\nconst cornerPoint = [\n OperateResizeHandlers.LEFT_TOP,\n OperateResizeHandlers.RIGHT_TOP,\n OperateResizeHandlers.LEFT_BOTTOM,\n OperateResizeHandlers.RIGHT_BOTTOM,\n]\nconst edgePoints = [\n OperateResizeHandlers.TOP,\n OperateResizeHandlers.BOTTOM,\n OperateResizeHandlers.LEFT,\n OperateResizeHandlers.RIGHT,\n]\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_click_outside = _resolveDirective(\"click-outside\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"image-clip-handler\",\n style: _normalizeStyle(clipWrapperPositionStyle.value)\n }, [\n _createElementVNode(\"img\", {\n class: \"bottom-img\",\n src: _ctx.src,\n draggable: false,\n alt: \"\",\n style: _normalizeStyle(bottomImgPositionStyle.value)\n }, null, 12, _hoisted_1),\n _createElementVNode(\"div\", {\n class: \"top-image-content\",\n style: _normalizeStyle({\n ...topImgWrapperPositionStyle.value,\n clipPath: _ctx.clipPath,\n })\n }, [\n _createElementVNode(\"img\", {\n class: \"top-img\",\n src: _ctx.src,\n draggable: false,\n alt: \"\",\n style: _normalizeStyle(topImgPositionStyle.value)\n }, null, 12, _hoisted_2)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"operate\",\n style: _normalizeStyle(topImgWrapperPositionStyle.value),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => moveClipRange($event), [\"stop\"]))\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(cornerPoint, (point) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['clip-point', point, rotateClassName.value]),\n key: point,\n onMousedown: _withModifiers($event => scaleClipRange($event, point), [\"stop\"])\n }, _hoisted_5, 42, _hoisted_3)\n }), 64)),\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(edgePoints, (point) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['clip-point', point, rotateClassName.value]),\n key: point,\n onMousedown: _withModifiers($event => scaleClipRange($event, point), [\"stop\"])\n }, _hoisted_8, 42, _hoisted_6)\n }), 64))\n ], 36)\n ], 4)), [\n [_directive_click_outside, handleClip]\n ])\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageClipHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageClipHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageClipHandler.vue?vue&type=style&index=0&id=5984406b&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5984406b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1156b3e1\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { ImageElementClip, PPTImageElement } from '@/types/slides'\nimport type { ImageClipedEmitData } from '@/types/edit'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport useClipImage from './useClipImage'\nimport useFilter from './useFilter'\n\nimport ImageOutline from './ImageOutline/index.vue'\nimport ImageClipHandler from './ImageClipHandler.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { clipingImageElementId } = storeToRefs(mainStore)\n\nconst isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape, imgPosition } = useClipImage(clip)\n\nconst filters = computed(() => props.elementInfo.filters)\nconst { filter } = useFilter(filters)\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n props.selectElement(e, props.elementInfo)\n}\n\nconst handleClip = (data: ImageClipedEmitData | null) => {\n mainStore.setClipingImageElementId('')\n \n if (!data) return\n\n const { range, position } = data\n const originClip: ImageElementClip = props.elementInfo.clip || { shape: 'rect', range: [[0, 0], [100, 100]] }\n\n const left = props.elementInfo.left + position.left\n const top = props.elementInfo.top + position.top\n const width = props.elementInfo.width + position.width\n const height = props.elementInfo.height + position.height\n\n let centerOffsetX = 0\n let centerOffsetY = 0\n\n if (props.elementInfo.rotate) {\n const centerX = (left + width / 2) - (props.elementInfo.left + props.elementInfo.width / 2)\n const centerY = -((top + height / 2) - (props.elementInfo.top + props.elementInfo.height / 2))\n\n const radian = -props.elementInfo.rotate * Math.PI / 180\n\n const rotatedCenterX = centerX * Math.cos(radian) - centerY * Math.sin(radian)\n const rotatedCenterY = centerX * Math.sin(radian) + centerY * Math.cos(radian)\n\n centerOffsetX = rotatedCenterX - centerX\n centerOffsetY = -(rotatedCenterY - centerY)\n }\n\n const _props = {\n clip: { ...originClip, range },\n left: left + centerOffsetX,\n top: top + centerOffsetY,\n width,\n height,\n }\n slidesStore.updateElement({ id: props.elementInfo.id, props: _props })\n \n addHistorySnapshot()\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-image\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n (isCliping.value)\n ? (_openBlock(), _createBlock(ImageClipHandler, {\n key: 0,\n src: _ctx.elementInfo.src,\n clipData: _ctx.elementInfo.clip,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n top: _ctx.elementInfo.top,\n left: _ctx.elementInfo.left,\n rotate: _ctx.elementInfo.rotate,\n clipPath: _unref(clipShape).style,\n onClip: _cache[0] || (_cache[0] = range => handleClip(range))\n }, null, 8, [\"src\", \"clipData\", \"width\", \"height\", \"top\", \"left\", \"rotate\", \"clipPath\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"element-content\",\n style: _normalizeStyle({\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n }),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event))\n }, [\n _createVNode(ImageOutline, { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]),\n _createElementVNode(\"div\", {\n class: \"image-content\",\n style: _normalizeStyle({ clipPath: _unref(clipShape).style })\n }, [\n _createElementVNode(\"img\", {\n src: _ctx.elementInfo.src,\n draggable: false,\n style: _normalizeStyle({\n top: _unref(imgPosition).top,\n left: _unref(imgPosition).left,\n width: _unref(imgPosition).width,\n height: _unref(imgPosition).height,\n filter: _unref(filter),\n }),\n onDragstart: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"prevent\"])),\n alt: \"\"\n }, null, 44, _hoisted_1),\n (_ctx.elementInfo.colorMask)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"color-mask\",\n style: _normalizeStyle({\n backgroundColor: _ctx.elementInfo.colorMask,\n })\n }, null, 4))\n : _createCommentVNode(\"\", true)\n ], 4)\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1156b3e1&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1156b3e1\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-efb76626\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\n\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementOutline',\n props: {\n width: {},\n height: {},\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"element-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n d: `M0,0 L${_ctx.width},0 L${_ctx.width},${_ctx.height} L0,${_ctx.height} Z`,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementOutline.vue?vue&type=style&index=0&id=efb76626&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-efb76626\"]])\n\nexport default __exports__","import { splitListItem, liftListItem, sinkListItem } from 'prosemirror-schema-list'\nimport type { Schema } from 'prosemirror-model'\nimport { undo, redo } from 'prosemirror-history'\nimport { undoInputRule } from 'prosemirror-inputrules'\nimport type { Command } from 'prosemirror-state'\nimport {\n toggleMark,\n selectParentNode,\n joinUp,\n joinDown,\n chainCommands,\n newlineInCode,\n createParagraphNear,\n liftEmptyBlock,\n splitBlockKeepMarks,\n} from 'prosemirror-commands'\n\ninterface Keys {\n [key: string]: Command\n}\n\nexport const buildKeymap = (schema: Schema) => {\n const keys: Keys = {}\n const bind = (key: string, cmd: Command) => keys[key] = cmd\n\n bind('Alt-ArrowUp', joinUp)\n bind('Alt-ArrowDown', joinDown)\n bind('Mod-z', undo)\n bind('Mod-y', redo)\n bind('Backspace', undoInputRule)\n bind('Escape', selectParentNode)\n bind('Mod-b', toggleMark(schema.marks.strong))\n bind('Mod-i', toggleMark(schema.marks.em))\n bind('Mod-u', toggleMark(schema.marks.underline))\n bind('Mod-d', toggleMark(schema.marks.strikethrough))\n bind('Mod-e', toggleMark(schema.marks.code))\n bind('Mod-;', toggleMark(schema.marks.superscript))\n bind(`Mod-'`, toggleMark(schema.marks.subscript))\n bind('Enter', chainCommands(\n splitListItem(schema.nodes.list_item),\n newlineInCode,\n createParagraphNear,\n liftEmptyBlock,\n splitBlockKeepMarks,\n ))\n bind('Mod-[', liftListItem(schema.nodes.list_item))\n bind('Mod-]', sinkListItem(schema.nodes.list_item))\n bind('Tab', sinkListItem(schema.nodes.list_item))\n\n return keys\n}","import type { NodeType, Schema } from 'prosemirror-model'\nimport {\n inputRules,\n wrappingInputRule,\n smartQuotes,\n emDash,\n ellipsis,\n InputRule,\n} from 'prosemirror-inputrules'\n\nconst blockQuoteRule = (nodeType: NodeType) => wrappingInputRule(/^\\s*>\\s$/, nodeType)\n\nconst orderedListRule = (nodeType: NodeType) => (\n wrappingInputRule(\n /^(\\d+)\\.\\s$/, \n nodeType, \n match => ({order: +match[1]}),\n (match, node) => node.childCount + node.attrs.order === +match[1],\n )\n)\n\nconst bulletListRule = (nodeType: NodeType) => wrappingInputRule(/^\\s*([-+*])\\s$/, nodeType)\n\nconst codeRule = () => {\n const inputRegex = /(?:^|\\s)((?:`)((?:[^`]+))(?:`))$/\n \n return new InputRule(inputRegex, (state, match, start, end) => {\n const { schema } = state\n\n const tr = state.tr.insertText(`${match[2]} `, start, end)\n const mark = schema.marks.code.create()\n\n return tr.addMark(start, start + match[2].length, mark)\n })\n}\n\nconst linkRule = () => {\n const urlRegEx = /(?:https?:\\/\\/)?[\\w-]+(?:\\.[\\w-]+)+\\.?(?:\\d+)?(?:\\/\\S*)?$/\n \n return new InputRule(urlRegEx, (state, match, start, end) => {\n const { schema } = state\n\n const tr = state.tr.insertText(match[0], start, end)\n const mark = schema.marks.link.create({ href: match[0], title: match[0] })\n\n return tr.addMark(start, start + match[0].length, mark)\n })\n}\n\nexport const buildInputRules = (schema: Schema) => {\n const rules = [\n ...smartQuotes,\n ellipsis,\n emDash,\n ]\n rules.push(blockQuoteRule(schema.nodes.blockquote))\n rules.push(orderedListRule(schema.nodes.ordered_list))\n rules.push(bulletListRule(schema.nodes.bullet_list))\n rules.push(codeRule())\n rules.push(linkRule())\n\n return inputRules({ rules })\n}","import { keymap } from 'prosemirror-keymap'\nimport type { Schema } from 'prosemirror-model'\nimport { history } from 'prosemirror-history'\nimport { baseKeymap } from 'prosemirror-commands'\nimport { dropCursor } from 'prosemirror-dropcursor'\nimport { gapCursor } from 'prosemirror-gapcursor'\n\nimport { buildKeymap } from './keymap'\nimport { buildInputRules } from './inputrules'\n\nexport const buildPlugins = (schema: Schema) => {\n return [\n buildInputRules(schema),\n keymap(buildKeymap(schema)),\n keymap(baseKeymap),\n dropCursor(),\n gapCursor(),\n history(),\n ]\n}","import { nodes } from 'prosemirror-schema-basic'\nimport type { Node, NodeSpec } from 'prosemirror-model'\nimport { listItem as _listItem } from 'prosemirror-schema-list'\n\ninterface Attr {\n [key: string]: number | string\n}\n\nconst orderedList: NodeSpec = {\n attrs: {\n order: {\n default: 1,\n },\n listStyleType: {\n default: '',\n },\n },\n content: 'list_item+',\n group: 'block',\n parseDOM: [\n { \n tag: 'ol', \n getAttrs: dom => {\n const order = ((dom as HTMLElement).hasAttribute('start') ? (dom as HTMLElement).getAttribute('start') : 1) || 1\n const attr: Attr = { order: +order }\n\n const { listStyleType } = (dom as HTMLElement).style\n if (listStyleType) attr['listStyleType'] = listStyleType\n\n return attr\n }\n }\n ],\n toDOM: (node: Node) => {\n const { order, listStyleType } = node.attrs\n let style = ''\n if (listStyleType) style += `list-style-type: ${listStyleType};`\n\n const attr: Attr = { style }\n if (order !== 1) attr['start'] = order\n\n\n return ['ol', attr, 0]\n },\n}\n\nconst bulletList: NodeSpec = {\n attrs: {\n listStyleType: {\n default: '',\n },\n },\n content: 'list_item+',\n group: 'block',\n parseDOM: [\n {\n tag: 'ul',\n getAttrs: dom => {\n const { listStyleType } = (dom as HTMLElement).style\n return listStyleType ? { listStyleType } : {}\n }\n }\n ],\n toDOM: (node: Node) => {\n const { listStyleType } = node.attrs\n let style = ''\n if (listStyleType) style += `list-style-type: ${listStyleType};`\n\n return ['ul', { style }, 0]\n },\n}\n\nconst listItem: NodeSpec = {\n ..._listItem,\n content: 'paragraph block*',\n group: 'block',\n}\n\nconst paragraph: NodeSpec = {\n attrs: {\n align: {\n default: '',\n },\n indent: {\n default: 0,\n },\n textIndent: {\n default: 0,\n },\n },\n content: 'inline*',\n group: 'block',\n parseDOM: [\n {\n tag: 'p',\n getAttrs: dom => {\n const { textAlign, textIndent } = (dom as HTMLElement).style\n\n let align = (dom as HTMLElement).getAttribute('align') || textAlign || ''\n align = /(left|right|center|justify)/.test(align) ? align : ''\n\n let textIndentLevel = 0\n if (textIndent) {\n if (/em/.test(textIndent)) {\n textIndentLevel = parseInt(textIndent)\n }\n else if (/px/.test(textIndent)) {\n textIndentLevel = Math.floor(parseInt(textIndent) / 20)\n if (!textIndentLevel) textIndentLevel = 1\n }\n }\n\n const indent = +((dom as HTMLElement).getAttribute('data-indent') || 0)\n \n return { align, indent, textIndent: textIndentLevel }\n }\n },\n {\n tag: 'img',\n ignore: true,\n },\n {\n tag: 'pre',\n skip: true,\n },\n ],\n toDOM: (node: Node) => {\n const { align, indent, textIndent } = node.attrs\n let style = ''\n if (align && align !== 'left') style += `text-align: ${align};`\n if (textIndent) style += `text-indent: ${textIndent * 20}px;`\n\n const attr: Attr = { style }\n if (indent) attr['data-indent'] = indent\n\n return ['p', attr, 0]\n },\n}\n\nconst {\n doc,\n blockquote,\n text,\n} = nodes\n\nexport default {\n doc,\n paragraph,\n blockquote,\n text,\n 'ordered_list': orderedList,\n 'bullet_list': bulletList,\n 'list_item': listItem,\n}\n","import { marks } from 'prosemirror-schema-basic'\nimport type { MarkSpec } from 'prosemirror-model'\n\nconst subscript: MarkSpec = {\n excludes: 'subscript',\n parseDOM: [\n { tag: 'sub' },\n {\n style: 'vertical-align',\n getAttrs: value => value === 'sub' && null\n },\n ],\n toDOM: () => ['sub', 0],\n}\n\nconst superscript: MarkSpec = {\n excludes: 'superscript',\n parseDOM: [\n { tag: 'sup' },\n {\n style: 'vertical-align',\n getAttrs: value => value === 'super' && null\n },\n ],\n toDOM: () => ['sup', 0],\n}\n\nconst strikethrough: MarkSpec = {\n parseDOM: [\n { tag: 'strike' },\n {\n style: 'text-decoration',\n getAttrs: value => value === 'line-through' && null\n },\n {\n style: 'text-decoration-line',\n getAttrs: value => value === 'line-through' && null\n },\n ],\n toDOM: () => ['span', { style: 'text-decoration-line: line-through;' }, 0],\n}\n\nconst underline: MarkSpec = {\n parseDOM: [\n { tag: 'u' },\n {\n style: 'text-decoration',\n getAttrs: value => value === 'underline' && null\n },\n {\n style: 'text-decoration-line',\n getAttrs: value => value === 'underline' && null\n },\n ],\n toDOM: () => ['span', { style: 'text-decoration: underline;' }, 0],\n}\n\nconst forecolor: MarkSpec = {\n attrs: {\n color: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'color',\n getAttrs: color => color ? { color } : {}\n },\n ],\n toDOM: mark => {\n const { color } = mark.attrs\n let style = ''\n if (color) style += `color: ${color};`\n return ['span', { style }, 0]\n },\n}\n\nconst backcolor: MarkSpec = {\n attrs: {\n backcolor: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'background-color',\n getAttrs: backcolor => backcolor ? { backcolor } : {}\n },\n ],\n toDOM: mark => {\n const { backcolor } = mark.attrs\n let style = ''\n if (backcolor) style += `background-color: ${backcolor};`\n return ['span', { style }, 0]\n },\n}\n\nconst fontsize: MarkSpec = {\n attrs: {\n fontsize: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'font-size',\n getAttrs: fontsize => fontsize ? { fontsize } : {}\n },\n ],\n toDOM: mark => {\n const { fontsize } = mark.attrs\n let style = ''\n if (fontsize) style += `font-size: ${fontsize};`\n return ['span', { style }, 0]\n },\n}\n\nconst fontname: MarkSpec = {\n attrs: {\n fontname: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'font-family',\n getAttrs: fontname => {\n return { fontname: fontname && typeof fontname === 'string' ? fontname.replace(/[\\\"\\']/g, '') : '' }\n }\n },\n ],\n toDOM: mark => {\n const { fontname } = mark.attrs\n let style = ''\n if (fontname) style += `font-family: ${fontname};`\n return ['span', { style }, 0]\n },\n}\n\nconst link: MarkSpec = {\n attrs: {\n href: {},\n title: { default: null },\n target: { default: '_blank' },\n },\n inclusive: false,\n parseDOM: [\n {\n tag: 'a[href]',\n getAttrs: dom => {\n const href = (dom as HTMLElement).getAttribute('href')\n const title = (dom as HTMLElement).getAttribute('title')\n return { href, title }\n }\n },\n ],\n toDOM: node => ['a', node.attrs, 0],\n}\n\nconst mark: MarkSpec = {\n attrs: {\n index: { default: null },\n },\n parseDOM: [\n {\n tag: 'mark',\n getAttrs: dom => {\n const index = (dom as HTMLElement).dataset.index\n return { index }\n }\n },\n ],\n toDOM: node => ['mark', { 'data-index': node.attrs.index }, 0],\n}\n\nconst { em, strong, code } = marks\n\nexport default {\n em,\n strong,\n fontsize,\n fontname,\n code,\n forecolor,\n backcolor,\n subscript,\n superscript,\n strikethrough,\n underline,\n link,\n mark,\n}","import nodes from './nodes'\nimport marks from './marks'\n\nexport const schemaNodes = nodes\nexport const schemaMarks = marks\n","import { EditorState } from 'prosemirror-state'\nimport { EditorView } from 'prosemirror-view'\nimport { Schema, DOMParser } from 'prosemirror-model'\n\nimport { buildPlugins } from './plugins/index'\nimport { schemaNodes, schemaMarks } from './schema/index'\n\nconst schema = new Schema({\n nodes: schemaNodes,\n marks: schemaMarks,\n})\n\nexport const createDocument = (content: string) => {\n const htmlString = `
${content}
`\n const parser = new window.DOMParser()\n const element = parser.parseFromString(htmlString, 'text/html').body.firstElementChild\n return DOMParser.fromSchema(schema).parse(element as Element)\n}\n\nexport const initProsemirrorEditor = (dom: Element, content: string, props = {}) => {\n return new EditorView(dom, {\n state: EditorState.create({\n doc: createDocument(content),\n plugins: buildPlugins(schema),\n }),\n ...props,\n })\n}","import mitt, { type Emitter } from 'mitt'\n\nexport const enum EmitterEvents {\n RICH_TEXT_COMMAND = 'RICH_TEXT_COMMAND',\n OPEN_CHART_DATA_EDITOR = 'OPEN_CHART_DATA_EDITOR',\n OPEN_LATEX_EDITOR = 'OPEN_LATEX_EDITOR',\n}\n\nexport interface RichTextAction {\n command: string\n value?: string\n}\n\nexport interface RichTextCommand {\n target?: string\n action: RichTextAction | RichTextAction[]\n}\n\ntype Events = {\n [EmitterEvents.RICH_TEXT_COMMAND]: RichTextCommand\n [EmitterEvents.OPEN_CHART_DATA_EDITOR]: void\n [EmitterEvents.OPEN_LATEX_EDITOR]: void\n} \n\nconst emitter: Emitter = mitt()\n\nexport default emitter","import type { Schema, Node, NodeType } from 'prosemirror-model'\nimport type { Transaction } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\n\nexport const setTextAlign = (tr: Transaction, schema: Schema, alignment: string) => {\n const { selection, doc } = tr\n if (!selection || !doc) return tr\n\n const { from, to } = selection\n const { nodes } = schema\n\n const blockquote = nodes.blockquote\n const listItem = nodes.list_item\n const paragraph = nodes.paragraph\n\n interface Task {\n node: Node\n pos: number\n nodeType: NodeType\n }\n\n const tasks: Task[] = []\n alignment = alignment || ''\n\n const allowedNodeTypes = new Set([blockquote, listItem, paragraph])\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type\n const align = node.attrs.align || ''\n if (align !== alignment && allowedNodeTypes.has(nodeType)) {\n tasks.push({\n node,\n pos,\n nodeType,\n })\n }\n return true\n })\n\n if (!tasks.length) return tr\n\n tasks.forEach(task => {\n const { node, pos, nodeType } = task\n let { attrs } = node\n if (alignment) attrs = { ...attrs, align: alignment }\n else attrs = { ...attrs, align: null }\n tr = tr.setNodeMarkup(pos, nodeType, attrs, node.marks)\n })\n\n return tr\n}\n\nexport const alignmentCommand = (view: EditorView, alignment: string) => {\n const { state } = view\n const { schema, selection } = state\n const tr = setTextAlign(\n state.tr.setSelection(selection),\n schema,\n alignment,\n )\n view.dispatch(tr)\n}","import { wrapInList, liftListItem } from 'prosemirror-schema-list'\nimport type { Schema, Node, NodeType } from 'prosemirror-model'\nimport type { Transaction, EditorState } from 'prosemirror-state'\nimport { findParentNode } from '../utils'\n\nexport const isList = (node: Node, schema: Schema) => {\n return (\n node.type === schema.nodes.bullet_list ||\n node.type === schema.nodes.ordered_list\n )\n}\n\nexport const toggleList = (listType: NodeType, itemType: NodeType, listStyleType?: string) => {\n return (state: EditorState, dispatch: (tr: Transaction) => void) => {\n const { schema, selection } = state\n const { $from, $to } = selection\n const range = $from.blockRange($to)\n\n if (!range) return false\n\n const parentList = findParentNode((node: Node) => isList(node, schema))(selection)\n\n if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {\n if (parentList.node.type === listType && !listStyleType) {\n return liftListItem(itemType)(state, dispatch)\n }\n\n if (isList(parentList.node, schema) && listType.validContent(parentList.node.content)) {\n const { tr } = state\n if (listStyleType) {\n const nodeAttrs = {\n ...parentList.node.attrs,\n listStyleType: listStyleType,\n }\n tr.setNodeMarkup(parentList.pos, listType, nodeAttrs)\n }\n else tr.setNodeMarkup(parentList.pos, listType)\n\n if (dispatch) dispatch(tr)\n\n return false\n }\n }\n\n if (listStyleType) return wrapInList(listType, { listStyleType })(state, dispatch)\n return wrapInList(listType)(state, dispatch)\n }\n}","import type { Schema } from 'prosemirror-model'\nimport { type Transaction, TextSelection, AllSelection } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\nimport { isList } from './toggleList'\n\ntype IndentKey = 'indent' | 'textIndent'\n\nfunction setNodeIndentMarkup(tr: Transaction, pos: number, delta: number, indentKey: IndentKey): Transaction {\n if (!tr.doc) return tr\n\n const node = tr.doc.nodeAt(pos)\n if (!node) return tr\n\n const minIndent = 0\n const maxIndent = 8\n\n let indent = (node.attrs[indentKey] || 0) + delta\n if (indent < minIndent) indent = minIndent\n if (indent > maxIndent) indent = maxIndent\n\n if (indent === node.attrs[indentKey]) return tr\n\n const nodeAttrs = {\n ...node.attrs,\n [indentKey]: indent,\n }\n\n return tr.setNodeMarkup(pos, node.type, nodeAttrs, node.marks)\n}\n\nconst setIndent = (tr: Transaction, schema: Schema, delta: number, indentKey: IndentKey): Transaction => {\n const { selection, doc } = tr\n if (!selection || !doc) return tr\n\n if (!(selection instanceof TextSelection || selection instanceof AllSelection)) return tr\n\n const { from, to } = selection\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type\n\n if (nodeType.name === 'paragraph' || nodeType.name === 'blockquote') {\n tr = setNodeIndentMarkup(tr, pos, delta, indentKey)\n return false\n } \n else if (isList(node, schema)) return false\n return true\n })\n\n return tr\n}\n\nexport const indentCommand = (view: EditorView, delta: number) => {\n const { state } = view\n const { schema, selection } = state\n\n const tr = setIndent(\n state.tr.setSelection(selection),\n schema,\n delta,\n 'indent',\n )\n if (tr.docChanged) {\n view.dispatch(tr)\n return true\n }\n\n return false\n}\n\nexport const textIndentCommand = (view: EditorView, delta: number) => {\n const { state } = view\n const { schema, selection } = state\n\n const tr = setIndent(\n state.tr.setSelection(selection),\n schema,\n delta,\n 'textIndent',\n )\n if (tr.docChanged) {\n view.dispatch(tr)\n return true\n }\n\n return false\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { debounce } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { EditorView } from 'prosemirror-view'\nimport { toggleMark, wrapIn, lift } from 'prosemirror-commands'\nimport { initProsemirrorEditor, createDocument } from '@/utils/prosemirror'\nimport { isActiveOfParentNodeType, findNodesWithSameMark, getTextAttrs, autoSelectAll, addMark, markActive, getFontsize } from '@/utils/prosemirror/utils'\nimport emitter, { EmitterEvents, type RichTextAction, type RichTextCommand } from '@/utils/emitter'\nimport { alignmentCommand } from '@/utils/prosemirror/commands/setTextAlign'\nimport { indentCommand, textIndentCommand } from '@/utils/prosemirror/commands/setTextIndent'\nimport { toggleList } from '@/utils/prosemirror/commands/toggleList'\nimport type { TextFormatPainterKeys } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ProsemirrorEditor',\n props: {\n elementId: {},\n defaultColor: {},\n defaultFontName: {},\n value: {},\n editable: { type: Boolean, default: false },\n autoFocus: { type: Boolean, default: false }\n },\n emits: [\"update\", \"focus\", \"blur\", \"mousedown\"],\n setup(__props: any, { expose: __expose, emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst mainStore = useMainStore()\nconst { handleElementId, textFormatPainter } = storeToRefs(mainStore)\n\nconst editorViewRef = ref()\nlet editorView: EditorView\n\n// 富文本的各种交互事件监听:\n// 聚焦时取消全局快捷键事件\n// 输入文字时同步数据到vuex\n// 点击鼠标和键盘时同步富文本状态到工具栏\nconst handleInput = debounce(function() {\n emit('update', editorView.dom.innerHTML)\n}, 300, { trailing: true })\n\nconst handleFocus = () => {\n mainStore.setDisableHotkeysState(true)\n emit('focus')\n}\n\nconst handleBlur = () => {\n mainStore.setDisableHotkeysState(false)\n emit('blur')\n}\n\nconst handleClick = debounce(function() {\n const attrs = getTextAttrs(editorView, {\n color: props.defaultColor,\n fontname: props.defaultFontName,\n })\n mainStore.setRichtextAttrs(attrs)\n}, 30, { trailing: true })\n\nconst handleKeydown = () => {\n handleInput()\n handleClick()\n}\n\n// 将富文本内容同步到DOM\nconst textContent = computed(() => props.value)\nwatch(textContent, () => {\n if (!editorView) return\n if (editorView.hasFocus()) return\n\n const { doc, tr } = editorView.state\n editorView.dispatch(tr.replaceRangeWith(0, doc.content.size, createDocument(textContent.value)))\n})\n\n// 打开/关闭编辑器的编辑模式\nwatch(() => props.editable, () => {\n editorView.setProps({ editable: () => props.editable })\n})\n\n// 暴露 focus 方法\nconst focus = () => editorView.focus()\n__expose({ focus })\n\n// 执行富文本命令(可以是一个或多个)\n// 部分命令在执行前先判断当前选区是否为空,如果选区为空先进行全选操作\nconst execCommand = ({ target, action }: RichTextCommand) => {\n if (!target && handleElementId.value !== props.elementId) return\n if (target && target !== props.elementId) return\n\n const actions = ('command' in action) ? [action] : action\n\n for (const item of actions) {\n if (item.command === 'fontname' && item.value) {\n const mark = editorView.state.schema.marks.fontname.create({ fontname: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'fontsize' && item.value) {\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'fontsize-add') {\n const step = item.value ? +item.value : 2\n autoSelectAll(editorView)\n const fontsize = getFontsize(editorView) + step + 'px'\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize })\n addMark(editorView, mark)\n }\n else if (item.command === 'fontsize-reduce') {\n const step = item.value ? +item.value : 2\n autoSelectAll(editorView)\n let fontsize = getFontsize(editorView) - step\n if (fontsize < 12) fontsize = 12\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize: fontsize + 'px' })\n addMark(editorView, mark)\n }\n else if (item.command === 'color' && item.value) {\n const mark = editorView.state.schema.marks.forecolor.create({ color: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'backcolor' && item.value) {\n const mark = editorView.state.schema.marks.backcolor.create({ backcolor: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'bold') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.strong)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'em') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.em)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'underline') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.underline)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'strikethrough') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.strikethrough)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'subscript') {\n toggleMark(editorView.state.schema.marks.subscript)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'superscript') {\n toggleMark(editorView.state.schema.marks.superscript)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'blockquote') {\n const isBlockquote = isActiveOfParentNodeType('blockquote', editorView.state)\n if (isBlockquote) lift(editorView.state, editorView.dispatch)\n else wrapIn(editorView.state.schema.nodes.blockquote)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'code') {\n toggleMark(editorView.state.schema.marks.code)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'align' && item.value) {\n alignmentCommand(editorView, item.value)\n }\n else if (item.command === 'indent' && item.value) {\n indentCommand(editorView, +item.value)\n }\n else if (item.command === 'textIndent' && item.value) {\n textIndentCommand(editorView, +item.value)\n }\n else if (item.command === 'bulletList') {\n const listStyleType = item.value || ''\n const { bullet_list: bulletList, list_item: listItem } = editorView.state.schema.nodes\n toggleList(bulletList, listItem, listStyleType)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'orderedList') {\n const listStyleType = item.value || ''\n const { ordered_list: orderedList, list_item: listItem } = editorView.state.schema.nodes\n toggleList(orderedList, listItem, listStyleType)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'clear') {\n autoSelectAll(editorView)\n const { $from, $to } = editorView.state.selection\n editorView.dispatch(editorView.state.tr.removeMark($from.pos, $to.pos))\n }\n else if (item.command === 'link') {\n const markType = editorView.state.schema.marks.link\n const { from, to } = editorView.state.selection\n const result = findNodesWithSameMark(editorView.state.doc, from, to, markType)\n if (result) {\n if (item.value) {\n const mark = editorView.state.schema.marks.link.create({ href: item.value, title: item.value })\n addMark(editorView, mark, { from: result.from.pos, to: result.to.pos + 1 })\n }\n else editorView.dispatch(editorView.state.tr.removeMark(result.from.pos, result.to.pos + 1, markType))\n }\n else if (markActive(editorView.state, markType)) {\n if (item.value) {\n const mark = editorView.state.schema.marks.link.create({ href: item.value, title: item.value })\n addMark(editorView, mark)\n }\n else toggleMark(markType)(editorView.state, editorView.dispatch)\n }\n else if (item.value) {\n autoSelectAll(editorView)\n toggleMark(markType, { href: item.value, title: item.value })(editorView.state, editorView.dispatch)\n }\n }\n else if (item.command === 'insert' && item.value) {\n editorView.dispatch(editorView.state.tr.insertText(item.value))\n }\n }\n\n editorView.focus()\n handleInput()\n handleClick()\n}\n\n// 鼠标抬起时,执行格式刷命令\nconst handleMouseup = () => {\n if (!textFormatPainter.value) return\n const { keep, ...newProps } = textFormatPainter.value\n\n const actions: RichTextAction[] = [{ command: 'clear' }]\n for (const key of Object.keys(newProps) as TextFormatPainterKeys[]) {\n const command = key\n const value = textFormatPainter.value[key]\n if (value === true) actions.push({ command })\n else if (value) actions.push({ command, value })\n }\n execCommand({ action: actions })\n if (!keep) mainStore.setTextFormatPainter(null)\n}\n\n// Prosemirror编辑器的初始化和卸载\nonMounted(() => {\n editorView = initProsemirrorEditor((editorViewRef.value as Element), textContent.value, {\n handleDOMEvents: {\n focus: handleFocus,\n blur: handleBlur,\n keydown: handleKeydown,\n click: handleClick,\n mouseup: handleMouseup,\n },\n editable: () => props.editable,\n })\n if (props.autoFocus) editorView.focus()\n})\nonUnmounted(() => {\n editorView && editorView.destroy()\n})\n\nemitter.on(EmitterEvents.RICH_TEXT_COMMAND, execCommand)\nonUnmounted(() => {\n emitter.off(EmitterEvents.RICH_TEXT_COMMAND, execCommand)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"prosemirror-editor\", { 'format-painter': _unref(textFormatPainter) }]),\n ref_key: \"editorViewRef\",\n ref: editorViewRef,\n onMousedown: _cache[0] || (_cache[0] = $event => emit('mousedown', $event))\n }, null, 34))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ProsemirrorEditor.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ProsemirrorEditor.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ProsemirrorEditor.vue?vue&type=style&index=0&id=3608adca&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3608adca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2a1e49ba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"drag-handler top\" }, null, -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"drag-handler bottom\" }, null, -1))\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { debounce } from 'lodash'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTextElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\nimport ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElementId, isScaling } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst elementRef = ref()\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\n// 监听文本元素的尺寸变化,当高度变化时,更新高度到vuex\n// 如果高度变化时正处在缩放操作中,则等待缩放操作结束后再更新\nconst realHeightCache = ref(-1)\nconst realWidthCache = ref(-1)\n\nwatch(isScaling, () => {\n if (handleElementId.value !== props.elementInfo.id) return\n\n if (!isScaling.value) {\n if (!props.elementInfo.vertical && realHeightCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeightCache.value },\n })\n realHeightCache.value = -1\n }\n if (props.elementInfo.vertical && realWidthCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { width: realWidthCache.value },\n })\n realWidthCache.value = -1\n }\n }\n})\n\nconst updateTextElementHeight = (entries: ResizeObserverEntry[]) => {\n const contentRect = entries[0].contentRect\n if (!elementRef.value) return\n\n const realHeight = contentRect.height + 20\n const realWidth = contentRect.width + 20\n\n if (!props.elementInfo.vertical && props.elementInfo.height !== realHeight) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeight },\n })\n }\n else realHeightCache.value = realHeight\n }\n if (props.elementInfo.vertical && props.elementInfo.width !== realWidth) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { width: realWidth },\n })\n }\n else realWidthCache.value = realWidth\n }\n}\nconst resizeObserver = new ResizeObserver(updateTextElementHeight)\n\nonMounted(() => {\n if (elementRef.value) resizeObserver.observe(elementRef.value)\n})\nonUnmounted(() => {\n if (elementRef.value) resizeObserver.unobserve(elementRef.value)\n})\n\nconst updateContent = (content: string) => {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { content },\n })\n \n addHistorySnapshot()\n}\n\nconst checkEmptyText = debounce(function() {\n const pureText = props.elementInfo.content.replaceAll(/<[^>]+>/g, '')\n if (!pureText) slidesStore.deleteElement(props.elementInfo.id)\n}, 300, { trailing: true })\n\nconst isHandleElement = computed(() => handleElementId.value === props.elementInfo.id)\nwatch(isHandleElement, () => {\n if (!isHandleElement.value) checkEmptyText()\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-text\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n ref_key: \"elementRef\",\n ref: elementRef,\n style: _normalizeStyle({\n width: _ctx.elementInfo.vertical ? 'auto' : _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.vertical ? _ctx.elementInfo.height + 'px' : 'auto',\n backgroundColor: _ctx.elementInfo.fill,\n opacity: _ctx.elementInfo.opacity,\n textShadow: _unref(shadowStyle),\n lineHeight: _ctx.elementInfo.lineHeight,\n letterSpacing: (_ctx.elementInfo.wordSpace || 0) + 'px',\n color: _ctx.elementInfo.defaultColor,\n fontFamily: _ctx.elementInfo.defaultFontName,\n writingMode: _ctx.elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',\n }),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event))\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(ProsemirrorEditor, {\n class: \"text\",\n elementId: _ctx.elementInfo.id,\n defaultColor: _ctx.elementInfo.defaultColor,\n defaultFontName: _ctx.elementInfo.defaultFontName,\n editable: !_ctx.elementInfo.lock,\n value: _ctx.elementInfo.content,\n style: _normalizeStyle({\n '--paragraphSpace': `${_ctx.elementInfo.paragraphSpace === undefined ? 5 : _ctx.elementInfo.paragraphSpace}px`,\n }),\n onUpdate: _cache[0] || (_cache[0] = value => updateContent(value)),\n onMousedown: _cache[1] || (_cache[1] = $event => handleSelectElement($event, false))\n }, null, 8, [\"elementId\", \"defaultColor\", \"defaultFontName\", \"editable\", \"value\", \"style\"]),\n _hoisted_1,\n _hoisted_2\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=2a1e49ba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2a1e49ba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"gradientTransform\"]\nconst _hoisted_2 = [\"stop-color\"]\nconst _hoisted_3 = [\"stop-color\"]\nconst _hoisted_4 = [\"id\"]\nconst _hoisted_5 = [\"stop-color\"]\nconst _hoisted_6 = [\"stop-color\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'GradientDefs',\n props: {\n id: {},\n type: {},\n color1: {},\n color2: {},\n rotate: { default: 0 }\n },\n setup(__props: any) {\n\r\n\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.type === 'linear')\n ? (_openBlock(), _createElementBlock(\"linearGradient\", {\n key: 0,\n id: _ctx.id,\n x1: \"0%\",\n y1: \"0%\",\n x2: \"100%\",\n y2: \"0%\",\n gradientTransform: `rotate(${_ctx.rotate},0.5,0.5)`\n }, [\n _createElementVNode(\"stop\", {\n offset: \"0%\",\n \"stop-color\": _ctx.color1\n }, null, 8, _hoisted_2),\n _createElementVNode(\"stop\", {\n offset: \"100%\",\n \"stop-color\": _ctx.color2\n }, null, 8, _hoisted_3)\n ], 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"radialGradient\", {\n key: 1,\n id: _ctx.id\n }, [\n _createElementVNode(\"stop\", {\n offset: \"0%\",\n \"stop-color\": _ctx.color1\n }, null, 8, _hoisted_5),\n _createElementVNode(\"stop\", {\n offset: \"100%\",\n \"stop-color\": _ctx.color2\n }, null, 8, _hoisted_6)\n ], 8, _hoisted_4))\n}\n}\n\n})","import script from \"./GradientDefs.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GradientDefs.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-50bec549\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\", \"fill\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTShapeElement, ShapeText } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport GradientDefs from './GradientDefs.vue'\nimport ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElementId, shapeFormatPainter } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\nconst execFormatPainter = () => {\n if (!shapeFormatPainter.value) return\n const { keep, ...newProps } = shapeFormatPainter.value\n\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: newProps,\n })\n \n addHistorySnapshot()\n if (!keep) mainStore.setShapeFormatPainter(null)\n}\n\nconst outline = computed(() => props.elementInfo.outline)\nconst { outlineWidth, outlineColor, strokeDashArray } = useElementOutline(outline)\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst editable = ref(false)\n\nwatch(handleElementId, () => {\n if (handleElementId.value !== props.elementInfo.id) {\n if (editable.value) editable.value = false\n }\n})\n\nconst text = computed(() => {\n const defaultText: ShapeText = {\n content: '',\n defaultFontName: '微软雅黑',\n defaultColor: '#000',\n align: 'middle',\n }\n if (!props.elementInfo.text) return defaultText\n\n return props.elementInfo.text\n})\n\nconst updateText = (content: string) => {\n const _text = { ...text.value, content }\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { text: _text },\n })\n \n addHistorySnapshot()\n}\n\nconst checkEmptyText = () => {\n if (!props.elementInfo.text) return\n\n const pureText = props.elementInfo.text.content.replaceAll(/<[^>]+>/g, '')\n if (!pureText) {\n slidesStore.removeElementProps({ id: props.elementInfo.id, propName: 'text' })\n addHistorySnapshot()\n }\n}\n\nconst prosemirrorEditorRef = ref()\nconst startEdit = () => {\n editable.value = true\n nextTick(() => prosemirrorEditorRef.value && prosemirrorEditorRef.value.focus())\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-shape\", {\n 'lock': _ctx.elementInfo.lock,\n 'format-painter': _unref(shapeFormatPainter),\n }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n opacity: _ctx.elementInfo.opacity,\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n color: text.value.defaultColor,\n fontFamily: text.value.defaultFontName,\n }),\n onMousedown: _cache[3] || (_cache[3] = $event => handleSelectElement($event)),\n onMouseup: _cache[4] || (_cache[4] = ($event: any) => (execFormatPainter())),\n onTouchstart: _cache[5] || (_cache[5] = $event => handleSelectElement($event)),\n onDblclick: _cache[6] || (_cache[6] = ($event: any) => (startEdit()))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height\n }, [\n (_ctx.elementInfo.gradient)\n ? (_openBlock(), _createElementBlock(\"defs\", _hoisted_2, [\n _createVNode(GradientDefs, {\n id: `editabel-gradient-${_ctx.elementInfo.id}`,\n type: _ctx.elementInfo.gradient.type,\n color1: _ctx.elementInfo.gradient.color[0],\n color2: _ctx.elementInfo.gradient.color[1],\n rotate: _ctx.elementInfo.gradient.rotate\n }, null, 8, [\"id\", \"type\", \"color1\", \"color2\", \"rotate\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n class: \"shape-path\",\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n d: _ctx.elementInfo.path,\n fill: _ctx.elementInfo.gradient ? `url(#editabel-gradient-${_ctx.elementInfo.id})` : _ctx.elementInfo.fill,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_1)),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"shape-text\", [text.value.align, { 'editable': editable.value || text.value.content }]])\n }, [\n (editable.value || text.value.content)\n ? (_openBlock(), _createBlock(ProsemirrorEditor, {\n key: 0,\n ref_key: \"prosemirrorEditorRef\",\n ref: prosemirrorEditorRef,\n elementId: _ctx.elementInfo.id,\n defaultColor: text.value.defaultColor,\n defaultFontName: text.value.defaultFontName,\n editable: !_ctx.elementInfo.lock,\n value: text.value.content,\n onUpdate: _cache[0] || (_cache[0] = value => updateText(value)),\n onBlur: _cache[1] || (_cache[1] = ($event: any) => (checkEmptyText())),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event, false))\n }, null, 8, [\"elementId\", \"defaultColor\", \"defaultFontName\", \"editable\", \"value\"]))\n : _createCommentVNode(\"\", true)\n ], 2)\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=50bec549&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-50bec549\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"markerWidth\", \"markerHeight\", \"refX\", \"refY\"]\nconst _hoisted_2 = [\"d\", \"fill\", \"transform\"]\n\nimport { computed } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinePointMarker',\n props: {\n id: {},\n position: {},\n type: {},\n baseSize: {},\n color: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst pathMap = {\n dot: 'm0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z',\n arrow: 'M0,0 L10,5 0,10 Z',\n}\nconst rotateMap: { [key: string]: number } = {\n 'arrow-start': 180,\n 'arrow-end': 0,\n}\n\nconst path = computed(() => pathMap[props.type])\nconst rotate = computed(() => rotateMap[`${props.type}-${props.position}`] || 0)\nconst size = computed(() => props.baseSize < 2 ? 2 : props.baseSize)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"marker\", {\n id: `${_ctx.id}-${_ctx.type}-${_ctx.position}`,\n markerUnits: \"userSpaceOnUse\",\n orient: \"auto\",\n markerWidth: size.value * 3,\n markerHeight: size.value * 3,\n refX: size.value * 1.5,\n refY: size.value * 1.5\n }, [\n _createElementVNode(\"path\", {\n d: path.value,\n fill: _ctx.color,\n transform: `scale(${size.value * 0.3}, ${size.value * 0.3}) rotate(${rotate.value}, 5, 5)`\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n}\n}\n\n})","\n\n","import script from \"./LinePointMarker.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinePointMarker.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-16512454\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\nconst _hoisted_3 = [\"d\"]\n\nimport { computed } from 'vue'\nimport type { PPTLineElement } from '@/types/slides'\nimport { getLineElementPath } from '@/utils/element'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\nimport LinePointMarker from './LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst svgWidth = computed(() => {\n const width = Math.abs(props.elementInfo.start[0] - props.elementInfo.end[0])\n return width < 24 ? 24 : width\n})\nconst svgHeight = computed(() => {\n const height = Math.abs(props.elementInfo.start[1] - props.elementInfo.end[1])\n return height < 24 ? 24 : height\n})\n\nconst lineDashArray = computed(() => {\n if (props.elementInfo.style !== 'dashed') return '0 0'\n const size = props.elementInfo.width\n return size <= 8 ? `${size * 5} ${size * 2.5}` : `${size * 5} ${size * 1.5}`\n})\n\nconst path = computed(() => {\n return getLineElementPath(props.elementInfo)\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-shape\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '' }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: svgWidth.value,\n height: svgHeight.value\n }, [\n _createElementVNode(\"defs\", null, [\n (_ctx.elementInfo.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n id: _ctx.elementInfo.id,\n position: \"start\",\n type: _ctx.elementInfo.points[0],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n id: _ctx.elementInfo.id,\n position: \"end\",\n type: _ctx.elementInfo.points[1],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n class: \"line-point\",\n d: path.value,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.width,\n \"stroke-dasharray\": lineDashArray.value,\n fill: \"none\",\n \"marker-start\": _ctx.elementInfo.points[0] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[0]}-start)` : '',\n \"marker-end\": _ctx.elementInfo.points[1] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[1]}-end)` : ''\n }, null, 8, _hoisted_2),\n _withDirectives(_createElementVNode(\"path\", {\n class: \"line-path\",\n d: path.value,\n stroke: \"transparent\",\n \"stroke-width\": \"20\",\n fill: \"none\"\n }, null, 8, _hoisted_3), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 8, _hoisted_1))\n ], 36)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=16512454&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-16512454\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed, inject, onMounted, ref, watch } from 'vue'\nimport tinycolor from 'tinycolor2'\nimport { BarChart, LineChart, PieChart } from 'chartist'\nimport type { ChartData, ChartOptions, ChartType } from '@/types/slides'\nimport { injectKeySlideScale } from '@/types/injectKey'\n\nimport 'chartist/dist/index.css'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Chart',\n props: {\n width: {},\n height: {},\n type: {},\n data: {},\n themeColor: {},\n legends: {},\n options: {},\n gridColor: {},\n legend: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst chartRef = ref()\nconst slideScale = inject(injectKeySlideScale) || ref(1)\n\nlet chart: LineChart | BarChart | PieChart | undefined\n\nconst chartHeight = computed(() => {\n if (props.legend) return props.height - 20\n return props.height\n})\n\nconst getPieChartData = () => ({ ...props.data, series: props.data.series[0] })\n\nconst getOptions = () => {\n const propsOptopns = props.options || {}\n return {\n ...propsOptopns,\n width: props.width * slideScale.value,\n height: chartHeight.value * slideScale.value,\n }\n}\n\nconst renderChart = () => {\n if (!chartRef.value) return\n\n const options = getOptions()\n if (props.type === 'bar') chart = new BarChart(chartRef.value, props.data, options)\n if (props.type === 'line') chart = new LineChart(chartRef.value, props.data, options)\n if (props.type === 'pie') chart = new PieChart(chartRef.value, getPieChartData(), options)\n}\n\nconst updateChart = () => {\n if (!chart) {\n renderChart()\n return\n }\n const options = getOptions()\n const data = props.type === 'pie' ? getPieChartData() : props.data\n chart.update(data, options)\n}\n\nwatch([\n () => props.width,\n () => props.height,\n () => props.data,\n () => props.options,\n slideScale,\n], updateChart)\n\nonMounted(renderChart)\n\nconst themeColors = computed(() => {\n let colors: string[] = []\n if (props.themeColor.length >= 10) colors = props.themeColor\n else if (props.themeColor.length === 1) colors = tinycolor(props.themeColor[0]).analogous(10).map(color => color.toRgbString())\n else {\n const len = props.themeColor.length\n const supplement = tinycolor(props.themeColor[len - 1]).analogous(10 + 1 - len).map(color => color.toRgbString())\n colors = [...props.themeColor.slice(0, len - 1), ...supplement]\n }\n return colors\n})\n\n// 更新主题配色:\n// 如果当前所设置的主题色数小于10,剩余部分获取最后一个主题色的相近颜色作为配色\nconst updateTheme = () => {\n if (!chartRef.value) return\n\n for (let i = 0; i < 10; i++) {\n chartRef.value.style.setProperty(`--theme-color-${i + 1}`, themeColors.value[i])\n }\n}\n\nwatch(themeColors, updateTheme)\nonMounted(updateTheme)\n\n// 更新网格颜色,包括坐标的文字部分\nconst updateGridColor = () => {\n if (!chartRef.value) return\n if (props.gridColor) chartRef.value.style.setProperty(`--grid-color`, props.gridColor)\n}\n\nwatch(() => props.gridColor, updateGridColor)\nonMounted(updateGridColor)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"chart\",\n style: _normalizeStyle({ flexDirection: _ctx.legend === 'top' ? 'column-reverse' : 'column' })\n }, [\n _createElementVNode(\"div\", {\n class: \"chart-content\",\n ref_key: \"chartRef\",\n ref: chartRef,\n style: _normalizeStyle({\n width: _ctx.width + 'px',\n height: chartHeight.value + 'px',\n transform: `scale(${1 / _unref(slideScale)})`,\n })\n }, null, 4),\n (_ctx.legend)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"legends\",\n style: _normalizeStyle({ transform: `scale(${1 / _unref(slideScale)})` })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.legends, (legend, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"legend\",\n key: index,\n style: _normalizeStyle({ color: _ctx.gridColor })\n }, [\n _createElementVNode(\"div\", {\n class: \"block\",\n style: _normalizeStyle({ backgroundColor: themeColors.value[index] })\n }, null, 4),\n _createTextVNode(\" \" + _toDisplayString(legend), 1)\n ], 4))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./Chart.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Chart.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Chart.vue?vue&type=style&index=0&id=ae2a96a6&lang=scss&scoped=true\"\nimport \"./Chart.vue?vue&type=style&index=1&id=ae2a96a6&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ae2a96a6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport type { PPTChartElement } from '@/types/slides'\r\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\r\nimport emitter, { EmitterEvents } from '@/utils/emitter'\r\n\r\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\r\nimport Chart from './Chart.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n\r\n\r\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\r\n if (props.elementInfo.lock) return\r\n e.stopPropagation()\r\n\r\n props.selectElement(e, props.elementInfo)\r\n}\r\n\r\nconst openDataEditor = () => {\r\n emitter.emit(EmitterEvents.OPEN_CHART_DATA_EDITOR)\r\n}\r\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-chart\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top + 'px',\r\n left: _ctx.elementInfo.left + 'px',\r\n width: _ctx.elementInfo.width + 'px',\r\n height: _ctx.elementInfo.height + 'px',\r\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\r\n backgroundColor: _ctx.elementInfo.fill,\r\n }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onDblclick: _cache[2] || (_cache[2] = ($event: any) => (openDataEditor()))\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(Chart, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n type: _ctx.elementInfo.chartType,\n data: _ctx.elementInfo.data,\n options: _ctx.elementInfo.options,\n themeColor: _ctx.elementInfo.themeColor,\n gridColor: _ctx.elementInfo.gridColor,\n legends: _ctx.elementInfo.data.legends,\n legend: _ctx.elementInfo.legend || ''\n }, null, 8, [\"width\", \"height\", \"type\", \"data\", \"options\", \"themeColor\", \"gridColor\", \"legends\", \"legend\"])\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\r\n\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=6fc3de39&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6fc3de39\"]])\n\nexport default __exports__","import type { CSSProperties } from 'vue'\nimport type { TableCellStyle } from '@/types/slides'\n\n/**\n * 计算单元格文本样式\n * @param style 单元格文本样式原数据\n */\nexport const getTextStyle = (style?: TableCellStyle): CSSProperties => {\n if (!style) return {}\n const {\n bold,\n em,\n underline,\n strikethrough,\n color,\n backcolor,\n fontsize,\n fontname,\n align,\n } = style\n\n let textDecoration = `${underline ? 'underline' : ''} ${strikethrough ? 'line-through' : ''}`\n if (textDecoration === ' ') textDecoration = 'none'\n \n return {\n fontWeight: bold ? 'bold' : 'normal',\n fontStyle: em ? 'italic' : 'normal',\n textDecoration,\n color: color || '#000',\n backgroundColor: backcolor || '',\n fontSize: fontsize || '14px',\n fontFamily: fontname || '微软雅黑',\n textAlign: align || 'left',\n }\n}\n\nexport const formatText = (text: string) => {\n return text.replace(/\\n/g, '
').replace(/ /g, ' ')\n}","import { computed, type Ref } from 'vue'\nimport type { TableCell } from '@/types/slides'\n\n// 计算无效的单元格位置(被合并的单元格位置)集合\n\nexport default (cells: Ref) => {\n const hideCells = computed(() => {\n const hideCells = []\n \n for (let i = 0; i < cells.value.length; i++) {\n const rowCells = cells.value[i]\n\n for (let j = 0; j < rowCells.length; j++) {\n const cell = rowCells[j]\n \n if (cell.colspan > 1 || cell.rowspan > 1) {\n for (let row = i; row < i + cell.rowspan; row++) {\n for (let col = row === i ? j + 1 : j; col < j + cell.colspan; col++) {\n hideCells.push(`${row}_${col}`)\n }\n }\n }\n }\n }\n return hideCells\n })\n\n return {\n hideCells,\n }\n}","import { ref, watch, type Ref } from 'vue'\nimport type { TableTheme } from '@/types/slides'\nimport { getTableSubThemeColor } from '@/utils/element'\n\n// 通过表格的主题色计算辅助颜色\n\nexport default (theme: Ref) => {\n const subThemeColor = ref(['', ''])\n watch(() => theme.value, () => {\n if (theme.value) {\n subThemeColor.value = getTableSubThemeColor(theme.value.color)\n }\n }, { immediate: true })\n\n return {\n subThemeColor,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7a7222ac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/clipboard'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'CustomTextarea',\n props: {\n value: { default: '' }\n },\n emits: [\"updateValue\", \"insertExcelData\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst textareaRef = ref()\nconst text = ref('')\nconst isFocus = ref(false)\n\n// 自定义v-modal,同步数据\n// 当文本框聚焦时,不执行数据同步\nwatch(() => props.value, () => {\n if (isFocus.value) return\n text.value = props.value\n if (textareaRef.value) textareaRef.value.innerHTML = props.value\n}, { immediate: true })\n\nconst handleInput = () => {\n if (!textareaRef.value) return\n const text = textareaRef.value.innerHTML\n emit('updateValue', text)\n}\n\n// 聚焦时更新焦点标记,并监听粘贴事件\nconst handleFocus = () => {\n isFocus.value = true\n\n if (!textareaRef.value) return\n textareaRef.value.onpaste = (e: ClipboardEvent) => {\n e.preventDefault()\n if (!e.clipboardData) return\n\n const clipboardDataFirstItem = e.clipboardData.items[0]\n\n if (clipboardDataFirstItem && clipboardDataFirstItem.kind === 'string' && clipboardDataFirstItem.type === 'text/plain') {\n clipboardDataFirstItem.getAsString(text => {\n const clipboardData = pasteCustomClipboardString(text)\n if (typeof clipboardData === 'object') return\n \n const excelData = pasteExcelClipboardString(text)\n if (excelData) {\n emit('insertExcelData', excelData)\n if (textareaRef.value) textareaRef.value.innerHTML = excelData[0][0]\n return\n }\n\n document.execCommand('insertText', false, text)\n })\n }\n }\n}\n\n// 失焦时更新焦点标记,清除粘贴事件监听\nconst handleBlur = () => {\n isFocus.value = false\n if (textareaRef.value) textareaRef.value.onpaste = null\n}\n\n// 清除粘贴事件监听\nonBeforeUnmount(() => {\n if (textareaRef.value) textareaRef.value.onpaste = null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"custom-textarea\",\n ref_key: \"textareaRef\",\n ref: textareaRef,\n contenteditable: true,\n onFocus: _cache[0] || (_cache[0] = ($event: any) => (handleFocus())),\n onBlur: _cache[1] || (_cache[1] = ($event: any) => (handleBlur())),\n onInput: _cache[2] || (_cache[2] = ($event: any) => (handleInput())),\n innerHTML: text.value\n }, null, 40, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./CustomTextarea.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CustomTextarea.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./CustomTextarea.vue?vue&type=style&index=0&id=7a7222ac&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7a7222ac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, createBlock as _createBlock, vShow as _vShow, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0236a619\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"handler\"\n}\nconst _hoisted_2 = [\"onMousedown\"]\nconst _hoisted_3 = [\"width\"]\nconst _hoisted_4 = [\"rowspan\", \"colspan\", \"data-cell-index\", \"onMousedown\", \"onMouseenter\"]\nconst _hoisted_5 = [\"innerHTML\"]\n\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { debounce, isEqual } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore } from '@/store'\nimport type { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { KEYS } from '@/configs/hotkey'\nimport { getTextStyle, formatText } from './utils'\nimport useHideCells from './useHideCells'\nimport useSubThemeColor from './useSubThemeColor'\n\nimport CustomTextarea from './CustomTextarea.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditableTable',\n props: {\n data: {},\n width: {},\n cellMinHeight: {},\n colWidths: {},\n outline: {},\n theme: {},\n editable: { type: Boolean, default: true }\n },\n emits: [\"change\", \"changeColWidths\", \"changeSelectedCells\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n \nconst isStartSelect = ref(false)\nconst startCell = ref([])\nconst endCell = ref([])\n\nconst tableCells = computed({\n get() {\n return props.data\n },\n set(newData) {\n emit('change', newData)\n },\n})\n\n// 主题辅助色\nconst theme = computed(() => props.theme)\nconst { subThemeColor } = useSubThemeColor(theme)\n\n// 计算表格每一列的列宽和总宽度\nconst colSizeList = ref([])\nconst totalWidth = computed(() => colSizeList.value.reduce((a, b) => a + b))\nwatch([\n () => props.colWidths,\n () => props.width,\n], () => {\n colSizeList.value = props.colWidths.map(item => item * props.width)\n}, { immediate: true })\n\n// 清除全部单元格的选中状态\n// 表格处于不可编辑状态时也需要清除\nconst removeSelectedCells = () => {\n startCell.value = []\n endCell.value = []\n}\n\nwatch(() => props.editable, () => {\n if (!props.editable) removeSelectedCells()\n})\n\n// 用于拖拽列宽的操作节点位置\nconst dragLinePosition = computed(() => {\n const dragLinePosition: number[] = []\n for (let i = 1; i < colSizeList.value.length + 1; i++) {\n const pos = colSizeList.value.slice(0, i).reduce((a, b) => (a + b))\n dragLinePosition.push(pos)\n }\n return dragLinePosition\n})\n\n// 无效的单元格位置(被合并的单元格位置)集合\nconst cells = computed(() => props.data)\nconst { hideCells } = useHideCells(cells)\n\n// 当前选中的单元格集合\nconst selectedCells = computed(() => {\n if (!startCell.value.length) return []\n const [startX, startY] = startCell.value\n\n if (!endCell.value.length) return [`${startX}_${startY}`]\n const [endX, endY] = endCell.value\n\n if (startX === endX && startY === endY) return [`${startX}_${startY}`]\n\n const selectedCells = []\n\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n for (let i = 0; i < tableCells.value.length; i++) {\n const rowCells = tableCells.value[i]\n for (let j = 0; j < rowCells.length; j++) {\n if (i >= minX && i <= maxX && j >= minY && j <= maxY) selectedCells.push(`${i}_${j}`)\n }\n }\n return selectedCells\n})\n\nwatch(selectedCells, (value, oldValue) => {\n if (isEqual(value, oldValue)) return\n emit('changeSelectedCells', selectedCells.value)\n})\n\n// 当前激活的单元格:当且仅当只有一个选中单元格时,该单元格为激活的单元格\nconst activedCell = computed(() => {\n if (selectedCells.value.length > 1) return null\n return selectedCells.value[0]\n})\n\n// 设置选中单元格状态(鼠标点击或拖选)\nconst handleMouseup = () => isStartSelect.value = false\n\nconst handleCellMousedown = (e: MouseEvent, rowIndex: number, colIndex: number) => {\n if (e.button === 0) {\n endCell.value = []\n isStartSelect.value = true\n startCell.value = [rowIndex, colIndex]\n }\n}\n\nconst handleCellMouseenter = (rowIndex: number, colIndex: number) => {\n if (!isStartSelect.value) return\n endCell.value = [rowIndex, colIndex]\n}\n\nonMounted(() => {\n document.addEventListener('mouseup', handleMouseup)\n})\nonUnmounted(() => {\n document.removeEventListener('mouseup', handleMouseup)\n})\n\n// 判断某位置是否为无效单元格(被合并掉的位置)\nconst isHideCell = (rowIndex: number, colIndex: number) => hideCells.value.includes(`${rowIndex}_${colIndex}`)\n\n// 选中指定的列\nconst selectCol = (index: number) => {\n const maxRow = tableCells.value.length - 1\n startCell.value = [0, index]\n endCell.value = [maxRow, index]\n}\n\n// 选中指定的行\nconst selectRow = (index: number) => {\n const maxCol = tableCells.value[index].length - 1\n startCell.value = [index, 0]\n endCell.value = [index, maxCol]\n}\n\n// 选中全部单元格\nconst selectAll = () => {\n const maxRow = tableCells.value.length - 1\n const maxCol = tableCells.value[maxRow].length - 1\n startCell.value = [0, 0]\n endCell.value = [maxRow, maxCol]\n}\n\n// 删除一行\nconst deleteRow = (rowIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const targetCells = tableCells.value[rowIndex]\n const hideCellsPos = []\n for (let i = 0; i < targetCells.length; i++) {\n if (isHideCell(rowIndex, i)) hideCellsPos.push(i)\n }\n \n for (const pos of hideCellsPos) {\n for (let i = rowIndex; i >= 0; i--) {\n if (!isHideCell(i, pos)) {\n _tableCells[i][pos].rowspan = _tableCells[i][pos].rowspan - 1\n break\n }\n }\n }\n\n _tableCells.splice(rowIndex, 1)\n tableCells.value = _tableCells\n}\n\n// 删除一列\nconst deleteCol = (colIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const hideCellsPos = []\n for (let i = 0; i < tableCells.value.length; i++) {\n if (isHideCell(i, colIndex)) hideCellsPos.push(i)\n }\n\n for (const pos of hideCellsPos) {\n for (let i = colIndex; i >= 0; i--) {\n if (!isHideCell(pos, i)) {\n _tableCells[pos][i].colspan = _tableCells[pos][i].colspan - 1\n break\n }\n }\n }\n\n tableCells.value = _tableCells.map(item => {\n item.splice(colIndex, 1)\n return item\n })\n colSizeList.value.splice(colIndex, 1)\n emit('changeColWidths', colSizeList.value)\n}\n\n// 插入一行\nconst insertRow = (rowIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const rowCells: TableCell[] = []\n for (let i = 0; i < _tableCells[0].length; i++) {\n rowCells.push({\n colspan: 1,\n rowspan: 1,\n text: '',\n id: nanoid(10),\n })\n }\n\n _tableCells.splice(rowIndex, 0, rowCells)\n tableCells.value = _tableCells\n}\n\n// 插入一列\nconst insertCol = (colIndex: number) => {\n tableCells.value = tableCells.value.map(item => {\n const cell = {\n colspan: 1,\n rowspan: 1,\n text: '',\n id: nanoid(10),\n }\n item.splice(colIndex, 0, cell)\n return item\n })\n colSizeList.value.splice(colIndex, 0, 100)\n emit('changeColWidths', colSizeList.value)\n}\n\n// 填充指定的行/列数\nconst fillTable = (rowCount: number, colCount: number) => {\n let _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n const defaultCell = { colspan: 1, rowspan: 1, text: '' }\n \n if (rowCount) {\n const newRows = []\n for (let i = 0; i < rowCount; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < _tableCells[0].length; j++) {\n rowCells.push({\n ...defaultCell,\n id: nanoid(10),\n })\n }\n newRows.push(rowCells)\n }\n _tableCells = [..._tableCells, ...newRows]\n }\n if (colCount) {\n _tableCells = _tableCells.map(item => {\n const cells: TableCell[] = []\n for (let i = 0; i < colCount; i++) {\n const cell = {\n ...defaultCell,\n id: nanoid(10),\n }\n cells.push(cell)\n }\n return [...item, ...cells]\n })\n colSizeList.value = [...colSizeList.value, ...new Array(colCount).fill(100)]\n emit('changeColWidths', colSizeList.value)\n }\n\n tableCells.value = _tableCells\n}\n\n// 合并单元格\nconst mergeCells = () => {\n const [startX, startY] = startCell.value\n const [endX, endY] = endCell.value\n\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n \n _tableCells[minX][minY].rowspan = maxX - minX + 1\n _tableCells[minX][minY].colspan = maxY - minY + 1\n\n tableCells.value = _tableCells\n removeSelectedCells()\n}\n\n// 拆分单元格\nconst splitCells = (rowIndex: number, colIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n _tableCells[rowIndex][colIndex].rowspan = 1\n _tableCells[rowIndex][colIndex].colspan = 1\n\n tableCells.value = _tableCells\n removeSelectedCells()\n}\n\n// 鼠标拖拽调整列宽\nconst handleMousedownColHandler = (e: MouseEvent, colIndex: number) => {\n removeSelectedCells()\n let isMouseDown = true\n\n const originWidth = colSizeList.value[colIndex]\n const startPageX = e.pageX\n\n const minWidth = 50\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n \n const moveX = (e.pageX - startPageX) / canvasScale.value\n const width = originWidth + moveX < minWidth ? minWidth : Math.round(originWidth + moveX)\n\n colSizeList.value[colIndex] = width\n }\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n emit('changeColWidths', colSizeList.value)\n }\n}\n\n// 清空选中单元格内的文字\nconst clearSelectedCellText = () => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n for (let i = 0; i < _tableCells.length; i++) {\n for (let j = 0; j < _tableCells[i].length; j++) {\n if (selectedCells.value.includes(`${i}_${j}`)) {\n _tableCells[i][j].text = ''\n }\n }\n }\n tableCells.value = _tableCells\n}\n\n// 将焦点移动到下一个单元格\n// 当前行右边有单元格时,焦点右移\n// 当前行右边无单元格(已处在行末),且存在下一行时,焦点移动至下一行行首\n// 当前行右边无单元格(已处在行末),且不存在下一行(已处在最后一行)时,新建一行并将焦点移动至下一行行首\nconst tabActiveCell = () => {\n const getNextCell = (i: number, j: number): [number, number] | null => {\n if (!tableCells.value[i]) return null\n if (!tableCells.value[i][j]) return getNextCell(i + 1, 0)\n if (isHideCell(i, j)) return getNextCell(i, j + 1)\n return [i, j]\n }\n\n endCell.value = []\n\n const nextRow = startCell.value[0]\n const nextCol = startCell.value[1] + 1\n\n const nextCell = getNextCell(nextRow, nextCol)\n if (!nextCell) {\n insertRow(nextRow + 1)\n startCell.value = [nextRow + 1, 0]\n }\n else startCell.value = nextCell\n\n // 移动焦点后自动聚焦文本\n nextTick(() => {\n const textRef = document.querySelector('.cell-text.active') as HTMLInputElement\n if (textRef) textRef.focus()\n })\n}\n\n// 表格快捷键监听\nconst keydownListener = (e: KeyboardEvent) => {\n if (!props.editable || !selectedCells.value.length) return\n\n const key = e.key.toUpperCase()\n if (selectedCells.value.length < 2) {\n if (key === KEYS.TAB) {\n e.preventDefault()\n tabActiveCell()\n }\n if (e.ctrlKey && key === KEYS.UP) {\n e.preventDefault()\n const rowIndex = +selectedCells.value[0].split('_')[0]\n insertRow(rowIndex)\n }\n if (e.ctrlKey && key === KEYS.DOWN) {\n e.preventDefault()\n const rowIndex = +selectedCells.value[0].split('_')[0]\n insertRow(rowIndex + 1)\n }\n if (e.ctrlKey && key === KEYS.LEFT) {\n e.preventDefault()\n const colIndex = +selectedCells.value[0].split('_')[1]\n insertCol(colIndex)\n }\n if (e.ctrlKey && key === KEYS.RIGHT) {\n e.preventDefault()\n const colIndex = +selectedCells.value[0].split('_')[1]\n insertCol(colIndex + 1)\n }\n }\n else if (key === KEYS.DELETE) {\n clearSelectedCellText()\n }\n}\n\nonMounted(() => {\n document.addEventListener('keydown', keydownListener)\n})\nonUnmounted(() => {\n document.removeEventListener('keydown', keydownListener)\n})\n\n// 单元格文字输入时更新表格数据\nconst handleInput = debounce(function(value, rowIndex, colIndex) {\n tableCells.value[rowIndex][colIndex].text = value\n emit('change', tableCells.value)\n}, 300, { trailing: true })\n\n// 插入来自Excel的数据,表格的行/列数不够时自动补足\nconst insertExcelData = (data: string[][], rowIndex: number, colIndex: number) => {\n const maxRow = data.length\n const maxCol = data[0].length\n\n let fillRowCount = 0\n let fillColCount = 0\n if (rowIndex + maxRow > tableCells.value.length) fillRowCount = rowIndex + maxRow - tableCells.value.length\n if (colIndex + maxCol > tableCells.value[0].length) fillColCount = colIndex + maxCol - tableCells.value[0].length\n if (fillRowCount || fillColCount) fillTable(fillRowCount, fillColCount)\n\n nextTick(() => {\n for (let i = 0; i < maxRow; i++) {\n for (let j = 0; j < maxCol; j++) {\n if (tableCells.value[rowIndex + i][colIndex + j]) {\n tableCells.value[rowIndex + i][colIndex + j].text = data[i][j]\n }\n }\n }\n emit('change', tableCells.value)\n })\n}\n\n// 获取有效的单元格(排除掉被合并的单元格)\nconst getEffectiveTableCells = () => {\n const effectiveTableCells = []\n\n for (let i = 0; i < tableCells.value.length; i++) {\n const rowCells = tableCells.value[i]\n const _rowCells = []\n for (let j = 0; j < rowCells.length; j++) {\n if (!isHideCell(i, j)) _rowCells.push(rowCells[j])\n }\n if (_rowCells.length) effectiveTableCells.push(_rowCells)\n }\n\n return effectiveTableCells\n}\n\n// 检查是否可以删除行和列:有效的行/列数大于1\nconst checkCanDeleteRowOrCol = () => {\n const effectiveTableCells = getEffectiveTableCells()\n const canDeleteRow = effectiveTableCells.length > 1\n const canDeleteCol = effectiveTableCells[0].length > 1\n\n return { canDeleteRow, canDeleteCol }\n}\n\n// 检查是否可以合并或拆分\n// 必须多选才可以合并\n// 必须单选且所选单元格为合并单元格才可以拆分\nconst checkCanMergeOrSplit = (rowIndex: number, colIndex: number) => {\n const isMultiSelected = selectedCells.value.length > 1\n const targetCell = tableCells.value[rowIndex][colIndex]\n\n const canMerge = isMultiSelected\n const canSplit = !isMultiSelected && (targetCell.rowspan > 1 || targetCell.colspan > 1)\n\n return { canMerge, canSplit }\n}\n\nconst contextmenus = (el: HTMLElement): ContextmenuItem[] => {\n const cellIndex = el.dataset.cellIndex as string\n const rowIndex = +cellIndex.split('_')[0]\n const colIndex = +cellIndex.split('_')[1]\n\n if (!selectedCells.value.includes(`${rowIndex}_${colIndex}`)) {\n startCell.value = [rowIndex, colIndex]\n endCell.value = []\n }\n\n const { canMerge, canSplit } = checkCanMergeOrSplit(rowIndex, colIndex)\n const { canDeleteRow, canDeleteCol } = checkCanDeleteRowOrCol()\n\n return [\n {\n text: '插入列',\n children: [\n { text: '到左侧', handler: () => insertCol(colIndex) },\n { text: '到右侧', handler: () => insertCol(colIndex + 1) },\n ],\n },\n {\n text: '插入行',\n children: [\n { text: '到上方', handler: () => insertRow(rowIndex) },\n { text: '到下方', handler: () => insertRow(rowIndex + 1) },\n ],\n },\n {\n text: '删除列',\n disable: !canDeleteCol,\n handler: () => deleteCol(colIndex),\n },\n {\n text: '删除行',\n disable: !canDeleteRow,\n handler: () => deleteRow(rowIndex),\n },\n { divider: true },\n {\n text: '合并单元格',\n disable: !canMerge,\n handler: mergeCells,\n },\n {\n text: '取消合并单元格',\n disable: !canSplit,\n handler: () => splitCells(rowIndex, colIndex),\n },\n { divider: true },\n {\n text: '选中当前列',\n handler: () => selectCol(colIndex),\n },\n {\n text: '选中当前行',\n handler: () => selectRow(rowIndex),\n },\n {\n text: '选中全部单元格',\n handler: selectAll,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"editable-table\",\n style: _normalizeStyle({ width: totalWidth.value + 'px' })\n }, [\n (_ctx.editable)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(dragLinePosition.value, (pos, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"drag-line\",\n key: index,\n style: _normalizeStyle({ left: pos + 'px' }),\n onMousedown: $event => handleMousedownColHandler($event, index)\n }, null, 44, _hoisted_2))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"table\", {\n class: _normalizeClass({\n 'theme': theme.value,\n 'row-header': theme.value?.rowHeader,\n 'row-footer': theme.value?.rowFooter,\n 'col-header': theme.value?.colHeader,\n 'col-footer': theme.value?.colFooter,\n }),\n style: _normalizeStyle(`--themeColor: ${theme.value?.color}; --subThemeColor1: ${_unref(subThemeColor)[0]}; --subThemeColor2: ${_unref(subThemeColor)[1]}`)\n }, [\n _createElementVNode(\"colgroup\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(colSizeList.value, (width, index) => {\n return (_openBlock(), _createElementBlock(\"col\", {\n span: \"1\",\n key: index,\n width: width\n }, null, 8, _hoisted_3))\n }), 128))\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tableCells.value, (rowCells, rowIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: rowIndex,\n style: _normalizeStyle({ height: _ctx.cellMinHeight + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rowCells, (cell, colIndex) => {\n return _withDirectives((_openBlock(), _createElementBlock(\"td\", {\n class: _normalizeClass([\"cell\", {\n 'selected': selectedCells.value.includes(`${rowIndex}_${colIndex}`) && selectedCells.value.length > 1,\n 'active': activedCell.value === `${rowIndex}_${colIndex}`,\n }]),\n style: _normalizeStyle({\n borderStyle: _ctx.outline.style,\n borderColor: _ctx.outline.color,\n borderWidth: _ctx.outline.width + 'px',\n ..._unref(getTextStyle)(cell.style),\n }),\n key: cell.id,\n rowspan: cell.rowspan,\n colspan: cell.colspan,\n \"data-cell-index\": `${rowIndex}_${colIndex}`,\n onMousedown: $event => handleCellMousedown($event, rowIndex, colIndex),\n onMouseenter: ($event: any) => (handleCellMouseenter(rowIndex, colIndex))\n }, [\n (activedCell.value === `${rowIndex}_${colIndex}`)\n ? (_openBlock(), _createBlock(CustomTextarea, {\n key: 0,\n class: _normalizeClass([\"cell-text\", { 'active': activedCell.value === `${rowIndex}_${colIndex}` }]),\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n value: cell.text,\n onUpdateValue: value => _unref(handleInput)(value, rowIndex, colIndex),\n onInsertExcelData: value => insertExcelData(value, rowIndex, colIndex)\n }, null, 8, [\"class\", \"style\", \"value\", \"onUpdateValue\", \"onInsertExcelData\"]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"cell-text\",\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n innerHTML: _unref(formatText)(cell.text)\n }, null, 12, _hoisted_5))\n ], 46, _hoisted_4)), [\n [_vShow, !_unref(hideCells).includes(`${rowIndex}_${colIndex}`)],\n [_directive_contextmenu, (el) => contextmenus(el)]\n ])\n }), 128))\n ], 4))\n }), 128))\n ])\n ], 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./EditableTable.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./EditableTable.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./EditableTable.vue?vue&type=style&index=0&id=0236a619&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0236a619\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createVNode as _createVNode, unref as _unref, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-742a731e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTableElement, TableCell } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport EditableTable from './EditableTable.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { canvasScale, handleElementId, isScaling } = storeToRefs(mainStore)\n\nconst elementRef = ref()\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\n// 更新表格的可编辑状态,表格处于编辑状态时需要禁用全局快捷键\nconst editable = ref(false)\n\nwatch(handleElementId, () => {\n if (handleElementId.value !== props.elementInfo.id) editable.value = false\n})\n\nwatch(editable, () => {\n mainStore.setDisableHotkeysState(editable.value)\n})\n\nconst startEdit = () => {\n if (!props.elementInfo.lock) editable.value = true\n}\n\n// 监听表格元素的尺寸变化,当高度变化时,更新高度到vuex\n// 如果高度变化时正处在缩放操作中,则等待缩放操作结束后再更新\nconst realHeightCache = ref(-1)\n\nwatch(isScaling, () => {\n if (handleElementId.value !== props.elementInfo.id) return\n\n if (isScaling.value) editable.value = false\n\n if (!isScaling.value && realHeightCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeightCache.value },\n })\n realHeightCache.value = -1\n }\n})\n\nconst updateTableElementHeight = (entries: ResizeObserverEntry[]) => {\n const contentRect = entries[0].contentRect\n if (!elementRef.value) return\n\n const realHeight = contentRect.height\n\n if (props.elementInfo.height !== realHeight) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeight },\n })\n }\n else realHeightCache.value = realHeight\n }\n}\n\nconst resizeObserver = new ResizeObserver(updateTableElementHeight)\n\nonMounted(() => {\n if (elementRef.value) resizeObserver.observe(elementRef.value)\n})\nonUnmounted(() => {\n if (elementRef.value) resizeObserver.unobserve(elementRef.value)\n})\n\n// 更新表格内容数据\nconst updateTableCells = (data: TableCell[][]) => {\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { data },\n })\n addHistorySnapshot()\n}\n\n// 更新表格的列宽数据\nconst updateColWidths = (widths: number[]) => {\n const width = widths.reduce((a, b) => a + b)\n const colWidths = widths.map(item => item / width)\n\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { width, colWidths },\n })\n addHistorySnapshot()\n}\n\n// 更新表格当前选中的单元格\nconst updateSelectedCells = (cells: string[]) => {\n nextTick(() => mainStore.setSelectedTableCells(cells))\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-table\", { 'lock': _ctx.elementInfo.lock }]),\n ref_key: \"elementRef\",\n ref: elementRef,\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(EditableTable, {\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"])),\n data: _ctx.elementInfo.data,\n width: _ctx.elementInfo.width,\n cellMinHeight: _ctx.elementInfo.cellMinHeight,\n colWidths: _ctx.elementInfo.colWidths,\n outline: _ctx.elementInfo.outline,\n theme: _ctx.elementInfo.theme,\n editable: editable.value,\n onChange: _cache[1] || (_cache[1] = data => updateTableCells(data)),\n onChangeColWidths: _cache[2] || (_cache[2] = widths => updateColWidths(widths)),\n onChangeSelectedCells: _cache[3] || (_cache[3] = cells => updateSelectedCells(cells))\n }, null, 8, [\"data\", \"width\", \"cellMinHeight\", \"colWidths\", \"outline\", \"theme\", \"editable\"]),\n (!editable.value || _ctx.elementInfo.lock)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"table-mask\", { 'lock': _ctx.elementInfo.lock }]),\n onDblclick: _cache[4] || (_cache[4] = ($event: any) => (startEdit())),\n onMousedown: _cache[5] || (_cache[5] = $event => handleSelectElement($event)),\n onTouchstart: _cache[6] || (_cache[6] = $event => handleSelectElement($event))\n }, [\n (_unref(handleElementId) === _ctx.elementInfo.id)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"mask-tip\",\n style: _normalizeStyle({ transform: `scale(${ 1 / _unref(canvasScale) })` })\n }, \"双击编辑\", 4))\n : _createCommentVNode(\"\", true)\n ], 34))\n : _createCommentVNode(\"\", true)\n ])), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=742a731e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-742a731e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35c33b80\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\", \"stroke\", \"stroke-width\"]\nconst _hoisted_2 = [\"transform\"]\nconst _hoisted_3 = [\"d\"]\n\nimport type { PPTLatexElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport emitter, { EmitterEvents } from '@/utils/emitter'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nconst openLatexEditor = () => {\n emitter.emit(EmitterEvents.OPEN_LATEX_EDITOR)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-latex\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onDblclick: _cache[2] || (_cache[2] = ($event: any) => (openLatexEditor()))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.strokeWidth,\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n d: _ctx.elementInfo.path\n }, null, 8, _hoisted_3)\n ], 8, _hoisted_2)\n ], 8, _hoisted_1))\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=35c33b80&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35c33b80\"]])\n\nexport default __exports__","import { onMounted, type Ref } from 'vue'\n\nexport default (\n src: string,\n videoRef: Ref,\n) => {\n onMounted(() => {\n if (!videoRef.value) return\n\n let type = 'normal'\n if (/m3u8(#|\\?|$)/i.exec(src)) type = 'hls'\n else if (/.flv(#|\\?|$)/i.exec(src)) type = 'flv'\n\n if (videoRef.value && type === 'hls' && (videoRef.value.canPlayType('application/x-mpegURL') || videoRef.value.canPlayType('application/vnd.apple.mpegURL'))) {\n type = 'normal'\n }\n\n if (type === 'hls') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Hls = (window as any).Hls\n \n if (Hls && Hls.isSupported()) {\n const hls = new Hls()\n hls.loadSource(src)\n hls.attachMedia(videoRef.value)\n }\n }\n else if (type === 'flv') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const flvjs = (window as any).flvjs\n if (flvjs && flvjs.isSupported()) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: src,\n })\n flvPlayer.attachMediaElement(videoRef.value)\n flvPlayer.load()\n }\n }\n })\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-e55352ca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"load-error\"\n}\nconst _hoisted_2 = [\"src\", \"autoplay\", \"poster\"]\nconst _hoisted_3 = { class: \"bezel\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"controller-mask\" }, null, -1))\nconst _hoisted_5 = { class: \"controller\" }\nconst _hoisted_6 = { class: \"icons icons-left\" }\nconst _hoisted_7 = { class: \"icon-content\" }\nconst _hoisted_8 = { class: \"volume\" }\nconst _hoisted_9 = { class: \"icon-content\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\nconst _hoisted_12 = { class: \"time\" }\nconst _hoisted_13 = { class: \"ptime\" }\nconst _hoisted_14 = { class: \"dtime\" }\nconst _hoisted_15 = { class: \"icons icons-right\" }\nconst _hoisted_16 = { class: \"speed\" }\nconst _hoisted_17 = { class: \"icon speed-icon\" }\nconst _hoisted_18 = [\"onClick\"]\nconst _hoisted_19 = { class: \"icon-content\" }\nconst _hoisted_20 = { class: \"bar\" }\nconst _hoisted_21 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_22 = [\n _hoisted_21\n]\n\nimport { computed, ref } from 'vue'\nimport useMSE from './useMSE'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n width: {},\n height: {},\n src: {},\n poster: { default: '' },\n autoplay: { type: Boolean, default: false },\n scale: { default: 1 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst secondToTime = (second = 0) => {\n if (second === 0 || isNaN(second)) return '00:00'\n\n const add0 = (num: number) => (num < 10 ? '0' + num : '' + num)\n const hour = Math.floor(second / 3600)\n const min = Math.floor((second - hour * 3600) / 60)\n const sec = Math.floor(second - hour * 3600 - min * 60)\n return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':')\n}\n\nconst getBoundingClientRectViewLeft = (element: HTMLElement) => {\n return element.getBoundingClientRect().left\n}\n\nconst videoRef = ref()\nconst playBarWrap = ref()\nconst volumeBarRef = ref()\n\nconst volume = ref(0.5)\nconst paused = ref(true)\nconst currentTime = ref(0)\nconst duration = ref(0)\nconst loaded = ref(0)\nconst loop = ref(false)\nconst bezelTransition = ref(false)\nconst playbackRate = ref(1)\n\nconst playBarTimeVisible = ref(false)\nconst playBarTime = ref('00:00')\nconst playBarTimeLeft = ref('0')\n\nconst ptime = computed(() => secondToTime(currentTime.value))\nconst dtime = computed(() => secondToTime(duration.value))\nconst playedBarWidth = computed(() => currentTime.value / duration.value * 100 + '%')\nconst loadedBarWidth = computed(() => loaded.value / duration.value * 100 + '%')\nconst volumeBarWidth = computed(() => volume.value * 100 + '%')\n\nconst speedMenuVisible = ref(false)\nconst speedOptions = [\n { label: '2x', value: 2 },\n { label: '1.5x', value: 1.5 },\n { label: '1.25x', value: 1.25 },\n { label: '1x', value: 1 },\n { label: '0.75x', value: 0.75 },\n { label: '0.5x', value: 0.5 },\n]\n\nconst seek = (time: number) => {\n if (!videoRef.value) return\n\n time = Math.max(time, 0)\n time = Math.min(time, duration.value)\n\n videoRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst play = () => {\n if (!videoRef.value) return\n\n paused.value = false\n videoRef.value.play()\n bezelTransition.value = true\n}\n\nconst pause = () => {\n if (!videoRef.value) return\n\n paused.value = true\n videoRef.value.pause()\n bezelTransition.value = true\n}\n\nconst toggle = () => {\n if (paused.value) play() \n else pause()\n}\n\nconst setVolume = (percentage: number) => {\n if (!videoRef.value) return\n\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n\n videoRef.value.volume = percentage\n volume.value = percentage\n if (videoRef.value.muted && percentage !== 0) videoRef.value.muted = false\n}\n\nconst speed = (rate: number) => {\n if (videoRef.value) videoRef.value.playbackRate = rate\n playbackRate.value = rate\n}\n\nconst handleDurationchange = () => {\n duration.value = videoRef.value?.duration || 0\n}\n\nconst handleTimeupdate = () => {\n currentTime.value = videoRef.value?.currentTime || 0\n}\n\nconst handleEnded = () => {\n if (!loop.value) pause()\n else {\n seek(0)\n play()\n }\n}\n\nconst handleProgress = () => {\n loaded.value = videoRef.value?.buffered.length ? videoRef.value.buffered.end(videoRef.value.buffered.length - 1) : 0\n}\n\nconst loadError = ref(false)\nconst handleError = () => loadError.value = true\n\nconst thumbMove = (e: MouseEvent | TouchEvent) => {\n if (!videoRef.value || !playBarWrap.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n videoRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst thumbUp = (e: MouseEvent | TouchEvent) => {\n if (!videoRef.value || !playBarWrap.value) return\n\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n videoRef.value.currentTime = time\n currentTime.value = time\n\n document.removeEventListener('mousemove', thumbMove)\n document.removeEventListener('touchmove', thumbMove)\n document.removeEventListener('mouseup', thumbUp)\n document.removeEventListener('touchend', thumbUp)\n}\n\nconst handleMousedownPlayBar = () => {\n document.addEventListener('mousemove', thumbMove)\n document.addEventListener('touchmove', thumbMove)\n document.addEventListener('mouseup', thumbUp)\n document.addEventListener('touchend', thumbUp)\n}\n\nconst volumeMove = (e: MouseEvent | TouchEvent) => {\n if (!volumeBarRef.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n const percentage = (clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst volumeUp = () => {\n document.removeEventListener('mousemove', volumeMove)\n document.removeEventListener('touchmove', volumeMove)\n document.removeEventListener('mouseup', volumeUp)\n document.removeEventListener('touchend', volumeUp)\n}\n\nconst handleMousedownVolumeBar = () => {\n document.addEventListener('mousemove', volumeMove)\n document.addEventListener('touchmove', volumeMove)\n document.addEventListener('mouseup', volumeUp)\n document.addEventListener('touchend', volumeUp)\n}\n\nconst handleClickVolumeBar = (e: MouseEvent) => {\n if (!volumeBarRef.value) return\n const percentage = (e.clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst handleMousemovePlayBar = (e: MouseEvent) => {\n if (duration.value && playBarWrap.value) {\n const px = playBarWrap.value.getBoundingClientRect().left\n const tx = e.clientX - px\n if (tx < 0 || tx > playBarWrap.value.offsetWidth) return\n\n const time = duration.value * (tx / playBarWrap.value.offsetWidth)\n playBarTimeLeft.value = `${tx - (time >= 3600 ? 25 : 20)}px`\n playBarTime.value = secondToTime(time)\n playBarTimeVisible.value = true\n }\n}\n\nconst toggleVolume = () => {\n if (!videoRef.value) return\n\n if (videoRef.value.muted) {\n videoRef.value.muted = false\n setVolume(0.5)\n }\n else {\n videoRef.value.muted = true\n setVolume(0)\n }\n}\n\nconst toggleLoop = () => {\n loop.value = !loop.value\n}\n\nconst autoHideControllerTimer = ref(-1)\nconst hideController = ref(false)\nconst autoHideController = () => {\n hideController.value = false\n clearTimeout(autoHideControllerTimer.value)\n autoHideControllerTimer.value = setTimeout(() => {\n if (videoRef.value?.played.length) hideController.value = true\n }, 3000)\n}\n\nuseMSE(props.src, videoRef)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPause = _resolveComponent(\"IconPause\")!\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n const _component_IconVolumeMute = _resolveComponent(\"IconVolumeMute\")!\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _component_IconVolumeSmall = _resolveComponent(\"IconVolumeSmall\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"video-player\", { 'hide-controller': hideController.value }]),\n style: _normalizeStyle({\n width: _ctx.width * _ctx.scale + 'px',\n height: _ctx.height * _ctx.scale + 'px',\n transform: `scale(${1 / _ctx.scale})`,\n }),\n onMousemove: _cache[22] || (_cache[22] = ($event: any) => (autoHideController())),\n onClick: _cache[23] || (_cache[23] = ($event: any) => (autoHideController()))\n }, [\n _createElementVNode(\"div\", {\n class: \"video-wrap\",\n onClick: _cache[8] || (_cache[8] = ($event: any) => (toggle()))\n }, [\n (loadError.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, \"视频加载失败\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"video\", {\n class: \"video\",\n ref_key: \"videoRef\",\n ref: videoRef,\n src: _ctx.src,\n autoplay: _ctx.autoplay,\n poster: _ctx.poster,\n \"webkit-playsinline\": \"\",\n playsinline: \"\",\n onDurationchange: _cache[0] || (_cache[0] = ($event: any) => (handleDurationchange())),\n onTimeupdate: _cache[1] || (_cache[1] = ($event: any) => (handleTimeupdate())),\n onEnded: _cache[2] || (_cache[2] = ($event: any) => (handleEnded())),\n onProgress: _cache[3] || (_cache[3] = ($event: any) => (handleProgress())),\n onPlay: _cache[4] || (_cache[4] = ($event: any) => {autoHideController(); paused.value = false}),\n onPause: _cache[5] || (_cache[5] = ($event: any) => (autoHideController())),\n onError: _cache[6] || (_cache[6] = ($event: any) => (handleError()))\n }, null, 40, _hoisted_2),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bezel-icon\", { 'bezel-transition': bezelTransition.value }]),\n onAnimationend: _cache[7] || (_cache[7] = ($event: any) => (bezelTransition.value = false))\n }, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPause, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPlayOne, { key: 1 }))\n ], 34)\n ])\n ]),\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", {\n class: \"icon play-icon\",\n onClick: _cache[9] || (_cache[9] = ($event: any) => (toggle()))\n }, [\n _createElementVNode(\"span\", _hoisted_7, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPlayOne, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPause, { key: 1 }))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", {\n class: \"icon volume-icon\",\n onClick: _cache[10] || (_cache[10] = ($event: any) => (toggleVolume()))\n }, [\n _createElementVNode(\"span\", _hoisted_9, [\n (volume.value === 0)\n ? (_openBlock(), _createBlock(_component_IconVolumeMute, { key: 0 }))\n : (volume.value === 1)\n ? (_openBlock(), _createBlock(_component_IconVolumeNotice, { key: 1 }))\n : (_openBlock(), _createBlock(_component_IconVolumeSmall, { key: 2 }))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"volume-bar-wrap\",\n onMousedown: _cache[11] || (_cache[11] = ($event: any) => (handleMousedownVolumeBar())),\n onTouchstart: _cache[12] || (_cache[12] = ($event: any) => (handleMousedownVolumeBar())),\n onClick: _cache[13] || (_cache[13] = $event => handleClickVolumeBar($event))\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar\",\n ref_key: \"volumeBarRef\",\n ref: volumeBarRef\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar-inner\",\n style: _normalizeStyle({ width: volumeBarWidth.value })\n }, _hoisted_11, 4)\n ], 512)\n ], 32)\n ]),\n _createElementVNode(\"span\", _hoisted_12, [\n _createElementVNode(\"span\", _hoisted_13, _toDisplayString(ptime.value), 1),\n _createTextVNode(\" / \"),\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(dtime.value), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"span\", {\n class: \"icon-content\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (speedMenuVisible.value = !speedMenuVisible.value))\n }, _toDisplayString(playbackRate.value === 1 ? '倍速' : (playbackRate.value + 'x')), 1),\n (speedMenuVisible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"speed-menu\",\n onMouseleave: _cache[15] || (_cache[15] = ($event: any) => (speedMenuVisible.value = false))\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(speedOptions, (item) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"speed-menu-item\", { 'active': item.value === playbackRate.value }]),\n key: item.label,\n onClick: ($event: any) => (speed(item.value))\n }, _toDisplayString(item.label), 11, _hoisted_18)\n }), 64))\n ], 32))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"loop\",\n onClick: _cache[16] || (_cache[16] = ($event: any) => (toggleLoop()))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"icon loop-icon\", { 'active': loop.value }])\n }, [\n _createElementVNode(\"span\", _hoisted_19, \"循环\" + _toDisplayString(loop.value ? '开' : '关'), 1)\n ], 2)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"bar-wrap\",\n ref_key: \"playBarWrap\",\n ref: playBarWrap,\n onMousedown: _cache[17] || (_cache[17] = ($event: any) => (handleMousedownPlayBar())),\n onTouchstart: _cache[18] || (_cache[18] = ($event: any) => (handleMousedownPlayBar())),\n onMousemove: _cache[19] || (_cache[19] = $event => handleMousemovePlayBar($event)),\n onMouseenter: _cache[20] || (_cache[20] = ($event: any) => (playBarTimeVisible.value = true)),\n onMouseleave: _cache[21] || (_cache[21] = ($event: any) => (playBarTimeVisible.value = false))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bar-time\", { 'hidden': !playBarTimeVisible.value }]),\n style: _normalizeStyle({ left: playBarTimeLeft.value })\n }, _toDisplayString(playBarTime.value), 7),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"div\", {\n class: \"loaded\",\n style: _normalizeStyle({ width: loadedBarWidth.value })\n }, null, 4),\n _createElementVNode(\"div\", {\n class: \"played\",\n style: _normalizeStyle({ width: playedBarWidth.value })\n }, _hoisted_22, 4)\n ])\n ], 544)\n ])\n ], 38))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=e55352ca&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e55352ca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeStyle as _normalizeStyle } from \"vue\"\n\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTVideoElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\n\nimport VideoPlayer from './VideoPlayer/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-video\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event, false)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event, false))\n }, [\n _createVNode(VideoPlayer, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n src: _ctx.elementInfo.src,\n poster: _ctx.elementInfo.poster,\n scale: _unref(canvasScale)\n }, null, 8, [\"width\", \"height\", \"src\", \"poster\", \"scale\"]),\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(['t', 'b', 'l', 'r'], (item) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['handler-border', item]),\n key: item,\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event))\n }, null, 34)\n }), 64))\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5dc89f2a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5dc89f2a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-44037f56\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"autoplay\"]\nconst _hoisted_2 = { class: \"controller\" }\nconst _hoisted_3 = { class: \"icons\" }\nconst _hoisted_4 = { class: \"icon-content\" }\nconst _hoisted_5 = { class: \"volume\" }\nconst _hoisted_6 = { class: \"icon-content\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\nconst _hoisted_9 = { class: \"time\" }\nconst _hoisted_10 = { class: \"ptime\" }\nconst _hoisted_11 = { class: \"dtime\" }\nconst _hoisted_12 = { class: \"bar\" }\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_14 = [\n _hoisted_13\n]\n\nimport { computed, ref } from 'vue'\nimport message from '@/utils/message'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AudioPlayer',\n props: {\n src: {},\n loop: { type: Boolean },\n autoplay: { type: Boolean, default: false },\n scale: { default: 1 }\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\n\nconst secondToTime = (second = 0) => {\n if (second === 0 || isNaN(second)) return '00:00'\n\n const add0 = (num: number) => (num < 10 ? '0' + num : '' + num)\n const hour = Math.floor(second / 3600)\n const min = Math.floor((second - hour * 3600) / 60)\n const sec = Math.floor(second - hour * 3600 - min * 60)\n return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':')\n}\n\nconst getBoundingClientRectViewLeft = (element: HTMLElement) => {\n return element.getBoundingClientRect().left\n}\n\nconst audioRef = ref()\nconst playBarWrap = ref()\nconst volumeBarRef = ref()\n\nconst volume = ref(0.5)\nconst paused = ref(true)\nconst currentTime = ref(0)\nconst duration = ref(0)\nconst loaded = ref(0)\n\nconst playBarTimeVisible = ref(false)\nconst playBarTime = ref('00:00')\nconst playBarTimeLeft = ref('0')\n\nconst ptime = computed(() => secondToTime(currentTime.value))\nconst dtime = computed(() => secondToTime(duration.value))\nconst playedBarWidth = computed(() => currentTime.value / duration.value * 100 + '%')\nconst loadedBarWidth = computed(() => loaded.value / duration.value * 100 + '%')\nconst volumeBarWidth = computed(() => volume.value * 100 + '%')\n\nconst seek = (time: number) => {\n if (!audioRef.value) return\n\n time = Math.max(time, 0)\n time = Math.min(time, duration.value)\n\n audioRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst play = () => {\n if (!audioRef.value) return\n\n paused.value = false\n audioRef.value.play()\n}\n\nconst pause = () => {\n if (!audioRef.value) return\n\n paused.value = true\n audioRef.value.pause()\n}\n\nconst toggle = () => {\n if (paused.value) play() \n else pause()\n}\n\nconst setVolume = (percentage: number) => {\n if (!audioRef.value) return\n\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n\n audioRef.value.volume = percentage\n volume.value = percentage\n if (audioRef.value.muted && percentage !== 0) audioRef.value.muted = false\n}\n\nconst handleDurationchange = () => {\n duration.value = audioRef.value?.duration || 0\n}\n\nconst handleTimeupdate = () => {\n currentTime.value = audioRef.value?.currentTime || 0\n}\n\nconst handlePlayed = () => {\n paused.value = false\n}\n\nconst handleEnded = () => {\n if (!props.loop) pause()\n else {\n seek(0)\n play()\n }\n}\n\nconst handleProgress = () => {\n loaded.value = audioRef.value?.buffered.length ? audioRef.value.buffered.end(audioRef.value.buffered.length - 1) : 0\n}\n\nconst handleError = () => message.error('视频加载失败')\n\nconst thumbMove = (e: MouseEvent | TouchEvent) => {\n if (!audioRef.value || !playBarWrap.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n audioRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst thumbUp = (e: MouseEvent | TouchEvent) => {\n if (!audioRef.value || !playBarWrap.value) return\n\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n audioRef.value.currentTime = time\n currentTime.value = time\n\n document.removeEventListener('mousemove', thumbMove)\n document.removeEventListener('touchmove', thumbMove)\n document.removeEventListener('mouseup', thumbUp)\n document.removeEventListener('touchend', thumbUp)\n}\n\nconst handleMousedownPlayBar = () => {\n document.addEventListener('mousemove', thumbMove)\n document.addEventListener('touchmove', thumbMove)\n document.addEventListener('mouseup', thumbUp)\n document.addEventListener('touchend', thumbUp)\n}\n\nconst volumeMove = (e: MouseEvent | TouchEvent) => {\n if (!volumeBarRef.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n const percentage = (clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst volumeUp = () => {\n document.removeEventListener('mousemove', volumeMove)\n document.removeEventListener('touchmove', volumeMove)\n document.removeEventListener('mouseup', volumeUp)\n document.removeEventListener('touchend', volumeUp)\n}\n\nconst handleMousedownVolumeBar = () => {\n document.addEventListener('mousemove', volumeMove)\n document.addEventListener('touchmove', volumeMove)\n document.addEventListener('mouseup', volumeUp)\n document.addEventListener('touchend', volumeUp)\n}\n\nconst handleClickVolumeBar = (e: MouseEvent) => {\n if (!volumeBarRef.value) return\n const percentage = (e.clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst handleMousemovePlayBar = (e: MouseEvent) => {\n if (duration.value && playBarWrap.value) {\n const px = playBarWrap.value.getBoundingClientRect().left\n const tx = e.clientX - px\n if (tx < 0 || tx > playBarWrap.value.offsetWidth) return\n\n const time = duration.value * (tx / playBarWrap.value.offsetWidth)\n playBarTimeLeft.value = `${tx - (time >= 3600 ? 25 : 20)}px`\n playBarTime.value = secondToTime(time)\n playBarTimeVisible.value = true\n }\n}\n\nconst toggleVolume = () => {\n if (!audioRef.value) return\n\n if (audioRef.value.muted) {\n audioRef.value.muted = false\n setVolume(0.5)\n }\n else {\n audioRef.value.muted = true\n setVolume(0)\n }\n}\n\n__expose({\n toggle,\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n const _component_IconPause = _resolveComponent(\"IconPause\")!\n const _component_IconVolumeMute = _resolveComponent(\"IconVolumeMute\")!\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _component_IconVolumeSmall = _resolveComponent(\"IconVolumeSmall\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"audio-player\",\n style: _normalizeStyle({ transform: `scale(${1 / _ctx.scale})` })\n }, [\n _createElementVNode(\"audio\", {\n class: \"audio\",\n ref_key: \"audioRef\",\n ref: audioRef,\n src: _ctx.src,\n autoplay: _ctx.autoplay,\n onDurationchange: _cache[0] || (_cache[0] = ($event: any) => (handleDurationchange())),\n onTimeupdate: _cache[1] || (_cache[1] = ($event: any) => (handleTimeupdate())),\n onPlay: _cache[2] || (_cache[2] = ($event: any) => (handlePlayed())),\n onEnded: _cache[3] || (_cache[3] = ($event: any) => (handleEnded())),\n onProgress: _cache[4] || (_cache[4] = ($event: any) => (handleProgress())),\n onError: _cache[5] || (_cache[5] = ($event: any) => (handleError()))\n }, null, 40, _hoisted_1),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", {\n class: \"icon play-icon\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (toggle()))\n }, [\n _createElementVNode(\"span\", _hoisted_4, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPlayOne, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPause, { key: 1 }))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", {\n class: \"icon volume-icon\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (toggleVolume()))\n }, [\n _createElementVNode(\"span\", _hoisted_6, [\n (volume.value === 0)\n ? (_openBlock(), _createBlock(_component_IconVolumeMute, { key: 0 }))\n : (volume.value === 1)\n ? (_openBlock(), _createBlock(_component_IconVolumeNotice, { key: 1 }))\n : (_openBlock(), _createBlock(_component_IconVolumeSmall, { key: 2 }))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"volume-bar-wrap\",\n onMousedown: _cache[8] || (_cache[8] = ($event: any) => (handleMousedownVolumeBar())),\n onTouchstart: _cache[9] || (_cache[9] = ($event: any) => (handleMousedownVolumeBar())),\n onClick: _cache[10] || (_cache[10] = $event => handleClickVolumeBar($event))\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar\",\n ref_key: \"volumeBarRef\",\n ref: volumeBarRef\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar-inner\",\n style: _normalizeStyle({ width: volumeBarWidth.value })\n }, _hoisted_8, 4)\n ], 512)\n ], 32)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_9, [\n _createElementVNode(\"span\", _hoisted_10, _toDisplayString(ptime.value), 1),\n _createTextVNode(\" / \"),\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(dtime.value), 1)\n ]),\n _createElementVNode(\"div\", {\n class: \"bar-wrap\",\n ref_key: \"playBarWrap\",\n ref: playBarWrap,\n onMousedown: _cache[11] || (_cache[11] = ($event: any) => (handleMousedownPlayBar())),\n onTouchstart: _cache[12] || (_cache[12] = ($event: any) => (handleMousedownPlayBar())),\n onMousemove: _cache[13] || (_cache[13] = $event => handleMousemovePlayBar($event)),\n onMouseenter: _cache[14] || (_cache[14] = ($event: any) => (playBarTimeVisible.value = true)),\n onMouseleave: _cache[15] || (_cache[15] = ($event: any) => (playBarTimeVisible.value = false))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bar-time\", { 'hidden': !playBarTimeVisible.value }]),\n style: _normalizeStyle({ left: playBarTimeLeft.value })\n }, _toDisplayString(playBarTime.value), 7),\n _createElementVNode(\"div\", _hoisted_12, [\n _createElementVNode(\"div\", {\n class: \"loaded\",\n style: _normalizeStyle({ width: loadedBarWidth.value })\n }, null, 4),\n _createElementVNode(\"div\", {\n class: \"played\",\n style: _normalizeStyle({ width: playedBarWidth.value })\n }, _hoisted_14, 4)\n ])\n ], 544)\n ])\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./AudioPlayer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AudioPlayer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AudioPlayer.vue?vue&type=style&index=0&id=44037f56&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-44037f56\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, unref as _unref, withModifiers as _withModifiers, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTAudioElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nimport AudioPlayer from './AudioPlayer.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale, handleElementId } = storeToRefs(useMainStore())\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\nconst audioPlayerPosition = computed(() => {\n const canvasWidth = VIEWPORT_SIZE\n const canvasHeight = VIEWPORT_SIZE * viewportRatio.value\n\n const audioWidth = 280 / canvasScale.value\n const audioHeight = 50 / canvasScale.value\n\n const elWidth = props.elementInfo.width\n const elHeight = props.elementInfo.height\n const elLeft = props.elementInfo.left\n const elTop = props.elementInfo.top\n\n let left = 0\n let top = elHeight\n \n if (elLeft + audioWidth >= canvasWidth) left = elWidth - audioWidth\n if (elTop + elHeight + audioHeight >= canvasHeight) top = -audioHeight\n\n return {\n left: left + 'px',\n top: top + 'px',\n }\n})\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-audio\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onTouchstart: _cache[2] || (_cache[2] = $event => handleSelectElement($event))\n }, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n })\n }, null, 8, [\"style\"]),\n (_unref(handleElementId) === _ctx.elementInfo.id)\n ? (_openBlock(), _createBlock(AudioPlayer, {\n key: 0,\n class: \"audio-player\",\n style: _normalizeStyle({ ...audioPlayerPosition.value }),\n src: _ctx.elementInfo.src,\n loop: _ctx.elementInfo.loop,\n scale: _unref(canvasScale),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 8, [\"style\", \"src\", \"loop\", \"scale\"]))\n : _createCommentVNode(\"\", true)\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=53bdc956&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53bdc956\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\n\nimport useLockElement from '@/hooks/useLockElement'\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useCombineElement from '@/hooks/useCombineElement'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'\nimport useCopyAndPasteElement from '@/hooks/useCopyAndPasteElement'\nimport useSelectAllElement from '@/hooks/useSelectAllElement'\n\nimport { ElementOrderCommands, ElementAlignCommands } from '@/types/edit'\n\nimport ImageElement from '@/views/components/element/ImageElement/index.vue'\nimport TextElement from '@/views/components/element/TextElement/index.vue'\nimport ShapeElement from '@/views/components/element/ShapeElement/index.vue'\nimport LineElement from '@/views/components/element/LineElement/index.vue'\nimport ChartElement from '@/views/components/element/ChartElement/index.vue'\nimport TableElement from '@/views/components/element/TableElement/index.vue'\nimport LatexElement from '@/views/components/element/LatexElement/index.vue'\nimport VideoElement from '@/views/components/element/VideoElement/index.vue'\nimport AudioElement from '@/views/components/element/AudioElement/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditableElement',\n props: {\n elementInfo: {},\n elementIndex: {},\n isMultiSelect: { type: Boolean },\n selectElement: { type: Function },\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: ImageElement,\n [ElementTypes.TEXT]: TextElement,\n [ElementTypes.SHAPE]: ShapeElement,\n [ElementTypes.LINE]: LineElement,\n [ElementTypes.CHART]: ChartElement,\n [ElementTypes.TABLE]: TableElement,\n [ElementTypes.LATEX]: LatexElement,\n [ElementTypes.VIDEO]: VideoElement,\n [ElementTypes.AUDIO]: AudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nconst { orderElement } = useOrderElement()\nconst { alignElementToCanvas } = useAlignElementToCanvas()\nconst { combineElements, uncombineElements } = useCombineElement()\nconst { deleteElement } = useDeleteElement()\nconst { lockElement, unlockElement } = useLockElement()\nconst { copyElement, pasteElement, cutElement } = useCopyAndPasteElement()\nconst { selectAllElement } = useSelectAllElement()\n\nconst contextmenus = (): ContextmenuItem[] => {\n if (props.elementInfo.lock) {\n return [{\n text: '解锁', \n handler: () => unlockElement(props.elementInfo),\n }]\n }\n\n return [\n {\n text: '剪切',\n subText: 'Ctrl + X',\n handler: cutElement,\n },\n {\n text: '复制',\n subText: 'Ctrl + C',\n handler: copyElement,\n },\n {\n text: '粘贴',\n subText: 'Ctrl + V',\n handler: pasteElement,\n },\n { divider: true },\n {\n text: '水平居中',\n handler: () => alignElementToCanvas(ElementAlignCommands.HORIZONTAL),\n children: [\n { text: '水平垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.CENTER), },\n { text: '水平居中', handler: () => alignElementToCanvas(ElementAlignCommands.HORIZONTAL) },\n { text: '左对齐', handler: () => alignElementToCanvas(ElementAlignCommands.LEFT) },\n { text: '右对齐', handler: () => alignElementToCanvas(ElementAlignCommands.RIGHT) },\n ],\n },\n {\n text: '垂直居中',\n handler: () => alignElementToCanvas(ElementAlignCommands.VERTICAL),\n children: [\n { text: '水平垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.CENTER) },\n { text: '垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.VERTICAL) },\n { text: '顶部对齐', handler: () => alignElementToCanvas(ElementAlignCommands.TOP) },\n { text: '底部对齐', handler: () => alignElementToCanvas(ElementAlignCommands.BOTTOM) },\n ],\n },\n { divider: true },\n {\n text: '置于顶层',\n disable: props.isMultiSelect && !props.elementInfo.groupId,\n handler: () => orderElement(props.elementInfo, ElementOrderCommands.TOP),\n children: [\n { text: '置于顶层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.TOP) },\n { text: '上移一层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.UP) },\n ],\n },\n {\n text: '置于底层',\n disable: props.isMultiSelect && !props.elementInfo.groupId,\n handler: () => orderElement(props.elementInfo, ElementOrderCommands.BOTTOM),\n children: [\n { text: '置于底层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.BOTTOM) },\n { text: '下移一层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.DOWN) },\n ],\n },\n { divider: true },\n {\n text: '设置链接',\n handler: props.openLinkDialog,\n },\n {\n text: props.elementInfo.groupId ? '取消组合' : '组合',\n subText: 'Ctrl + G',\n handler: props.elementInfo.groupId ? uncombineElements : combineElements,\n hide: !props.isMultiSelect,\n },\n {\n text: '全选',\n subText: 'Ctrl + A',\n handler: selectAllElement,\n },\n {\n text: '锁定',\n subText: 'Ctrl + L',\n handler: lockElement,\n },\n {\n text: '删除',\n subText: 'Delete',\n handler: deleteElement,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"editable-element\",\n ref: \"elementRef\",\n id: `editable-element-${_ctx.elementInfo.id}`,\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n selectElement: _ctx.selectElement,\n contextmenus: contextmenus\n }, null, 8, [\"elementInfo\", \"selectElement\"]))\n ], 12, _hoisted_1))\n}\n}\n\n})","\n\n","import script from \"./EditableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./EditableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MouseSelection',\n props: {\n top: {},\n left: {},\n width: {},\n height: {},\n quadrant: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(`mouse-selection quadrant-${_ctx.quadrant}`),\n style: _normalizeStyle({\n top: _ctx.top + 'px',\n left: _ctx.left + 'px',\n width: _ctx.width + 'px',\n height: _ctx.height + 'px',\n })\n }, null, 6))\n}\n}\n\n})","import script from \"./MouseSelection.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MouseSelection.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MouseSelection.vue?vue&type=style&index=0&id=2c5e1d42&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2c5e1d42\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-05484a24\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"grid-lines\" }\nconst _hoisted_2 = [\"d\", \"stroke\"]\n\nimport { computed } from 'vue'\nimport tinycolor from 'tinycolor2'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport type { SlideBackground } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'GridLines',\n setup(__props) {\n\nconst { canvasScale, gridLineSize } = storeToRefs(useMainStore())\nconst { currentSlide, viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => currentSlide.value?.background)\n\n// 计算网格线的颜色,避免与背景的颜色太接近\nconst gridColor = computed(() => {\n const bgColor = background.value?.color || '#fff'\n const colorList = ['#000', '#fff']\n return tinycolor.mostReadable(bgColor, colorList, { includeFallbackColors: true }).setAlpha(.5).toRgbString()\n})\n\n// 网格路径\nconst path = computed(() => {\n const maxX = VIEWPORT_SIZE\n const maxY = VIEWPORT_SIZE * viewportRatio.value\n\n let p = ''\n for (let i = 0; i <= Math.floor(maxY / gridLineSize.value); i++) {\n p += `M0 ${i * gridLineSize.value} L${maxX} ${i * gridLineSize.value} `\n }\n for (let i = 0; i <= Math.floor(maxX / gridLineSize.value); i++) {\n p += `M${i * gridLineSize.value} 0 L${i * gridLineSize.value} ${maxY} `\n }\n return p\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, [\n _createElementVNode(\"path\", {\n style: _normalizeStyle({\n transform: `scale(${_unref(canvasScale)})`,\n }),\n d: path.value,\n fill: \"none\",\n stroke: gridColor.value,\n \"stroke-width\": \"0.3\",\n \"stroke-dasharray\": \"5\"\n }, null, 12, _hoisted_2)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./GridLines.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GridLines.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GridLines.vue?vue&type=style&index=0&id=05484a24&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-05484a24\"]])\n\nexport default __exports__","import { type Ref, computed } from 'vue'\nimport type { SlideBackground } from '@/types/slides'\n\n// 将页面背景数据转换为css样式\nexport default (background: Ref) => {\n const backgroundStyle = computed(() => {\n if (!background.value) return { backgroundColor: '#fff' }\n\n const {\n type,\n color,\n image,\n imageSize,\n gradientColor,\n gradientRotate,\n gradientType,\n } = background.value\n\n // 纯色背景\n if (type === 'solid') return { backgroundColor: color }\n\n // 背景图模式\n // 包括:背景图、背景大小,是否重复\n else if (type === 'image') {\n if (!image) return { backgroundColor: '#fff' }\n if (imageSize === 'repeat') {\n return {\n backgroundImage: `url(${image}`,\n backgroundRepeat: 'repeat',\n backgroundSize: 'contain',\n }\n }\n return {\n backgroundImage: `url(${image}`,\n backgroundRepeat: 'no-repeat',\n backgroundSize: imageSize || 'cover',\n }\n }\n\n // 渐变色背景\n else if (type === 'gradient') {\n const rotate = gradientRotate || 0\n const color1 = gradientColor ? gradientColor[0] : '#fff'\n const color2 = gradientColor ? gradientColor[1] : '#fff'\n \n if (gradientType === 'radial') return { backgroundImage: `radial-gradient(${color1}, ${color2}` }\n return { backgroundImage: `linear-gradient(${rotate}deg, ${color1}, ${color2}` }\n }\n\n return { backgroundColor: '#fff' }\n })\n\n return {\n backgroundStyle,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { SlideBackground } from '@/types/slides'\nimport GridLines from './GridLines.vue'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ViewportBackground',\n setup(__props) {\n\nconst { gridLineSize } = storeToRefs(useMainStore())\nconst { currentSlide } = storeToRefs(useSlidesStore())\nconst background = computed(() => currentSlide.value?.background)\n\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"viewport-background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, [\n (_unref(gridLineSize))\n ? (_openBlock(), _createBlock(GridLines, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ViewportBackground.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ViewportBackground.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ViewportBackground.vue?vue&type=style&index=0&id=b6b18502&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b6b18502\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { AlignmentLineAxis } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AlignmentLine',\n props: {\n type: {},\n axis: {},\n length: {},\n canvasScale: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\n// 吸附对齐线的位置\nconst left = computed(() => props.axis.x * props.canvasScale + 'px')\nconst top = computed(() => props.axis.y * props.canvasScale + 'px')\n\n// 吸附对齐线的长度\nconst sizeStyle = computed(() => {\n if (props.type === 'vertical') return { height: props.length * props.canvasScale + 'px' }\n return { width: props.length * props.canvasScale + 'px' }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"alignment-line\",\n style: _normalizeStyle({ left: left.value, top: top.value })\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass(['line', _ctx.type]),\n style: _normalizeStyle(sizeStyle.value)\n }, null, 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./AlignmentLine.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AlignmentLine.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AlignmentLine.vue?vue&type=style&index=0&id=ed6fc00a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ed6fc00a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2963c74c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"ruler\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\n\ninterface ViewportStyles {\n top: number\n left: number\n width: number\n height: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Ruler',\n props: {\n viewportStyles: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst markerSize = computed(() => {\n return props.viewportStyles.width * canvasScale.value / 10\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"h\",\n style: _normalizeStyle({\n width: _ctx.viewportStyles.width * _unref(canvasScale) + 'px',\n left: _ctx.viewportStyles.left + 'px',\n })\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(20, (marker) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"ruler-marker-100\", { 'hide': markerSize.value < 36, 'omit': markerSize.value < 72 }]),\n key: `marker-100-${marker}`\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(marker), 1)\n ], 2)\n }), 64))\n ], 4),\n _createElementVNode(\"div\", {\n class: \"v\",\n style: _normalizeStyle({\n height: _ctx.viewportStyles.height * _unref(canvasScale) + 'px',\n top: _ctx.viewportStyles.top + 'px',\n })\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(20, (marker) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"ruler-marker-100\", { 'hide': markerSize.value < 36, 'omit': markerSize.value < 72 }]),\n key: marker,\n style: _normalizeStyle({ height: markerSize.value + 'px' })\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(marker), 1)\n ], 6)\n }), 64))\n ], 4)\n ]))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./Ruler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Ruler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Ruler.vue?vue&type=style&index=0&id=2963c74c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2963c74c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85b0bbaa\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\"]\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport type { CreateElementSelectionData } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementCreateSelection',\n emits: [\"created\"],\n setup(__props, { emit }) {\n\n\n\nconst mainStore = useMainStore()\nconst { creatingElement } = storeToRefs(mainStore)\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst start = ref<[number, number]>()\nconst end = ref<[number, number]>()\n\nconst selectionRef = ref()\nconst offset = ref({\n x: 0,\n y: 0,\n})\nonMounted(() => {\n if (!selectionRef.value) return\n const { x, y } = selectionRef.value.getBoundingClientRect()\n offset.value = { x, y }\n})\n\n// 鼠标拖动创建元素生成位置大小\n// 获取范围的起始位置和终点位置\nconst createSelection = (e: MouseEvent) => {\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n start.value = [startPageX, startPageY]\n\n document.onmousemove = e => {\n if (!creatingElement.value || !isMouseDown) return\n\n let currentPageX = e.pageX\n let currentPageY = e.pageY\n\n // 按住Ctrl键或者Shift键时:\n // 对于非线条元素需要锁定宽高比例,对于线条元素需要锁定水平或垂直方向\n if (ctrlOrShiftKeyActive.value) {\n const moveX = currentPageX - startPageX\n const moveY = currentPageY - startPageY\n\n // 水平和垂直方向的拖动距离,后面以拖动距离较大的方向为基础计算另一方向的数据\n const absX = Math.abs(moveX)\n const absY = Math.abs(moveY)\n\n if (creatingElement.value.type === 'shape') {\n\n // 判断是否为反向拖动:从左上到右下为正向操作,此外所有情况都是反向操作\n const isOpposite = (moveY > 0 && moveX < 0) || (moveY < 0 && moveX > 0)\n\n if (absX > absY) {\n currentPageY = isOpposite ? startPageY - moveX : startPageY + moveX\n }\n else {\n currentPageX = isOpposite ? startPageX - moveY : startPageX + moveY\n }\n }\n\n else if (creatingElement.value.type === 'line') {\n if (absX > absY) currentPageY = startPageY\n else currentPageX = startPageX\n }\n }\n\n end.value = [currentPageX, currentPageY]\n }\n\n document.onmouseup = e => {\n document.onmousemove = null\n document.onmouseup = null\n\n if (e.button === 2) {\n setTimeout(() => mainStore.setCreatingElement(null), 0)\n return\n }\n\n isMouseDown = false\n\n const endPageX = e.pageX\n const endPageY = e.pageY\n\n const minSize = 30\n\n if (\n creatingElement.value?.type === 'line' &&\n (Math.abs(endPageX - startPageX) >= minSize || Math.abs(endPageY - startPageY) >= minSize)\n ) {\n emit('created', {\n start: start.value!,\n end: end.value!,\n })\n }\n else if (\n creatingElement.value?.type !== 'line' &&\n (Math.abs(endPageX - startPageX) >= minSize && Math.abs(endPageY - startPageY) >= minSize)\n ) {\n emit('created', {\n start: start.value!,\n end: end.value!,\n })\n }\n else {\n const defaultSize = 200\n const minX = Math.min(endPageX, startPageX)\n const minY = Math.min(endPageY, startPageY)\n const maxX = Math.max(endPageX, startPageX)\n const maxY = Math.max(endPageY, startPageY)\n const offsetX = maxX - minX >= minSize ? maxX - minX : defaultSize\n const offsetY = maxY - minY >= minSize ? maxY - minY : defaultSize\n emit('created', {\n start: [minX, minY],\n end: [minX + offsetX, minY + offsetY],\n })\n }\n }\n}\n\n// 绘制线条的路径相关数据(仅当绘制元素类型为线条时使用)\nconst lineData = computed(() => {\n if (!start.value || !end.value) return null\n if (!creatingElement.value || creatingElement.value.type !== 'line') return null\n\n const [_startX, _startY] = start.value\n const [_endX, _endY] = end.value\n const minX = Math.min(_startX, _endX)\n const maxX = Math.max(_startX, _endX)\n const minY = Math.min(_startY, _endY)\n const maxY = Math.max(_startY, _endY)\n\n const svgWidth = maxX - minX >= 24 ? maxX - minX : 24\n const svgHeight = maxY - minY >= 24 ? maxY - minY : 24\n\n const startX = _startX === minX ? 0 : maxX - minX\n const startY = _startY === minY ? 0 : maxY - minY\n const endX = _endX === minX ? 0 : maxX - minX\n const endY = _endY === minY ? 0 : maxY - minY\n\n const path = `M${startX}, ${startY} L${endX}, ${endY}`\n\n return {\n svgWidth,\n svgHeight,\n startX,\n startY,\n endX,\n endY,\n path,\n }\n})\n\n// 根据生成范围的起始位置和终点位置,计算元素创建时的位置和大小\nconst position = computed(() => {\n if (!start.value || !end.value) return {}\n\n const [startX, startY] = start.value\n const [endX, endY] = end.value\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const width = maxX - minX\n const height = maxY - minY\n\n return {\n left: minX - offset.value.x + 'px',\n top: minY - offset.value.y + 'px',\n width: width + 'px',\n height: height + 'px',\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"element-create-selection\",\n ref_key: \"selectionRef\",\n ref: selectionRef,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => createSelection($event), [\"stop\"])),\n onContextmenu: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\",\"prevent\"]))\n }, [\n (start.value && end.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass(['selection', _unref(creatingElement)?.type]),\n style: _normalizeStyle(position.value)\n }, [\n (_unref(creatingElement)?.type === 'line' && lineData.value)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n overflow: \"visible\",\n width: lineData.value.svgWidth,\n height: lineData.value.svgHeight\n }, [\n _createElementVNode(\"path\", {\n d: lineData.value.path,\n stroke: \"#d14424\",\n fill: \"none\",\n \"stroke-width\": \"2\"\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ], 544))\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementCreateSelection.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementCreateSelection.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementCreateSelection.vue?vue&type=style&index=0&id=85b0bbaa&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85b0bbaa\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-224f36be\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { overflow: \"visible\" }\nconst _hoisted_2 = [\"d\", \"fill\"]\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useKeyboardStore, useMainStore } from '@/store'\nimport type { CreateCustomShapeData } from '@/types/edit'\nimport { KEYS } from '@/configs/hotkey'\nimport message from '@/utils/message'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapeCreateCanvas',\n emits: [\"created\"],\n setup(__props, { emit }) {\n\n\nconst mainStore = useMainStore()\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst shapeCanvasRef = ref()\nconst offset = ref({\n x: 0,\n y: 0,\n})\nonMounted(() => {\n if (!shapeCanvasRef.value) return\n const { x, y } = shapeCanvasRef.value.getBoundingClientRect()\n offset.value = { x, y }\n})\n\nconst mousePosition = ref<[number, number]>()\nconst points = ref<[number, number][]>([])\nconst closed = ref(false)\n\nconst getPoint = (e: MouseEvent) => {\n let pageX = e.pageX - offset.value.x\n let pageY = e.pageY - offset.value.y\n\n if (ctrlOrShiftKeyActive.value && points.value.length) {\n const [lastPointX, lastPointY] = points.value[points.value.length - 1]\n if (Math.abs(lastPointX - pageX) - Math.abs(lastPointY - pageY) > 0) {\n pageY = lastPointY\n }\n else pageX = lastPointX\n }\n return { pageX, pageY }\n}\n\nconst updateMousePosition = (e: MouseEvent) => {\n const { pageX, pageY } = getPoint(e)\n mousePosition.value = [pageX, pageY]\n\n if (points.value.length >= 2) {\n const [firstPointX, firstPointY] = points.value[0]\n if (Math.abs(firstPointX - pageX) < 5 && Math.abs(firstPointY - pageY) < 5) {\n closed.value = true\n }\n else closed.value = false\n }\n else closed.value = false\n}\n\nconst path = computed(() => {\n let d = ''\n for (let i = 0; i < points.value.length; i++) {\n const point = points.value[i]\n if (i === 0) d += `M ${point[0]} ${point[1]} `\n else d += `L ${point[0]} ${point[1]} `\n }\n if (points.value.length && mousePosition.value) {\n d += `L ${mousePosition.value[0]} ${mousePosition.value[1]}`\n }\n return d\n})\n\nconst addPoint = (e: MouseEvent) => {\n const { pageX, pageY } = getPoint(e)\n\n if (closed.value) {\n const xList = points.value.map(item => item[0])\n const yList = points.value.map(item => item[1])\n const minX = Math.min(...xList)\n const minY = Math.min(...yList)\n const maxX = Math.max(...xList)\n const maxY = Math.max(...yList)\n\n const formatedPoints = points.value.map(point => {\n return [point[0] - minX, point[1] - minY]\n })\n let path = ''\n for (let i = 0; i < formatedPoints.length; i++) {\n const point = formatedPoints[i]\n if (i === 0) path += `M ${point[0]} ${point[1]} `\n else path += `L ${point[0]} ${point[1]} `\n }\n path += 'Z'\n \n emit('created', {\n start: [minX + offset.value.x, minY + offset.value.y],\n end: [maxX + offset.value.x, maxY + offset.value.y],\n path,\n viewBox: [maxX - minX, maxY - minY],\n })\n }\n else points.value.push([pageX, pageY])\n}\n\nconst close = () => {\n mainStore.setCreatingCustomShapeState(false)\n}\n\nconst keydownListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ESC) close()\n}\nonMounted(() => {\n message.success('点击开始绘制任意多边形,首尾闭合完成绘制,按 ESC 键或鼠标右键关闭')\n document.addEventListener('keydown', keydownListener)\n})\nonUnmounted(() => document.removeEventListener('keydown', keydownListener))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"shape-create-canvas\",\n ref_key: \"shapeCanvasRef\",\n ref: shapeCanvasRef,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => addPoint($event), [\"stop\"])),\n onMousemove: _cache[1] || (_cache[1] = $event => updateMousePosition($event)),\n onContextmenu: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (close()), [\"stop\",\"prevent\"]))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, [\n _createElementVNode(\"path\", {\n d: path.value,\n stroke: \"#d14424\",\n fill: closed.value ? 'rgba(226, 83, 77, 0.15)' : 'none',\n \"stroke-width\": \"2\"\n }, null, 8, _hoisted_2)\n ]))\n ], 544))\n}\n}\n\n})","\n\n\n\n","import script from \"./ShapeCreateCanvas.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeCreateCanvas.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeCreateCanvas.vue?vue&type=style&index=0&id=224f36be&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-224f36be\"]])\n\nexport default __exports__","import { computed, type Ref } from 'vue'\nimport { OperateResizeHandlers, OperateBorderLines } from '@/types/edit'\n\nexport default (width: Ref, height: Ref) => {\n // 元素缩放点\n const resizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.LEFT_TOP, style: {} },\n { direction: OperateResizeHandlers.TOP, style: {left: width.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT_TOP, style: {left: width.value + 'px'} },\n { direction: OperateResizeHandlers.LEFT, style: {top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT, style: {left: width.value + 'px', top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.LEFT_BOTTOM, style: {top: height.value + 'px'} },\n { direction: OperateResizeHandlers.BOTTOM, style: {left: width.value / 2 + 'px', top: height.value + 'px'} },\n { direction: OperateResizeHandlers.RIGHT_BOTTOM, style: {left: width.value + 'px', top: height.value + 'px'} },\n ]\n })\n\n // 文本元素缩放点\n const textElementResizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.LEFT, style: {top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT, style: {left: width.value + 'px', top: height.value / 2 + 'px'} },\n ]\n })\n const verticalTextElementResizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.TOP, style: {left: width.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.BOTTOM, style: {left: width.value / 2 + 'px', top: height.value + 'px'} },\n ]\n })\n\n // 元素选中边框线\n const borderLines = computed(() => {\n return [\n { type: OperateBorderLines.T, style: {width: width.value + 'px'} },\n { type: OperateBorderLines.B, style: {top: height.value + 'px', width: width.value + 'px'} },\n { type: OperateBorderLines.L, style: {height: height.value + 'px'} },\n { type: OperateBorderLines.R, style: {left: width.value + 'px', height: height.value + 'px'} },\n ]\n })\n\n return {\n resizeHandlers,\n textElementResizeHandlers,\n verticalTextElementResizeHandlers,\n borderLines,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { OperateResizeHandlers } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ResizeHandler',\n props: {\n type: {},\n rotate: { default: 0 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst rotateClassName = computed(() => {\n const prefix = 'rotate-'\n const rotate = props.rotate\n if (rotate > -22.5 && rotate <= 22.5) return prefix + 0\n else if (rotate > 22.5 && rotate <= 67.5) return prefix + 45\n else if (rotate > 67.5 && rotate <= 112.5) return prefix + 90\n else if (rotate > 112.5 && rotate <= 157.5) return prefix + 135\n else if (rotate > 157.5 || rotate <= -157.5) return prefix + 0\n else if (rotate > -157.5 && rotate <= -112.5) return prefix + 45\n else if (rotate > -112.5 && rotate <= -67.5) return prefix + 90\n else if (rotate > -67.5 && rotate <= -22.5) return prefix + 135\n return prefix + 0\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['resize-handler', rotateClassName.value, _ctx.type])\n }, null, 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./ResizeHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ResizeHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ResizeHandler.vue?vue&type=style&index=0&id=1e66197f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1e66197f\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport type { OperateBorderLines } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BorderLine',\n props: {\n type: {},\n isWide: { type: Boolean, default: false }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['border-line', _ctx.type, { 'wide': _ctx.isWide }])\n }, null, 2))\n}\n}\n\n})","import script from \"./BorderLine.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BorderLine.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BorderLine.vue?vue&type=style&index=0&id=8346cf6c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8346cf6c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed, ref, watchEffect } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { getElementListRange } from '@/utils/element'\nimport type { OperateResizeHandlers, MultiSelectRange } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MultiSelectOperate',\n props: {\n elementList: {},\n scaleMultiElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { activeElementIdList, canvasScale } = storeToRefs(useMainStore())\n\nconst localActiveElementList = computed(() => props.elementList.filter(el => activeElementIdList.value.includes(el.id)))\n\nconst range = ref({\n minX: 0,\n maxX: 0,\n minY: 0,\n maxY: 0,\n})\n\n// 根据多选元素整体在画布中的范围,计算边框线和缩放点的位置信息\nconst width = computed(() => (range.value.maxX - range.value.minX) * canvasScale.value)\nconst height = computed(() => (range.value.maxY - range.value.minY) * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(width, height)\n\n// 计算多选元素整体在画布中的范围\nconst setRange = () => {\n const { minX, maxX, minY, maxY } = getElementListRange(localActiveElementList.value)\n range.value = { minX, maxX, minY, maxY }\n}\nwatchEffect(setRange)\n\n// 禁用多选状态下缩放:仅未旋转的图片和形状可以在多选状态下缩放\nconst disableResize = computed(() => {\n return localActiveElementList.value.some(item => {\n if (\n (item.type === 'image' || item.type === 'shape') && \n !item.rotate\n ) return false\n return true\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"multi-select-operate\",\n style: _normalizeStyle({\n left: range.value.minX * _unref(canvasScale) + 'px',\n top: range.value.minY * _unref(canvasScale) + 'px',\n })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (!disableResize.value)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n key: point.direction,\n type: point.direction,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers(($event: any) => (_ctx.scaleMultiElement($event, range.value, point.direction)), [\"stop\"])\n }, null, 8, [\"type\", \"style\", \"onMousedown\"]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MultiSelectOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MultiSelectOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MultiSelectOperate.vue?vue&type=style&index=0&id=97dc9b9a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-97dc9b9a\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./RotateHandler.vue?vue&type=template&id=b99d8dae&scoped=true\"\nconst script = {}\n\nimport \"./RotateHandler.vue?vue&type=style&index=0&id=b99d8dae&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b99d8dae\"]])\n\nexport default __exports__","\r\n\r\n\r\n\r\n\r\n\r\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore } from '@/store'\r\nimport type { PPTImageElement } from '@/types/slides'\r\nimport type { OperateResizeHandlers } from '@/types/edit'\r\nimport useCommonOperate from '../hooks/useCommonOperate'\r\n\r\nimport RotateHandler from './RotateHandler.vue'\r\nimport ResizeHandler from './ResizeHandler.vue'\r\nimport BorderLine from './BorderLine.vue'\r\n\r\n\r\nconst __default__ = {\r\n inheritAttrs: false,\r\n}\r\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'ImageElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n\r\n\r\nconst { canvasScale, clipingImageElementId } = storeToRefs(useMainStore())\r\n\r\nconst isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)\r\n\r\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\r\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\r\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"image-element-operate\", { 'cliping': isCliping.value }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./ImageElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageElementOperate.vue?vue&type=style&index=0&id=7bcad5a9&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7bcad5a9\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"text-element-operate\" }\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore } from '@/store'\r\nimport type { PPTTextElement } from '@/types/slides'\r\nimport type { OperateResizeHandlers } from '@/types/edit'\r\nimport useCommonOperate from '../hooks/useCommonOperate'\r\n\r\nimport RotateHandler from './RotateHandler.vue'\r\nimport ResizeHandler from './ResizeHandler.vue'\r\nimport BorderLine from './BorderLine.vue'\r\n\r\n\r\nconst __default__ = {\r\n inheritAttrs: false,\r\n}\r\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'TextElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n\r\n\r\nconst { canvasScale } = storeToRefs(useMainStore())\r\n\r\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\r\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\r\n\r\nconst { textElementResizeHandlers, verticalTextElementResizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\r\nconst resizeHandlers = computed(() => props.elementInfo.vertical ? verticalTextElementResizeHandlers.value : textElementResizeHandlers.value)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(resizeHandlers.value, (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./TextElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TextElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-d1eb5d90\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTShapeElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'ShapeElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function },\n moveShapeKeypoint: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nconst keypointStyle = computed(() => {\n if (!props.elementInfo.pathFormula || !props.elementInfo.keypoint) return {}\n\n const pathFormula = SHAPE_PATH_FORMULAS[props.elementInfo.pathFormula]\n if ('editable' in pathFormula) {\n const keypointPos = pathFormula.getBaseSize(props.elementInfo.width, props.elementInfo.height) * props.elementInfo.keypoint\n if (pathFormula.relative === 'left') return { left: keypointPos * canvasScale.value + 'px' }\n if (pathFormula.relative === 'right') return { left: (props.elementInfo.width - keypointPos) * canvasScale.value + 'px' }\n if (pathFormula.relative === 'center') return { left: (props.elementInfo.width - keypointPos) / 2 * canvasScale.value + 'px' }\n if (pathFormula.relative === 'top') return { top: keypointPos * canvasScale.value + 'px' }\n if (pathFormula.relative === 'bottom') return { top: (props.elementInfo.height - keypointPos) * canvasScale.value + 'px' }\n }\n return {}\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"]),\n (_ctx.elementInfo.keypoint !== undefined)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"operate-keypoint-handler\",\n style: _normalizeStyle(keypointStyle.value),\n onMousedown: _cache[1] || (_cache[1] = _withModifiers($event => _ctx.moveShapeKeypoint($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 36))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./ShapeElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeElementOperate.vue?vue&type=style&index=0&id=d1eb5d90&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-d1eb5d90\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, createBlock as _createBlock, unref as _unref, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3aa5cc44\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"line-element-operate\" }\nconst _hoisted_2 = [\"width\", \"height\", \"stroke\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_5 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_6 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_7 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTLineElement } from '@/types/slides'\nimport { OperateLineHandlers } from '@/types/edit'\n\nimport ResizeHandler from './ResizeHandler.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'LineElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n dragLineElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst svgWidth = computed(() => Math.max(props.elementInfo.start[0], props.elementInfo.end[0]))\nconst svgHeight = computed(() => Math.max(props.elementInfo.start[1], props.elementInfo.end[1]))\n\nconst resizeHandlers = computed(() => {\n const handlers = [\n {\n handler: OperateLineHandlers.START,\n style: {\n left: props.elementInfo.start[0] * canvasScale.value + 'px',\n top: props.elementInfo.start[1] * canvasScale.value + 'px',\n }\n },\n {\n handler: OperateLineHandlers.END,\n style: {\n left: props.elementInfo.end[0] * canvasScale.value + 'px',\n top: props.elementInfo.end[1] * canvasScale.value + 'px',\n }\n },\n ]\n\n if (props.elementInfo.curve || props.elementInfo.broken) {\n const ctrlHandler = (props.elementInfo.curve || props.elementInfo.broken) as [number, number]\n\n handlers.push({\n handler: OperateLineHandlers.C,\n style: {\n left: ctrlHandler[0] * canvasScale.value + 'px',\n top: ctrlHandler[1] * canvasScale.value + 'px',\n }\n })\n }\n else if (props.elementInfo.cubic) {\n const [ctrlHandler1, ctrlHandler2] = props.elementInfo.cubic\n handlers.push({\n handler: OperateLineHandlers.C1,\n style: {\n left: ctrlHandler1[0] * canvasScale.value + 'px',\n top: ctrlHandler1[1] * canvasScale.value + 'px',\n }\n })\n handlers.push({\n handler: OperateLineHandlers.C2,\n style: {\n left: ctrlHandler2[0] * canvasScale.value + 'px',\n top: ctrlHandler2[1] * canvasScale.value + 'px',\n }\n })\n }\n\n return handlers\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(resizeHandlers.value, (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.handler,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.dragLineElement($event, _ctx.elementInfo, point.handler), [\"stop\"])\n }, null, 8, [\"style\", \"onMousedown\"]))\n }), 128)),\n (_openBlock(), _createElementBlock(\"svg\", {\n width: svgWidth.value || 1,\n height: svgHeight.value || 1,\n stroke: _ctx.elementInfo.color,\n overflow: \"visible\",\n style: _normalizeStyle({ transform: `scale(${_unref(canvasScale)})` })\n }, [\n (_ctx.elementInfo.curve)\n ? (_openBlock(), _createElementBlock(\"g\", _hoisted_3, [\n _createElementVNode(\"line\", {\n class: \"anchor-line\",\n x1: _ctx.elementInfo.start[0],\n y1: _ctx.elementInfo.start[1],\n x2: _ctx.elementInfo.curve[0],\n y2: _ctx.elementInfo.curve[1]\n }, null, 8, _hoisted_4),\n _createElementVNode(\"line\", {\n class: \"anchor-line\",\n x1: _ctx.elementInfo.end[0],\n y1: _ctx.elementInfo.end[1],\n x2: _ctx.elementInfo.curve[0],\n y2: _ctx.elementInfo.curve[1]\n }, null, 8, _hoisted_5)\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.cubic)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(_ctx.elementInfo.cubic, (item, index) => {\n return (_openBlock(), _createElementBlock(\"g\", { key: index }, [\n (index === 0)\n ? (_openBlock(), _createElementBlock(\"line\", {\n key: 0,\n class: \"anchor-line\",\n x1: _ctx.elementInfo.start[0],\n y1: _ctx.elementInfo.start[1],\n x2: item[0],\n y2: item[1]\n }, null, 8, _hoisted_6))\n : _createCommentVNode(\"\", true),\n (index === 1)\n ? (_openBlock(), _createElementBlock(\"line\", {\n key: 1,\n class: \"anchor-line\",\n x1: _ctx.elementInfo.end[0],\n y1: _ctx.elementInfo.end[1],\n x2: item[0],\n y2: item[1]\n }, null, 8, _hoisted_7))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ], 12, _hoisted_2))\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./LineElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LineElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LineElementOperate.vue?vue&type=style&index=0&id=3aa5cc44&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3aa5cc44\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"table-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTTableElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'TableElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst outlineWidth = computed(() => props.elementInfo.outline.width || 1)\n\nconst scaleWidth = computed(() => (props.elementInfo.width + outlineWidth.value) * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\n\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./TableElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TableElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"common-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTVideoElement, PPTLatexElement, PPTAudioElement, PPTChartElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\ntype PPTElement = PPTVideoElement | PPTLatexElement | PPTAudioElement | PPTChartElement\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'CommonElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nconst cannotRotate = computed(() => ['chart', 'video', 'audio'].includes(props.elementInfo.type))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n (!cannotRotate.value)\n ? (_openBlock(), _createBlock(RotateHandler, {\n key: 0,\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./CommonElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CommonElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTElementLink } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport message from '@/utils/message'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const setLink = (handleElement: PPTElement, link: PPTElementLink) => {\n const linkRegExp = /^(https?):\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+([\\w\\-.,@?^=%&:\\/~+#]*[\\w\\-@?^=%&\\/~+#])?$/\n if (link.type === 'web' && !linkRegExp.test(link.target)) {\n message.error('不是正确的网页链接地址')\n return false\n }\n if (link.type === 'slide' && !link.target) {\n message.error('请先选择链接目标')\n return false\n }\n const props = { link }\n slidesStore.updateElement({ id: handleElement.id, props })\n addHistorySnapshot()\n\n return true\n }\n\n const removeLink = (handleElement: PPTElement) => {\n slidesStore.removeElementProps({ id: handleElement.id, propName: 'link' })\n addHistorySnapshot()\n }\n\n return {\n setLink,\n removeLink,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Divider',\n props: {\n type: { default: 'horizontal' },\n margin: { default: 0 }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['divider', _ctx.type]),\n style: _normalizeStyle({\n margin: _ctx.type === 'horizontal' ? `${_ctx.margin || 24}px 0` : `0 ${_ctx.margin || 8}px`\n })\n }, null, 6))\n}\n}\n\n})","import script from \"./Divider.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Divider.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Divider.vue?vue&type=style&index=0&id=6b66cde8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b66cde8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-316c4664\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"href\"]\nconst _hoisted_2 = { class: \"btns\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, PPTElementLink } from '@/types/slides'\nimport useLink from '@/hooks/useLink'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinkHandler',\n props: {\n elementInfo: {},\n link: {},\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { canvasScale } = storeToRefs(mainStore)\nconst { slides } = storeToRefs(slidesStore)\nconst { removeLink } = useLink()\nconst height = computed(() => props.elementInfo.type === 'line' ? 0 : props.elementInfo.height)\n\nconst turnTarget = (slideId: string) => {\n const targetIndex = slides.value.findIndex(item => item.id === slideId)\n if (targetIndex !== -1) {\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(targetIndex)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"link-handler\",\n style: _normalizeStyle({ top: height.value * _unref(canvasScale) + 10 + 'px' })\n }, [\n (_ctx.link.type === 'web')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n class: \"link\",\n href: _ctx.link.target,\n target: \"_blank\"\n }, _toDisplayString(_ctx.link.target), 9, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"a\", {\n key: 1,\n class: \"link\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (turnTarget(_ctx.link.target)))\n }, \"幻灯片页面 \" + _toDisplayString(_ctx.link.target), 1)),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.openLinkDialog()))\n }, \"更换\"),\n _createVNode(Divider, { type: \"vertical\" }),\n _createElementVNode(\"div\", {\n class: \"btn\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_unref(removeLink)(_ctx.elementInfo)))\n }, \"移除\")\n ])\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinkHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinkHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinkHandler.vue?vue&type=style&index=0&id=316c4664&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-316c4664\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, withModifiers as _withModifiers, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5ec1ff35\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"animation-index\"\n}\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\nimport {\r\n ElementTypes,\r\n type PPTElement,\r\n type PPTLineElement,\r\n type PPTVideoElement,\r\n type PPTAudioElement,\r\n type PPTShapeElement,\r\n type PPTChartElement,\r\n} from '@/types/slides'\r\nimport type { OperateLineHandlers, OperateResizeHandlers } from '@/types/edit'\r\n\r\nimport ImageElementOperate from './ImageElementOperate.vue'\r\nimport TextElementOperate from './TextElementOperate.vue'\r\nimport ShapeElementOperate from './ShapeElementOperate.vue'\r\nimport LineElementOperate from './LineElementOperate.vue'\r\nimport TableElementOperate from './TableElementOperate.vue'\r\nimport CommonElementOperate from './CommonElementOperate.vue'\r\nimport LinkHandler from './LinkHandler.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n isSelected: { type: Boolean },\n isActive: { type: Boolean },\n isActiveGroupElement: { type: Boolean },\n isMultiSelect: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function },\n dragLineElement: { type: Function },\n moveShapeKeypoint: { type: Function },\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n\r\n\r\nconst { canvasScale, toolbarState } = storeToRefs(useMainStore())\r\nconst { formatedAnimations } = storeToRefs(useSlidesStore())\r\n\r\nconst currentOperateComponent = computed(() => {\r\n const elementTypeMap = {\r\n [ElementTypes.IMAGE]: ImageElementOperate,\r\n [ElementTypes.TEXT]: TextElementOperate,\r\n [ElementTypes.SHAPE]: ShapeElementOperate,\r\n [ElementTypes.LINE]: LineElementOperate,\r\n [ElementTypes.TABLE]: TableElementOperate,\r\n [ElementTypes.CHART]: CommonElementOperate,\r\n [ElementTypes.LATEX]: CommonElementOperate,\r\n [ElementTypes.VIDEO]: CommonElementOperate,\r\n [ElementTypes.AUDIO]: CommonElementOperate,\r\n }\r\n return elementTypeMap[props.elementInfo.type] || null\r\n})\r\n\r\nconst elementIndexListInAnimation = computed(() => {\r\n const indexList = []\r\n for (let i = 0; i < formatedAnimations.value.length; i++) {\r\n const elIds = formatedAnimations.value[i].animations.map(item => item.elId)\r\n if (elIds.includes(props.elementInfo.id)) indexList.push(i)\r\n }\r\n return indexList\r\n})\r\n\r\nconst rotate = computed(() => 'rotate' in props.elementInfo ? props.elementInfo.rotate : 0)\r\nconst height = computed(() => 'height' in props.elementInfo ? props.elementInfo.height : 0)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"operate\", { 'multi-select': _ctx.isMultiSelect && !_ctx.isActive }]),\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top * _unref(canvasScale) + 'px',\r\n left: _ctx.elementInfo.left * _unref(canvasScale) + 'px',\r\n transform: `rotate(${rotate.value}deg)`,\r\n transformOrigin: `${_ctx.elementInfo.width * _unref(canvasScale) / 2}px ${height.value * _unref(canvasScale) / 2}px`,\r\n })\n }, [\n (_ctx.isSelected)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(currentOperateComponent.value), {\n key: 0,\n elementInfo: _ctx.elementInfo,\n handlerVisible: !_ctx.elementInfo.lock && (_ctx.isActiveGroupElement || !_ctx.isMultiSelect),\n rotateElement: _ctx.rotateElement,\n scaleElement: _ctx.scaleElement,\n dragLineElement: _ctx.dragLineElement,\n moveShapeKeypoint: _ctx.moveShapeKeypoint\n }, null, 8, [\"elementInfo\", \"handlerVisible\", \"rotateElement\", \"scaleElement\", \"dragLineElement\", \"moveShapeKeypoint\"]))\n : _createCommentVNode(\"\", true),\n (_unref(toolbarState) === 'elAnimation' && elementIndexListInAnimation.value.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementIndexListInAnimation.value, (index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"index-item\",\n key: index\n }, _toDisplayString(index + 1), 1))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.isActive && _ctx.elementInfo.link)\n ? (_openBlock(), _createBlock(LinkHandler, {\n key: 2,\n elementInfo: _ctx.elementInfo,\n link: _ctx.elementInfo.link,\n openLinkDialog: _ctx.openLinkDialog,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 8, [\"elementInfo\", \"link\", \"openLinkDialog\"]))\n : _createCommentVNode(\"\", true)\n ], 6))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5ec1ff35&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5ec1ff35\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-24fef706\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nimport { computed } from 'vue'\nimport type { PPTImageElement } from '@/types/slides'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useClipImage from './useClipImage'\nimport useFilter from './useFilter'\n\nimport ImageOutline from './ImageOutline/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseImageElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape, imgPosition } = useClipImage(clip)\n\nconst filters = computed(() => props.elementInfo.filters)\nconst { filter } = useFilter(filters)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-image\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n })\n }, [\n _createVNode(ImageOutline, { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]),\n _createElementVNode(\"div\", {\n class: \"image-content\",\n style: _normalizeStyle({ clipPath: _unref(clipShape).style })\n }, [\n _createElementVNode(\"img\", {\n src: _ctx.elementInfo.src,\n draggable: false,\n style: _normalizeStyle({\n top: _unref(imgPosition).top,\n left: _unref(imgPosition).left,\n width: _unref(imgPosition).width,\n height: _unref(imgPosition).height,\n filter: _unref(filter),\n }),\n alt: \"\"\n }, null, 12, _hoisted_1),\n (_ctx.elementInfo.colorMask)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"color-mask\",\n style: _normalizeStyle({\n backgroundColor: _ctx.elementInfo.colorMask,\n })\n }, null, 4))\n : _createCommentVNode(\"\", true)\n ], 4)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseImageElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseImageElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseImageElement.vue?vue&type=style&index=0&id=24fef706&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-24fef706\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-52a206f2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport type { PPTTextElement } from '@/types/slides'\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\n\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTextElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-text\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n width: _ctx.elementInfo.vertical ? 'auto' : _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.vertical ? _ctx.elementInfo.height + 'px' : 'auto',\n backgroundColor: _ctx.elementInfo.fill,\n opacity: _ctx.elementInfo.opacity,\n textShadow: _unref(shadowStyle),\n lineHeight: _ctx.elementInfo.lineHeight,\n letterSpacing: (_ctx.elementInfo.wordSpace || 0) + 'px',\n color: _ctx.elementInfo.defaultColor,\n fontFamily: _ctx.elementInfo.defaultFontName,\n writingMode: _ctx.elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',\n })\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createElementVNode(\"div\", {\n class: \"text ProseMirror-static\",\n style: _normalizeStyle({\n '--paragraphSpace': `${_ctx.elementInfo.paragraphSpace === undefined ? 5 : _ctx.elementInfo.paragraphSpace}px`,\n }),\n innerHTML: _ctx.elementInfo.content\n }, null, 12, _hoisted_1)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseTextElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseTextElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseTextElement.vue?vue&type=style&index=0&id=52a206f2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52a206f2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b13f8fa8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\", \"fill\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\nconst _hoisted_5 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport type { PPTShapeElement, ShapeText } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\n\nimport GradientDefs from './GradientDefs.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseShapeElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst outline = computed(() => props.elementInfo.outline)\nconst { outlineWidth, outlineColor, strokeDashArray } = useElementOutline(outline)\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst text = computed(() => {\n const defaultText: ShapeText = {\n content: '',\n defaultFontName: '微软雅黑',\n defaultColor: '#000',\n align: 'middle',\n }\n if (!props.elementInfo.text) return defaultText\n\n return props.elementInfo.text\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-shape\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n opacity: _ctx.elementInfo.opacity,\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n color: text.value.defaultColor,\n fontFamily: text.value.defaultFontName,\n })\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height\n }, [\n (_ctx.elementInfo.gradient)\n ? (_openBlock(), _createElementBlock(\"defs\", _hoisted_2, [\n _createVNode(GradientDefs, {\n id: `base-gradient-${_ctx.elementInfo.id}`,\n type: _ctx.elementInfo.gradient.type,\n color1: _ctx.elementInfo.gradient.color[0],\n color2: _ctx.elementInfo.gradient.color[1],\n rotate: _ctx.elementInfo.gradient.rotate\n }, null, 8, [\"id\", \"type\", \"color1\", \"color2\", \"rotate\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n d: _ctx.elementInfo.path,\n fill: _ctx.elementInfo.gradient ? `url(#base-gradient-${_ctx.elementInfo.id})` : _ctx.elementInfo.fill,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_1)),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"shape-text\", text.value.align])\n }, [\n _createElementVNode(\"div\", {\n class: \"ProseMirror-static\",\n innerHTML: text.value.content\n }, null, 8, _hoisted_5)\n ], 2)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseShapeElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseShapeElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseShapeElement.vue?vue&type=style&index=0&id=b13f8fa8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b13f8fa8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-443e2f82\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\n\nimport { computed } from 'vue'\nimport type { PPTLineElement } from '@/types/slides'\nimport { getLineElementPath } from '@/utils/element'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\nimport LinePointMarker from './LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseLineElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst svgWidth = computed(() => {\n const width = Math.abs(props.elementInfo.start[0] - props.elementInfo.end[0])\n return width < 24 ? 24 : width\n})\nconst svgHeight = computed(() => {\n const height = Math.abs(props.elementInfo.start[1] - props.elementInfo.end[1])\n return height < 24 ? 24 : height\n})\n\nconst lineDashArray = computed(() => {\n if (props.elementInfo.style !== 'dashed') return '0 0'\n const size = props.elementInfo.width\n return size <= 8 ? `${size * 5} ${size * 2.5}` : `${size * 5} ${size * 1.5}`\n})\n\nconst path = computed(() => {\n return getLineElementPath(props.elementInfo)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-line\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '' })\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: svgWidth.value,\n height: svgHeight.value\n }, [\n _createElementVNode(\"defs\", null, [\n (_ctx.elementInfo.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n id: _ctx.elementInfo.id,\n position: \"start\",\n type: _ctx.elementInfo.points[0],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n id: _ctx.elementInfo.id,\n position: \"end\",\n type: _ctx.elementInfo.points[1],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n d: path.value,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.width,\n \"stroke-dasharray\": lineDashArray.value,\n fill: \"none\",\n \"marker-start\": _ctx.elementInfo.points[0] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[0]}-start)` : '',\n \"marker-end\": _ctx.elementInfo.points[1] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[1]}-end)` : ''\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseLineElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseLineElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseLineElement.vue?vue&type=style&index=0&id=443e2f82&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-443e2f82\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed, inject, ref } from 'vue'\r\nimport type { PPTChartElement } from '@/types/slides'\r\nimport { injectKeySlideScale } from '@/types/injectKey'\r\n\r\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\r\nimport Chart from './Chart.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseChartElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\r\n\r\n\r\nconst slideScale = inject(injectKeySlideScale) || ref(1)\r\n\r\nconst needScaleSize = computed(() => slideScale.value < 1)\r\nconst zoom = computed(() => needScaleSize.value ? 1 / slideScale.value : 1)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-chart\",\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top + 'px',\r\n left: _ctx.elementInfo.left + 'px',\r\n width: _ctx.elementInfo.width + 'px',\r\n height: _ctx.elementInfo.height + 'px',\r\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\r\n backgroundColor: _ctx.elementInfo.fill,\r\n })\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(Chart, {\n width: _ctx.elementInfo.width * zoom.value,\n height: _ctx.elementInfo.height * zoom.value,\n type: _ctx.elementInfo.chartType,\n data: _ctx.elementInfo.data,\n options: _ctx.elementInfo.options,\n themeColor: _ctx.elementInfo.themeColor,\n gridColor: _ctx.elementInfo.gridColor,\n legends: _ctx.elementInfo.data.legends,\n legend: _ctx.elementInfo.legend || '',\n style: _normalizeStyle({ zoom: 1 / zoom.value })\n }, null, 8, [\"width\", \"height\", \"type\", \"data\", \"options\", \"themeColor\", \"gridColor\", \"legends\", \"legend\", \"style\"])\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./BaseChartElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseChartElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseChartElement.vue?vue&type=style&index=0&id=7c03d68d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7c03d68d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, vShow as _vShow, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5d949d4d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\"]\nconst _hoisted_2 = [\"rowspan\", \"colspan\"]\nconst _hoisted_3 = [\"innerHTML\"]\n\nimport { computed, ref, watch } from 'vue'\nimport type { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'\nimport { getTextStyle, formatText } from './utils'\nimport useHideCells from './useHideCells'\nimport useSubThemeColor from './useSubThemeColor'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'StaticTable',\n props: {\n data: {},\n width: {},\n cellMinHeight: {},\n colWidths: {},\n outline: {},\n theme: {},\n editable: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst colSizeList = ref([])\nconst totalWidth = computed(() => colSizeList.value.reduce((a, b) => a + b))\n\nwatch([\n () => props.colWidths,\n () => props.width,\n], () => {\n colSizeList.value = props.colWidths.map(item => item * props.width)\n}, { immediate: true })\n\nconst cells = computed(() => props.data)\nconst { hideCells } = useHideCells(cells)\n\nconst theme = computed(() => props.theme)\nconst { subThemeColor } = useSubThemeColor(theme)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"static-table\",\n style: _normalizeStyle({ width: totalWidth.value + 'px' })\n }, [\n _createElementVNode(\"table\", {\n class: _normalizeClass({\n 'theme': theme.value,\n 'row-header': theme.value?.rowHeader,\n 'row-footer': theme.value?.rowFooter,\n 'col-header': theme.value?.colHeader,\n 'col-footer': theme.value?.colFooter,\n }),\n style: _normalizeStyle(`--themeColor: ${theme.value?.color}; --subThemeColor1: ${_unref(subThemeColor)[0]}; --subThemeColor2: ${_unref(subThemeColor)[1]}`)\n }, [\n _createElementVNode(\"colgroup\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(colSizeList.value, (width, index) => {\n return (_openBlock(), _createElementBlock(\"col\", {\n span: \"1\",\n key: index,\n width: width\n }, null, 8, _hoisted_1))\n }), 128))\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.data, (rowCells, rowIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: rowIndex,\n style: _normalizeStyle({ height: _ctx.cellMinHeight + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rowCells, (cell, colIndex) => {\n return _withDirectives((_openBlock(), _createElementBlock(\"td\", {\n class: \"cell\",\n style: _normalizeStyle({\n borderStyle: _ctx.outline.style,\n borderColor: _ctx.outline.color,\n borderWidth: _ctx.outline.width + 'px',\n ..._unref(getTextStyle)(cell.style),\n }),\n key: cell.id,\n rowspan: cell.rowspan,\n colspan: cell.colspan\n }, [\n _createElementVNode(\"div\", {\n class: \"cell-text\",\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n innerHTML: _unref(formatText)(cell.text)\n }, null, 12, _hoisted_3)\n ], 12, _hoisted_2)), [\n [_vShow, !_unref(hideCells).includes(`${rowIndex}_${colIndex}`)]\n ])\n }), 128))\n ], 4))\n }), 128))\n ])\n ], 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./StaticTable.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./StaticTable.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./StaticTable.vue?vue&type=style&index=0&id=5d949d4d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5d949d4d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eff7eba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport type { PPTTableElement } from '@/types/slides'\n\nimport StaticTable from './StaticTable.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTableElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-table\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(StaticTable, {\n data: _ctx.elementInfo.data,\n width: _ctx.elementInfo.width,\n cellMinHeight: _ctx.elementInfo.cellMinHeight,\n colWidths: _ctx.elementInfo.colWidths,\n outline: _ctx.elementInfo.outline,\n theme: _ctx.elementInfo.theme\n }, null, 8, [\"data\", \"width\", \"cellMinHeight\", \"colWidths\", \"outline\", \"theme\"])\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseTableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseTableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseTableElement.vue?vue&type=style&index=0&id=3eff7eba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eff7eba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1587280d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\nconst _hoisted_2 = [\"width\", \"height\", \"stroke\", \"stroke-width\"]\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\"]\n\nimport type { PPTLatexElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseLatexElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-latex\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.strokeWidth,\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n d: _ctx.elementInfo.path\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_2))\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseLatexElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseLatexElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseLatexElement.vue?vue&type=style&index=0&id=1587280d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1587280d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport type { PPTVideoElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseVideoElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-video\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ backgroundImage: _ctx.elementInfo.poster ? `url(${_ctx.elementInfo.poster})` : '' })\n }, [\n _createVNode(_component_IconPlayOne, { class: \"icon\" })\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseVideoElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseVideoElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseVideoElement.vue?vue&type=style&index=0&id=09436dde&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-09436dde\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5da834d7\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { computed } from 'vue'\nimport type { PPTAudioElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseAudioElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-audio\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n })\n }, null, 8, [\"style\"])\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseAudioElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseAudioElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseAudioElement.vue?vue&type=style&index=0&id=5da834d7&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5da834d7\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\n\nimport BaseImageElement from '@/views/components/element/ImageElement/BaseImageElement.vue'\nimport BaseTextElement from '@/views/components/element/TextElement/BaseTextElement.vue'\nimport BaseShapeElement from '@/views/components/element/ShapeElement/BaseShapeElement.vue'\nimport BaseLineElement from '@/views/components/element/LineElement/BaseLineElement.vue'\nimport BaseChartElement from '@/views/components/element/ChartElement/BaseChartElement.vue'\nimport BaseTableElement from '@/views/components/element/TableElement/BaseTableElement.vue'\nimport BaseLatexElement from '@/views/components/element/LatexElement/BaseLatexElement.vue'\nimport BaseVideoElement from '@/views/components/element/VideoElement/BaseVideoElement.vue'\nimport BaseAudioElement from '@/views/components/element/AudioElement/BaseAudioElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ThumbnailElement',\n props: {\n elementInfo: {},\n elementIndex: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: BaseImageElement,\n [ElementTypes.TEXT]: BaseTextElement,\n [ElementTypes.SHAPE]: BaseShapeElement,\n [ElementTypes.LINE]: BaseLineElement,\n [ElementTypes.CHART]: BaseChartElement,\n [ElementTypes.TABLE]: BaseTableElement,\n [ElementTypes.LATEX]: BaseLatexElement,\n [ElementTypes.VIDEO]: BaseVideoElement,\n [ElementTypes.AUDIO]: BaseAudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"base-element\", `base-element-${_ctx.elementInfo.id}`]),\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n target: \"thumbnail\"\n }, null, 8, [\"elementInfo\"]))\n ], 6))\n}\n}\n\n})","\n\n","import script from \"./ThumbnailElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ThumbnailElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43dcaa52\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"placeholder\"\n}\n\nimport { computed, provide } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\nimport ThumbnailElement from './ThumbnailElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n slide: {},\n size: {},\n visible: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => props.slide.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst scale = computed(() => props.size / VIEWPORT_SIZE)\nprovide(injectKeySlideScale, scale)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"thumbnail-slide\",\n style: _normalizeStyle({\n width: _ctx.size + 'px',\n height: _ctx.size * _unref(viewportRatio) + 'px',\n })\n }, [\n (_ctx.visible)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"elements\",\n style: _normalizeStyle({\n width: _unref(VIEWPORT_SIZE) + 'px',\n height: _unref(VIEWPORT_SIZE) * _unref(viewportRatio) + 'px',\n transform: `scale(${scale.value})`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.slide.elements, (element, index) => {\n return (_openBlock(), _createBlock(ThumbnailElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1\n }, null, 8, [\"elementInfo\", \"elementIndex\"]))\n }), 128))\n ], 4))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_1, \"加载中 ...\"))\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=43dcaa52&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43dcaa52\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e3d7626\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { type CSSProperties } from 'vue'\n\ninterface TabItem {\n key: string\n label: string\n color?: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Tabs',\n props: {\n value: {},\n tabs: {},\n card: { type: Boolean, default: false },\n tabsStyle: {},\n tabStyle: {},\n spaceAround: { type: Boolean, default: false },\n spaceBetween: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs\", {\n 'card': _ctx.card,\n 'space-around': _ctx.spaceAround,\n 'space-between': _ctx.spaceBetween,\n }]),\n style: _normalizeStyle(_ctx.tabsStyle || {})\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.tabs, (tab) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tab\", { 'active': tab.key === _ctx.value }]),\n key: tab.key,\n style: _normalizeStyle({\n ...(_ctx.tabStyle || {}),\n '--color': tab.color,\n }),\n onClick: ($event: any) => (emit('update:value', tab.key))\n }, _toDisplayString(tab.label), 15, _hoisted_1))\n }), 128))\n ], 6))\n}\n}\n\n})","import script from \"./Tabs.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Tabs.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Tabs.vue?vue&type=style&index=0&id=5e3d7626&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5e3d7626\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Button',\n props: {\n checked: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n type: { default: 'default' },\n size: { default: 'normal' },\n first: { type: Boolean, default: false },\n last: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst handleClick = () => {\n if (props.disabled) return\n emit('click')\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n class: _normalizeClass([\"button\", {\n 'disabled': _ctx.disabled,\n 'checked': !_ctx.disabled && _ctx.checked,\n 'default': !_ctx.disabled && _ctx.type === 'default',\n 'primary': !_ctx.disabled && _ctx.type === 'primary',\n 'checkbox': !_ctx.disabled && _ctx.type === 'checkbox',\n 'radio': !_ctx.disabled && _ctx.type === 'radio',\n 'small': _ctx.size === 'small',\n 'first': _ctx.first,\n 'last': _ctx.last,\n }]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (handleClick()))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./Button.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Button.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Button.vue?vue&type=style&index=0&id=52c90330&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52c90330\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bf3b141\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"select-wrap\"\n}\nconst _hoisted_2 = { class: \"selector\" }\nconst _hoisted_3 = { class: \"icon\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = { class: \"selector\" }\nconst _hoisted_6 = { class: \"icon\" }\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport Popover from './Popover.vue'\n\ninterface SelectOption {\n label: string\n value: string | number\n disabled?: boolean\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Select',\n props: {\n value: {},\n options: {},\n disabled: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\nconst showLabel = computed(() => {\n return props.options.find(item => item.value === props.value)?.label || props.value\n})\n\n\n\nconst popoverVisible = ref(false)\nconst selectRef = ref()\nconst width = ref(0)\n\nconst updateWidth = () => {\n if (!selectRef.value) return\n width.value = selectRef.value.clientWidth\n}\nconst resizeObserver = new ResizeObserver(updateWidth)\nonMounted(() => {\n if (!selectRef.value) return\n resizeObserver.observe(selectRef.value)\n})\nonUnmounted(() => {\n if (!selectRef.value) return\n resizeObserver.unobserve(selectRef.value)\n})\n\nconst handleSelect = (option: SelectOption) => {\n if (option.disabled) return\n\n emit('update:value', option.value)\n popoverVisible.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n\n return (_ctx.disabled)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"select disabled\",\n ref_key: \"selectRef\",\n ref: selectRef\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(_ctx.value), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _createVNode(_component_IconDown, { size: 14 })\n ])\n ])\n ], 512)\n ]))\n : (_openBlock(), _createBlock(Popover, {\n key: 1,\n class: \"select-wrap\",\n trigger: \"click\",\n value: popoverVisible.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((popoverVisible).value = $event)),\n placement: \"bottom\",\n contentStyle: {\n padding: 0,\n boxShadow: '0 6px 16px 0 rgba(0, 0, 0, 0.08)',\n }\n }, {\n content: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"options\",\n style: _normalizeStyle({ width: width.value + 2 + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.options, (option) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"option\", {\n 'disabled': option.disabled,\n 'selected': option.value === _ctx.value,\n }]),\n key: option.value,\n onClick: ($event: any) => (handleSelect(option))\n }, _toDisplayString(option.label), 11, _hoisted_4))\n }), 128))\n ], 4)\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"select\",\n ref_key: \"selectRef\",\n ref: selectRef\n }, [\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(showLabel.value), 1),\n _createElementVNode(\"div\", _hoisted_6, [\n _renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _createVNode(_component_IconDown, { size: 14 })\n ])\n ])\n ], 512)\n ]),\n _: 3\n }, 8, [\"value\", \"contentStyle\"]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Select.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Select.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=5bf3b141&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bf3b141\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-cc39ee16\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"link-dialog\" }\nconst _hoisted_2 = {\n key: 2,\n class: \"preview\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \"预览:\", -1))\nconst _hoisted_4 = { class: \"btns\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElementLink } from '@/types/slides'\nimport useLink from '@/hooks/useLink'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\nimport Select from '@/components/Select.vue'\n\ntype TypeKey = 'web' | 'slide'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinkDialog',\n emits: [\"close\"],\n setup(__props, { emit }) {\n\n\n\nconst { handleElement } = storeToRefs(useMainStore())\nconst { slides, currentSlide } = storeToRefs(useSlidesStore())\n\nconst type = ref('web')\nconst address = ref('')\nconst slideId = ref('')\n\nconst slideOptions = computed(() => {\n return slides.value.map((item, index) => ({\n label: `幻灯片 ${index + 1}`,\n value: item.id,\n disabled: currentSlide.value.id === item.id,\n }))\n})\n\nslideId.value = slides.value.find(item => item.id !== currentSlide.value.id)?.id || ''\n\nconst selectedSlide = computed(() => {\n if (!slideId.value) return null\n\n return slides.value.find(item => item.id === slideId.value) || null\n})\n\nconst tabs: TabItem[] = [\n { key: 'web', label: '网页链接' },\n { key: 'slide', label: '幻灯片页面' },\n]\n\nconst { setLink } = useLink()\n\nonMounted(() => {\n if (handleElement.value?.link) {\n if (handleElement.value.link.type === 'web') address.value = handleElement.value.link.target\n else if (handleElement.value.link.type === 'slide') slideId.value = handleElement.value.link.target\n\n type.value = handleElement.value.link.type\n }\n})\n\nconst save = () => {\n const link: PPTElementLink = {\n type: type.value,\n target: type.value === 'web' ? address.value : slideId.value,\n }\n if (handleElement.value) {\n const success = setLink(handleElement.value, link)\n if (success) emit('close')\n else address.value = ''\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((type).value = $event)),\n tabsStyle: { marginBottom: '20px' }\n }, null, 8, [\"value\"]),\n (type.value === 'web')\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"input\",\n value: address.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((address).value = $event)),\n placeholder: \"请输入网页链接地址\"\n }, null, 8, [\"value\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'slide')\n ? (_openBlock(), _createBlock(Select, {\n key: 1,\n class: \"input\",\n value: slideId.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((slideId).value = $event)),\n options: slideOptions.value\n }, null, 8, [\"value\", \"options\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'slide' && selectedSlide.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _hoisted_3,\n _createVNode(ThumbnailSlide, {\n class: \"thumbnail\",\n slide: selectedSlide.value,\n size: 500\n }, null, 8, [\"slide\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(Button, {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (save()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinkDialog.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinkDialog.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinkDialog.vue?vue&type=style&index=0&id=cc39ee16&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-cc39ee16\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, vShow as _vShow, normalizeStyle as _normalizeStyle, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, withKeys as _withKeys, Teleport as _Teleport, createBlock as _createBlock } from \"vue\"\n\nimport { computed, nextTick, ref, watch, type CSSProperties } from 'vue'\nimport { icons } from '@/plugins/icon'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Modal',\n props: {\n visible: { type: Boolean },\n width: { default: 480 },\n closeButton: { type: Boolean, default: false },\n closeOnClickMask: { type: Boolean, default: true },\n closeOnEsc: { type: Boolean, default: true },\n contentStyle: {}\n },\n emits: [\"update:visible\", \"closed\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\nconst { IconClose } = icons\n\n\n\nconst modalRef = ref()\n\n\n\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return {\n width: props.width + 'px',\n ...(props.contentStyle || {})\n }\n})\n\nwatch(() => props.visible, () => {\n if (props.visible) {\n nextTick(() => modalRef.value!.focus())\n }\n})\n\nconst close = () => {\n emit('update:visible', false)\n emit('closed')\n}\n\nconst onEsc = () => {\n if (props.visible && props.closeOnEsc) close()\n}\n\nconst onClickMask = () => {\n if (props.closeOnClickMask) close()\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, { name: \"modal-fade\" }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"modal\",\n ref_key: \"modalRef\",\n ref: modalRef,\n tabindex: \"-1\",\n onKeyup: _cache[4] || (_cache[4] = _withKeys(($event: any) => (onEsc()), [\"esc\"]))\n }, [\n _createElementVNode(\"div\", {\n class: \"mask\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (onClickMask()))\n }),\n _createVNode(_Transition, {\n name: \"modal-zoom\",\n onAfterLeave: _cache[2] || (_cache[2] = ($event: any) => (contentVisible.value = false)),\n onBeforeEnter: _cache[3] || (_cache[3] = ($event: any) => (contentVisible.value = true))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"modal-content\",\n style: _normalizeStyle(contentStyle.value)\n }, [\n (_ctx.closeButton)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: \"close-btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (close()))\n }, [\n _createVNode(_unref(IconClose))\n ]))\n : _createCommentVNode(\"\", true),\n (contentVisible.value)\n ? _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n : _createCommentVNode(\"\", true)\n ], 4), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n })\n ], 544), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=fea8edcc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-fea8edcc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, vShow as _vShow, withDirectives as _withDirectives, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, withCtx as _withCtx, resolveDirective as _resolveDirective, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-ce64755c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"operates\" }\nconst _hoisted_2 = {\n key: 2,\n class: \"drag-mask\"\n}\n\nimport { nextTick, onMounted, onUnmounted, provide, ref, watch, watchEffect } from 'vue'\nimport { throttle } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps, CreateCustomShapeData } from '@/types/edit'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { removeAllRanges } from '@/utils/selection'\nimport { KEYS } from '@/configs/hotkey'\n\nimport useViewportSize from './hooks/useViewportSize'\nimport useMouseSelection from './hooks/useMouseSelection'\nimport useDropImageOrText from './hooks/useDropImageOrText'\nimport useRotateElement from './hooks/useRotateElement'\nimport useScaleElement from './hooks/useScaleElement'\nimport useSelectElement from './hooks/useSelectElement'\nimport useDragElement from './hooks/useDragElement'\nimport useDragLineElement from './hooks/useDragLineElement'\nimport useMoveShapeKeypoint from './hooks/useMoveShapeKeypoint'\nimport useInsertFromCreateSelection from './hooks/useInsertFromCreateSelection'\n\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useCopyAndPasteElement from '@/hooks/useCopyAndPasteElement'\nimport useSelectAllElement from '@/hooks/useSelectAllElement'\nimport useScaleCanvas from '@/hooks/useScaleCanvas'\nimport useScreening from '@/hooks/useScreening'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nimport EditableElement from './EditableElement.vue'\nimport MouseSelection from './MouseSelection.vue'\nimport ViewportBackground from './ViewportBackground.vue'\nimport AlignmentLine from './AlignmentLine.vue'\nimport Ruler from './Ruler.vue'\nimport ElementCreateSelection from './ElementCreateSelection.vue'\nimport ShapeCreateCanvas from './ShapeCreateCanvas.vue'\nimport MultiSelectOperate from './Operate/MultiSelectOperate.vue'\nimport Operate from './Operate/index.vue'\nimport LinkDialog from './LinkDialog.vue'\nimport Modal from '@/components/Modal.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst {\n activeElementIdList,\n activeGroupElementId,\n handleElementId,\n hiddenElementIdList,\n editorAreaFocus,\n gridLineSize,\n showRuler,\n creatingElement,\n creatingCustomShape,\n canvasScale,\n textFormatPainter,\n} = storeToRefs(mainStore)\nconst { currentSlide } = storeToRefs(useSlidesStore())\nconst { ctrlKeyState, spaceKeyState } = storeToRefs(useKeyboardStore())\n\nconst viewportRef = ref()\nconst alignmentLines = ref([])\n\nconst linkDialogVisible = ref(false)\nconst openLinkDialog = () => linkDialogVisible.value = true\n\nwatch(handleElementId, () => {\n mainStore.setActiveGroupElementId('')\n})\n\nconst elementList = ref([])\nconst setLocalElementList = () => {\n elementList.value = currentSlide.value ? JSON.parse(JSON.stringify(currentSlide.value.elements)) : []\n}\nwatchEffect(setLocalElementList)\n\nconst canvasRef = ref()\nconst { dragViewport, viewportStyles } = useViewportSize(canvasRef)\n\nuseDropImageOrText(canvasRef)\n\nconst { mouseSelection, mouseSelectionVisible, mouseSelectionQuadrant, updateMouseSelection } = useMouseSelection(elementList, viewportRef)\n\nconst { dragElement } = useDragElement(elementList, alignmentLines, canvasScale)\nconst { dragLineElement } = useDragLineElement(elementList)\nconst { selectElement } = useSelectElement(elementList, dragElement)\nconst { scaleElement, scaleMultiElement } = useScaleElement(elementList, alignmentLines, canvasScale)\nconst { rotateElement } = useRotateElement(elementList, viewportRef, canvasScale)\nconst { moveShapeKeypoint } = useMoveShapeKeypoint(elementList, canvasScale)\n\nconst { selectAllElement } = useSelectAllElement()\nconst { deleteAllElements } = useDeleteElement()\nconst { pasteElement } = useCopyAndPasteElement()\nconst { enterScreeningFromStart } = useScreening()\nconst { updateSlideIndex } = useSlideHandler()\nconst { createTextElement, createShapeElement } = useCreateElement()\n\n// 组件渲染时,如果存在元素焦点,需要清除\n// 这种情况存在于:有焦点元素的情况下进入了放映模式,再退出时,需要清除原先的焦点(因为可能已经切换了页面)\nonMounted(() => {\n if (activeElementIdList.value.length) {\n nextTick(() => mainStore.setActiveElementIdList([]))\n }\n})\n\n// 点击画布的空白区域:清空焦点元素、设置画布焦点、清除文字选区、清空格式刷状态\nconst handleClickBlankArea = (e: MouseEvent) => {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n\n if (!spaceKeyState.value) updateMouseSelection(e)\n else dragViewport(e)\n\n if (!editorAreaFocus.value) mainStore.setEditorareaFocus(true)\n if (textFormatPainter.value) mainStore.setTextFormatPainter(null)\n removeAllRanges()\n}\n\n// 双击空白处插入文本\nconst handleDblClick = (e: MouseEvent) => {\n if (activeElementIdList.value.length || creatingElement.value || creatingCustomShape.value) return\n if (!viewportRef.value) return\n\n const viewportRect = viewportRef.value.getBoundingClientRect()\n const left = (e.pageX - viewportRect.x) / canvasScale.value\n const top = (e.pageY - viewportRect.y) / canvasScale.value\n\n createTextElement({\n left,\n top,\n width: 200 / canvasScale.value, // 除以 canvasScale 是为了与点击选区创建的形式保持相同的宽度\n height: 0,\n })\n}\n\n// 画布注销时清空格式刷状态\nonUnmounted(() => {\n if (textFormatPainter.value) mainStore.setTextFormatPainter(null)\n})\n\n// 移除画布编辑区域焦点\nconst removeEditorAreaFocus = () => {\n if (editorAreaFocus.value) mainStore.setEditorareaFocus(false)\n}\n\n// 滚动鼠标\nconst { scaleCanvas } = useScaleCanvas()\nconst throttleScaleCanvas = throttle(scaleCanvas, 100, { leading: true, trailing: false })\nconst throttleUpdateSlideIndex = throttle(updateSlideIndex, 300, { leading: true, trailing: false })\n\nconst handleMousewheelCanvas = (e: WheelEvent) => {\n e.preventDefault()\n\n // 按住Ctrl键时:缩放画布\n if (ctrlKeyState.value) {\n if (e.deltaY > 0) throttleScaleCanvas('-')\n else if (e.deltaY < 0) throttleScaleCanvas('+')\n }\n // 上下翻页\n else {\n if (e.deltaY > 0) throttleUpdateSlideIndex(KEYS.DOWN)\n else if (e.deltaY < 0) throttleUpdateSlideIndex(KEYS.UP)\n }\n}\n\n// 开关标尺\nconst toggleRuler = () => {\n mainStore.setRulerState(!showRuler.value)\n}\n\n// 在鼠标绘制的范围插入元素\nconst { insertElementFromCreateSelection, formatCreateSelection } = useInsertFromCreateSelection(viewportRef)\n\n// 插入自定义任意多边形\nconst insertCustomShape = (data: CreateCustomShapeData) => {\n const {\n start,\n end,\n path,\n viewBox,\n } = data\n const position = formatCreateSelection({ start, end })\n position && createShapeElement(position, { path, viewBox })\n\n mainStore.setCreatingCustomShapeState(false)\n}\n\nconst contextmenus = (): ContextmenuItem[] => {\n return [\n {\n text: '粘贴',\n subText: 'Ctrl + V',\n handler: pasteElement,\n },\n {\n text: '全选',\n subText: 'Ctrl + A',\n handler: selectAllElement,\n },\n {\n text: '标尺',\n subText: showRuler.value ? '√' : '',\n handler: toggleRuler,\n },\n {\n text: '网格线',\n handler: () => mainStore.setGridLineSize(gridLineSize.value ? 0 : 50),\n children: [\n {\n text: '无',\n subText: gridLineSize.value === 0 ? '√' : '',\n handler: () => mainStore.setGridLineSize(0),\n },\n {\n text: '小',\n subText: gridLineSize.value === 25 ? '√' : '',\n handler: () => mainStore.setGridLineSize(25),\n },\n {\n text: '中',\n subText: gridLineSize.value === 50 ? '√' : '',\n handler: () => mainStore.setGridLineSize(50),\n },\n {\n text: '大',\n subText: gridLineSize.value === 100 ? '√' : '',\n handler: () => mainStore.setGridLineSize(100),\n },\n ],\n },\n {\n text: '重置当前页',\n handler: deleteAllElements,\n },\n { divider: true },\n {\n text: '幻灯片放映',\n subText: 'F5',\n handler: enterScreeningFromStart,\n },\n ]\n}\n\nprovide(injectKeySlideScale, canvasScale)\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n const _directive_click_outside = _resolveDirective(\"click-outside\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"canvas\",\n ref_key: \"canvasRef\",\n ref: canvasRef,\n onWheel: _cache[4] || (_cache[4] = $event => handleMousewheelCanvas($event)),\n onMousedown: _cache[5] || (_cache[5] = $event => handleClickBlankArea($event)),\n onDblclick: _cache[6] || (_cache[6] = $event => handleDblClick($event))\n }, [\n (_unref(creatingElement))\n ? (_openBlock(), _createBlock(ElementCreateSelection, {\n key: 0,\n onCreated: _cache[0] || (_cache[0] = data => _unref(insertElementFromCreateSelection)(data))\n }))\n : _createCommentVNode(\"\", true),\n (_unref(creatingCustomShape))\n ? (_openBlock(), _createBlock(ShapeCreateCanvas, {\n key: 1,\n onCreated: _cache[1] || (_cache[1] = data => insertCustomShape(data))\n }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n class: \"viewport-wrapper\",\n style: _normalizeStyle({\n width: _unref(viewportStyles).width * _unref(canvasScale) + 'px',\n height: _unref(viewportStyles).height * _unref(canvasScale) + 'px',\n left: _unref(viewportStyles).left + 'px',\n top: _unref(viewportStyles).top + 'px',\n })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alignmentLines.value, (line, index) => {\n return (_openBlock(), _createBlock(AlignmentLine, {\n key: index,\n type: line.type,\n axis: line.axis,\n length: line.length,\n canvasScale: _unref(canvasScale)\n }, null, 8, [\"type\", \"axis\", \"length\", \"canvasScale\"]))\n }), 128)),\n (_unref(activeElementIdList).length > 1)\n ? (_openBlock(), _createBlock(MultiSelectOperate, {\n key: 0,\n elementList: elementList.value,\n scaleMultiElement: _unref(scaleMultiElement)\n }, null, 8, [\"elementList\", \"scaleMultiElement\"]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element) => {\n return _withDirectives((_openBlock(), _createBlock(Operate, {\n key: element.id,\n elementInfo: element,\n isSelected: _unref(activeElementIdList).includes(element.id),\n isActive: _unref(handleElementId) === element.id,\n isActiveGroupElement: _unref(activeGroupElementId) === element.id,\n isMultiSelect: _unref(activeElementIdList).length > 1,\n rotateElement: _unref(rotateElement),\n scaleElement: _unref(scaleElement),\n openLinkDialog: openLinkDialog,\n dragLineElement: _unref(dragLineElement),\n moveShapeKeypoint: _unref(moveShapeKeypoint)\n }, null, 8, [\"elementInfo\", \"isSelected\", \"isActive\", \"isActiveGroupElement\", \"isMultiSelect\", \"rotateElement\", \"scaleElement\", \"dragLineElement\", \"moveShapeKeypoint\"])), [\n [_vShow, !_unref(hiddenElementIdList).includes(element.id)]\n ])\n }), 128)),\n _createVNode(ViewportBackground)\n ]),\n _createElementVNode(\"div\", {\n class: \"viewport\",\n ref_key: \"viewportRef\",\n ref: viewportRef,\n style: _normalizeStyle({ transform: `scale(${_unref(canvasScale)})` })\n }, [\n (_unref(mouseSelectionVisible))\n ? (_openBlock(), _createBlock(MouseSelection, {\n key: 0,\n top: _unref(mouseSelection).top,\n left: _unref(mouseSelection).left,\n width: _unref(mouseSelection).width,\n height: _unref(mouseSelection).height,\n quadrant: _unref(mouseSelectionQuadrant)\n }, null, 8, [\"top\", \"left\", \"width\", \"height\", \"quadrant\"]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element, index) => {\n return _withDirectives((_openBlock(), _createBlock(EditableElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n isMultiSelect: _unref(activeElementIdList).length > 1,\n selectElement: _unref(selectElement),\n openLinkDialog: openLinkDialog\n }, null, 8, [\"elementInfo\", \"elementIndex\", \"isMultiSelect\", \"selectElement\"])), [\n [_vShow, !_unref(hiddenElementIdList).includes(element.id)]\n ])\n }), 128))\n ], 4)\n ], 4),\n (_unref(spaceKeyState))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true),\n (_unref(showRuler))\n ? (_openBlock(), _createBlock(Ruler, {\n key: 3,\n viewportStyles: _unref(viewportStyles)\n }, null, 8, [\"viewportStyles\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(Modal, {\n visible: linkDialogVisible.value,\n \"onUpdate:visible\": _cache[3] || (_cache[3] = ($event: any) => ((linkDialogVisible).value = $event)),\n width: 540\n }, {\n default: _withCtx(() => [\n _createVNode(LinkDialog, {\n onClose: _cache[2] || (_cache[2] = ($event: any) => (linkDialogVisible.value = false))\n })\n ]),\n _: 1\n }, 8, [\"visible\"])\n ], 32)), [\n [_directive_contextmenu, contextmenus],\n [_directive_click_outside, removeEditorAreaFocus]\n ])\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=ce64755c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ce64755c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8603ad34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-item-thumbnail\" }\nconst _hoisted_2 = { class: \"shape-content\" }\nconst _hoisted_3 = {\n overflow: \"visible\",\n width: \"18\",\n height: \"18\"\n}\nconst _hoisted_4 = [\"transform\"]\nconst _hoisted_5 = [\"fill\", \"stroke\", \"d\"]\n\nimport type { ShapePoolItem } from '@/configs/shapes'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapeItemThumbnail',\n props: {\n shape: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_3, [\n _createElementVNode(\"g\", {\n transform: `scale(${18 / _ctx.shape.viewBox[0]}, ${18 / _ctx.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n class: _normalizeClass([\"shape-path\", { 'outlined': _ctx.shape.outlined }]),\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: _ctx.shape.outlined ? '#999' : 'transparent',\n stroke: _ctx.shape.outlined ? 'transparent' : '#999',\n \"stroke-width\": \"2\",\n d: _ctx.shape.path\n }, null, 10, _hoisted_5)\n ], 8, _hoisted_4)\n ]))\n ])\n ]))\n}\n}\n\n})","import script from \"./ShapeItemThumbnail.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeItemThumbnail.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeItemThumbnail.vue?vue&type=style&index=0&id=8603ad34&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8603ad34\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8b994b42\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-pool\" }\nconst _hoisted_2 = { class: \"category-name\" }\nconst _hoisted_3 = { class: \"shape-list\" }\n\nimport { SHAPE_LIST, type ShapePoolItem } from '@/configs/shapes'\nimport ShapeItemThumbnail from './ShapeItemThumbnail.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapePool',\n emits: [\"select\"],\n setup(__props, { emit }) {\n\n\n\nconst selectShape = (shape: ShapePoolItem) => {\n emit('select', shape)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(SHAPE_LIST), (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"category\",\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (shape, index) => {\n return (_openBlock(), _createBlock(ShapeItemThumbnail, {\n class: \"shape-item\",\n key: index,\n shape: shape,\n onClick: ($event: any) => (selectShape(shape))\n }, null, 8, [\"shape\", \"onClick\"]))\n }), 128))\n ])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ShapePool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapePool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapePool.vue?vue&type=style&index=0&id=8b994b42&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8b994b42\"]])\n\nexport default __exports__","import type { LinePoint } from '@/types/slides'\n\n\nexport interface LinePoolItem {\n path: string\n style: 'solid' | 'dashed'\n points: [LinePoint, LinePoint]\n isBroken?: boolean\n isCurve?: boolean\n isCubic?: boolean\n}\n\ninterface PresetLine {\n type: string\n children: LinePoolItem[]\n}\n\nexport const LINE_LIST: PresetLine[] = [\n {\n type: '直线',\n children: [\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', ''] },\n { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', ''] },\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'arrow'] },\n { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', 'arrow'] },\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'dot'] },\n ],\n },\n {\n type: '折线、曲线',\n children: [\n { path: 'M 0 0 L 0 20 L 20 20', style: 'solid', points: ['', 'arrow'], isBroken: true },\n { path: 'M 0 0 Q 0 20 20 20', style: 'solid', points: ['', 'arrow'], isCurve: true },\n { path: 'M 0 0 C 20 0 0 20 20 20', style: 'solid', points: ['', 'arrow'], isCubic: true },\n ],\n },\n]","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-554824b6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"line-pool\" }\nconst _hoisted_2 = { class: \"category-name\" }\nconst _hoisted_3 = { class: \"line-list\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = {\n overflow: \"visible\",\n width: \"20\",\n height: \"20\"\n}\nconst _hoisted_6 = [\"d\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\n\nimport { LINE_LIST, type LinePoolItem } from '@/configs/lines'\n\nimport LinePointMarker from '@/views/components/element/LineElement/LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinePool',\n emits: [\"select\"],\n setup(__props, { emit }) {\n\n\n\nconst selectLine = (line: LinePoolItem) => {\n emit('select', line)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(LINE_LIST), (item, i) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"category\",\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (line, j) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"line-item\",\n key: j\n }, [\n _createElementVNode(\"div\", {\n class: \"line-content\",\n onClick: ($event: any) => (selectLine(line))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_5, [\n _createElementVNode(\"defs\", null, [\n (line.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n class: \"line-marker\",\n id: `preset-line-${i}-${j}`,\n position: \"start\",\n type: line.points[0],\n color: \"currentColor\",\n baseSize: 2\n }, null, 8, [\"id\", \"type\"]))\n : _createCommentVNode(\"\", true),\n (line.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n class: \"line-marker\",\n id: `preset-line-${i}-${j}`,\n position: \"end\",\n type: line.points[1],\n color: \"currentColor\",\n baseSize: 2\n }, null, 8, [\"id\", \"type\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n class: \"line-path\",\n d: line.path,\n stroke: \"currentColor\",\n fill: \"none\",\n \"stroke-width\": \"2\",\n \"stroke-dasharray\": line.style === 'solid' ? '0, 0' : '4, 1',\n \"marker-start\": line.points[0] ? `url(#${`preset-line-${i}-${j}`}-${line.points[0]}-start)` : '',\n \"marker-end\": line.points[1] ? `url(#${`preset-line-${i}-${j}`}-${line.points[1]}-end)` : ''\n }, null, 8, _hoisted_6)\n ]))\n ], 8, _hoisted_4)\n ]))\n }), 128))\n ])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinePool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinePool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinePool.vue?vue&type=style&index=0&id=554824b6&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-554824b6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-398f5699\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"chart-pool\" }\nconst _hoisted_2 = [\"onClick\"]\n\nimport type { PresetChartType } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ChartPool',\n emits: [\"select\"],\n setup(__props, { emit }) {\n\n\n\nconst chartList: PresetChartType[] = ['bar', 'horizontalBar', 'line', 'area', 'scatter', 'pie', 'ring']\n\nconst selectChart = (chart: PresetChartType) => {\n emit('select', chart)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconChartLine = _resolveComponent(\"IconChartLine\")!\n const _component_IconChartHistogram = _resolveComponent(\"IconChartHistogram\")!\n const _component_IconChartPie = _resolveComponent(\"IconChartPie\")!\n const _component_IconChartHistogramOne = _resolveComponent(\"IconChartHistogramOne\")!\n const _component_IconChartLineArea = _resolveComponent(\"IconChartLineArea\")!\n const _component_IconChartRing = _resolveComponent(\"IconChartRing\")!\n const _component_IconChartScatter = _resolveComponent(\"IconChartScatter\")!\n\n return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(chartList, (chart, index) => {\n return _createElementVNode(\"li\", {\n class: \"chart-item\",\n key: index\n }, [\n _createElementVNode(\"div\", {\n class: \"chart-content\",\n onClick: ($event: any) => (selectChart(chart))\n }, [\n (chart === 'line')\n ? (_openBlock(), _createBlock(_component_IconChartLine, {\n key: 0,\n size: \"24\"\n }))\n : (chart === 'bar')\n ? (_openBlock(), _createBlock(_component_IconChartHistogram, {\n key: 1,\n size: \"24\"\n }))\n : (chart === 'pie')\n ? (_openBlock(), _createBlock(_component_IconChartPie, {\n key: 2,\n size: \"24\"\n }))\n : (chart === 'horizontalBar')\n ? (_openBlock(), _createBlock(_component_IconChartHistogramOne, {\n key: 3,\n size: \"24\"\n }))\n : (chart === 'area')\n ? (_openBlock(), _createBlock(_component_IconChartLineArea, {\n key: 4,\n size: \"24\"\n }))\n : (chart === 'ring')\n ? (_openBlock(), _createBlock(_component_IconChartRing, {\n key: 5,\n size: \"24\"\n }))\n : (chart === 'scatter')\n ? (_openBlock(), _createBlock(_component_IconChartScatter, {\n key: 6,\n size: \"24\"\n }))\n : _createCommentVNode(\"\", true)\n ], 8, _hoisted_2)\n ])\n }), 64))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ChartPool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ChartPool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ChartPool.vue?vue&type=style&index=0&id=398f5699&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-398f5699\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-268948c2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"prefix\" }\nconst _hoisted_2 = { class: \"input-wrap\" }\nconst _hoisted_3 = [\"disabled\", \"placeholder\"]\nconst _hoisted_4 = { class: \"handlers\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"currentColor\",\n width: \"1em\",\n height: \"1em\",\n viewBox: \"64 64 896 896\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z\" })\n], -1))\nconst _hoisted_6 = [\n _hoisted_5\n]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"currentColor\",\n width: \"1em\",\n height: \"1em\",\n viewBox: \"64 64 896 896\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" })\n], -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\nconst _hoisted_9 = { class: \"suffix\" }\n\nimport { ref, watch } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'NumberInput',\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n placeholder: { default: '' },\n min: { default: 0 },\n max: { default: Infinity },\n step: { default: 1 }\n },\n emits: [\"update:value\", \"input\", \"change\", \"blur\", \"focus\", \"enter\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst number = ref(0)\nconst focused = ref(false)\n\nwatch(() => props.value, () => {\n if (props.value !== number.value) {\n number.value = props.value\n }\n}, {\n immediate: true,\n})\n\nwatch(number, () => {\n let value = +number.value\n if (isNaN(value)) value = props.min\n else if (value > props.max) value = props.max\n else if (value < props.min) value = props.min\n\n number.value = value\n emit('update:value', number.value)\n})\n\nconst handleBlur = (e: Event) => {\n focused.value = false\n emit('blur', e)\n}\nconst handleFocus = (e: Event) => {\n focused.value = true\n emit('focus', e)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"number-input\", {\n 'disabled': _ctx.disabled,\n 'focused': focused.value,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prefix\")\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n disabled: _ctx.disabled,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((number).value = $event)),\n placeholder: _ctx.placeholder,\n onInput: _cache[1] || (_cache[1] = $event => emit('input', $event)),\n onFocus: _cache[2] || (_cache[2] = $event => handleFocus($event)),\n onBlur: _cache[3] || (_cache[3] = $event => handleBlur($event)),\n onChange: _cache[4] || (_cache[4] = $event => emit('change', $event)),\n onKeydown: _cache[5] || (_cache[5] = _withKeys($event => emit('enter', $event), [\"enter\"]))\n }, null, 40, _hoisted_3), [\n [_vModelText, number.value]\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n class: \"handler\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (number.value += _ctx.step))\n }, _hoisted_6),\n _createElementVNode(\"span\", {\n class: \"handler\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (number.value -= _ctx.step))\n }, _hoisted_8)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_9, [\n _renderSlot(_ctx.$slots, \"suffix\")\n ])\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./NumberInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./NumberInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./NumberInput.vue?vue&type=style&index=0&id=268948c2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-268948c2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-372c6730\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"table-generator\" }\nconst _hoisted_2 = { class: \"title\" }\nconst _hoisted_3 = { class: \"lef\" }\nconst _hoisted_4 = [\"onMouseenter\"]\nconst _hoisted_5 = {\n key: 1,\n class: \"custom\"\n}\nconst _hoisted_6 = { class: \"row\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"label\",\n style: {\"width\":\"25%\"}\n}, \"行数:\", -1))\nconst _hoisted_8 = { class: \"row\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"label\",\n style: {\"width\":\"25%\"}\n}, \"列数:\", -1))\nconst _hoisted_10 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport message from '@/utils/message'\nimport Button from '@/components/Button.vue'\nimport NumberInput from '@/components/NumberInput.vue'\n\ninterface InsertData {\n row: number\n col: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TableGenerator',\n emits: [\"insert\", \"close\"],\n setup(__props, { emit }) {\n\n\n\nconst endCell = ref([])\nconst customRow = ref(3)\nconst customCol = ref(3)\nconst isCustom = ref(false)\n\nconst handleClickTable = () => {\n if (!endCell.value.length) return\n const [row, col] = endCell.value\n emit('insert', { row, col })\n}\n\nconst insertCustomTable = () => {\n if (customRow.value < 1 || customRow.value > 20) return message.warning('行数/列数必须在0~20之间!')\n if (customCol.value < 1 || customCol.value > 20) return message.warning('行数/列数必须在0~20之间!')\n emit('insert', { row: customRow.value, col: customCol.value })\n isCustom.value = false\n}\n\nconst close = () => {\n emit('close')\n isCustom.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, \"表格 \" + _toDisplayString(endCell.value.length ? `${endCell.value[0]} x ${endCell.value[1]}` : ''), 1),\n _createElementVNode(\"div\", {\n class: \"right\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (isCustom.value = !isCustom.value))\n }, _toDisplayString(isCustom.value ? '返回' : '自定义'), 1)\n ]),\n (!isCustom.value)\n ? (_openBlock(), _createElementBlock(\"table\", {\n key: 0,\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (endCell.value = [])),\n onClick: _cache[2] || (_cache[2] = ($event: any) => (handleClickTable()))\n }, [\n _createElementVNode(\"tbody\", null, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (row) => {\n return _createElementVNode(\"tr\", { key: row }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (col) => {\n return _createElementVNode(\"td\", {\n onMouseenter: ($event: any) => (endCell.value = [row, col]),\n key: col\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"cell\", { 'active': endCell.value.length && row <= endCell.value[0] && col <= endCell.value[1] }])\n }, null, 2)\n ], 40, _hoisted_4)\n }), 64))\n ])\n }), 64))\n ])\n ], 32))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createVNode(NumberInput, {\n min: 1,\n max: 20,\n value: customRow.value,\n \"onUpdate:value\": _cache[3] || (_cache[3] = ($event: any) => ((customRow).value = $event)),\n style: {\"width\":\"75%\"}\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createVNode(NumberInput, {\n min: 1,\n max: 20,\n value: customCol.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((customCol).value = $event)),\n style: {\"width\":\"75%\"}\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(Button, {\n class: \"btn\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (close()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn\",\n type: \"primary\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertCustomTable()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ]))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./TableGenerator.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TableGenerator.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./TableGenerator.vue?vue&type=style&index=0&id=372c6730&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-372c6730\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35a1214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"media-input\" }\nconst _hoisted_2 = { class: \"btns\" }\nconst _hoisted_3 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport message from '@/utils/message'\nimport Tabs from '@/components/Tabs.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\n\ntype TypeKey = 'video' | 'audio'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MediaInput',\n emits: [\"insertVideo\", \"insertAudio\", \"close\"],\n setup(__props, { emit }) {\n\n\n\nconst type = ref('video')\n\nconst videoSrc = ref('https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm')\nconst audioSrc = ref('https://freesound.org/data/previews/614/614107_11861866-lq.mp3')\n\nconst tabs: TabItem[] = [\n { key: 'video', label: '视频' },\n { key: 'audio', label: '音频' },\n]\n\nconst insertVideo = () => {\n if (!videoSrc.value) return message.error('请先输入正确的视频地址')\n emit('insertVideo', videoSrc.value)\n}\n\nconst insertAudio = () => {\n if (!audioSrc.value) return message.error('请先输入正确的音频地址')\n emit('insertAudio', audioSrc.value)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((type).value = $event)),\n tabsStyle: { marginBottom: '15px' }\n }, null, 8, [\"value\"]),\n (type.value === 'video')\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createVNode(Input, {\n value: videoSrc.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((videoSrc).value = $event)),\n placeholder: \"请输入视频地址,e.g. https://xxx.mp4\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Button, {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (insertVideo()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ], 64))\n : _createCommentVNode(\"\", true),\n (type.value === 'audio')\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createVNode(Input, {\n value: audioSrc.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((audioSrc).value = $event)),\n placeholder: \"请输入音频地址,e.g. https://xxx.mp3\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(Button, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertAudio()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./MediaInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MediaInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MediaInput.vue?vue&type=style&index=0&id=35a1214c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35a1214c\"]])\n\nexport default __exports__","import { hfmath, CONFIG as hfmathConfig } from 'hfmath'\n\nhfmathConfig.SUB_SUP_SCALE = 0.5\n\nexport { hfmath }","export const FORMULA_LIST = [\n {\n label: '高斯公式',\n latex: `\\\\int\\\\int\\\\int _ { \\\\Omega } \\\\left( \\\\frac { \\\\partial {P} } { \\\\partial {x} } + \\\\frac { \\\\partial {Q} } { \\\\partial {y} } + \\\\frac { \\\\partial {R} }{ \\\\partial {z} } \\\\right) \\\\mathrm { d } V = \\\\oint _ { \\\\partial \\\\Omega } ( P \\\\cos \\\\alpha + Q \\\\cos \\\\beta + R \\\\cos \\\\gamma ) \\\\mathrm{ d} S`\n },\n {\n label: '傅里叶级数',\n latex: `f(x) = \\\\frac {a_0} 2 + \\\\sum_{n = 1}^\\\\infty {({a_n}\\\\cos {nx} + {b_n}\\\\sin {nx})}`,\n },\n {\n label: '泰勒展开式',\n latex: `e ^ { x } = 1 + \\\\frac { x } { 1 ! } + \\\\frac { x ^ { 2 } } { 2 ! } + \\\\frac { x ^ { 3 } } { 3 ! } + ... , \\\\quad - \\\\infty < x < \\\\infty`,\n },\n {\n label: '定积分',\n latex: `\\\\lim_ { n \\\\rightarrow + \\\\infty } \\\\sum _ { i = 1 } ^ { n } f \\\\left[ a + \\\\frac { i } { n } ( b - a ) \\\\right] \\\\frac { b - a } { n } = \\\\int _ { a } ^ { b } f ( x ) dx`,\n },\n {\n label: '三角恒等式1',\n latex: `\\\\sin \\\\alpha \\\\pm \\\\sin \\\\beta = 2 \\\\sin \\\\frac { 1 } { 2 } ( \\\\alpha \\\\pm \\\\beta ) \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha \\\\mp \\\\beta )`,\n },\n {\n label: '三角恒等式2',\n latex: `\\\\cos \\\\alpha + \\\\cos \\\\beta = 2 \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha + \\\\beta ) \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha - \\\\beta )`,\n },\n {\n label: '和的展开式',\n latex: `( 1 + x ) ^ { n } = 1 + \\\\frac { n x } { 1 ! } + \\\\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ...`,\n },\n {\n label: '欧拉公式',\n latex: ` e^{ix} = \\\\cos {x} + i\\\\sin {x}`,\n },\n {\n label: '贝努利方程',\n latex: `\\\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\\\not= {0,1})`,\n },\n {\n label: '全微分方程',\n latex: `du(x,y) = P(x,y)dx + Q(x,y)dy = 0`,\n },\n {\n label: '非齐次方程',\n latex: `y = (\\\\int Q(x) e^{\\\\int {P(x)dx}}dx + C)e^{-\\\\int {P(x)dx}}`,\n },\n {\n label: '柯西中值定理',\n latex: `\\\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\\\frac{{f'(\\\\xi )}}{{F'(\\\\xi )}}`,\n },\n {\n label: '拉格朗日中值定理',\n latex: `f(b) - f(a) = f'(\\\\xi )(b - a)`,\n },\n {\n label: '导数公式',\n latex: `(\\\\arcsin x)' = \\\\frac{1}{{\\\\sqrt {1 - x^2} }}`,\n },\n {\n label: '三角函数积分',\n latex: `\\\\int {tgxdx = - \\\\ln \\\\left| {\\\\cos x} \\\\right| + C}`,\n },\n {\n label: '二次曲面',\n latex: `\\\\frac{{{x^2}}}{{{a^2}}} + \\\\frac{{{y^2}}}{{{b^2}}} - \\\\frac{{{z^2}}}{{{c^2}}} = 1`,\n },\n {\n label: '二阶微分',\n latex: `\\\\frac {{d^2}y} {dx^2} + P(x) \\\\frac {dy} {dx} + Q(x)y = f(x)`,\n },\n {\n label: '方向导数',\n latex: `\\\\frac{{\\\\partial f}}{{\\\\partial l}} = \\\\frac{{\\\\partial f}}{{\\\\partial x}}\\\\cos \\\\phi + \\\\frac{{\\\\partial f}}{{\\\\partial y}}\\\\sin \\\\phi`,\n },\n]\n\nexport const SYMBOL_LIST = [\n {\n type: 'operators',\n label: '数学',\n children: [\n { latex: '\\\\cdot' },\n { latex: '\\\\pm' },\n { latex: '\\\\mp' },\n { latex: '+' },\n { latex: '-' },\n { latex: '\\\\times' },\n { latex: '\\\\div' },\n { latex: '<' },\n { latex: '>' },\n { latex: '=' },\n { latex: '\\\\neq\\\\ne' },\n { latex: '\\\\leqq' },\n { latex: '\\\\geqq' },\n { latex: '\\\\leq' },\n { latex: '\\\\geq' },\n { latex: '\\\\propto' },\n { latex: '\\\\sim' },\n { latex: '\\\\equiv' },\n { latex: '\\\\dagger' },\n { latex: '\\\\ddagger' },\n { latex: '\\\\ell' },\n { latex: '\\\\#' },\n { latex: '\\\\$' },\n { latex: '\\\\&' },\n { latex: '\\\\%' },\n { latex: '\\\\langle\\\\rangle' },\n { latex: '()' },\n { latex: '[]' },\n { latex: '\\\\{\\\\}' },\n { latex: '||' },\n { latex: '\\\\|' },\n { latex: '\\\\exists' },\n { latex: '\\\\in' },\n { latex: '\\\\subset' },\n { latex: '\\\\supset' },\n { latex: '\\\\cup' },\n { latex: '\\\\cap' },\n { latex: '\\\\infty' },\n { latex: '\\\\partial' },\n { latex: '\\\\nabla' },\n { latex: '\\\\aleph' },\n { latex: '\\\\wp' },\n { latex: '\\\\therefore' },\n { latex: '\\\\mid' },\n { latex: '\\\\sum' },\n { latex: '\\\\prod' },\n { latex: '\\\\bigoplus' },\n { latex: '\\\\bigodot' },\n { latex: '\\\\int' },\n { latex: '\\\\oint' },\n { latex: '\\\\oplus' },\n { latex: '\\\\odot' },\n { latex: '\\\\perp' },\n { latex: '\\\\angle' },\n { latex: '\\\\triangle' },\n { latex: '\\\\Box' },\n { latex: '\\\\rightarrow' },\n { latex: '\\\\to' },\n { latex: '\\\\leftarrow' },\n { latex: '\\\\gets' },\n { latex: '\\\\circ' },\n { latex: '\\\\bigcirc' },\n { latex: '\\\\bullet' },\n { latex: '\\\\star' },\n { latex: '\\\\diamond' },\n { latex: '\\\\ast' },\n { latex: ',' },\n { latex: '.' },\n { latex: ';' },\n { latex: '!' },\n ],\n },\n {\n type: 'group',\n label: '组合',\n children: [\n { latex: '\\\\frac{a}{b}' },\n { latex: '\\\\frac{dx}{dx}' },\n { latex: '\\\\frac{\\\\partial a}{\\\\partial b}' },\n { latex: '\\\\sqrt{x}' },\n { latex: '\\\\sqrt[n]{x}' },\n { latex: 'x^{n}' },\n { latex: 'x_{n}' },\n { latex: 'x_a^b' },\n { latex: '\\\\int_{a}^{b}' },\n { latex: '\\\\oint_a^b' },\n { latex: '\\\\lim_{a \\\\rightarrow b}' },\n { latex: '\\\\prod_a^b' },\n { latex: '\\\\sum_a^b' },\n { latex: '\\\\left(\\\\begin{array}a \\\\\\\\ b\\\\end{array}\\\\right)' },\n { latex: '\\\\begin{bmatrix}a & b \\\\\\\\ c & d \\\\end{bmatrix}' },\n { latex: '\\\\begin{cases}a & x = 0 \\\\\\\\ b & x > 0\\\\end{cases}' },\n { latex: '\\\\hat{a}' },\n { latex: '\\\\breve{a}' },\n { latex: '\\\\acute{a}' },\n { latex: '\\\\grave{a}' },\n { latex: '\\\\tilde{a}' },\n { latex: '\\\\bar{a}' },\n { latex: '\\\\vec{a}' },\n { latex: '\\\\underline{a}' },\n { latex: '\\\\overline{a}' },\n { latex: '\\\\widehat{ab}' },\n { latex: '\\\\overleftarrow{ab}' },\n { latex: '\\\\overrightarrow{ab}' },\n ],\n },\n {\n type: 'verbatim',\n label: '函数',\n children: [\n { latex: '\\\\log' },\n { latex: '\\\\ln' },\n { latex: '\\\\exp' },\n { latex: '\\\\mod' },\n { latex: '\\\\lim' },\n { latex: '\\\\sin' },\n { latex: '\\\\cos' },\n { latex: '\\\\tan' },\n { latex: '\\\\csc' },\n { latex: '\\\\sec' },\n { latex: '\\\\cot' },\n { latex: '\\\\sinh' },\n { latex: '\\\\cosh' },\n { latex: '\\\\tanh' },\n { latex: '\\\\csch' },\n { latex: '\\\\sech' },\n { latex: '\\\\coth' },\n { latex: '\\\\arcsin' },\n { latex: '\\\\arccos' },\n { latex: '\\\\arctan' },\n { latex: '\\\\arccsc' },\n { latex: '\\\\arcsec' },\n { latex: '\\\\arccot' },\n ],\n },\n {\n type: 'greek',\n label: '希腊字母',\n children: [\n { latex: '\\\\alpha' },\n { latex: '\\\\beta' },\n { latex: '\\\\gamma' },\n { latex: '\\\\delta' },\n { latex: '\\\\varepsilon' },\n { latex: '\\\\zeta' },\n { latex: '\\\\eta' },\n { latex: '\\\\vartheta' },\n { latex: '\\\\iota' },\n { latex: '\\\\kappa' },\n { latex: '\\\\lambda' },\n { latex: '\\\\mu' },\n { latex: '\\\\nu' },\n { latex: '\\\\xi' },\n { latex: '\\\\omicron' },\n { latex: '\\\\pi' },\n { latex: '\\\\rho' },\n { latex: '\\\\sigma' },\n { latex: '\\\\tau' },\n { latex: '\\\\upsilon' },\n { latex: '\\\\varphi' },\n { latex: '\\\\chi' },\n { latex: '\\\\psi' },\n { latex: '\\\\omega' },\n { latex: '\\\\epsilon' },\n { latex: '\\\\theta' },\n { latex: '\\\\phi' },\n { latex: '\\\\varsigma' },\n { latex: '\\\\Alpha' },\n { latex: '\\\\Beta' },\n { latex: '\\\\Gamma' },\n { latex: '\\\\Delta' },\n { latex: '\\\\Epsilon' },\n { latex: '\\\\Zeta' },\n { latex: '\\\\Eta' },\n { latex: '\\\\Theta' },\n { latex: '\\\\Iota' },\n { latex: '\\\\Kappa' },\n { latex: '\\\\Lambda' },\n { latex: '\\\\Mu' },\n { latex: '\\\\Nu' },\n { latex: '\\\\Xi' },\n { latex: '\\\\Omicron' },\n { latex: '\\\\Pi' },\n { latex: '\\\\Rho' },\n { latex: '\\\\Sigma' },\n { latex: '\\\\Tau' },\n { latex: '\\\\Upsilon' },\n { latex: '\\\\Phi' },\n { latex: '\\\\Chi' },\n { latex: '\\\\Psi' },\n { latex: '\\\\Omega' },\n ],\n },\n]","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-567417d3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"transform\"]\nconst _hoisted_3 = [\"d\"]\n\nimport { computed, ref, watch } from 'vue'\nimport { hfmath } from './hfmath'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FormulaContent',\n props: {\n latex: {},\n width: {},\n height: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst box = ref({ x: 0, y: 0, w: 0, h: 0 })\nconst pathd = ref('')\n\nwatch(() => props.latex, () => {\n const eq = new hfmath(props.latex)\n pathd.value = eq.pathd({})\n box.value = eq.box({})\n}, { immediate: true })\n\nconst scale = computed(() => {\n const boxW = box.value.w + 32\n const boxH = box.value.h + 32\n\n if (boxW > props.width || boxH > props.height) {\n if (boxW / boxH > props.width / props.height) return props.width / boxW\n return props.height / boxH\n }\n return 1\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", {\n class: \"formula-content\",\n overflow: \"visible\",\n width: box.value.w + 32,\n height: box.value.h + 32,\n stroke: \"#000\",\n \"stroke-width\": \"1\",\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${scale.value}, ${scale.value}) translate(0,0) matrix(1,0,0,1,0,0)`,\n \"transform-origin\": \"0 50%\"\n }, [\n _createElementVNode(\"path\", { d: pathd.value }, null, 8, _hoisted_3)\n ], 8, _hoisted_2)\n ], 8, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./FormulaContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FormulaContent.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FormulaContent.vue?vue&type=style&index=0&id=567417d3&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-567417d3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport { hfmath } from './hfmath'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SymbolContent',\n props: {\n latex: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst svg = computed(() => {\n const eq = new hfmath(props.latex)\n return eq.svg({\n SCALE_X: 10,\n SCALE_Y: 10,\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"symbol-content\",\n innerHTML: svg.value\n }, null, 8, _hoisted_1))\n}\n}\n\n})","\n\n\n","import script from \"./SymbolContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SymbolContent.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-326ac8a0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\", \"value\", \"rows\", \"placeholder\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TextArea',\n props: {\n value: {},\n rows: { default: 4 },\n disabled: { type: Boolean, default: false },\n resizable: { type: Boolean, default: false },\n placeholder: { default: '' }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nconst handleInput = (e: Event) => {\n emit('update:value', (e.target as HTMLInputElement).value)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"textarea\", {\n class: _normalizeClass([\"textarea\", {\n 'disabled': _ctx.disabled,\n 'resizable': _ctx.resizable,\n }]),\n disabled: _ctx.disabled,\n value: _ctx.value,\n rows: _ctx.rows,\n placeholder: _ctx.placeholder,\n onInput: _cache[0] || (_cache[0] = $event => handleInput($event))\n }, null, 42, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./TextArea.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TextArea.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./TextArea.vue?vue&type=style&index=0&id=326ac8a0&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-326ac8a0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-46e48b5e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"latex-editor\" }\nconst _hoisted_2 = { class: \"container\" }\nconst _hoisted_3 = { class: \"left\" }\nconst _hoisted_4 = { class: \"input-area\" }\nconst _hoisted_5 = { class: \"preview\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"placeholder\"\n}\nconst _hoisted_7 = {\n key: 1,\n class: \"preview-content\"\n}\nconst _hoisted_8 = { class: \"right\" }\nconst _hoisted_9 = { class: \"content\" }\nconst _hoisted_10 = {\n key: 0,\n class: \"symbol\"\n}\nconst _hoisted_11 = { class: \"symbol-pool\" }\nconst _hoisted_12 = [\"onClick\"]\nconst _hoisted_13 = {\n key: 1,\n class: \"formula\"\n}\nconst _hoisted_14 = { class: \"formula-title\" }\nconst _hoisted_15 = [\"onClick\"]\nconst _hoisted_16 = { class: \"footer\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { hfmath } from './hfmath'\nimport { FORMULA_LIST, SYMBOL_LIST } from '@/configs/latex'\nimport message from '@/utils/message'\n\nimport FormulaContent from './FormulaContent.vue'\nimport SymbolContent from './SymbolContent.vue'\nimport Button from '../Button.vue'\nimport TextArea from '../TextArea.vue'\nimport Tabs from '../Tabs.vue'\n\ninterface TabItem {\n key: 'symbol' | 'formula'\n label: string\n}\n\ninterface LatexResult {\n latex: string\n path: string\n w: number\n h: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n value: { default: '' }\n },\n emits: [\"update\", \"close\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\nconst tabs: TabItem[] = [\n { label: '常用符号', key: 'symbol' },\n { label: '预置公式', key: 'formula' },\n]\n\n\n\n\n\nconst formulaList = FORMULA_LIST\n\nconst symbolTabs = SYMBOL_LIST.map(item => ({\n label: item.label,\n key: item.type,\n}))\n\nconst latex = ref('')\nconst toolbarState = ref<'symbol' | 'formula'>('symbol')\nconst textAreaRef = ref()\n\nconst selectedSymbolKey = ref(SYMBOL_LIST[0].type)\nconst symbolPool = computed(() => {\n const selectedSymbol = SYMBOL_LIST.find(item => item.type === selectedSymbolKey.value)\n return selectedSymbol?.children || []\n})\n\nonMounted(() => {\n if (props.value) latex.value = props.value\n})\n\nconst update = () => {\n if (!latex.value) return message.error('公式不能为空')\n\n const eq = new hfmath(latex.value)\n const pathd = eq.pathd({})\n const box = eq.box({})\n \n emit('update', {\n latex: latex.value,\n path: pathd,\n w: box.w + 32,\n h: box.h + 32,\n })\n}\n\nconst insertSymbol = (latex: string) => {\n if (!textAreaRef.value) return\n textAreaRef.value.focus()\n document.execCommand('insertText', false, latex)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(TextArea, {\n value: latex.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((latex).value = $event)),\n placeholder: \"输入 LaTeX 公式\",\n ref_key: \"textAreaRef\",\n ref: textAreaRef\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n (!latex.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"公式预览\"))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createVNode(FormulaContent, {\n width: 518,\n height: 138,\n latex: latex.value\n }, null, 8, [\"latex\"])\n ]))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: toolbarState.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((toolbarState).value = $event)),\n card: \"\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_9, [\n (toolbarState.value === 'symbol')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _createVNode(Tabs, {\n tabs: _unref(symbolTabs),\n value: selectedSymbolKey.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((selectedSymbolKey).value = $event)),\n spaceBetween: \"\",\n tabsStyle: { margin: '10px 10px 0' }\n }, null, 8, [\"tabs\", \"value\"]),\n _createElementVNode(\"div\", _hoisted_11, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(symbolPool.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"symbol-item\",\n key: item.latex,\n onClick: ($event: any) => (insertSymbol(item.latex))\n }, [\n _createVNode(SymbolContent, {\n latex: item.latex\n }, null, 8, [\"latex\"])\n ], 8, _hoisted_12))\n }), 128))\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(formulaList), (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"formula-item\",\n key: item.label\n }, [\n _createElementVNode(\"div\", _hoisted_14, _toDisplayString(item.label), 1),\n _createElementVNode(\"div\", {\n class: \"formula-item-content\",\n onClick: ($event: any) => (latex.value =item.latex)\n }, [\n _createVNode(FormulaContent, {\n width: 236,\n height: 60,\n latex: item.latex\n }, null, 8, [\"latex\"])\n ], 8, _hoisted_15)\n ]))\n }), 128))\n ]))\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(Button, {\n class: \"btn\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn\",\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (update()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确定\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=d996ff36&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-d996ff36\"]])\n\nexport default __exports__","export const childlessTags = ['style', 'script', 'template']\n\nexport const closingTags = ['html', 'head', 'body', 'p', 'dt', 'dd', 'li', 'option', 'thead', 'th', 'tbody', 'tr', 'td', 'tfoot', 'colgroup']\n\ninterface ClosingTagAncestorBreakers {\n [key: string]: string[]\n}\n\nexport const closingTagAncestorBreakers: ClosingTagAncestorBreakers = {\n li: ['ul', 'ol', 'menu'],\n dt: ['dl'],\n dd: ['dl'],\n tbody: ['table'],\n thead: ['table'],\n tfoot: ['table'],\n tr: ['table'],\n td: ['table'],\n}\n\nexport const voidTags = ['!doctype', 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']","import { startsWith, endsWith } from 'lodash'\nimport type { Token } from './types'\nimport { childlessTags } from './tags'\n\ninterface State {\n str: string\n position: number\n tokens: Token[]\n}\n\nconst jumpPosition = (state: State, end: number) => {\n const len = end - state.position\n movePositopn(state, len)\n}\n\nconst movePositopn = (state: State, len: number) => {\n state.position = state.position + len\n}\n\nconst findTextEnd = (str: string, index: number) => {\n const isEnd = false\n while (!isEnd) {\n const textEnd = str.indexOf('<', index)\n if (textEnd === -1) {\n return textEnd\n }\n const char = str.charAt(textEnd + 1)\n if (char === '/' || char === '!' || /[A-Za-z0-9]/.test(char)) {\n return textEnd\n }\n index = textEnd + 1\n }\n return -1\n}\n\nconst lexText = (state: State) => {\n const { str } = state\n let textEnd = findTextEnd(str, state.position)\n if (textEnd === state.position) return\n if (textEnd === -1) {\n textEnd = str.length\n }\n\n const content = str.slice(state.position, textEnd)\n jumpPosition(state, textEnd)\n\n state.tokens.push({\n type: 'text', \n content, \n })\n}\n\nconst lexComment = (state: State) => {\n const { str } = state\n\n movePositopn(state, 4)\n let contentEnd = str.indexOf('-->', state.position)\n let commentEnd = contentEnd + 3\n if (contentEnd === -1) {\n contentEnd = commentEnd = str.length\n }\n\n const content = str.slice(state.position, contentEnd)\n jumpPosition(state, commentEnd)\n\n state.tokens.push({\n type: 'comment',\n content,\n })\n}\n\nconst lexTagName = (state: State) => {\n const { str } = state\n const len = str.length\n let start = state.position\n\n while (start < len) {\n const char = str.charAt(start)\n const isTagChar = !(/\\s/.test(char) || char === '/' || char === '>')\n if (isTagChar) break\n start++\n }\n\n let end = start + 1\n while (end < len) {\n const char = str.charAt(end)\n const isTagChar = !(/\\s/.test(char) || char === '/' || char === '>')\n if (!isTagChar) break\n end++\n }\n\n jumpPosition(state, end)\n const tagName = str.slice(start, end)\n state.tokens.push({\n type: 'tag',\n content: tagName\n })\n return tagName\n}\n\nconst lexTagAttributes = (state: State) => {\n const { str, tokens } = state\n let cursor = state.position\n let quote = null\n let wordBegin = cursor\n const words = []\n const len = str.length\n while (cursor < len) {\n const char = str.charAt(cursor)\n if (quote) {\n const isQuoteEnd = char === quote\n if (isQuoteEnd) quote = null\n cursor++\n continue\n }\n\n const isTagEnd = char === '/' || char === '>'\n if (isTagEnd) {\n if (cursor !== wordBegin) words.push(str.slice(wordBegin, cursor))\n break\n }\n\n const isWordEnd = /\\s/.test(char)\n if (isWordEnd) {\n if (cursor !== wordBegin) words.push(str.slice(wordBegin, cursor))\n wordBegin = cursor + 1\n cursor++\n continue\n }\n\n const isQuoteStart = char === '\\'' || char === '\"'\n if (isQuoteStart) {\n quote = char\n cursor++\n continue\n }\n\n cursor++\n }\n jumpPosition(state, cursor)\n\n const type = 'attribute'\n for (let i = 0; i < words.length; i++) {\n const word = words[i]\n\n const isNotPair = word.indexOf('=') === -1\n if (isNotPair) {\n const secondWord = words[i + 1]\n if (secondWord && startsWith(secondWord, '=')) {\n if (secondWord.length > 1) {\n const newWord = word + secondWord\n tokens.push({ type, content: newWord })\n i += 1\n continue\n }\n const thirdWord = words[i + 2]\n i += 1\n if (thirdWord) {\n const newWord = word + '=' + thirdWord\n tokens.push({ type, content: newWord })\n i += 1\n continue\n }\n }\n }\n if (endsWith(word, '=')) {\n const secondWord = words[i + 1]\n if (secondWord && secondWord.indexOf('=') === -1) {\n const newWord = word + secondWord\n tokens.push({ type, content: newWord })\n i += 1\n continue\n }\n\n const newWord = word.slice(0, -1)\n tokens.push({ type, content: newWord })\n continue\n }\n\n tokens.push({ type, content: word })\n }\n}\n\nconst lexSkipTag = (tagName: string, state: State) => {\n const { str, tokens } = state\n const safeTagName = tagName.toLowerCase()\n const len = str.length\n let index = state.position\n \n while (index < len) {\n const nextTag = str.indexOf(' {\n const { str } = state\n const secondChar = str.charAt(state.position + 1)\n const tagStartClose = secondChar === '/'\n movePositopn(state, tagStartClose ? 2 : 1)\n state.tokens.push({\n type: 'tag-start',\n close: tagStartClose,\n })\n\n const tagName = lexTagName(state)\n lexTagAttributes(state)\n\n const firstChar = str.charAt(state.position)\n const tagEndClose = firstChar === '/'\n movePositopn(state, tagEndClose ? 2 : 1)\n state.tokens.push({\n type: 'tag-end',\n close: tagEndClose,\n })\n return tagName\n}\n\nconst lex = (state: State) => {\n const str = state.str\n const len = str.length\n\n while (state.position < len) {\n const start = state.position\n lexText(state)\n\n if (state.position === start) {\n const isComment = startsWith(str, '!--', start + 1)\n if (isComment) lexComment(state)\n else {\n const tagName = lexTag(state)\n const safeTag = tagName.toLowerCase()\n if (childlessTags.includes(safeTag)) lexSkipTag(tagName, state)\n }\n }\n }\n}\n\nexport const lexer = (str: string): Token[] => {\n const state = {\n str,\n position: 0,\n tokens: [],\n }\n lex(state)\n return state.tokens\n}","import type { Token, HTMLNode, TagToken, NormalElement, TagEndToken, AttributeToken, TextToken } from './types'\nimport { closingTags, closingTagAncestorBreakers, voidTags } from './tags'\n\ninterface StackItem {\n tagName: string | null\n children: HTMLNode[]\n}\n\ninterface State {\n stack: StackItem[]\n cursor: number\n tokens: Token[]\n}\n\nexport const parser = (tokens: Token[]) => {\n const root: StackItem = { tagName: null, children: [] }\n const state: State = { tokens, cursor: 0, stack: [root] }\n parse(state)\n return root.children\n}\n\nexport const hasTerminalParent = (tagName: string, stack: StackItem[]) => {\n const tagParents = closingTagAncestorBreakers[tagName]\n if (tagParents) {\n let currentIndex = stack.length - 1\n while (currentIndex >= 0) {\n const parentTagName = stack[currentIndex].tagName\n if (parentTagName === tagName) break\n if (parentTagName && tagParents.includes(parentTagName)) return true\n currentIndex--\n }\n }\n return false\n}\n\nexport const rewindStack = (stack: StackItem[], newLength: number) => {\n stack.splice(newLength)\n}\n\nexport const parse = (state: State) => {\n const { stack, tokens } = state\n let { cursor } = state\n let nodes = stack[stack.length - 1].children\n const len = tokens.length\n \n while (cursor < len) {\n const token = tokens[cursor]\n if (token.type !== 'tag-start') {\n nodes.push(token as TextToken)\n cursor++\n continue\n }\n\n const tagToken = tokens[++cursor] as TagToken\n cursor++\n const tagName = tagToken.content.toLowerCase()\n if (token.close) {\n let index = stack.length\n let shouldRewind = false\n while (--index > -1) {\n if (stack[index].tagName === tagName) {\n shouldRewind = true\n break\n }\n }\n while (cursor < len) {\n if (tokens[cursor].type !== 'tag-end') break\n cursor++\n }\n if (shouldRewind) {\n rewindStack(stack, index)\n break\n } \n else continue\n }\n\n const isClosingTag = closingTags.includes(tagName)\n let shouldRewindToAutoClose = isClosingTag\n if (shouldRewindToAutoClose) {\n shouldRewindToAutoClose = !hasTerminalParent(tagName, stack)\n }\n\n if (shouldRewindToAutoClose) {\n let currentIndex = stack.length - 1\n while (currentIndex > 0) {\n if (tagName === stack[currentIndex].tagName) {\n rewindStack(stack, currentIndex)\n const previousIndex = currentIndex - 1\n nodes = stack[previousIndex].children\n break\n }\n currentIndex = currentIndex - 1\n }\n }\n\n const attributes = []\n let tagEndToken: TagEndToken | undefined\n while (cursor < len) {\n const _token = tokens[cursor]\n if (_token.type === 'tag-end') {\n tagEndToken = _token\n break\n }\n attributes.push((_token as AttributeToken).content)\n cursor++\n }\n\n if (!tagEndToken) break\n\n cursor++\n const children: HTMLNode[] = []\n const elementNode: NormalElement = {\n type: 'element',\n tagName: tagToken.content,\n attributes,\n children,\n }\n nodes.push(elementNode)\n\n const hasChildren = !(tagEndToken.close || voidTags.includes(tagName))\n if (hasChildren) {\n stack.push({tagName, children})\n const innerState = { tokens, cursor, stack }\n parse(innerState)\n cursor = innerState.cursor\n }\n }\n state.cursor = cursor\n}","import type { HTMLNode, CommentOrTextAST, ElementAST, AST } from './types'\n\nexport const splitHead = (str: string, sep: string) => {\n const idx = str.indexOf(sep)\n if (idx === -1) return [str]\n return [str.slice(0, idx), str.slice(idx + sep.length)]\n}\n\nconst unquote = (str: string) => {\n const car = str.charAt(0)\n const end = str.length - 1\n const isQuoteStart = car === '\"' || car === \"'\"\n if (isQuoteStart && car === str.charAt(end)) {\n return str.slice(1, end)\n }\n return str\n}\n\nconst formatAttributes = (attributes: string[]) => {\n return attributes.map(attribute => {\n const parts = splitHead(attribute.trim(), '=')\n const key = parts[0]\n const value = typeof parts[1] === 'string' ? unquote(parts[1]) : null\n return { key, value }\n })\n}\n\nexport const format = (nodes: HTMLNode[]): AST[] => {\n return nodes.map(node => { \n if (node.type === 'element') {\n const children = format(node.children)\n const item: ElementAST = {\n type: 'element',\n tagName: node.tagName.toLowerCase(),\n attributes: formatAttributes(node.attributes),\n children,\n }\n return item\n }\n\n const item: CommentOrTextAST = {\n type: node.type,\n content: node.content,\n }\n return item\n })\n}","// 参考:https://github.com/andrejewski/himalaya 用TypeScript重写并简化部分功能\n\nimport { lexer } from './lexer'\nimport { parser } from './parser'\nimport { format } from './format'\nimport { toHTML } from './stringify'\nimport type { AST } from './types'\n\nexport const toAST = (str: string) => {\n const tokens = lexer(str)\n const nodes = parser(tokens)\n return format(nodes)\n}\n\nexport { toHTML, AST }","import { SVGPathData } from 'svg-pathdata'\nimport arcToBezier from 'svg-arc-to-cubic-bezier'\n\nconst typeMap = {\n 1: 'Z',\n 2: 'M',\n 4: 'H',\n 8: 'V',\n 16: 'L',\n 32: 'C',\n 64: 'S',\n 128: 'Q',\n 256: 'T',\n 512: 'A',\n}\n\n/**\n * 简单解析SVG路径\n * @param d SVG path d属性\n */\nexport const parseSvgPath = (d: string) => {\n const pathData = new SVGPathData(d)\n\n const ret = pathData.commands.map(item => {\n return { ...item, type: typeMap[item.type] }\n })\n return ret\n}\n\nexport type SvgPath = ReturnType\n\n/**\n * 解析SVG路径,并将圆弧(A)类型的路径转为三次贝塞尔(C)类型的路径\n * @param d SVG path d属性\n */\nexport const toPoints = (d: string) => {\n const pathData = new SVGPathData(d)\n \n const points = []\n for (const item of pathData.commands) {\n const type = typeMap[item.type]\n\n if (item.type === 2 || item.type === 16) {\n points.push({\n x: item.x,\n y: item.y,\n relative: item.relative,\n type,\n })\n }\n if (item.type === 32) {\n points.push({\n x: item.x, \n y: item.y,\n curve: {\n type: 'cubic',\n x1: item.x1,\n y1: item.y1,\n x2: item.x2,\n y2: item.y2,\n },\n relative: item.relative,\n type,\n })\n }\n else if (item.type === 128) {\n points.push({\n x: item.x, \n y: item.y,\n curve: {\n type: 'quadratic',\n x1: item.x1,\n y1: item.y1,\n },\n relative: item.relative,\n type,\n })\n }\n else if (item.type === 512) {\n const lastPoint = points[points.length - 1]\n if (!['M', 'L', 'Q', 'C'].includes(lastPoint.type)) continue\n\n const cubicBezierPoints = arcToBezier({\n px: lastPoint.x as number,\n py: lastPoint.y as number,\n cx: item.x,\n cy: item.y,\n rx: item.rX,\n ry: item.rY,\n xAxisRotation: item.xRot,\n largeArcFlag: item.lArcFlag,\n sweepFlag: item.sweepFlag,\n })\n for (const cbPoint of cubicBezierPoints) {\n points.push({\n x: cbPoint.x, \n y: cbPoint.y,\n curve: {\n type: 'cubic',\n x1: cbPoint.x1,\n y1: cbPoint.y1,\n x2: cbPoint.x2,\n y2: cbPoint.y2,\n },\n relative: false,\n type: 'C',\n })\n }\n }\n else if (item.type === 1) {\n points.push({ close: true, type })\n }\n else continue\n }\n return points\n}\n\nexport type SvgPoints = ReturnType","// svg转base64图片,参考:https://github.com/scriptex/svg64\n\nconst characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\nconst PREFIX = 'data:image/svg+xml;base64,'\n\nconst utf8Encode = (string: string) => {\n string = string.replace(/\\r\\n/g, '\\n')\n let utftext = ''\n\n for (let n = 0; n < string.length; n++) {\n const c = string.charCodeAt(n)\n\n if (c < 128) {\n utftext += String.fromCharCode(c)\n }\n else if (c > 127 && c < 2048) {\n utftext += String.fromCharCode((c >> 6) | 192)\n utftext += String.fromCharCode((c & 63) | 128)\n }\n else {\n utftext += String.fromCharCode((c >> 12) | 224)\n utftext += String.fromCharCode(((c >> 6) & 63) | 128)\n utftext += String.fromCharCode((c & 63) | 128)\n }\n }\n\n return utftext\n}\n\nconst encode = (input: string) => {\n let output = ''\n let chr1, chr2, chr3, enc1, enc2, enc3, enc4\n let i = 0\n input = utf8Encode(input)\n while (i < input.length) {\n chr1 = input.charCodeAt(i++)\n chr2 = input.charCodeAt(i++)\n chr3 = input.charCodeAt(i++)\n enc1 = chr1 >> 2\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4)\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6)\n enc4 = chr3 & 63\n if (isNaN(chr2)) enc3 = enc4 = 64\n else if (isNaN(chr3)) enc4 = 64\n output = output + characters.charAt(enc1) + characters.charAt(enc2) + characters.charAt(enc3) + characters.charAt(enc4)\n }\n return output\n}\n\nexport const svg2Base64 = (element: Element) => {\n const XMLS = new XMLSerializer()\n const svg = XMLS.serializeToString(element)\n\n return PREFIX + encode(svg)\n}","import { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { trim } from 'lodash'\nimport { saveAs } from 'file-saver'\nimport pptxgen from 'pptxgenjs'\nimport tinycolor from 'tinycolor2'\nimport { toPng, toJpeg } from 'html-to-image'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElementOutline, PPTElementShadow, PPTElementLink, Slide } from '@/types/slides'\nimport { getElementRange, getLineElementPath, getTableSubThemeColor } from '@/utils/element'\nimport { type AST, toAST } from '@/utils/htmlParser'\nimport { type SvgPoints, toPoints } from '@/utils/svgPathParser'\nimport { encrypt } from '@/utils/crypto'\nimport { svg2Base64 } from '@/utils/svg2Base64'\nimport message from '@/utils/message'\n\nconst INCH_PX_RATIO = 100\nconst PT_PX_RATIO = 0.75\n\ninterface ExportImageConfig {\n quality: number\n width: number\n fontEmbedCSS?: string\n}\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { slides, theme, viewportRatio, title } = storeToRefs(slidesStore)\n\n const exporting = ref(false)\n\n // 导出图片\n const exportImage = (domRef: HTMLElement, format: string, quality: number, ignoreWebfont = true) => {\n exporting.value = true\n const toImage = format === 'png' ? toPng : toJpeg\n\n const foreignObjectSpans = domRef.querySelectorAll('foreignObject [xmlns]')\n foreignObjectSpans.forEach(spanRef => spanRef.removeAttribute('xmlns'))\n\n setTimeout(() => {\n const config: ExportImageConfig = {\n quality,\n width: 1600,\n }\n\n if (ignoreWebfont) config.fontEmbedCSS = ''\n\n toImage(domRef, config).then(dataUrl => {\n exporting.value = false\n saveAs(dataUrl, `${title.value}.${format}`)\n }).catch(() => {\n exporting.value = false\n message.error('导出图片失败')\n })\n }, 200)\n }\n \n // 导出pptist文件(特有 .pptist 后缀文件)\n const exportSpecificFile = (_slides: Slide[]) => {\n const blob = new Blob([encrypt(JSON.stringify(_slides))], { type: '' })\n saveAs(blob, `${title.value}.pptist`)\n }\n \n // 导出JSON文件\n const exportJSON = () => {\n const blob = new Blob([JSON.stringify(slides.value)], { type: '' })\n saveAs(blob, `${title.value}.json`)\n }\n\n // 格式化颜色值为 透明度 + HexString,供pptxgenjs使用\n const formatColor = (_color: string) => {\n const c = tinycolor(_color)\n const alpha = c.getAlpha()\n const color = alpha === 0 ? '#ffffff' : c.setAlpha(1).toHexString()\n return {\n alpha,\n color,\n }\n }\n\n type FormatColor = ReturnType\n\n // 将HTML字符串格式化为pptxgenjs所需的格式\n // 核心思路:将HTML字符串按样式分片平铺,每个片段需要继承祖先元素的样式信息,遇到块级元素需要换行\n const formatHTML = (html: string) => {\n const ast = toAST(html)\n let bulletFlag = false\n let indent = 0\n\n const slices: pptxgen.TextProps[] = []\n const parse = (obj: AST[], baseStyleObj: { [key: string]: string } = {}) => {\n\n for (const item of obj) {\n const isBlockTag = 'tagName' in item && ['div', 'li', 'p'].includes(item.tagName)\n\n if (isBlockTag && slices.length) {\n const lastSlice = slices[slices.length - 1]\n if (!lastSlice.options) lastSlice.options = {}\n lastSlice.options.breakLine = true\n }\n\n const styleObj = { ...baseStyleObj }\n const styleAttr = 'attributes' in item ? item.attributes.find(attr => attr.key === 'style') : null\n if (styleAttr && styleAttr.value) {\n const styleArr = styleAttr.value.split(';')\n for (const styleItem of styleArr) {\n const [_key, _value] = styleItem.split(': ')\n const [key, value] = [trim(_key), trim(_value)]\n if (key && value) styleObj[key] = value\n }\n }\n\n if ('tagName' in item) {\n if (item.tagName === 'em') {\n styleObj['font-style'] = 'italic'\n }\n if (item.tagName === 'strong') {\n styleObj['font-weight'] = 'bold'\n }\n if (item.tagName === 'sup') {\n styleObj['vertical-align'] = 'super'\n }\n if (item.tagName === 'sub') {\n styleObj['vertical-align'] = 'sub'\n }\n if (item.tagName === 'a') {\n const attr = item.attributes.find(attr => attr.key === 'href')\n styleObj['href'] = attr?.value || ''\n }\n if (item.tagName === 'ul') {\n styleObj['list-type'] = 'ul'\n }\n if (item.tagName === 'ol') {\n styleObj['list-type'] = 'ol'\n }\n if (item.tagName === 'li') {\n bulletFlag = true\n }\n if (item.tagName === 'p') {\n if ('attributes' in item) {\n const dataIndentAttr = item.attributes.find(attr => attr.key === 'data-indent')\n if (dataIndentAttr && dataIndentAttr.value) indent = +dataIndentAttr.value\n }\n }\n }\n\n if ('tagName' in item && item.tagName === 'br') {\n slices.push({ text: '', options: { breakLine: true } })\n }\n else if ('content' in item) {\n const text = item.content.replace(/ /g, ' ').replace(/>/g, '>').replace(/</g, '<').replace(/&/g, '&').replace(/\\n/g, '')\n const options: pptxgen.TextPropsOptions = {}\n\n if (styleObj['font-size']) {\n options.fontSize = parseInt(styleObj['font-size']) * PT_PX_RATIO\n }\n if (styleObj['color']) {\n options.color = formatColor(styleObj['color']).color\n }\n if (styleObj['background-color']) {\n options.highlight = formatColor(styleObj['background-color']).color\n }\n if (styleObj['text-decoration-line']) {\n if (styleObj['text-decoration-line'].indexOf('underline') !== -1) {\n options.underline = {\n color: options.color || '#000000',\n style: 'sng',\n }\n }\n if (styleObj['text-decoration-line'].indexOf('line-through') !== -1) {\n options.strike = 'sngStrike'\n }\n }\n if (styleObj['text-decoration']) {\n if (styleObj['text-decoration'].indexOf('underline') !== -1) {\n options.underline = {\n color: options.color || '#000000',\n style: 'sng',\n }\n }\n if (styleObj['text-decoration'].indexOf('line-through') !== -1) {\n options.strike = 'sngStrike'\n }\n }\n if (styleObj['vertical-align']) {\n if (styleObj['vertical-align'] === 'super') options.superscript = true\n if (styleObj['vertical-align'] === 'sub') options.subscript = true\n }\n if (styleObj['text-align']) options.align = styleObj['text-align'] as pptxgen.HAlign\n if (styleObj['font-weight']) options.bold = styleObj['font-weight'] === 'bold'\n if (styleObj['font-style']) options.italic = styleObj['font-style'] === 'italic'\n if (styleObj['font-family']) options.fontFace = styleObj['font-family']\n if (styleObj['href']) options.hyperlink = { url: styleObj['href'] }\n\n if (bulletFlag && styleObj['list-type'] === 'ol') {\n options.bullet = { type: 'number', indent: 20 * PT_PX_RATIO }\n options.paraSpaceBefore = 0.1\n bulletFlag = false\n }\n if (bulletFlag && styleObj['list-type'] === 'ul') {\n options.bullet = { indent: 20 * PT_PX_RATIO }\n options.paraSpaceBefore = 0.1\n bulletFlag = false\n }\n if (indent) {\n options.indentLevel = indent\n indent = 0\n }\n\n slices.push({ text, options })\n }\n else if ('children' in item) parse(item.children, styleObj)\n }\n }\n parse(ast)\n return slices\n }\n\n type Points = Array<\n | { x: number; y: number; moveTo?: boolean }\n | { x: number; y: number; curve: { type: 'arc'; hR: number; wR: number; stAng: number; swAng: number } }\n | { x: number; y: number; curve: { type: 'quadratic'; x1: number; y1: number } }\n | { x: number; y: number; curve: { type: 'cubic'; x1: number; y1: number; x2: number; y2: number } }\n | { close: true }\n >\n\n // 将SVG路径信息格式化为pptxgenjs所需要的格式\n const formatPoints = (points: SvgPoints, scale = { x: 1, y: 1 }): Points => {\n return points.map(point => {\n if (point.close !== undefined) {\n return { close: true }\n }\n else if (point.type === 'M') {\n return {\n x: point.x / INCH_PX_RATIO * scale.x,\n y: point.y / INCH_PX_RATIO * scale.y,\n moveTo: true,\n }\n }\n else if (point.curve) {\n if (point.curve.type === 'cubic') {\n return {\n x: point.x / INCH_PX_RATIO * scale.x,\n y: point.y / INCH_PX_RATIO * scale.y,\n curve: {\n type: 'cubic',\n x1: (point.curve.x1 as number) / INCH_PX_RATIO * scale.x,\n y1: (point.curve.y1 as number) / INCH_PX_RATIO * scale.y,\n x2: (point.curve.x2 as number) / INCH_PX_RATIO * scale.x,\n y2: (point.curve.y2 as number) / INCH_PX_RATIO * scale.y,\n },\n }\n }\n else if (point.curve.type === 'quadratic') {\n return {\n x: point.x / INCH_PX_RATIO * scale.x,\n y: point.y / INCH_PX_RATIO * scale.y,\n curve: {\n type: 'quadratic',\n x1: (point.curve.x1 as number) / INCH_PX_RATIO * scale.x,\n y1: (point.curve.y1 as number) / INCH_PX_RATIO * scale.y,\n },\n }\n }\n }\n return {\n x: point.x / INCH_PX_RATIO * scale.x,\n y: point.y / INCH_PX_RATIO * scale.y,\n }\n })\n }\n\n // 获取阴影配置\n const getShadowOption = (shadow: PPTElementShadow): pptxgen.ShadowProps => {\n const c = formatColor(shadow.color)\n const { h, v } = shadow\n\n let offset = 4\n let angle = 45\n\n if (h === 0 && v === 0) {\n offset = 4\n angle = 45\n }\n else if (h === 0) {\n if (v > 0) {\n offset = v\n angle = 90\n }\n else {\n offset = -v\n angle = 270\n }\n }\n else if (v === 0) {\n if (h > 0) {\n offset = h\n angle = 1\n }\n else {\n offset = -h\n angle = 180\n }\n }\n else if (h > 0 && v > 0) {\n offset = Math.max(h, v)\n angle = 45\n }\n else if (h > 0 && v < 0) {\n offset = Math.max(h, -v)\n angle = 315\n }\n else if (h < 0 && v > 0) {\n offset = Math.max(-h, v)\n angle = 135\n }\n else if (h < 0 && v < 0) {\n offset = Math.max(-h, -v)\n angle = 225\n }\n\n return {\n type: 'outer',\n color: c.color.replace('#', ''),\n opacity: c.alpha,\n blur: shadow.blur * PT_PX_RATIO,\n offset,\n angle,\n }\n }\n\n // 获取边框配置\n const getOutlineOption = (outline: PPTElementOutline): pptxgen.ShapeLineProps => {\n const c = formatColor(outline?.color || '#000000')\n return {\n color: c.color, \n transparency: (1 - c.alpha) * 100,\n width: (outline.width || 1) * PT_PX_RATIO, \n dashType: outline.style === 'solid' ? 'solid' : 'dash',\n }\n }\n\n // 获取超链接配置\n const getLinkOption = (link: PPTElementLink): pptxgen.HyperlinkProps | null => {\n const { type, target } = link\n if (type === 'web') return { url: target }\n if (type === 'slide') {\n const index = slides.value.findIndex(slide => slide.id === target)\n if (index !== -1) return { slide: index + 1 }\n }\n\n return null\n }\n\n // 导出PPTX文件\n const exportPPTX = (_slides: Slide[], masterOverwrite: boolean, ignoreMedia: boolean) => {\n exporting.value = true\n const pptx = new pptxgen()\n\n if (viewportRatio.value === 0.625) pptx.layout = 'LAYOUT_16x10'\n else if (viewportRatio.value === 0.75) pptx.layout = 'LAYOUT_4x3'\n else if (viewportRatio.value === 0.70710678) {\n pptx.defineLayout({ name: 'A3', width: 10, height: 7.0710678 })\n pptx.layout = 'A3'\n }\n else pptx.layout = 'LAYOUT_16x9'\n\n if (masterOverwrite) {\n const { color: bgColor, alpha: bgAlpha } = formatColor(theme.value.backgroundColor)\n pptx.defineSlideMaster({\n title: 'PPTIST_MASTER',\n background: { color: bgColor, transparency: (1 - bgAlpha) * 100 },\n })\n }\n\n for (const slide of _slides) {\n const pptxSlide = pptx.addSlide()\n\n if (slide.background) {\n const background = slide.background\n if (background.type === 'image' && background.image) {\n pptxSlide.background = { data: background.image }\n }\n else if (background.type === 'solid' && background.color) {\n const c = formatColor(background.color)\n pptxSlide.background = { color: c.color, transparency: (1 - c.alpha) * 100 }\n }\n else if (background.type === 'gradient' && background.gradientColor) {\n const [color1, color2] = background.gradientColor\n const color = tinycolor.mix(color1, color2).toHexString()\n const c = formatColor(color)\n pptxSlide.background = { color: c.color, transparency: (1 - c.alpha) * 100 }\n }\n }\n if (slide.remark) pptxSlide.addNotes(slide.remark)\n\n if (!slide.elements) continue\n\n for (const el of slide.elements) {\n if (el.type === 'text') {\n const textProps = formatHTML(el.content)\n\n const options: pptxgen.TextPropsOptions = {\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n fontSize: 20 * PT_PX_RATIO,\n fontFace: '微软雅黑',\n color: '#000000',\n valign: 'top',\n margin: 10 * PT_PX_RATIO,\n paraSpaceBefore: 5 * PT_PX_RATIO,\n lineSpacingMultiple: 1.5 / 1.25,\n autoFit: true,\n }\n if (el.rotate) options.rotate = el.rotate\n if (el.wordSpace) options.charSpacing = el.wordSpace * PT_PX_RATIO\n if (el.lineHeight) options.lineSpacingMultiple = el.lineHeight / 1.25\n if (el.fill) {\n const c = formatColor(el.fill)\n const opacity = el.opacity === undefined ? 1 : el.opacity\n options.fill = { color: c.color, transparency: (1 - c.alpha * opacity) * 100 }\n }\n if (el.defaultColor) options.color = formatColor(el.defaultColor).color\n if (el.defaultFontName) options.fontFace = el.defaultFontName\n if (el.shadow) options.shadow = getShadowOption(el.shadow)\n if (el.outline?.width) options.line = getOutlineOption(el.outline)\n if (el.opacity !== undefined) options.transparency = (1 - el.opacity) * 100\n if (el.paragraphSpace !== undefined) options.paraSpaceBefore = el.paragraphSpace * PT_PX_RATIO\n if (el.vertical) options.vert = 'eaVert'\n\n pptxSlide.addText(textProps, options)\n }\n\n else if (el.type === 'image') {\n const options: pptxgen.ImageProps = {\n path: el.src,\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n }\n if (el.flipH) options.flipH = el.flipH\n if (el.flipV) options.flipV = el.flipV\n if (el.rotate) options.rotate = el.rotate\n if (el.link) {\n const linkOption = getLinkOption(el.link)\n if (linkOption) options.hyperlink = linkOption\n }\n if (el.filters?.opacity) options.transparency = 100 - parseInt(el.filters?.opacity)\n if (el.clip) {\n if (el.clip.shape === 'ellipse') options.rounding = true\n\n const [start, end] = el.clip.range\n const [startX, startY] = start\n const [endX, endY] = end\n\n const originW = el.width / ((endX - startX) / INCH_PX_RATIO)\n const originH = el.height / ((endY - startY) / INCH_PX_RATIO)\n\n options.w = originW / INCH_PX_RATIO\n options.h = originH / INCH_PX_RATIO\n\n options.sizing = {\n type: 'crop',\n x: startX / INCH_PX_RATIO * originW / INCH_PX_RATIO,\n y: startY / INCH_PX_RATIO * originH / INCH_PX_RATIO,\n w: (endX - startX) / INCH_PX_RATIO * originW / INCH_PX_RATIO,\n h: (endY - startY) / INCH_PX_RATIO * originH / INCH_PX_RATIO,\n }\n }\n\n pptxSlide.addImage(options)\n }\n\n else if (el.type === 'shape') {\n if (el.special) {\n const svgRef = document.querySelector(`.thumbnail-list .base-element-${el.id} svg`) as HTMLElement\n const base64SVG = svg2Base64(svgRef)\n\n const options: pptxgen.ImageProps = {\n data: base64SVG,\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n }\n if (el.rotate) options.rotate = el.rotate\n if (el.link) {\n const linkOption = getLinkOption(el.link)\n if (linkOption) options.hyperlink = linkOption\n }\n\n pptxSlide.addImage(options)\n }\n else {\n const scale = {\n x: el.width / el.viewBox[0],\n y: el.height / el.viewBox[1],\n }\n const points = formatPoints(toPoints(el.path), scale)\n \n const fillColor = formatColor(el.fill)\n const opacity = el.opacity === undefined ? 1 : el.opacity\n \n const options: pptxgen.ShapeProps = {\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n fill: { color: fillColor.color, transparency: (1 - fillColor.alpha * opacity) * 100 },\n points,\n }\n if (el.flipH) options.flipH = el.flipH\n if (el.flipV) options.flipV = el.flipV\n if (el.shadow) options.shadow = getShadowOption(el.shadow)\n if (el.outline?.width) options.line = getOutlineOption(el.outline)\n if (el.rotate) options.rotate = el.rotate\n if (el.link) {\n const linkOption = getLinkOption(el.link)\n if (linkOption) options.hyperlink = linkOption\n }\n\n pptxSlide.addShape('custGeom' as pptxgen.ShapeType, options)\n }\n if (el.text) {\n const textProps = formatHTML(el.text.content)\n\n const options: pptxgen.TextPropsOptions = {\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n fontSize: 20 * PT_PX_RATIO,\n fontFace: '微软雅黑',\n color: '#000000',\n paraSpaceBefore: 5 * PT_PX_RATIO,\n valign: el.text.align,\n }\n if (el.rotate) options.rotate = el.rotate\n if (el.text.defaultColor) options.color = formatColor(el.text.defaultColor).color\n if (el.text.defaultFontName) options.fontFace = el.text.defaultFontName\n\n pptxSlide.addText(textProps, options)\n }\n }\n\n else if (el.type === 'line') {\n const path = getLineElementPath(el)\n const points = formatPoints(toPoints(path))\n const { minX, maxX, minY, maxY } = getElementRange(el)\n const c = formatColor(el.color)\n\n const options: pptxgen.ShapeProps = {\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: (maxX - minX) / INCH_PX_RATIO,\n h: (maxY - minY) / INCH_PX_RATIO,\n line: {\n color: c.color, \n transparency: (1 - c.alpha) * 100,\n width: el.width * PT_PX_RATIO, \n dashType: el.style === 'solid' ? 'solid' : 'dash',\n beginArrowType: el.points[0] ? 'arrow' : 'none',\n endArrowType: el.points[1] ? 'arrow' : 'none',\n },\n points,\n }\n if (el.shadow) options.shadow = getShadowOption(el.shadow)\n\n pptxSlide.addShape('custGeom' as pptxgen.ShapeType, options)\n }\n\n else if (el.type === 'chart') {\n const chartData = []\n for (let i = 0; i < el.data.series.length; i++) {\n const item = el.data.series[i]\n chartData.push({\n name: `系列${i + 1}`,\n labels: el.data.labels,\n values: item,\n })\n }\n\n let chartColors: string[] = []\n if (el.themeColor.length === 10) chartColors = el.themeColor.map(color => formatColor(color).color)\n else if (el.themeColor.length === 1) chartColors = tinycolor(el.themeColor[0]).analogous(10).map(color => formatColor(color.toHexString()).color)\n else {\n const len = el.themeColor.length\n const supplement = tinycolor(el.themeColor[len - 1]).analogous(10 + 1 - len).map(color => color.toHexString())\n chartColors = [...el.themeColor.slice(0, len - 1), ...supplement].map(color => formatColor(color).color)\n }\n \n const options: pptxgen.IChartOpts = {\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n chartColors: el.chartType === 'pie' ? chartColors : chartColors.slice(0, el.data.series.length),\n }\n\n if (el.fill) options.plotArea = { fill: { color: formatColor(el.fill).color } }\n if (el.legend) {\n options.showLegend = true\n options.legendPos = el.legend === 'top' ? 't' : 'b'\n options.legendColor = formatColor(el.gridColor || '#000000').color\n options.legendFontSize = 14 * PT_PX_RATIO\n }\n\n let type = pptx.ChartType.bar\n if (el.chartType === 'bar') {\n type = pptx.ChartType.bar\n options.barDir = el.options?.horizontalBars ? 'bar' : 'col'\n }\n else if (el.chartType === 'line') {\n if (el.options?.showArea) type = pptx.ChartType.area\n else if (el.options?.showLine === false) {\n type = pptx.ChartType.scatter\n\n chartData.unshift({ name: 'X-Axis', values: Array(el.data.series[0].length).fill(0).map((v, i) => i) })\n options.lineSize = 0\n }\n else type = pptx.ChartType.line\n\n if (el.options?.lineSmooth) options.lineSmooth = true\n }\n else if (el.chartType === 'pie') {\n if (el.options?.donut) {\n type = pptx.ChartType.doughnut\n options.holeSize = 75\n }\n else type = pptx.ChartType.pie\n }\n \n pptxSlide.addChart(type, chartData, options)\n }\n\n else if (el.type === 'table') {\n const hiddenCells = []\n for (let i = 0; i < el.data.length; i++) {\n const rowData = el.data[i]\n\n for (let j = 0; j < rowData.length; j++) {\n const cell = rowData[j]\n if (cell.colspan > 1 || cell.rowspan > 1) {\n for (let row = i; row < i + cell.rowspan; row++) {\n for (let col = row === i ? j + 1 : j; col < j + cell.colspan; col++) hiddenCells.push(`${row}_${col}`)\n }\n }\n }\n }\n\n const tableData = []\n\n const theme = el.theme\n let themeColor: FormatColor | null = null\n let subThemeColors: FormatColor[] = []\n if (theme) {\n themeColor = formatColor(theme.color)\n subThemeColors = getTableSubThemeColor(theme.color).map(item => formatColor(item))\n }\n\n for (let i = 0; i < el.data.length; i++) {\n const row = el.data[i]\n const _row = []\n\n for (let j = 0; j < row.length; j++) {\n const cell = row[j]\n const cellOptions: pptxgen.TableCellProps = {\n colspan: cell.colspan,\n rowspan: cell.rowspan,\n bold: cell.style?.bold || false,\n italic: cell.style?.em || false,\n underline: { style: cell.style?.underline ? 'sng' : 'none' },\n align: cell.style?.align || 'left',\n valign: 'middle',\n fontFace: cell.style?.fontname || '微软雅黑',\n fontSize: (cell.style?.fontsize ? parseInt(cell.style?.fontsize) : 14) * PT_PX_RATIO,\n }\n if (theme && themeColor) {\n let c: FormatColor\n if (i % 2 === 0) c = subThemeColors[1]\n else c = subThemeColors[0]\n\n if (theme.rowHeader && i === 0) c = themeColor\n else if (theme.rowFooter && i === el.data.length - 1) c = themeColor\n else if (theme.colHeader && j === 0) c = themeColor\n else if (theme.colFooter && j === row.length - 1) c = themeColor\n\n cellOptions.fill = { color: c.color, transparency: (1 - c.alpha) * 100 }\n }\n if (cell.style?.backcolor) {\n const c = formatColor(cell.style.backcolor)\n cellOptions.fill = { color: c.color, transparency: (1 - c.alpha) * 100 }\n }\n if (cell.style?.color) cellOptions.color = formatColor(cell.style.color).color\n\n if (!hiddenCells.includes(`${i}_${j}`)) {\n _row.push({\n text: cell.text,\n options: cellOptions,\n })\n }\n }\n if (_row.length) tableData.push(_row)\n }\n\n const options: pptxgen.TableProps = {\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n colW: el.colWidths.map(item => el.width * item / INCH_PX_RATIO),\n }\n if (el.theme) options.fill = { color: '#ffffff' }\n if (el.outline.width && el.outline.color) {\n options.border = {\n type: el.outline.style === 'solid' ? 'solid' : 'dash',\n pt: el.outline.width * PT_PX_RATIO,\n color: formatColor(el.outline.color).color,\n }\n }\n\n pptxSlide.addTable(tableData, options)\n }\n \n else if (el.type === 'latex') {\n const svgRef = document.querySelector(`.thumbnail-list .base-element-${el.id} svg`) as HTMLElement\n const base64SVG = svg2Base64(svgRef)\n\n const options: pptxgen.ImageProps = {\n data: base64SVG,\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n }\n if (el.link) {\n const linkOption = getLinkOption(el.link)\n if (linkOption) options.hyperlink = linkOption\n }\n\n pptxSlide.addImage(options)\n }\n \n else if (!ignoreMedia && (el.type === 'video' || el.type === 'audio')) {\n const options: pptxgen.MediaProps = {\n x: el.left / INCH_PX_RATIO,\n y: el.top / INCH_PX_RATIO,\n w: el.width / INCH_PX_RATIO,\n h: el.height / INCH_PX_RATIO,\n path: el.src,\n type: el.type,\n }\n if (el.type === 'video' && el.poster) options.cover = el.poster\n\n const extMatch = el.src.match(/\\.([a-zA-Z0-9]+)(?:[\\?#]|$)/)\n if (extMatch && extMatch[1]) options.extn = extMatch[1]\n else if (el.ext) options.extn = el.ext\n \n const videoExts = ['avi', 'mp4', 'm4v', 'mov', 'wmv']\n const audioExts = ['mp3', 'm4a', 'mp4', 'wav', 'wma']\n if (options.extn && [...videoExts, ...audioExts].includes(options.extn)) {\n pptxSlide.addMedia(options)\n }\n }\n }\n }\n\n setTimeout(() => {\n pptx.writeFile({ fileName: `${title.value}.pptx` }).then(() => exporting.value = false).catch(() => {\n exporting.value = false\n message.error('导出失败')\n })\n }, 200)\n }\n\n return {\n exporting,\n exportImage,\n exportJSON,\n exportSpecificFile,\n exportPPTX,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1df3f398\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"export-img-dialog\" }\nconst _hoisted_2 = { class: \"thumbnails-view\" }\nconst _hoisted_3 = { class: \"configs\" }\nconst _hoisted_4 = { class: \"row\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"导出格式:\", -1))\nconst _hoisted_6 = { class: \"row\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"导出范围:\", -1))\nconst _hoisted_8 = {\n key: 0,\n class: \"row\"\n}\nconst _hoisted_9 = [\"data-range\"]\nconst _hoisted_10 = { class: \"row\" }\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"图片质量:\", -1))\nconst _hoisted_12 = { class: \"row\" }\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"忽略在线字体:\", -1))\nconst _hoisted_14 = { class: \"config-item\" }\nconst _hoisted_15 = { class: \"btns\" }\n\nimport { computed, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useExport from '@/hooks/useExport'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport FullscreenSpin from '@/components/FullscreenSpin.vue'\nimport Switch from '@/components/Switch.vue'\nimport Slider from '@/components/Slider.vue'\nimport Button from '@/components/Button.vue'\nimport RadioButton from '@/components/RadioButton.vue'\nimport RadioGroup from '@/components/RadioGroup.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ExportImage',\n emits: [\"close\"],\n setup(__props, { emit }) {\n\n\n\nconst { slides, currentSlide } = storeToRefs(useSlidesStore())\n\nconst imageThumbnailsRef = ref()\nconst rangeType = ref<'all' | 'current' | 'custom'>('all')\nconst range = ref<[number, number]>([1, slides.value.length])\nconst format = ref<'jpeg' | 'png'>('jpeg')\nconst quality = ref(1)\nconst ignoreWebfont = ref(true)\n\nconst renderSlides = computed(() => {\n if (rangeType.value === 'all') return slides.value\n if (rangeType.value === 'current') return [currentSlide.value]\n return slides.value.filter((item, index) => {\n const [min, max] = range.value\n return index >= min - 1 && index <= max - 1\n })\n})\n\nconst { exportImage, exporting } = useExport()\n\nconst expImage = () => {\n if (!imageThumbnailsRef.value) return\n exportImage(imageThumbnailsRef.value, format.value, quality.value, ignoreWebfont.value)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"thumbnails\",\n ref_key: \"imageThumbnailsRef\",\n ref: imageThumbnailsRef\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(renderSlides.value, (slide) => {\n return (_openBlock(), _createBlock(ThumbnailSlide, {\n class: \"thumbnail\",\n key: slide.id,\n slide: slide,\n size: 1600\n }, null, 8, [\"slide\"]))\n }), 128))\n ], 512)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createVNode(RadioGroup, {\n class: \"config-item\",\n value: format.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((format).value = $event))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n style: {\"width\":\"50%\"},\n value: \"jpeg\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"JPEG\")\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n style: {\"width\":\"50%\"},\n value: \"png\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"PNG\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createVNode(RadioGroup, {\n class: \"config-item\",\n value: rangeType.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((rangeType).value = $event))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"all\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"全部\")\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"current\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"当前页\")\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"custom\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"自定义\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"])\n ]),\n (rangeType.value === 'custom')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", {\n class: \"title\",\n \"data-range\": `(${range.value[0]} ~ ${range.value[1]})`\n }, \"自定义范围:\", 8, _hoisted_9),\n _createVNode(Slider, {\n class: \"config-item\",\n range: \"\",\n min: 1,\n max: _unref(slides).length,\n step: 1,\n value: range.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((range).value = $event))\n }, null, 8, [\"max\", \"value\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_10, [\n _hoisted_11,\n _createVNode(Slider, {\n class: \"config-item\",\n min: 0,\n max: 1,\n step: 0.1,\n value: quality.value,\n \"onUpdate:value\": _cache[3] || (_cache[3] = ($event: any) => ((quality).value = $event))\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_12, [\n _hoisted_13,\n _createElementVNode(\"div\", _hoisted_14, [\n _withDirectives(_createVNode(Switch, {\n value: ignoreWebfont.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((ignoreWebfont).value = $event))\n }, null, 8, [\"value\"]), [\n [_directive_tooltip, '导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。']\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createVNode(Button, {\n class: \"btn export\",\n type: \"primary\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (expImage()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"导出图片\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn close\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"关闭\")\n ]),\n _: 1\n })\n ]),\n _createVNode(FullscreenSpin, {\n loading: _unref(exporting),\n tip: \"正在导出...\"\n }, null, 8, [\"loading\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ExportImage.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ExportImage.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ExportImage.vue?vue&type=style&index=0&id=1df3f398&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1df3f398\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6a7223ca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"export-json-dialog\" }\nconst _hoisted_2 = { class: \"preview\" }\nconst _hoisted_3 = { class: \"btns\" }\n\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useExport from '@/hooks/useExport'\nimport Button from '@/components/Button.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ExportJSON',\n emits: [\"close\"],\n setup(__props, { emit }) {\n\n\n\nconst { slides } = storeToRefs(useSlidesStore())\nconst { exportJSON } = useExport()\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"pre\", null, _toDisplayString(_unref(slides)), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(Button, {\n class: \"btn export\",\n type: \"primary\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_unref(exportJSON)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"导出 JSON\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn close\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"关闭\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ExportJSON.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ExportJSON.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ExportJSON.vue?vue&type=style&index=0&id=6a7223ca&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6a7223ca\"]])\n\nexport default __exports__","interface PageSize {\n width: number\n height: number\n margin: number\n}\n\nconst createIframe = () => {\n const iframe = document.createElement('iframe')\n iframe.style.width = '0'\n iframe.style.height = '0'\n iframe.style.position = 'absolute'\n iframe.style.right = '0'\n iframe.style.top = '0'\n iframe.style.border = '0'\n\n document.body.appendChild(iframe)\n\n return iframe\n}\n\nconst writeContent = (doc: Document, printNode: HTMLElement, size: PageSize) => {\n const docType = ''\n\n let style = ''\n const styleSheets = document.styleSheets\n if (styleSheets) {\n for (const styleSheet of styleSheets) {\n if (!styleSheet.cssRules) continue\n\n for (const rule of styleSheet.cssRules) {\n style += rule.cssText\n }\n }\n }\n\n const { width, height, margin } = size\n const head = `\n \n \n \n `\n const body = '' + printNode.innerHTML + ''\n\n doc.open()\n doc.write(`\n ${docType}\n \n ${head}\n ${body}\n \n `)\n doc.close()\n}\n\nexport const print = (printNode: HTMLElement, size: PageSize) => {\n const iframe = createIframe()\n const iframeContentWindow = iframe.contentWindow\n\n if (!iframe.contentDocument || !iframeContentWindow) return\n writeContent(iframe.contentDocument, printNode, size)\n\n const handleLoadIframe = () => {\n iframeContentWindow.focus()\n iframeContentWindow.print()\n }\n\n const handleAfterprint = () => {\n iframe.removeEventListener('load', handleLoadIframe)\n iframeContentWindow.removeEventListener('afterprint', handleAfterprint)\n document.body.removeChild(iframe)\n }\n\n iframe.addEventListener('load', handleLoadIframe)\n iframeContentWindow.addEventListener('afterprint', handleAfterprint)\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1668f898\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"export-pdf-dialog\" }\nconst _hoisted_2 = { class: \"thumbnails-view\" }\nconst _hoisted_3 = { class: \"configs\" }\nconst _hoisted_4 = { class: \"row\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"导出范围:\", -1))\nconst _hoisted_6 = { class: \"row\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"每页数量:\", -1))\nconst _hoisted_8 = { class: \"row\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"边缘留白:\", -1))\nconst _hoisted_10 = { class: \"config-item\" }\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"tip\" }, \" 提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 \", -1))\nconst _hoisted_12 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport { print } from '@/utils/print'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Switch from '@/components/Switch.vue'\nimport Button from '@/components/Button.vue'\nimport RadioButton from '@/components/RadioButton.vue'\nimport RadioGroup from '@/components/RadioGroup.vue'\nimport Select from '@/components/Select.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ExportPDF',\n emits: [\"close\"],\n setup(__props, { emit }) {\n\n\n\nconst { slides, currentSlide, viewportRatio } = storeToRefs(useSlidesStore())\n\nconst pdfThumbnailsRef = ref()\nconst rangeType = ref<'all' | 'current'>('all')\nconst count = ref(1)\nconst padding = ref(true)\n\nconst expPDF = () => {\n if (!pdfThumbnailsRef.value) return\n const pageSize = {\n width: 1600,\n height: rangeType.value === 'all' ? 1600 * viewportRatio.value * count.value : 1600 * viewportRatio.value,\n margin: padding.value ? 50 : 0,\n }\n print(pdfThumbnailsRef.value, pageSize)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"thumbnails\",\n ref_key: \"pdfThumbnailsRef\",\n ref: pdfThumbnailsRef\n }, [\n (rangeType.value === 'current')\n ? (_openBlock(), _createBlock(ThumbnailSlide, {\n key: 0,\n class: \"thumbnail\",\n slide: _unref(currentSlide),\n size: 1600\n }, null, 8, [\"slide\"]))\n : (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createBlock(ThumbnailSlide, {\n class: _normalizeClass([\"thumbnail\", { 'break-page': (index + 1) % count.value === 0 }]),\n key: slide.id,\n slide: slide,\n size: 1600\n }, null, 8, [\"class\", \"slide\"]))\n }), 128))\n ], 512)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createVNode(RadioGroup, {\n class: \"config-item\",\n value: rangeType.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((rangeType).value = $event))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n style: {\"width\":\"50%\"},\n value: \"all\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"全部\")\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n style: {\"width\":\"50%\"},\n value: \"current\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"当前页\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createVNode(Select, {\n class: \"config-item\",\n value: count.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((count).value = $event)),\n options: [\n { label: '1', value: 1 },\n { label: '2', value: 2 },\n { label: '3', value: 3 },\n ]\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(Switch, {\n value: padding.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((padding).value = $event))\n }, null, 8, [\"value\"])\n ])\n ]),\n _hoisted_11\n ]),\n _createElementVNode(\"div\", _hoisted_12, [\n _createVNode(Button, {\n class: \"btn export\",\n type: \"primary\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (expPDF()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"打印 / 导出 PDF\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn close\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"关闭\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ExportPDF.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ExportPDF.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ExportPDF.vue?vue&type=style&index=0&id=1668f898&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1668f898\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-265d4b60\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"export-pptx-dialog\" }\nconst _hoisted_2 = { class: \"configs\" }\nconst _hoisted_3 = { class: \"row\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"导出范围:\", -1))\nconst _hoisted_5 = {\n key: 0,\n class: \"row\"\n}\nconst _hoisted_6 = [\"data-range\"]\nconst _hoisted_7 = { class: \"row\" }\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"忽略音频/视频:\", -1))\nconst _hoisted_9 = { class: \"config-item\" }\nconst _hoisted_10 = { class: \"row\" }\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"覆盖默认母版:\", -1))\nconst _hoisted_12 = { class: \"config-item\" }\nconst _hoisted_13 = {\n key: 1,\n class: \"tip\"\n}\nconst _hoisted_14 = { class: \"btns\" }\n\nimport { computed, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useExport from '@/hooks/useExport'\n\nimport FullscreenSpin from '@/components/FullscreenSpin.vue'\nimport Switch from '@/components/Switch.vue'\nimport Slider from '@/components/Slider.vue'\nimport Button from '@/components/Button.vue'\nimport RadioButton from '@/components/RadioButton.vue'\nimport RadioGroup from '@/components/RadioGroup.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ExportPPTX',\n emits: [\"close\"],\n setup(__props, { emit }) {\n\n\n\nconst { slides, currentSlide } = storeToRefs(useSlidesStore())\n\nconst { exportPPTX, exporting } = useExport()\n\nconst rangeType = ref<'all' | 'current' | 'custom'>('all')\nconst range = ref<[number, number]>([1, slides.value.length])\nconst masterOverwrite = ref(true)\nconst ignoreMedia = ref(true)\n\nconst selectedSlides = computed(() => {\n if (rangeType.value === 'all') return slides.value\n if (rangeType.value === 'current') return [currentSlide.value]\n return slides.value.filter((item, index) => {\n const [min, max] = range.value\n return index >= min - 1 && index <= max - 1\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createVNode(RadioGroup, {\n class: \"config-item\",\n value: rangeType.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((rangeType).value = $event))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"all\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"全部\")\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"current\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"当前页\")\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"custom\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"自定义\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"])\n ]),\n (rangeType.value === 'custom')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", {\n class: \"title\",\n \"data-range\": `(${range.value[0]} ~ ${range.value[1]})`\n }, \"自定义范围:\", 8, _hoisted_6),\n _createVNode(Slider, {\n class: \"config-item\",\n range: \"\",\n min: 1,\n max: _unref(slides).length,\n step: 1,\n value: range.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((range).value = $event))\n }, null, 8, [\"max\", \"value\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_7, [\n _hoisted_8,\n _createElementVNode(\"div\", _hoisted_9, [\n _withDirectives(_createVNode(Switch, {\n value: ignoreMedia.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((ignoreMedia).value = $event))\n }, null, 8, [\"value\"]), [\n [_directive_tooltip, '导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。']\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _hoisted_11,\n _createElementVNode(\"div\", _hoisted_12, [\n _createVNode(Switch, {\n value: masterOverwrite.value,\n \"onUpdate:value\": _cache[3] || (_cache[3] = ($event: any) => ((masterOverwrite).value = $event))\n }, null, 8, [\"value\"])\n ])\n ]),\n (!ignoreMedia.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, \" 提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。 \"))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_14, [\n _createVNode(Button, {\n class: \"btn export\",\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (_unref(exportPPTX)(selectedSlides.value, masterOverwrite.value, ignoreMedia.value)))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"导出 PPTX\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn close\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"关闭\")\n ]),\n _: 1\n })\n ]),\n _createVNode(FullscreenSpin, {\n loading: _unref(exporting),\n tip: \"正在导出...\"\n }, null, 8, [\"loading\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ExportPPTX.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ExportPPTX.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ExportPPTX.vue?vue&type=style&index=0&id=265d4b60&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-265d4b60\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-26422ed7\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"export-pptist-dialog\" }\nconst _hoisted_2 = { class: \"configs\" }\nconst _hoisted_3 = { class: \"row\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"title\" }, \"导出范围:\", -1))\nconst _hoisted_5 = {\n key: 0,\n class: \"row\"\n}\nconst _hoisted_6 = [\"data-range\"]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"tip\" }, \" 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 \", -1))\nconst _hoisted_8 = { class: \"btns\" }\n\nimport { computed, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useExport from '@/hooks/useExport'\n\nimport Slider from '@/components/Slider.vue'\nimport Button from '@/components/Button.vue'\nimport RadioButton from '@/components/RadioButton.vue'\nimport RadioGroup from '@/components/RadioGroup.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ExportSpecificFile',\n emits: [\"close\"],\n setup(__props, { emit }) {\n\n\n\nconst { slides, currentSlide } = storeToRefs(useSlidesStore())\n\nconst { exportSpecificFile } = useExport()\n\nconst rangeType = ref<'all' | 'current' | 'custom'>('all')\nconst range = ref<[number, number]>([1, slides.value.length])\n\nconst selectedSlides = computed(() => {\n if (rangeType.value === 'all') return slides.value\n if (rangeType.value === 'current') return [currentSlide.value]\n return slides.value.filter((item, index) => {\n const [min, max] = range.value\n return index >= min - 1 && index <= max - 1\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createVNode(RadioGroup, {\n class: \"config-item\",\n value: rangeType.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((rangeType).value = $event))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"all\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"全部\")\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"current\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"当前页\")\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n style: {\"width\":\"33.33%\"},\n value: \"custom\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"自定义\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"])\n ]),\n (rangeType.value === 'custom')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", {\n class: \"title\",\n \"data-range\": `(${range.value[0]} ~ ${range.value[1]})`\n }, \"自定义范围:\", 8, _hoisted_6),\n _createVNode(Slider, {\n class: \"config-item\",\n range: \"\",\n min: 1,\n max: _unref(slides).length,\n step: 1,\n value: range.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((range).value = $event))\n }, null, 8, [\"max\", \"value\"])\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_7\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(Button, {\n class: \"btn export\",\n type: \"primary\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_unref(exportSpecificFile)(selectedSlides.value)))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"导出 .pptist 文件\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn close\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"关闭\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ExportSpecificFile.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ExportSpecificFile.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ExportSpecificFile.vue?vue&type=style&index=0&id=26422ed7&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-26422ed7\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b20137f0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"export-dialog\" }\nconst _hoisted_2 = { class: \"content\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { DialogForExportTypes } from '@/types/export'\n\nimport ExportImage from './ExportImage.vue'\nimport ExportJSON from './ExportJSON.vue'\nimport ExportPDF from './ExportPDF.vue'\nimport ExportPPTX from './ExportPPTX.vue'\nimport ExportSpecificFile from './ExportSpecificFile.vue'\nimport Tabs from '@/components/Tabs.vue'\n\ninterface TabItem {\n key: DialogForExportTypes\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst { dialogForExport } = storeToRefs(mainStore)\n\nconst setDialogForExport = mainStore.setDialogForExport\n\nconst tabs: TabItem[] = [\n { key: 'pptist', label: '导出 pptist 文件' },\n { key: 'pptx', label: '导出 PPTX' },\n { key: 'image', label: '导出图片' },\n { key: 'json', label: '导出 JSON' },\n { key: 'pdf', label: '打印 / 导出 PDF' },\n]\n\nconst currentDialogComponent = computed(() => {\n const dialogMap = {\n 'image': ExportImage,\n 'json': ExportJSON,\n 'pdf': ExportPDF,\n 'pptx': ExportPPTX,\n 'pptist': ExportSpecificFile,\n }\n if (dialogForExport.value) return dialogMap[dialogForExport.value] || null\n return null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: _unref(dialogForExport),\n card: \"\",\n \"onUpdate:value\": _cache[0] || (_cache[0] = key => _unref(setDialogForExport)(key as DialogForExportTypes))\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentDialogComponent.value), {\n onClose: _cache[1] || (_cache[1] = ($event: any) => (_unref(setDialogForExport)('')))\n }, null, 32))\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=b20137f0&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b20137f0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, renderSlot as _renderSlot, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-fc791e00\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"title\" }\nconst _hoisted_2 = { class: \"content\" }\n\nimport { computed, onMounted, ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MoveablePanel',\n props: {\n width: {},\n height: {},\n left: { default: 10 },\n top: { default: 10 },\n title: { default: '' },\n moveable: { type: Boolean, default: true }\n },\n emits: [\"close\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst x = ref(0)\nconst y = ref(0)\nconst moveablePanelRef = ref()\nconst realHeight = computed(() => {\n if (!props.height) {\n return moveablePanelRef.value?.clientHeight || 0\n }\n return props.height\n})\n\nonMounted(() => {\n if (props.left >= 0) x.value = props.left\n else x.value = document.body.clientWidth + props.left - props.width\n\n if (props.top >= 0) y.value = props.top\n else y.value = document.body.clientHeight + props.top - realHeight.value\n})\n\nconst startMove = (e: MouseEvent) => {\n if (!props.moveable) return\n\n let isMouseDown = true\n\n const windowWidth = document.body.clientWidth\n const clientHeight = document.body.clientHeight\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originLeft = x.value\n const originTop = y.value\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const moveX = e.pageX - startPageX\n const moveY = e.pageY - startPageY\n\n let left = originLeft + moveX\n let top = originTop + moveY\n\n if (left < 0) left = 0\n if (top < 0) top = 0\n if (left + props.width > windowWidth) left = windowWidth - props.width\n if (top + realHeight.value > clientHeight) top = clientHeight - realHeight.value\n\n x.value = left\n y.value = top\n }\n document.onmouseup = () => {\n isMouseDown = false\n\n document.onmousemove = null\n document.onmouseup = null\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconClose = _resolveComponent(\"IconClose\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"moveable-panel\",\n ref_key: \"moveablePanelRef\",\n ref: moveablePanelRef,\n style: _normalizeStyle({\n width: _ctx.width + 'px',\n height: _ctx.height ? _ctx.height + 'px' : 'auto',\n left: x.value + 'px',\n top: y.value + 'px',\n })\n }, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createElementVNode(\"div\", {\n class: \"header\",\n onMousedown: _cache[1] || (_cache[1] = $event => startMove($event))\n }, [\n _createElementVNode(\"div\", _hoisted_1, _toDisplayString(_ctx.title), 1),\n _createElementVNode(\"div\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('close')))\n }, [\n _createVNode(_component_IconClose)\n ])\n ], 32),\n _createElementVNode(\"div\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"default\")\n ])\n ], 64))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"content\",\n onMousedown: _cache[2] || (_cache[2] = $event => startMove($event))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 32))\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MoveablePanel.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MoveablePanel.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MoveablePanel.vue?vue&type=style&index=0&id=fc791e00&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-fc791e00\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, withKeys as _withKeys, toDisplayString as _toDisplayString, withModifiers as _withModifiers, createBlock as _createBlock, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-15470598\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"handler\"\n}\nconst _hoisted_2 = { class: \"btns\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"icon-btns\"\n}\nconst _hoisted_4 = { class: \"element-list\" }\nconst _hoisted_5 = {\n key: 0,\n class: \"group-els\"\n}\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"group-title\" }, \"组合\", -1))\nconst _hoisted_7 = [\"onClick\", \"onDblclick\"]\nconst _hoisted_8 = [\"id\", \"value\", \"onBlur\", \"onKeydown\"]\nconst _hoisted_9 = {\n key: 1,\n class: \"name\"\n}\nconst _hoisted_10 = { class: \"icons\" }\nconst _hoisted_11 = [\"onClick\", \"onDblclick\"]\nconst _hoisted_12 = [\"id\", \"value\", \"onBlur\", \"onKeydown\"]\nconst _hoisted_13 = {\n key: 1,\n class: \"name\"\n}\nconst _hoisted_14 = { class: \"icons\" }\n\nimport { computed, nextTick, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore, useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ELEMENT_TYPE_ZH } from '@/configs/element'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport { ElementOrderCommands } from '@/types/edit'\n\nimport MoveablePanel from '@/components/MoveablePanel.vue'\nimport Button from '@/components/Button.vue'\n\ninterface GroupElements {\n type: 'group'\n id: string\n elements: PPTElement[]\n}\ntype ElementItem = PPTElement | GroupElements\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SelectPanel',\n setup(__props) {\n\nconst slidesStore = useSlidesStore()\nconst mainStore = useMainStore()\nconst { currentSlide } = storeToRefs(slidesStore)\nconst { handleElement, handleElementId, activeElementIdList, activeGroupElementId, hiddenElementIdList } = storeToRefs(mainStore)\n\nconst { orderElement } = useOrderElement()\n\nconst elements = computed(() => {\n const _elements: ElementItem[] = []\n\n for (const el of currentSlide.value.elements) {\n if (el.groupId) {\n const lastItem = _elements[_elements.length - 1]\n\n if (lastItem && lastItem.type === 'group' && lastItem.id && lastItem.id === el.groupId) {\n lastItem.elements.push(el)\n }\n else _elements.push({ type: 'group', id: el.groupId, elements: [el] })\n }\n else _elements.push(el)\n }\n\n return _elements\n})\n\nconst selectGroupEl = (item: GroupElements, id: string) => {\n if (handleElementId.value === id) return\n if (hiddenElementIdList.value.includes(id)) return\n\n const idList = item.elements.map(el => el.id)\n mainStore.setActiveElementIdList(idList)\n mainStore.setHandleElementId(id)\n nextTick(() => mainStore.setActiveGroupElementId(id))\n}\n\nconst selectEl = (id: string) => {\n if (handleElementId.value === id) return\n if (hiddenElementIdList.value.includes(id)) return\n\n mainStore.setActiveElementIdList([id])\n}\n\nconst hideElement = (id: string) => {\n if (hiddenElementIdList.value.includes(id)) {\n mainStore.setHiddenElementIdList(hiddenElementIdList.value.filter(item => item !== id))\n }\n else mainStore.setHiddenElementIdList([...hiddenElementIdList.value, id])\n\n if (activeElementIdList.value.includes(id)) mainStore.setActiveElementIdList([])\n}\n\nconst showAll = () => {\n const currentSlideElIdList = currentSlide.value.elements.map(item => item.id)\n const needHiddenElementIdList = hiddenElementIdList.value.filter(item => !currentSlideElIdList.includes(item))\n mainStore.setHiddenElementIdList(needHiddenElementIdList)\n}\nconst hideAll = () => {\n const currentSlideElIdList = currentSlide.value.elements.map(item => item.id)\n mainStore.setHiddenElementIdList([...hiddenElementIdList.value, ...currentSlideElIdList])\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n}\n\nconst editingElId = ref('')\n\nconst saveElementName = (e: FocusEvent | KeyboardEvent, id: string) => {\n const name = (e.target as HTMLInputElement).value\n slidesStore.updateElement({ id, props: { name } })\n editingElId.value = ''\n}\n\nconst enterEdit = (id: string) => {\n editingElId.value = id\n nextTick(() => {\n const inputRef = document.querySelector(`#input-${id}`) as HTMLInputElement\n inputRef.focus()\n })\n}\n\nconst close = () => {\n mainStore.setSelectPanelState(false)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n const _component_IconUp = _resolveComponent(\"IconUp\")!\n const _component_IconPreviewClose = _resolveComponent(\"IconPreviewClose\")!\n const _component_IconPreviewOpen = _resolveComponent(\"IconPreviewOpen\")!\n\n return (_openBlock(), _createBlock(MoveablePanel, {\n class: \"select-panel\",\n width: 200,\n height: 360,\n title: `选择(${_unref(activeElementIdList).length}/${_unref(currentSlide).elements.length})`,\n left: -270,\n top: 90,\n onClose: _cache[4] || (_cache[4] = ($event: any) => (close()))\n }, {\n default: _withCtx(() => [\n (elements.value.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Button, {\n size: \"small\",\n style: {\"margin-right\":\"5px\"},\n onClick: _cache[0] || (_cache[0] = ($event: any) => (showAll()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"全部显示\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n size: \"small\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (hideAll()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"全部隐藏\")\n ]),\n _: 1\n })\n ]),\n (_unref(handleElement))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n _createVNode(_component_IconDown, {\n class: \"icon-btn\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).UP)))\n }),\n _createVNode(_component_IconUp, {\n class: \"icon-btn\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).DOWN)))\n })\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_4, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elements.value, (item) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.id\n }, [\n (item.type === 'group')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _hoisted_6,\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.elements, (groupItem) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"item\", {\n 'active': _unref(activeElementIdList).includes(groupItem.id),\n 'group-active': _unref(activeGroupElementId).includes(groupItem.id),\n }]),\n key: groupItem.id,\n onClick: ($event: any) => (selectGroupEl(item, groupItem.id)),\n onDblclick: ($event: any) => (enterEdit(groupItem.id))\n }, [\n (editingElId.value === groupItem.id)\n ? (_openBlock(), _createElementBlock(\"input\", {\n key: 0,\n id: `input-${groupItem.id}`,\n value: groupItem.name || _unref(ELEMENT_TYPE_ZH)[groupItem.type],\n class: \"input\",\n type: \"text\",\n onBlur: $event => saveElementName($event, groupItem.id),\n onKeydown: _withKeys($event => saveElementName($event, groupItem.id), [\"enter\"])\n }, null, 40, _hoisted_8))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_9, _toDisplayString(groupItem.name || _unref(ELEMENT_TYPE_ZH)[groupItem.type]), 1)),\n _createElementVNode(\"div\", _hoisted_10, [\n (_unref(hiddenElementIdList).includes(groupItem.id))\n ? (_openBlock(), _createBlock(_component_IconPreviewClose, {\n key: 0,\n style: {\"font-size\":\"17px\"},\n onClick: _withModifiers(($event: any) => (hideElement(groupItem.id)), [\"stop\"])\n }, null, 8, [\"onClick\"]))\n : (_openBlock(), _createBlock(_component_IconPreviewOpen, {\n key: 1,\n style: {\"font-size\":\"17px\"},\n onClick: _withModifiers(($event: any) => (hideElement(groupItem.id)), [\"stop\"])\n }, null, 8, [\"onClick\"]))\n ])\n ], 42, _hoisted_7))\n }), 128))\n ]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: _normalizeClass([\"item\", { 'active': _unref(activeElementIdList).includes(item.id) }]),\n onClick: ($event: any) => (selectEl(item.id)),\n onDblclick: ($event: any) => (enterEdit(item.id))\n }, [\n (editingElId.value === item.id)\n ? (_openBlock(), _createElementBlock(\"input\", {\n key: 0,\n id: `input-${item.id}`,\n value: item.name || _unref(ELEMENT_TYPE_ZH)[item.type],\n class: \"input\",\n type: \"text\",\n onBlur: $event => saveElementName($event, item.id),\n onKeydown: _withKeys($event => saveElementName($event, item.id), [\"enter\"])\n }, null, 40, _hoisted_12))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_13, _toDisplayString(item.name || _unref(ELEMENT_TYPE_ZH)[item.type]), 1)),\n _createElementVNode(\"div\", _hoisted_14, [\n (_unref(hiddenElementIdList).includes(item.id))\n ? (_openBlock(), _createBlock(_component_IconPreviewClose, {\n key: 0,\n style: {\"font-size\":\"17px\"},\n onClick: _withModifiers(($event: any) => (hideElement(item.id)), [\"stop\"])\n }, null, 8, [\"onClick\"]))\n : (_openBlock(), _createBlock(_component_IconPreviewOpen, {\n key: 1,\n style: {\"font-size\":\"17px\"},\n onClick: _withModifiers(($event: any) => (hideElement(item.id)), [\"stop\"])\n }, null, 8, [\"onClick\"]))\n ])\n ], 42, _hoisted_11))\n ], 64))\n }), 128))\n ])\n ]),\n _: 1\n }, 8, [\"title\"]))\n}\n}\n\n})","\n\n\n\n","import script from \"./SelectPanel.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SelectPanel.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./SelectPanel.vue?vue&type=style&index=0&id=15470598&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-15470598\"]])\n\nexport default __exports__","import { nextTick, onBeforeUnmount, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTableElement } from '@/types/slides'\nimport message from '@/utils/message'\n\ninterface SearchTextResult {\n elType: 'text' | 'shape'\n slideId: string\n elId: string\n}\ninterface SearchTableResult {\n elType: 'table'\n slideId: string\n elId: string\n cellIndex: [number, number]\n}\n\ntype SearchResult = SearchTextResult | SearchTableResult\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { handleElement } = storeToRefs(mainStore)\n const { slides, slideIndex, currentSlide } = storeToRefs(slidesStore)\n\n const searchWord = ref('')\n const replaceWord = ref('')\n const searchResults = ref([])\n const searchIndex = ref(-1)\n \n const search = () => {\n const textList: SearchResult[] = []\n const matchRegex = new RegExp(searchWord.value, 'g')\n const textRegex = /(<([^>]+)>)/g\n \n for (const slide of slides.value) {\n for (const el of slide.elements) {\n if (el.type === 'text') {\n const text = el.content.replace(textRegex, '')\n const rets = text.match(matchRegex)\n rets && textList.push(...new Array(rets.length).fill({\n slideId: slide.id,\n elId: el.id,\n elType: el.type,\n }))\n }\n else if (el.type === 'shape' && el.text && el.text.content) {\n const text = el.text.content.replace(textRegex, '')\n const rets = text.match(matchRegex)\n rets && textList.push(...new Array(rets.length).fill({\n slideId: slide.id,\n elId: el.id,\n elType: el.type,\n }))\n }\n else if (el.type === 'table') {\n for (let i = 0; i < el.data.length; i++) {\n const row = el.data[i]\n for (let j = 0; j < row.length; j++) {\n const cell = row[j]\n if (!cell.text) continue\n const text = cell.text.replace(textRegex, '')\n const rets = text.match(matchRegex)\n rets && textList.push(...new Array(rets.length).fill({\n slideId: slide.id,\n elId: el.id,\n elType: el.type,\n cellIndex: [i, j],\n }))\n }\n }\n }\n }\n }\n if (textList.length) {\n searchResults.value = textList\n searchIndex.value = 0\n highlightCurrentSlide()\n }\n else {\n message.warning('未查找到匹配项')\n clearMarks()\n }\n }\n \n const getTextNodeList = (dom: Node): Text[] => {\n const nodeList = [...dom.childNodes]\n const textNodes = []\n while (nodeList.length) {\n const node = nodeList.shift()!\n if (node.nodeType === node.TEXT_NODE) {\n (node as Text).wholeText && textNodes.push(node as Text)\n } \n else {\n nodeList.unshift(...node.childNodes)\n }\n }\n return textNodes\n }\n \n const getTextInfoList = (textNodes: Text[]) => {\n let length = 0\n const textList = textNodes.map(node => {\n const startIdx = length, endIdx = length + node.wholeText.length\n length = endIdx\n return {\n text: node.wholeText,\n startIdx,\n endIdx\n }\n })\n return textList\n }\n \n type TextInfoList = ReturnType\n \n const getMatchList = (content: string, keyword: string) => {\n const reg = new RegExp(keyword, 'g')\n const matchList = []\n let match = reg.exec(content)\n while (match) {\n matchList.push(match)\n match = reg.exec(content)\n }\n return matchList\n }\n \n const highlight = (textNodes: Text[], textList: TextInfoList, matchList: RegExpExecArray[], index: number) => {\n for (let i = matchList.length - 1; i >= 0; i--) {\n const match = matchList[i]\n const matchStart = match.index\n const matchEnd = matchStart + match[0].length\n \n for (let textIdx = 0; textIdx < textList.length; textIdx++) {\n const { text, startIdx, endIdx } = textList[textIdx]\n if (endIdx < matchStart) continue\n if (startIdx >= matchEnd) break\n \n let textNode = textNodes[textIdx]\n const nodeMatchStartIdx = Math.max(0, matchStart - startIdx)\n const nodeMatchLength = Math.min(endIdx, matchEnd) - startIdx - nodeMatchStartIdx\n \n if (nodeMatchStartIdx > 0) textNode = textNode.splitText(nodeMatchStartIdx)\n if (nodeMatchLength < textNode.wholeText.length) textNode.splitText(nodeMatchLength)\n \n const mark = document.createElement('mark')\n mark.dataset.index = index + i + ''\n mark.innerText = text.substring(nodeMatchStartIdx, nodeMatchStartIdx + nodeMatchLength)\n textNode.parentNode!.replaceChild(mark, textNode)\n }\n }\n }\n \n const highlightTableText = (nodes: NodeListOf, index: number) => {\n for (const node of nodes) {\n node.innerHTML = node.innerHTML.replace(new RegExp(searchWord.value, 'g'), () => {\n return `${searchWord.value}`\n })\n }\n }\n \n const clearMarks = () => {\n const markNodes = document.querySelectorAll('.editable-element mark')\n for (const mark of markNodes) {\n setTimeout(() => {\n const parentNode = mark.parentNode!\n const text = mark.textContent!\n parentNode.replaceChild(document.createTextNode(text), mark)\n }, 0)\n }\n }\n \n const highlightCurrentSlide = () => {\n clearMarks()\n \n setTimeout(() => {\n for (let i = 0; i < searchResults.value.length; i++) {\n const lastTarget = searchResults.value[i - 1]\n const target = searchResults.value[i]\n if (target.slideId !== currentSlide.value.id) continue\n if (lastTarget && lastTarget.elId === target.elId) continue\n \n const node = document.querySelector(`#editable-element-${target.elId}`)\n if (node) {\n if (target.elType === 'table') {\n const cells = node.querySelectorAll('.cell-text')\n highlightTableText(cells, i)\n }\n else {\n const textNodes = getTextNodeList(node)\n const textList = getTextInfoList(textNodes)\n const content = textList.map(({ text }) => text).join('')\n const matchList = getMatchList(content, searchWord.value)\n highlight(textNodes, textList, matchList, i)\n }\n }\n }\n }, 0)\n }\n \n const setActiveMark = () => {\n const markNodes = document.querySelectorAll('mark[data-index]')\n for (const node of markNodes) {\n setTimeout(() => {\n const index = (node as HTMLElement).dataset.index\n if (index !== undefined && +index === searchIndex.value) {\n node.classList.add('active')\n }\n else node.classList.remove('active')\n }, 0)\n }\n }\n \n const turnTarget = () => {\n if (searchIndex.value === -1) return\n \n const target = searchResults.value[searchIndex.value]\n \n if (target.slideId === currentSlide.value.id) setTimeout(setActiveMark, 0)\n else {\n const index = slides.value.findIndex(slide => slide.id === target.slideId)\n if (index !== -1) slidesStore.updateSlideIndex(index)\n }\n }\n \n const searchNext = () => {\n if (!searchWord.value) return message.warning('请先输入查找内容')\n mainStore.setActiveElementIdList([])\n if (searchIndex.value === -1) search()\n else if (searchIndex.value < searchResults.value.length - 1) searchIndex.value += 1\n else searchIndex.value = 0\n turnTarget()\n }\n \n const searchPrev = () => {\n if (!searchWord.value) return message.warning('请先输入查找内容')\n mainStore.setActiveElementIdList([])\n if (searchIndex.value === -1) search()\n else if (searchIndex.value > 0) searchIndex.value -= 1\n else searchIndex.value = searchResults.value.length - 1\n turnTarget()\n }\n \n const replace = () => {\n if (!searchWord.value) return\n if (searchIndex.value === -1) {\n searchNext()\n return\n }\n \n const target = searchResults.value[searchIndex.value]\n let targetElement = null\n if (target.elType === 'table') {\n const [i, j] = target.cellIndex\n targetElement = document.querySelector(`#editable-element-${target.elId} .cell[data-cell-index=\"${i}_${j}\"] .cell-text`)\n }\n else targetElement = document.querySelector(`#editable-element-${target.elId} .ProseMirror`)\n if (!targetElement) return\n \n const fakeElement = document.createElement('div')\n fakeElement.innerHTML = targetElement.innerHTML\n \n let replaced = false\n const marks = fakeElement.querySelectorAll('mark[data-index]')\n for (const mark of marks) {\n const parentNode = mark.parentNode!\n if (mark.classList.contains('active')) {\n if (replaced) parentNode.removeChild(mark)\n else {\n parentNode.replaceChild(document.createTextNode(replaceWord.value), mark)\n replaced = true\n }\n }\n else {\n const text = mark.textContent!\n parentNode.replaceChild(document.createTextNode(text), mark)\n }\n }\n \n if (target.elType === 'text') {\n const props = { content: fakeElement.innerHTML }\n slidesStore.updateElement({ id: target.elId, props })\n }\n else if (target.elType === 'shape') {\n const el = currentSlide.value.elements.find(item => item.id === target.elId)\n if (el && el.type === 'shape' && el.text) {\n const props = { text: { ...el.text, content: fakeElement.innerHTML } }\n slidesStore.updateElement({ id: target.elId, props })\n }\n }\n else if (target.elType === 'table') {\n const el = currentSlide.value.elements.find(item => item.id === target.elId)\n if (el && el.type === 'table') {\n const data = el.data.map((row, i) => {\n if (i === target.cellIndex[0]) {\n return row.map((cell, j) => {\n if (j === target.cellIndex[1]) {\n return {\n ...cell,\n text: fakeElement.innerHTML,\n }\n }\n return cell\n })\n }\n return row\n })\n const props = { data }\n slidesStore.updateElement({ id: target.elId, props })\n }\n }\n \n searchResults.value.splice(searchIndex.value, 1)\n if (searchResults.value.length) {\n if (searchIndex.value > searchResults.value.length - 1) {\n searchIndex.value = 0\n }\n nextTick(() => {\n highlightCurrentSlide()\n turnTarget()\n })\n }\n else searchIndex.value = -1\n }\n \n const replaceAll = () => {\n if (!searchWord.value) return\n if (searchIndex.value === -1) {\n searchNext()\n return\n }\n \n for (let i = 0; i < searchResults.value.length; i++) {\n const lastTarget = searchResults.value[i - 1]\n const target = searchResults.value[i]\n if (lastTarget && lastTarget.elId === target.elId) continue\n \n const targetSlide = slides.value.find(item => item.id === target.slideId)\n if (!targetSlide) continue\n const targetElement = targetSlide.elements.find(item => item.id === target.elId)\n if (!targetElement) continue\n \n const fakeElement = document.createElement('div')\n if (targetElement.type === 'text') fakeElement.innerHTML = targetElement.content\n else if (targetElement.type === 'shape') fakeElement.innerHTML = targetElement.text?.content || ''\n \n if (target.elType === 'table') {\n const data = (targetElement as PPTTableElement).data.map(row => {\n return row.map(cell => {\n if (!cell.text) return cell\n return {\n ...cell,\n text: cell.text.replaceAll(searchWord.value, replaceWord.value),\n }\n })\n })\n const props = { data }\n slidesStore.updateElement({ id: target.elId, slideId: target.slideId, props })\n }\n else {\n const textNodes = getTextNodeList(fakeElement)\n const textList = getTextInfoList(textNodes)\n const content = textList.map(({ text }) => text).join('')\n const matchList = getMatchList(content, searchWord.value)\n highlight(textNodes, textList, matchList, i)\n \n const marks = fakeElement.querySelectorAll('mark[data-index]')\n let lastMarkIndex = -1\n for (const mark of marks) {\n const markIndex = +(mark as HTMLElement).dataset.index!\n const parentNode = mark.parentNode!\n if (markIndex === lastMarkIndex) parentNode.removeChild(mark)\n else {\n parentNode.replaceChild(document.createTextNode(replaceWord.value), mark)\n lastMarkIndex = markIndex\n }\n }\n \n if (target.elType === 'text') {\n const props = { content: fakeElement.innerHTML }\n slidesStore.updateElement({ id: target.elId, slideId: target.slideId, props })\n }\n else if (target.elType === 'shape') {\n const el = currentSlide.value.elements.find(item => item.id === target.elId)\n if (el && el.type === 'shape' && el.text) {\n const props = { text: { ...el.text, content: fakeElement.innerHTML } }\n slidesStore.updateElement({ id: target.elId, slideId: target.slideId, props })\n }\n }\n }\n }\n searchResults.value = []\n searchIndex.value = -1\n }\n \n watch(searchWord, () => {\n searchIndex.value = -1\n searchResults.value = []\n \n if (!searchWord.value) clearMarks()\n })\n \n watch(slideIndex, () => {\n nextTick(() => {\n highlightCurrentSlide()\n setTimeout(setActiveMark, 0)\n })\n })\n \n watch(handleElement, () => {\n if (handleElement.value) {\n searchIndex.value = -1\n searchResults.value = []\n clearMarks()\n }\n })\n \n onBeforeUnmount(clearMarks)\n\n return {\n searchWord,\n replaceWord,\n searchResults,\n searchIndex,\n searchNext,\n searchPrev,\n replace,\n replaceAll,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, withModifiers as _withModifiers, createElementVNode as _createElementVNode, unref as _unref, toDisplayString as _toDisplayString, isRef as _isRef, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43ff4a2e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"count\" }\nconst _hoisted_2 = {\n key: 1,\n class: \"footer\"\n}\n\nimport { nextTick, onMounted, ref, watch } from 'vue'\nimport { useMainStore } from '@/store'\nimport useSearch from '@/hooks/useSearch'\nimport MoveablePanel from '@/components/MoveablePanel.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Divider from '@/components/Divider.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\n\ntype TypeKey = 'search' | 'replace'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SearchPanel',\n setup(__props) {\n\nconst mainStore = useMainStore()\n\nconst {\n searchWord,\n replaceWord,\n searchResults,\n searchIndex,\n searchNext,\n searchPrev,\n replace,\n replaceAll,\n} = useSearch()\n\nconst type = ref('search')\nconst tabs: TabItem[] = [\n { key: 'search', label: '查找' },\n { key: 'replace', label: '替换' },\n]\n\nconst close = () => {\n mainStore.setSearchPanelState(false)\n}\n\nconst searchInpRef = ref()\nonMounted(() => {\n searchInpRef.value!.focus()\n})\n\nwatch(type, () => {\n nextTick(() => {\n searchInpRef.value!.focus()\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconClose = _resolveComponent(\"IconClose\")!\n const _component_IconLeft = _resolveComponent(\"IconLeft\")!\n const _component_IconRight = _resolveComponent(\"IconRight\")!\n\n return (_openBlock(), _createBlock(MoveablePanel, {\n class: \"search-panel\",\n width: 300,\n height: 0,\n left: -270,\n top: 90\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (close())),\n onMousedown: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\"]))\n }, [\n _createVNode(_component_IconClose)\n ], 32),\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((type).value = $event))\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"content\", type.value]),\n onMousedown: _cache[11] || (_cache[11] = _withModifiers(() => {}, [\"stop\"]))\n }, [\n _createVNode(Input, {\n class: \"input\",\n value: _unref(searchWord),\n \"onUpdate:value\": _cache[5] || (_cache[5] = ($event: any) => (_isRef(searchWord) ? (searchWord).value = $event : null)),\n placeholder: \"输入查找内容\",\n onEnter: _cache[6] || (_cache[6] = ($event: any) => (_unref(searchNext)())),\n ref_key: \"searchInpRef\",\n ref: searchInpRef\n }, {\n suffix: _withCtx(() => [\n _createElementVNode(\"span\", _hoisted_1, _toDisplayString(_unref(searchIndex) + 1) + \"/\" + _toDisplayString(_unref(searchResults).length), 1),\n _createVNode(Divider, { type: \"vertical\" }),\n _createVNode(_component_IconLeft, {\n class: \"next-btn left\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (_unref(searchPrev)()))\n }),\n _createVNode(_component_IconRight, {\n class: \"next-btn right\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (_unref(searchNext)()))\n })\n ]),\n _: 1\n }, 8, [\"value\"]),\n (type.value === 'replace')\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"input\",\n value: _unref(replaceWord),\n \"onUpdate:value\": _cache[7] || (_cache[7] = ($event: any) => (_isRef(replaceWord) ? (replaceWord).value = $event : null)),\n placeholder: \"输入替换内容\",\n onEnter: _cache[8] || (_cache[8] = ($event: any) => (_unref(replace)()))\n }, null, 8, [\"value\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'replace')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createVNode(Button, {\n disabled: !_unref(searchWord),\n style: {\"margin-left\":\"5px\"},\n onClick: _cache[9] || (_cache[9] = ($event: any) => (_unref(replace)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"替换\")\n ]),\n _: 1\n }, 8, [\"disabled\"]),\n _createVNode(Button, {\n disabled: !_unref(searchWord),\n type: \"primary\",\n style: {\"margin-left\":\"5px\"},\n onClick: _cache[10] || (_cache[10] = ($event: any) => (_unref(replaceAll)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"全部替换\")\n ]),\n _: 1\n }, 8, [\"disabled\"])\n ]))\n : _createCommentVNode(\"\", true)\n ], 34)\n ]),\n _: 1\n }))\n}\n}\n\n})","\n\n\n\n","import script from \"./SearchPanel.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SearchPanel.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./SearchPanel.vue?vue&type=style&index=0&id=43ff4a2e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43ff4a2e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, Fragment as _Fragment, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1e00f97b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"pptist-editor\" }\nconst _hoisted_2 = { class: \"layout-content\" }\nconst _hoisted_3 = { class: \"layout-content-center\" }\n\nimport { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport useGlobalHotkey from '@/hooks/useGlobalHotkey'\nimport usePasteEvent from '@/hooks/usePasteEvent'\n\nimport EditorHeader from './EditorHeader/index.vue'\nimport Canvas from './Canvas/index.vue'\nimport CanvasTool from './CanvasTool/index.vue'\nimport Thumbnails from './Thumbnails/index.vue'\nimport Toolbar from './Toolbar/index.vue'\nimport Remark from './Remark/index.vue'\nimport ExportDialog from './ExportDialog/index.vue'\nimport SelectPanel from './SelectPanel.vue'\nimport SearchPanel from './SearchPanel.vue'\nimport Modal from '@/components/Modal.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst { dialogForExport, showSelectPanel, showSearchPanel } = storeToRefs(mainStore)\nconst closeExportDialog = () => mainStore.setDialogForExport('')\n\nconst remarkHeight = ref(40)\n\nuseGlobalHotkey()\nusePasteEvent()\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(EditorHeader, { class: \"layout-header\" }),\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Thumbnails, { class: \"layout-content-left\" }),\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(CanvasTool, { class: \"center-top\" }),\n _createVNode(Canvas, {\n class: \"center-body\",\n style: _normalizeStyle({ height: `calc(100% - ${remarkHeight.value + 40}px)` })\n }, null, 8, [\"style\"]),\n _createVNode(Remark, {\n class: \"center-bottom\",\n height: remarkHeight.value,\n \"onUpdate:height\": _cache[0] || (_cache[0] = ($event: any) => ((remarkHeight).value = $event)),\n style: _normalizeStyle({ height: `${remarkHeight.value}px` })\n }, null, 8, [\"height\", \"style\"])\n ]),\n _createVNode(Toolbar, { class: \"layout-content-right\" })\n ])\n ]),\n (_unref(showSelectPanel))\n ? (_openBlock(), _createBlock(SelectPanel, { key: 0 }))\n : _createCommentVNode(\"\", true),\n (_unref(showSearchPanel))\n ? (_openBlock(), _createBlock(SearchPanel, { key: 1 }))\n : _createCommentVNode(\"\", true),\n _createVNode(Modal, {\n visible: !!_unref(dialogForExport),\n width: 680,\n onClosed: _cache[1] || (_cache[1] = ($event: any) => (closeExportDialog()))\n }, {\n default: _withCtx(() => [\n _createVNode(ExportDialog)\n ]),\n _: 1\n }, 8, [\"visible\"])\n ], 64))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1e00f97b&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1e00f97b\"]])\n\nexport default __exports__","import { onMounted, onUnmounted, ref } from 'vue'\nimport { throttle } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport { KEYS } from '@/configs/hotkey'\nimport { ANIMATION_CLASS_PREFIX } from '@/configs/animation'\nimport message from '@/utils/message'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { slides, slideIndex, formatedAnimations } = storeToRefs(slidesStore)\n\n // 当前页的元素动画执行到的位置\n const animationIndex = ref(0)\n\n // 动画执行状态\n const inAnimation = ref(false)\n\n // 最小已播放页面索引\n const playedSlidesMinIndex = ref(slideIndex.value)\n\n // 执行元素动画\n const runAnimation = () => {\n // 正在执行动画时,禁止其他新的动画开始\n if (inAnimation.value) return\n\n const { animations, autoNext } = formatedAnimations.value[animationIndex.value]\n animationIndex.value += 1\n\n // 标记开始执行动画\n inAnimation.value = true\n\n let endAnimationCount = 0\n\n // 依次执行该位置中的全部动画\n for (const animation of animations) {\n const elRef: HTMLElement | null = document.querySelector(`#screen-element-${animation.elId} [class^=base-element-]`)\n if (!elRef) {\n endAnimationCount += 1\n continue\n }\n\n const animationName = `${ANIMATION_CLASS_PREFIX}${animation.effect}`\n \n // 执行动画前先清除原有的动画状态(如果有)\n elRef.style.removeProperty('--animate-duration')\n for (const classname of elRef.classList) {\n if (classname.indexOf(ANIMATION_CLASS_PREFIX) !== -1) elRef.classList.remove(classname, `${ANIMATION_CLASS_PREFIX}animated`)\n }\n \n // 执行动画\n elRef.style.setProperty('--animate-duration', `${animation.duration}ms`)\n elRef.classList.add(animationName, `${ANIMATION_CLASS_PREFIX}animated`)\n\n // 执行动画结束,将“退场”以外的动画状态清除\n const handleAnimationEnd = () => {\n if (animation.type !== 'out') {\n elRef.style.removeProperty('--animate-duration')\n elRef.classList.remove(animationName, `${ANIMATION_CLASS_PREFIX}animated`)\n }\n\n // 判断该位置上的全部动画都已经结束后,标记动画执行完成,并尝试继续向下执行(如果有需要)\n endAnimationCount += 1\n if (endAnimationCount === animations.length) {\n inAnimation.value = false\n if (autoNext) runAnimation()\n }\n }\n elRef.addEventListener('animationend', handleAnimationEnd, { once: true })\n }\n }\n\n // 撤销元素动画,除了将索引前移外,还需要清除动画状态\n const revokeAnimation = () => {\n animationIndex.value -= 1\n const { animations } = formatedAnimations.value[animationIndex.value]\n\n for (const animation of animations) {\n const elRef: HTMLElement | null = document.querySelector(`#screen-element-${animation.elId} [class^=base-element-]`)\n if (!elRef) continue\n \n elRef.style.removeProperty('--animate-duration')\n for (const classname of elRef.classList) {\n if (classname.indexOf(ANIMATION_CLASS_PREFIX) !== -1) elRef.classList.remove(classname, `${ANIMATION_CLASS_PREFIX}animated`)\n }\n }\n\n // 如果撤销时该位置有且仅有强调动画,则继续执行一次撤销\n if (animations.every(item => item.type === 'attention')) execPrev()\n }\n\n // 关闭自动播放\n const autoPlayTimer = ref(0)\n const closeAutoPlay = () => {\n if (autoPlayTimer.value) {\n clearInterval(autoPlayTimer.value)\n autoPlayTimer.value = 0\n }\n }\n onUnmounted(closeAutoPlay)\n\n // 循环放映\n const loopPlay = ref(false)\n const setLoopPlay = (loop: boolean) => {\n loopPlay.value = loop\n }\n\n const throttleMassage = throttle(function(msg) {\n message.success(msg)\n }, 1000, { leading: true, trailing: false })\n\n // 向上/向下播放\n // 遇到元素动画时,优先执行动画播放,无动画则执行翻页\n // 向上播放遇到动画时,仅撤销到动画执行前的状态,不需要反向播放动画\n // 撤回到上一页时,若该页从未播放过(意味着不存在动画状态),需要将动画索引置为最小值(初始状态),否则置为最大值(最终状态)\n const execPrev = () => {\n if (formatedAnimations.value.length && animationIndex.value > 0) {\n revokeAnimation()\n }\n else if (slideIndex.value > 0) {\n slidesStore.updateSlideIndex(slideIndex.value - 1)\n if (slideIndex.value < playedSlidesMinIndex.value) {\n animationIndex.value = 0\n playedSlidesMinIndex.value = slideIndex.value\n }\n else animationIndex.value = formatedAnimations.value.length\n }\n else {\n if (loopPlay.value) turnSlideToIndex(slides.value.length - 1)\n else throttleMassage('已经是第一页了')\n }\n inAnimation.value = false\n }\n const execNext = () => {\n if (formatedAnimations.value.length && animationIndex.value < formatedAnimations.value.length) {\n runAnimation()\n }\n else if (slideIndex.value < slides.value.length - 1) {\n slidesStore.updateSlideIndex(slideIndex.value + 1)\n animationIndex.value = 0\n inAnimation.value = false\n }\n else {\n if (loopPlay.value) turnSlideToIndex(0)\n else {\n throttleMassage('已经是最后一页了')\n closeAutoPlay()\n }\n inAnimation.value = false\n }\n }\n\n // 自动播放\n const autoPlayInterval = ref(2500)\n const autoPlay = () => {\n closeAutoPlay()\n message.success('开始自动放映')\n autoPlayTimer.value = setInterval(execNext, autoPlayInterval.value)\n }\n\n const setAutoPlayInterval = (interval: number) => {\n closeAutoPlay()\n autoPlayInterval.value = interval\n autoPlay()\n }\n\n // 鼠标滚动翻页\n const mousewheelListener = throttle(function(e: WheelEvent) {\n if (e.deltaY < 0) execPrev()\n else if (e.deltaY > 0) execNext()\n }, 500, { leading: true, trailing: false })\n\n // 触摸屏上下滑动翻页\n const touchInfo = ref<{ x: number; y: number; } | null>(null)\n\n const touchStartListener = (e: TouchEvent) => {\n touchInfo.value = {\n x: e.changedTouches[0].pageX,\n y: e.changedTouches[0].pageY,\n }\n }\n const touchEndListener = (e: TouchEvent) => {\n if (!touchInfo.value) return\n\n const offsetX = Math.abs(touchInfo.value.x - e.changedTouches[0].pageX)\n const offsetY = e.changedTouches[0].pageY - touchInfo.value.y\n\n if ( Math.abs(offsetY) > offsetX && Math.abs(offsetY) > 50 ) {\n touchInfo.value = null\n\n if (offsetY > 0) execPrev()\n else execNext()\n }\n }\n\n // 快捷键翻页\n const keydownListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n\n if (key === KEYS.UP || key === KEYS.LEFT || key === KEYS.PAGEUP) execPrev()\n else if (\n key === KEYS.DOWN || \n key === KEYS.RIGHT ||\n key === KEYS.SPACE || \n key === KEYS.ENTER ||\n key === KEYS.PAGEDOWN\n ) execNext()\n }\n\n onMounted(() => document.addEventListener('keydown', keydownListener))\n onUnmounted(() => document.removeEventListener('keydown', keydownListener))\n\n // 切换到上一张/上一张幻灯片(无视元素的入场动画)\n const turnPrevSlide = () => {\n slidesStore.updateSlideIndex(slideIndex.value - 1)\n animationIndex.value = 0\n }\n const turnNextSlide = () => {\n slidesStore.updateSlideIndex(slideIndex.value + 1)\n animationIndex.value = 0\n }\n\n // 切换幻灯片到指定的页面\n const turnSlideToIndex = (index: number) => {\n slidesStore.updateSlideIndex(index)\n animationIndex.value = 0\n }\n const turnSlideToId = (id: string) => {\n const index = slides.value.findIndex(slide => slide.id === id)\n if (index !== -1) {\n slidesStore.updateSlideIndex(index)\n animationIndex.value = 0\n }\n }\n\n return {\n autoPlayTimer,\n autoPlayInterval,\n setAutoPlayInterval,\n autoPlay,\n closeAutoPlay,\n loopPlay,\n setLoopPlay,\n mousewheelListener,\n touchStartListener,\n touchEndListener,\n turnPrevSlide,\n turnNextSlide,\n turnSlideToIndex,\n turnSlideToId,\n execPrev,\n execNext,\n animationIndex,\n }\n}\n","import { onMounted, onUnmounted, ref, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\n\nexport default (wrapRef?: Ref) => {\n const slidesStore = useSlidesStore()\n const { viewportRatio } = storeToRefs(slidesStore)\n\n const slideWidth = ref(0)\n const slideHeight = ref(0)\n\n // 计算和更新幻灯片内容的尺寸(按比例自适应屏幕)\n const setSlideContentSize = () => {\n const slideWrapRef = wrapRef?.value || document.body\n const winWidth = slideWrapRef.clientWidth\n const winHeight = slideWrapRef.clientHeight\n let width, height\n\n if (winHeight / winWidth === viewportRatio.value) {\n width = winWidth\n height = winHeight\n }\n else if (winHeight / winWidth > viewportRatio.value) {\n width = winWidth\n height = winWidth * viewportRatio.value\n }\n else {\n width = winHeight / viewportRatio.value\n height = winHeight\n }\n slideWidth.value = width\n slideHeight.value = height\n }\n\n onMounted(() => {\n setSlideContentSize()\n window.addEventListener('resize', setSlideContentSize)\n })\n onUnmounted(() => {\n window.removeEventListener('resize', setSlideContentSize)\n })\n\n return {\n slideWidth,\n slideHeight,\n }\n}","import { onMounted, onUnmounted, ref } from 'vue'\nimport { isFullscreen, exitFullscreen } from '@/utils/fullscreen'\nimport useScreening from '@/hooks/useScreening'\n\nexport default () => {\n const fullscreenState = ref(true)\n const escExit = ref(true)\n\n const { exitScreening } = useScreening()\n\n const handleFullscreenChange = () => {\n fullscreenState.value = isFullscreen()\n if (!fullscreenState.value && escExit.value) exitScreening()\n\n escExit.value = true\n }\n\n onMounted(() => {\n fullscreenState.value = isFullscreen()\n document.addEventListener('fullscreenchange', handleFullscreenChange)\n document.addEventListener('webkitfullscreenchange', handleFullscreenChange) // Safari 兼容\n })\n onUnmounted(() => {\n document.removeEventListener('fullscreenchange', handleFullscreenChange)\n document.removeEventListener('webkitfullscreenchange', handleFullscreenChange)\n })\n\n const manualExitFullscreen = () => {\n if (!fullscreenState.value) return\n escExit.value = false\n exitFullscreen()\n }\n\n return {\n fullscreenState,\n manualExitFullscreen,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport type { PPTChartElement } from '@/types/slides'\n\nimport BaseChartElement from './BaseChartElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ScreenChartElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseChartElement, {\n class: \"screen-element-chart\",\n elementInfo: _ctx.elementInfo\n }, null, 8, [\"elementInfo\"]))\n}\n}\n\n})","import script from \"./ScreenChartElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ScreenChartElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a7e738aa\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { computed, inject, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { PPTVideoElement } from '@/types/slides'\nimport { injectKeySlideId, injectKeySlideScale } from '@/types/injectKey'\n\nimport VideoPlayer from './VideoPlayer/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ScreenVideoElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nconst { currentSlide } = storeToRefs(useSlidesStore())\n\nconst scale = inject(injectKeySlideScale) || ref(1)\nconst slideId = inject(injectKeySlideId) || ref('')\n\nconst inCurrentSlide = computed(() => currentSlide.value.id === slideId.value)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"screen-element-video\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (inCurrentSlide.value)\n ? (_openBlock(), _createBlock(VideoPlayer, {\n key: 0,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n src: _ctx.elementInfo.src,\n poster: _ctx.elementInfo.poster,\n autoplay: _ctx.elementInfo.autoplay,\n scale: _unref(scale)\n }, null, 8, [\"width\", \"height\", \"src\", \"poster\", \"autoplay\", \"scale\"]))\n : _createCommentVNode(\"\", true)\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ScreenVideoElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ScreenVideoElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ScreenVideoElement.vue?vue&type=style&index=0&id=a7e738aa&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a7e738aa\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7a9a13d6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { computed, inject, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { PPTAudioElement } from '@/types/slides'\nimport { injectKeySlideId, injectKeySlideScale } from '@/types/injectKey'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nimport AudioPlayer from './AudioPlayer.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ScreenAudioElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { viewportRatio, currentSlide } = storeToRefs(useSlidesStore())\n\nconst scale = inject(injectKeySlideScale) || ref(1)\nconst slideId = inject(injectKeySlideId) || ref('')\n\nconst inCurrentSlide = computed(() => currentSlide.value.id === slideId.value)\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\nconst audioPlayerPosition = computed(() => {\n const canvasWidth = VIEWPORT_SIZE\n const canvasHeight = VIEWPORT_SIZE * viewportRatio.value\n\n const audioWidth = 280 / scale.value\n const audioHeight = 50 / scale.value\n\n const elWidth = props.elementInfo.width\n const elHeight = props.elementInfo.height\n const elLeft = props.elementInfo.left\n const elTop = props.elementInfo.top\n\n let left = 0\n let top = elHeight\n \n if (elLeft + audioWidth >= canvasWidth) left = elWidth - audioWidth\n if (elTop + elHeight + audioHeight >= canvasHeight) top = -audioHeight\n\n return {\n left: left + 'px',\n top: top + 'px',\n }\n})\n\nconst audioPlayerRef = ref()\nconst toggle = () => {\n if (!audioPlayerRef.value) return\n audioPlayerRef.value.toggle()\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"screen-element-audio\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n }),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (toggle()))\n }, null, 8, [\"style\"]),\n (inCurrentSlide.value)\n ? (_openBlock(), _createBlock(AudioPlayer, {\n key: 0,\n class: \"audio-player\",\n ref_key: \"audioPlayerRef\",\n ref: audioPlayerRef,\n style: _normalizeStyle({ ...audioPlayerPosition.value }),\n src: _ctx.elementInfo.src,\n loop: _ctx.elementInfo.loop,\n autoplay: _ctx.elementInfo.autoplay,\n scale: _unref(scale)\n }, null, 8, [\"style\", \"src\", \"loop\", \"autoplay\", \"scale\"]))\n : _createCommentVNode(\"\", true)\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ScreenAudioElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ScreenAudioElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ScreenAudioElement.vue?vue&type=style&index=0&id=7a9a13d6&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7a9a13d6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-69b7fb9e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"id\", \"title\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\n\nimport BaseImageElement from '@/views/components/element/ImageElement/BaseImageElement.vue'\nimport BaseTextElement from '@/views/components/element/TextElement/BaseTextElement.vue'\nimport BaseShapeElement from '@/views/components/element/ShapeElement/BaseShapeElement.vue'\nimport BaseLineElement from '@/views/components/element/LineElement/BaseLineElement.vue'\nimport ScreenChartElement from '@/views/components/element/ChartElement/ScreenChartElement.vue'\nimport BaseTableElement from '@/views/components/element/TableElement/BaseTableElement.vue'\nimport BaseLatexElement from '@/views/components/element/LatexElement/BaseLatexElement.vue'\nimport ScreenVideoElement from '@/views/components/element/VideoElement/ScreenVideoElement.vue'\nimport ScreenAudioElement from '@/views/components/element/AudioElement/ScreenAudioElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ScreenElement',\n props: {\n elementInfo: {},\n elementIndex: {},\n animationIndex: {},\n turnSlideToId: { type: Function },\n manualExitFullscreen: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: BaseImageElement,\n [ElementTypes.TEXT]: BaseTextElement,\n [ElementTypes.SHAPE]: BaseShapeElement,\n [ElementTypes.LINE]: BaseLineElement,\n [ElementTypes.CHART]: ScreenChartElement,\n [ElementTypes.TABLE]: BaseTableElement,\n [ElementTypes.LATEX]: BaseLatexElement,\n [ElementTypes.VIDEO]: ScreenVideoElement,\n [ElementTypes.AUDIO]: ScreenAudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nconst { formatedAnimations, theme } = storeToRefs(useSlidesStore())\n\n// 判断元素是否需要等待执行入场动画:等待执行入场的元素需要先隐藏\nconst needWaitAnimation = computed(() => {\n // 该元素在本页动画序列中的位置\n const elementIndexInAnimation = formatedAnimations.value.findIndex(item => {\n const elIds = item.animations.map(item => item.elId)\n return elIds.includes(props.elementInfo.id)\n })\n\n // 该元素未设置过动画\n if (elementIndexInAnimation === -1) return false\n\n // 若该元素已执行过动画,都无须隐藏\n // 具体来说:若已执行的最后一个动画为入场,显然无须隐藏;若已执行的最后一个动画为退场,由于保留了退场动画结束状态,也无需额外隐藏\n if (elementIndexInAnimation < props.animationIndex) return false\n\n // 若该元素未执行过动画,获取其将要执行的第一个动画\n // 若将要执行的第一个动画为入场,则需要隐藏,否则无须隐藏\n const firstAnimation = formatedAnimations.value[elementIndexInAnimation].animations.find(item => item.elId === props.elementInfo.id)\n if (firstAnimation?.type === 'in') return true\n return false\n})\n\n// 打开元素绑定的超链接\nconst openLink = () => {\n const link = props.elementInfo.link\n if (!link) return\n\n if (link.type === 'web') {\n props.manualExitFullscreen()\n window.open(link.target)\n }\n else if (link.type === 'slide') {\n props.turnSlideToId(link.target)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"screen-element\", { 'link': _ctx.elementInfo.link }]),\n id: `screen-element-${_ctx.elementInfo.id}`,\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n color: _unref(theme).fontColor,\n fontFamily: _unref(theme).fontName,\n visibility: needWaitAnimation.value ? 'hidden' : 'visible',\n }),\n title: _ctx.elementInfo.link?.target || '',\n onClick: _cache[0] || (_cache[0] = ($event: any) => (openLink()))\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]))\n ], 14, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./ScreenElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ScreenElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ScreenElement.vue?vue&type=style&index=0&id=69b7fb9e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-69b7fb9e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock } from \"vue\"\n\nimport { computed, provide } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { injectKeySlideId } from '@/types/injectKey'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\nimport ScreenElement from './ScreenElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ScreenSlide',\n props: {\n slide: {},\n scale: {},\n animationIndex: {},\n turnSlideToId: { type: Function },\n manualExitFullscreen: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => props.slide.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst slideId = computed(() => props.slide.id)\nprovide(injectKeySlideId, slideId)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"screen-slide\",\n style: _normalizeStyle({\n width: _unref(VIEWPORT_SIZE) + 'px',\n height: _unref(VIEWPORT_SIZE) * _unref(viewportRatio) + 'px',\n transform: `scale(${_ctx.scale})`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle({ ..._unref(backgroundStyle) })\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.slide.elements, (element, index) => {\n return (_openBlock(), _createBlock(ScreenElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n animationIndex: _ctx.animationIndex,\n turnSlideToId: _ctx.turnSlideToId,\n manualExitFullscreen: _ctx.manualExitFullscreen\n }, null, 8, [\"elementInfo\", \"elementIndex\", \"animationIndex\", \"turnSlideToId\", \"manualExitFullscreen\"]))\n }), 128))\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./ScreenSlide.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ScreenSlide.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ScreenSlide.vue?vue&type=style&index=0&id=016af5da&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-016af5da\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-552b63d2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"screen-slide-list\" }\n\nimport { computed, provide } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { SLIDE_ANIMATIONS } from '@/configs/animation'\n\nimport ScreenSlide from './ScreenSlide.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ScreenSlideList',\n props: {\n slideWidth: {},\n slideHeight: {},\n animationIndex: {},\n turnSlideToId: { type: Function },\n manualExitFullscreen: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { slides, slideIndex } = storeToRefs(useSlidesStore())\n\nconst slidesWithTurningMode = computed(() => {\n return slides.value.map(slide => {\n let turningMode = slide.turningMode\n if (!turningMode) turningMode = 'slideY'\n if (turningMode === 'random') {\n const turningModeKeys = SLIDE_ANIMATIONS.filter(item => !['random', 'no'].includes(item.value)).map(item => item.value)\n turningMode = turningModeKeys[Math.floor(Math.random() * turningModeKeys.length)]\n }\n return {\n ...slide,\n turningMode,\n }\n })\n})\n\nconst scale = computed(() => props.slideWidth / VIEWPORT_SIZE)\nprovide(injectKeySlideScale, scale)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(slidesWithTurningMode.value, (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\n 'slide-item', \n `turning-mode-${slide.turningMode}`,\n {\n 'current': index === _unref(slideIndex),\n 'before': index < _unref(slideIndex),\n 'after': index > _unref(slideIndex),\n 'hide': (index === _unref(slideIndex) - 1 || index === _unref(slideIndex) + 1) && slide.turningMode !== slidesWithTurningMode.value[_unref(slideIndex)].turningMode,\n }\n ]),\n key: slide.id\n }, [\n (Math.abs(_unref(slideIndex) - index) < 2 || slide.animations?.length)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"slide-content\",\n style: _normalizeStyle({\n width: _ctx.slideWidth + 'px',\n height: _ctx.slideHeight + 'px',\n })\n }, [\n _createVNode(ScreenSlide, {\n slide: slide,\n scale: scale.value,\n animationIndex: _ctx.animationIndex,\n turnSlideToId: _ctx.turnSlideToId,\n manualExitFullscreen: _ctx.manualExitFullscreen\n }, null, 8, [\"slide\", \"scale\", \"animationIndex\", \"turnSlideToId\", \"manualExitFullscreen\"])\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 2))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ScreenSlideList.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ScreenSlideList.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ScreenSlideList.vue?vue&type=style&index=0&id=552b63d2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-552b63d2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-15912b32\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"slide-thumbnails\" }\nconst _hoisted_2 = { class: \"return-button\" }\nconst _hoisted_3 = { class: \"slide-thumbnails-content\" }\nconst _hoisted_4 = [\"onClick\"]\n\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useLoadSlides from '@/hooks/useLoadSlides'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SlideThumbnails',\n props: {\n turnSlideToIndex: { type: Function }\n },\n emits: [\"close\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst { slides, slideIndex } = storeToRefs(useSlidesStore())\n\nconst { slidesLoadLimit } = useLoadSlides()\n\nconst turnSlide = (index: number) => {\n props.turnSlideToIndex(index)\n emit('close')\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconArrowCircleLeft = _resolveComponent(\"IconArrowCircleLeft\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(_component_IconArrowCircleLeft, {\n class: \"icon\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('close')))\n })\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"thumbnail\", { 'active': index === _unref(slideIndex) }]),\n key: slide.id,\n onClick: ($event: any) => (turnSlide(index))\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: 150,\n visible: index < _unref(slidesLoadLimit)\n }, null, 8, [\"slide\", \"visible\"])\n ], 10, _hoisted_4))\n }), 128))\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./SlideThumbnails.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SlideThumbnails.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./SlideThumbnails.vue?vue&type=style&index=0&id=15912b32&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-15912b32\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-d8027742\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"blackboard\"\n}\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'WritingBoard',\n props: {\n color: { default: '#ffcc00' },\n model: { default: 'pen' },\n blackboard: { type: Boolean, default: false },\n penSize: { default: 6 },\n markSize: { default: 24 },\n rubberSize: { default: 80 }\n },\n emits: [\"end\"],\n setup(__props: any, { expose: __expose, emit }) {\n\nconst props = __props;\n\n\n\n\n\nlet ctx: CanvasRenderingContext2D | null = null\nconst writingBoardRef = ref()\nconst canvasRef = ref()\n\nlet lastPos = {\n x: 0,\n y: 0,\n}\nlet isMouseDown = false\nlet lastTime = 0\nlet lastLineWidth = -1\n\n// 鼠标位置坐标:用于画笔或橡皮位置跟随\nconst mouse = ref({\n x: 0,\n y: 0,\n})\n\n// 鼠标是否处在画布范围内:处在范围内才会显示画笔或橡皮\nconst mouseInCanvas = ref(false)\n\n// 监听更新canvas尺寸\nconst canvasWidth = ref(0)\nconst canvasHeight = ref(0)\n\nconst widthScale = computed(() => canvasRef.value ? canvasWidth.value / canvasRef.value.width : 1)\nconst heightScale = computed(() => canvasRef.value ? canvasHeight.value / canvasRef.value.height : 1)\n\nconst updateCanvasSize = () => {\n if (!writingBoardRef.value) return\n canvasWidth.value = writingBoardRef.value.clientWidth\n canvasHeight.value = writingBoardRef.value.clientHeight\n}\nconst resizeObserver = new ResizeObserver(updateCanvasSize)\nonMounted(() => {\n if (writingBoardRef.value) resizeObserver.observe(writingBoardRef.value)\n})\nonUnmounted(() => {\n if (writingBoardRef.value) resizeObserver.unobserve(writingBoardRef.value)\n})\n\n// 初始化画布\nconst initCanvas = () => {\n if (!canvasRef.value || !writingBoardRef.value) return\n\n ctx = canvasRef.value.getContext('2d')\n if (!ctx) return\n\n canvasRef.value.width = writingBoardRef.value.clientWidth\n canvasRef.value.height = writingBoardRef.value.clientHeight\n\n ctx.lineCap = 'round'\n ctx.lineJoin = 'round'\n}\nonMounted(initCanvas)\n\n// 切换画笔模式时,更新 canvas ctx 配置\nconst updateCtx = () => {\n if (!ctx) return\n if (props.model === 'mark') {\n ctx.globalCompositeOperation = 'xor'\n ctx.globalAlpha = 0.5\n }\n else if (props.model === 'pen') {\n ctx.globalCompositeOperation = 'source-over'\n ctx.globalAlpha = 1\n }\n}\nwatch(() => props.model, updateCtx)\n\n// 绘制画笔墨迹方法\nconst draw = (posX: number, posY: number, lineWidth: number) => {\n if (!ctx) return\n\n const lastPosX = lastPos.x\n const lastPosY = lastPos.y\n\n ctx.lineWidth = lineWidth\n ctx.strokeStyle = props.color\n ctx.beginPath()\n ctx.moveTo(lastPosX, lastPosY)\n ctx.lineTo(posX, posY)\n ctx.stroke()\n ctx.closePath()\n}\n\n// 擦除墨迹方法\nconst erase = (posX: number, posY: number) => {\n if (!ctx || !canvasRef.value) return\n const lastPosX = lastPos.x\n const lastPosY = lastPos.y\n\n const radius = props.rubberSize / 2\n\n const sinRadius = radius * Math.sin(Math.atan((posY - lastPosY) / (posX - lastPosX)))\n const cosRadius = radius * Math.cos(Math.atan((posY - lastPosY) / (posX - lastPosX)))\n const rectPoint1: [number, number] = [lastPosX + sinRadius, lastPosY - cosRadius]\n const rectPoint2: [number, number] = [lastPosX - sinRadius, lastPosY + cosRadius]\n const rectPoint3: [number, number] = [posX + sinRadius, posY - cosRadius]\n const rectPoint4: [number, number] = [posX - sinRadius, posY + cosRadius]\n\n ctx.save()\n ctx.beginPath()\n ctx.arc(posX, posY, radius, 0, Math.PI * 2)\n ctx.clip()\n ctx.clearRect(0, 0, canvasRef.value.width, canvasRef.value.height)\n ctx.restore()\n\n ctx.save()\n ctx.beginPath()\n ctx.moveTo(...rectPoint1)\n ctx.lineTo(...rectPoint3)\n ctx.lineTo(...rectPoint4)\n ctx.lineTo(...rectPoint2)\n ctx.closePath()\n ctx.clip()\n ctx.clearRect(0, 0, canvasRef.value.width, canvasRef.value.height)\n ctx.restore()\n}\n\n// 计算鼠标两次移动之间的距离\nconst getDistance = (posX: number, posY: number) => {\n const lastPosX = lastPos.x\n const lastPosY = lastPos.y\n return Math.sqrt((posX - lastPosX) * (posX - lastPosX) + (posY - lastPosY) * (posY - lastPosY))\n}\n\n// 根据鼠标两次移动之间的距离s和时间t计算绘制速度,速度越快,墨迹越细\nconst getLineWidth = (s: number, t: number) => {\n const maxV = 10\n const minV = 0.1\n const maxWidth = props.penSize\n const minWidth = 3\n const v = s / t\n let lineWidth\n\n if (v <= minV) lineWidth = maxWidth\n else if (v >= maxV) lineWidth = minWidth\n else lineWidth = maxWidth - v / maxV * maxWidth\n\n if (lastLineWidth === -1) return lineWidth\n return lineWidth * 1 / 3 + lastLineWidth * 2 / 3\n}\n\n// 路径操作\nconst handleMove = (x: number, y: number) => {\n const time = new Date().getTime()\n\n if (props.model === 'pen') {\n const s = getDistance(x, y)\n const t = time - lastTime\n const lineWidth = getLineWidth(s, t)\n\n draw(x, y, lineWidth)\n lastLineWidth = lineWidth\n }\n else if (props.model === 'mark') draw(x, y, props.markSize)\n else erase(x, y)\n\n lastPos = { x, y }\n lastTime = new Date().getTime()\n}\n\n// 获取鼠标在canvas中的相对位置\nconst getMouseOffsetPosition = (e: MouseEvent | TouchEvent) => {\n if (!canvasRef.value) return [0, 0]\n const event = e instanceof MouseEvent ? e : e.changedTouches[0]\n const canvasRect = canvasRef.value.getBoundingClientRect()\n const x = event.pageX - canvasRect.x\n const y = event.pageY - canvasRect.y\n return [x, y]\n}\n\n// 处理鼠标(触摸)事件\n// 准备开始绘制/擦除墨迹(落笔)\nconst handleMousedown = (e: MouseEvent | TouchEvent) => {\n const [mouseX, mouseY] = getMouseOffsetPosition(e)\n const x = mouseX / widthScale.value\n const y = mouseY / heightScale.value\n\n isMouseDown = true\n lastPos = { x, y }\n lastTime = new Date().getTime()\n\n if (!(e instanceof MouseEvent)) {\n mouse.value = { x: mouseX, y: mouseY }\n mouseInCanvas.value = true\n }\n}\n\n// 开始绘制/擦除墨迹(移动)\nconst handleMousemove = (e: MouseEvent | TouchEvent) => {\n const [mouseX, mouseY] = getMouseOffsetPosition(e)\n const x = mouseX / widthScale.value\n const y = mouseY / heightScale.value\n\n mouse.value = { x: mouseX, y: mouseY }\n\n if (isMouseDown) handleMove(x, y)\n}\n\n// 结束绘制/擦除墨迹(停笔)\nconst handleMouseup = () => {\n if (!isMouseDown) return\n isMouseDown = false\n emit('end')\n}\n\n// 清空画布\nconst clearCanvas = () => {\n if (!ctx || !canvasRef.value) return\n ctx.clearRect(0, 0, canvasRef.value.width, canvasRef.value.height)\n emit('end')\n}\n\n// 获取 DataURL\nconst getImageDataURL = () => {\n return canvasRef.value?.toDataURL()\n}\n\n// 设置 DataURL(绘制图片到 canvas)\nconst setImageDataURL = (imageDataURL: string) => {\n if (!ctx || !canvasRef.value) return\n \n ctx.clearRect(0, 0, canvasRef.value.width, canvasRef.value.height)\n\n if (imageDataURL) {\n ctx.globalCompositeOperation = 'source-over'\n ctx.globalAlpha = 1\n\n const img = new Image()\n img.src = imageDataURL\n img.onload = () => {\n ctx!.drawImage(img, 0, 0)\n updateCtx()\n }\n }\n}\n\n__expose({\n clearCanvas,\n getImageDataURL,\n setImageDataURL,\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconWrite = _resolveComponent(\"IconWrite\")!\n const _component_IconHighLight = _resolveComponent(\"IconHighLight\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"writing-board\",\n ref_key: \"writingBoardRef\",\n ref: writingBoardRef\n }, [\n (_ctx.blackboard)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"canvas\", {\n class: \"canvas\",\n ref_key: \"canvasRef\",\n ref: canvasRef,\n style: _normalizeStyle({\n width: canvasWidth.value + 'px',\n height: canvasHeight.value + 'px',\n }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleMousedown($event)),\n onMousemove: _cache[1] || (_cache[1] = $event => handleMousemove($event)),\n onMouseup: _cache[2] || (_cache[2] = ($event: any) => (handleMouseup())),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleMousedown($event)),\n onTouchmove: _cache[4] || (_cache[4] = $event => handleMousemove($event)),\n onTouchend: _cache[5] || (_cache[5] = ($event: any) => {handleMouseup(); mouseInCanvas.value = false}),\n onMouseleave: _cache[6] || (_cache[6] = ($event: any) => {handleMouseup(); mouseInCanvas.value = false}),\n onMouseenter: _cache[7] || (_cache[7] = ($event: any) => (mouseInCanvas.value = true))\n }, null, 36),\n (mouseInCanvas.value)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n (_ctx.model === 'eraser')\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"eraser\",\n style: _normalizeStyle({\n left: mouse.value.x - _ctx.rubberSize / 2 + 'px',\n top: mouse.value.y - _ctx.rubberSize / 2 + 'px',\n width: _ctx.rubberSize + 'px',\n height: _ctx.rubberSize + 'px',\n })\n }, null, 4))\n : _createCommentVNode(\"\", true),\n (_ctx.model === 'pen')\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"pen\",\n style: _normalizeStyle({\n left: mouse.value.x - _ctx.penSize / 2 + 'px',\n top: mouse.value.y - _ctx.penSize * 6 + _ctx.penSize / 2 + 'px',\n color: _ctx.color,\n })\n }, [\n (_ctx.model === 'pen')\n ? (_openBlock(), _createBlock(_component_IconWrite, {\n key: 0,\n class: \"icon\",\n size: _ctx.penSize * 6\n }, null, 8, [\"size\"]))\n : _createCommentVNode(\"\", true)\n ], 4))\n : _createCommentVNode(\"\", true),\n (_ctx.model === 'mark')\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 2,\n class: \"pen\",\n style: _normalizeStyle({\n left: mouse.value.x - _ctx.markSize / 2 + 'px',\n top: mouse.value.y + 'px',\n color: _ctx.color,\n })\n }, [\n (_ctx.model === 'mark')\n ? (_openBlock(), _createBlock(_component_IconHighLight, {\n key: 0,\n class: \"icon\",\n size: _ctx.markSize * 1.5\n }, null, 8, [\"size\"]))\n : _createCommentVNode(\"\", true)\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 512))\n}\n}\n\n})","\n\n\n\n","import script from \"./WritingBoard.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./WritingBoard.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./WritingBoard.vue?vue&type=style&index=0&id=d8027742&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-d8027742\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withCtx as _withCtx, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-fc2e4b2c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"writing-board-tool\" }\nconst _hoisted_2 = { class: \"tool-content\" }\nconst _hoisted_3 = { class: \"size\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"墨迹粗细:\", -1))\nconst _hoisted_5 = { class: \"size\" }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"墨迹粗细:\", -1))\nconst _hoisted_7 = { class: \"size\" }\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"橡皮大小:\", -1))\nconst _hoisted_9 = { class: \"colors\" }\nconst _hoisted_10 = [\"onClick\"]\n\nimport { ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport { db } from '@/utils/database'\n\nimport WritingBoard from '@/components/WritingBoard.vue'\nimport MoveablePanel from '@/components/MoveablePanel.vue'\nimport Slider from '@/components/Slider.vue'\nimport Popover from '@/components/Popover.vue'\n\ntype WritingBoardModel = 'pen' | 'mark' | 'eraser'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'WritingBoardTool',\n props: {\n slideWidth: {},\n slideHeight: {},\n left: { default: -5 },\n top: { default: -5 }\n },\n emits: [\"close\"],\n setup(__props: any, { emit }) {\n\nconst writingBoardColors = ['#000000', '#ffffff', '#1e497b', '#4e81bb', '#e2534d', '#9aba60', '#8165a0', '#47acc5', '#f9974c', '#ffff3a']\n\n\n\n\n\nconst { currentSlide } = storeToRefs(useSlidesStore())\n\nconst writingBoardRef = ref()\nconst writingBoardColor = ref('#e2534d')\nconst writingBoardModel = ref('pen')\nconst blackboard = ref(false)\nconst sizePopoverType = ref<'' | WritingBoardModel>('')\n\nconst penSize = ref(6)\nconst markSize = ref(24)\nconst rubberSize = ref(80)\n\nconst changeModel = (model: WritingBoardModel) => {\n if (writingBoardModel.value === model) {\n sizePopoverType.value = sizePopoverType.value === model ? '' : model\n }\n else {\n if (sizePopoverType.value) sizePopoverType.value = ''\n writingBoardModel.value = model\n }\n}\n\n// 清除画布上的墨迹\nconst clearCanvas = () => {\n writingBoardRef.value!.clearCanvas()\n}\n\n// 修改画笔颜色,如果当前处于橡皮状态则先切换到画笔状态\nconst changeColor = (color: string) => {\n if (writingBoardModel.value === 'eraser') writingBoardModel.value = 'pen'\n writingBoardColor.value = color\n}\n\n// 关闭写字板\nconst closeWritingBoard = () => {\n emit('close')\n}\n\n// 打开画笔工具或切换页面时,将数据库中存储的墨迹绘制到画布上\nwatch(currentSlide, () => {\n db.writingBoardImgs.where('id').equals(currentSlide.value.id).toArray().then(ret => {\n const currentImg = ret[0]\n writingBoardRef.value!.setImageDataURL(currentImg?.dataURL || '')\n })\n}, { immediate: true })\n\n// 每次绘制完成后将绘制完的图片更新到数据库\nconst hanldeWritingEnd = () => {\n const dataURL = writingBoardRef.value!.getImageDataURL()\n db.writingBoardImgs.where('id').equals(currentSlide.value.id).toArray().then(ret => {\n const currentImg = ret[0]\n if (currentImg) db.writingBoardImgs.update(currentImg, { dataURL })\n else db.writingBoardImgs.add({ id: currentSlide.value.id, dataURL })\n })\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconWrite = _resolveComponent(\"IconWrite\")!\n const _component_IconHighLight = _resolveComponent(\"IconHighLight\")!\n const _component_IconErase = _resolveComponent(\"IconErase\")!\n const _component_IconClear = _resolveComponent(\"IconClear\")!\n const _component_IconFill = _resolveComponent(\"IconFill\")!\n const _component_IconClose = _resolveComponent(\"IconClose\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"writing-board-wrap\",\n style: _normalizeStyle({\n width: _ctx.slideWidth + 'px',\n height: _ctx.slideHeight + 'px',\n })\n }, [\n _createVNode(WritingBoard, {\n ref_key: \"writingBoardRef\",\n ref: writingBoardRef,\n color: writingBoardColor.value,\n blackboard: blackboard.value,\n model: writingBoardModel.value,\n penSize: penSize.value,\n markSize: markSize.value,\n rubberSize: rubberSize.value,\n onEnd: _cache[0] || (_cache[0] = ($event: any) => (hanldeWritingEnd()))\n }, null, 8, [\"color\", \"blackboard\", \"model\", \"penSize\", \"markSize\", \"rubberSize\"])\n ], 4),\n _createVNode(MoveablePanel, {\n class: \"tools-panel\",\n width: 520,\n height: 50,\n left: _ctx.left,\n top: _ctx.top,\n moveable: sizePopoverType.value === ''\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"tools\",\n onMousedown: _cache[10] || (_cache[10] = _withModifiers(() => {}, [\"stop\"]))\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Popover, {\n trigger: \"manual\",\n value: sizePopoverType.value === 'pen'\n }, {\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createVNode(Slider, {\n class: \"size-slider\",\n min: 4,\n max: 10,\n step: 2,\n value: penSize.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((penSize).value = $event))\n }, null, 8, [\"value\"])\n ])\n ]),\n default: _withCtx(() => [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"btn\", { 'active': writingBoardModel.value === 'pen' }]),\n onClick: _cache[2] || (_cache[2] = ($event: any) => (changeModel('pen')))\n }, [\n _createVNode(_component_IconWrite, { class: \"icon\" })\n ], 2)), [\n [_directive_tooltip, '画笔']\n ])\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createVNode(Popover, {\n trigger: \"manual\",\n value: sizePopoverType.value === 'mark'\n }, {\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_5, [\n _hoisted_6,\n _createVNode(Slider, {\n class: \"size-slider\",\n min: 16,\n max: 40,\n step: 4,\n value: markSize.value,\n \"onUpdate:value\": _cache[3] || (_cache[3] = ($event: any) => ((markSize).value = $event))\n }, null, 8, [\"value\"])\n ])\n ]),\n default: _withCtx(() => [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"btn\", { 'active': writingBoardModel.value === 'mark' }]),\n onClick: _cache[4] || (_cache[4] = ($event: any) => (changeModel('mark')))\n }, [\n _createVNode(_component_IconHighLight, { class: \"icon\" })\n ], 2)), [\n [_directive_tooltip, '荧光笔']\n ])\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createVNode(Popover, {\n trigger: \"manual\",\n value: sizePopoverType.value === 'eraser'\n }, {\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_7, [\n _hoisted_8,\n _createVNode(Slider, {\n class: \"size-slider\",\n min: 20,\n max: 200,\n step: 20,\n value: rubberSize.value,\n \"onUpdate:value\": _cache[5] || (_cache[5] = ($event: any) => ((rubberSize).value = $event))\n }, null, 8, [\"value\"])\n ])\n ]),\n default: _withCtx(() => [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"btn\", { 'active': writingBoardModel.value === 'eraser' }]),\n onClick: _cache[6] || (_cache[6] = ($event: any) => (changeModel('eraser')))\n }, [\n _createVNode(_component_IconErase, { class: \"icon\" })\n ], 2)), [\n [_directive_tooltip, '橡皮擦']\n ])\n ]),\n _: 1\n }, 8, [\"value\"]),\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"btn\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (clearCanvas()))\n }, [\n _createVNode(_component_IconClear, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '清除墨迹']\n ]),\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"btn\", { 'active': blackboard.value }]),\n onClick: _cache[8] || (_cache[8] = ($event: any) => (blackboard.value = !blackboard.value))\n }, [\n _createVNode(_component_IconFill, { class: \"icon\" })\n ], 2)), [\n [_directive_tooltip, '黑板']\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(writingBoardColors, (color) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"color\", { 'active': color === writingBoardColor.value }]),\n key: color,\n style: _normalizeStyle({ backgroundColor: color }),\n onClick: ($event: any) => (changeColor(color))\n }, null, 14, _hoisted_10)\n }), 64))\n ])\n ]),\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"btn\",\n onClick: _cache[9] || (_cache[9] = ($event: any) => (closeWritingBoard()))\n }, [\n _createVNode(_component_IconClose, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '关闭画笔']\n ])\n ], 32)\n ]),\n _: 1\n }, 8, [\"left\", \"top\", \"moveable\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./WritingBoardTool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./WritingBoardTool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./WritingBoardTool.vue?vue&type=style&index=0&id=fc2e4b2c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-fc2e4b2c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, unref as _unref, withModifiers as _withModifiers, withKeys as _withKeys, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-83a589f0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\nconst _hoisted_2 = { class: \"content\" }\nconst _hoisted_3 = { class: \"timer\" }\nconst _hoisted_4 = [\"value\", \"disabled\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"colon\" }, \":\", -1))\nconst _hoisted_6 = { class: \"timer\" }\nconst _hoisted_7 = [\"value\", \"disabled\"]\n\nimport { computed, onUnmounted, ref } from 'vue'\nimport { fillDigit } from '@/utils/common'\n\nimport MoveablePanel from '@/components/MoveablePanel.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'CountdownTimer',\n props: {\n left: { default: 5 },\n top: { default: 5 }\n },\n emits: [\"close\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nconst timer = ref(null)\nconst inTiming = ref(false)\nconst isCountdown = ref(false)\nconst time = ref(0)\nconst minute = computed(() => Math.floor(time.value / 60))\nconst second = computed(() => time.value % 60)\n\nconst inputEditable = computed(() => {\n return !isCountdown.value || inTiming.value\n})\n\nconst clearTimer = () => {\n if (timer.value) clearInterval(timer.value)\n}\n\nonUnmounted(clearTimer)\n\nconst pause = () => {\n clearTimer()\n inTiming.value = false\n}\n\nconst reset = () => {\n clearTimer()\n inTiming.value = false\n \n if (isCountdown.value) time.value = 600\n else time.value = 0\n}\n\nconst start = () => {\n clearTimer()\n\n if (isCountdown.value) {\n timer.value = setInterval(() => {\n time.value = time.value - 1\n\n if (time.value <= 0) reset()\n }, 1000)\n }\n else {\n timer.value = setInterval(() => {\n time.value = time.value + 1\n\n if (time.value > 36000) pause()\n }, 1000)\n }\n\n inTiming.value = true\n}\n\nconst toggle = () => {\n if (inTiming.value) pause()\n else start()\n}\n\nconst toggleCountdown = () => {\n isCountdown.value = !isCountdown.value\n reset()\n}\n\nconst changeTime = (e: FocusEvent | KeyboardEvent, type: 'minute' | 'second') => {\n const inputRef = e.target as HTMLInputElement\n let value = inputRef.value\n const isNumber = /^(\\d)+$/.test(value)\n if (isNumber) {\n if (type === 'second' && +value >= 60) value = '59'\n time.value = type === 'minute' ? (+value * 60 + second.value) : (+value + minute.value * 60)\n }\n else inputRef.value = type === 'minute' ? fillDigit(minute.value, 2) : fillDigit(second.value, 2)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconClose = _resolveComponent(\"IconClose\")!\n\n return (_openBlock(), _createBlock(MoveablePanel, {\n class: \"countdown-timer\",\n width: 180,\n height: 110,\n left: _ctx.left,\n top: _ctx.top\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"span\", {\n class: \"text-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (toggle()))\n }, _toDisplayString(inTiming.value ? '暂停' : '开始'), 1),\n _createElementVNode(\"span\", {\n class: \"text-btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (reset()))\n }, \"重置\"),\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"text-btn\", { 'active': isCountdown.value }]),\n onClick: _cache[2] || (_cache[2] = ($event: any) => (toggleCountdown()))\n }, \"倒计时\", 2)\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"input\", {\n type: \"text\",\n value: _unref(fillDigit)(minute.value, 2),\n maxlength: 3,\n disabled: inputEditable.value,\n onMousedown: _cache[3] || (_cache[3] = _withModifiers(() => {}, [\"stop\"])),\n onBlur: _cache[4] || (_cache[4] = $event => changeTime($event, 'minute')),\n onKeydown: [\n _cache[5] || (_cache[5] = _withModifiers(() => {}, [\"stop\"])),\n _cache[6] || (_cache[6] = _withKeys(_withModifiers($event => changeTime($event, 'minute'), [\"stop\"]), [\"enter\"]))\n ]\n }, null, 40, _hoisted_4)\n ]),\n _hoisted_5,\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"input\", {\n type: \"text\",\n value: _unref(fillDigit)(second.value, 2),\n maxlength: 3,\n disabled: inputEditable.value,\n onMousedown: _cache[7] || (_cache[7] = _withModifiers(() => {}, [\"stop\"])),\n onBlur: _cache[8] || (_cache[8] = $event => changeTime($event, 'second')),\n onKeydown: [\n _cache[9] || (_cache[9] = _withModifiers(() => {}, [\"stop\"])),\n _cache[10] || (_cache[10] = _withKeys(_withModifiers($event => changeTime($event, 'second'), [\"stop\"]), [\"enter\"]))\n ]\n }, null, 40, _hoisted_7)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"close-btn\",\n onClick: _cache[11] || (_cache[11] = ($event: any) => (emit('close')))\n }, [\n _createVNode(_component_IconClose, { class: \"icon\" })\n ])\n ]),\n _: 1\n }, 8, [\"left\", \"top\"]))\n}\n}\n\n})","\n\n\n\n","import script from \"./CountdownTimer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CountdownTimer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./CountdownTimer.vue?vue&type=style&index=0&id=83a589f0&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-83a589f0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDirective as _resolveDirective, createVNode as _createVNode, withDirectives as _withDirectives, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-e9c1efea\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"tools-left\" }\nconst _hoisted_2 = { class: \"content\" }\n\nimport { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { enterFullscreen } from '@/utils/fullscreen'\nimport useScreening from '@/hooks/useScreening'\nimport useExecPlay from './hooks/useExecPlay'\nimport useSlideSize from './hooks/useSlideSize'\nimport useFullscreen from './hooks/useFullscreen'\n\nimport ScreenSlideList from './ScreenSlideList.vue'\nimport SlideThumbnails from './SlideThumbnails.vue'\nimport WritingBoardTool from './WritingBoardTool.vue'\nimport CountdownTimer from './CountdownTimer.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseView',\n props: {\n changeViewMode: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { slides, slideIndex } = storeToRefs(useSlidesStore())\n\nconst {\n autoPlayTimer,\n autoPlay,\n closeAutoPlay,\n autoPlayInterval,\n setAutoPlayInterval,\n loopPlay,\n setLoopPlay,\n mousewheelListener,\n touchStartListener,\n touchEndListener,\n turnPrevSlide,\n turnNextSlide,\n turnSlideToIndex,\n turnSlideToId,\n execPrev,\n execNext,\n animationIndex,\n} = useExecPlay()\n\nconst { slideWidth, slideHeight } = useSlideSize()\nconst { exitScreening } = useScreening()\nconst { fullscreenState, manualExitFullscreen } = useFullscreen()\n\nconst rightToolsVisible = ref(false)\nconst writingBoardToolVisible = ref(false)\nconst timerlVisible = ref(false)\nconst slideThumbnailModelVisible = ref(false)\nconst laserPen = ref(false)\n\nconst contextmenus = (): ContextmenuItem[] => {\n return [\n {\n text: '上一页',\n subText: '↑ ←',\n disable: slideIndex.value <= 0,\n handler: () => turnPrevSlide(),\n },\n {\n text: '下一页',\n subText: '↓ →',\n disable: slideIndex.value >= slides.value.length - 1,\n handler: () => turnNextSlide(),\n },\n {\n text: '第一页',\n disable: slideIndex.value === 0,\n handler: () => turnSlideToIndex(0),\n },\n {\n text: '最后一页',\n disable: slideIndex.value === slides.value.length - 1,\n handler: () => turnSlideToIndex(slides.value.length - 1),\n },\n { divider: true },\n {\n text: autoPlayTimer.value ? '取消自动放映' : '自动放映',\n handler: autoPlayTimer.value ? closeAutoPlay : autoPlay,\n children: [\n {\n text: '2.5秒',\n subText: autoPlayInterval.value === 2500 ? '√' : '',\n handler: () => setAutoPlayInterval(2500),\n },\n {\n text: '5秒',\n subText: autoPlayInterval.value === 5000 ? '√' : '',\n handler: () => setAutoPlayInterval(5000),\n },\n {\n text: '7.5秒',\n subText: autoPlayInterval.value === 7500 ? '√' : '',\n handler: () => setAutoPlayInterval(7500),\n },\n {\n text: '10秒',\n subText: autoPlayInterval.value === 10000 ? '√' : '',\n handler: () => setAutoPlayInterval(10000),\n },\n ],\n },\n {\n text: '循环放映',\n subText: loopPlay.value ? '√' : '',\n handler: () => setLoopPlay(!loopPlay.value),\n },\n { divider: true },\n {\n text: '显示工具栏',\n handler: () => rightToolsVisible.value = true,\n },\n {\n text: '查看所有幻灯片',\n handler: () => slideThumbnailModelVisible.value = true,\n },\n {\n text: '画笔工具',\n handler: () => writingBoardToolVisible.value = true,\n },\n {\n text: '演讲者视图',\n handler: () => props.changeViewMode('presenter'),\n },\n { divider: true },\n {\n text: '结束放映',\n subText: 'ESC',\n handler: exitScreening,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconLeftTwo = _resolveComponent(\"IconLeftTwo\")!\n const _component_IconRightTwo = _resolveComponent(\"IconRightTwo\")!\n const _component_IconWrite = _resolveComponent(\"IconWrite\")!\n const _component_IconMagic = _resolveComponent(\"IconMagic\")!\n const _component_IconStopwatchStart = _resolveComponent(\"IconStopwatchStart\")!\n const _component_IconListView = _resolveComponent(\"IconListView\")!\n const _component_IconOffScreenOne = _resolveComponent(\"IconOffScreenOne\")!\n const _component_IconFullScreenOne = _resolveComponent(\"IconFullScreenOne\")!\n const _component_IconPower = _resolveComponent(\"IconPower\")!\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"base-view\", { 'laser-pen': laserPen.value }])\n }, [\n _withDirectives(_createVNode(ScreenSlideList, {\n slideWidth: _unref(slideWidth),\n slideHeight: _unref(slideHeight),\n animationIndex: _unref(animationIndex),\n turnSlideToId: _unref(turnSlideToId),\n manualExitFullscreen: _unref(manualExitFullscreen),\n onWheel: _cache[0] || (_cache[0] = $event => _unref(mousewheelListener)($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => _unref(touchStartListener)($event)),\n onTouchend: _cache[2] || (_cache[2] = $event => _unref(touchEndListener)($event))\n }, null, 8, [\"slideWidth\", \"slideHeight\", \"animationIndex\", \"turnSlideToId\", \"manualExitFullscreen\"]), [\n [_directive_contextmenu, contextmenus]\n ]),\n (slideThumbnailModelVisible.value)\n ? (_openBlock(), _createBlock(SlideThumbnails, {\n key: 0,\n turnSlideToIndex: _unref(turnSlideToIndex),\n onClose: _cache[3] || (_cache[3] = ($event: any) => (slideThumbnailModelVisible.value = false))\n }, null, 8, [\"turnSlideToIndex\"]))\n : _createCommentVNode(\"\", true),\n (writingBoardToolVisible.value)\n ? (_openBlock(), _createBlock(WritingBoardTool, {\n key: 1,\n slideWidth: _unref(slideWidth),\n slideHeight: _unref(slideHeight),\n onClose: _cache[4] || (_cache[4] = ($event: any) => (writingBoardToolVisible.value = false))\n }, null, 8, [\"slideWidth\", \"slideHeight\"]))\n : _createCommentVNode(\"\", true),\n (timerlVisible.value)\n ? (_openBlock(), _createBlock(CountdownTimer, {\n key: 2,\n onClose: _cache[5] || (_cache[5] = ($event: any) => (timerlVisible.value = false))\n }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_IconLeftTwo, {\n class: \"tool-btn\",\n theme: \"two-tone\",\n fill: ['#111', '#fff'],\n onClick: _cache[6] || (_cache[6] = ($event: any) => (_unref(execPrev)()))\n }),\n _createVNode(_component_IconRightTwo, {\n class: \"tool-btn\",\n theme: \"two-tone\",\n fill: ['#111', '#fff'],\n onClick: _cache[7] || (_cache[7] = ($event: any) => (_unref(execNext)()))\n })\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tools-right\", { 'visible': rightToolsVisible.value }]),\n onMouseleave: _cache[16] || (_cache[16] = ($event: any) => (rightToolsVisible.value = false)),\n onMouseenter: _cache[17] || (_cache[17] = ($event: any) => (rightToolsVisible.value = true))\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"tool-btn page-number\",\n onClick: _cache[8] || (_cache[8] = ($event: any) => (slideThumbnailModelVisible.value = true))\n }, \"幻灯片 \" + _toDisplayString(_unref(slideIndex) + 1) + \" / \" + _toDisplayString(_unref(slides).length), 1),\n _withDirectives(_createVNode(_component_IconWrite, {\n class: \"tool-btn\",\n onClick: _cache[9] || (_cache[9] = ($event: any) => (writingBoardToolVisible.value = true))\n }, null, 512), [\n [_directive_tooltip, '画笔工具']\n ]),\n _withDirectives(_createVNode(_component_IconMagic, {\n class: _normalizeClass([\"tool-btn\", { 'active': laserPen.value }]),\n onClick: _cache[10] || (_cache[10] = ($event: any) => (laserPen.value = !laserPen.value))\n }, null, 8, [\"class\"]), [\n [_directive_tooltip, '激光笔']\n ]),\n _withDirectives(_createVNode(_component_IconStopwatchStart, {\n class: _normalizeClass([\"tool-btn\", { 'active': timerlVisible.value }]),\n onClick: _cache[11] || (_cache[11] = ($event: any) => (timerlVisible.value = !timerlVisible.value))\n }, null, 8, [\"class\"]), [\n [_directive_tooltip, '计时器']\n ]),\n _withDirectives(_createVNode(_component_IconListView, {\n class: \"tool-btn\",\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_ctx.changeViewMode('presenter')))\n }, null, 512), [\n [_directive_tooltip, '演讲者视图']\n ]),\n (_unref(fullscreenState))\n ? _withDirectives((_openBlock(), _createBlock(_component_IconOffScreenOne, {\n key: 0,\n class: \"tool-btn\",\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(manualExitFullscreen)()))\n }, null, 512)), [\n [_directive_tooltip, '退出全屏']\n ])\n : _withDirectives((_openBlock(), _createBlock(_component_IconFullScreenOne, {\n key: 1,\n class: \"tool-btn\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (_unref(enterFullscreen)()))\n }, null, 512)), [\n [_directive_tooltip, '进入全屏']\n ]),\n _withDirectives(_createVNode(_component_IconPower, {\n class: \"tool-btn\",\n onClick: _cache[15] || (_cache[15] = ($event: any) => (_unref(exitScreening)()))\n }, null, 512), [\n [_directive_tooltip, '结束放映']\n ])\n ])\n ], 34)\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./BaseView.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseView.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseView.vue?vue&type=style&index=0&id=e9c1efea&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e9c1efea\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, resolveDirective as _resolveDirective, withDirectives as _withDirectives, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0fc2d7b2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"presenter-view\" }\nconst _hoisted_2 = { class: \"toolbar\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"普通视图\", -1))\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"画笔\", -1))\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"激光笔\", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"计时器\", -1))\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"结束放映\", -1))\nconst _hoisted_8 = { class: \"content\" }\nconst _hoisted_9 = [\"onClick\"]\nconst _hoisted_10 = { class: \"remark\" }\nconst _hoisted_11 = { class: \"header\" }\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"演讲者备注\", -1))\nconst _hoisted_13 = [\"innerHTML\"]\nconst _hoisted_14 = { class: \"remark-scale\" }\n\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { enterFullscreen } from '@/utils/fullscreen'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useScreening from '@/hooks/useScreening'\nimport useLoadSlides from '@/hooks/useLoadSlides'\nimport useExecPlay from './hooks/useExecPlay'\nimport useSlideSize from './hooks/useSlideSize'\nimport useFullscreen from './hooks/useFullscreen'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport ScreenSlideList from './ScreenSlideList.vue'\nimport WritingBoardTool from './WritingBoardTool.vue'\nimport CountdownTimer from './CountdownTimer.vue'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'PresenterView',\n props: {\n changeViewMode: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst { slides, slideIndex, viewportRatio, currentSlide } = storeToRefs(useSlidesStore())\n\nconst slideListWrapRef = ref()\nconst thumbnailsRef = ref()\nconst writingBoardToolVisible = ref(false)\nconst timerlVisible = ref(false)\nconst laserPen = ref(false)\n\nconst {\n mousewheelListener,\n touchStartListener,\n touchEndListener,\n turnPrevSlide,\n turnNextSlide,\n turnSlideToIndex,\n turnSlideToId,\n animationIndex,\n} = useExecPlay()\n\nconst { slideWidth, slideHeight } = useSlideSize(slideListWrapRef)\nconst { exitScreening } = useScreening()\nconst { slidesLoadLimit } = useLoadSlides()\nconst { fullscreenState, manualExitFullscreen } = useFullscreen()\n\nconst remarkFontSize = ref(16)\nconst currentSlideRemark = computed(() => {\n return parseText2Paragraphs(currentSlide.value.remark || '无备注')\n})\n\nconst handleMousewheelThumbnails = (e: WheelEvent) => {\n if (!thumbnailsRef.value) return\n thumbnailsRef.value.scrollBy(e.deltaY, 0)\n}\n\nconst setRemarkFontSize = (fontSize: number) => {\n if (fontSize < 12 || fontSize > 40) return\n remarkFontSize.value = fontSize\n}\n\nwatch(slideIndex, () => {\n nextTick(() => {\n if (!thumbnailsRef.value) return\n\n const activeThumbnailRef: HTMLElement | null = thumbnailsRef.value.querySelector('.thumbnail.active')\n if (!activeThumbnailRef) return\n\n const width = thumbnailsRef.value.offsetWidth\n const offsetLeft = activeThumbnailRef.offsetLeft\n thumbnailsRef.value.scrollTo({ left: offsetLeft - width / 2, behavior: 'smooth' })\n })\n})\n\nconst contextmenus = (): ContextmenuItem[] => {\n return [\n {\n text: '上一页',\n subText: '↑ ←',\n disable: slideIndex.value <= 0,\n handler: () => turnPrevSlide(),\n },\n {\n text: '下一页',\n subText: '↓ →',\n disable: slideIndex.value >= slides.value.length - 1,\n handler: () => turnNextSlide(),\n },\n {\n text: '第一页',\n disable: slideIndex.value === 0,\n handler: () => turnSlideToIndex(0),\n },\n {\n text: '最后一页',\n disable: slideIndex.value === slides.value.length - 1,\n handler: () => turnSlideToIndex(slides.value.length - 1),\n },\n { divider: true },\n {\n text: '画笔工具',\n handler: () => writingBoardToolVisible.value = true,\n },\n {\n text: '普通视图',\n handler: () => props.changeViewMode('base'),\n },\n { divider: true },\n {\n text: '结束放映',\n subText: 'ESC',\n handler: exitScreening,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconListView = _resolveComponent(\"IconListView\")!\n const _component_IconWrite = _resolveComponent(\"IconWrite\")!\n const _component_IconMagic = _resolveComponent(\"IconMagic\")!\n const _component_IconStopwatchStart = _resolveComponent(\"IconStopwatchStart\")!\n const _component_IconOffScreenOne = _resolveComponent(\"IconOffScreenOne\")!\n const _component_IconPower = _resolveComponent(\"IconPower\")!\n const _component_IconMinus = _resolveComponent(\"IconMinus\")!\n const _component_IconPlus = _resolveComponent(\"IconPlus\")!\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"tool-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.changeViewMode('base')))\n }, [\n _createVNode(_component_IconListView, { class: \"tool-icon\" }),\n _hoisted_3\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tool-btn\", { 'active': writingBoardToolVisible.value }]),\n onClick: _cache[1] || (_cache[1] = ($event: any) => (writingBoardToolVisible.value = !writingBoardToolVisible.value))\n }, [\n _createVNode(_component_IconWrite, { class: \"tool-icon\" }),\n _hoisted_4\n ], 2),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tool-btn\", { 'active': laserPen.value }]),\n onClick: _cache[2] || (_cache[2] = ($event: any) => (laserPen.value = !laserPen.value))\n }, [\n _createVNode(_component_IconMagic, { class: \"tool-icon\" }),\n _hoisted_5\n ], 2),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tool-btn\", { 'active': timerlVisible.value }]),\n onClick: _cache[3] || (_cache[3] = ($event: any) => (timerlVisible.value = !timerlVisible.value))\n }, [\n _createVNode(_component_IconStopwatchStart, { class: \"tool-icon\" }),\n _hoisted_6\n ], 2),\n _createElementVNode(\"div\", {\n class: \"tool-btn\",\n onClick: _cache[4] || (_cache[4] = () => _unref(fullscreenState) ? _unref(manualExitFullscreen)() : _unref(enterFullscreen)())\n }, [\n (_unref(fullscreenState))\n ? (_openBlock(), _createBlock(_component_IconOffScreenOne, {\n key: 0,\n class: \"tool-icon\"\n }))\n : (_openBlock(), _createBlock(_component_IconOffScreenOne, {\n key: 1,\n class: \"tool-icon\"\n })),\n _createElementVNode(\"span\", null, _toDisplayString(_unref(fullscreenState) ? '退出全屏' : '全屏'), 1)\n ]),\n _createVNode(Divider, { class: \"divider\" }),\n _createElementVNode(\"div\", {\n class: \"tool-btn\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (_unref(exitScreening)()))\n }, [\n _createVNode(_component_IconPower, { class: \"tool-icon\" }),\n _hoisted_7\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"slide-list-wrap\", { 'laser-pen': laserPen.value }]),\n ref_key: \"slideListWrapRef\",\n ref: slideListWrapRef\n }, [\n _withDirectives(_createVNode(ScreenSlideList, {\n slideWidth: _unref(slideWidth),\n slideHeight: _unref(slideHeight),\n animationIndex: _unref(animationIndex),\n turnSlideToId: _unref(turnSlideToId),\n manualExitFullscreen: _unref(manualExitFullscreen),\n onWheel: _cache[6] || (_cache[6] = $event => _unref(mousewheelListener)($event)),\n onTouchstart: _cache[7] || (_cache[7] = $event => _unref(touchStartListener)($event)),\n onTouchend: _cache[8] || (_cache[8] = $event => _unref(touchEndListener)($event))\n }, null, 8, [\"slideWidth\", \"slideHeight\", \"animationIndex\", \"turnSlideToId\", \"manualExitFullscreen\"]), [\n [_directive_contextmenu, contextmenus]\n ]),\n (writingBoardToolVisible.value)\n ? (_openBlock(), _createBlock(WritingBoardTool, {\n key: 0,\n slideWidth: _unref(slideWidth),\n slideHeight: _unref(slideHeight),\n left: -365,\n top: -155,\n onClose: _cache[9] || (_cache[9] = ($event: any) => (writingBoardToolVisible.value = false))\n }, null, 8, [\"slideWidth\", \"slideHeight\"]))\n : _createCommentVNode(\"\", true),\n (timerlVisible.value)\n ? (_openBlock(), _createBlock(CountdownTimer, {\n key: 1,\n left: 75,\n onClose: _cache[10] || (_cache[10] = ($event: any) => (timerlVisible.value = false))\n }))\n : _createCommentVNode(\"\", true)\n ], 2),\n _createElementVNode(\"div\", {\n class: \"thumbnails\",\n ref_key: \"thumbnailsRef\",\n ref: thumbnailsRef,\n onWheel: _cache[11] || (_cache[11] = _withModifiers($event => handleMousewheelThumbnails($event), [\"prevent\"]))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"thumbnail\", { 'active': index === _unref(slideIndex) }]),\n key: slide.id,\n onClick: ($event: any) => (_unref(turnSlideToIndex)(index))\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: 120 / _unref(viewportRatio),\n visible: index < _unref(slidesLoadLimit)\n }, null, 8, [\"slide\", \"size\", \"visible\"])\n ], 10, _hoisted_9))\n }), 128))\n ], 544)\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"div\", _hoisted_11, [\n _hoisted_12,\n _createElementVNode(\"span\", null, \"P \" + _toDisplayString(_unref(slideIndex) + 1) + \" / \" + _toDisplayString(_unref(slides).length), 1)\n ]),\n _createElementVNode(\"div\", {\n class: \"remark-content\",\n style: _normalizeStyle({ fontSize: remarkFontSize.value + 'px' }),\n innerHTML: currentSlideRemark.value\n }, null, 12, _hoisted_13),\n _createElementVNode(\"div\", _hoisted_14, [\n _createElementVNode(\"div\", {\n class: _normalizeClass(['scale-btn', { 'disable': remarkFontSize.value === 12 }]),\n onClick: _cache[12] || (_cache[12] = ($event: any) => (setRemarkFontSize(remarkFontSize.value - 2)))\n }, [\n _createVNode(_component_IconMinus)\n ], 2),\n _createElementVNode(\"div\", {\n class: _normalizeClass(['scale-btn', { 'disable': remarkFontSize.value === 40 }]),\n onClick: _cache[13] || (_cache[13] = ($event: any) => (setRemarkFontSize(remarkFontSize.value + 2)))\n }, [\n _createVNode(_component_IconPlus)\n ], 2)\n ])\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./PresenterView.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./PresenterView.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./PresenterView.vue?vue&type=style&index=0&id=0fc2d7b2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0fc2d7b2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6bf3d190\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"pptist-screen\" }\n\nimport { onMounted, onUnmounted, ref } from 'vue'\nimport { KEYS } from '@/configs/hotkey'\nimport useScreening from '@/hooks/useScreening'\n\nimport BaseView from './BaseView.vue'\nimport PresenterView from './PresenterView.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst viewMode = ref<'base' | 'presenter'>('base')\n\nconst changeViewMode = (mode: 'base' | 'presenter') => {\n viewMode.value = mode\n}\n\nconst { exitScreening } = useScreening()\n\n// 快捷键退出放映\nconst keydownListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ESC) exitScreening()\n}\n\nonMounted(() => document.addEventListener('keydown', keydownListener))\nonUnmounted(() => document.removeEventListener('keydown', keydownListener))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (viewMode.value === 'base')\n ? (_openBlock(), _createBlock(BaseView, {\n key: 0,\n changeViewMode: changeViewMode\n }))\n : (viewMode.value === 'presenter')\n ? (_openBlock(), _createBlock(PresenterView, {\n key: 1,\n changeViewMode: changeViewMode\n }))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=6bf3d190&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6bf3d190\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\n\nimport ImageElement from '@/views/components/element/ImageElement/index.vue'\nimport TextElement from '@/views/components/element/TextElement/index.vue'\nimport ShapeElement from '@/views/components/element/ShapeElement/index.vue'\nimport LineElement from '@/views/components/element/LineElement/index.vue'\nimport ChartElement from '@/views/components/element/ChartElement/index.vue'\nimport TableElement from '@/views/components/element/TableElement/index.vue'\nimport LatexElement from '@/views/components/element/LatexElement/index.vue'\nimport VideoElement from '@/views/components/element/VideoElement/index.vue'\nimport AudioElement from '@/views/components/element/AudioElement/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobileEditableElement',\n props: {\n elementInfo: {},\n elementIndex: {},\n selectElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: ImageElement,\n [ElementTypes.TEXT]: TextElement,\n [ElementTypes.SHAPE]: ShapeElement,\n [ElementTypes.LINE]: LineElement,\n [ElementTypes.CHART]: ChartElement,\n [ElementTypes.TABLE]: TableElement,\n [ElementTypes.LATEX]: LatexElement,\n [ElementTypes.VIDEO]: VideoElement,\n [ElementTypes.AUDIO]: AudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-editable-element\",\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n selectElement: _ctx.selectElement,\n contextmenus: () => null\n }, null, 8, [\"elementInfo\", \"selectElement\"]))\n ], 4))\n}\n}\n\n})","\n\n","import script from \"./MobileEditableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobileEditableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { PPTElement, PPTLineElement, PPTChartElement, PPTVideoElement, PPTAudioElement } from '@/types/slides'\nimport useCommonOperate from '@/views/Editor/Canvas/hooks/useCommonOperate'\nimport type { OperateResizeHandlers } from '@/types/edit'\n\nimport BorderLine from '@/views/Editor/Canvas/Operate/BorderLine.vue'\nimport ResizeHandler from '@/views/Editor/Canvas/Operate/ResizeHandler.vue'\nimport RotateHandler from '@/views/Editor/Canvas/Operate/RotateHandler.vue'\n\ntype CanRotatePPTElement = Exclude\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobileOperate',\n props: {\n elementInfo: {},\n isSelected: { type: Boolean },\n canvasScale: {},\n scaleElement: { type: Function },\n rotateElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst rotate = computed(() => 'rotate' in props.elementInfo ? props.elementInfo.rotate : 0)\n\nconst scaleWidth = computed(() => props.elementInfo.width * props.canvasScale)\nconst scaleHeight = computed(() => props.elementInfo.height * props.canvasScale)\nconst {\n borderLines,\n resizeHandlers: _resizeHandlers,\n textElementResizeHandlers,\n} = useCommonOperate(scaleWidth, scaleHeight)\n\nconst resizeHandlers = props.elementInfo.type === 'text' || props.elementInfo.type === 'table' ? textElementResizeHandlers : _resizeHandlers\n\nconst cannotRotate = computed(() => ['chart', 'video', 'audio'].includes(props.elementInfo.type))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-operate\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top * _ctx.canvasScale + 'px',\n left: _ctx.elementInfo.left * _ctx.canvasScale + 'px',\n transform: `rotate(${rotate.value}deg)`,\n transformOrigin: `${_ctx.elementInfo.width * _ctx.canvasScale / 2}px ${_ctx.elementInfo.height * _ctx.canvasScale / 2}px`,\n })\n }, [\n (_ctx.isSelected)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onTouchstart: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onTouchstart\"]))\n }), 128)),\n (!cannotRotate.value)\n ? (_openBlock(), _createBlock(RotateHandler, {\n key: 0,\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onTouchstart: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo as CanRotatePPTElement), [\"stop\"]))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MobileOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobileOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobileOperate.vue?vue&type=style&index=0&id=fd451ff6&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-fd451ff6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeClass as _normalizeClass, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2c80920e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-thumbnails\" }\nconst _hoisted_2 = [\"onClick\"]\nconst _hoisted_3 = { class: \"label\" }\n\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useLoadSlides from '@/hooks/useLoadSlides'\nimport useSlideHandler from '@/hooks/useSlideHandler'\n\nimport Draggable from 'vuedraggable'\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobileThumbnails',\n setup(__props) {\n\nconst slidesStore = useSlidesStore()\nconst { slides, slideIndex } = storeToRefs(slidesStore)\n\nconst { sortSlides } = useSlideHandler()\n\nconst { slidesLoadLimit } = useLoadSlides()\nconst changeSlideIndex = (index: number) => {\n slidesStore.updateSlideIndex(index)\n}\n\n// 拖拽调整顺序后进行数据的同步\nconst handleDragEnd = (eventData: { newIndex: number; oldIndex: number }) => {\n const { newIndex, oldIndex } = eventData\n if (newIndex === undefined || oldIndex === undefined || newIndex === oldIndex) return\n sortSlides(newIndex, oldIndex)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_unref(Draggable), {\n class: \"thumbnail-list\",\n modelValue: _unref(slides),\n animation: 200,\n scroll: true,\n scrollSensitivity: 50,\n delayOnTouchOnly: true,\n delay: 800,\n itemKey: \"id\",\n onEnd: handleDragEnd\n }, {\n item: _withCtx(({ element, index }) => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"thumbnail-item\", { 'active': _unref(slideIndex) === index }]),\n onClick: ($event: any) => (changeSlideIndex(index))\n }, [\n _createElementVNode(\"div\", _hoisted_3, _toDisplayString(index + 1), 1),\n _createVNode(ThumbnailSlide, {\n class: \"thumbnail\",\n slide: element,\n size: 120,\n visible: index < _unref(slidesLoadLimit)\n }, null, 8, [\"slide\", \"visible\"])\n ], 10, _hoisted_2)\n ]),\n _: 1\n }, 8, [\"modelValue\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./MobileThumbnails.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobileThumbnails.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobileThumbnails.vue?vue&type=style&index=0&id=2c80920e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2c80920e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, unref as _unref, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-24150aba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"slide-toolbar\" }\nconst _hoisted_2 = { class: \"remark\" }\nconst _hoisted_3 = [\"value\"]\nconst _hoisted_4 = { class: \"toolbar\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport useCreateElement from '@/hooks/useCreateElement'\nimport { getImageDataURL } from '@/utils/image'\nimport type { ShapePoolItem } from '@/configs/shapes'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nimport MobileThumbnails from '../MobileThumbnails.vue'\nimport FileInput from '@/components/FileInput.vue'\nimport Button from '@/components/Button.vue'\nimport ButtonGroup from '@/components/ButtonGroup.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SlideToolbar',\n setup(__props) {\n\nconst slidesStore = useSlidesStore()\nconst { viewportRatio, currentSlide } = storeToRefs(slidesStore)\n\nconst { createSlide, copyAndPasteSlide, deleteSlide, } = useSlideHandler()\nconst { createTextElement, createImageElement, createShapeElement } = useCreateElement()\n\nconst insertTextElement = () => {\n const width = 400\n const height = 56\n\n createTextElement({\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n width,\n height,\n }, { content: '

新添加文本

' })\n}\n\nconst insertImageElement = (files: FileList) => {\n if (!files || !files[0]) return\n getImageDataURL(files[0]).then(dataURL => createImageElement(dataURL))\n}\n\nconst insertShapeElement = (type: 'square' | 'round') => {\n const square: ShapePoolItem = {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n }\n const round: ShapePoolItem = {\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n }\n const shape = { square, round }\n\n const size = 200\n\n createShapeElement({\n left: (VIEWPORT_SIZE - size) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - size) / 2,\n width: size,\n height: size,\n }, shape[type])\n}\n\nconst remark = computed(() => currentSlide.value?.remark || '')\n\nconst handleInputMark = (e: Event) => {\n const value = (e.target as HTMLTextAreaElement).value\n slidesStore.updateSlide({ remark: value })\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlus = _resolveComponent(\"IconPlus\")!\n const _component_IconCopy = _resolveComponent(\"IconCopy\")!\n const _component_IconDelete = _resolveComponent(\"IconDelete\")!\n const _component_IconFontSize = _resolveComponent(\"IconFontSize\")!\n const _component_IconPicture = _resolveComponent(\"IconPicture\")!\n const _component_IconSquare = _resolveComponent(\"IconSquare\")!\n const _component_IconRound = _resolveComponent(\"IconRound\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"textarea\", {\n value: remark.value,\n placeholder: \"点击输入演讲者备注\",\n onInput: _cache[0] || (_cache[0] = $event => handleInputMark($event))\n }, null, 40, _hoisted_3)\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_unref(createSlide)()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconPlus, { class: \"icon\" }),\n _createTextVNode(\" 新幻灯片\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_unref(copyAndPasteSlide)()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconCopy, { class: \"icon\" }),\n _createTextVNode(\" 复制\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[3] || (_cache[3] = ($event: any) => (_unref(deleteSlide)()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconDelete, { class: \"icon\" }),\n _createTextVNode(\" 删除\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[4] || (_cache[4] = ($event: any) => (insertTextElement()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize, { class: \"icon\" }),\n _createTextVNode(\" 文字\")\n ]),\n _: 1\n }),\n _createVNode(Button, { style: {\"flex\":\"1\"} }, {\n default: _withCtx(() => [\n _createVNode(FileInput, {\n onChange: _cache[5] || (_cache[5] = files => insertImageElement(files))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconPicture, { class: \"icon\" }),\n _createTextVNode(\"图片 \")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertShapeElement('square')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSquare, { class: \"icon\" }),\n _createTextVNode(\" 矩形\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[7] || (_cache[7] = ($event: any) => (insertShapeElement('round')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconRound, { class: \"icon\" }),\n _createTextVNode(\" 圆形\")\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]),\n _createVNode(MobileThumbnails)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./SlideToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SlideToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./SlideToolbar.vue?vue&type=style&index=0&id=24150aba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-24150aba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-f3d1ac70\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-toolbar\" }\nconst _hoisted_2 = { class: \"content\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"style\"\n}\nconst _hoisted_4 = { class: \"row-block\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"文字颜色:\", -1))\nconst _hoisted_6 = { class: \"colors\" }\nconst _hoisted_7 = [\"onClick\"]\nconst _hoisted_8 = { class: \"row-block\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"填充色:\", -1))\nconst _hoisted_10 = { class: \"colors\" }\nconst _hoisted_11 = [\"onClick\"]\nconst _hoisted_12 = {\n key: 1,\n class: \"common\"\n}\n\nimport { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, TableCell } from '@/types/slides'\nimport { ElementAlignCommands, ElementOrderCommands } from '@/types/edit'\nimport emitter, { EmitterEvents } from '@/utils/emitter'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport CheckboxButton from '@/components/CheckboxButton.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Divider from '@/components/Divider.vue'\nimport Button from '@/components/Button.vue'\nimport ButtonGroup from '@/components/ButtonGroup.vue'\nimport RadioButton from '@/components/RadioButton.vue'\nimport RadioGroup from '@/components/RadioGroup.vue'\n\ninterface TabItem {\n key: 'style' | 'common'\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementToolbar',\n setup(__props) {\n\nconst colors = ['#000000', '#ffffff', '#eeece1', '#1e497b', '#4e81bb', '#e2534d', '#9aba60', '#8165a0', '#47acc5', '#f9974c', '#c21401', '#ff1e02', '#ffc12a', '#ffff3a', '#90cf5b', '#00af57']\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElement, handleElementId, richTextAttrs } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst updateElement = (id: string, props: Partial) => {\n slidesStore.updateElement({ id, props })\n addHistorySnapshot()\n}\n\nconst tabs: TabItem[] = [\n { key: 'style', label: '样式' },\n { key: 'common', label: '布局' },\n]\nconst activeTab = ref('common')\n\nconst { orderElement } = useOrderElement()\nconst { alignElementToCanvas } = useAlignElementToCanvas()\nconst { addElementsFromData } = useAddSlidesOrElements()\nconst { deleteElement } = useDeleteElement()\n\nconst copyElement = () => {\n const element: PPTElement = JSON.parse(JSON.stringify(handleElement.value))\n addElementsFromData([element])\n}\n\nconst emitRichTextCommand = (command: string, value?: string) => {\n emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command, value } })\n}\n\nconst updateFontColor = (color: string) => {\n if (!handleElement.value) return\n if (handleElement.value.type === 'text' || (handleElement.value.type === 'shape' && handleElement.value.text?.content)) {\n emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command: 'color', value: color } })\n }\n if (handleElement.value.type === 'table') {\n const data: TableCell[][] = JSON.parse(JSON.stringify(handleElement.value.data))\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n const style = data[i][j].style || {}\n data[i][j].style = { ...style, color }\n }\n }\n updateElement(handleElementId.value, { data })\n }\n if (handleElement.value.type === 'latex') {\n updateElement(handleElementId.value, { color })\n }\n}\n\nconst updateFill = (color: string) => {\n if (!handleElement.value) return\n if (\n handleElement.value.type === 'text' ||\n handleElement.value.type === 'shape' ||\n handleElement.value.type === 'chart'\n ) updateElement(handleElementId.value, { fill: color })\n\n if (handleElement.value.type === 'table') {\n const data: TableCell[][] = JSON.parse(JSON.stringify(handleElement.value.data))\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n const style = data[i][j].style || {}\n data[i][j].style = { ...style, backcolor: color }\n }\n }\n updateElement(handleElementId.value, { data })\n }\n\n if (handleElement.value.type === 'audio') updateElement(handleElementId.value, { color })\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconTextBold = _resolveComponent(\"IconTextBold\")!\n const _component_IconTextItalic = _resolveComponent(\"IconTextItalic\")!\n const _component_IconTextUnderline = _resolveComponent(\"IconTextUnderline\")!\n const _component_IconStrikethrough = _resolveComponent(\"IconStrikethrough\")!\n const _component_IconFontSize = _resolveComponent(\"IconFontSize\")!\n const _component_IconAlignTextLeft = _resolveComponent(\"IconAlignTextLeft\")!\n const _component_IconAlignTextCenter = _resolveComponent(\"IconAlignTextCenter\")!\n const _component_IconAlignTextRight = _resolveComponent(\"IconAlignTextRight\")!\n const _component_IconCopy = _resolveComponent(\"IconCopy\")!\n const _component_IconDelete = _resolveComponent(\"IconDelete\")!\n const _component_IconSendToBack = _resolveComponent(\"IconSendToBack\")!\n const _component_IconBringToFrontOne = _resolveComponent(\"IconBringToFrontOne\")!\n const _component_IconBringToFront = _resolveComponent(\"IconBringToFront\")!\n const _component_IconSentToBack = _resolveComponent(\"IconSentToBack\")!\n const _component_IconAlignLeft = _resolveComponent(\"IconAlignLeft\")!\n const _component_IconAlignVertically = _resolveComponent(\"IconAlignVertically\")!\n const _component_IconAlignRight = _resolveComponent(\"IconAlignRight\")!\n const _component_IconAlignTop = _resolveComponent(\"IconAlignTop\")!\n const _component_IconAlignHorizontally = _resolveComponent(\"IconAlignHorizontally\")!\n const _component_IconAlignBottom = _resolveComponent(\"IconAlignBottom\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: activeTab.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((activeTab).value = $event)),\n tabsStyle: { marginBottom: '8px' },\n tabStyle: {\n width: '30%',\n margin: '0 10%',\n }\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n (activeTab.value === 'style')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).bold,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emitRichTextCommand('bold')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextBold)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).em,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emitRichTextCommand('em')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextItalic)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).underline,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emitRichTextCommand('underline')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextUnderline)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).strikethrough,\n onClick: _cache[4] || (_cache[4] = ($event: any) => (emitRichTextCommand('strikethrough')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconStrikethrough)\n ]),\n _: 1\n }, 8, [\"checked\"])\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emitRichTextCommand('fontsize-add')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize),\n _createTextVNode(\"+\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emitRichTextCommand('fontsize-reduce')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize),\n _createTextVNode(\"-\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(RadioGroup, {\n class: \"row\",\n \"button-style\": \"solid\",\n value: _unref(richTextAttrs).align,\n \"onUpdate:value\": _cache[7] || (_cache[7] = value => emitRichTextCommand('align', value))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n value: \"left\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextLeft)\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n value: \"center\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextCenter)\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n value: \"right\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextRight)\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createElementVNode(\"div\", _hoisted_6, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(colors, (color) => {\n return _createElementVNode(\"div\", {\n class: \"color\",\n key: color,\n onClick: ($event: any) => (updateFontColor(color))\n }, [\n _createElementVNode(\"div\", {\n class: \"color-block\",\n style: _normalizeStyle({ backgroundColor: color })\n }, null, 4)\n ], 8, _hoisted_7)\n }), 64))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createElementVNode(\"div\", _hoisted_10, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(colors, (color) => {\n return _createElementVNode(\"div\", {\n class: \"color\",\n key: color,\n onClick: ($event: any) => (updateFill(color))\n }, [\n _createElementVNode(\"div\", {\n class: \"color-block\",\n style: _normalizeStyle({ backgroundColor: color })\n }, null, 4)\n ], 8, _hoisted_11)\n }), 64))\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (activeTab.value === 'common')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[8] || (_cache[8] = ($event: any) => (copyElement()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconCopy, { class: \"icon\" }),\n _createTextVNode(\" 复制\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[9] || (_cache[9] = ($event: any) => (_unref(deleteElement)()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconDelete, { class: \"icon\" }),\n _createTextVNode(\" 删除\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[10] || (_cache[10] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).TOP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSendToBack, { class: \"icon\" }),\n _createTextVNode(\" 置顶\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[11] || (_cache[11] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).BOTTOM)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconBringToFrontOne, { class: \"icon\" }),\n _createTextVNode(\" 置底\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).UP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconBringToFront, { class: \"icon\" }),\n _createTextVNode(\" 上移\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).DOWN)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSentToBack, { class: \"icon\" }),\n _createTextVNode(\" 下移\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[14] || (_cache[14] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).LEFT)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignLeft, { class: \"icon\" }),\n _createTextVNode(\" 左对齐\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[15] || (_cache[15] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).HORIZONTAL)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignVertically, { class: \"icon\" }),\n _createTextVNode(\" 水平居中\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[16] || (_cache[16] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).RIGHT)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignRight, { class: \"icon\" }),\n _createTextVNode(\" 右对齐\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[17] || (_cache[17] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).TOP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTop, { class: \"icon\" }),\n _createTextVNode(\" 上对齐\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[18] || (_cache[18] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).VERTICAL)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignHorizontally, { class: \"icon\" }),\n _createTextVNode(\" 垂直居中\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[19] || (_cache[19] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).BOTTOM)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignBottom, { class: \"icon\" }),\n _createTextVNode(\" 下对齐\")\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementToolbar.vue?vue&type=style&index=0&id=f3d1ac70&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f3d1ac70\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5c34ab81\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-editor-header\" }\nconst _hoisted_2 = { class: \"history\" }\n\nimport { storeToRefs } from 'pinia'\nimport { useSnapshotStore } from '@/store'\nimport type { Mode } from '@/types/mobile'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Header',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst { canUndo, canRedo } = storeToRefs(useSnapshotStore())\nconst { redo, undo } = useHistorySnapshot()\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconBack = _resolveComponent(\"IconBack\")!\n const _component_IconNext = _resolveComponent(\"IconNext\")!\n const _component_IconLogout = _resolveComponent(\"IconLogout\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"history-item\", { 'disable': !_unref(canUndo) }]),\n onClick: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (_unref(undo)()), [\"stop\"]))\n }, [\n _createVNode(_component_IconBack),\n _createTextVNode(\" 撤销\")\n ], 2),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"history-item\", { 'disable': !_unref(canRedo) }]),\n onClick: _cache[1] || (_cache[1] = _withModifiers(($event: any) => (_unref(redo)()), [\"stop\"]))\n }, [\n _createVNode(_component_IconNext),\n _createTextVNode(\" 重做\")\n ], 2)\n ]),\n _createElementVNode(\"div\", {\n class: \"back\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.changeMode('preview')))\n }, [\n _createVNode(_component_IconLogout),\n _createTextVNode(\" 退出编辑\")\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Header.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Header.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Header.vue?vue&type=style&index=0&id=5c34ab81&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5c34ab81\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3756d058\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-editor\" }\n\nimport { computed, onMounted, ref, watchEffect } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps } from '@/types/edit'\nimport type { Mode } from '@/types/mobile'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\nimport useDragElement from '@/views/Editor/Canvas/hooks/useDragElement'\nimport useScaleElement from '@/views/Editor/Canvas/hooks/useScaleElement'\nimport useRotateElement from '@/views/Editor/Canvas/hooks/useRotateElement'\n\nimport AlignmentLine from '@/views/Editor/Canvas/AlignmentLine.vue'\nimport MobileEditableElement from './MobileEditableElement.vue'\nimport MobileOperate from './MobileOperate.vue'\nimport SlideToolbar from './SlideToolbar.vue'\nimport ElementToolbar from './ElementToolbar.vue'\nimport Header from './Header.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst slidesStore = useSlidesStore()\nconst mainStore = useMainStore()\nconst { slideIndex, currentSlide, viewportRatio } = storeToRefs(slidesStore)\nconst { activeElementIdList, handleElement } = storeToRefs(mainStore)\n\nconst contentRef = ref()\nconst viewportRef = ref()\n\nconst alignmentLines = ref([])\n\nconst background = computed(() => currentSlide.value.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst canvasScale = computed(() => {\n if (!contentRef.value) return 1\n const contentWidth = contentRef.value.clientWidth\n const contentheight = contentRef.value.clientHeight\n\n const contentRatio = contentheight / contentWidth\n if (contentRatio >= viewportRatio.value) return (contentWidth - 20) / VIEWPORT_SIZE\n return (contentheight - 20) / viewportRatio.value / VIEWPORT_SIZE\n})\n\nonMounted(() => {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n if (slideIndex.value !== 0) slidesStore.updateSlideIndex(0)\n})\n\nconst viewportStyles = computed(() => ({\n width: VIEWPORT_SIZE * canvasScale.value + 'px',\n height: VIEWPORT_SIZE * viewportRatio.value * canvasScale.value + 'px',\n}))\n\nconst elementList = ref([])\nconst setLocalElementList = () => {\n elementList.value = currentSlide.value ? JSON.parse(JSON.stringify(currentSlide.value.elements)) : []\n}\nwatchEffect(setLocalElementList)\n\nconst { dragElement } = useDragElement(elementList, alignmentLines, canvasScale)\nconst { scaleElement } = useScaleElement(elementList, alignmentLines, canvasScale)\nconst { rotateElement } = useRotateElement(elementList, viewportRef, canvasScale)\n\nconst selectElement = (e: TouchEvent, element: PPTElement, startMove = true) => {\n if (!activeElementIdList.value.includes(element.id)) {\n mainStore.setActiveElementIdList([element.id])\n mainStore.setHandleElementId(element.id)\n }\n if (startMove) dragElement(e, element)\n}\n\nconst handleClickBlankArea = () => {\n mainStore.setActiveElementIdList([])\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Header, { changeMode: _ctx.changeMode }, null, 8, [\"changeMode\"]),\n _createElementVNode(\"div\", {\n class: \"content\",\n ref_key: \"contentRef\",\n ref: contentRef,\n onTouchstart: _cache[0] || (_cache[0] = ($event: any) => (handleClickBlankArea()))\n }, [\n _createElementVNode(\"div\", {\n class: \"viewport-wrapper\",\n style: _normalizeStyle(viewportStyles.value)\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alignmentLines.value, (line, index) => {\n return (_openBlock(), _createBlock(AlignmentLine, {\n key: index,\n type: line.type,\n axis: line.axis,\n length: line.length,\n canvasScale: canvasScale.value\n }, null, 8, [\"type\", \"axis\", \"length\", \"canvasScale\"]))\n }), 128)),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: element.id\n }, [\n (element.type !== 'line')\n ? (_openBlock(), _createBlock(MobileOperate, {\n key: 0,\n elementInfo: element,\n isSelected: _unref(activeElementIdList).includes(element.id),\n canvasScale: canvasScale.value,\n scaleElement: _unref(scaleElement),\n rotateElement: _unref(rotateElement)\n }, null, 8, [\"elementInfo\", \"isSelected\", \"canvasScale\", \"scaleElement\", \"rotateElement\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n }), 128)),\n _createElementVNode(\"div\", {\n class: \"viewport\",\n ref_key: \"viewportRef\",\n ref: viewportRef,\n style: _normalizeStyle({ transform: `scale(${canvasScale.value})` })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element, index) => {\n return (_openBlock(), _createBlock(MobileEditableElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n selectElement: selectElement\n }, null, 8, [\"elementInfo\", \"elementIndex\"]))\n }), 128))\n ], 4)\n ], 4)\n ], 544),\n _createVNode(SlideToolbar),\n (_unref(handleElement))\n ? (_openBlock(), _createBlock(ElementToolbar, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=3756d058&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3756d058\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-62f26eba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Mode } from '@/types/mobile'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport MobileThumbnails from './MobileThumbnails.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobilePlayer',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst slidesStore = useSlidesStore()\nconst { slides, slideIndex, currentSlide, viewportRatio } = storeToRefs(slidesStore)\n\nconst toolVisible = ref(false)\n\nconst playerSize = ref({ width: 0, height: 0 })\n\nonMounted(() => {\n if (slideIndex.value !== 0) slidesStore.updateSlideIndex(0)\n\n playerSize.value = {\n width: document.body.clientHeight,\n height: document.body.clientWidth,\n }\n})\n\nconst slideSize = computed(() => {\n const playerRatio = playerSize.value.height / playerSize.value.width\n\n let slideWidth = 0\n let slideHeight = 0\n\n if (playerRatio >= viewportRatio.value) {\n slideWidth = playerSize.value.width\n slideHeight = slideWidth * viewportRatio.value\n }\n else {\n slideHeight = playerSize.value.height\n slideWidth = slideHeight / viewportRatio.value\n }\n\n return {\n width: slideWidth,\n height: slideHeight,\n }\n})\n\nconst touchInfo = ref<{ x: number; y: number; } | null>(null)\nconst touchStartListener = (e: TouchEvent) => {\n touchInfo.value = {\n x: e.changedTouches[0].pageX,\n y: e.changedTouches[0].pageY,\n }\n}\nconst touchEndListener = (e: TouchEvent) => {\n if (!touchInfo.value) return\n\n const offsetY = Math.abs(touchInfo.value.y - e.changedTouches[0].pageY)\n const offsetX = e.changedTouches[0].pageX - touchInfo.value.x\n\n if ( Math.abs(offsetX) > offsetY && Math.abs(offsetX) > 50 ) {\n touchInfo.value = null\n\n if (offsetX < 0 && slideIndex.value > 0) slidesStore.updateSlideIndex(slideIndex.value - 1)\n if (offsetX > 0 && slideIndex.value < slides.value.length - 1) slidesStore.updateSlideIndex(slideIndex.value + 1)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconLogout = _resolveComponent(\"IconLogout\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-player\",\n style: _normalizeStyle({\n width: playerSize.value.width + 'px',\n height: playerSize.value.height + 'px',\n transform: `rotate(90deg) translateY(-${playerSize.value.height}px)`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"screen-slide-list\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (toolVisible.value = !toolVisible.value)),\n onTouchstart: _cache[1] || (_cache[1] = $event => touchStartListener($event)),\n onTouchend: _cache[2] || (_cache[2] = $event => touchEndListener($event))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\n 'slide-item', \n `turning-mode-${slide.turningMode || 'slideY'}`,\n {\n 'current': index === _unref(slideIndex),\n 'before': index < _unref(slideIndex),\n 'after': index > _unref(slideIndex),\n 'hide': (index === _unref(slideIndex) - 1 || index === _unref(slideIndex) + 1) && slide.turningMode !== _unref(currentSlide).turningMode,\n }\n ]),\n key: slide.id\n }, [\n (Math.abs(_unref(slideIndex) - index) < 2)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"slide-content\",\n style: _normalizeStyle({\n width: slideSize.value.width + 'px',\n height: slideSize.value.height + 'px',\n })\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: slideSize.value.width\n }, null, 8, [\"slide\", \"size\"])\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 2))\n }), 128))\n ], 32),\n (toolVisible.value)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"back\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (_ctx.changeMode('preview')))\n }, [\n _createVNode(_component_IconLogout),\n _createTextVNode(\" 退出播放\")\n ])\n ]),\n _createVNode(MobileThumbnails, { class: \"thumbnails\" })\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MobilePlayer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobilePlayer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobilePlayer.vue?vue&type=style&index=0&id=62f26eba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-62f26eba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-53dd42dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"thumbnail-list\" }\nconst _hoisted_2 = { class: \"menu\" }\n\nimport { onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useLoadSlides from '@/hooks/useLoadSlides'\nimport type { Mode } from '@/types/mobile'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobilePreview',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst { slides } = storeToRefs(useSlidesStore())\nconst { slidesLoadLimit } = useLoadSlides()\n\nconst mobileRef = ref()\nconst screenWidth = ref(0)\n\nonMounted(() => {\n if (!mobileRef.value) return\n screenWidth.value = mobileRef.value.clientWidth\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconEdit = _resolveComponent(\"IconEdit\")!\n const _component_IconFullScreenPlay = _resolveComponent(\"IconFullScreenPlay\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-preview\",\n ref_key: \"mobileRef\",\n ref: mobileRef\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"thumbnail-item\",\n key: slide.id\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: screenWidth.value - 20,\n visible: index < _unref(slidesLoadLimit)\n }, null, 8, [\"slide\", \"size\", \"visible\"])\n ]))\n }), 128))\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"menu-item\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.changeMode('editor')))\n }, [\n _createVNode(_component_IconEdit, { class: \"icon\" }),\n _createTextVNode(\" 编辑\")\n ]),\n _createVNode(Divider, {\n type: \"vertical\",\n style: {\"height\":\"30px\"}\n }),\n _createElementVNode(\"div\", {\n class: \"menu-item\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.changeMode('player')))\n }, [\n _createVNode(_component_IconFullScreenPlay, { class: \"icon\" }),\n _createTextVNode(\" 播放\")\n ])\n ])\n ], 512))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./MobilePreview.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobilePreview.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobilePreview.vue?vue&type=style&index=0&id=53dd42dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53dd42dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-9826ff08\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile\" }\n\nimport { computed, ref } from 'vue'\nimport type { Mode } from '@/types/mobile'\n\nimport MobileEditor from './MobileEditor/index.vue'\nimport MobilePlayer from './MobilePlayer.vue'\nimport MobilePreview from './MobilePreview.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mode = ref('preview')\n \nconst changeMode = (_mode: Mode) => mode.value = _mode\n\nconst currentComponent = computed(() => {\n const componentMap = {\n 'editor': MobileEditor,\n 'player': MobilePlayer,\n 'preview': MobilePreview,\n }\n return componentMap[mode.value] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentComponent.value), { changeMode: changeMode }))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=9826ff08&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-9826ff08\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { onMounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useScreenStore, useMainStore, useSnapshotStore } from '@/store'\nimport { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'\nimport { deleteDiscardedDB } from '@/utils/database'\nimport { isPC } from './utils/common'\n\nimport Editor from './views/Editor/index.vue'\nimport Screen from './views/Screen/index.vue'\nimport Mobile from './views/Mobile/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'App',\n setup(__props) {\n\nconst _isPC = isPC()\n\nconst mainStore = useMainStore()\nconst snapshotStore = useSnapshotStore()\nconst { databaseId } = storeToRefs(mainStore)\nconst { screening } = storeToRefs(useScreenStore())\n\nif (process.env.NODE_ENV === 'production') {\n window.onbeforeunload = () => false\n}\n\nonMounted(async () => {\n await deleteDiscardedDB()\n snapshotStore.initSnapshotDatabase()\n mainStore.setAvailableFonts()\n})\n\n// 应用注销时向 localStorage 中记录下本次 indexedDB 的数据库ID,用于之后清除数据库\nwindow.addEventListener('unload', () => {\n const discardedDB = localStorage.getItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n const discardedDBList: string[] = discardedDB ? JSON.parse(discardedDB) : []\n\n discardedDBList.push(databaseId.value)\n\n const newDiscardedDB = JSON.stringify(discardedDBList)\n localStorage.setItem(LOCALSTORAGE_KEY_DISCARDED_DB, newDiscardedDB)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(screening))\n ? (_openBlock(), _createBlock(Screen, { key: 0 }))\n : (_unref(_isPC))\n ? (_openBlock(), _createBlock(Editor, { key: 1 }))\n : (_openBlock(), _createBlock(Mobile, { key: 2 }))\n}\n}\n\n})","\n\n\n\n","import script from \"./App.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./App.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./App.vue?vue&type=style&index=0&id=685e8c72&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","/* eslint-disable no-console */\n\nimport { register } from 'register-service-worker'\n\nif (process.env.NODE_ENV === 'production') {\n register(`${process.env.BASE_URL}service-worker.js`, {\n ready() {\n console.log(\n 'App is being served from cache by a service worker.\\n' +\n 'For more details, visit https://goo.gl/AFskqB'\n )\n },\n registered() {\n console.log('Service worker has been registered.')\n },\n cached() {\n console.log('Content has been cached for offline use.')\n },\n updatefound() {\n console.log('New content is downloading.')\n },\n updated() {\n console.log('New content is available; please refresh.')\n },\n offline() {\n console.log('No internet connection found. App is running in offline mode.')\n },\n error(error) {\n console.error('Error during service worker registration:', error)\n }\n })\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-77e74b43\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"menu-content\" }\nconst _hoisted_2 = [\"onClick\"]\nconst _hoisted_3 = { class: \"text\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"sub-text\"\n}\n\nimport type { ContextmenuItem } from './types'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MenuContent',\n props: {\n menus: {},\n handleClickMenuItem: { type: Function }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n const _component_menu_content = _resolveComponent(\"menu-content\", true)!\n\n return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.menus, (menu, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: menu.text || index\n }, [\n (!menu.hide)\n ? (_openBlock(), _createElementBlock(\"li\", {\n key: 0,\n class: _normalizeClass([\"menu-item\", {'divider': menu.divider, 'disable': menu.disable}]),\n onClick: _withModifiers(($event: any) => (_ctx.handleClickMenuItem(menu)), [\"stop\"])\n }, [\n (!menu.divider)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"menu-item-content\", {\n 'has-children': menu.children,\n 'has-handler': menu.handler,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(menu.text), 1),\n (menu.subText && !menu.children)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(menu.subText), 1))\n : _createCommentVNode(\"\", true),\n (menu.children && menu.children.length)\n ? (_openBlock(), _createBlock(_component_menu_content, {\n key: 1,\n class: \"sub-menu\",\n menus: menu.children,\n handleClickMenuItem: _ctx.handleClickMenuItem\n }, null, 8, [\"menus\", \"handleClickMenuItem\"]))\n : _createCommentVNode(\"\", true)\n ], 2))\n : _createCommentVNode(\"\", true)\n ], 10, _hoisted_2))\n : _createCommentVNode(\"\", true)\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./MenuContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MenuContent.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MenuContent.vue?vue&type=style&index=0&id=77e74b43&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-77e74b43\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { ContextmenuItem, Axis } from './types'\n\nimport MenuContent from './MenuContent.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n axis: {},\n el: {},\n menus: {},\n removeContextmenu: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst style = computed(() => {\n const MENU_WIDTH = 170\n const MENU_HEIGHT = 30\n const DIVIDER_HEIGHT = 11\n const PADDING = 5\n\n const { x, y } = props.axis\n const menuCount = props.menus.filter(menu => !(menu.divider || menu.hide)).length\n const dividerCount = props.menus.filter(menu => menu.divider).length\n\n const menuWidth = MENU_WIDTH\n const menuHeight = menuCount * MENU_HEIGHT + dividerCount * DIVIDER_HEIGHT + PADDING * 2\n\n const screenWidth = document.body.clientWidth\n const screenHeight = document.body.clientHeight\n\n return {\n left: screenWidth <= x + menuWidth ? x - menuWidth : x,\n top: screenHeight <= y + menuHeight ? y - menuHeight : y,\n }\n})\n\nconst handleClickMenuItem = (item: ContextmenuItem) => {\n if (item.disable) return\n if (item.children && !item.handler) return\n if (item.handler) item.handler(props.el)\n props.removeContextmenu()\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n class: \"mask\",\n onContextmenu: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (_ctx.removeContextmenu()), [\"prevent\"])),\n onMousedown: _cache[1] || (_cache[1] = ($event: any) => (_ctx.removeContextmenu()))\n }, null, 32),\n _createElementVNode(\"div\", {\n class: \"contextmenu\",\n style: _normalizeStyle({\n left: style.value.left + 'px',\n top: style.value.top + 'px',\n }),\n onContextmenu: _cache[2] || (_cache[2] = _withModifiers(() => {}, [\"prevent\"]))\n }, [\n _createVNode(MenuContent, {\n menus: _ctx.menus,\n handleClickMenuItem: handleClickMenuItem\n }, null, 8, [\"menus\"])\n ], 36)\n ], 64))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1abfab1d&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { type Directive, type DirectiveBinding, createVNode, render } from 'vue'\nimport ContextmenuComponent from '@/components/Contextmenu/index.vue'\n\nconst CTX_CONTEXTMENU_HANDLER = 'CTX_CONTEXTMENU_HANDLER'\n\ninterface CustomHTMLElement extends HTMLElement {\n [CTX_CONTEXTMENU_HANDLER]?: (event: MouseEvent) => void\n} \n\nconst contextmenuListener = (el: HTMLElement, event: MouseEvent, binding: DirectiveBinding) => {\n event.stopPropagation()\n event.preventDefault()\n\n const menus = binding.value(el)\n if (!menus) return\n\n let container: HTMLDivElement | null = null\n\n // 移除右键菜单并取消相关的事件监听\n const removeContextmenu = () => {\n if (container) {\n document.body.removeChild(container)\n container = null\n }\n el.classList.remove('contextmenu-active')\n document.body.removeEventListener('scroll', removeContextmenu) \n window.removeEventListener('resize', removeContextmenu)\n }\n\n // 创建自定义菜单\n const options = {\n axis: { x: event.x, y: event.y },\n el,\n menus,\n removeContextmenu,\n }\n container = document.createElement('div')\n const vm = createVNode(ContextmenuComponent, options, null)\n render(vm, container)\n document.body.appendChild(container)\n\n // 为目标节点添加菜单激活状态的className\n el.classList.add('contextmenu-active')\n\n // 页面变化时移除菜单\n document.body.addEventListener('scroll', removeContextmenu)\n window.addEventListener('resize', removeContextmenu)\n}\n\nconst ContextmenuDirective: Directive = {\n mounted(el: CustomHTMLElement, binding) {\n el[CTX_CONTEXTMENU_HANDLER] = (event: MouseEvent) => contextmenuListener(el, event, binding)\n el.addEventListener('contextmenu', el[CTX_CONTEXTMENU_HANDLER])\n },\n\n unmounted(el: CustomHTMLElement) {\n if (el && el[CTX_CONTEXTMENU_HANDLER]) {\n el.removeEventListener('contextmenu', el[CTX_CONTEXTMENU_HANDLER])\n delete el[CTX_CONTEXTMENU_HANDLER]\n }\n },\n}\n\nexport default ContextmenuDirective","import type { Directive, DirectiveBinding } from 'vue'\n\nconst CTX_CLICK_OUTSIDE_HANDLER = 'CTX_CLICK_OUTSIDE_HANDLER'\n\ninterface CustomHTMLElement extends HTMLElement {\n [CTX_CLICK_OUTSIDE_HANDLER]?: (event: MouseEvent) => void\n} \n\nconst clickListener = (el: HTMLElement, event: MouseEvent, binding: DirectiveBinding) => {\n const handler = binding.value\n\n const path = event.composedPath()\n const isClickOutside = path ? path.indexOf(el) < 0 : !el.contains(event.target as HTMLElement)\n\n if (!isClickOutside) return\n handler(event)\n}\n\nconst ClickOutsideDirective: Directive = {\n mounted(el: CustomHTMLElement, binding) {\n el[CTX_CLICK_OUTSIDE_HANDLER] = (event: MouseEvent) => clickListener(el, event, binding)\n setTimeout(() => {\n document.addEventListener('click', el[CTX_CLICK_OUTSIDE_HANDLER]!)\n }, 0)\n },\n \n unmounted(el: CustomHTMLElement) {\n if (el[CTX_CLICK_OUTSIDE_HANDLER]) {\n document.removeEventListener('click', el[CTX_CLICK_OUTSIDE_HANDLER])\n delete el[CTX_CLICK_OUTSIDE_HANDLER]\n }\n },\n}\n\nexport default ClickOutsideDirective","import type { Directive, DirectiveBinding } from 'vue'\nimport tippy, { type Instance, type Placement } from 'tippy.js'\n\nimport './tooltip.scss'\n\nconst TOOLTIP_INSTANCE = 'TOOLTIP_INSTANCE'\n\ninterface CustomHTMLElement extends HTMLElement {\n [TOOLTIP_INSTANCE]?: Instance\n}\n\ntype Delay = number | [number | null, number | null]\n\ninterface BindingValue {\n content: string\n placement?: Placement\n delay?: Delay\n}\n\nconst TooltipDirective: Directive = {\n mounted(el: CustomHTMLElement, binding: DirectiveBinding) {\n let content = ''\n let placement: Placement = 'top'\n let delay: Delay = [300, 0]\n\n if (typeof binding.value === 'string') {\n content = binding.value\n }\n else {\n content = binding.value.content\n if (binding.value.placement !== undefined) placement = binding.value.placement\n if (binding.value.delay !== undefined) delay = binding.value.delay\n }\n\n el[TOOLTIP_INSTANCE] = tippy(el, {\n content,\n theme: 'tooltip',\n duration: 100,\n animation: 'scale',\n allowHTML: true,\n placement,\n delay,\n })\n },\n\n updated(el: CustomHTMLElement, binding: DirectiveBinding) {\n let content = ''\n if (typeof binding.value === 'string') {\n content = binding.value\n }\n else {\n content = binding.value.content\n }\n if (el[TOOLTIP_INSTANCE]) el[TOOLTIP_INSTANCE].setContent(content)\n },\n \n unmounted(el: CustomHTMLElement) {\n if (el[TOOLTIP_INSTANCE]) el[TOOLTIP_INSTANCE].destroy()\n },\n}\n\nexport default TooltipDirective","import type { App } from 'vue'\n\nimport Contextmenu from './contextmenu'\nimport ClickOutside from './clickOutside'\nimport Tooltip from './tooltip'\n\nexport default {\n install(app: App) {\n app.directive('contextmenu', Contextmenu)\n app.directive('click-outside', ClickOutside)\n app.directive('tooltip', Tooltip)\n }\n}\n","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './registerServiceWorker'\n\nimport '@icon-park/vue-next/styles/index.css'\nimport 'prosemirror-view/style/prosemirror.css'\nimport 'animate.css'\n\nimport '@/assets/styles/prosemirror.scss'\nimport '@/assets/styles/global.scss'\nimport '@/assets/styles/font.scss'\n\nimport Icon from '@/plugins/icon'\nimport Directive from '@/plugins/directive'\n\nconst app = createApp(App)\n\napp.use(Icon)\napp.use(Directive)\n\napp.use(createPinia())\napp.mount('#app')\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpptist\"] = self[\"webpackChunkpptist\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(2121); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["ToolbarStates","autoSelectAll","view","empty","state","selection","selectAll","dispatch","addMark","editorView","mark","tr","from","to","$from","$to","pos","findNodesWithSameMark","doc","markType","ii","finder","type","firstMark","fromNode","toNode","node","nodeAt","marks","find","fromPos","toPos","jj","nodeSize","equalNodeType","nodeType","Array","isArray","indexOf","findParentNodeClosestToPos","$pos","predicate","i","depth","before","start","findParentNode","_ref","findParentNodeOfType","isActiveOfParentNodeType","schema","nodes","getMarkAttrs","lastChild","getAttrValue","attr","name","attrs","isActiveMark","markActive","isInSet","storedMarks","rangeHasMark","getAttrValueInSelection","keepChecking","value","nodesBetween","_defaultAttrs","color","backcolor","fontsize","fontname","align","getTextAttrs","defaultAttrs","isBold","isEm","isUnderline","isStrikethrough","isSuperscript","isSubscript","isCode","link","isBulletList","isOrderedList","isBlockquote","bold","em","underline","strikethrough","superscript","subscript","code","bulletList","orderedList","blockquote","getFontsize","parseInt","defaultRichTextAttrs","SYS_FONTS","label","WEB_FONTS","isSupportFont","fontName","arial","toLowerCase","size","width","height","str","canvas","document","createElement","ctx","getContext","willReadFrequently","textAlign","fillStyle","textBaseline","getDotArray","_fontFamily","clearRect","font","fillText","imageData","getImageData","data","slice","call","filter","item","join","slides","id","elements","left","top","viewBox","path","fill","fixedRatio","opacity","rotate","flipV","lineHeight","content","defaultFontName","defaultColor","end","points","style","background","wordSpace","theme","themeColor","fontColor","backgroundColor","layouts","outline","text","useSlidesStore","defineStore","title","slideIndex","viewportRatio","getters","currentSlide","currentSlideAnimations","animations","els","elIds","map","el","animation","includes","elId","formatedAnimations","trigger","length","last","push","autoNext","subColor","tinycolor","isDark","layoutsString","JSON","stringify","replaceAll","parse","actions","setTitle","this","setTheme","themeProps","setViewportRatio","setSlides","addSlide","slide","addIndex","splice","updateSlide","props","deleteSlide","slideId","slidesId","deleteSlidesIndex","index","findIndex","newIndex","Math","min","maxIndex","updateSlideIndex","addElement","element","currentSlideEls","newEls","deleteElement","elementId","elementIdList","updateElement","elIdList","removeElementProps","propName","propsNames","omit","nanoid","customAlphabet","databaseId","useMainStore","activeElementIdList","handleElementId","activeGroupElementId","hiddenElementIdList","canvasPercentage","canvasScale","canvasDragged","thumbnailsFocus","editorAreaFocus","disableHotkeys","gridLineSize","showRuler","creatingElement","creatingCustomShape","availableFonts","toolbarState","SLIDE_DESIGN","clipingImageElementId","richTextAttrs","selectedTableCells","isScaling","selectedSlidesIndex","dialogForExport","textFormatPainter","shapeFormatPainter","showSelectPanel","showSearchPanel","activeElementList","slidesStore","handleElement","setActiveElementIdList","setHandleElementId","setActiveGroupElementId","setHiddenElementIdList","setCanvasPercentage","percentage","setCanvasScale","scale","setCanvasDragged","isDragged","setThumbnailsFocus","isFocus","setEditorareaFocus","setDisableHotkeysState","disable","setGridLineSize","setRulerState","show","setCreatingElement","setCreatingCustomShapeState","setAvailableFonts","setToolbarState","setClipingImageElementId","setRichtextAttrs","setSelectedTableCells","cells","setScalingState","updateSelectedSlidesIndex","setDialogForExport","setTextFormatPainter","setShapeFormatPainter","setSelectPanelState","setSearchPanelState","LOCALSTORAGE_KEY_DISCARDED_DB","databaseNamePrefix","deleteDiscardedDB","async","now","Date","getTime","localStorageDiscardedDB","localStorage","getItem","localStorageDiscardedDBList","databaseNames","Dexie","getDatabaseNames","discardedDBNames","prefix","time","split","delete","removeItem","PPTistDB","constructor","super","_defineProperty","version","stores","snapshots","writingBoardImgs","table","db","useSnapshotStore","snapshotCursor","snapshotLength","canUndo","canRedo","setSnapshotCursor","cursor","setSnapshotLength","initSnapshotDatabase","newFirstSnapshot","add","addSnapshot","allKeys","orderBy","keys","needDeleteKeys","snapshot","snapshotLengthLimit","update","bulkDelete","unDo","mainStore","toArray","reDo","useKeyboardStore","ctrlKeyState","shiftKeyState","spaceKeyState","ctrlOrShiftKeyActive","setCtrlKeyState","active","setShiftKeyState","setSpaceKeyState","useScreenStore","screening","setScreening","fillDigit","digit","len","padStart","isPC","navigator","userAgent","match","ElementOrderCommands","ElementAlignCommands","OperateBorderLines","OperateResizeHandlers","OperateLineHandlers","KEYS","HOTKEY_DOC","children","CRYPTO_KEY","encrypt","msg","CryptoJS","toString","decrypt","ciphertext","bytes","Utf8","copyText","Promise","resolve","reject","fakeElement","clipboard","Clipboard","action","container","body","on","e","destroy","appendChild","click","removeChild","readClipboard","readText","then","pasteCustomClipboardString","clipboardData","pasteExcelClipboardString","lines","pop","colCount","getRectRotatedRange","radius","sqrt","pow","auxiliaryAngle","atan","PI","tlbraRadian","trblaRadian","middleLeft","middleTop","xAxis","cos","yAxis","sin","xRange","max","yRange","getRectRotatedOffset","originXRange","originYRange","rotatedXRange","rotatedYRange","offsetX","offsetY","getElementRange","minX","maxX","minY","maxY","getElementListRange","elementList","leftValues","topValues","rightValues","bottomValues","forEach","uniqAlignLines","uniqLines","line","_line","uniqLine","rangeMin","range","rangeMax","createSlideIdMap","slideIdMap","createElementIdMap","groupIdMap","elIdMap","groupId","getTableSubThemeColor","rgba","setAlpha","toRgbString","getLineElementPath","broken","mid","curve","cubic","c1","c2","p1","p2","icons","IconPlayOne","_PlayOne","IconFullScreenPlay","_FullScreenPlay","IconLock","_Lock","IconUnlock","_Unlock","IconPpt","_Ppt","IconFormat","_Format","IconPicture","_Picture","IconFullScreen","_FullScreen","IconList","_List","IconOrderedList","_OrderedList","IconFlipVertically","_FlipVertically","IconFlipHorizontally","_FlipHorizontally","IconFontSize","_FontSize","IconCode","_Code","IconTextBold","_TextBold","IconTextItalic","_TextItalic","IconTextUnderline","_TextUnderline","IconStrikethrough","_Strikethrough","IconEdit","_Edit","IconQuote","_Quote","IconBackgroundColor","_BackgroundColor","IconGroup","_Group","IconUngroup","_Ungroup","IconBack","_Back","IconNext","_Next","IconFullwidth","_Fullwidth","IconAlignTop","_AlignTop","IconAlignLeft","_AlignLeft","IconAlignRight","_AlignRight","IconAlignBottom","_AlignBottom","IconAlignVertically","_AlignVertically","IconAlignHorizontally","_AlignHorizontally","IconBringToFront","_BringToFront","IconSendToBack","_SendToBack","IconAlignTextLeft","_AlignTextLeft","IconAlignTextRight","_AlignTextRight","IconAlignTextCenter","_AlignTextCenter","IconAlignTextBoth","_AlignTextBoth","IconRowHeight","_RowHeight","IconWrite","_Write","IconInsertTable","_InsertTable","IconAddText","_AddText","IconFill","_Fill","IconTailoring","_Tailoring","IconEffects","_Effects","IconColorFilter","_ColorFilter","IconUp","_Up","IconDown","_Down","IconPlus","_Plus","IconMinus","_Minus","IconConnection","_Connection","IconBringToFrontOne","_BringToFrontOne","IconSentToBack","_SentToBack","IconGithub","_Github","IconChartProportion","_ChartProportion","IconChartHistogram","_ChartHistogram","IconChartHistogramOne","_ChartHistogramOne","IconChartLineArea","_ChartLineArea","IconChartRing","_ChartRing","IconChartScatter","_ChartScatter","IconChartLine","_ChartLine","IconChartPie","_ChartPie","IconText","_Text","IconRotate","_Rotate","IconLeftTwo","_LeftTwo","IconRightTwo","_RightTwo","IconPlatte","_Platte","IconClose","_Close","IconCloseSmall","_CloseSmall","IconUndo","_Undo","IconTransform","_Transform","IconClick","_Click","IconTheme","_Theme","IconArrowCircleLeft","_ArrowCircleLeft","IconGraphicDesign","_GraphicDesign","IconLogout","_Logout","IconErase","_Erase","IconClear","_Clear","IconAlignTextTopOne","_AlignTextTopOne","IconAlignTextBottomOne","_AlignTextBottomOne","IconAlignTextMiddleOne","_AlignTextMiddleOne","IconPause","_Pause","IconVolumeMute","_VolumeMute","IconVolumeNotice","_VolumeNotice","IconVolumeSmall","_VolumeSmall","IconVideoTwo","_VideoTwo","IconFormula","_Formula","IconLinkOne","_LinkOne","IconFullScreenOne","_FullScreenOne","IconOffScreenOne","_OffScreenOne","IconPower","_Power","IconListView","_ListView","IconMagic","_Magic","IconHighLight","_HighLight","IconDownload","_Download","IconIndentLeft","_IndentLeft","IconIndentRight","_IndentRight","IconVerticalSpacingBetweenItems","_VerticalSpacingBetweenItems","IconCopy","_Copy","IconDelete","_Delete","IconSquare","_Square","IconRound","_Round","IconNeedle","_Needle","IconTextRotationNone","_TextRotationNone","IconTextRotationDown","_TextRotationDown","IconFormatBrush","_FormatBrush","IconPreviewOpen","_PreviewOpen","IconPreviewClose","_PreviewClose","IconStopwatchStart","_StopwatchStart","IconSearch","_Search","IconLeft","_Left","IconRight","_Right","IconMoveOne","_MoveOne","IconHamburgerButton","_HamburgerButton","IconAttention","_Attention","IconCheckOne","_CheckOne","IconCloseOne","_CloseOne","IconInfo","_Info","install","app","key","Object","component","_hoisted_1","_hoisted_2","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_defineComponent","__name","message","default","duration","closable","Boolean","emits","setup","__props","expose","__expose","emit","visible","ref","timer","startTimer","setTimeout","close","clearTimer","clearTimeout","onBeforeMount","onMounted","_ctx","_cache","_openBlock","_createBlock","_Transition","appear","mode","onBeforeLeave","$event","onAfterLeave","_withCtx","_createElementBlock","_createElementVNode","onMouseenter","onMouseleave","_unref","_createCommentVNode","_toDisplayString","onClick","_createVNode","_","__exports__","instances","wrap","seed","defaultOptions","options","className","cssText","vm","createVNode","MessageComponent","div","appContext","_context","onClose","onDestroy","childNodes","remove","render","firstElementChild","instance","exposed","success","info","warning","error","closeAll","parseText2Paragraphs","htmlText","replace","paragraphs","string","paragraph","getImageSize","src","img","onload","imgWidth","clientWidth","imgHeight","clientHeight","onerror","getImageDataURL","file","reader","FileReader","addEventListener","result","readAsDataURL","VIEWPORT_SIZE","ShapePathFormulasKeys","ElementTypes","SHAPE_PATH_FORMULAS","ROUND_RECT","editable","defaultValue","relative","getBaseSize","formula","CUT_RECT_DIAGONAL","CUT_RECT_SINGLE","CUT_RECT_SAMESIDE","ROUND_RECT_DIAGONAL","ROUND_RECT_SINGLE","ROUND_RECT_SAMESIDE","CUT_ROUND_RECT","MESSAGE","arrowWidth","arrowheight","ROUND_MESSAGE","L","lineWidth","RING_RECT","PLUS","TRIANGLE","vertex","PARALLELOGRAM_LEFT","point","PARALLELOGRAM_RIGHT","TRAPEZOID","BULLET","INDICATOR","SHAPE_LIST","pptxShapeType","pathFormula","special","outlined","CHART_TYPES","bar","horizontalBar","area","scatter","pie","ring","snapshotStore","addHistorySnapshot","debounce","trailing","redo","throttle","leading","undo","storeToRefs","useHistorySnapshot","callback","createImageElement","createChartElement","newElement","chartType","gridColor","labels","legends","series","horizontalBars","stackBars","showLine","lineSmooth","showArea","donut","createTableElement","row","col","rowCells","j","colspan","rowspan","DEFAULT_CELL_WIDTH","DEFAULT_CELL_HEIGHT","colWidths","rowHeader","rowFooter","colHeader","colFooter","cellMinHeight","createTextElement","position","vertical","editorRef","querySelector","focus","createShapeElement","keypoint","createLineElement","isBroken","isCurve","isCubic","createLatexElement","w","h","latex","strokeWidth","createVideoElement","autoplay","createAudioElement","loop","addElementsFromData","firstElement","lastSameElement","offset","oMinX","oMaxX","oMinY","oMaxY","nMinX","nMaxX","nMinY","nMaxY","values","addSlidesFromData","newSlides","target","isEmptySlide","computed","useCreateElement","useAddSlidesOrElements","createTextElementFromClipboard","pasteTextClipboardData","onlySlide","onlyElements","_selectedSlidesIndex","selectedSlides","selectedSlidesId","usePasteTextClipboardData","resetSlides","emptySlide","command","UP","DOWN","copySlide","pasteSlide","catch","err","createSlide","createSlideByTemplate","newSlide","copyAndPasteSlide","targetSlidesId","cutSlide","selectAllSlide","newSelectedSlidesIndex","sortSlides","oldIndex","_slides","_slide","lockElement","newElementList","lock","unlockElement","groupElementIdList","deleteAllElements","canCombine","firstGroupId","inSameGroup","every","combineElements","combineElementList","combineElementMaxLevel","_element","combineElementIdList","insertLevel","uncombineElements","hasElementInGroup","some","handleElementIdList","useDeleteElement","copyElement","cutElement","pasteElement","quickCopyElement","selectAllElement","unlockedElements","newActiveElementIdList","moveElement","step","move","LEFT","RIGHT","getCombineElementLevelRange","minLevel","maxLevel","moveUpElement","copyOfElementList","nextElement","movedElementList","nextCombineElementList","level","movedElement","moveDownElement","prevElement","prevCombineElementList","moveTopElement","moveBottomElement","unshift","orderElement","TOP","BOTTOM","enterFullscreen","docElm","documentElement","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","isFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","webkitCurrentFullScreenElement","screenStore","enterScreening","enterScreeningFromStart","exitScreening","canvasScalePercentage","round","scaleCanvas","setCanvasScalePercentage","resetCanvas","keyboardStore","useSlideHandler","useCombineElement","useLockElement","useCopyAndPasteElement","useSelectAllElement","useMoveElement","useOrderElement","useScreening","useScaleCanvas","copy","cut","quickCopy","combine","uncombine","moveSlide","PAGEUP","PAGEDOWN","order","create","tabActiveElement","currentIndex","nextIndex","nextElementId","keydownListener","ctrlKey","shiftKey","altKey","metaKey","ctrlOrMetaKeyActive","toUpperCase","SPACE","P","preventDefault","F5","F","C","X","D","Z","Y","A","G","B","DELETE","BACKSPACE","ENTER","MINUS","EQUAL","DIGIT_0","TAB","keyupListener","window","onUnmounted","removeEventListener","pasteImageFile","imageFile","dataURL","pasteListener","clipboardDataItems","items","clipboardDataFirstItem","kind","getAsFile","getAsString","exporting","importSpecificFile","files","cover","readAsText","parseLineElement","isFlipV","isFlipH","borderWidth","borderType","borderColor","shapType","importPPTXFile","shapeList","json","image","picBase64","imageSize","gradientType","gradientColor","colors","gradientRotate","rot","parseElements","fillColor","lineElement","shape","cellData","rowSpan","xlabels","v","y","_el","readAsArrayBuffer","_Fragment","_renderList","hotkey","accept","inputRef","handleClick","handleChange","_renderSlot","$slots","ref_key","onChange","_withScopeId","n","_pushScopeId","_popScopeId","loading","tip","contentStyle","placement","contentVisible","_component_IconClose","_resolveComponent","_Teleport","onBeforeEnter","_withDirectives","_normalizeClass","_normalizeStyle","_vShow","disabled","placeholder","focused","handleInput","handleBlur","handleFocus","onInput","onFocus","onBlur","onKeydown","_withKeys","appendTo","center","triggerRef","contentRef","watch","hide","tippy","allowHTML","interactive","maxWidth","onShow","onShown","onHidden","_hoisted_7","_hoisted_8","_hoisted_9","href","_hoisted_10","useImport","mainMenuVisible","hotkeyDrawerVisible","editingTitle","titleInputRef","titleValue","startEditTitle","nextTick","handleUpdateTitle","goLink","url","open","_component_IconHamburgerButton","_component_IconPpt","_component_IconDown","_component_IconDownload","_component_IconGithub","_directive_tooltip","_resolveDirective","Popover","FileInput","PopoverMenuItem","_createTextVNode","Input","Drawer","HotkeyDoc","FullscreenSpin","injectKeySlideScale","Symbol","injectKeySlideId","injectKeyRadioGroupValue","removeAllRanges","getSelection","canvasRef","viewportLeft","viewportTop","initViewportPosition","canvasWidth","canvasHeight","viewportActualWidth","viewportActualHeight","setViewportPosition","newValue","oldValue","newViewportActualWidth","oldViewportActualWidth","newViewportActualHeight","oldViewportActualHeight","viewportStyles","resizeObserver","ResizeObserver","observe","unobserve","dragViewport","isMouseDown","startPageX","pageX","startPageY","pageY","originLeft","originTop","onmousemove","currentPageX","currentPageY","onmouseup","viewportRef","mouseSelectionVisible","mouseSelectionQuadrant","mouseSelection","updateMouseSelection","viewportRect","getBoundingClientRect","minSelectionRange","x","offsetWidth","offsetHeight","abs","quadrant","inRangeElementList","mouseSelectionLeft","mouseSelectionTop","mouseSelectionWidth","mouseSelectionHeight","isInclude","inRangeElement","inRangeElementIdList","groupElementList","groupElement","elementRef","handleDrop","dataTransfer","dataTransferItem","ondragleave","ondrop","ondragenter","ondragover","getAngleFromCoordinate","radian","atan2","angle","rotateElement","isTouchEvent","MouseEvent","changedTouches","elOriginRotate","elLeft","elTop","elWidth","elHeight","centerX","centerY","handleMousemove","mouseX","mouseY","sorptionRange","handleMouseup","ontouchmove","ontouchend","ELEMENT_TYPE_ZH","chart","video","audio","MIN_SIZE","getRotateElementPoints","taRadian","raRadian","halfWidth","halfHeight","leftTopPoint","topPoint","rightTopPoint","rightPoint","rightBottomPoint","bottomPoint","leftBottomPoint","leftPoint","getOppositePoint","direction","oppositeMap","RIGHT_BOTTOM","LEFT_BOTTOM","LEFT_TOP","RIGHT_TOP","ClipPathTypes","ClipPaths","alignmentLines","scaleElement","elOriginLeft","elOriginTop","elOriginWidth","elOriginHeight","originTableCellMinHeight","elRotate","rotateRadian","aspectRatio","minSize","getSizeWithinRange","baseLeft","baseTop","horizontalLines","verticalLines","oppositePoint","edgeWidth","edgeHeight","isActiveGroupElement","right","bottom","topLine","bottomLine","leftLine","rightLine","edgeTopLine","edgeBottomLine","edgeHorizontalCenterLine","edgeLeftLine","edgeRightLine","edgeVerticalCenterLine","alignedAdsorption","currentX","currentY","_alignmentLines","isVerticalAdsorbed","isHorizontalAdsorbed","correctionVal","axis","revisedX","revisedY","currentPoints","currentOppositePoint","currentBaseLeft","currentBaseTop","moveX","moveY","scaleMultiElement","operateWidth","operateHeight","originElementList","currentMinX","currentMaxX","currentMinY","currentMaxY","currentOppositeWidth","currentOppositeHeight","widthScale","heightScale","originElement","originEl","selectElement","startMove","newActiveIdList","groupMembersId","uniq","dragElement","originActiveElementList","isMisoperation","horizontalCenterLine","verticalCenterLine","targetMinX","targetMaxX","targetMinY","targetMaxY","targetLeft","targetTop","targetCenterX","targetCenterY","dragLineElement","adsorptionPoints","startX","startY","endX","endY","midX","midY","c1X","c1Y","c2X","c2Y","START","adsorptionPoint","END","C1","C2","newEl","moveShapeKeypoint","shapePathData","baseSize","originPos","shapeElement","formatCreateSelection","selectionData","formatCreateSelectionForLine","_start","_end","insertElementFromCreateSelection","alignElementToCanvas","viewportWidth","viewportHeight","CENTER","VERTICAL","HORIZONTAL","shadow","shadowStyle","blur","flipH","flipStyle","CLIPPATHS","rect","RECT","rect2","POLYGON","createPath","rect3","roundRect","ellipse","ELLIPSE","triangle","triangle2","triangle3","rhombus","pentagon","hexagon","heptagon","octagon","chevron","arrow","parallelogram","parallelogram2","trapezoid","trapezoid2","clip","clipShape","imgPosition","filters","outlineWidth","outlineStyle","outlineColor","strokeDashArray","useElementOutline","toRef","overflow","rx","ry","stroke","cx","cy","Function","d","elementInfo","useClipImage","ImageRectOutline","ImageEllipseOutline","ImagePolygonOutline","clipPath","clipData","clipWrapperPositionStyle","isSettingClipRange","currentRange","getClipDataTransformInfo","bottomImgPositionStyle","topImgWrapperPosition","topImgWrapperPositionStyle","topImgPositionStyle","bottomWidth","bottomHeight","initClipPosition","handleClip","clipedEmitData","keyboardListener","updateRange","retPosition","moveClipRange","bottomPosition","originPositopn","scaleClipRange","minWidth","minHeight","targetWidth","targetHeight","rotateClassName","cornerPoint","edgePoints","_directive_click_outside","draggable","alt","onMousedown","_withModifiers","contextmenus","isCliping","useElementShadow","useElementFlip","useFilter","handleSelectElement","stopPropagation","originClip","centerOffsetX","centerOffsetY","rotatedCenterX","rotatedCenterY","_props","_directive_contextmenu","transform","ImageClipHandler","onClip","onTouchstart","ImageOutline","onDragstart","colorMask","buildKeymap","bind","cmd","joinUp","joinDown","undoInputRule","selectParentNode","toggleMark","strong","chainCommands","splitListItem","list_item","newlineInCode","createParagraphNear","liftEmptyBlock","splitBlockKeepMarks","liftListItem","sinkListItem","blockQuoteRule","wrappingInputRule","orderedListRule","childCount","bulletListRule","codeRule","inputRegex","InputRule","insertText","linkRule","urlRegEx","buildInputRules","rules","smartQuotes","ellipsis","emDash","ordered_list","bullet_list","inputRules","buildPlugins","keymap","baseKeymap","dropCursor","gapCursor","history","listStyleType","group","parseDOM","tag","getAttrs","dom","hasAttribute","getAttribute","toDOM","listItem","_listItem","indent","textIndent","test","textIndentLevel","floor","ignore","skip","excludes","forecolor","inline","inclusive","dataset","schemaNodes","schemaMarks","Schema","createDocument","htmlString","parser","DOMParser","parseFromString","fromSchema","initProsemirrorEditor","EditorView","EditorState","plugins","EmitterEvents","emitter","mitt","setTextAlign","alignment","tasks","allowedNodeTypes","Set","has","task","setNodeMarkup","alignmentCommand","setSelection","isList","toggleList","listType","itemType","blockRange","parentList","validContent","nodeAttrs","wrapInList","setNodeIndentMarkup","delta","indentKey","minIndent","maxIndent","setIndent","TextSelection","AllSelection","indentCommand","docChanged","textIndentCommand","autoFocus","editorViewRef","innerHTML","handleKeydown","textContent","hasFocus","replaceRangeWith","setProps","execCommand","lift","wrapIn","removeMark","keep","newProps","handleDOMEvents","keydown","mouseup","RICH_TEXT_COMMAND","off","canMove","realHeightCache","realWidthCache","updateTextElementHeight","entries","contentRect","realHeight","realWidth","updateContent","checkEmptyText","pureText","isHandleElement","textShadow","letterSpacing","fontFamily","writingMode","ElementOutline","ProsemirrorEditor","undefined","paragraphSpace","onUpdate","color1","color2","x1","y1","x2","y2","gradientTransform","execFormatPainter","defaultText","updateText","_text","prosemirrorEditorRef","startEdit","onMouseup","onDblclick","gradient","GradientDefs","pathMap","dot","rotateMap","markerUnits","orient","markerWidth","markerHeight","refX","refY","svgWidth","svgHeight","lineDashArray","LinePointMarker","legend","chartRef","slideScale","inject","chartHeight","getPieChartData","getOptions","propsOptopns","renderChart","BarChart","LineChart","PieChart","updateChart","themeColors","analogous","supplement","updateTheme","setProperty","updateGridColor","flexDirection","openDataEditor","OPEN_CHART_DATA_EDITOR","Chart","getTextStyle","textDecoration","fontWeight","fontStyle","fontSize","formatText","hideCells","cell","subThemeColor","immediate","textareaRef","onpaste","excelData","onBeforeUnmount","contenteditable","isStartSelect","startCell","endCell","tableCells","get","set","newData","useSubThemeColor","colSizeList","totalWidth","reduce","a","b","removeSelectedCells","dragLinePosition","useHideCells","selectedCells","isEqual","activedCell","handleCellMousedown","rowIndex","colIndex","button","handleCellMouseenter","isHideCell","selectCol","maxRow","selectRow","maxCol","deleteRow","_tableCells","targetCells","hideCellsPos","deleteCol","insertRow","insertCol","fillTable","rowCount","defaultCell","newRows","mergeCells","splitCells","handleMousedownColHandler","originWidth","clearSelectedCellText","tabActiveCell","getNextCell","nextRow","nextCol","nextCell","textRef","insertExcelData","fillRowCount","fillColCount","getEffectiveTableCells","effectiveTableCells","_rowCells","checkCanDeleteRowOrCol","canDeleteRow","canDeleteCol","checkCanMergeOrSplit","isMultiSelected","targetCell","canMerge","canSplit","cellIndex","handler","divider","span","borderStyle","CustomTextarea","onUpdateValue","onInsertExcelData","updateTableElementHeight","updateTableCells","updateColWidths","widths","updateSelectedCells","EditableTable","onChangeColWidths","onChangeSelectedCells","openLatexEditor","OPEN_LATEX_EDITOR","videoRef","exec","canPlayType","Hls","isSupported","hls","loadSource","attachMedia","flvjs","flvPlayer","createPlayer","attachMediaElement","load","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","poster","secondToTime","second","isNaN","add0","num","hour","sec","getBoundingClientRectViewLeft","playBarWrap","volumeBarRef","volume","paused","currentTime","loaded","bezelTransition","playbackRate","playBarTimeVisible","playBarTime","playBarTimeLeft","ptime","dtime","playedBarWidth","loadedBarWidth","volumeBarWidth","speedMenuVisible","speedOptions","seek","play","pause","toggle","setVolume","muted","speed","rate","handleDurationchange","handleTimeupdate","handleEnded","handleProgress","buffered","loadError","handleError","thumbMove","clientX","thumbUp","handleMousedownPlayBar","volumeMove","volumeUp","handleMousedownVolumeBar","handleClickVolumeBar","handleMousemovePlayBar","px","tx","toggleVolume","toggleLoop","autoHideControllerTimer","hideController","autoHideController","played","useMSE","_component_IconPause","_component_IconPlayOne","_component_IconVolumeMute","_component_IconVolumeNotice","_component_IconVolumeSmall","onMousemove","playsinline","onDurationchange","onTimeupdate","onEnded","onProgress","onPlay","onPause","onError","onAnimationend","VideoPlayer","audioRef","handlePlayed","audioIconSize","audioPlayerPosition","audioWidth","audioHeight","AudioPlayer","elementIndex","isMultiSelect","openLinkDialog","currentElementComponent","elementTypeMap","IMAGE","ImageElement","TEXT","TextElement","SHAPE","ShapeElement","LINE","LineElement","CHART","ChartElement","TABLE","TableElement","LATEX","LatexElement","VIDEO","VideoElement","AUDIO","AudioElement","useAlignElementToCanvas","subText","zIndex","_resolveDynamicComponent","bgColor","colorList","mostReadable","includeFallbackColors","p","backgroundStyle","backgroundImage","backgroundRepeat","backgroundSize","useSlideBackgroundStyle","GridLines","sizeStyle","markerSize","marker","selectionRef","createSelection","absX","absY","isOpposite","endPageX","endPageY","defaultSize","lineData","_startX","_startY","_endX","_endY","onContextmenu","shapeCanvasRef","mousePosition","closed","getPoint","lastPointX","lastPointY","updateMousePosition","firstPointX","firstPointY","addPoint","xList","yList","formatedPoints","ESC","resizeHandlers","textElementResizeHandlers","verticalTextElementResizeHandlers","borderLines","T","R","isWide","localActiveElementList","useCommonOperate","setRange","watchEffect","disableResize","BorderLine","ResizeHandler","script","__default__","inheritAttrs","handlerVisible","scaleWidth","scaleHeight","RotateHandler","keypointStyle","keypointPos","handlers","ctrlHandler","ctrlHandler1","ctrlHandler2","cannotRotate","setLink","linkRegExp","removeLink","margin","useLink","turnTarget","targetIndex","Divider","isSelected","isActive","currentOperateComponent","ImageElementOperate","TextElementOperate","ShapeElementOperate","LineElementOperate","TableElementOperate","CommonElementOperate","elementIndexListInAnimation","indexList","transformOrigin","LinkHandler","needScaleSize","zoom","StaticTable","BaseImageElement","BaseTextElement","BaseShapeElement","BaseLineElement","BaseChartElement","BaseTableElement","BaseLatexElement","BaseVideoElement","BaseAudioElement","provide","ThumbnailElement","tabs","card","tabsStyle","tabStyle","spaceAround","spaceBetween","tab","checked","first","showLabel","popoverVisible","selectRef","updateWidth","handleSelect","option","padding","boxShadow","address","slideOptions","selectedSlide","save","Tabs","marginBottom","Select","ThumbnailSlide","Button","closeButton","closeOnClickMask","closeOnEsc","modalRef","onEsc","onClickMask","tabindex","onKeyup","linkDialogVisible","setLocalElementList","useViewportSize","useDropImageOrText","useMouseSelection","useDragElement","useDragLineElement","useSelectElement","useScaleElement","useRotateElement","useMoveShapeKeypoint","handleClickBlankArea","handleDblClick","removeEditorAreaFocus","throttleScaleCanvas","throttleUpdateSlideIndex","handleMousewheelCanvas","deltaY","toggleRuler","useInsertFromCreateSelection","insertCustomShape","onWheel","ElementCreateSelection","onCreated","ShapeCreateCanvas","AlignmentLine","MultiSelectOperate","Operate","ViewportBackground","MouseSelection","EditableElement","Ruler","Modal","LinkDialog","selectShape","ShapeItemThumbnail","LINE_LIST","selectLine","chartList","selectChart","_component_IconChartLine","_component_IconChartHistogram","_component_IconChartPie","_component_IconChartHistogramOne","_component_IconChartLineArea","_component_IconChartRing","_component_IconChartScatter","Infinity","number","_vModelText","customRow","customCol","isCustom","handleClickTable","insertCustomTable","NumberInput","videoSrc","audioSrc","insertVideo","insertAudio","hfmathConfig","SUB_SUP_SCALE","FORMULA_LIST","SYMBOL_LIST","box","pathd","eq","hfmath","boxW","boxH","svg","SCALE_X","SCALE_Y","rows","resizable","formulaList","symbolTabs","textAreaRef","selectedSymbolKey","symbolPool","selectedSymbol","insertSymbol","TextArea","FormulaContent","SymbolContent","canvasScalePresetList","canvasScaleVisible","applyCanvasPresetScale","insertImageElement","shapePoolVisible","linePoolVisible","chartPoolVisible","tableGeneratorVisible","mediaInputVisible","latexEditorVisible","textTypeSelectVisible","drawText","drawShape","drawLine","openSelectPanel","openSraechPanel","_component_IconBack","_component_IconNext","_component_IconMoveOne","_component_IconSearch","_component_IconFontSize","_component_IconTextRotationNone","_component_IconTextRotationDown","_component_IconPicture","_component_IconGraphicDesign","_component_IconConnection","_component_IconChartProportion","_component_IconInsertTable","_component_IconFormula","_component_IconVideoTwo","_component_IconMinus","_component_IconPlus","_component_IconFullScreen","ShapePool","onSelect","LinePool","ChartPool","TableGenerator","onInsert","MediaInput","onInsertVideo","onInsertAudio","LaTeXEditor","slidesLoadLimit","loadSlide","selectSlideTemplate","useLoadSlides","presetLayoutPopoverVisible","changeSlideIndex","handleClickSlideThumbnail","minIndex","handleDragEnd","eventData","contextmenusThumbnails","contextmenusThumbnailItem","LayoutPool","Draggable","modelValue","scroll","scrollSensitivity","onEnd","itemKey","toggleTextFormatPainter","sliderRef","getNewValue","diff","fround","targetNumber","accuracy","NP","tooltipValue","tooltipRangeStartValue","tooltipRangeEndValue","getPercentage","progress","_percentage","remainder","updateRangeEnd","updatePercentage","oldValueArr","newValueArr","updatePercentageEnd","handleMousedown","deep","updateOpacity","Slider","_component_IconPlatte","white","grey","checkboardCache","renderCheckboard","fillRect","translate","toDataURL","getCheckboard","checkboard","bgStyle","rgbaStr","r","g","alphaRef","containerWidth","xOffset","pageXOffset","unbindEventListeners","handleMouseDown","Checkboard","hue","oldHue","pullDirection","hsla","toHsl","pointerLeft","s","hueRef","percent","l","hsva","toHsv","pointerTop","emitChangeEvent","param","saturationRef","containerHeight","yOffset","pageYOffset","clamp","saturation","bright","val","_hex","toHex8String","toHexString","toRgb","RECENT_COLORS","presetColorConfig","startColor","endColor","_startColor","_endColor","rStep","gStep","bStep","gradientColorArr","getPresetColors","presetColors","standardColors","recentColors","rgbaString","currentColor","selectPresetColor","colorString","updateRecentColorsCache","_color","maxLength","recentColorsCache","setItem","changeColor","openEyeDropper","isSupportedEyeDropper","browserEyeDropper","customEyeDropper","eyeDropper","EyeDropper","tColor","sRGBHex","targetRef","maskRef","colorBlockRef","tagName","classList","contains","toCanvas","fontEmbedCSS","pixelRatio","toFixed","handleMouseleave","_component_IconNeedle","Saturation","onColorChange","Hue","Alpha","EditableInput","c","fixed","hasOutline","updateOutline","outlineProps","toggleOutline","_outline","Switch","ColorPicker","ColorButton","hasShadow","updateShadow","shadowProps","_shadow","toggleShadow","passive","_value","updateValue","ButtonGroup","_hoisted_23","_hoisted_24","_hoisted_25","presetStyles","useTextFormatPainter","bulletListPanelVisible","orderedListPanelVisible","indentLeftPanelVisible","indentRightPanelVisible","bulletListStyleTypeOption","orderedListStyleTypeOption","fontSizeOptions","lineHeightOptions","wordSpaceOptions","paragraphSpaceOptions","updateLineHeight","updateParagraphSpace","updateWordSpace","updateFill","emitRichTextCommand","emitBatchRichTextCommand","linkPopoverVisible","openLinkPopover","updateLink","_component_IconAddText","_component_IconText","_component_IconHighLight","_component_IconTextBold","_component_IconTextItalic","_component_IconTextUnderline","_component_IconStrikethrough","_component_IconCode","_component_IconQuote","_component_IconFormat","_component_IconFormatBrush","_component_IconLinkOne","_component_IconAlignTextLeft","_component_IconAlignTextCenter","_component_IconAlignTextRight","_component_IconAlignTextBoth","_component_IconList","_component_IconOrderedList","_component_IconIndentLeft","_component_IconIndentRight","_component_IconRowHeight","_component_IconVerticalSpacingBetweenItems","_component_IconFullwidth","SelectGroup","icon","TextColorButton","CheckboxButton","RadioGroup","RadioButton","ElementShadow","ElementOpacity","updateFlip","flipProps","_component_IconFlipVertically","_component_IconFlipHorizontally","defaultFilters","unit","filterOptions","hasFilters","filterItem","updateFilter","_handleElement","originFilters","toggleFilters","defaultColorMask","hasColorMask","toggleColorMask","updateColorMask","shapeClipPathOptions","ratioClipOptions","ratio","handleImageElement","clipPanelVisible","clipImage","getImageElementDataBeforeClip","imgLeft","imgTop","originClipRange","originHeight","presetImageClip","imageRatio","distance","replaceImage","resetImage","setBackgroundImage","_component_IconTailoring","_component_IconTransform","_component_IconUndo","_component_IconTheme","ElementFlip","typeItem","ElementColorMask","ElementFilter","toggleShapeFormatPainter","handleShapeElement","fillType","useShapeFormatPainter","updateFillType","updateGradient","gradientProps","_gradient","changeShape","updateTextAlign","_component_IconAlignTextTopOne","_component_IconAlignTextMiddleOne","_component_IconAlignTextBottomOne","handleLineElement","updateLine","CELL_WIDTH","CELL_HEIGHT","selectedRange","tempRangeSize","focusCell","rangeLines","resizablePointStyle","initData","_data","moveNextRow","getTableData","labelsItem","labelInputRef","legendsItem","seriesItem","valueInputRef","clear","handlePaste","closeEditor","changeSelectRange","autocomplete","onPaste","presetChartThemes","handleChartElement","chartDataEditorVisible","presetThemesVisible","presetThemeColorHoverIndex","_lineSmooth","_showLine","_showArea","_horizontalBars","_donut","_stackBars","updateData","updateOptions","optionProps","newOptions","addThemeColor","applyPresetTheme","deleteThemeColor","updateLegend","_component_IconEdit","_component_IconCloseSmall","Checkbox","itemIndex","ChartDataEditor","onSave","textAttrs","hasTheme","minRowCount","minColCount","updateTextAttrState","selectedCell","updateTextAttrs","textAttrProp","themeProp","_theme","toggleTheme","setTableRow","newTableCells","setTableCol","newColSizeList","_component_IconFill","handleLatexElement","updateLatex","updateLatexData","handleVideoElement","updateVideo","setVideoPoster","handleAudioElement","updateAudio","updateFontStyle","panelMap","TextStylePanel","ImageStylePanel","ShapeStylePanel","LineStylePanel","ChartStylePanel","TableStylePanel","LatexStylePanel","VideoStylePanel","AudioStylePanel","currentPanelComponent","MultiStylePanel","activeGroupElement","isHorizontalText","isVerticalText","updateLeft","updateTop","updateShapePathData","updateHeight","updateRotate","updateFixedRatio","updateRotate45","_rotate","_component_IconSendToBack","_component_IconBringToFrontOne","_component_IconBringToFront","_component_IconSentToBack","_component_IconAlignLeft","_component_IconAlignVertically","_component_IconAlignRight","_component_IconAlignTop","_component_IconAlignHorizontally","_component_IconAlignBottom","_component_IconLock","_component_IconUnlock","_component_IconRotate","ANIMATION_DEFAULT_DURATION","ANIMATION_DEFAULT_TRIGGER","ANIMATION_CLASS_PREFIX","ENTER_ANIMATIONS","EXIT_ANIMATIONS","ATTENTION_ANIMATIONS","SLIDE_ANIMATIONS","animationEffects","effect","animationTypes","activeTab","animationPoolVisible","hoverPreviewAnimation","animationSequence","elType","animationEffect","handleElementAnimation","deleteAnimation","runAnimation","elRef","animationName","handleAnimationEnd","removeProperty","once","updateElementAnimationDuration","updateElementAnimationTrigger","updateElementAnimation","handleAnimationId","animationItem","addAnimation","popoverMaskHide","handlePopoverVisibleChange","openAnimationPool","in","out","attention","_component_IconEffects","_component_IconClick","handle","PRESET_THEMES","getSlideAllColors","getAlpha","createSlideThemeColorMap","newColors","oldColors","themeColorMap","otherColors","setSlideTheme","colorMap","applyPresetThemeToSingleSlide","applyPresetThemeToAllSlides","applyThemeToAllSlides","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","useSlideTheme","updateBackgroundType","newBackground","updateBackground","uploadBackgroundImage","applyBackgroundAllSlide","updateViewportRatio","currentTurningMode","turningMode","updateTurningMode","applyAllSlide","alignActiveElement","groupElementRangeMap","activeElement","groupElements","horizontalCenter","verticalCenter","displayItemCount","count","groupIdList","uniformHorizontalDisplay","copyOfActiveElementList","singleElemetList","groupList","groupEl","formatedGroupList","groupItem","list","sort","itemA","itemB","sortedElementData","firstItem","lastPos","lastWidth","currentPos","currentWidth","sortedItem","uniformVerticalDisplay","totalHeight","lastHeight","currentHeight","useAlignActiveElement","useUniformDisplayElement","alignElement","_component_IconGroup","_component_IconUngroup","selectSymbol","elementTabs","EL_STYLE","SYMBOL","EL_POSITION","EL_ANIMATION","slideTabs","SLIDE_ANIMATION","multiSelectTabs","MULTI_POSITION","currentTabs","currentTabsValue","ElementStylePanel","ElementPositionPanel","ElementAnimationPanel","SlideDesignPanel","SlideAnimationPanel","MultiPositionPanel","SymbolPanel","remark","resize","newHeight","childlessTags","closingTags","closingTagAncestorBreakers","li","dt","dd","tbody","thead","tfoot","td","voidTags","jumpPosition","movePositopn","findTextEnd","isEnd","textEnd","char","charAt","lexText","tokens","lexComment","contentEnd","commentEnd","lexTagName","isTagChar","lexTagAttributes","quote","wordBegin","words","isQuoteEnd","isTagEnd","isWordEnd","isQuoteStart","word","isNotPair","secondWord","startsWith","newWord","thirdWord","endsWith","lexSkipTag","safeTagName","nextTag","tagState","lexTag","textStart","secondChar","tagStartClose","firstChar","tagEndClose","lex","isComment","safeTag","lexer","root","stack","hasTerminalParent","tagParents","parentTagName","rewindStack","newLength","token","tagToken","shouldRewind","isClosingTag","shouldRewindToAutoClose","previousIndex","attributes","tagEndToken","_token","elementNode","hasChildren","innerState","splitHead","sep","idx","unquote","car","formatAttributes","attribute","parts","trim","format","toAST","typeMap","toPoints","pathData","SVGPathData","commands","lastPoint","cubicBezierPoints","arcToBezier","py","rX","rY","xAxisRotation","xRot","largeArcFlag","lArcFlag","sweepFlag","cbPoint","characters","PREFIX","utf8Encode","utftext","charCodeAt","String","fromCharCode","encode","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","svg2Base64","XMLS","XMLSerializer","serializeToString","INCH_PX_RATIO","PT_PX_RATIO","exportImage","domRef","quality","ignoreWebfont","toImage","toPng","toJpeg","foreignObjectSpans","querySelectorAll","spanRef","removeAttribute","config","dataUrl","saveAs","exportSpecificFile","blob","Blob","exportJSON","formatColor","alpha","formatHTML","html","ast","bulletFlag","slices","obj","baseStyleObj","isBlockTag","lastSlice","breakLine","styleObj","styleAttr","styleArr","styleItem","_key","dataIndentAttr","highlight","strike","italic","fontFace","hyperlink","bullet","paraSpaceBefore","indentLevel","formatPoints","moveTo","getShadowOption","getOutlineOption","transparency","dashType","getLinkOption","exportPPTX","masterOverwrite","ignoreMedia","pptx","pptxgen","layout","defineLayout","bgAlpha","defineSlideMaster","pptxSlide","mix","addNotes","textProps","valign","lineSpacingMultiple","autoFit","charSpacing","vert","addText","linkOption","rounding","originW","originH","sizing","addImage","svgRef","base64SVG","addShape","beginArrowType","endArrowType","chartData","chartColors","plotArea","showLegend","legendPos","legendColor","legendFontSize","ChartType","barDir","lineSize","doughnut","holeSize","addChart","hiddenCells","rowData","tableData","subThemeColors","_row","cellOptions","colW","border","pt","addTable","extMatch","extn","ext","videoExts","audioExts","addMedia","writeFile","fileName","imageThumbnailsRef","rangeType","renderSlides","useExport","expImage","createIframe","iframe","writeContent","printNode","docType","styleSheets","styleSheet","cssRules","rule","head","write","print","iframeContentWindow","contentWindow","contentDocument","handleLoadIframe","handleAfterprint","pdfThumbnailsRef","expPDF","pageSize","currentDialogComponent","dialogMap","ExportImage","ExportJSON","ExportPDF","ExportPPTX","ExportSpecificFile","moveable","moveablePanelRef","windowWidth","_elements","lastItem","selectGroupEl","idList","selectEl","hideElement","showAll","currentSlideElIdList","needHiddenElementIdList","hideAll","editingElId","saveElementName","enterEdit","_component_IconUp","_component_IconPreviewClose","_component_IconPreviewOpen","MoveablePanel","searchWord","replaceWord","searchResults","searchIndex","search","textList","matchRegex","RegExp","textRegex","rets","highlightCurrentSlide","clearMarks","getTextNodeList","nodeList","textNodes","shift","TEXT_NODE","wholeText","getTextInfoList","startIdx","endIdx","getMatchList","keyword","reg","matchList","matchStart","matchEnd","textIdx","textNode","nodeMatchStartIdx","nodeMatchLength","splitText","innerText","substring","parentNode","replaceChild","highlightTableText","markNodes","createTextNode","lastTarget","setActiveMark","searchNext","searchPrev","targetElement","replaced","targetSlide","lastMarkIndex","markIndex","useSearch","searchInpRef","_component_IconLeft","_component_IconRight","_isRef","onEnter","suffix","closeExportDialog","remarkHeight","useGlobalHotkey","usePasteEvent","EditorHeader","Thumbnails","CanvasTool","Canvas","Remark","Toolbar","SelectPanel","SearchPanel","onClosed","ExportDialog","animationIndex","inAnimation","playedSlidesMinIndex","endAnimationCount","classname","revokeAnimation","execPrev","autoPlayTimer","closeAutoPlay","clearInterval","loopPlay","setLoopPlay","throttleMassage","turnSlideToIndex","execNext","autoPlayInterval","autoPlay","setInterval","setAutoPlayInterval","interval","mousewheelListener","touchInfo","touchStartListener","touchEndListener","turnPrevSlide","turnNextSlide","turnSlideToId","wrapRef","slideWidth","slideHeight","setSlideContentSize","slideWrapRef","winWidth","winHeight","fullscreenState","escExit","handleFullscreenChange","manualExitFullscreen","inCurrentSlide","audioPlayerRef","ScreenChartElement","ScreenVideoElement","ScreenAudioElement","needWaitAnimation","elementIndexInAnimation","firstAnimation","openLink","visibility","ScreenElement","slidesWithTurningMode","turningModeKeys","random","ScreenSlide","turnSlide","_component_IconArrowCircleLeft","model","blackboard","penSize","markSize","rubberSize","writingBoardRef","lastTime","lastLineWidth","mouse","mouseInCanvas","updateCanvasSize","initCanvas","lineCap","lineJoin","updateCtx","globalCompositeOperation","globalAlpha","draw","posX","posY","lastPosX","lastPosY","strokeStyle","beginPath","lineTo","closePath","erase","sinRadius","cosRadius","rectPoint1","rectPoint2","rectPoint3","rectPoint4","arc","restore","getDistance","getLineWidth","t","maxV","minV","handleMove","getMouseOffsetPosition","event","canvasRect","clearCanvas","setImageDataURL","imageDataURL","Image","drawImage","_component_IconWrite","onTouchmove","onTouchend","writingBoardColors","writingBoardColor","writingBoardModel","sizePopoverType","changeModel","closeWritingBoard","where","equals","ret","currentImg","hanldeWritingEnd","_component_IconErase","_component_IconClear","WritingBoard","inTiming","isCountdown","minute","inputEditable","reset","toggleCountdown","changeTime","isNumber","maxlength","changeViewMode","useExecPlay","useSlideSize","useFullscreen","rightToolsVisible","writingBoardToolVisible","timerlVisible","slideThumbnailModelVisible","laserPen","_component_IconLeftTwo","_component_IconRightTwo","_component_IconMagic","_component_IconStopwatchStart","_component_IconListView","_component_IconOffScreenOne","_component_IconFullScreenOne","_component_IconPower","ScreenSlideList","SlideThumbnails","WritingBoardTool","CountdownTimer","slideListWrapRef","thumbnailsRef","remarkFontSize","currentSlideRemark","handleMousewheelThumbnails","scrollBy","setRemarkFontSize","activeThumbnailRef","offsetLeft","scrollTo","behavior","viewMode","BaseView","PresenterView","_resizeHandlers","delayOnTouchOnly","delay","insertTextElement","insertShapeElement","square","handleInputMark","_component_IconCopy","_component_IconDelete","_component_IconSquare","_component_IconRound","MobileThumbnails","updateFontColor","changeMode","_component_IconLogout","contentWidth","contentheight","contentRatio","Header","MobileOperate","MobileEditableElement","SlideToolbar","ElementToolbar","toolVisible","playerSize","slideSize","playerRatio","mobileRef","screenWidth","_component_IconFullScreenPlay","_mode","currentComponent","componentMap","MobileEditor","MobilePlayer","MobilePreview","_isPC","onbeforeunload","discardedDB","discardedDBList","newDiscardedDB","Screen","Editor","Mobile","register","ready","console","log","registered","cached","updatefound","updated","offline","menus","handleClickMenuItem","_component_menu_content","menu","removeContextmenu","MENU_WIDTH","MENU_HEIGHT","DIVIDER_HEIGHT","PADDING","menuCount","dividerCount","menuWidth","menuHeight","screenHeight","MenuContent","CTX_CONTEXTMENU_HANDLER","contextmenuListener","binding","ContextmenuComponent","ContextmenuDirective","mounted","unmounted","CTX_CLICK_OUTSIDE_HANDLER","clickListener","composedPath","isClickOutside","ClickOutsideDirective","TOOLTIP_INSTANCE","TooltipDirective","setContent","directive","Contextmenu","ClickOutside","Tooltip","createApp","App","use","Icon","Directive","createPinia","mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","getter","__esModule","definition","o","defineProperty","enumerable","globalThis","prop","prototype","hasOwnProperty","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/service-worker.js.map b/service-worker.js.map index ade0ec32..aa793488 100644 --- a/service-worker.js.map +++ b/service-worker.js.map @@ -1 +1 @@ -{"version":3,"file":"service-worker.js","sources":["../../../../../tmp/1eed5c13f527c6c35465f14bfebb8330/service-worker.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-routing/registerRoute.mjs';\nimport {ExpirationPlugin as workbox_expiration_ExpirationPlugin} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-expiration/ExpirationPlugin.mjs';\nimport {CacheableResponsePlugin as workbox_cacheable_response_CacheableResponsePlugin} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-cacheable-response/CacheableResponsePlugin.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {setCacheNameDetails as workbox_core_setCacheNameDetails} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-core/setCacheNameDetails.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\nworkbox_core_setCacheNameDetails({prefix: \"pptist\"});\n\n\nself.skipWaiting();\n\n\n\n\n\nworkbox_routing_registerRoute(/.*/, new workbox_strategies_NetworkFirst({ \"cacheName\":\"PPTist\", plugins: [new workbox_expiration_ExpirationPlugin({ maxAgeSeconds: 36000 }), new workbox_cacheable_response_CacheableResponsePlugin({ statuses: [ 0, 200 ] })] }), 'GET');\n\n\n\n\n"],"names":["workbox_core_setCacheNameDetails","prefix","self","skipWaiting","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","cacheName","plugins","workbox_expiration_ExpirationPlugin","maxAgeSeconds","workbox_cacheable_response_CacheableResponsePlugin","statuses"],"mappings":"0nBAoBAA,EAAAA,oBAAiC,CAACC,OAAQ,WAG1CC,KAAKC,cAMLC,EAAAA,cAA8B,KAAM,IAAIC,eAAgC,CAAEC,UAAY,SAAUC,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,cAAe,OAAU,IAAIC,EAAAA,wBAAmD,CAAEC,SAAU,CAAE,EAAG,UAAc"} \ No newline at end of file +{"version":3,"file":"service-worker.js","sources":["../../../../../tmp/28d5707e41d72936b0a86fe0061dde06/service-worker.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-routing/registerRoute.mjs';\nimport {ExpirationPlugin as workbox_expiration_ExpirationPlugin} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-expiration/ExpirationPlugin.mjs';\nimport {CacheableResponsePlugin as workbox_cacheable_response_CacheableResponsePlugin} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-cacheable-response/CacheableResponsePlugin.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {setCacheNameDetails as workbox_core_setCacheNameDetails} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-core/setCacheNameDetails.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\nworkbox_core_setCacheNameDetails({prefix: \"pptist\"});\n\n\nself.skipWaiting();\n\n\n\n\n\nworkbox_routing_registerRoute(/.*/, new workbox_strategies_NetworkFirst({ \"cacheName\":\"PPTist\", plugins: [new workbox_expiration_ExpirationPlugin({ maxAgeSeconds: 36000 }), new workbox_cacheable_response_CacheableResponsePlugin({ statuses: [ 0, 200 ] })] }), 'GET');\n\n\n\n\n"],"names":["workbox_core_setCacheNameDetails","prefix","self","skipWaiting","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","cacheName","plugins","workbox_expiration_ExpirationPlugin","maxAgeSeconds","workbox_cacheable_response_CacheableResponsePlugin","statuses"],"mappings":"0nBAoBAA,EAAAA,oBAAiC,CAACC,OAAQ,WAG1CC,KAAKC,cAMLC,EAAAA,cAA8B,KAAM,IAAIC,eAAgC,CAAEC,UAAY,SAAUC,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,cAAe,OAAU,IAAIC,EAAAA,wBAAmD,CAAEC,SAAU,CAAE,EAAG,UAAc"} \ No newline at end of file