@templatical/editor 0.49.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
- package/dist/AiAltTextReview-DoBEudnE.js +206 -0
- package/dist/AiChatPanel-Bs6sES3b.js +550 -0
- package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
- package/dist/AiPanels-CfN7A-ZA.js +33 -0
- package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
- package/dist/{BlockIssueBadge-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
- package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
- package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
- package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
- package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
- package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
- package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
- package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
- package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
- package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
- package/dist/IssuesPanel-C8nMUccy.js +360 -0
- package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
- package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
- package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
- package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
- package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
- package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
- package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
- package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
- package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
- package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
- package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
- package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
- package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
- package/dist/TemplateSettings-BVBWpiDU.js +237 -0
- package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
- package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
- package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
- package/dist/ToggleSwitch-D51U9cmR.js +37 -0
- package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
- package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
- package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
- package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
- package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
- package/dist/WrapperBlock-BO619LAb.js +45 -0
- package/dist/aiErrors-D5UOoYOt.js +41 -0
- package/dist/aiImageContext-BH4Ss1h3.js +48 -0
- package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
- package/dist/{blockTypeIcons-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
- package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
- package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
- package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
- package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
- package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
- package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
- package/dist/{MediaEditModal-C_wxoUMG.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
- package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
- package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
- package/dist/cdn/chunks/{MediaPanels-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
- package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
- package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
- package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
- package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
- package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
- package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
- package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
- package/dist/{de-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
- package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
- package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
- package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
- package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
- package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
- package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
- package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
- package/dist/{en-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
- package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
- package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
- package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
- package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
- package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
- package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
- package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
- package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
- package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
- package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
- package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
- package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
- package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
- package/dist/{nl-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
- package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
- package/dist/{pt-BR-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
- package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
- package/dist/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
- package/dist/cdn/chunks/{src-B77z1iw4.js → src-K6fw_35b.js} +113 -113
- package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-K6fw_35b.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2151 -1480
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
- package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
- package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
- package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
- package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
- package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
- package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
- package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
- package/dist/de-DBOTcDj2.js +20 -0
- package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
- package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
- package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
- package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
- package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
- package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
- package/dist/en-CDhWRrF_.js +20 -0
- package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
- package/dist/en-DwV15ltA.js +1 -0
- package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
- package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
- package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
- package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
- package/dist/image-DesWjcZ4.js +28 -0
- package/dist/index.d.ts +361 -24
- package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
- package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
- package/dist/keys-Zd9KWRD1.js +10 -0
- package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
- package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
- package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
- package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
- package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
- package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
- package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
- package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
- package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
- package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
- package/dist/pt-BR-CHM-ZKvE.js +20 -0
- package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
- package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
- package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
- package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
- package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
- package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
- package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
- package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
- package/dist/square-BWlolnXe.js +15 -0
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +2114 -1422
- package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
- package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
- package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
- package/dist/upload-BJfvdIrD.js +36 -0
- package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
- package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
- package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
- package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
- package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
- package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
- package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
- package/dist/useScrollToBlock-FmNMALM_.js +74 -0
- package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
- package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
- package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
- package/package.json +14 -12
- package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
- package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
- package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
- package/dist/CommentsSidebar-J65znlrH.js +0 -500
- package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
- package/dist/IssuesPanel-DeeVsfG7.js +0 -117
- package/dist/ParagraphEditor-zLV44z-R.js +0 -797
- package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
- package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
- package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
- package/dist/ToggleSwitch-DHweVJOr.js +0 -102
- package/dist/WrapperBlock-DiiaxpMb.js +0 -45
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
- package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
- package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
- package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
- package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
- package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
- package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
- package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
- package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
- package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
- package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
- package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
- package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
- package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
- package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
- package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
- package/dist/copy-CUC43md_.js +0 -19
- package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
- package/dist/de-D_atmUVB.js +0 -87
- package/dist/dist-CCqn-RqE.js +0 -407
- package/dist/en-BHCMzqib.js +0 -1
- package/dist/en-DhJLnaBx.js +0 -87
- package/dist/image-up-BqiO7KCO.js +0 -27
- package/dist/keys-BymCnLHD.js +0 -10
- package/dist/plus-BDd0gTEm.js +0 -14
- package/dist/pt-BR-BphMoUTw.js +0 -87
- package/dist/shield-check-YhsbXfQc.js +0 -14
- package/dist/socialIcons-Bwv-49EB.js +0 -2167
- package/dist/timeouts-o5Y9BuqI.js +0 -4
- package/dist/upload-uU2cK0Ce.js +0 -21
- package/dist/useAliveFlag-BjP0Gxza.js +0 -10
- package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as ce, n as le, o as ue, r as de, t as fe } from "./editor-modal--7_9A6j-.js";
|
|
1
|
+
import { $ as e, C as t, D as n, I as r, L as i, P as a, R as o, U as s, V as c, W as l, _ as u, b as d, dt as f, f as p, g as m, h, k as g, l as _, lt as v, m as y, n as ee, o as te, ot as b, p as ne, s as x, u as re, ut as ie, x as S, z as ae } from "./draggable-DZ0gwUJ6.js";
|
|
2
|
+
import { t as oe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
+
import { a as se, n as ce, o as le, r as ue, t as de } from "./editor-modal-CI6EfeMd.js";
|
|
5
4
|
//#region ../media-library/src/composables/useImageCrop.ts
|
|
6
|
-
var
|
|
5
|
+
var fe = {
|
|
7
6
|
free: void 0,
|
|
8
7
|
square: 1,
|
|
9
8
|
landscape43: 4 / 3,
|
|
10
9
|
landscape169: 16 / 9,
|
|
11
10
|
original: void 0
|
|
12
11
|
};
|
|
13
|
-
function
|
|
12
|
+
function pe(e) {
|
|
14
13
|
return e === "image/png" || e === "image/gif" ? {
|
|
15
14
|
mimeType: "image/png",
|
|
16
15
|
quality: 1
|
|
@@ -22,7 +21,7 @@ function me(e) {
|
|
|
22
21
|
quality: .92
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
|
-
function
|
|
24
|
+
function me(e, t, n) {
|
|
26
25
|
let r = e.width, i = e.height;
|
|
27
26
|
if (!t && !n) return e;
|
|
28
27
|
let a = r, o = i;
|
|
@@ -36,7 +35,7 @@ function he(e, t, n) {
|
|
|
36
35
|
let c = s.getContext("2d");
|
|
37
36
|
return c && (c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(e, 0, 0, a, o)), s;
|
|
38
37
|
}
|
|
39
|
-
function
|
|
38
|
+
function he(e, t, n) {
|
|
40
39
|
return new Promise((r, i) => {
|
|
41
40
|
e.toBlob((e) => {
|
|
42
41
|
if (!e) {
|
|
@@ -48,7 +47,7 @@ function ge(e, t, n) {
|
|
|
48
47
|
}, n.mimeType, n.quality);
|
|
49
48
|
});
|
|
50
49
|
}
|
|
51
|
-
function
|
|
50
|
+
function ge(e, t, n, r) {
|
|
52
51
|
let i = e, a = t;
|
|
53
52
|
if (n && i > n) {
|
|
54
53
|
let e = n / i;
|
|
@@ -65,7 +64,7 @@ function _e(e, t, n, r) {
|
|
|
65
64
|
}
|
|
66
65
|
//#endregion
|
|
67
66
|
//#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.44_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
|
|
68
|
-
function
|
|
67
|
+
function _e(e, t) {
|
|
69
68
|
var n = Object.keys(e);
|
|
70
69
|
if (Object.getOwnPropertySymbols) {
|
|
71
70
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -75,18 +74,18 @@ function ve(e, t) {
|
|
|
75
74
|
}
|
|
76
75
|
return n;
|
|
77
76
|
}
|
|
78
|
-
function
|
|
77
|
+
function C(e) {
|
|
79
78
|
for (var t = 1; t < arguments.length; t++) {
|
|
80
79
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
81
|
-
t % 2 ?
|
|
82
|
-
|
|
83
|
-
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
80
|
+
t % 2 ? _e(Object(n), !0).forEach((function(t) {
|
|
81
|
+
w(e, t, n[t]);
|
|
82
|
+
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _e(Object(n)).forEach((function(t) {
|
|
84
83
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
85
84
|
}));
|
|
86
85
|
}
|
|
87
86
|
return e;
|
|
88
87
|
}
|
|
89
|
-
function
|
|
88
|
+
function w(e, t, n) {
|
|
90
89
|
return t in e ? Object.defineProperty(e, t, {
|
|
91
90
|
value: n,
|
|
92
91
|
enumerable: !0,
|
|
@@ -94,7 +93,7 @@ function C(e, t, n) {
|
|
|
94
93
|
writable: !0
|
|
95
94
|
}) : e[t] = n, e;
|
|
96
95
|
}
|
|
97
|
-
function
|
|
96
|
+
function ve(e, t) {
|
|
98
97
|
if (e == null) return {};
|
|
99
98
|
var n, r, i = function(e, t) {
|
|
100
99
|
if (e == null) return {};
|
|
@@ -108,28 +107,28 @@ function ye(e, t) {
|
|
|
108
107
|
}
|
|
109
108
|
return i;
|
|
110
109
|
}
|
|
111
|
-
function
|
|
110
|
+
function T(e) {
|
|
112
111
|
return function(e) {
|
|
113
|
-
if (Array.isArray(e)) return
|
|
112
|
+
if (Array.isArray(e)) return E(e);
|
|
114
113
|
}(e) || function(e) {
|
|
115
114
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
116
115
|
}(e) || function(e, t) {
|
|
117
116
|
if (e) {
|
|
118
|
-
if (typeof e == "string") return
|
|
117
|
+
if (typeof e == "string") return E(e, t);
|
|
119
118
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
120
119
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
121
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
120
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return E(e, t);
|
|
122
121
|
}
|
|
123
122
|
}(e) || function() {
|
|
124
123
|
throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
125
124
|
}();
|
|
126
125
|
}
|
|
127
|
-
function
|
|
126
|
+
function E(e, t) {
|
|
128
127
|
(t == null || t > e.length) && (t = e.length);
|
|
129
128
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
130
129
|
return r;
|
|
131
130
|
}
|
|
132
|
-
var
|
|
131
|
+
var D = function(e) {
|
|
133
132
|
(function() {
|
|
134
133
|
var t = {}.hasOwnProperty;
|
|
135
134
|
function n() {
|
|
@@ -153,15 +152,15 @@ var E = function(e) {
|
|
|
153
152
|
}
|
|
154
153
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
155
154
|
})();
|
|
156
|
-
},
|
|
157
|
-
path:
|
|
155
|
+
}, O, k, A = (D(k = {
|
|
156
|
+
path: O,
|
|
158
157
|
exports: {},
|
|
159
158
|
require: function(e, t) {
|
|
160
159
|
return function() {
|
|
161
160
|
throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
162
|
-
}(t == null &&
|
|
161
|
+
}(t == null && k.path);
|
|
163
162
|
}
|
|
164
|
-
},
|
|
163
|
+
}, k.exports), k.exports), j = function(e) {
|
|
165
164
|
return function(t, n) {
|
|
166
165
|
if (!t) return e;
|
|
167
166
|
var r;
|
|
@@ -173,7 +172,7 @@ var E = function(e) {
|
|
|
173
172
|
}), "") : "");
|
|
174
173
|
};
|
|
175
174
|
};
|
|
176
|
-
function
|
|
175
|
+
function M(e, t, n) {
|
|
177
176
|
var r, i, a, o, s;
|
|
178
177
|
function c() {
|
|
179
178
|
var l = Date.now() - o;
|
|
@@ -191,65 +190,65 @@ function j(e, t, n) {
|
|
|
191
190
|
r &&= (s = e.apply(a, i), a = i = null, clearTimeout(r), null);
|
|
192
191
|
}, l;
|
|
193
192
|
}
|
|
194
|
-
|
|
195
|
-
var
|
|
196
|
-
return
|
|
193
|
+
M.debounce = M;
|
|
194
|
+
var ye = M, N = function() {
|
|
195
|
+
return N = Object.assign || function(e) {
|
|
197
196
|
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
198
197
|
return e;
|
|
199
|
-
},
|
|
198
|
+
}, N.apply(this, arguments);
|
|
200
199
|
};
|
|
201
|
-
function
|
|
200
|
+
function P(e, t) {
|
|
202
201
|
var n, r;
|
|
203
202
|
return e && t ? (n = "" + e + t[0].toUpperCase() + t.slice(1), r = e + "-" + t) : (n = e || t, r = e || t), {
|
|
204
203
|
name: n,
|
|
205
204
|
classname: r
|
|
206
205
|
};
|
|
207
206
|
}
|
|
208
|
-
function
|
|
207
|
+
function F(e) {
|
|
209
208
|
return /^blob:/.test(e);
|
|
210
209
|
}
|
|
211
|
-
function
|
|
212
|
-
return
|
|
210
|
+
function I(e) {
|
|
211
|
+
return F(e) || function(e) {
|
|
213
212
|
return /^data:/.test(e);
|
|
214
213
|
}(e);
|
|
215
214
|
}
|
|
216
|
-
function
|
|
215
|
+
function L(e) {
|
|
217
216
|
return !!(e && e.constructor && e.call && e.apply);
|
|
218
217
|
}
|
|
219
|
-
function
|
|
218
|
+
function R(e) {
|
|
220
219
|
return e === void 0;
|
|
221
220
|
}
|
|
222
|
-
function
|
|
221
|
+
function be(e) {
|
|
223
222
|
return typeof e == "object" && !!e;
|
|
224
223
|
}
|
|
225
|
-
function
|
|
224
|
+
function xe(e, t, n) {
|
|
226
225
|
var r = {};
|
|
227
|
-
return
|
|
228
|
-
r[i] =
|
|
226
|
+
return be(e) ? (Object.keys(t).forEach((function(i) {
|
|
227
|
+
r[i] = R(e[i]) ? t[i] : be(t[i]) ? be(e[i]) ? xe(e[i], t[i], n[i]) : e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? !!e[i] : e[i];
|
|
229
228
|
})), r) : e ? t : n;
|
|
230
229
|
}
|
|
231
|
-
function
|
|
230
|
+
function z(e) {
|
|
232
231
|
var t = Number(e);
|
|
233
232
|
return Number.isNaN(t) ? e : t;
|
|
234
233
|
}
|
|
235
|
-
function
|
|
234
|
+
function Se(e) {
|
|
236
235
|
return typeof (e == "number" || function(e) {
|
|
237
236
|
return typeof e == "object" && !!e;
|
|
238
|
-
}(e) && toString.call(e) == "[object Number]") && !
|
|
237
|
+
}(e) && toString.call(e) == "[object Number]") && !Ce(e);
|
|
239
238
|
}
|
|
240
|
-
function
|
|
239
|
+
function Ce(e) {
|
|
241
240
|
return e != e;
|
|
242
241
|
}
|
|
243
|
-
function
|
|
242
|
+
function we(e, t) {
|
|
244
243
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
245
244
|
}
|
|
246
|
-
var
|
|
245
|
+
var B = function(e, t) {
|
|
247
246
|
e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
|
|
248
|
-
},
|
|
247
|
+
}, Te = function(e, t) {
|
|
249
248
|
t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
|
|
250
|
-
},
|
|
249
|
+
}, Ee = function(e) {
|
|
251
250
|
this.type = "move", this.directions = e;
|
|
252
|
-
},
|
|
251
|
+
}, De = function() {
|
|
253
252
|
function e(e, t, n, r, i) {
|
|
254
253
|
this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = r, this.element = t, this.anchor = i;
|
|
255
254
|
}
|
|
@@ -267,7 +266,7 @@ var z = function(e, t) {
|
|
|
267
266
|
top: 0
|
|
268
267
|
};
|
|
269
268
|
}, e;
|
|
270
|
-
}(),
|
|
269
|
+
}(), Oe = {
|
|
271
270
|
name: "DraggableElement",
|
|
272
271
|
props: { classname: { type: String } },
|
|
273
272
|
beforeMount: function() {
|
|
@@ -288,7 +287,7 @@ var z = function(e, t) {
|
|
|
288
287
|
this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
|
|
289
288
|
},
|
|
290
289
|
onTouchStart: function(e) {
|
|
291
|
-
e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches =
|
|
290
|
+
e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = T(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
|
|
292
291
|
return {
|
|
293
292
|
clientX: t.clientX + n.clientX / e.touches.length,
|
|
294
293
|
clientY: t.clientY + n.clientY / e.touches.length
|
|
@@ -334,11 +333,11 @@ var z = function(e, t) {
|
|
|
334
333
|
};
|
|
335
334
|
},
|
|
336
335
|
processMove: function(e, t) {
|
|
337
|
-
var n =
|
|
336
|
+
var n = T(t);
|
|
338
337
|
if (this.touches.length) {
|
|
339
338
|
if (this.touches.length === 1 && n.length === 1) {
|
|
340
339
|
var r = this.$refs.draggable;
|
|
341
|
-
this.$emit("drag", new
|
|
340
|
+
this.$emit("drag", new De(e, r, {
|
|
342
341
|
left: n[0].clientX,
|
|
343
342
|
top: n[0].clientY
|
|
344
343
|
}, {
|
|
@@ -360,27 +359,27 @@ var z = function(e, t) {
|
|
|
360
359
|
"enter"
|
|
361
360
|
]
|
|
362
361
|
};
|
|
363
|
-
|
|
364
|
-
return
|
|
362
|
+
Oe.render = function(e, t, n, r, o, s) {
|
|
363
|
+
return a(), h("div", {
|
|
365
364
|
ref: "draggable",
|
|
366
|
-
class:
|
|
367
|
-
onTouchstart:
|
|
365
|
+
class: n.classname,
|
|
366
|
+
onTouchstart: t[1] ||= function() {
|
|
368
367
|
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
369
368
|
},
|
|
370
|
-
onMousedown:
|
|
369
|
+
onMousedown: t[2] ||= function() {
|
|
371
370
|
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
372
371
|
},
|
|
373
|
-
onMouseover:
|
|
372
|
+
onMouseover: t[3] ||= function() {
|
|
374
373
|
return s.onMouseOver && s.onMouseOver.apply(s, arguments);
|
|
375
374
|
},
|
|
376
|
-
onMouseleave:
|
|
375
|
+
onMouseleave: t[4] ||= function() {
|
|
377
376
|
return s.onMouseLeave && s.onMouseLeave.apply(s, arguments);
|
|
378
377
|
}
|
|
379
|
-
}, [
|
|
378
|
+
}, [i(e.$slots, "default")], 34);
|
|
380
379
|
};
|
|
381
|
-
var
|
|
380
|
+
var ke = j("vue-handler-wrapper"), Ae = {
|
|
382
381
|
name: "HandlerWrapper",
|
|
383
|
-
components: { DraggableElement:
|
|
382
|
+
components: { DraggableElement: Oe },
|
|
384
383
|
props: {
|
|
385
384
|
horizontalPosition: { type: String },
|
|
386
385
|
verticalPosition: { type: String },
|
|
@@ -392,12 +391,12 @@ var Ae = A("vue-handler-wrapper"), je = {
|
|
|
392
391
|
computed: { classes: function() {
|
|
393
392
|
var e;
|
|
394
393
|
if (this.horizontalPosition || this.verticalPosition) {
|
|
395
|
-
var t, n =
|
|
396
|
-
e =
|
|
397
|
-
} else e =
|
|
394
|
+
var t, n = P(this.horizontalPosition, this.verticalPosition);
|
|
395
|
+
e = ke((w(t = {}, n.classname, !0), w(t, "disabled", this.disabled), t));
|
|
396
|
+
} else e = ke({ disabled: this.disabled });
|
|
398
397
|
return {
|
|
399
398
|
root: e,
|
|
400
|
-
draggable:
|
|
399
|
+
draggable: ke("draggable")
|
|
401
400
|
};
|
|
402
401
|
} },
|
|
403
402
|
emits: [
|
|
@@ -407,32 +406,32 @@ var Ae = A("vue-handler-wrapper"), je = {
|
|
|
407
406
|
"drag-end"
|
|
408
407
|
]
|
|
409
408
|
};
|
|
410
|
-
|
|
409
|
+
Ae.render = function(e, t, n, r, c, l) {
|
|
411
410
|
var u = o("DraggableElement");
|
|
412
|
-
return
|
|
411
|
+
return a(), h("div", { class: l.classes.root }, [S(u, {
|
|
413
412
|
class: l.classes.draggable,
|
|
414
|
-
onDrag:
|
|
415
|
-
return
|
|
413
|
+
onDrag: t[1] ||= function(t) {
|
|
414
|
+
return e.$emit("drag", t);
|
|
416
415
|
},
|
|
417
|
-
onDragEnd:
|
|
418
|
-
return
|
|
416
|
+
onDragEnd: t[2] ||= function(t) {
|
|
417
|
+
return e.$emit("drag-end");
|
|
419
418
|
},
|
|
420
|
-
onLeave:
|
|
421
|
-
return
|
|
419
|
+
onLeave: t[3] ||= function(t) {
|
|
420
|
+
return e.$emit("leave");
|
|
422
421
|
},
|
|
423
|
-
onEnter:
|
|
424
|
-
return
|
|
422
|
+
onEnter: t[4] ||= function(t) {
|
|
423
|
+
return e.$emit("enter");
|
|
425
424
|
}
|
|
426
425
|
}, {
|
|
427
|
-
default:
|
|
428
|
-
return [
|
|
426
|
+
default: s((function() {
|
|
427
|
+
return [i(e.$slots, "default")];
|
|
429
428
|
})),
|
|
430
429
|
_: 3
|
|
431
430
|
}, 8, ["class"])], 2);
|
|
432
431
|
};
|
|
433
|
-
var
|
|
432
|
+
var je = j("vue-line-wrapper"), Me = {
|
|
434
433
|
name: "LineWrapper",
|
|
435
|
-
components: { DraggableElement:
|
|
434
|
+
components: { DraggableElement: Oe },
|
|
436
435
|
props: {
|
|
437
436
|
position: {
|
|
438
437
|
type: String,
|
|
@@ -445,7 +444,7 @@ var Me = A("vue-line-wrapper"), Ne = {
|
|
|
445
444
|
},
|
|
446
445
|
computed: { classname: function() {
|
|
447
446
|
var e;
|
|
448
|
-
return
|
|
447
|
+
return je((w(e = {}, this.position, !0), w(e, "disabled", this.disabled), e));
|
|
449
448
|
} },
|
|
450
449
|
emits: [
|
|
451
450
|
"leave",
|
|
@@ -454,46 +453,46 @@ var Me = A("vue-line-wrapper"), Ne = {
|
|
|
454
453
|
"drag-end"
|
|
455
454
|
]
|
|
456
455
|
};
|
|
457
|
-
|
|
456
|
+
Me.render = function(e, t, n, r, c, l) {
|
|
458
457
|
var u = o("DraggableElement");
|
|
459
|
-
return
|
|
458
|
+
return a(), h(u, {
|
|
460
459
|
class: l.classname,
|
|
461
|
-
onDrag:
|
|
462
|
-
return
|
|
460
|
+
onDrag: t[1] ||= function(t) {
|
|
461
|
+
return e.$emit("drag", t);
|
|
463
462
|
},
|
|
464
|
-
onDragEnd:
|
|
465
|
-
return
|
|
463
|
+
onDragEnd: t[2] ||= function(t) {
|
|
464
|
+
return e.$emit("drag-end");
|
|
466
465
|
},
|
|
467
|
-
onLeave:
|
|
468
|
-
return
|
|
466
|
+
onLeave: t[3] ||= function(t) {
|
|
467
|
+
return e.$emit("leave");
|
|
469
468
|
},
|
|
470
|
-
onEnter:
|
|
471
|
-
return
|
|
469
|
+
onEnter: t[4] ||= function(t) {
|
|
470
|
+
return e.$emit("enter");
|
|
472
471
|
}
|
|
473
472
|
}, {
|
|
474
|
-
default:
|
|
475
|
-
return [
|
|
473
|
+
default: s((function() {
|
|
474
|
+
return [i(e.$slots, "default")];
|
|
476
475
|
})),
|
|
477
476
|
_: 3
|
|
478
477
|
}, 8, ["class"]);
|
|
479
478
|
};
|
|
480
|
-
var
|
|
479
|
+
var V = [
|
|
481
480
|
"left",
|
|
482
481
|
"right",
|
|
483
482
|
"top",
|
|
484
483
|
"bottom"
|
|
485
|
-
],
|
|
484
|
+
], Ne = ["left", "right"], Pe = ["top", "bottom"], Fe = ["left", "top"], Ie = [
|
|
486
485
|
"fill-area",
|
|
487
486
|
"fit-area",
|
|
488
487
|
"stencil",
|
|
489
488
|
"none"
|
|
490
|
-
],
|
|
489
|
+
], Le = {
|
|
491
490
|
left: 0,
|
|
492
491
|
top: 0,
|
|
493
492
|
width: 0,
|
|
494
493
|
height: 0
|
|
495
494
|
};
|
|
496
|
-
function
|
|
495
|
+
function Re(e, t, n) {
|
|
497
496
|
return !(n ||= [
|
|
498
497
|
"width",
|
|
499
498
|
"height",
|
|
@@ -503,7 +502,7 @@ function ze(e, t, n) {
|
|
|
503
502
|
return e[n] !== t[n];
|
|
504
503
|
}));
|
|
505
504
|
}
|
|
506
|
-
function
|
|
505
|
+
function H(e) {
|
|
507
506
|
return {
|
|
508
507
|
left: e.left,
|
|
509
508
|
top: e.top,
|
|
@@ -511,31 +510,31 @@ function V(e) {
|
|
|
511
510
|
bottom: e.top + e.height
|
|
512
511
|
};
|
|
513
512
|
}
|
|
514
|
-
function
|
|
513
|
+
function U(e, t) {
|
|
515
514
|
return {
|
|
516
515
|
left: e.left - t.left,
|
|
517
516
|
top: e.top - t.top
|
|
518
517
|
};
|
|
519
518
|
}
|
|
520
|
-
function
|
|
519
|
+
function W(e) {
|
|
521
520
|
return {
|
|
522
521
|
left: e.left + e.width / 2,
|
|
523
522
|
top: e.top + e.height / 2
|
|
524
523
|
};
|
|
525
524
|
}
|
|
526
|
-
function
|
|
525
|
+
function ze(e, t) {
|
|
527
526
|
var n = {
|
|
528
527
|
left: 0,
|
|
529
528
|
top: 0,
|
|
530
529
|
right: 0,
|
|
531
530
|
bottom: 0
|
|
532
531
|
};
|
|
533
|
-
return
|
|
534
|
-
var i = t[r], a =
|
|
532
|
+
return V.forEach((function(r) {
|
|
533
|
+
var i = t[r], a = H(e)[r];
|
|
535
534
|
n[r] = i !== void 0 && a !== void 0 ? r === "left" || r === "top" ? Math.max(0, i - a) : Math.max(0, a - i) : 0;
|
|
536
535
|
})), n;
|
|
537
536
|
}
|
|
538
|
-
function
|
|
537
|
+
function G(e, t) {
|
|
539
538
|
return {
|
|
540
539
|
left: e.left - t.left,
|
|
541
540
|
top: e.top - t.top,
|
|
@@ -543,22 +542,22 @@ function W(e, t) {
|
|
|
543
542
|
height: e.height + t.top + t.bottom
|
|
544
543
|
};
|
|
545
544
|
}
|
|
546
|
-
function
|
|
545
|
+
function Be(e) {
|
|
547
546
|
return {
|
|
548
547
|
left: -e.left,
|
|
549
548
|
top: -e.top
|
|
550
549
|
};
|
|
551
550
|
}
|
|
552
|
-
function
|
|
553
|
-
return
|
|
551
|
+
function K(e, t) {
|
|
552
|
+
return N(N({}, e), {
|
|
554
553
|
left: e.left + t.left,
|
|
555
554
|
top: e.top + t.top
|
|
556
555
|
});
|
|
557
556
|
}
|
|
558
|
-
function
|
|
557
|
+
function q(e, t, n, r) {
|
|
559
558
|
if (t !== 1) {
|
|
560
559
|
if (n) {
|
|
561
|
-
var i =
|
|
560
|
+
var i = W(e);
|
|
562
561
|
return {
|
|
563
562
|
width: e.width * t,
|
|
564
563
|
height: e.height * t,
|
|
@@ -575,17 +574,17 @@ function K(e, t, n, r) {
|
|
|
575
574
|
}
|
|
576
575
|
return e;
|
|
577
576
|
}
|
|
578
|
-
function
|
|
577
|
+
function J(e) {
|
|
579
578
|
return e.width / e.height;
|
|
580
579
|
}
|
|
581
|
-
function
|
|
580
|
+
function Ve(e, t) {
|
|
582
581
|
return Math.min(t.right !== void 0 && t.left !== void 0 ? (t.right - t.left) / e.width : 1 / 0, t.bottom !== void 0 && t.top !== void 0 ? (t.bottom - t.top) / e.height : 1 / 0);
|
|
583
582
|
}
|
|
584
583
|
function Y(e, t) {
|
|
585
584
|
var n = {
|
|
586
585
|
left: 0,
|
|
587
586
|
top: 0
|
|
588
|
-
}, r =
|
|
587
|
+
}, r = ze(e, t);
|
|
589
588
|
return r.left && r.left > 0 ? n.left = r.left : r.right && r.right > 0 && (n.left = -r.right), r.top && r.top > 0 ? n.top = r.top : r.bottom && r.bottom > 0 && (n.top = -r.bottom), n;
|
|
590
589
|
}
|
|
591
590
|
function He(e, t) {
|
|
@@ -593,7 +592,7 @@ function He(e, t) {
|
|
|
593
592
|
return t.minimum && e < t.minimum ? n = t.minimum : t.maximum && e > t.maximum && (n = t.maximum), n;
|
|
594
593
|
}
|
|
595
594
|
function Ue(e, t) {
|
|
596
|
-
var n =
|
|
595
|
+
var n = J(e), r = J(t);
|
|
597
596
|
return t.width < 1 / 0 && t.height < 1 / 0 ? n > r ? {
|
|
598
597
|
width: t.width,
|
|
599
598
|
height: t.width / n
|
|
@@ -623,13 +622,13 @@ function X(e, t) {
|
|
|
623
622
|
};
|
|
624
623
|
}
|
|
625
624
|
function Ge(e, t) {
|
|
626
|
-
var n =
|
|
627
|
-
return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width,
|
|
625
|
+
var n = ze(Z(e, t), t);
|
|
626
|
+
return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, Ve(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, Ve(e, t)) : 1;
|
|
628
627
|
}
|
|
629
628
|
function Z(e, t, n) {
|
|
630
629
|
n === void 0 && (n = !1);
|
|
631
630
|
var r = Y(e, t);
|
|
632
|
-
return
|
|
631
|
+
return K(e, n ? Be(r) : r);
|
|
633
632
|
}
|
|
634
633
|
function Ke(e) {
|
|
635
634
|
return {
|
|
@@ -638,7 +637,7 @@ function Ke(e) {
|
|
|
638
637
|
};
|
|
639
638
|
}
|
|
640
639
|
function qe(e, t) {
|
|
641
|
-
return
|
|
640
|
+
return N(N({}, e), {
|
|
642
641
|
minWidth: Math.min(t.width, e.minWidth),
|
|
643
642
|
minHeight: Math.min(t.height, e.minHeight),
|
|
644
643
|
maxWidth: Math.min(t.width, e.maxWidth),
|
|
@@ -648,7 +647,7 @@ function qe(e, t) {
|
|
|
648
647
|
function Je(e, t, n) {
|
|
649
648
|
n === void 0 && (n = !0);
|
|
650
649
|
var r = {};
|
|
651
|
-
return
|
|
650
|
+
return V.forEach((function(i) {
|
|
652
651
|
var a = e[i], o = t[i];
|
|
653
652
|
a !== void 0 && o !== void 0 ? r[i] = i === "left" || i === "top" ? n ? Math.max(a, o) : Math.min(a, o) : n ? Math.min(a, o) : Math.max(a, o) : o === void 0 ? a !== void 0 && (r[i] = a) : r[i] = o;
|
|
654
653
|
})), r;
|
|
@@ -658,7 +657,7 @@ function Ye(e, t) {
|
|
|
658
657
|
}
|
|
659
658
|
function Xe(e) {
|
|
660
659
|
var t = e.size, n = e.aspectRatio, r = e.ignoreMinimum, i = e.sizeRestrictions;
|
|
661
|
-
return !!((t.correctRatio ||
|
|
660
|
+
return !!((t.correctRatio || J(t) >= n.minimum && J(t) <= n.maximum) && t.height <= i.maxHeight && t.width <= i.maxWidth && t.width && t.height && (r || t.height >= i.minHeight && t.width >= i.minWidth));
|
|
662
661
|
}
|
|
663
662
|
function Ze(e, t) {
|
|
664
663
|
return (e.width - t.width) ** 2 + (e.height - t.height) ** 2;
|
|
@@ -710,28 +709,28 @@ function Q(e) {
|
|
|
710
709
|
};
|
|
711
710
|
}
|
|
712
711
|
function Qe(e) {
|
|
713
|
-
var t = e.event, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a =
|
|
714
|
-
return
|
|
712
|
+
var t = e.event, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = K(n, t.directions);
|
|
713
|
+
return K(a, Y(a, i));
|
|
715
714
|
}
|
|
716
715
|
function $e(e) {
|
|
717
716
|
var t = e.coordinates, n = e.transform, r = e.imageSize, i = e.sizeRestrictions, a = e.positionRestrictions, o = e.aspectRatio, s = e.visibleArea, c = function(e, t) {
|
|
718
717
|
return Qe({
|
|
719
718
|
coordinates: e,
|
|
720
719
|
positionRestrictions: a,
|
|
721
|
-
event: new
|
|
720
|
+
event: new Ee({
|
|
722
721
|
left: t.left - e.left,
|
|
723
722
|
top: t.top - e.top
|
|
724
723
|
})
|
|
725
724
|
});
|
|
726
|
-
}, l =
|
|
725
|
+
}, l = N({}, t);
|
|
727
726
|
return (Array.isArray(n) ? n : [n]).forEach((function(e) {
|
|
728
727
|
var t = {};
|
|
729
|
-
|
|
728
|
+
R((t = typeof e == "function" ? e({
|
|
730
729
|
coordinates: l,
|
|
731
730
|
imageSize: r,
|
|
732
731
|
visibleArea: s
|
|
733
|
-
}) : e).width) &&
|
|
734
|
-
return c(
|
|
732
|
+
}) : e).width) && R(t.height) || (l = function(e, t) {
|
|
733
|
+
return c(N(N(N({}, e), Q({
|
|
735
734
|
width: t.width,
|
|
736
735
|
height: t.height,
|
|
737
736
|
sizeRestrictions: i,
|
|
@@ -743,57 +742,48 @@ function $e(e) {
|
|
|
743
742
|
left: e.left,
|
|
744
743
|
top: e.top
|
|
745
744
|
});
|
|
746
|
-
}(l,
|
|
745
|
+
}(l, N(N({}, l), t))), R(t.left) && R(t.top) || (l = c(l, N(N({}, l), t)));
|
|
747
746
|
})), l;
|
|
748
747
|
}
|
|
749
748
|
function et(e) {
|
|
750
|
-
e.
|
|
751
|
-
|
|
752
|
-
e.aspectRatio;
|
|
753
|
-
var a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions;
|
|
754
|
-
e.stencilReference;
|
|
755
|
-
var c, l, u, d = M({}, r), f = M({}, i), p = M({}, a);
|
|
756
|
-
c = q(p), l = q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = M(M({}, d), Q({
|
|
749
|
+
var t = e.getAreaRestrictions, n = e.boundaries, r = e.coordinates, i = e.visibleArea, a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions, c, l, u, d = N({}, r), f = N({}, i), p = N({}, a);
|
|
750
|
+
c = J(p), l = J(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = N(N({}, d), Q({
|
|
757
751
|
sizeRestrictions: o,
|
|
758
752
|
width: d.width,
|
|
759
753
|
height: d.height,
|
|
760
754
|
aspectRatio: {
|
|
761
|
-
minimum:
|
|
762
|
-
maximum:
|
|
755
|
+
minimum: J(p),
|
|
756
|
+
maximum: J(p)
|
|
763
757
|
}
|
|
764
758
|
})));
|
|
765
|
-
var m = Ge(f =
|
|
759
|
+
var m = Ge(f = q(f, d.width * n.width / (f.width * p.width)), t({
|
|
766
760
|
visibleArea: f,
|
|
767
761
|
type: "resize"
|
|
768
762
|
}));
|
|
769
|
-
return m !== 1 && (f =
|
|
763
|
+
return m !== 1 && (f = q(f, m), d = q(d, m)), f = Z(f = K(f, U(W(d), W(f))), t({
|
|
770
764
|
visibleArea: f,
|
|
771
765
|
type: "move"
|
|
772
766
|
})), {
|
|
773
|
-
coordinates: d = Z(d, Ye(
|
|
767
|
+
coordinates: d = Z(d, Ye(H(f), s)),
|
|
774
768
|
visibleArea: f
|
|
775
769
|
};
|
|
776
770
|
}
|
|
777
771
|
function tt(e) {
|
|
778
|
-
var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea;
|
|
779
|
-
e.aspectRatio, e.stencilSize, e.sizeRestrictions;
|
|
780
|
-
var o = e.positionRestrictions;
|
|
781
|
-
e.stencilReference;
|
|
782
|
-
var s = M({}, i), c = M({}, a);
|
|
772
|
+
var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea, o = e.positionRestrictions, s = N({}, i), c = N({}, a);
|
|
783
773
|
if (i && a && t.type !== "manipulateImage") {
|
|
784
774
|
var l = {
|
|
785
775
|
width: 0,
|
|
786
776
|
height: 0
|
|
787
777
|
};
|
|
788
|
-
|
|
789
|
-
var u = Ge(c =
|
|
778
|
+
J(r) > J(s) ? (l.height = .8 * r.height, l.width = l.height * J(s)) : (l.width = .8 * r.width, l.height = l.width * J(s));
|
|
779
|
+
var u = Ge(c = q(c, s.width * r.width / (c.width * l.width)), n({
|
|
790
780
|
visibleArea: c,
|
|
791
781
|
type: "resize"
|
|
792
782
|
}));
|
|
793
|
-
c =
|
|
783
|
+
c = q(c, u), u !== 1 && (l.height /= u, l.width /= u), c = Z(c = K(c, U(W(s), W(c))), n({
|
|
794
784
|
visibleArea: c,
|
|
795
785
|
type: "move"
|
|
796
|
-
})), s = Z(s, Ye(
|
|
786
|
+
})), s = Z(s, Ye(H(c), o));
|
|
797
787
|
}
|
|
798
788
|
return {
|
|
799
789
|
coordinates: s,
|
|
@@ -801,16 +791,16 @@ function tt(e) {
|
|
|
801
791
|
};
|
|
802
792
|
}
|
|
803
793
|
function nt(e) {
|
|
804
|
-
var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a =
|
|
794
|
+
var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = N({}, r), o = N({}, n);
|
|
805
795
|
if (t.type === "setCoordinates") {
|
|
806
796
|
var s = Math.max(0, o.width - a.width), c = Math.max(0, o.height - a.height);
|
|
807
|
-
s > c ? a =
|
|
797
|
+
s > c ? a = q(a, Math.min(o.width / a.width, Ve(a, i({
|
|
808
798
|
visibleArea: a,
|
|
809
799
|
type: "resize"
|
|
810
|
-
})))) : c > s && (a =
|
|
800
|
+
})))) : c > s && (a = q(a, Math.min(o.height / a.height, Ve(a, i({
|
|
811
801
|
visibleArea: a,
|
|
812
802
|
type: "resize"
|
|
813
|
-
}))))), a = Z(a =
|
|
803
|
+
}))))), a = Z(a = K(a, Be(Y(o, H(a)))), i({
|
|
814
804
|
visibleArea: a,
|
|
815
805
|
type: "move"
|
|
816
806
|
}));
|
|
@@ -828,21 +818,21 @@ function rt(e) {
|
|
|
828
818
|
};
|
|
829
819
|
}
|
|
830
820
|
function it(e) {
|
|
831
|
-
var t = e.imageSize, n = e.visibleArea, r = e.aspectRatio, i = e.sizeRestrictions, a = n || t, o = Math.min(r.maximum || 1 / 0, Math.max(r.minimum || 0,
|
|
821
|
+
var t = e.imageSize, n = e.visibleArea, r = e.aspectRatio, i = e.sizeRestrictions, a = n || t, o = Math.min(r.maximum || 1 / 0, Math.max(r.minimum || 0, J(a))), s = a.width < a.height ? {
|
|
832
822
|
width: .8 * a.width,
|
|
833
823
|
height: .8 * a.width / o
|
|
834
824
|
} : {
|
|
835
825
|
height: .8 * a.height,
|
|
836
826
|
width: .8 * a.height * o
|
|
837
827
|
};
|
|
838
|
-
return Q(
|
|
828
|
+
return Q(N(N({}, s), {
|
|
839
829
|
aspectRatio: r,
|
|
840
830
|
sizeRestrictions: i
|
|
841
831
|
}));
|
|
842
832
|
}
|
|
843
833
|
function at(e) {
|
|
844
834
|
var t, n, r = e.imageSize, i = e.visibleArea, a = e.boundaries, o = e.aspectRatio, s = e.sizeRestrictions, c = e.stencilSize, l = i || r;
|
|
845
|
-
return
|
|
835
|
+
return J(l) > J(a) ? n = (t = c.height * l.height / a.height) * J(c) : t = (n = c.width * l.width / a.width) / J(c), Q({
|
|
846
836
|
width: n,
|
|
847
837
|
height: t,
|
|
848
838
|
aspectRatio: o,
|
|
@@ -850,26 +840,26 @@ function at(e) {
|
|
|
850
840
|
});
|
|
851
841
|
}
|
|
852
842
|
function ot(e) {
|
|
853
|
-
var t = e.getAreaRestrictions, n = e.coordinates, r = e.imageSize, i =
|
|
843
|
+
var t = e.getAreaRestrictions, n = e.coordinates, r = e.imageSize, i = J(e.boundaries);
|
|
854
844
|
if (n) {
|
|
855
845
|
var a = {
|
|
856
846
|
height: Math.max(n.height, r.height),
|
|
857
847
|
width: Math.max(n.width, r.width)
|
|
858
848
|
}, o = Ue({
|
|
859
|
-
width:
|
|
860
|
-
height:
|
|
849
|
+
width: J(a) > i ? a.width : a.height * i,
|
|
850
|
+
height: J(a) > i ? a.width / i : a.height
|
|
861
851
|
}, Ke(t())), s = {
|
|
862
852
|
left: n.left + n.width / 2 - o.width / 2,
|
|
863
853
|
top: n.top + n.height / 2 - o.height / 2,
|
|
864
854
|
width: o.width,
|
|
865
855
|
height: o.height
|
|
866
|
-
}, c =
|
|
856
|
+
}, c = ze(n, H(N({
|
|
867
857
|
left: 0,
|
|
868
858
|
top: 0
|
|
869
859
|
}, r))), l = {};
|
|
870
860
|
return !c.left && !c.right && s.width <= r.width && (l.left = 0, l.right = r.width), !c.top && !c.bottom && s.height <= r.height && (l.top = 0, l.bottom = r.height), Z(s, l);
|
|
871
861
|
}
|
|
872
|
-
var u =
|
|
862
|
+
var u = J(r);
|
|
873
863
|
return o = {
|
|
874
864
|
height: u > i ? r.height : r.width / i,
|
|
875
865
|
width: u > i ? r.height * i : r.width
|
|
@@ -881,79 +871,77 @@ function ot(e) {
|
|
|
881
871
|
};
|
|
882
872
|
}
|
|
883
873
|
function st(e, t) {
|
|
884
|
-
return Je(e,
|
|
874
|
+
return Je(e, H(t));
|
|
885
875
|
}
|
|
886
876
|
function ct(e) {
|
|
887
|
-
var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u =
|
|
888
|
-
u =
|
|
877
|
+
var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u = N({}, r), d = N({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
|
|
878
|
+
u = K(u, {
|
|
889
879
|
left: l.left || 0,
|
|
890
880
|
top: l.top || 0
|
|
891
881
|
});
|
|
892
882
|
var h = {
|
|
893
883
|
stencil: {
|
|
894
884
|
minimum: Math.max(i.minWidth ? i.minWidth / d.width : 0, i.minHeight ? i.minHeight / d.height : 0),
|
|
895
|
-
maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : 1 / 0, i.maxHeight ? i.maxHeight / d.height : 1 / 0,
|
|
885
|
+
maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : 1 / 0, i.maxHeight ? i.maxHeight / d.height : 1 / 0, Ve(d, o))
|
|
896
886
|
},
|
|
897
|
-
area: { maximum:
|
|
887
|
+
area: { maximum: Ve(u, a({
|
|
898
888
|
visibleArea: u,
|
|
899
889
|
type: "resize"
|
|
900
890
|
})) }
|
|
901
891
|
};
|
|
902
|
-
c.factor && m && (c.factor < 1 ? (p = Math.max(c.factor, h.stencil.minimum)) > 1 && (p = 1) : c.factor > 1 && (p = Math.min(c.factor, Math.min(h.area.maximum, h.stencil.maximum))) < 1 && (p = 1)), p && (u =
|
|
903
|
-
var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top,
|
|
904
|
-
return u = Z(u =
|
|
892
|
+
c.factor && m && (c.factor < 1 ? (p = Math.max(c.factor, h.stencil.minimum)) > 1 && (p = 1) : c.factor > 1 && (p = Math.min(c.factor, Math.min(h.area.maximum, h.stencil.maximum))) < 1 && (p = 1)), p && (u = q(u, p, c.center));
|
|
893
|
+
var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top, y = r.height + r.top - (n.height + n.top);
|
|
894
|
+
return u = Z(u = K(u, Y(u, {
|
|
905
895
|
left: o.left === void 0 ? void 0 : o.left - g * p,
|
|
906
896
|
top: o.top === void 0 ? void 0 : o.top - v * p,
|
|
907
|
-
bottom: o.bottom === void 0 ? void 0 : o.bottom +
|
|
897
|
+
bottom: o.bottom === void 0 ? void 0 : o.bottom + y * p,
|
|
908
898
|
right: o.right === void 0 ? void 0 : o.right + _ * p
|
|
909
899
|
})), a({
|
|
910
900
|
visibleArea: u,
|
|
911
901
|
type: "move"
|
|
912
|
-
})), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = Z(d, Ye(
|
|
902
|
+
})), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = Z(d, Ye(H(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = K(u = Z(u = q(u, f, c.factor > 1 ? c.center : W(d)), a({
|
|
913
903
|
visibleArea: u,
|
|
914
904
|
type: "move"
|
|
915
|
-
})),
|
|
905
|
+
})), Be(Y(d, H(u)))))), {
|
|
916
906
|
coordinates: d,
|
|
917
907
|
visibleArea: u
|
|
918
908
|
};
|
|
919
909
|
}
|
|
920
910
|
function lt(e) {
|
|
921
|
-
var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u =
|
|
911
|
+
var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = N({}, r), d = N({}, i), f = X(W(N({
|
|
922
912
|
left: 0,
|
|
923
913
|
top: 0
|
|
924
914
|
}, c)), l);
|
|
925
|
-
return (u =
|
|
915
|
+
return (u = N(N({}, Q({
|
|
926
916
|
sizeRestrictions: a,
|
|
927
917
|
aspectRatio: t,
|
|
928
918
|
width: u.width,
|
|
929
919
|
height: u.height
|
|
930
|
-
})), X(
|
|
920
|
+
})), X(W(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = q(d, Ge(d, n({
|
|
931
921
|
visibleArea: d,
|
|
932
922
|
type: "resize"
|
|
933
923
|
}))), {
|
|
934
924
|
coordinates: u = Z(u, o),
|
|
935
|
-
visibleArea: d = Z(d =
|
|
925
|
+
visibleArea: d = Z(d = K(d, U(W(u), W(r))), n({
|
|
936
926
|
visibleArea: d,
|
|
937
927
|
type: "move"
|
|
938
928
|
}))
|
|
939
929
|
};
|
|
940
930
|
}
|
|
941
931
|
function ut(e) {
|
|
942
|
-
var t = e.flip, n = e.previousFlip, r = e.rotate;
|
|
943
|
-
e.aspectRatio;
|
|
944
|
-
var i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = M({}, a), l = M({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
|
|
932
|
+
var t = e.flip, n = e.previousFlip, r = e.rotate, i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = N({}, a), l = N({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
|
|
945
933
|
if (u || d) {
|
|
946
934
|
var f = X({
|
|
947
935
|
left: s.width / 2,
|
|
948
936
|
top: s.height / 2
|
|
949
|
-
}, -r), p = X(
|
|
937
|
+
}, -r), p = X(W(c), -r), m = X({
|
|
950
938
|
left: u ? f.left - (p.left - f.left) : p.left,
|
|
951
939
|
top: d ? f.top - (p.top - f.top) : p.top
|
|
952
940
|
}, r);
|
|
953
|
-
c =
|
|
941
|
+
c = K(c, U(m, W(c))), p = X(W(l), -r), l = Z(l = K(l, U(m = X({
|
|
954
942
|
left: u ? f.left - (p.left - f.left) : p.left,
|
|
955
943
|
top: d ? f.top - (p.top - f.top) : p.top
|
|
956
|
-
}, r),
|
|
944
|
+
}, r), W(l))), i({
|
|
957
945
|
visibleArea: l,
|
|
958
946
|
type: "move"
|
|
959
947
|
}));
|
|
@@ -964,10 +952,10 @@ function ut(e) {
|
|
|
964
952
|
};
|
|
965
953
|
}
|
|
966
954
|
function dt(e) {
|
|
967
|
-
var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c =
|
|
955
|
+
var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c = N({}, t), l = G(n, c).width, u = G(n, c).height;
|
|
968
956
|
l < 0 && (c.left < 0 && c.right < 0 ? (c.left = -(n.width - a.minWidth) / (c.left / c.right), c.right = -(n.width - a.minWidth) / (c.right / c.left)) : c.left < 0 ? c.left = -(n.width - a.minWidth) : c.right < 0 && (c.right = -(n.width - a.minWidth))), u < 0 && (c.top < 0 && c.bottom < 0 ? (c.top = -(n.height - a.minHeight) / (c.top / c.bottom), c.bottom = -(n.height - a.minHeight) / (c.bottom / c.top)) : c.top < 0 ? c.top = -(n.height - a.minHeight) : c.bottom < 0 && (c.bottom = -(n.height - a.minHeight)));
|
|
969
|
-
var d =
|
|
970
|
-
s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d =
|
|
957
|
+
var d = ze(G(n, c), i);
|
|
958
|
+
s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = ze(G(n, c), i));
|
|
971
959
|
var f = {
|
|
972
960
|
width: 1 / 0,
|
|
973
961
|
height: 1 / 0,
|
|
@@ -976,27 +964,27 @@ function dt(e) {
|
|
|
976
964
|
top: 1 / 0,
|
|
977
965
|
bottom: 1 / 0
|
|
978
966
|
};
|
|
979
|
-
if (
|
|
967
|
+
if (V.forEach((function(e) {
|
|
980
968
|
var t = d[e];
|
|
981
969
|
t && c[e] && (f[e] = Math.max(0, 1 - t / c[e]));
|
|
982
970
|
})), o) {
|
|
983
|
-
var p = Math.min.apply(null,
|
|
971
|
+
var p = Math.min.apply(null, V.map((function(e) {
|
|
984
972
|
return f[e];
|
|
985
973
|
})));
|
|
986
|
-
p !== 1 / 0 &&
|
|
974
|
+
p !== 1 / 0 && V.forEach((function(e) {
|
|
987
975
|
c[e] *= p;
|
|
988
976
|
}));
|
|
989
|
-
} else
|
|
977
|
+
} else V.forEach((function(e) {
|
|
990
978
|
f[e] !== 1 / 0 && (c[e] *= f[e]);
|
|
991
979
|
}));
|
|
992
|
-
if (l =
|
|
980
|
+
if (l = G(n, c).width, u = G(n, c).height, c.right + c.left && (l > a.maxWidth ? f.width = (a.maxWidth - n.width) / (c.right + c.left) : l < a.minWidth && (f.width = (a.minWidth - n.width) / (c.right + c.left))), c.bottom + c.top && (u > a.maxHeight ? f.height = (a.maxHeight - n.height) / (c.bottom + c.top) : u < a.minHeight && (f.height = (a.minHeight - n.height) / (c.bottom + c.top))), o) {
|
|
993
981
|
var m = Math.min(f.width, f.height);
|
|
994
|
-
m !== 1 / 0 &&
|
|
982
|
+
m !== 1 / 0 && V.forEach((function(e) {
|
|
995
983
|
c[e] *= m;
|
|
996
984
|
}));
|
|
997
|
-
} else f.width !== 1 / 0 &&
|
|
985
|
+
} else f.width !== 1 / 0 && Ne.forEach((function(e) {
|
|
998
986
|
c[e] *= f.width;
|
|
999
|
-
})), f.height !== 1 / 0 &&
|
|
987
|
+
})), f.height !== 1 / 0 && Pe.forEach((function(e) {
|
|
1000
988
|
c[e] *= f.height;
|
|
1001
989
|
}));
|
|
1002
990
|
return c;
|
|
@@ -1004,9 +992,9 @@ function dt(e) {
|
|
|
1004
992
|
function ft(e, t, n) {
|
|
1005
993
|
return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
|
|
1006
994
|
}
|
|
1007
|
-
var pt =
|
|
995
|
+
var pt = j("vue-simple-handler"), mt = j("vue-simple-handler-wrapper"), ht = {
|
|
1008
996
|
name: "SimpleHandler",
|
|
1009
|
-
components: { HandlerWrapper:
|
|
997
|
+
components: { HandlerWrapper: Ae },
|
|
1010
998
|
props: {
|
|
1011
999
|
defaultClass: { type: String },
|
|
1012
1000
|
hoverClass: { type: String },
|
|
@@ -1022,10 +1010,10 @@ var pt = A("vue-simple-handler"), mt = A("vue-simple-handler-wrapper"), ht = {
|
|
|
1022
1010
|
return { hover: !1 };
|
|
1023
1011
|
},
|
|
1024
1012
|
computed: { classes: function() {
|
|
1025
|
-
var e, t = (
|
|
1013
|
+
var e, t = (w(e = {}, this.horizontalPosition, !!this.horizontalPosition), w(e, this.verticalPosition, !!this.verticalPosition), w(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), w(e, "hover", this.hover), e);
|
|
1026
1014
|
return {
|
|
1027
|
-
default:
|
|
1028
|
-
wrapper:
|
|
1015
|
+
default: A(pt(t), this.defaultClass, this.hover && this.hoverClass),
|
|
1016
|
+
wrapper: A(mt(t), this.wrapperClass)
|
|
1029
1017
|
};
|
|
1030
1018
|
} },
|
|
1031
1019
|
methods: {
|
|
@@ -1044,20 +1032,20 @@ var pt = A("vue-simple-handler"), mt = A("vue-simple-handler-wrapper"), ht = {
|
|
|
1044
1032
|
},
|
|
1045
1033
|
emits: ["drag", "drag-end"]
|
|
1046
1034
|
};
|
|
1047
|
-
ht.render = function(
|
|
1035
|
+
ht.render = function(e, t, n, r, i, c) {
|
|
1048
1036
|
var l = o("HandlerWrapper");
|
|
1049
|
-
return
|
|
1037
|
+
return a(), h(l, {
|
|
1050
1038
|
class: c.classes.wrapper,
|
|
1051
|
-
"vertical-position":
|
|
1052
|
-
"horizontal-position":
|
|
1053
|
-
disabled:
|
|
1039
|
+
"vertical-position": n.verticalPosition,
|
|
1040
|
+
"horizontal-position": n.horizontalPosition,
|
|
1041
|
+
disabled: n.disabled,
|
|
1054
1042
|
onDrag: c.onDrag,
|
|
1055
1043
|
onDragEnd: c.onDragEnd,
|
|
1056
1044
|
onEnter: c.onEnter,
|
|
1057
1045
|
onLeave: c.onLeave
|
|
1058
1046
|
}, {
|
|
1059
|
-
default:
|
|
1060
|
-
return [
|
|
1047
|
+
default: s((function() {
|
|
1048
|
+
return [S("div", { class: c.classes.default }, null, 2)];
|
|
1061
1049
|
})),
|
|
1062
1050
|
_: 1
|
|
1063
1051
|
}, 8, [
|
|
@@ -1071,9 +1059,9 @@ ht.render = function(t, r, i, a, s, c) {
|
|
|
1071
1059
|
"onLeave"
|
|
1072
1060
|
]);
|
|
1073
1061
|
};
|
|
1074
|
-
var gt =
|
|
1062
|
+
var gt = j("vue-simple-line"), _t = j("vue-simple-line-wrapper"), vt = {
|
|
1075
1063
|
name: "SimpleLine",
|
|
1076
|
-
components: { LineWrapper:
|
|
1064
|
+
components: { LineWrapper: Me },
|
|
1077
1065
|
props: {
|
|
1078
1066
|
defaultClass: { type: String },
|
|
1079
1067
|
hoverClass: { type: String },
|
|
@@ -1089,8 +1077,8 @@ var gt = A("vue-simple-line"), _t = A("vue-simple-line-wrapper"), vt = {
|
|
|
1089
1077
|
},
|
|
1090
1078
|
computed: { classes: function() {
|
|
1091
1079
|
return {
|
|
1092
|
-
root:
|
|
1093
|
-
wrapper:
|
|
1080
|
+
root: A(gt(w({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
|
|
1081
|
+
wrapper: A(_t(w({}, this.position, !0)), this.wrapperClass)
|
|
1094
1082
|
};
|
|
1095
1083
|
} },
|
|
1096
1084
|
methods: {
|
|
@@ -1109,19 +1097,19 @@ var gt = A("vue-simple-line"), _t = A("vue-simple-line-wrapper"), vt = {
|
|
|
1109
1097
|
},
|
|
1110
1098
|
emits: ["drag", "drag-end"]
|
|
1111
1099
|
};
|
|
1112
|
-
vt.render = function(
|
|
1100
|
+
vt.render = function(e, t, n, r, i, c) {
|
|
1113
1101
|
var l = o("LineWrapper");
|
|
1114
|
-
return
|
|
1102
|
+
return a(), h(l, {
|
|
1115
1103
|
class: c.classes.wrapper,
|
|
1116
|
-
position:
|
|
1117
|
-
disabled:
|
|
1104
|
+
position: n.position,
|
|
1105
|
+
disabled: n.disabled,
|
|
1118
1106
|
onDrag: c.onDrag,
|
|
1119
1107
|
onDragEnd: c.onDragEnd,
|
|
1120
1108
|
onEnter: c.onEnter,
|
|
1121
1109
|
onLeave: c.onLeave
|
|
1122
1110
|
}, {
|
|
1123
|
-
default:
|
|
1124
|
-
return [
|
|
1111
|
+
default: s((function() {
|
|
1112
|
+
return [S("div", { class: c.classes.root }, null, 2)];
|
|
1125
1113
|
})),
|
|
1126
1114
|
_: 1
|
|
1127
1115
|
}, 8, [
|
|
@@ -1134,7 +1122,7 @@ vt.render = function(t, r, i, a, s, c) {
|
|
|
1134
1122
|
"onLeave"
|
|
1135
1123
|
]);
|
|
1136
1124
|
};
|
|
1137
|
-
var yt =
|
|
1125
|
+
var yt = j("vue-bounding-box"), bt = [
|
|
1138
1126
|
"east",
|
|
1139
1127
|
"west",
|
|
1140
1128
|
null
|
|
@@ -1220,10 +1208,10 @@ var yt = A("vue-bounding-box"), bt = [
|
|
|
1220
1208
|
return bt.forEach((function(t) {
|
|
1221
1209
|
xt.forEach((function(n) {
|
|
1222
1210
|
if (t !== n) {
|
|
1223
|
-
var r =
|
|
1211
|
+
var r = P(t, n);
|
|
1224
1212
|
e.push({
|
|
1225
|
-
name:
|
|
1226
|
-
classname:
|
|
1213
|
+
name: r.name,
|
|
1214
|
+
classname: r.classname,
|
|
1227
1215
|
verticalDirection: n,
|
|
1228
1216
|
horizontalDirection: t
|
|
1229
1217
|
});
|
|
@@ -1252,8 +1240,8 @@ var yt = A("vue-bounding-box"), bt = [
|
|
|
1252
1240
|
n.horizontalDirection && n.verticalDirection || !e.lines[n.name] || t.push({
|
|
1253
1241
|
name: n.name,
|
|
1254
1242
|
component: e.linesComponent,
|
|
1255
|
-
class:
|
|
1256
|
-
wrapperClass:
|
|
1243
|
+
class: A(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
|
|
1244
|
+
wrapperClass: A(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
|
|
1257
1245
|
hoverClass: e.classes.lines.hover,
|
|
1258
1246
|
verticalDirection: n.verticalDirection,
|
|
1259
1247
|
horizontalDirection: n.horizontalDirection,
|
|
@@ -1268,8 +1256,8 @@ var yt = A("vue-bounding-box"), bt = [
|
|
|
1268
1256
|
var a = {
|
|
1269
1257
|
name: i.name,
|
|
1270
1258
|
component: e.handlersComponent,
|
|
1271
|
-
class:
|
|
1272
|
-
wrapperClass:
|
|
1259
|
+
class: A(e.classes.handlers.default, e.classes.handlers[i.name]),
|
|
1260
|
+
wrapperClass: A(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
|
|
1273
1261
|
hoverClass: e.classes.handlers.hover,
|
|
1274
1262
|
verticalDirection: i.verticalDirection,
|
|
1275
1263
|
horizontalDirection: i.horizontalDirection,
|
|
@@ -1278,7 +1266,7 @@ var yt = A("vue-bounding-box"), bt = [
|
|
|
1278
1266
|
if (n && r) {
|
|
1279
1267
|
var o = i.horizontalDirection, s = i.verticalDirection, c = o === "east" ? n : o === "west" ? 0 : n / 2, l = s === "south" ? r : s === "north" ? 0 : r / 2;
|
|
1280
1268
|
a.wrapperClass = yt("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
|
|
1281
|
-
} else a.wrapperClass = yt("handler",
|
|
1269
|
+
} else a.wrapperClass = yt("handler", w({}, i.classname, !0));
|
|
1282
1270
|
t.push(a);
|
|
1283
1271
|
}
|
|
1284
1272
|
})), t;
|
|
@@ -1304,7 +1292,7 @@ var yt = A("vue-bounding-box"), bt = [
|
|
|
1304
1292
|
top: 0,
|
|
1305
1293
|
bottom: 0
|
|
1306
1294
|
};
|
|
1307
|
-
t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new
|
|
1295
|
+
t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new Te(s, {
|
|
1308
1296
|
allowedDirections: {
|
|
1309
1297
|
left: t === "west" || !t,
|
|
1310
1298
|
right: t === "east" || !t,
|
|
@@ -1318,26 +1306,26 @@ var yt = A("vue-bounding-box"), bt = [
|
|
|
1318
1306
|
},
|
|
1319
1307
|
emits: ["resize", "resize-end"]
|
|
1320
1308
|
};
|
|
1321
|
-
St.render = function(t, n, o, s, c
|
|
1322
|
-
return
|
|
1309
|
+
St.render = function(e, t, n, o, s, c) {
|
|
1310
|
+
return a(), h("div", {
|
|
1323
1311
|
ref: "box",
|
|
1324
|
-
class:
|
|
1325
|
-
style:
|
|
1312
|
+
class: c.classes.root,
|
|
1313
|
+
style: c.style
|
|
1326
1314
|
}, [
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
return
|
|
1330
|
-
key:
|
|
1331
|
-
"default-class":
|
|
1332
|
-
"hover-class":
|
|
1333
|
-
"wrapper-class":
|
|
1334
|
-
position:
|
|
1335
|
-
disabled:
|
|
1336
|
-
onDrag: function(
|
|
1337
|
-
return
|
|
1315
|
+
i(e.$slots, "default"),
|
|
1316
|
+
S("div", null, [(a(!0), h(re, null, r(c.lineNodes, (function(e) {
|
|
1317
|
+
return a(), h(ae(e.component), {
|
|
1318
|
+
key: e.name,
|
|
1319
|
+
"default-class": e.class,
|
|
1320
|
+
"hover-class": e.hoverClass,
|
|
1321
|
+
"wrapper-class": e.wrapperClass,
|
|
1322
|
+
position: e.name,
|
|
1323
|
+
disabled: e.disabled,
|
|
1324
|
+
onDrag: function(t) {
|
|
1325
|
+
return c.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
|
|
1338
1326
|
},
|
|
1339
|
-
onDragEnd:
|
|
1340
|
-
return
|
|
1327
|
+
onDragEnd: t[1] ||= function(e) {
|
|
1328
|
+
return c.onEnd();
|
|
1341
1329
|
}
|
|
1342
1330
|
}, null, 8, [
|
|
1343
1331
|
"default-class",
|
|
@@ -1348,23 +1336,23 @@ St.render = function(t, n, o, s, c, l) {
|
|
|
1348
1336
|
"onDrag"
|
|
1349
1337
|
]);
|
|
1350
1338
|
})), 128))]),
|
|
1351
|
-
(
|
|
1352
|
-
return
|
|
1353
|
-
key:
|
|
1354
|
-
style:
|
|
1355
|
-
class:
|
|
1356
|
-
}, [(
|
|
1357
|
-
"default-class":
|
|
1358
|
-
"hover-class":
|
|
1359
|
-
"wrapper-class":
|
|
1360
|
-
"horizontal-position":
|
|
1361
|
-
"vertical-position":
|
|
1362
|
-
disabled:
|
|
1363
|
-
onDrag: function(
|
|
1364
|
-
return
|
|
1339
|
+
(a(!0), h(re, null, r(c.handlerNodes, (function(e) {
|
|
1340
|
+
return a(), h("div", {
|
|
1341
|
+
key: e.name,
|
|
1342
|
+
style: e.wrapperStyle,
|
|
1343
|
+
class: e.wrapperClass
|
|
1344
|
+
}, [(a(), h(ae(e.component), {
|
|
1345
|
+
"default-class": e.class,
|
|
1346
|
+
"hover-class": e.hoverClass,
|
|
1347
|
+
"wrapper-class": e.wrapperClass,
|
|
1348
|
+
"horizontal-position": e.horizontalDirection,
|
|
1349
|
+
"vertical-position": e.verticalDirection,
|
|
1350
|
+
disabled: e.disabled,
|
|
1351
|
+
onDrag: function(t) {
|
|
1352
|
+
return c.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
|
|
1365
1353
|
},
|
|
1366
|
-
onDragEnd:
|
|
1367
|
-
return
|
|
1354
|
+
onDragEnd: t[2] ||= function(e) {
|
|
1355
|
+
return c.onEnd();
|
|
1368
1356
|
}
|
|
1369
1357
|
}, null, 8, [
|
|
1370
1358
|
"default-class",
|
|
@@ -1378,7 +1366,7 @@ St.render = function(t, n, o, s, c, l) {
|
|
|
1378
1366
|
})), 128))
|
|
1379
1367
|
], 6);
|
|
1380
1368
|
};
|
|
1381
|
-
var Ct =
|
|
1369
|
+
var Ct = j("vue-draggable-area"), wt = {
|
|
1382
1370
|
name: "DraggableArea",
|
|
1383
1371
|
props: {
|
|
1384
1372
|
movable: {
|
|
@@ -1406,14 +1394,14 @@ var Ct = A("vue-draggable-area"), wt = {
|
|
|
1406
1394
|
onTouchStart: function(e) {
|
|
1407
1395
|
if (e.cancelable) {
|
|
1408
1396
|
var t = this.movable && e.touches.length === 1;
|
|
1409
|
-
t && (this.touches =
|
|
1397
|
+
t && (this.touches = T(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
|
|
1410
1398
|
}
|
|
1411
1399
|
},
|
|
1412
1400
|
onTouchEnd: function() {
|
|
1413
1401
|
this.touchStarted = !1, this.processEnd();
|
|
1414
1402
|
},
|
|
1415
1403
|
onTouchMove: function(e) {
|
|
1416
|
-
this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) :
|
|
1404
|
+
this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : we({
|
|
1417
1405
|
x: this.touches[0].clientX,
|
|
1418
1406
|
y: this.touches[0].clientY
|
|
1419
1407
|
}, {
|
|
@@ -1452,10 +1440,10 @@ var Ct = A("vue-draggable-area"), wt = {
|
|
|
1452
1440
|
};
|
|
1453
1441
|
},
|
|
1454
1442
|
processMove: function(e, t) {
|
|
1455
|
-
var n =
|
|
1443
|
+
var n = T(t);
|
|
1456
1444
|
if (this.touches.length) {
|
|
1457
1445
|
var r = this.$refs.container.getBoundingClientRect(), i = r.left, a = r.top;
|
|
1458
|
-
this.touches.length === 1 && n.length === 1 && this.$emit("move", new
|
|
1446
|
+
this.touches.length === 1 && n.length === 1 && this.$emit("move", new Ee({
|
|
1459
1447
|
left: n[0].clientX - (i + this.anchor.x),
|
|
1460
1448
|
top: n[0].clientY - (a + this.anchor.y)
|
|
1461
1449
|
}));
|
|
@@ -1467,16 +1455,16 @@ var Ct = A("vue-draggable-area"), wt = {
|
|
|
1467
1455
|
},
|
|
1468
1456
|
emits: ["move", "move-end"]
|
|
1469
1457
|
};
|
|
1470
|
-
wt.render = function(t, n, r,
|
|
1471
|
-
return
|
|
1458
|
+
wt.render = function(e, t, n, r, o, s) {
|
|
1459
|
+
return a(), h("div", {
|
|
1472
1460
|
ref: "container",
|
|
1473
|
-
onTouchstart:
|
|
1461
|
+
onTouchstart: t[1] ||= function() {
|
|
1474
1462
|
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
1475
1463
|
},
|
|
1476
|
-
onMousedown:
|
|
1464
|
+
onMousedown: t[2] ||= function() {
|
|
1477
1465
|
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
1478
1466
|
}
|
|
1479
|
-
}, [
|
|
1467
|
+
}, [i(e.$slots, "default")], 544);
|
|
1480
1468
|
};
|
|
1481
1469
|
function Tt(e) {
|
|
1482
1470
|
return {
|
|
@@ -1564,7 +1552,7 @@ function kt(e, t) {
|
|
|
1564
1552
|
return e.forEach((function(t) {
|
|
1565
1553
|
a.left += (t.clientX - r) / e.length, a.top += (t.clientY - i) / e.length;
|
|
1566
1554
|
})), e.forEach((function(e) {
|
|
1567
|
-
o +=
|
|
1555
|
+
o += we({
|
|
1568
1556
|
x: a.left,
|
|
1569
1557
|
y: a.top
|
|
1570
1558
|
}, {
|
|
@@ -1607,18 +1595,18 @@ var At = {
|
|
|
1607
1595
|
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
1608
1596
|
},
|
|
1609
1597
|
created: function() {
|
|
1610
|
-
this.transforming = !1, this.debouncedProcessEnd =
|
|
1598
|
+
this.transforming = !1, this.debouncedProcessEnd = ye(this.processEnd), this.touches = [];
|
|
1611
1599
|
},
|
|
1612
1600
|
methods: {
|
|
1613
1601
|
processMove: function(e, t) {
|
|
1614
1602
|
if (this.touches.length) {
|
|
1615
|
-
if (this.touches.length === 1 && t.length === 1) this.$emit("move", new
|
|
1603
|
+
if (this.touches.length === 1 && t.length === 1) this.$emit("move", new B({
|
|
1616
1604
|
left: this.touches[0].clientX - t[0].clientX,
|
|
1617
1605
|
top: this.touches[0].clientY - t[0].clientY
|
|
1618
1606
|
}));
|
|
1619
1607
|
else if (this.touches.length > 1 && this.touchResize) {
|
|
1620
1608
|
var n = kt(t, this.$refs.container), r = this.oldGeometricProperties;
|
|
1621
|
-
r.count === n.count && r.count > 1 && this.$emit("resize", new
|
|
1609
|
+
r.count === n.count && r.count > 1 && this.$emit("resize", new B({
|
|
1622
1610
|
left: r.centerMass.left - n.centerMass.left,
|
|
1623
1611
|
top: r.centerMass.top - n.centerMass.top
|
|
1624
1612
|
}, {
|
|
@@ -1641,7 +1629,7 @@ var At = {
|
|
|
1641
1629
|
onTouchStart: function(e) {
|
|
1642
1630
|
if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
|
|
1643
1631
|
var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
|
|
1644
|
-
this.touches =
|
|
1632
|
+
this.touches = T(e.touches).filter((function(e) {
|
|
1645
1633
|
return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
|
|
1646
1634
|
})), this.oldGeometricProperties = kt(this.touches, t);
|
|
1647
1635
|
}
|
|
@@ -1652,7 +1640,7 @@ var At = {
|
|
|
1652
1640
|
onTouchMove: function(e) {
|
|
1653
1641
|
var t = this;
|
|
1654
1642
|
if (this.touches.length) {
|
|
1655
|
-
var n =
|
|
1643
|
+
var n = T(e.touches).filter((function(e) {
|
|
1656
1644
|
return !e.identifier || t.touches.find((function(t) {
|
|
1657
1645
|
return t.identifier === e.identifier;
|
|
1658
1646
|
}));
|
|
@@ -1681,11 +1669,11 @@ var At = {
|
|
|
1681
1669
|
},
|
|
1682
1670
|
onWheel: function(e) {
|
|
1683
1671
|
if (this.wheelResize && this.processEvent(e)) {
|
|
1684
|
-
var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 ||
|
|
1672
|
+
var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || Ce(s) ? s : s > 0 ? 1 : -1), a = {
|
|
1685
1673
|
left: e.clientX - n,
|
|
1686
1674
|
top: e.clientY - r
|
|
1687
1675
|
};
|
|
1688
|
-
this.$emit("resize", new
|
|
1676
|
+
this.$emit("resize", new B({}, {
|
|
1689
1677
|
factor: i,
|
|
1690
1678
|
center: a
|
|
1691
1679
|
})), this.touches.length || this.debouncedProcessEnd();
|
|
@@ -1699,19 +1687,19 @@ var At = {
|
|
|
1699
1687
|
"transform-end"
|
|
1700
1688
|
]
|
|
1701
1689
|
};
|
|
1702
|
-
At.render = function(t, n, r,
|
|
1703
|
-
return
|
|
1690
|
+
At.render = function(e, t, n, r, o, s) {
|
|
1691
|
+
return a(), h("div", {
|
|
1704
1692
|
ref: "container",
|
|
1705
|
-
onTouchstart:
|
|
1693
|
+
onTouchstart: t[1] ||= function() {
|
|
1706
1694
|
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
1707
1695
|
},
|
|
1708
|
-
onMousedown:
|
|
1696
|
+
onMousedown: t[2] ||= function() {
|
|
1709
1697
|
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
1710
1698
|
},
|
|
1711
|
-
onWheel:
|
|
1699
|
+
onWheel: t[3] ||= function() {
|
|
1712
1700
|
return s.onWheel && s.onWheel.apply(s, arguments);
|
|
1713
1701
|
}
|
|
1714
|
-
}, [
|
|
1702
|
+
}, [i(e.$slots, "default")], 544);
|
|
1715
1703
|
};
|
|
1716
1704
|
var jt = {
|
|
1717
1705
|
components: { TransformableImage: At },
|
|
@@ -1735,22 +1723,22 @@ var jt = {
|
|
|
1735
1723
|
},
|
|
1736
1724
|
emits: ["resize", "move"]
|
|
1737
1725
|
};
|
|
1738
|
-
jt.render = function(
|
|
1726
|
+
jt.render = function(e, t, n, r, c, l) {
|
|
1739
1727
|
var u = o("transformable-image");
|
|
1740
|
-
return
|
|
1741
|
-
"touch-move":
|
|
1742
|
-
"touch-resize":
|
|
1743
|
-
"mouse-move":
|
|
1744
|
-
"wheel-resize":
|
|
1745
|
-
onMove:
|
|
1746
|
-
return
|
|
1747
|
-
},
|
|
1748
|
-
onResize:
|
|
1749
|
-
return
|
|
1728
|
+
return a(), h(u, {
|
|
1729
|
+
"touch-move": n.touchMove,
|
|
1730
|
+
"touch-resize": n.touchResize,
|
|
1731
|
+
"mouse-move": n.mouseMove,
|
|
1732
|
+
"wheel-resize": n.wheelResize,
|
|
1733
|
+
onMove: t[1] ||= function(t) {
|
|
1734
|
+
return e.$emit("move", t);
|
|
1735
|
+
},
|
|
1736
|
+
onResize: t[2] ||= function(t) {
|
|
1737
|
+
return e.$emit("resize", t);
|
|
1750
1738
|
}
|
|
1751
1739
|
}, {
|
|
1752
|
-
default:
|
|
1753
|
-
return [
|
|
1740
|
+
default: s((function() {
|
|
1741
|
+
return [i(e.$slots, "default")];
|
|
1754
1742
|
})),
|
|
1755
1743
|
_: 3
|
|
1756
1744
|
}, 8, [
|
|
@@ -1760,7 +1748,7 @@ jt.render = function(t, r, i, s, c, l) {
|
|
|
1760
1748
|
"wheel-resize"
|
|
1761
1749
|
]);
|
|
1762
1750
|
};
|
|
1763
|
-
var Mt =
|
|
1751
|
+
var Mt = j("vue-preview"), Nt = {
|
|
1764
1752
|
props: {
|
|
1765
1753
|
coordinates: { type: Object },
|
|
1766
1754
|
transitions: { type: Object },
|
|
@@ -1793,7 +1781,7 @@ var Mt = A("vue-preview"), Nt = {
|
|
|
1793
1781
|
root: Mt({ fill: this.fill }),
|
|
1794
1782
|
wrapper: Mt("wrapper"),
|
|
1795
1783
|
imageWrapper: Mt("image-wrapper"),
|
|
1796
|
-
image:
|
|
1784
|
+
image: A(Mt("image"), this.imageClass)
|
|
1797
1785
|
};
|
|
1798
1786
|
},
|
|
1799
1787
|
style: function() {
|
|
@@ -1812,7 +1800,7 @@ var Mt = A("vue-preview"), Nt = {
|
|
|
1812
1800
|
},
|
|
1813
1801
|
imageStyle: function() {
|
|
1814
1802
|
if (this.coordinates && this.image) {
|
|
1815
|
-
var e = this.coordinates.width / this.size.width, t =
|
|
1803
|
+
var e = this.coordinates.width / this.size.width, t = C(C({
|
|
1816
1804
|
rotate: 0,
|
|
1817
1805
|
flip: {
|
|
1818
1806
|
horizontal: !1,
|
|
@@ -1884,31 +1872,31 @@ var Mt = A("vue-preview"), Nt = {
|
|
|
1884
1872
|
}
|
|
1885
1873
|
}
|
|
1886
1874
|
};
|
|
1887
|
-
Nt.render = function(t, n, r, i,
|
|
1888
|
-
return
|
|
1875
|
+
Nt.render = function(e, t, n, r, i, o) {
|
|
1876
|
+
return a(), h("div", {
|
|
1889
1877
|
ref: "root",
|
|
1890
1878
|
class: o.classes.root,
|
|
1891
1879
|
style: o.style
|
|
1892
|
-
}, [
|
|
1880
|
+
}, [S("div", {
|
|
1893
1881
|
ref: "wrapper",
|
|
1894
1882
|
class: o.classes.wrapper,
|
|
1895
1883
|
style: o.wrapperStyle
|
|
1896
|
-
}, [
|
|
1884
|
+
}, [l(S("img", {
|
|
1897
1885
|
ref: "image",
|
|
1898
|
-
src:
|
|
1886
|
+
src: n.image && n.image.src,
|
|
1899
1887
|
class: o.classes.image,
|
|
1900
1888
|
style: o.imageStyle
|
|
1901
|
-
}, null, 14, ["src"]), [[
|
|
1889
|
+
}, null, 14, ["src"]), [[x, n.image && n.image.src]])], 6)], 6);
|
|
1902
1890
|
};
|
|
1903
1891
|
var Pt = {
|
|
1904
1892
|
components: { Preview: Nt },
|
|
1905
1893
|
inheritAttrs: !1
|
|
1906
1894
|
};
|
|
1907
|
-
Pt.render = function(t, n, r, i,
|
|
1895
|
+
Pt.render = function(e, t, n, r, i, s) {
|
|
1908
1896
|
var c = o("preview");
|
|
1909
|
-
return
|
|
1897
|
+
return a(), h(c, g(e.$attrs, { fill: !0 }), null, 16);
|
|
1910
1898
|
};
|
|
1911
|
-
var Ft =
|
|
1899
|
+
var Ft = j("vue-rectangle-stencil"), It = {
|
|
1912
1900
|
name: "RectangleStencil",
|
|
1913
1901
|
components: {
|
|
1914
1902
|
StencilPreview: Pt,
|
|
@@ -1983,13 +1971,13 @@ var Ft = A("vue-rectangle-stencil"), It = {
|
|
|
1983
1971
|
computed: {
|
|
1984
1972
|
classes: function() {
|
|
1985
1973
|
return {
|
|
1986
|
-
stencil:
|
|
1974
|
+
stencil: A(Ft({
|
|
1987
1975
|
movable: this.movable,
|
|
1988
1976
|
moving: this.moving,
|
|
1989
1977
|
resizing: this.resizing
|
|
1990
1978
|
}), this.moving && this.movingClass, this.resizing && this.resizingClass),
|
|
1991
|
-
preview:
|
|
1992
|
-
boundingBox:
|
|
1979
|
+
preview: A(Ft("preview"), this.previewClass),
|
|
1980
|
+
boundingBox: A(Ft("bounding-box"), this.boundingBoxClass)
|
|
1993
1981
|
};
|
|
1994
1982
|
},
|
|
1995
1983
|
style: function() {
|
|
@@ -2028,42 +2016,42 @@ var Ft = A("vue-rectangle-stencil"), It = {
|
|
|
2028
2016
|
"move-end"
|
|
2029
2017
|
]
|
|
2030
2018
|
};
|
|
2031
|
-
It.render = function(
|
|
2019
|
+
It.render = function(e, t, n, r, i, c) {
|
|
2032
2020
|
var l = o("stencil-preview"), u = o("draggable-area"), d = o("bounding-box");
|
|
2033
|
-
return
|
|
2021
|
+
return a(), h("div", {
|
|
2034
2022
|
class: c.classes.stencil,
|
|
2035
2023
|
style: c.style
|
|
2036
|
-
}, [
|
|
2037
|
-
width:
|
|
2038
|
-
height:
|
|
2039
|
-
transitions:
|
|
2024
|
+
}, [S(d, {
|
|
2025
|
+
width: n.stencilCoordinates.width,
|
|
2026
|
+
height: n.stencilCoordinates.height,
|
|
2027
|
+
transitions: n.transitions,
|
|
2040
2028
|
class: c.classes.boundingBox,
|
|
2041
|
-
handlers:
|
|
2042
|
-
"handlers-component":
|
|
2043
|
-
"handlers-classes":
|
|
2044
|
-
"handlers-wrappers-classes":
|
|
2045
|
-
lines:
|
|
2046
|
-
"lines-component":
|
|
2047
|
-
"lines-classes":
|
|
2048
|
-
"lines-wrappers-classes":
|
|
2049
|
-
resizable:
|
|
2029
|
+
handlers: n.handlers,
|
|
2030
|
+
"handlers-component": n.handlersComponent,
|
|
2031
|
+
"handlers-classes": n.handlersClasses,
|
|
2032
|
+
"handlers-wrappers-classes": n.handlersWrappersClasses,
|
|
2033
|
+
lines: n.lines,
|
|
2034
|
+
"lines-component": n.linesComponent,
|
|
2035
|
+
"lines-classes": n.linesClasses,
|
|
2036
|
+
"lines-wrappers-classes": n.linesWrappersClasses,
|
|
2037
|
+
resizable: n.resizable,
|
|
2050
2038
|
onResize: c.onResize,
|
|
2051
2039
|
onResizeEnd: c.onResizeEnd
|
|
2052
2040
|
}, {
|
|
2053
|
-
default:
|
|
2054
|
-
return [
|
|
2055
|
-
movable:
|
|
2041
|
+
default: s((function() {
|
|
2042
|
+
return [S(u, {
|
|
2043
|
+
movable: n.movable,
|
|
2056
2044
|
onMove: c.onMove,
|
|
2057
2045
|
onMoveEnd: c.onMoveEnd
|
|
2058
2046
|
}, {
|
|
2059
|
-
default:
|
|
2060
|
-
return [
|
|
2061
|
-
image:
|
|
2062
|
-
coordinates:
|
|
2063
|
-
width:
|
|
2064
|
-
height:
|
|
2047
|
+
default: s((function() {
|
|
2048
|
+
return [S(l, {
|
|
2049
|
+
image: n.image,
|
|
2050
|
+
coordinates: n.coordinates,
|
|
2051
|
+
width: n.stencilCoordinates.width,
|
|
2052
|
+
height: n.stencilCoordinates.height,
|
|
2065
2053
|
class: c.classes.preview,
|
|
2066
|
-
transitions:
|
|
2054
|
+
transitions: n.transitions
|
|
2067
2055
|
}, null, 8, [
|
|
2068
2056
|
"image",
|
|
2069
2057
|
"coordinates",
|
|
@@ -2099,7 +2087,7 @@ It.render = function(t, r, i, a, s, c) {
|
|
|
2099
2087
|
"onResizeEnd"
|
|
2100
2088
|
])], 6);
|
|
2101
2089
|
};
|
|
2102
|
-
var Lt = ["transitions"], $ =
|
|
2090
|
+
var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
2103
2091
|
name: "Cropper",
|
|
2104
2092
|
components: { BackgroundWrapper: jt },
|
|
2105
2093
|
props: {
|
|
@@ -2165,7 +2153,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2165
2153
|
type: String,
|
|
2166
2154
|
default: "fit-area",
|
|
2167
2155
|
validator: function(e) {
|
|
2168
|
-
return
|
|
2156
|
+
return Ie.indexOf(e) !== -1;
|
|
2169
2157
|
}
|
|
2170
2158
|
},
|
|
2171
2159
|
roundResult: {
|
|
@@ -2199,24 +2187,24 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2199
2187
|
resizeAlgorithm: {
|
|
2200
2188
|
type: Function,
|
|
2201
2189
|
default: function(e) {
|
|
2202
|
-
var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o =
|
|
2190
|
+
var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o = N(N({}, n), {
|
|
2203
2191
|
right: n.left + n.width,
|
|
2204
2192
|
bottom: n.top + n.height
|
|
2205
|
-
}), s = t.params || {}, c =
|
|
2193
|
+
}), s = t.params || {}, c = N({}, t.directions), l = s.allowedDirections || {
|
|
2206
2194
|
left: !0,
|
|
2207
2195
|
right: !0,
|
|
2208
2196
|
bottom: !0,
|
|
2209
2197
|
top: !0
|
|
2210
2198
|
};
|
|
2211
|
-
a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0),
|
|
2199
|
+
a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), V.forEach((function(e) {
|
|
2212
2200
|
l[e] || (c[e] = 0);
|
|
2213
2201
|
}));
|
|
2214
|
-
var u =
|
|
2202
|
+
var u = G(o, c = dt({
|
|
2215
2203
|
coordinates: o,
|
|
2216
2204
|
directions: c,
|
|
2217
2205
|
sizeRestrictions: a,
|
|
2218
2206
|
positionRestrictions: i
|
|
2219
|
-
})).width, d =
|
|
2207
|
+
})).width, d = G(o, c).height, f = s.preserveRatio ? J(o) : He(u / d, r);
|
|
2220
2208
|
if (f) {
|
|
2221
2209
|
var p = s.respectDirection;
|
|
2222
2210
|
if (p ||= o.width >= o.height || f === 1 ? "width" : "height", p === "width") {
|
|
@@ -2228,8 +2216,8 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2228
2216
|
} else if (p === "height") {
|
|
2229
2217
|
var _ = o.width - d * f;
|
|
2230
2218
|
if (l.left && l.right) {
|
|
2231
|
-
var v = c.left,
|
|
2232
|
-
c.left = -ft(_, v,
|
|
2219
|
+
var v = c.left, y = c.right;
|
|
2220
|
+
c.left = -ft(_, v, y), c.right = -ft(_, y, v);
|
|
2233
2221
|
} else l.left ? c.left = -_ : l.right ? c.right = -_ : l.top ? c.top = 0 : l.bottom && (c.bottom = 0);
|
|
2234
2222
|
}
|
|
2235
2223
|
c = dt({
|
|
@@ -2241,10 +2229,10 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2241
2229
|
compensate: s.compensate
|
|
2242
2230
|
});
|
|
2243
2231
|
}
|
|
2244
|
-
return u =
|
|
2232
|
+
return u = G(o, c).width, d = G(o, c).height, (f = s.preserveRatio ? J(o) : He(u / d, r)) && Math.abs(f - u / d) > .001 && V.forEach((function(e) {
|
|
2245
2233
|
l[e] || (c[e] = 0);
|
|
2246
2234
|
})), Qe({
|
|
2247
|
-
event: new
|
|
2235
|
+
event: new Ee({
|
|
2248
2236
|
left: -c.left,
|
|
2249
2237
|
top: -c.top
|
|
2250
2238
|
}),
|
|
@@ -2265,14 +2253,14 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2265
2253
|
initStretcher: {
|
|
2266
2254
|
type: Function,
|
|
2267
2255
|
default: function(e) {
|
|
2268
|
-
var t = e.stretcher, n = e.imageSize, r =
|
|
2256
|
+
var t = e.stretcher, n = e.imageSize, r = J(n);
|
|
2269
2257
|
t.style.width = n.width + "px", t.style.height = t.clientWidth / r + "px", t.style.width = t.clientWidth + "px";
|
|
2270
2258
|
}
|
|
2271
2259
|
},
|
|
2272
2260
|
fitCoordinates: {
|
|
2273
2261
|
type: Function,
|
|
2274
2262
|
default: function(e) {
|
|
2275
|
-
var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o =
|
|
2263
|
+
var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = N(N({}, n), Q({
|
|
2276
2264
|
width: n.width,
|
|
2277
2265
|
height: n.height,
|
|
2278
2266
|
aspectRatio: r,
|
|
@@ -2283,19 +2271,19 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2283
2271
|
minWidth: Math.min(t.width, i.minWidth)
|
|
2284
2272
|
}
|
|
2285
2273
|
}));
|
|
2286
|
-
return o = Z(o =
|
|
2274
|
+
return o = Z(o = K(o, U(W(n), W(o))), Ye(H(t), a));
|
|
2287
2275
|
}
|
|
2288
2276
|
},
|
|
2289
2277
|
fitVisibleArea: {
|
|
2290
2278
|
type: Function,
|
|
2291
2279
|
default: function(e) {
|
|
2292
|
-
var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a =
|
|
2293
|
-
a.height = a.width /
|
|
2294
|
-
var o =
|
|
2280
|
+
var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = N({}, t);
|
|
2281
|
+
a.height = a.width / J(n), a.top += (t.height - a.height) / 2, (i.height - a.height > 0 || i.width - a.width > 0) && (a = q(a, Math.max(i.height / a.height, i.width / a.width)));
|
|
2282
|
+
var o = Be(Y(i, H(a = q(a, Ge(a, r({
|
|
2295
2283
|
visibleArea: a,
|
|
2296
2284
|
type: "resize"
|
|
2297
2285
|
}))))));
|
|
2298
|
-
return a.width < i.width && (o.left = 0), a.height < i.height && (o.top = 0), a = Z(a =
|
|
2286
|
+
return a.width < i.width && (o.left = 0), a.height < i.height && (o.top = 0), a = Z(a = K(a, o), r({
|
|
2299
2287
|
visibleArea: a,
|
|
2300
2288
|
type: "move"
|
|
2301
2289
|
}));
|
|
@@ -2310,7 +2298,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2310
2298
|
top: 0,
|
|
2311
2299
|
right: r.width,
|
|
2312
2300
|
bottom: r.height
|
|
2313
|
-
} : i === "fit-area" && (
|
|
2301
|
+
} : i === "fit-area" && (J(n) > J(r) ? (o = {
|
|
2314
2302
|
top: 0,
|
|
2315
2303
|
bottom: r.height
|
|
2316
2304
|
}, t && a === "move" && (t.width > r.width ? (o.left = -(t.width - r.width) / 2, o.right = r.width - o.left) : (o.left = 0, o.right = r.width))) : (o = {
|
|
@@ -2372,7 +2360,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2372
2360
|
height: 0
|
|
2373
2361
|
},
|
|
2374
2362
|
visibleArea: null,
|
|
2375
|
-
coordinates:
|
|
2363
|
+
coordinates: C({}, Le)
|
|
2376
2364
|
};
|
|
2377
2365
|
},
|
|
2378
2366
|
computed: {
|
|
@@ -2410,7 +2398,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2410
2398
|
return !!(this.visibleArea && this.imageLoaded);
|
|
2411
2399
|
},
|
|
2412
2400
|
settings: function() {
|
|
2413
|
-
var e =
|
|
2401
|
+
var e = xe(this.resizeImage, {
|
|
2414
2402
|
touch: !0,
|
|
2415
2403
|
wheel: { ratio: .1 },
|
|
2416
2404
|
adjustStencil: !0
|
|
@@ -2420,7 +2408,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2420
2408
|
adjustStencil: !1
|
|
2421
2409
|
});
|
|
2422
2410
|
return {
|
|
2423
|
-
moveImage:
|
|
2411
|
+
moveImage: xe(this.moveImage, {
|
|
2424
2412
|
touch: !0,
|
|
2425
2413
|
mouse: !0
|
|
2426
2414
|
}, {
|
|
@@ -2451,17 +2439,13 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2451
2439
|
if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
|
|
2452
2440
|
var e = this.sizeRestrictionsAlgorithm({
|
|
2453
2441
|
imageSize: this.imageSize,
|
|
2454
|
-
minWidth:
|
|
2455
|
-
minHeight:
|
|
2456
|
-
maxWidth:
|
|
2457
|
-
maxHeight:
|
|
2442
|
+
minWidth: R(this.minWidth) ? 0 : z(this.minWidth),
|
|
2443
|
+
minHeight: R(this.minHeight) ? 0 : z(this.minHeight),
|
|
2444
|
+
maxWidth: R(this.maxWidth) ? 1 / 0 : z(this.maxWidth),
|
|
2445
|
+
maxHeight: R(this.maxHeight) ? 1 / 0 : z(this.maxHeight)
|
|
2458
2446
|
});
|
|
2459
2447
|
if (e = function(e) {
|
|
2460
|
-
var t = e.areaRestrictions, n = e.sizeRestrictions
|
|
2461
|
-
e.imageSize;
|
|
2462
|
-
var r = e.boundaries, i = e.positionRestrictions;
|
|
2463
|
-
e.imageRestriction;
|
|
2464
|
-
var a = M(M({}, n), {
|
|
2448
|
+
var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = N(N({}, n), {
|
|
2465
2449
|
minWidth: n.minWidth === void 0 ? 0 : n.minWidth,
|
|
2466
2450
|
minHeight: n.minHeight === void 0 ? 0 : n.minHeight,
|
|
2467
2451
|
maxWidth: n.maxWidth === void 0 ? 1 / 0 : n.maxWidth,
|
|
@@ -2507,14 +2491,14 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2507
2491
|
classes: function() {
|
|
2508
2492
|
return {
|
|
2509
2493
|
cropper: $(),
|
|
2510
|
-
image:
|
|
2494
|
+
image: A($("image"), this.imageClass),
|
|
2511
2495
|
stencil: $("stencil"),
|
|
2512
|
-
boundaries:
|
|
2513
|
-
stretcher:
|
|
2514
|
-
background:
|
|
2515
|
-
foreground:
|
|
2516
|
-
imageWrapper:
|
|
2517
|
-
cropperWrapper:
|
|
2496
|
+
boundaries: A($("boundaries"), this.boundariesClass),
|
|
2497
|
+
stretcher: A($("stretcher")),
|
|
2498
|
+
background: A($("background"), this.backgroundClass),
|
|
2499
|
+
foreground: A($("foreground"), this.foregroundClass),
|
|
2500
|
+
imageWrapper: A($("image-wrapper")),
|
|
2501
|
+
cropperWrapper: A($("cropper-wrapper"))
|
|
2518
2502
|
};
|
|
2519
2503
|
},
|
|
2520
2504
|
stencilCoordinates: function() {
|
|
@@ -2551,7 +2535,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2551
2535
|
}, n = {
|
|
2552
2536
|
left: (1 - 1 / this.coefficient) * e.width / 2,
|
|
2553
2537
|
top: (1 - 1 / this.coefficient) * e.height / 2
|
|
2554
|
-
}, r =
|
|
2538
|
+
}, r = C(C({}, this.imageTransforms), {}, {
|
|
2555
2539
|
scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width),
|
|
2556
2540
|
scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height)
|
|
2557
2541
|
}), i = {
|
|
@@ -2600,7 +2584,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2600
2584
|
}
|
|
2601
2585
|
},
|
|
2602
2586
|
created: function() {
|
|
2603
|
-
this.debouncedUpdate =
|
|
2587
|
+
this.debouncedUpdate = ye(this.update, this.debounce), this.debouncedDisableTransitions = ye(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
|
|
2604
2588
|
},
|
|
2605
2589
|
mounted: function() {
|
|
2606
2590
|
this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
|
|
@@ -2610,16 +2594,16 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2610
2594
|
},
|
|
2611
2595
|
methods: {
|
|
2612
2596
|
getResult: function() {
|
|
2613
|
-
var e = this.initialized ? this.prepareResult(
|
|
2597
|
+
var e = this.initialized ? this.prepareResult(C({}, this.coordinates)) : this.defaultCoordinates(), t = {
|
|
2614
2598
|
rotate: this.imageTransforms.rotate % 360,
|
|
2615
|
-
flip:
|
|
2599
|
+
flip: C({}, this.imageTransforms.flip)
|
|
2616
2600
|
};
|
|
2617
2601
|
if (this.src && this.imageLoaded) {
|
|
2618
2602
|
var n = this;
|
|
2619
2603
|
return {
|
|
2620
2604
|
image: this.image,
|
|
2621
2605
|
coordinates: e,
|
|
2622
|
-
visibleArea: this.visibleArea ?
|
|
2606
|
+
visibleArea: this.visibleArea ? C({}, this.visibleArea) : null,
|
|
2623
2607
|
imageTransforms: t,
|
|
2624
2608
|
get canvas() {
|
|
2625
2609
|
return n.canvas ? n.getCanvas() : void 0;
|
|
@@ -2629,14 +2613,14 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2629
2613
|
return {
|
|
2630
2614
|
image: this.image,
|
|
2631
2615
|
coordinates: e,
|
|
2632
|
-
visibleArea: this.visibleArea ?
|
|
2616
|
+
visibleArea: this.visibleArea ? C({}, this.visibleArea) : null,
|
|
2633
2617
|
canvas: void 0,
|
|
2634
2618
|
imageTransforms: t
|
|
2635
2619
|
};
|
|
2636
2620
|
},
|
|
2637
2621
|
zoom: function(e, t) {
|
|
2638
2622
|
var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
|
|
2639
|
-
this.onManipulateImage(new
|
|
2623
|
+
this.onManipulateImage(new B({}, {
|
|
2640
2624
|
factor: 1 / e,
|
|
2641
2625
|
center: t
|
|
2642
2626
|
}), {
|
|
@@ -2646,7 +2630,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2646
2630
|
},
|
|
2647
2631
|
move: function(e, t) {
|
|
2648
2632
|
var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
|
|
2649
|
-
this.onManipulateImage(new
|
|
2633
|
+
this.onManipulateImage(new B({
|
|
2650
2634
|
left: e || 0,
|
|
2651
2635
|
top: t || 0
|
|
2652
2636
|
}), {
|
|
@@ -2689,7 +2673,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2689
2673
|
top: Math.round(t.top)
|
|
2690
2674
|
};
|
|
2691
2675
|
return i.width > n.maxWidth ? i.width = Math.floor(t.width) : i.width < n.minWidth && (i.width = Math.ceil(t.width)), i.height > n.maxHeight ? i.height = Math.floor(t.height) : i.height < n.minHeight && (i.height = Math.ceil(t.height)), Z(i, r);
|
|
2692
|
-
}(
|
|
2676
|
+
}(C(C({}, this.getPublicProperties()), {}, {
|
|
2693
2677
|
positionRestrictions: st(this.positionRestrictions, this.visibleArea),
|
|
2694
2678
|
coordinates: e
|
|
2695
2679
|
})) : e;
|
|
@@ -2711,16 +2695,16 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2711
2695
|
sizeRestrictions: this.sizeRestrictions,
|
|
2712
2696
|
stencilSize: this.getStencilSize()
|
|
2713
2697
|
});
|
|
2714
|
-
return
|
|
2698
|
+
return C(C({}, a), {}, { changed: !Re(a.visibleArea, t) || !Re(a.coordinates, n) });
|
|
2715
2699
|
},
|
|
2716
2700
|
runAutoZoom: function(e) {
|
|
2717
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i =
|
|
2701
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = ve(t, Lt), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
|
|
2718
2702
|
r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
|
|
2719
2703
|
},
|
|
2720
2704
|
normalizeEvent: function(e) {
|
|
2721
2705
|
return function(e) {
|
|
2722
2706
|
var t = e.event, n = e.visibleArea, r = e.coefficient;
|
|
2723
|
-
if (t.type === "manipulateImage") return
|
|
2707
|
+
if (t.type === "manipulateImage") return N(N({}, t), {
|
|
2724
2708
|
move: {
|
|
2725
2709
|
left: t.move && t.move.left ? r * t.move.left : 0,
|
|
2726
2710
|
top: t.move && t.move.top ? r * t.move.top : 0
|
|
@@ -2734,19 +2718,19 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2734
2718
|
}
|
|
2735
2719
|
});
|
|
2736
2720
|
if (t.type === "resize") {
|
|
2737
|
-
var i =
|
|
2738
|
-
return
|
|
2721
|
+
var i = N(N({}, t), { directions: N({}, t.directions) });
|
|
2722
|
+
return V.forEach((function(e) {
|
|
2739
2723
|
i.directions[e] *= r;
|
|
2740
2724
|
})), i;
|
|
2741
2725
|
}
|
|
2742
2726
|
if (t.type === "move") {
|
|
2743
|
-
var a =
|
|
2744
|
-
return
|
|
2727
|
+
var a = N(N({}, t), { directions: N({}, t.directions) });
|
|
2728
|
+
return Fe.forEach((function(e) {
|
|
2745
2729
|
a.directions[e] *= r;
|
|
2746
2730
|
})), a;
|
|
2747
2731
|
}
|
|
2748
2732
|
return t;
|
|
2749
|
-
}(
|
|
2733
|
+
}(C(C({}, this.getPublicProperties()), {}, { event: e }));
|
|
2750
2734
|
},
|
|
2751
2735
|
getCanvas: function() {
|
|
2752
2736
|
if (this.$refs.canvas) {
|
|
@@ -2756,12 +2740,12 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2756
2740
|
height: t.naturalHeight
|
|
2757
2741
|
}, o = We(a, r), s = e.getContext("2d");
|
|
2758
2742
|
e.height = o.height, e.width = o.width, s.save();
|
|
2759
|
-
var c = X(
|
|
2743
|
+
var c = X(W(N({
|
|
2760
2744
|
left: 0,
|
|
2761
2745
|
top: 0
|
|
2762
2746
|
}, a)), r);
|
|
2763
2747
|
return s.translate(-(c.left - o.width / 2), -(c.top - o.height / 2)), s.rotate(r * Math.PI / 180), s.translate(i.horizontal ? a.width : 0, i.vertical ? a.height : 0), s.scale(i.horizontal ? -1 : 1, i.vertical ? -1 : 1), s.drawImage(t, 0, 0, a.width, a.height), s.restore(), e;
|
|
2764
|
-
}(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r =
|
|
2748
|
+
}(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = C({
|
|
2765
2749
|
minWidth: 0,
|
|
2766
2750
|
minHeight: 0,
|
|
2767
2751
|
maxWidth: 1 / 0,
|
|
@@ -2801,7 +2785,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2801
2785
|
var a = e.getContext("2d");
|
|
2802
2786
|
a.clearRect(0, 0, e.width, e.height), i && (i.imageSmoothingEnabled && (a.imageSmoothingEnabled = i.imageSmoothingEnabled), i.imageSmoothingQuality && (a.imageSmoothingQuality = i.imageSmoothingQuality), i.fillColor && (a.fillStyle = i.fillColor, a.fillRect(0, 0, e.width, e.height), a.save()));
|
|
2803
2787
|
var o = n.left < 0 ? -n.left : 0, s = n.top < 0 ? -n.top : 0;
|
|
2804
|
-
a.drawImage(t, n.left + o, n.top + s, n.width, n.height,
|
|
2788
|
+
a.drawImage(t, n.left + o, n.top + s, n.width, n.height, e.width / n.width * o, e.height / n.height * s, e.width, e.height);
|
|
2805
2789
|
}(e, n, this.coordinates, a, r), e;
|
|
2806
2790
|
}
|
|
2807
2791
|
},
|
|
@@ -2825,25 +2809,23 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2825
2809
|
if (this.$refs.image) {
|
|
2826
2810
|
this.$refs.cropper, this.$refs.image;
|
|
2827
2811
|
var t = this.defaultSize;
|
|
2828
|
-
t ||= this.stencilSize ? at : it;
|
|
2829
|
-
var n =
|
|
2830
|
-
n.minWidth, n.minHeight, n.maxWidth, n.maxHeight;
|
|
2831
|
-
var r = I(t) ? t({
|
|
2812
|
+
t ||= this.stencilSize ? at : it, this.sizeRestrictions;
|
|
2813
|
+
var n = L(t) ? t({
|
|
2832
2814
|
boundaries: this.boundaries,
|
|
2833
2815
|
imageSize: this.imageSize,
|
|
2834
2816
|
aspectRatio: this.getAspectRatio(),
|
|
2835
2817
|
sizeRestrictions: this.sizeRestrictions,
|
|
2836
2818
|
stencilSize: this.getStencilSize(),
|
|
2837
2819
|
visibleArea: this.visibleArea
|
|
2838
|
-
}) : t,
|
|
2820
|
+
}) : t, r = this.defaultPosition || rt, i = [n, function(t) {
|
|
2839
2821
|
var n = t.coordinates;
|
|
2840
|
-
return
|
|
2822
|
+
return C({}, L(r) ? r({
|
|
2841
2823
|
coordinates: n,
|
|
2842
2824
|
imageSize: e.imageSize,
|
|
2843
2825
|
visibleArea: e.visibleArea
|
|
2844
2826
|
}) : e.defaultPosition);
|
|
2845
2827
|
}];
|
|
2846
|
-
this.delayedTransforms &&
|
|
2828
|
+
this.delayedTransforms && i.push.apply(i, T(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
|
|
2847
2829
|
}
|
|
2848
2830
|
},
|
|
2849
2831
|
clearImage: function() {
|
|
@@ -2873,7 +2855,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2873
2855
|
cropper: n,
|
|
2874
2856
|
imageSize: e.imageSize
|
|
2875
2857
|
};
|
|
2876
|
-
if (e.boundaries =
|
|
2858
|
+
if (e.boundaries = L(e.defaultBoundaries) ? e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? function(e) {
|
|
2877
2859
|
var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
|
|
2878
2860
|
return o > i && (o = i, a = n.height * i / n.width), {
|
|
2879
2861
|
width: o,
|
|
@@ -2890,10 +2872,10 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2890
2872
|
},
|
|
2891
2873
|
resetVisibleArea: function() {
|
|
2892
2874
|
var e = this;
|
|
2893
|
-
return this.appliedImageTransforms =
|
|
2875
|
+
return this.appliedImageTransforms = C(C({}, this.defaultImageTransforms), {}, { flip: C({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
|
|
2894
2876
|
e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
|
|
2895
2877
|
var t, n, r, i, a, o, s = e.defaultVisibleArea || ot;
|
|
2896
|
-
e.visibleArea =
|
|
2878
|
+
e.visibleArea = L(s) ? s({
|
|
2897
2879
|
imageSize: e.imageSize,
|
|
2898
2880
|
boundaries: e.boundaries,
|
|
2899
2881
|
coordinates: e.priority === "visible-area" ? null : e.coordinates,
|
|
@@ -2903,7 +2885,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2903
2885
|
visibleArea: e.visibleArea,
|
|
2904
2886
|
boundaries: e.boundaries,
|
|
2905
2887
|
getAreaRestrictions: e.getAreaRestrictions
|
|
2906
|
-
}, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a =
|
|
2888
|
+
}, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a = N({}, n), o = J(r), a.width / a.height !== o && (a.height = a.width / o), Z(a, i({
|
|
2907
2889
|
visibleArea: a,
|
|
2908
2890
|
type: "move"
|
|
2909
2891
|
}))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({
|
|
@@ -2944,7 +2926,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2944
2926
|
var e, t = this;
|
|
2945
2927
|
if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
|
|
2946
2928
|
if (function(e) {
|
|
2947
|
-
if (
|
|
2929
|
+
if (I(e)) return !1;
|
|
2948
2930
|
var t = window.location, n = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e) || [], r = {
|
|
2949
2931
|
protocol: n[1] || "",
|
|
2950
2932
|
host: n[2] || "",
|
|
@@ -2954,7 +2936,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2954
2936
|
};
|
|
2955
2937
|
return !(!r.protocol && !r.host && !r.port || r.protocol && r.protocol == t.protocol && r.host && r.host == t.host && r.host && i(r) == i(t));
|
|
2956
2938
|
}(this.src)) {
|
|
2957
|
-
var n =
|
|
2939
|
+
var n = R(this.crossOrigin) ? this.canvas : this.crossOrigin;
|
|
2958
2940
|
!0 === n && (n = "anonymous"), this.imageAttributes.crossOrigin = n || null;
|
|
2959
2941
|
}
|
|
2960
2942
|
if (this.checkOrientation) {
|
|
@@ -2997,13 +2979,13 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
2997
2979
|
},
|
|
2998
2980
|
onParseImage: function(e) {
|
|
2999
2981
|
var t = this, n = e.source, r = e.arrayBuffer, i = e.orientation;
|
|
3000
|
-
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ?
|
|
2982
|
+
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? F(n) || !I(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
|
|
3001
2983
|
for (var t = [], n = new Uint8Array(e); n.length > 0;) {
|
|
3002
2984
|
var r = n.subarray(0, 8192);
|
|
3003
2985
|
t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
|
|
3004
2986
|
}
|
|
3005
2987
|
return "data:image/jpeg;base64," + btoa(t.join(""));
|
|
3006
|
-
}(r) : this.imageAttributes.src = n, this.appliedImageTransforms =
|
|
2988
|
+
}(r) : this.imageAttributes.src = n, this.appliedImageTransforms = L(this.defaultTransforms) ? Tt(this.defaultTransforms()) : be(this.defaultTransforms) ? Tt(this.defaultTransforms) : function(e) {
|
|
3007
2989
|
var t = Tt({});
|
|
3008
2990
|
if (e) switch (e) {
|
|
3009
2991
|
case 2:
|
|
@@ -3027,7 +3009,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3027
3009
|
case 8: t.rotate = -90;
|
|
3028
3010
|
}
|
|
3029
3011
|
return t;
|
|
3030
|
-
}(i), this.defaultImageTransforms =
|
|
3012
|
+
}(i), this.defaultImageTransforms = C(C({}, this.appliedImageTransforms), {}, { flip: C({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
|
|
3031
3013
|
var e = t.$refs.image;
|
|
3032
3014
|
e && e.complete && (function(e) {
|
|
3033
3015
|
return !!e.naturalWidth;
|
|
@@ -3043,7 +3025,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3043
3025
|
onMove: function(e) {
|
|
3044
3026
|
var t = this;
|
|
3045
3027
|
this.transitionsOptions.enabled || this.awaitRender((function() {
|
|
3046
|
-
t.coordinates = t.moveAlgorithm(
|
|
3028
|
+
t.coordinates = t.moveAlgorithm(C(C({}, t.getPublicProperties()), {}, {
|
|
3047
3029
|
positionRestrictions: st(t.positionRestrictions, t.visibleArea),
|
|
3048
3030
|
coordinates: t.coordinates,
|
|
3049
3031
|
event: t.normalizeEvent(e)
|
|
@@ -3054,7 +3036,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3054
3036
|
var t = this;
|
|
3055
3037
|
this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender((function() {
|
|
3056
3038
|
var n = t.sizeRestrictions, r = Math.min(t.coordinates.width, t.coordinates.height, 20 * t.coefficient);
|
|
3057
|
-
t.coordinates = t.resizeAlgorithm(
|
|
3039
|
+
t.coordinates = t.resizeAlgorithm(C(C({}, t.getPublicProperties()), {}, {
|
|
3058
3040
|
positionRestrictions: st(t.positionRestrictions, t.visibleArea),
|
|
3059
3041
|
sizeRestrictions: {
|
|
3060
3042
|
maxWidth: Math.min(n.maxWidth, t.visibleArea.width),
|
|
@@ -3071,7 +3053,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3071
3053
|
if (!this.transitionsOptions.enabled) {
|
|
3072
3054
|
var n = t.transitions, r = n !== void 0 && n, i = t.normalize, a = i === void 0 || i;
|
|
3073
3055
|
r && this.enableTransitions();
|
|
3074
|
-
var o = ct(
|
|
3056
|
+
var o = ct(C(C({}, this.getPublicProperties()), {}, {
|
|
3075
3057
|
event: a ? this.normalizeEvent(e) : e,
|
|
3076
3058
|
getAreaRestrictions: this.getAreaRestrictions,
|
|
3077
3059
|
imageRestriction: this.imageRestriction,
|
|
@@ -3099,9 +3081,9 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3099
3081
|
var s = this.$refs.stencil.aspectRatios();
|
|
3100
3082
|
t = s.minimum, n = s.maximum;
|
|
3101
3083
|
}
|
|
3102
|
-
if (
|
|
3103
|
-
var c = this.getStencilSize(), l = c ?
|
|
3104
|
-
|
|
3084
|
+
if (R(t) && (t = R(i) ? a : i), R(n) && (n = R(i) ? o : i), !e && (R(t) || R(n))) {
|
|
3085
|
+
var c = this.getStencilSize(), l = c ? J(c) : null;
|
|
3086
|
+
R(t) && (t = Se(l) ? l : void 0), R(n) && (n = Se(l) ? l : void 0);
|
|
3105
3087
|
}
|
|
3106
3088
|
return {
|
|
3107
3089
|
minimum: t,
|
|
@@ -3119,7 +3101,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3119
3101
|
coefficient: this.coefficient,
|
|
3120
3102
|
coordinates: this.coordinates,
|
|
3121
3103
|
aspectRatio: this.getAspectRatio(!0)
|
|
3122
|
-
}, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, He(
|
|
3104
|
+
}, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, He(J(i = L(n) ? n({
|
|
3123
3105
|
boundaries: t,
|
|
3124
3106
|
aspectRatio: r
|
|
3125
3107
|
}) : n), r) && (i = Q({
|
|
@@ -3145,8 +3127,8 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3145
3127
|
width: i.width,
|
|
3146
3128
|
height: i.height,
|
|
3147
3129
|
aspectRatio: {
|
|
3148
|
-
minimum:
|
|
3149
|
-
maximum:
|
|
3130
|
+
minimum: J(i),
|
|
3131
|
+
maximum: J(i)
|
|
3150
3132
|
}
|
|
3151
3133
|
})), i;
|
|
3152
3134
|
var e, t, n, r, i;
|
|
@@ -3164,13 +3146,13 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3164
3146
|
};
|
|
3165
3147
|
},
|
|
3166
3148
|
defaultCoordinates: function() {
|
|
3167
|
-
return
|
|
3149
|
+
return C({}, Le);
|
|
3168
3150
|
},
|
|
3169
3151
|
flip: function(e, t) {
|
|
3170
3152
|
var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
|
|
3171
3153
|
if (!this.transitionsActive) {
|
|
3172
3154
|
r && this.enableTransitions();
|
|
3173
|
-
var i =
|
|
3155
|
+
var i = C({}, this.imageTransforms.flip), a = ut({
|
|
3174
3156
|
flip: {
|
|
3175
3157
|
horizontal: e ? !i.horizontal : i.horizontal,
|
|
3176
3158
|
vertical: t ? !i.vertical : i.vertical
|
|
@@ -3192,7 +3174,7 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3192
3174
|
var t = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).transitions, n = t === void 0 || t;
|
|
3193
3175
|
if (!this.transitionsActive) {
|
|
3194
3176
|
n && this.enableTransitions();
|
|
3195
|
-
var r =
|
|
3177
|
+
var r = C({}, this.imageSize);
|
|
3196
3178
|
this.appliedImageTransforms.rotate += e;
|
|
3197
3179
|
var i = lt({
|
|
3198
3180
|
visibleArea: this.visibleArea,
|
|
@@ -3223,54 +3205,54 @@ var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
|
3223
3205
|
ref: "sourceCanvas",
|
|
3224
3206
|
style: { display: "none" }
|
|
3225
3207
|
};
|
|
3226
|
-
Rt.render = function(
|
|
3227
|
-
return
|
|
3208
|
+
Rt.render = function(e, t, n, r, i, o) {
|
|
3209
|
+
return a(), h("div", {
|
|
3228
3210
|
ref: "cropper",
|
|
3229
|
-
class:
|
|
3230
|
-
}, [
|
|
3211
|
+
class: o.classes.cropper
|
|
3212
|
+
}, [S("div", {
|
|
3231
3213
|
ref: "stretcher",
|
|
3232
|
-
class:
|
|
3233
|
-
}, null, 2),
|
|
3234
|
-
class:
|
|
3235
|
-
style:
|
|
3236
|
-
}, [(
|
|
3237
|
-
class:
|
|
3238
|
-
"wheel-resize":
|
|
3239
|
-
"touch-resize":
|
|
3240
|
-
"touch-move":
|
|
3241
|
-
"mouse-move":
|
|
3242
|
-
onMove:
|
|
3243
|
-
onResize:
|
|
3214
|
+
class: o.classes.stretcher
|
|
3215
|
+
}, null, 2), S("div", {
|
|
3216
|
+
class: o.classes.boundaries,
|
|
3217
|
+
style: o.boundariesStyle
|
|
3218
|
+
}, [(a(), h(ae(n.backgroundWrapperComponent), {
|
|
3219
|
+
class: o.classes.cropperWrapper,
|
|
3220
|
+
"wheel-resize": o.settings.resizeImage.wheel,
|
|
3221
|
+
"touch-resize": o.settings.resizeImage.touch,
|
|
3222
|
+
"touch-move": o.settings.moveImage.touch,
|
|
3223
|
+
"mouse-move": o.settings.moveImage.mouse,
|
|
3224
|
+
onMove: o.onManipulateImage,
|
|
3225
|
+
onResize: o.onManipulateImage
|
|
3244
3226
|
}, {
|
|
3245
|
-
default:
|
|
3227
|
+
default: s((function() {
|
|
3246
3228
|
return [
|
|
3247
|
-
|
|
3248
|
-
class:
|
|
3249
|
-
style:
|
|
3229
|
+
S("div", {
|
|
3230
|
+
class: o.classes.background,
|
|
3231
|
+
style: o.boundariesStyle
|
|
3250
3232
|
}, null, 6),
|
|
3251
|
-
|
|
3233
|
+
S("div", { class: o.classes.imageWrapper }, [S("img", {
|
|
3252
3234
|
ref: "image",
|
|
3253
|
-
crossorigin:
|
|
3254
|
-
src:
|
|
3255
|
-
class:
|
|
3256
|
-
style:
|
|
3257
|
-
onMousedown:
|
|
3235
|
+
crossorigin: i.imageAttributes.crossOrigin,
|
|
3236
|
+
src: i.imageAttributes.src,
|
|
3237
|
+
class: o.classes.image,
|
|
3238
|
+
style: o.imageStyle,
|
|
3239
|
+
onMousedown: t[1] ||= _((function() {}), ["prevent"])
|
|
3258
3240
|
}, null, 46, ["crossorigin", "src"])], 2),
|
|
3259
|
-
|
|
3260
|
-
class:
|
|
3261
|
-
style:
|
|
3241
|
+
S("div", {
|
|
3242
|
+
class: o.classes.foreground,
|
|
3243
|
+
style: o.boundariesStyle
|
|
3262
3244
|
}, null, 6),
|
|
3263
|
-
|
|
3245
|
+
l((a(), h(ae(n.stencilComponent), g({
|
|
3264
3246
|
ref: "stencil",
|
|
3265
|
-
image:
|
|
3266
|
-
coordinates:
|
|
3267
|
-
"stencil-coordinates":
|
|
3268
|
-
transitions:
|
|
3269
|
-
},
|
|
3270
|
-
onResize:
|
|
3271
|
-
onResizeEnd:
|
|
3272
|
-
onMove:
|
|
3273
|
-
onMoveEnd:
|
|
3247
|
+
image: o.image,
|
|
3248
|
+
coordinates: i.coordinates,
|
|
3249
|
+
"stencil-coordinates": o.stencilCoordinates,
|
|
3250
|
+
transitions: o.transitionsOptions
|
|
3251
|
+
}, n.stencilProps, {
|
|
3252
|
+
onResize: o.onResize,
|
|
3253
|
+
onResizeEnd: o.onResizeEnd,
|
|
3254
|
+
onMove: o.onMove,
|
|
3255
|
+
onMoveEnd: o.onMoveEnd
|
|
3274
3256
|
}), null, 16, [
|
|
3275
3257
|
"image",
|
|
3276
3258
|
"coordinates",
|
|
@@ -3280,9 +3262,9 @@ Rt.render = function(t, i, a, o, s, c) {
|
|
|
3280
3262
|
"onResizeEnd",
|
|
3281
3263
|
"onMove",
|
|
3282
3264
|
"onMoveEnd"
|
|
3283
|
-
])), [[
|
|
3284
|
-
|
|
3285
|
-
|
|
3265
|
+
])), [[x, i.imageLoaded]]),
|
|
3266
|
+
n.canvas ? (a(), h("canvas", zt, null, 512)) : m("", !0),
|
|
3267
|
+
n.canvas ? (a(), h("canvas", Bt, null, 512)) : m("", !0)
|
|
3286
3268
|
];
|
|
3287
3269
|
})),
|
|
3288
3270
|
_: 1
|
|
@@ -3357,7 +3339,7 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3357
3339
|
role: "alert",
|
|
3358
3340
|
class: "tpl:shrink-0 tpl:px-5 tpl:pt-3 tpl:text-xs",
|
|
3359
3341
|
style: { color: "var(--tpl-danger)" }
|
|
3360
|
-
}, bn = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, xn = ["disabled"], Sn = ["disabled"], Cn = /*#__PURE__*/
|
|
3342
|
+
}, bn = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, xn = ["disabled"], Sn = ["disabled"], Cn = /*#__PURE__*/ oe(/* @__PURE__ */ t({
|
|
3361
3343
|
__name: "MediaEditModal",
|
|
3362
3344
|
props: {
|
|
3363
3345
|
visible: { type: Boolean },
|
|
@@ -3366,16 +3348,16 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3366
3348
|
canCrop: { type: Boolean }
|
|
3367
3349
|
},
|
|
3368
3350
|
emits: ["close"],
|
|
3369
|
-
setup(
|
|
3370
|
-
let o =
|
|
3351
|
+
setup(t, { emit: i }) {
|
|
3352
|
+
let o = t, g = i, { t: x } = ue(), ae = n(le, null), oe = n(se, e(null)), _e = x.mediaLibrary, { isImageMimeType: C } = ce(), w = e(""), ve = e(""), T = e(null), E = e("free"), D = e(void 0), O = e(void 0), k = e(""), A = e(""), j = e(void 0), M = e(null), ye = e(!1), N = e(!1), P = e(!1), F = e(null), I = null, L = [
|
|
3371
3353
|
"image/jpeg",
|
|
3372
3354
|
"image/png",
|
|
3373
3355
|
"image/webp"
|
|
3374
|
-
],
|
|
3375
|
-
|
|
3376
|
-
e && o.item && (
|
|
3356
|
+
], R = ne(() => !o.item || !o.canCrop ? !1 : L.includes(o.item.mimeType ?? "")), be = ne(() => D.value !== void 0 || O.value !== void 0), xe = ne(() => E.value === "original" ? j.value : fe[E.value]), z = ne(() => M.value ? ge(M.value.width, M.value.height, D.value, O.value) : null);
|
|
3357
|
+
c(() => o.visible, (e) => {
|
|
3358
|
+
e && o.item && (w.value = o.item.filename ?? "", ve.value = o.item.alt ?? "", E.value = "free", D.value = void 0, O.value = void 0, k.value = "", A.value = "", j.value = void 0, M.value = null, ye.value = !1, P.value = !1, F.value = null, I = null, o.item.width && o.item.height && (j.value = o.item.width / o.item.height));
|
|
3377
3359
|
}, { immediate: !0 });
|
|
3378
|
-
function
|
|
3360
|
+
function Se(e) {
|
|
3379
3361
|
return {
|
|
3380
3362
|
left: Math.round(e.left),
|
|
3381
3363
|
top: Math.round(e.top),
|
|
@@ -3383,67 +3365,67 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3383
3365
|
height: Math.round(e.height)
|
|
3384
3366
|
};
|
|
3385
3367
|
}
|
|
3386
|
-
function
|
|
3368
|
+
function Ce(e, t) {
|
|
3387
3369
|
return e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height;
|
|
3388
3370
|
}
|
|
3389
|
-
function
|
|
3371
|
+
function we(e) {
|
|
3390
3372
|
if (!e.coordinates) return;
|
|
3391
|
-
let t =
|
|
3392
|
-
|
|
3373
|
+
let t = Se(e.coordinates);
|
|
3374
|
+
M.value = {
|
|
3393
3375
|
width: t.width,
|
|
3394
3376
|
height: t.height
|
|
3395
|
-
},
|
|
3377
|
+
}, I ? P.value = !Ce(t, I) : I = t;
|
|
3396
3378
|
}
|
|
3397
|
-
function
|
|
3379
|
+
function B({ imageSize: e }) {
|
|
3398
3380
|
return {
|
|
3399
3381
|
width: e.width,
|
|
3400
3382
|
height: e.height
|
|
3401
3383
|
};
|
|
3402
3384
|
}
|
|
3403
|
-
function
|
|
3404
|
-
|
|
3385
|
+
function Te() {
|
|
3386
|
+
ye.value = !0, !j.value && o.item?.width && o.item?.height && (j.value = o.item.width / o.item.height);
|
|
3405
3387
|
}
|
|
3406
|
-
function
|
|
3388
|
+
function Ee(e) {
|
|
3407
3389
|
let t = e.target.value;
|
|
3408
|
-
|
|
3390
|
+
k.value = t, D.value = t && parseInt(t, 10) || void 0;
|
|
3409
3391
|
}
|
|
3410
|
-
function
|
|
3392
|
+
function De(e) {
|
|
3411
3393
|
let t = e.target.value;
|
|
3412
|
-
|
|
3394
|
+
A.value = t, O.value = t && parseInt(t, 10) || void 0;
|
|
3413
3395
|
}
|
|
3414
|
-
async function
|
|
3415
|
-
let e =
|
|
3416
|
-
if (!e || !o.item ||
|
|
3417
|
-
let t = o.item, n =
|
|
3418
|
-
if (
|
|
3419
|
-
let { canvas: e } =
|
|
3396
|
+
async function Oe() {
|
|
3397
|
+
let e = w.value.trim();
|
|
3398
|
+
if (!e || !o.item || N.value) return;
|
|
3399
|
+
let t = o.item, n = C(t.mimeType ?? ""), r;
|
|
3400
|
+
if (N.value = !0, F.value = null, R.value && T.value && (P.value || be.value)) try {
|
|
3401
|
+
let { canvas: e } = T.value.getResult();
|
|
3420
3402
|
if (!e) throw Error("The cropper returned no canvas");
|
|
3421
|
-
let n =
|
|
3422
|
-
(
|
|
3403
|
+
let n = me(e, D.value, O.value);
|
|
3404
|
+
(P.value || n !== e) && (r = { file: await he(n, t.filename ?? "image", pe(t.mimeType ?? "")) });
|
|
3423
3405
|
} catch {
|
|
3424
|
-
|
|
3406
|
+
F.value = "crop", N.value = !1;
|
|
3425
3407
|
return;
|
|
3426
3408
|
}
|
|
3427
|
-
let i = await o.save(t.id, e, n ?
|
|
3428
|
-
|
|
3409
|
+
let i = await o.save(t.id, e, n ? ve.value : void 0, r);
|
|
3410
|
+
N.value = !1, i === "saved" ? g("close") : (i === "replaced" && ke(), F.value = "save");
|
|
3429
3411
|
}
|
|
3430
|
-
function
|
|
3431
|
-
let e =
|
|
3432
|
-
e && (
|
|
3412
|
+
function ke() {
|
|
3413
|
+
let e = T.value?.getResult().coordinates;
|
|
3414
|
+
e && (I = Se(e)), P.value = !1, D.value = void 0, O.value = void 0, k.value = "", A.value = "";
|
|
3433
3415
|
}
|
|
3434
|
-
function
|
|
3435
|
-
|
|
3416
|
+
function Ae() {
|
|
3417
|
+
N.value || g("close");
|
|
3436
3418
|
}
|
|
3437
|
-
let
|
|
3438
|
-
|
|
3439
|
-
function
|
|
3440
|
-
if (e.stopPropagation(), e.key === "Enter" && !
|
|
3419
|
+
let je = e(null), Me = ne(() => o.visible && o.item !== null);
|
|
3420
|
+
de(je, Me);
|
|
3421
|
+
function V(e) {
|
|
3422
|
+
if (e.stopPropagation(), e.key === "Enter" && !N.value) {
|
|
3441
3423
|
if (e.target?.closest("textarea, [contenteditable]")) return;
|
|
3442
|
-
e.preventDefault(),
|
|
3424
|
+
e.preventDefault(), Oe();
|
|
3443
3425
|
}
|
|
3444
|
-
e.key === "Escape" &&
|
|
3426
|
+
e.key === "Escape" && Ae();
|
|
3445
3427
|
}
|
|
3446
|
-
return (
|
|
3428
|
+
return (e, n) => (a(), h(p, { to: b(oe) || "body" }, [S(ee, {
|
|
3447
3429
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
3448
3430
|
"enter-from-class": "tpl:opacity-0",
|
|
3449
3431
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -3451,54 +3433,54 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3451
3433
|
"leave-from-class": "tpl:opacity-100",
|
|
3452
3434
|
"leave-to-class": "tpl:opacity-0"
|
|
3453
3435
|
}, {
|
|
3454
|
-
default:
|
|
3436
|
+
default: s(() => [t.visible && t.item ? (a(), u("div", {
|
|
3455
3437
|
key: 0,
|
|
3456
|
-
"data-tpl-theme":
|
|
3457
|
-
class:
|
|
3438
|
+
"data-tpl-theme": b(ae),
|
|
3439
|
+
class: v([b(oe) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
3458
3440
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
3459
|
-
onClick:
|
|
3460
|
-
onKeydown:
|
|
3461
|
-
}, [
|
|
3441
|
+
onClick: _(Ae, ["self"]),
|
|
3442
|
+
onKeydown: V
|
|
3443
|
+
}, [y("div", {
|
|
3462
3444
|
ref_key: "dialogRef",
|
|
3463
|
-
ref:
|
|
3445
|
+
ref: je,
|
|
3464
3446
|
role: "dialog",
|
|
3465
3447
|
"aria-modal": "true",
|
|
3466
3448
|
"aria-labelledby": "tpl-media-edit-title",
|
|
3467
|
-
class:
|
|
3449
|
+
class: v(["tpl:flex tpl:max-h-[90%] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", R.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
|
|
3468
3450
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
3469
3451
|
}, [
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3452
|
+
y("div", Ht, [y("h3", Ut, f(b(x).mediaLibrary.editFile), 1)]),
|
|
3453
|
+
y("div", Wt, [
|
|
3454
|
+
R.value ? (a(), u("div", Gt, [y("div", Kt, [S(b(Rt), {
|
|
3473
3455
|
ref_key: "cropperRef",
|
|
3474
|
-
ref:
|
|
3475
|
-
src:
|
|
3476
|
-
"stencil-props": { aspectRatio:
|
|
3456
|
+
ref: T,
|
|
3457
|
+
src: t.item.url,
|
|
3458
|
+
"stencil-props": { aspectRatio: xe.value },
|
|
3477
3459
|
class: "tpl:h-full tpl:w-full",
|
|
3478
3460
|
"background-class": "tpl-cropper-background",
|
|
3479
|
-
"default-size":
|
|
3480
|
-
onChange:
|
|
3481
|
-
onReady:
|
|
3482
|
-
}, null, 8, ["src", "stencil-props"])]),
|
|
3483
|
-
|
|
3461
|
+
"default-size": B,
|
|
3462
|
+
onChange: we,
|
|
3463
|
+
onReady: Te
|
|
3464
|
+
}, null, 8, ["src", "stencil-props"])]), y("div", qt, [
|
|
3465
|
+
y("div", null, [y("label", Jt, f(b(x).mediaLibrary.cropAspectRatio), 1), y("div", Yt, [(a(), u(re, null, r([
|
|
3484
3466
|
"free",
|
|
3485
3467
|
"square",
|
|
3486
3468
|
"landscape43",
|
|
3487
3469
|
"landscape169",
|
|
3488
3470
|
"original"
|
|
3489
|
-
], (e) =>
|
|
3471
|
+
], (e) => y("button", {
|
|
3490
3472
|
key: e,
|
|
3491
3473
|
type: "button",
|
|
3492
3474
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
3493
|
-
style:
|
|
3494
|
-
borderColor:
|
|
3495
|
-
backgroundColor:
|
|
3496
|
-
color:
|
|
3475
|
+
style: ie({
|
|
3476
|
+
borderColor: E.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
3477
|
+
backgroundColor: E.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
|
|
3478
|
+
color: E.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
3497
3479
|
}),
|
|
3498
|
-
onClick: (t) =>
|
|
3499
|
-
},
|
|
3500
|
-
|
|
3501
|
-
value:
|
|
3480
|
+
onClick: (t) => E.value = e
|
|
3481
|
+
}, f(b(_e)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Xt)), 64))])]),
|
|
3482
|
+
y("div", Zt, [y("div", Qt, [y("label", $t, [d(f(b(x).mediaLibrary.cropMaxWidth) + " ", 1), y("span", en, f(b(x).mediaLibrary.cropOptional), 1)]), y("div", tn, [y("input", {
|
|
3483
|
+
value: k.value,
|
|
3502
3484
|
type: "number",
|
|
3503
3485
|
min: "1",
|
|
3504
3486
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -3507,10 +3489,10 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3507
3489
|
"background-color": "var(--tpl-bg)",
|
|
3508
3490
|
color: "var(--tpl-text)"
|
|
3509
3491
|
},
|
|
3510
|
-
placeholder:
|
|
3511
|
-
onInput:
|
|
3512
|
-
}, null, 40, nn),
|
|
3513
|
-
value:
|
|
3492
|
+
placeholder: M.value?.width?.toString() || "",
|
|
3493
|
+
onInput: Ee
|
|
3494
|
+
}, null, 40, nn), y("span", rn, f(b(x).mediaLibrary.cropPixels), 1)])]), y("div", an, [y("label", on, [d(f(b(x).mediaLibrary.cropMaxHeight) + " ", 1), y("span", sn, f(b(x).mediaLibrary.cropOptional), 1)]), y("div", cn, [y("input", {
|
|
3495
|
+
value: A.value,
|
|
3514
3496
|
type: "number",
|
|
3515
3497
|
min: "1",
|
|
3516
3498
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -3519,14 +3501,14 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3519
3501
|
"background-color": "var(--tpl-bg)",
|
|
3520
3502
|
color: "var(--tpl-text)"
|
|
3521
3503
|
},
|
|
3522
|
-
placeholder:
|
|
3523
|
-
onInput:
|
|
3524
|
-
}, null, 40, ln),
|
|
3525
|
-
|
|
3526
|
-
])])) :
|
|
3527
|
-
|
|
3504
|
+
placeholder: M.value?.height?.toString() || "",
|
|
3505
|
+
onInput: De
|
|
3506
|
+
}, null, 40, ln), y("span", un, f(b(x).mediaLibrary.cropPixels), 1)])])]),
|
|
3507
|
+
z.value ? (a(), u("div", dn, [y("span", null, f(b(x).mediaLibrary.cropOutputSize) + ": ", 1), y("span", fn, f(z.value.width) + " x " + f(z.value.height) + " " + f(b(x).mediaLibrary.cropPixels), 1)])) : m("", !0)
|
|
3508
|
+
])])) : m("", !0),
|
|
3509
|
+
y("div", pn, [y("label", mn, f(b(x).mediaLibrary.fileName), 1), l(y("input", {
|
|
3528
3510
|
id: "tpl-media-filename",
|
|
3529
|
-
"onUpdate:modelValue":
|
|
3511
|
+
"onUpdate:modelValue": n[0] ||= (e) => w.value = e,
|
|
3530
3512
|
type: "text",
|
|
3531
3513
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
3532
3514
|
style: {
|
|
@@ -3534,11 +3516,11 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3534
3516
|
"background-color": "var(--tpl-bg)",
|
|
3535
3517
|
color: "var(--tpl-text)"
|
|
3536
3518
|
},
|
|
3537
|
-
autofocus: !
|
|
3538
|
-
}, null, 8, hn), [[
|
|
3539
|
-
|
|
3519
|
+
autofocus: !R.value
|
|
3520
|
+
}, null, 8, hn), [[te, w.value]])]),
|
|
3521
|
+
b(C)(t.item.mimeType ?? "") ? (a(), u("div", gn, [y("label", _n, f(b(x).mediaLibrary.altText), 1), l(y("input", {
|
|
3540
3522
|
id: "tpl-media-alt",
|
|
3541
|
-
"onUpdate:modelValue":
|
|
3523
|
+
"onUpdate:modelValue": n[1] ||= (e) => ve.value = e,
|
|
3542
3524
|
type: "text",
|
|
3543
3525
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
3544
3526
|
style: {
|
|
@@ -3546,32 +3528,34 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3546
3528
|
"background-color": "var(--tpl-bg)",
|
|
3547
3529
|
color: "var(--tpl-text)"
|
|
3548
3530
|
},
|
|
3549
|
-
placeholder:
|
|
3550
|
-
}, null, 8, vn), [[
|
|
3531
|
+
placeholder: b(x).mediaLibrary.altTextPlaceholder
|
|
3532
|
+
}, null, 8, vn), [[te, ve.value]])])) : m("", !0)
|
|
3551
3533
|
]),
|
|
3552
|
-
|
|
3553
|
-
|
|
3534
|
+
F.value ? (a(), u("p", yn, f(F.value === "crop" ? b(x).mediaLibrary.editCropError : b(x).mediaLibrary.editSaveError), 1)) : m("", !0),
|
|
3535
|
+
y("div", bn, [y("button", {
|
|
3554
3536
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
3555
3537
|
style: {
|
|
3556
3538
|
"border-color": "var(--tpl-border)",
|
|
3557
3539
|
color: "var(--tpl-text)",
|
|
3558
3540
|
"background-color": "var(--tpl-bg)"
|
|
3559
3541
|
},
|
|
3560
|
-
disabled:
|
|
3561
|
-
onClick:
|
|
3562
|
-
},
|
|
3542
|
+
disabled: N.value,
|
|
3543
|
+
onClick: Ae
|
|
3544
|
+
}, f(b(x).mediaLibrary.cancel), 9, xn), y("button", {
|
|
3563
3545
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
3564
3546
|
style: {
|
|
3565
3547
|
"background-color": "var(--tpl-primary)",
|
|
3566
3548
|
color: "var(--tpl-on-primary)"
|
|
3567
3549
|
},
|
|
3568
|
-
disabled:
|
|
3569
|
-
onClick:
|
|
3570
|
-
},
|
|
3571
|
-
], 2)], 42, Vt)) :
|
|
3550
|
+
disabled: N.value,
|
|
3551
|
+
onClick: Oe
|
|
3552
|
+
}, f(N.value ? b(x).mediaLibrary.saving : b(x).mediaLibrary.saveChanges), 9, Sn)])
|
|
3553
|
+
], 2)], 42, Vt)) : m("", !0)]),
|
|
3572
3554
|
_: 1
|
|
3573
3555
|
})], 8, ["to"]));
|
|
3574
3556
|
}
|
|
3575
3557
|
}), [["__scopeId", "data-v-7d9a1872"]]);
|
|
3576
3558
|
//#endregion
|
|
3577
3559
|
export { Cn as default };
|
|
3560
|
+
|
|
3561
|
+
//# sourceMappingURL=MediaEditModal-BuHCiyMu.js.map
|