@templatical/editor 0.43.1 → 0.43.2
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/dist/{AiChatSidebar-DOCvzGBe.js → AiChatSidebar-DTtMEXNR.js} +7 -7
- package/dist/{AiFeatureMenu-xCJeD07B.js → AiFeatureMenu-DFj-_S9b.js} +4 -4
- package/dist/{BlockIssueBadge-BJ3A6mqh.js → BlockIssueBadge-CyLmqjLl.js} +2 -2
- package/dist/{BlockPreviewCanvas-BQXfqhzu.js → BlockPreviewCanvas-C6F66f3k.js} +2 -2
- package/dist/{CloudHeaderExtras-TFmBJ0Ry.js → CloudHeaderExtras-Z4K6OMn0.js} +2 -2
- package/dist/{CloudPanels-BnSBbYnw.js → CloudPanels-DOJ2Vske.js} +4 -4
- package/dist/{CollaboratorBar-7ry8EdUh.js → CollaboratorBar-BCkl3dKY.js} +2 -2
- package/dist/{CommentsPanel-CGEhbjx0.js → CommentsPanel-DPMi6-rb.js} +1 -1
- package/dist/{CommentsSidebar-CUpst9ou.js → CommentsSidebar-C1mQcyh3.js} +10 -10
- package/dist/{CountdownToolbar-B1a_UIuB.js → CountdownToolbar-DKmzpk__.js} +3 -3
- package/dist/{DesignReferenceSidebar-DkAmsBgM.js → DesignReferenceSidebar-CGRzOOb8.js} +5 -5
- package/dist/{IssuesPanel-lTpsCV4a.js → IssuesPanel-CsdxjjRm.js} +5 -5
- package/dist/{LogicTagInsertButton-B5YymR4U.js → LogicTagInsertButton-BX4jOUQy.js} +3 -3
- package/dist/{MediaEditModal-B1X8qtJb.js → MediaEditModal-Bm8uOKBx.js} +270 -230
- package/dist/{MediaPanels-DO30L1KS.js → MediaPanels-BNWtEntu.js} +1 -1
- package/dist/{MergeTagInput-B0M_-X0K.js → MergeTagInput-Mj8CFfX1.js} +1 -1
- package/dist/{MergeTagModeToggle-B-8W1tK7.js → MergeTagModeToggle-CinojvpV.js} +3 -3
- package/dist/{ParagraphEditor-DVGeU0Am.js → ParagraphEditor-DdOteRjD.js} +9 -9
- package/dist/{RestoreVersionDialog-DOhgYkiA.js → RestoreVersionDialog-B-i0wPjh.js} +3 -3
- package/dist/{RichTextEditorContent-AaLAArA0.js → RichTextEditorContent-CDtKOWsh.js} +4 -4
- package/dist/{SaveBlockDialog-36MzPD2S.js → SaveBlockDialog-DTcGPDMT.js} +8 -8
- package/dist/{SavedBlocksBrowserModal-B5nFKszf.js → SavedBlocksBrowserModal-BA5yXQi0.js} +9 -9
- package/dist/{SavedBlocksPanels-BZkbP7eB.js → SavedBlocksPanels-mfSALJqB.js} +1 -1
- package/dist/{SavedBlocksPickBar-ChoCMdu7.js → SavedBlocksPickBar-BOjduGI4.js} +2 -2
- package/dist/{TemplateScoringPanel-C6ellAcs.js → TemplateScoringPanel-Byz-ajjf.js} +11 -11
- package/dist/{TemplateSettings-C_0qK-zs.js → TemplateSettings-Bf5rfsU8.js} +5 -5
- package/dist/{TestEmailModal-CKW-VArm.js → TestEmailModal-DJo2yFLh.js} +6 -6
- package/dist/{TestEmailPanel-BylYzjyM.js → TestEmailPanel-CXIFWfDm.js} +1 -1
- package/dist/{TitleEditor-DoQ286_n.js → TitleEditor-BDtokkQF.js} +6 -6
- package/dist/{ToggleSwitch-CtZ6adlX.js → ToggleSwitch-BCYZvP1e.js} +1 -1
- package/dist/{Toolbar-B6dG5_IP.js → Toolbar-XOtJ_N58.js} +20 -20
- package/dist/{TplModal-DHwQXySQ.js → TplModal-C3mzMXof.js} +1 -1
- package/dist/{VersionHistoryMenu-DdspCRSA.js → VersionHistoryMenu-DRoFz15y.js} +5 -5
- package/dist/{VersionHistoryPanels-C6QxmRUH.js → VersionHistoryPanels-CeF0JnXI.js} +1 -1
- package/dist/{VersionPreviewBanner-XUuLe36h.js → VersionPreviewBanner-DQvIEKUU.js} +1 -1
- package/dist/{WrapperBlock-BumDudbj.js → WrapperBlock-DZwp4G7P.js} +1 -1
- package/dist/{blockTypeIcons-Sg8SY1NQ.js → blockTypeIcons-CAPoy6X7.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +6 -2
- package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js → AiChatSidebar-DW1uRkKE.js} +2 -2
- package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js.map → AiChatSidebar-DW1uRkKE.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js → AiFeatureMenu-CHsgD78N.js} +3 -3
- package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js.map → AiFeatureMenu-CHsgD78N.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js → BlockIssueBadge-CIqu8JnG.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js.map → BlockIssueBadge-CIqu8JnG.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js → BlockPreviewCanvas-Dtea66SI.js} +3 -3
- package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js.map → BlockPreviewCanvas-Dtea66SI.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js → CloudHeaderExtras-Kjj78__m.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js.map → CloudHeaderExtras-Kjj78__m.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-INOiwkET.js → CloudPanels-DARXXD0q.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-INOiwkET.js.map → CloudPanels-DARXXD0q.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js → CollaboratorBar-C7O9mQJ_.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js.map → CollaboratorBar-C7O9mQJ_.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js → CommentsPanel-KH5_JS7_.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js.map → CommentsPanel-KH5_JS7_.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js → CommentsSidebar-ucrNvgAQ.js} +2 -2
- package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js.map → CommentsSidebar-ucrNvgAQ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js → CountdownToolbar-DVInzkj9.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js.map → CountdownToolbar-DVInzkj9.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js → DesignReferenceSidebar-pleljkEJ.js} +2 -2
- package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js.map → DesignReferenceSidebar-pleljkEJ.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js → IssuesPanel-CPcQIUni.js} +2 -2
- package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js.map → IssuesPanel-CPcQIUni.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js → LogicTagInsertButton-DSrW9v0x.js} +2 -2
- package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js.map → LogicTagInsertButton-DSrW9v0x.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CzUtXkpk.js → MediaEditModal-BHp7euCZ.js} +272 -232
- package/dist/cdn/chunks/MediaEditModal-BHp7euCZ.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js → MediaPanels-CGIRlO48.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js.map → MediaPanels-CGIRlO48.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js → MergeTagInput-BSFofWuc.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js.map → MergeTagInput-BSFofWuc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js → MergeTagModeToggle-D7KlTFZV.js} +2 -2
- package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js.map → MergeTagModeToggle-D7KlTFZV.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js → ParagraphEditor-CokXagL1.js} +6 -6
- package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js.map → ParagraphEditor-CokXagL1.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js → RestoreVersionDialog-C-XEncAM.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js.map → RestoreVersionDialog-C-XEncAM.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js → RichTextEditorContent-DS_2UsJX.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js.map → RichTextEditorContent-DS_2UsJX.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js → SaveBlockDialog-D8OAKF_k.js} +6 -6
- package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js.map → SaveBlockDialog-D8OAKF_k.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js → SavedBlocksBrowserModal-B6GN_llD.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js.map → SavedBlocksBrowserModal-B6GN_llD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js → SavedBlocksPanels-hRCREVxS.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js.map → SavedBlocksPanels-hRCREVxS.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js → SavedBlocksPickBar-C5YrK0iB.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js.map → SavedBlocksPickBar-C5YrK0iB.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js → TemplateScoringPanel-DXyQjcdU.js} +2 -2
- package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js.map → TemplateScoringPanel-DXyQjcdU.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js → TemplateSettings-da14bXlk.js} +4 -4
- package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js.map → TemplateSettings-da14bXlk.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js → TestEmailModal-Dl_cAyj-.js} +6 -6
- package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js.map → TestEmailModal-Dl_cAyj-.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js → TestEmailPanel-CVZGOKaQ.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js.map → TestEmailPanel-CVZGOKaQ.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js → TitleEditor-DO8OdG_w.js} +5 -5
- package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js.map → TitleEditor-DO8OdG_w.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js → ToggleSwitch-D5Wi6Env.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js.map → ToggleSwitch-D5Wi6Env.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js → Toolbar-CXDE8xM-.js} +7 -7
- package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js.map → Toolbar-CXDE8xM-.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js → TplModal-CFi-Psf7.js} +2 -2
- package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js.map → TplModal-CFi-Psf7.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js → VersionHistoryMenu-1bfCr14E.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js.map → VersionHistoryMenu-1bfCr14E.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js → VersionHistoryPanels-DbgbyAdW.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js.map → VersionHistoryPanels-DbgbyAdW.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js → VersionPreviewBanner-BaOTRIrm.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js.map → VersionPreviewBanner-BaOTRIrm.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js → WrapperBlock-BYNfYvl3.js} +2 -2
- package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js.map → WrapperBlock-BYNfYvl3.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js → blockTypeIcons-B_IAjnTD.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js.map → blockTypeIcons-B_IAjnTD.js.map} +1 -1
- package/dist/cdn/chunks/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +7 -3
- package/dist/cdn/chunks/ca-CYQH3J0b.js.map +1 -0
- package/dist/cdn/chunks/{de-xzrh9PA3.js → de-JvCTMJPy.js} +7 -3
- package/dist/cdn/chunks/de-JvCTMJPy.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CZQArGNj.js → editor-modal-BDOfw3l0.js} +472 -428
- package/dist/cdn/chunks/editor-modal-BDOfw3l0.js.map +1 -0
- package/dist/cdn/chunks/en-DxpXHoxJ.js +2 -0
- package/dist/cdn/chunks/{es-BT4LSpE2.js → es-CAv-Vldw.js} +7 -3
- package/dist/cdn/chunks/es-CAv-Vldw.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Dy251lPd.js → extensions-1hJBHnGv.js} +2 -2
- package/dist/cdn/chunks/{extensions-Dy251lPd.js.map → extensions-1hJBHnGv.js.map} +1 -1
- package/dist/{fr-CI7OJoql.js → cdn/chunks/fr-DVPtxpR6.js} +8 -2
- package/dist/cdn/chunks/fr-DVPtxpR6.js.map +1 -0
- package/dist/cdn/chunks/{icons-CQnjugjy.js → icons-BrAyaJ0T.js} +6 -6
- package/dist/cdn/chunks/{icons-CQnjugjy.js.map → icons-BrAyaJ0T.js.map} +1 -1
- package/dist/{ja-DhlWUfke.js → cdn/chunks/ja-dcWzjStz.js} +8 -2
- package/dist/cdn/chunks/ja-dcWzjStz.js.map +1 -0
- package/dist/{nl-D8y5OWGB.js → cdn/chunks/nl-LZNqQgE4.js} +8 -2
- package/dist/cdn/chunks/nl-LZNqQgE4.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +7 -3
- package/dist/cdn/chunks/pt-BR-D6P_mNwA.js.map +1 -0
- package/dist/cdn/chunks/{src-BwsQ27UT.js → src-D5ceT_Y4.js} +2 -2
- package/dist/cdn/chunks/{src-BwsQ27UT.js.map → src-D5ceT_Y4.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js → useEditorCore-BTKqlRIg.js} +5 -5
- package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js.map → useEditorCore-BTKqlRIg.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +14 -14
- package/dist/{check-BMx_TLAS.js → check-CA6fvSIp.js} +1 -1
- package/dist/{chevron-down-KZf5mh9_.js → chevron-down-DYGJgpqJ.js} +1 -1
- package/dist/{chevron-right-BLZ60Vxw.js → chevron-right-Dm5_X4j6.js} +1 -1
- package/dist/{chevron-up-B9ynB8eU.js → chevron-up-Ds9ormyq.js} +1 -1
- package/dist/{circle-alert-pjvFFDrF.js → circle-alert-BYXE0olE.js} +1 -1
- package/dist/{clock-CiiTBfF3.js → clock-Ch1-h0sb.js} +1 -1
- package/dist/{copy-BF0_pQjH.js → copy-DLNyaPza.js} +1 -1
- package/dist/{createLucideIcon-C2YOVVWx.js → createLucideIcon-BrPnbRQT.js} +5 -5
- package/dist/{de-xzrh9PA3.js → de-JvCTMJPy.js} +6 -2
- package/dist/{editor-modal-99FB40dl.js → editor-modal-Cl5GFWTQ.js} +484 -440
- package/dist/en-CdCFaV2V.js +2 -0
- package/dist/{es-BT4LSpE2.js → es-CAv-Vldw.js} +6 -2
- package/dist/{extensions-DqQXxrvP.js → extensions-AKHJ0lax.js} +1 -1
- package/dist/{eye-RdXYgrQZ.js → eye-_7xKFxQh.js} +1 -1
- package/dist/{cdn/chunks/fr-CI7OJoql.js → fr-DVPtxpR6.js} +6 -4
- package/dist/{image-up-BwdoReQt.js → image-up-Ck-xPOGS.js} +1 -1
- package/dist/{info-zFMSGrL1.js → info-CBBNLK_i.js} +1 -1
- package/dist/{cdn/chunks/ja-DhlWUfke.js → ja-dcWzjStz.js} +6 -4
- package/dist/{link-D7orqFBT.js → link-BA_V9Nns.js} +1 -1
- package/dist/{list-BGt4Pgxc.js → list-BTujzSSo.js} +1 -1
- package/dist/{loader-circle-BVBgkRGz.js → loader-circle-B5OQFRUF.js} +1 -1
- package/dist/{message-circle-D8YLsarv.js → message-circle-DWXr27lZ.js} +1 -1
- package/dist/{cdn/chunks/nl-D8y5OWGB.js → nl-LZNqQgE4.js} +6 -4
- package/dist/{package-CuFvk0L5.js → package-DXW9QTU3.js} +1 -1
- package/dist/{pencil-DRYbmZW7.js → pencil-QmONZtjF.js} +1 -1
- package/dist/{plus-Dv0b3kh0.js → plus-XxHKE_GT.js} +1 -1
- package/dist/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +6 -2
- package/dist/{refresh-cw-gYTIS5bJ.js → refresh-cw-DhXU8dCo.js} +1 -1
- package/dist/{search-D84_Ki_a.js → search-CpFaMrnL.js} +1 -1
- package/dist/{send-Cn-8_H_U.js → send-CFK3e6tQ.js} +1 -1
- package/dist/{shield-check-BOoVWJtD.js → shield-check-ndwpOTik.js} +1 -1
- package/dist/{smartphone-4Ej3PBw5.js → smartphone-DndMh9W6.js} +1 -1
- package/dist/{socialIcons-CzRJskEk.js → socialIcons-D43BLoTu.js} +1 -1
- package/dist/{sparkles-D3vnNe7O.js → sparkles-c1M5lwAQ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +28 -28
- package/dist/{text-align-start-Ci2h_Xly.js → text-align-start-DOtBufPq.js} +1 -1
- package/dist/{trash-wmi4UKvv.js → trash-DmaPdiUk.js} +1 -1
- package/dist/{triangle-alert-DJ0r2wmQ.js → triangle-alert-DqvxsSNL.js} +1 -1
- package/dist/{upload-XMde-TXf.js → upload-CO_hogFv.js} +1 -1
- package/dist/{useEditorCore-CAhRAya8.js → useEditorCore-0K8joh4X.js} +11 -11
- package/dist/{useScrollToBlock-B4F7KCrf.js → useScrollToBlock-BU5A9eS9.js} +1 -1
- package/dist/{x-BWrtpVl-.js → x-BCop_VsL.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/MediaEditModal-CzUtXkpk.js.map +0 -1
- package/dist/cdn/chunks/ca-BTf1Zbqb.js.map +0 -1
- package/dist/cdn/chunks/de-xzrh9PA3.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-CZQArGNj.js.map +0 -1
- package/dist/cdn/chunks/en-9unxBjV8.js +0 -2
- package/dist/cdn/chunks/es-BT4LSpE2.js.map +0 -1
- package/dist/cdn/chunks/fr-CI7OJoql.js.map +0 -1
- package/dist/cdn/chunks/ja-DhlWUfke.js.map +0 -1
- package/dist/cdn/chunks/nl-D8y5OWGB.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DMCbUBvJ.js.map +0 -1
- package/dist/en-BvOjRLiw.js +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { B as e, E as t, F as n, H as r, I as i, L as a, N as o, O as s, Q as c, R as l, S as u, U as d, at as f, b as p, ct as m, d as h, f as g, g as _, h as v, l as
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as
|
|
1
|
+
import { B as e, E as t, F as n, H as r, I as i, L as a, N as o, O as s, Q as c, R as l, S as u, U as d, at as f, b as p, ct as m, d as h, f as g, g as _, h as v, l as ee, lt as te, m as y, n as ne, o as re, p as b, s as ie, u as ae, ut as x, y as oe } from "./draggable-IB4x6w2O.js";
|
|
2
|
+
import { t as se } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
+
import { a as ce, n as le, o as ue, r as de, t as fe } from "./editor-modal-BDOfw3l0.js";
|
|
4
4
|
//#region ../media-library/src/composables/useImageCrop.ts
|
|
5
|
-
var
|
|
5
|
+
var pe = {
|
|
6
6
|
free: void 0,
|
|
7
7
|
square: 1,
|
|
8
8
|
landscape43: 4 / 3,
|
|
9
9
|
landscape169: 16 / 9,
|
|
10
10
|
original: void 0
|
|
11
11
|
};
|
|
12
|
-
function
|
|
12
|
+
function me(e) {
|
|
13
13
|
return e === "image/png" || e === "image/gif" ? {
|
|
14
14
|
mimeType: "image/png",
|
|
15
15
|
quality: 1
|
|
@@ -21,7 +21,7 @@ function pe(e) {
|
|
|
21
21
|
quality: .92
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function he(e, t, n) {
|
|
25
25
|
let r = e.width, i = e.height;
|
|
26
26
|
if (!t && !n) return e;
|
|
27
27
|
let a = r, o = i;
|
|
@@ -35,7 +35,7 @@ function me(e, t, n) {
|
|
|
35
35
|
let c = s.getContext("2d");
|
|
36
36
|
return c && (c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(e, 0, 0, a, o)), s;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ge(e, t, n) {
|
|
39
39
|
return new Promise((r, i) => {
|
|
40
40
|
e.toBlob((e) => {
|
|
41
41
|
if (!e) {
|
|
@@ -47,7 +47,7 @@ function he(e, t, n) {
|
|
|
47
47
|
}, n.mimeType, n.quality);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function _e(e, t, n, r) {
|
|
51
51
|
let i = e, a = t;
|
|
52
52
|
if (n && i > n) {
|
|
53
53
|
let e = n / i;
|
|
@@ -64,7 +64,7 @@ function ge(e, t, n, r) {
|
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.43_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
|
|
67
|
-
function
|
|
67
|
+
function ve(e, t) {
|
|
68
68
|
var n = Object.keys(e);
|
|
69
69
|
if (Object.getOwnPropertySymbols) {
|
|
70
70
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -74,18 +74,18 @@ function _e(e, t) {
|
|
|
74
74
|
}
|
|
75
75
|
return n;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function S(e) {
|
|
78
78
|
for (var t = 1; t < arguments.length; t++) {
|
|
79
79
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
80
|
-
t % 2 ?
|
|
81
|
-
|
|
82
|
-
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
80
|
+
t % 2 ? ve(Object(n), !0).forEach((function(t) {
|
|
81
|
+
C(e, t, n[t]);
|
|
82
|
+
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ve(Object(n)).forEach((function(t) {
|
|
83
83
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
86
86
|
return e;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function C(e, t, n) {
|
|
89
89
|
return t in e ? Object.defineProperty(e, t, {
|
|
90
90
|
value: n,
|
|
91
91
|
enumerable: !0,
|
|
@@ -93,7 +93,7 @@ function w(e, t, n) {
|
|
|
93
93
|
writable: !0
|
|
94
94
|
}) : e[t] = n, e;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function ye(e, t) {
|
|
97
97
|
if (e == null) return {};
|
|
98
98
|
var n, r, i = function(e, t) {
|
|
99
99
|
if (e == null) return {};
|
|
@@ -107,28 +107,28 @@ function ve(e, t) {
|
|
|
107
107
|
}
|
|
108
108
|
return i;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function w(e) {
|
|
111
111
|
return function(e) {
|
|
112
|
-
if (Array.isArray(e)) return
|
|
112
|
+
if (Array.isArray(e)) return T(e);
|
|
113
113
|
}(e) || function(e) {
|
|
114
114
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
115
115
|
}(e) || function(e, t) {
|
|
116
116
|
if (e) {
|
|
117
|
-
if (typeof e == "string") return
|
|
117
|
+
if (typeof e == "string") return T(e, t);
|
|
118
118
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
119
119
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
120
|
-
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 T(e, t);
|
|
121
121
|
}
|
|
122
122
|
}(e) || function() {
|
|
123
123
|
throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
124
124
|
}();
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function T(e, t) {
|
|
127
127
|
(t == null || t > e.length) && (t = e.length);
|
|
128
128
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
129
129
|
return r;
|
|
130
130
|
}
|
|
131
|
-
var
|
|
131
|
+
var E = function(e) {
|
|
132
132
|
(function() {
|
|
133
133
|
var t = {}.hasOwnProperty;
|
|
134
134
|
function n() {
|
|
@@ -152,15 +152,15 @@ var ye = function(e) {
|
|
|
152
152
|
}
|
|
153
153
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
154
154
|
})();
|
|
155
|
-
},
|
|
156
|
-
path:
|
|
155
|
+
}, D, O, k = (E(O = {
|
|
156
|
+
path: D,
|
|
157
157
|
exports: {},
|
|
158
158
|
require: function(e, t) {
|
|
159
159
|
return function() {
|
|
160
160
|
throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
161
|
-
}(t == null &&
|
|
161
|
+
}(t == null && O.path);
|
|
162
162
|
}
|
|
163
|
-
},
|
|
163
|
+
}, O.exports), O.exports), A = function(e) {
|
|
164
164
|
return function(t, n) {
|
|
165
165
|
if (!t) return e;
|
|
166
166
|
var r;
|
|
@@ -172,7 +172,7 @@ var ye = function(e) {
|
|
|
172
172
|
}), "") : "");
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
|
-
function
|
|
175
|
+
function j(e, t, n) {
|
|
176
176
|
var r, i, a, o, s;
|
|
177
177
|
function c() {
|
|
178
178
|
var l = Date.now() - o;
|
|
@@ -190,8 +190,8 @@ function A(e, t, n) {
|
|
|
190
190
|
r &&= (s = e.apply(a, i), a = i = null, clearTimeout(r), null);
|
|
191
191
|
}, l;
|
|
192
192
|
}
|
|
193
|
-
|
|
194
|
-
var
|
|
193
|
+
j.debounce = j;
|
|
194
|
+
var be = j, M = function() {
|
|
195
195
|
return M = Object.assign || function(e) {
|
|
196
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]);
|
|
197
197
|
return e;
|
|
@@ -207,24 +207,24 @@ function N(e, t) {
|
|
|
207
207
|
function P(e) {
|
|
208
208
|
return /^blob:/.test(e);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function F(e) {
|
|
211
211
|
return P(e) || function(e) {
|
|
212
212
|
return /^data:/.test(e);
|
|
213
213
|
}(e);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function I(e) {
|
|
216
216
|
return !!(e && e.constructor && e.call && e.apply);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function L(e) {
|
|
219
219
|
return e === void 0;
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function xe(e) {
|
|
222
222
|
return typeof e == "object" && !!e;
|
|
223
223
|
}
|
|
224
224
|
function Se(e, t, n) {
|
|
225
225
|
var r = {};
|
|
226
|
-
return
|
|
227
|
-
r[i] =
|
|
226
|
+
return xe(e) ? (Object.keys(t).forEach((function(i) {
|
|
227
|
+
r[i] = L(e[i]) ? t[i] : xe(t[i]) ? xe(e[i]) ? Se(e[i], t[i], n[i]) : e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? !!e[i] : e[i];
|
|
228
228
|
})), r) : e ? t : n;
|
|
229
229
|
}
|
|
230
230
|
function R(e) {
|
|
@@ -287,7 +287,7 @@ var z = function(e, t) {
|
|
|
287
287
|
this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
|
|
288
288
|
},
|
|
289
289
|
onTouchStart: function(e) {
|
|
290
|
-
e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches =
|
|
290
|
+
e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = w(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
|
|
291
291
|
return {
|
|
292
292
|
clientX: t.clientX + n.clientX / e.touches.length,
|
|
293
293
|
clientY: t.clientY + n.clientY / e.touches.length
|
|
@@ -333,7 +333,7 @@ var z = function(e, t) {
|
|
|
333
333
|
};
|
|
334
334
|
},
|
|
335
335
|
processMove: function(e, t) {
|
|
336
|
-
var n =
|
|
336
|
+
var n = w(t);
|
|
337
337
|
if (this.touches.length) {
|
|
338
338
|
if (this.touches.length === 1 && n.length === 1) {
|
|
339
339
|
var r = this.$refs.draggable;
|
|
@@ -360,7 +360,7 @@ var z = function(e, t) {
|
|
|
360
360
|
]
|
|
361
361
|
};
|
|
362
362
|
ke.render = function(e, t, n, r, a, s) {
|
|
363
|
-
return o(),
|
|
363
|
+
return o(), y("div", {
|
|
364
364
|
ref: "draggable",
|
|
365
365
|
class: n.classname,
|
|
366
366
|
onTouchstart: t[1] ||= function() {
|
|
@@ -377,7 +377,7 @@ ke.render = function(e, t, n, r, a, s) {
|
|
|
377
377
|
}
|
|
378
378
|
}, [i(e.$slots, "default")], 34);
|
|
379
379
|
};
|
|
380
|
-
var Ae =
|
|
380
|
+
var Ae = A("vue-handler-wrapper"), je = {
|
|
381
381
|
name: "HandlerWrapper",
|
|
382
382
|
components: { DraggableElement: ke },
|
|
383
383
|
props: {
|
|
@@ -392,7 +392,7 @@ var Ae = k("vue-handler-wrapper"), je = {
|
|
|
392
392
|
var e;
|
|
393
393
|
if (this.horizontalPosition || this.verticalPosition) {
|
|
394
394
|
var t, n = N(this.horizontalPosition, this.verticalPosition);
|
|
395
|
-
e = Ae((
|
|
395
|
+
e = Ae((C(t = {}, n.classname, !0), C(t, "disabled", this.disabled), t));
|
|
396
396
|
} else e = Ae({ disabled: this.disabled });
|
|
397
397
|
return {
|
|
398
398
|
root: e,
|
|
@@ -408,7 +408,7 @@ var Ae = k("vue-handler-wrapper"), je = {
|
|
|
408
408
|
};
|
|
409
409
|
je.render = function(e, t, n, s, c, l) {
|
|
410
410
|
var u = a("DraggableElement");
|
|
411
|
-
return o(),
|
|
411
|
+
return o(), y("div", { class: l.classes.root }, [p(u, {
|
|
412
412
|
class: l.classes.draggable,
|
|
413
413
|
onDrag: t[1] ||= function(t) {
|
|
414
414
|
return e.$emit("drag", t);
|
|
@@ -429,7 +429,7 @@ je.render = function(e, t, n, s, c, l) {
|
|
|
429
429
|
_: 3
|
|
430
430
|
}, 8, ["class"])], 2);
|
|
431
431
|
};
|
|
432
|
-
var Me =
|
|
432
|
+
var Me = A("vue-line-wrapper"), Ne = {
|
|
433
433
|
name: "LineWrapper",
|
|
434
434
|
components: { DraggableElement: ke },
|
|
435
435
|
props: {
|
|
@@ -444,7 +444,7 @@ var Me = k("vue-line-wrapper"), Ne = {
|
|
|
444
444
|
},
|
|
445
445
|
computed: { classname: function() {
|
|
446
446
|
var e;
|
|
447
|
-
return Me((
|
|
447
|
+
return Me((C(e = {}, this.position, !0), C(e, "disabled", this.disabled), e));
|
|
448
448
|
} },
|
|
449
449
|
emits: [
|
|
450
450
|
"leave",
|
|
@@ -455,7 +455,7 @@ var Me = k("vue-line-wrapper"), Ne = {
|
|
|
455
455
|
};
|
|
456
456
|
Ne.render = function(e, t, n, s, c, l) {
|
|
457
457
|
var u = a("DraggableElement");
|
|
458
|
-
return o(),
|
|
458
|
+
return o(), y(u, {
|
|
459
459
|
class: l.classname,
|
|
460
460
|
onDrag: t[1] ||= function(t) {
|
|
461
461
|
return e.$emit("drag", t);
|
|
@@ -725,11 +725,11 @@ function $e(e) {
|
|
|
725
725
|
}, l = M({}, t);
|
|
726
726
|
return (Array.isArray(n) ? n : [n]).forEach((function(e) {
|
|
727
727
|
var t = {};
|
|
728
|
-
|
|
728
|
+
L((t = typeof e == "function" ? e({
|
|
729
729
|
coordinates: l,
|
|
730
730
|
imageSize: r,
|
|
731
731
|
visibleArea: s
|
|
732
|
-
}) : e).width) &&
|
|
732
|
+
}) : e).width) && L(t.height) || (l = function(e, t) {
|
|
733
733
|
return c(M(M(M({}, e), Q({
|
|
734
734
|
width: t.width,
|
|
735
735
|
height: t.height,
|
|
@@ -742,7 +742,7 @@ function $e(e) {
|
|
|
742
742
|
left: e.left,
|
|
743
743
|
top: e.top
|
|
744
744
|
});
|
|
745
|
-
}(l, M(M({}, l), t))),
|
|
745
|
+
}(l, M(M({}, l), t))), L(t.left) && L(t.top) || (l = c(l, M(M({}, l), t)));
|
|
746
746
|
})), l;
|
|
747
747
|
}
|
|
748
748
|
function et(e) {
|
|
@@ -890,11 +890,11 @@ function ct(e) {
|
|
|
890
890
|
})) }
|
|
891
891
|
};
|
|
892
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 = K(u, p, c.center));
|
|
893
|
-
var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top,
|
|
893
|
+
var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top, ee = r.height + r.top - (n.height + n.top);
|
|
894
894
|
return u = Z(u = G(u, Y(u, {
|
|
895
895
|
left: o.left === void 0 ? void 0 : o.left - g * p,
|
|
896
896
|
top: o.top === void 0 ? void 0 : o.top - v * p,
|
|
897
|
-
bottom: o.bottom === void 0 ? void 0 : o.bottom +
|
|
897
|
+
bottom: o.bottom === void 0 ? void 0 : o.bottom + ee * p,
|
|
898
898
|
right: o.right === void 0 ? void 0 : o.right + _ * p
|
|
899
899
|
})), a({
|
|
900
900
|
visibleArea: u,
|
|
@@ -992,7 +992,7 @@ function dt(e) {
|
|
|
992
992
|
function ft(e, t, n) {
|
|
993
993
|
return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
|
|
994
994
|
}
|
|
995
|
-
var pt =
|
|
995
|
+
var pt = A("vue-simple-handler"), mt = A("vue-simple-handler-wrapper"), ht = {
|
|
996
996
|
name: "SimpleHandler",
|
|
997
997
|
components: { HandlerWrapper: je },
|
|
998
998
|
props: {
|
|
@@ -1010,10 +1010,10 @@ var pt = k("vue-simple-handler"), mt = k("vue-simple-handler-wrapper"), ht = {
|
|
|
1010
1010
|
return { hover: !1 };
|
|
1011
1011
|
},
|
|
1012
1012
|
computed: { classes: function() {
|
|
1013
|
-
var e, t = (
|
|
1013
|
+
var e, t = (C(e = {}, this.horizontalPosition, !!this.horizontalPosition), C(e, this.verticalPosition, !!this.verticalPosition), C(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), C(e, "hover", this.hover), e);
|
|
1014
1014
|
return {
|
|
1015
|
-
default:
|
|
1016
|
-
wrapper:
|
|
1015
|
+
default: k(pt(t), this.defaultClass, this.hover && this.hoverClass),
|
|
1016
|
+
wrapper: k(mt(t), this.wrapperClass)
|
|
1017
1017
|
};
|
|
1018
1018
|
} },
|
|
1019
1019
|
methods: {
|
|
@@ -1034,7 +1034,7 @@ var pt = k("vue-simple-handler"), mt = k("vue-simple-handler-wrapper"), ht = {
|
|
|
1034
1034
|
};
|
|
1035
1035
|
ht.render = function(e, t, n, i, s, c) {
|
|
1036
1036
|
var l = a("HandlerWrapper");
|
|
1037
|
-
return o(),
|
|
1037
|
+
return o(), y(l, {
|
|
1038
1038
|
class: c.classes.wrapper,
|
|
1039
1039
|
"vertical-position": n.verticalPosition,
|
|
1040
1040
|
"horizontal-position": n.horizontalPosition,
|
|
@@ -1059,7 +1059,7 @@ ht.render = function(e, t, n, i, s, c) {
|
|
|
1059
1059
|
"onLeave"
|
|
1060
1060
|
]);
|
|
1061
1061
|
};
|
|
1062
|
-
var gt =
|
|
1062
|
+
var gt = A("vue-simple-line"), _t = A("vue-simple-line-wrapper"), vt = {
|
|
1063
1063
|
name: "SimpleLine",
|
|
1064
1064
|
components: { LineWrapper: Ne },
|
|
1065
1065
|
props: {
|
|
@@ -1077,8 +1077,8 @@ var gt = k("vue-simple-line"), _t = k("vue-simple-line-wrapper"), vt = {
|
|
|
1077
1077
|
},
|
|
1078
1078
|
computed: { classes: function() {
|
|
1079
1079
|
return {
|
|
1080
|
-
root:
|
|
1081
|
-
wrapper:
|
|
1080
|
+
root: k(gt(C({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
|
|
1081
|
+
wrapper: k(_t(C({}, this.position, !0)), this.wrapperClass)
|
|
1082
1082
|
};
|
|
1083
1083
|
} },
|
|
1084
1084
|
methods: {
|
|
@@ -1099,7 +1099,7 @@ var gt = k("vue-simple-line"), _t = k("vue-simple-line-wrapper"), vt = {
|
|
|
1099
1099
|
};
|
|
1100
1100
|
vt.render = function(e, t, n, i, s, c) {
|
|
1101
1101
|
var l = a("LineWrapper");
|
|
1102
|
-
return o(),
|
|
1102
|
+
return o(), y(l, {
|
|
1103
1103
|
class: c.classes.wrapper,
|
|
1104
1104
|
position: n.position,
|
|
1105
1105
|
disabled: n.disabled,
|
|
@@ -1122,7 +1122,7 @@ vt.render = function(e, t, n, i, s, c) {
|
|
|
1122
1122
|
"onLeave"
|
|
1123
1123
|
]);
|
|
1124
1124
|
};
|
|
1125
|
-
var yt =
|
|
1125
|
+
var yt = A("vue-bounding-box"), bt = [
|
|
1126
1126
|
"east",
|
|
1127
1127
|
"west",
|
|
1128
1128
|
null
|
|
@@ -1240,8 +1240,8 @@ var yt = k("vue-bounding-box"), bt = [
|
|
|
1240
1240
|
n.horizontalDirection && n.verticalDirection || !e.lines[n.name] || t.push({
|
|
1241
1241
|
name: n.name,
|
|
1242
1242
|
component: e.linesComponent,
|
|
1243
|
-
class:
|
|
1244
|
-
wrapperClass:
|
|
1243
|
+
class: k(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
|
|
1244
|
+
wrapperClass: k(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
|
|
1245
1245
|
hoverClass: e.classes.lines.hover,
|
|
1246
1246
|
verticalDirection: n.verticalDirection,
|
|
1247
1247
|
horizontalDirection: n.horizontalDirection,
|
|
@@ -1256,8 +1256,8 @@ var yt = k("vue-bounding-box"), bt = [
|
|
|
1256
1256
|
var a = {
|
|
1257
1257
|
name: i.name,
|
|
1258
1258
|
component: e.handlersComponent,
|
|
1259
|
-
class:
|
|
1260
|
-
wrapperClass:
|
|
1259
|
+
class: k(e.classes.handlers.default, e.classes.handlers[i.name]),
|
|
1260
|
+
wrapperClass: k(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
|
|
1261
1261
|
hoverClass: e.classes.handlers.hover,
|
|
1262
1262
|
verticalDirection: i.verticalDirection,
|
|
1263
1263
|
horizontalDirection: i.horizontalDirection,
|
|
@@ -1266,7 +1266,7 @@ var yt = k("vue-bounding-box"), bt = [
|
|
|
1266
1266
|
if (n && r) {
|
|
1267
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;
|
|
1268
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}`);
|
|
1269
|
-
} else a.wrapperClass = yt("handler",
|
|
1269
|
+
} else a.wrapperClass = yt("handler", C({}, i.classname, !0));
|
|
1270
1270
|
t.push(a);
|
|
1271
1271
|
}
|
|
1272
1272
|
})), t;
|
|
@@ -1307,14 +1307,14 @@ var yt = k("vue-bounding-box"), bt = [
|
|
|
1307
1307
|
emits: ["resize", "resize-end"]
|
|
1308
1308
|
};
|
|
1309
1309
|
St.render = function(e, t, r, a, s, c) {
|
|
1310
|
-
return o(),
|
|
1310
|
+
return o(), y("div", {
|
|
1311
1311
|
ref: "box",
|
|
1312
1312
|
class: c.classes.root,
|
|
1313
1313
|
style: c.style
|
|
1314
1314
|
}, [
|
|
1315
1315
|
i(e.$slots, "default"),
|
|
1316
|
-
p("div", null, [(o(!0),
|
|
1317
|
-
return o(),
|
|
1316
|
+
p("div", null, [(o(!0), y(ae, null, n(c.lineNodes, (function(e) {
|
|
1317
|
+
return o(), y(l(e.component), {
|
|
1318
1318
|
key: e.name,
|
|
1319
1319
|
"default-class": e.class,
|
|
1320
1320
|
"hover-class": e.hoverClass,
|
|
@@ -1336,12 +1336,12 @@ St.render = function(e, t, r, a, s, c) {
|
|
|
1336
1336
|
"onDrag"
|
|
1337
1337
|
]);
|
|
1338
1338
|
})), 128))]),
|
|
1339
|
-
(o(!0),
|
|
1340
|
-
return o(),
|
|
1339
|
+
(o(!0), y(ae, null, n(c.handlerNodes, (function(e) {
|
|
1340
|
+
return o(), y("div", {
|
|
1341
1341
|
key: e.name,
|
|
1342
1342
|
style: e.wrapperStyle,
|
|
1343
1343
|
class: e.wrapperClass
|
|
1344
|
-
}, [(o(),
|
|
1344
|
+
}, [(o(), y(l(e.component), {
|
|
1345
1345
|
"default-class": e.class,
|
|
1346
1346
|
"hover-class": e.hoverClass,
|
|
1347
1347
|
"wrapper-class": e.wrapperClass,
|
|
@@ -1366,7 +1366,7 @@ St.render = function(e, t, r, a, s, c) {
|
|
|
1366
1366
|
})), 128))
|
|
1367
1367
|
], 6);
|
|
1368
1368
|
};
|
|
1369
|
-
var Ct =
|
|
1369
|
+
var Ct = A("vue-draggable-area"), wt = {
|
|
1370
1370
|
name: "DraggableArea",
|
|
1371
1371
|
props: {
|
|
1372
1372
|
movable: {
|
|
@@ -1394,7 +1394,7 @@ var Ct = k("vue-draggable-area"), wt = {
|
|
|
1394
1394
|
onTouchStart: function(e) {
|
|
1395
1395
|
if (e.cancelable) {
|
|
1396
1396
|
var t = this.movable && e.touches.length === 1;
|
|
1397
|
-
t && (this.touches =
|
|
1397
|
+
t && (this.touches = w(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
|
|
1398
1398
|
}
|
|
1399
1399
|
},
|
|
1400
1400
|
onTouchEnd: function() {
|
|
@@ -1440,7 +1440,7 @@ var Ct = k("vue-draggable-area"), wt = {
|
|
|
1440
1440
|
};
|
|
1441
1441
|
},
|
|
1442
1442
|
processMove: function(e, t) {
|
|
1443
|
-
var n =
|
|
1443
|
+
var n = w(t);
|
|
1444
1444
|
if (this.touches.length) {
|
|
1445
1445
|
var r = this.$refs.container.getBoundingClientRect(), i = r.left, a = r.top;
|
|
1446
1446
|
this.touches.length === 1 && n.length === 1 && this.$emit("move", new De({
|
|
@@ -1456,7 +1456,7 @@ var Ct = k("vue-draggable-area"), wt = {
|
|
|
1456
1456
|
emits: ["move", "move-end"]
|
|
1457
1457
|
};
|
|
1458
1458
|
wt.render = function(e, t, n, r, a, s) {
|
|
1459
|
-
return o(),
|
|
1459
|
+
return o(), y("div", {
|
|
1460
1460
|
ref: "container",
|
|
1461
1461
|
onTouchstart: t[1] ||= function() {
|
|
1462
1462
|
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
@@ -1595,7 +1595,7 @@ var At = {
|
|
|
1595
1595
|
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
1596
1596
|
},
|
|
1597
1597
|
created: function() {
|
|
1598
|
-
this.transforming = !1, this.debouncedProcessEnd =
|
|
1598
|
+
this.transforming = !1, this.debouncedProcessEnd = be(this.processEnd), this.touches = [];
|
|
1599
1599
|
},
|
|
1600
1600
|
methods: {
|
|
1601
1601
|
processMove: function(e, t) {
|
|
@@ -1629,7 +1629,7 @@ var At = {
|
|
|
1629
1629
|
onTouchStart: function(e) {
|
|
1630
1630
|
if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
|
|
1631
1631
|
var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
|
|
1632
|
-
this.touches =
|
|
1632
|
+
this.touches = w(e.touches).filter((function(e) {
|
|
1633
1633
|
return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
|
|
1634
1634
|
})), this.oldGeometricProperties = kt(this.touches, t);
|
|
1635
1635
|
}
|
|
@@ -1640,7 +1640,7 @@ var At = {
|
|
|
1640
1640
|
onTouchMove: function(e) {
|
|
1641
1641
|
var t = this;
|
|
1642
1642
|
if (this.touches.length) {
|
|
1643
|
-
var n =
|
|
1643
|
+
var n = w(e.touches).filter((function(e) {
|
|
1644
1644
|
return !e.identifier || t.touches.find((function(t) {
|
|
1645
1645
|
return t.identifier === e.identifier;
|
|
1646
1646
|
}));
|
|
@@ -1688,7 +1688,7 @@ var At = {
|
|
|
1688
1688
|
]
|
|
1689
1689
|
};
|
|
1690
1690
|
At.render = function(e, t, n, r, a, s) {
|
|
1691
|
-
return o(),
|
|
1691
|
+
return o(), y("div", {
|
|
1692
1692
|
ref: "container",
|
|
1693
1693
|
onTouchstart: t[1] ||= function() {
|
|
1694
1694
|
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
@@ -1725,7 +1725,7 @@ var jt = {
|
|
|
1725
1725
|
};
|
|
1726
1726
|
jt.render = function(e, t, n, s, c, l) {
|
|
1727
1727
|
var u = a("transformable-image");
|
|
1728
|
-
return o(),
|
|
1728
|
+
return o(), y(u, {
|
|
1729
1729
|
"touch-move": n.touchMove,
|
|
1730
1730
|
"touch-resize": n.touchResize,
|
|
1731
1731
|
"mouse-move": n.mouseMove,
|
|
@@ -1748,7 +1748,7 @@ jt.render = function(e, t, n, s, c, l) {
|
|
|
1748
1748
|
"wheel-resize"
|
|
1749
1749
|
]);
|
|
1750
1750
|
};
|
|
1751
|
-
var Mt =
|
|
1751
|
+
var Mt = A("vue-preview"), Nt = {
|
|
1752
1752
|
props: {
|
|
1753
1753
|
coordinates: { type: Object },
|
|
1754
1754
|
transitions: { type: Object },
|
|
@@ -1781,7 +1781,7 @@ var Mt = k("vue-preview"), Nt = {
|
|
|
1781
1781
|
root: Mt({ fill: this.fill }),
|
|
1782
1782
|
wrapper: Mt("wrapper"),
|
|
1783
1783
|
imageWrapper: Mt("image-wrapper"),
|
|
1784
|
-
image:
|
|
1784
|
+
image: k(Mt("image"), this.imageClass)
|
|
1785
1785
|
};
|
|
1786
1786
|
},
|
|
1787
1787
|
style: function() {
|
|
@@ -1800,7 +1800,7 @@ var Mt = k("vue-preview"), Nt = {
|
|
|
1800
1800
|
},
|
|
1801
1801
|
imageStyle: function() {
|
|
1802
1802
|
if (this.coordinates && this.image) {
|
|
1803
|
-
var e = this.coordinates.width / this.size.width, t =
|
|
1803
|
+
var e = this.coordinates.width / this.size.width, t = S(S({
|
|
1804
1804
|
rotate: 0,
|
|
1805
1805
|
flip: {
|
|
1806
1806
|
horizontal: !1,
|
|
@@ -1873,7 +1873,7 @@ var Mt = k("vue-preview"), Nt = {
|
|
|
1873
1873
|
}
|
|
1874
1874
|
};
|
|
1875
1875
|
Nt.render = function(e, t, n, r, i, a) {
|
|
1876
|
-
return o(),
|
|
1876
|
+
return o(), y("div", {
|
|
1877
1877
|
ref: "root",
|
|
1878
1878
|
class: a.classes.root,
|
|
1879
1879
|
style: a.style
|
|
@@ -1886,7 +1886,7 @@ Nt.render = function(e, t, n, r, i, a) {
|
|
|
1886
1886
|
src: n.image && n.image.src,
|
|
1887
1887
|
class: a.classes.image,
|
|
1888
1888
|
style: a.imageStyle
|
|
1889
|
-
}, null, 14, ["src"]), [[
|
|
1889
|
+
}, null, 14, ["src"]), [[ie, n.image && n.image.src]])], 6)], 6);
|
|
1890
1890
|
};
|
|
1891
1891
|
var Pt = {
|
|
1892
1892
|
components: { Preview: Nt },
|
|
@@ -1894,9 +1894,9 @@ var Pt = {
|
|
|
1894
1894
|
};
|
|
1895
1895
|
Pt.render = function(e, t, n, r, i, c) {
|
|
1896
1896
|
var l = a("preview");
|
|
1897
|
-
return o(),
|
|
1897
|
+
return o(), y(l, s(e.$attrs, { fill: !0 }), null, 16);
|
|
1898
1898
|
};
|
|
1899
|
-
var Ft =
|
|
1899
|
+
var Ft = A("vue-rectangle-stencil"), It = {
|
|
1900
1900
|
name: "RectangleStencil",
|
|
1901
1901
|
components: {
|
|
1902
1902
|
StencilPreview: Pt,
|
|
@@ -1971,13 +1971,13 @@ var Ft = k("vue-rectangle-stencil"), It = {
|
|
|
1971
1971
|
computed: {
|
|
1972
1972
|
classes: function() {
|
|
1973
1973
|
return {
|
|
1974
|
-
stencil:
|
|
1974
|
+
stencil: k(Ft({
|
|
1975
1975
|
movable: this.movable,
|
|
1976
1976
|
moving: this.moving,
|
|
1977
1977
|
resizing: this.resizing
|
|
1978
1978
|
}), this.moving && this.movingClass, this.resizing && this.resizingClass),
|
|
1979
|
-
preview:
|
|
1980
|
-
boundingBox:
|
|
1979
|
+
preview: k(Ft("preview"), this.previewClass),
|
|
1980
|
+
boundingBox: k(Ft("bounding-box"), this.boundingBoxClass)
|
|
1981
1981
|
};
|
|
1982
1982
|
},
|
|
1983
1983
|
style: function() {
|
|
@@ -2018,7 +2018,7 @@ var Ft = k("vue-rectangle-stencil"), It = {
|
|
|
2018
2018
|
};
|
|
2019
2019
|
It.render = function(e, t, n, i, s, c) {
|
|
2020
2020
|
var l = a("stencil-preview"), u = a("draggable-area"), d = a("bounding-box");
|
|
2021
|
-
return o(),
|
|
2021
|
+
return o(), y("div", {
|
|
2022
2022
|
class: c.classes.stencil,
|
|
2023
2023
|
style: c.style
|
|
2024
2024
|
}, [p(d, {
|
|
@@ -2087,7 +2087,7 @@ It.render = function(e, t, n, i, s, c) {
|
|
|
2087
2087
|
"onResizeEnd"
|
|
2088
2088
|
])], 6);
|
|
2089
2089
|
};
|
|
2090
|
-
var Lt = ["transitions"], $ =
|
|
2090
|
+
var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
2091
2091
|
name: "Cropper",
|
|
2092
2092
|
components: { BackgroundWrapper: jt },
|
|
2093
2093
|
props: {
|
|
@@ -2216,8 +2216,8 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2216
2216
|
} else if (p === "height") {
|
|
2217
2217
|
var _ = o.width - d * f;
|
|
2218
2218
|
if (l.left && l.right) {
|
|
2219
|
-
var v = c.left,
|
|
2220
|
-
c.left = -ft(_, v,
|
|
2219
|
+
var v = c.left, ee = c.right;
|
|
2220
|
+
c.left = -ft(_, v, ee), c.right = -ft(_, ee, v);
|
|
2221
2221
|
} else l.left ? c.left = -_ : l.right ? c.right = -_ : l.top ? c.top = 0 : l.bottom && (c.bottom = 0);
|
|
2222
2222
|
}
|
|
2223
2223
|
c = dt({
|
|
@@ -2360,7 +2360,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2360
2360
|
height: 0
|
|
2361
2361
|
},
|
|
2362
2362
|
visibleArea: null,
|
|
2363
|
-
coordinates:
|
|
2363
|
+
coordinates: S({}, Re)
|
|
2364
2364
|
};
|
|
2365
2365
|
},
|
|
2366
2366
|
computed: {
|
|
@@ -2439,10 +2439,10 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2439
2439
|
if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
|
|
2440
2440
|
var e = this.sizeRestrictionsAlgorithm({
|
|
2441
2441
|
imageSize: this.imageSize,
|
|
2442
|
-
minWidth:
|
|
2443
|
-
minHeight:
|
|
2444
|
-
maxWidth:
|
|
2445
|
-
maxHeight:
|
|
2442
|
+
minWidth: L(this.minWidth) ? 0 : R(this.minWidth),
|
|
2443
|
+
minHeight: L(this.minHeight) ? 0 : R(this.minHeight),
|
|
2444
|
+
maxWidth: L(this.maxWidth) ? 1 / 0 : R(this.maxWidth),
|
|
2445
|
+
maxHeight: L(this.maxHeight) ? 1 / 0 : R(this.maxHeight)
|
|
2446
2446
|
});
|
|
2447
2447
|
if (e = function(e) {
|
|
2448
2448
|
var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = M(M({}, n), {
|
|
@@ -2491,14 +2491,14 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2491
2491
|
classes: function() {
|
|
2492
2492
|
return {
|
|
2493
2493
|
cropper: $(),
|
|
2494
|
-
image:
|
|
2494
|
+
image: k($("image"), this.imageClass),
|
|
2495
2495
|
stencil: $("stencil"),
|
|
2496
|
-
boundaries:
|
|
2497
|
-
stretcher:
|
|
2498
|
-
background:
|
|
2499
|
-
foreground:
|
|
2500
|
-
imageWrapper:
|
|
2501
|
-
cropperWrapper:
|
|
2496
|
+
boundaries: k($("boundaries"), this.boundariesClass),
|
|
2497
|
+
stretcher: k($("stretcher")),
|
|
2498
|
+
background: k($("background"), this.backgroundClass),
|
|
2499
|
+
foreground: k($("foreground"), this.foregroundClass),
|
|
2500
|
+
imageWrapper: k($("image-wrapper")),
|
|
2501
|
+
cropperWrapper: k($("cropper-wrapper"))
|
|
2502
2502
|
};
|
|
2503
2503
|
},
|
|
2504
2504
|
stencilCoordinates: function() {
|
|
@@ -2535,7 +2535,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2535
2535
|
}, n = {
|
|
2536
2536
|
left: (1 - 1 / this.coefficient) * e.width / 2,
|
|
2537
2537
|
top: (1 - 1 / this.coefficient) * e.height / 2
|
|
2538
|
-
}, r =
|
|
2538
|
+
}, r = S(S({}, this.imageTransforms), {}, {
|
|
2539
2539
|
scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width),
|
|
2540
2540
|
scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height)
|
|
2541
2541
|
}), i = {
|
|
@@ -2584,7 +2584,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2584
2584
|
}
|
|
2585
2585
|
},
|
|
2586
2586
|
created: function() {
|
|
2587
|
-
this.debouncedUpdate =
|
|
2587
|
+
this.debouncedUpdate = be(this.update, this.debounce), this.debouncedDisableTransitions = be(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
|
|
2588
2588
|
},
|
|
2589
2589
|
mounted: function() {
|
|
2590
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);
|
|
@@ -2594,16 +2594,16 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2594
2594
|
},
|
|
2595
2595
|
methods: {
|
|
2596
2596
|
getResult: function() {
|
|
2597
|
-
var e = this.initialized ? this.prepareResult(
|
|
2597
|
+
var e = this.initialized ? this.prepareResult(S({}, this.coordinates)) : this.defaultCoordinates(), t = {
|
|
2598
2598
|
rotate: this.imageTransforms.rotate % 360,
|
|
2599
|
-
flip:
|
|
2599
|
+
flip: S({}, this.imageTransforms.flip)
|
|
2600
2600
|
};
|
|
2601
2601
|
if (this.src && this.imageLoaded) {
|
|
2602
2602
|
var n = this;
|
|
2603
2603
|
return {
|
|
2604
2604
|
image: this.image,
|
|
2605
2605
|
coordinates: e,
|
|
2606
|
-
visibleArea: this.visibleArea ?
|
|
2606
|
+
visibleArea: this.visibleArea ? S({}, this.visibleArea) : null,
|
|
2607
2607
|
imageTransforms: t,
|
|
2608
2608
|
get canvas() {
|
|
2609
2609
|
return n.canvas ? n.getCanvas() : void 0;
|
|
@@ -2613,7 +2613,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2613
2613
|
return {
|
|
2614
2614
|
image: this.image,
|
|
2615
2615
|
coordinates: e,
|
|
2616
|
-
visibleArea: this.visibleArea ?
|
|
2616
|
+
visibleArea: this.visibleArea ? S({}, this.visibleArea) : null,
|
|
2617
2617
|
canvas: void 0,
|
|
2618
2618
|
imageTransforms: t
|
|
2619
2619
|
};
|
|
@@ -2673,7 +2673,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2673
2673
|
top: Math.round(t.top)
|
|
2674
2674
|
};
|
|
2675
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);
|
|
2676
|
-
}(
|
|
2676
|
+
}(S(S({}, this.getPublicProperties()), {}, {
|
|
2677
2677
|
positionRestrictions: st(this.positionRestrictions, this.visibleArea),
|
|
2678
2678
|
coordinates: e
|
|
2679
2679
|
})) : e;
|
|
@@ -2695,10 +2695,10 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2695
2695
|
sizeRestrictions: this.sizeRestrictions,
|
|
2696
2696
|
stencilSize: this.getStencilSize()
|
|
2697
2697
|
});
|
|
2698
|
-
return
|
|
2698
|
+
return S(S({}, a), {}, { changed: !ze(a.visibleArea, t) || !ze(a.coordinates, n) });
|
|
2699
2699
|
},
|
|
2700
2700
|
runAutoZoom: function(e) {
|
|
2701
|
-
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 = ye(t, Lt), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
|
|
2702
2702
|
r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
|
|
2703
2703
|
},
|
|
2704
2704
|
normalizeEvent: function(e) {
|
|
@@ -2730,7 +2730,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2730
2730
|
})), a;
|
|
2731
2731
|
}
|
|
2732
2732
|
return t;
|
|
2733
|
-
}(
|
|
2733
|
+
}(S(S({}, this.getPublicProperties()), {}, { event: e }));
|
|
2734
2734
|
},
|
|
2735
2735
|
getCanvas: function() {
|
|
2736
2736
|
if (this.$refs.canvas) {
|
|
@@ -2745,7 +2745,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2745
2745
|
top: 0
|
|
2746
2746
|
}, a)), r);
|
|
2747
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;
|
|
2748
|
-
}(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r =
|
|
2748
|
+
}(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = S({
|
|
2749
2749
|
minWidth: 0,
|
|
2750
2750
|
minHeight: 0,
|
|
2751
2751
|
maxWidth: 1 / 0,
|
|
@@ -2810,7 +2810,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2810
2810
|
this.$refs.cropper, this.$refs.image;
|
|
2811
2811
|
var t = this.defaultSize;
|
|
2812
2812
|
t ||= this.stencilSize ? at : it, this.sizeRestrictions;
|
|
2813
|
-
var n =
|
|
2813
|
+
var n = I(t) ? t({
|
|
2814
2814
|
boundaries: this.boundaries,
|
|
2815
2815
|
imageSize: this.imageSize,
|
|
2816
2816
|
aspectRatio: this.getAspectRatio(),
|
|
@@ -2819,13 +2819,13 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2819
2819
|
visibleArea: this.visibleArea
|
|
2820
2820
|
}) : t, r = this.defaultPosition || rt, i = [n, function(t) {
|
|
2821
2821
|
var n = t.coordinates;
|
|
2822
|
-
return
|
|
2822
|
+
return S({}, I(r) ? r({
|
|
2823
2823
|
coordinates: n,
|
|
2824
2824
|
imageSize: e.imageSize,
|
|
2825
2825
|
visibleArea: e.visibleArea
|
|
2826
2826
|
}) : e.defaultPosition);
|
|
2827
2827
|
}];
|
|
2828
|
-
this.delayedTransforms && i.push.apply(i,
|
|
2828
|
+
this.delayedTransforms && i.push.apply(i, w(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
|
|
2829
2829
|
}
|
|
2830
2830
|
},
|
|
2831
2831
|
clearImage: function() {
|
|
@@ -2855,7 +2855,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2855
2855
|
cropper: n,
|
|
2856
2856
|
imageSize: e.imageSize
|
|
2857
2857
|
};
|
|
2858
|
-
if (e.boundaries =
|
|
2858
|
+
if (e.boundaries = I(e.defaultBoundaries) ? e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? function(e) {
|
|
2859
2859
|
var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
|
|
2860
2860
|
return o > i && (o = i, a = n.height * i / n.width), {
|
|
2861
2861
|
width: o,
|
|
@@ -2872,10 +2872,10 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2872
2872
|
},
|
|
2873
2873
|
resetVisibleArea: function() {
|
|
2874
2874
|
var e = this;
|
|
2875
|
-
return this.appliedImageTransforms =
|
|
2875
|
+
return this.appliedImageTransforms = S(S({}, this.defaultImageTransforms), {}, { flip: S({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
|
|
2876
2876
|
e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
|
|
2877
2877
|
var t, n, r, i, a, o, s = e.defaultVisibleArea || ot;
|
|
2878
|
-
e.visibleArea =
|
|
2878
|
+
e.visibleArea = I(s) ? s({
|
|
2879
2879
|
imageSize: e.imageSize,
|
|
2880
2880
|
boundaries: e.boundaries,
|
|
2881
2881
|
coordinates: e.priority === "visible-area" ? null : e.coordinates,
|
|
@@ -2926,7 +2926,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2926
2926
|
var e, t = this;
|
|
2927
2927
|
if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
|
|
2928
2928
|
if (function(e) {
|
|
2929
|
-
if (
|
|
2929
|
+
if (F(e)) return !1;
|
|
2930
2930
|
var t = window.location, n = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e) || [], r = {
|
|
2931
2931
|
protocol: n[1] || "",
|
|
2932
2932
|
host: n[2] || "",
|
|
@@ -2936,7 +2936,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2936
2936
|
};
|
|
2937
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));
|
|
2938
2938
|
}(this.src)) {
|
|
2939
|
-
var n =
|
|
2939
|
+
var n = L(this.crossOrigin) ? this.canvas : this.crossOrigin;
|
|
2940
2940
|
!0 === n && (n = "anonymous"), this.imageAttributes.crossOrigin = n || null;
|
|
2941
2941
|
}
|
|
2942
2942
|
if (this.checkOrientation) {
|
|
@@ -2979,13 +2979,13 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
2979
2979
|
},
|
|
2980
2980
|
onParseImage: function(e) {
|
|
2981
2981
|
var t = this, n = e.source, r = e.arrayBuffer, i = e.orientation;
|
|
2982
|
-
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? P(n) || !
|
|
2982
|
+
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? P(n) || !F(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
|
|
2983
2983
|
for (var t = [], n = new Uint8Array(e); n.length > 0;) {
|
|
2984
2984
|
var r = n.subarray(0, 8192);
|
|
2985
2985
|
t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
|
|
2986
2986
|
}
|
|
2987
2987
|
return "data:image/jpeg;base64," + btoa(t.join(""));
|
|
2988
|
-
}(r) : this.imageAttributes.src = n, this.appliedImageTransforms =
|
|
2988
|
+
}(r) : this.imageAttributes.src = n, this.appliedImageTransforms = I(this.defaultTransforms) ? Tt(this.defaultTransforms()) : xe(this.defaultTransforms) ? Tt(this.defaultTransforms) : function(e) {
|
|
2989
2989
|
var t = Tt({});
|
|
2990
2990
|
if (e) switch (e) {
|
|
2991
2991
|
case 2:
|
|
@@ -3009,7 +3009,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3009
3009
|
case 8: t.rotate = -90;
|
|
3010
3010
|
}
|
|
3011
3011
|
return t;
|
|
3012
|
-
}(i), this.defaultImageTransforms =
|
|
3012
|
+
}(i), this.defaultImageTransforms = S(S({}, this.appliedImageTransforms), {}, { flip: S({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
|
|
3013
3013
|
var e = t.$refs.image;
|
|
3014
3014
|
e && e.complete && (function(e) {
|
|
3015
3015
|
return !!e.naturalWidth;
|
|
@@ -3025,7 +3025,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3025
3025
|
onMove: function(e) {
|
|
3026
3026
|
var t = this;
|
|
3027
3027
|
this.transitionsOptions.enabled || this.awaitRender((function() {
|
|
3028
|
-
t.coordinates = t.moveAlgorithm(
|
|
3028
|
+
t.coordinates = t.moveAlgorithm(S(S({}, t.getPublicProperties()), {}, {
|
|
3029
3029
|
positionRestrictions: st(t.positionRestrictions, t.visibleArea),
|
|
3030
3030
|
coordinates: t.coordinates,
|
|
3031
3031
|
event: t.normalizeEvent(e)
|
|
@@ -3036,7 +3036,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3036
3036
|
var t = this;
|
|
3037
3037
|
this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender((function() {
|
|
3038
3038
|
var n = t.sizeRestrictions, r = Math.min(t.coordinates.width, t.coordinates.height, 20 * t.coefficient);
|
|
3039
|
-
t.coordinates = t.resizeAlgorithm(
|
|
3039
|
+
t.coordinates = t.resizeAlgorithm(S(S({}, t.getPublicProperties()), {}, {
|
|
3040
3040
|
positionRestrictions: st(t.positionRestrictions, t.visibleArea),
|
|
3041
3041
|
sizeRestrictions: {
|
|
3042
3042
|
maxWidth: Math.min(n.maxWidth, t.visibleArea.width),
|
|
@@ -3053,7 +3053,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3053
3053
|
if (!this.transitionsOptions.enabled) {
|
|
3054
3054
|
var n = t.transitions, r = n !== void 0 && n, i = t.normalize, a = i === void 0 || i;
|
|
3055
3055
|
r && this.enableTransitions();
|
|
3056
|
-
var o = ct(
|
|
3056
|
+
var o = ct(S(S({}, this.getPublicProperties()), {}, {
|
|
3057
3057
|
event: a ? this.normalizeEvent(e) : e,
|
|
3058
3058
|
getAreaRestrictions: this.getAreaRestrictions,
|
|
3059
3059
|
imageRestriction: this.imageRestriction,
|
|
@@ -3081,9 +3081,9 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3081
3081
|
var s = this.$refs.stencil.aspectRatios();
|
|
3082
3082
|
t = s.minimum, n = s.maximum;
|
|
3083
3083
|
}
|
|
3084
|
-
if (
|
|
3084
|
+
if (L(t) && (t = L(i) ? a : i), L(n) && (n = L(i) ? o : i), !e && (L(t) || L(n))) {
|
|
3085
3085
|
var c = this.getStencilSize(), l = c ? q(c) : null;
|
|
3086
|
-
|
|
3086
|
+
L(t) && (t = Ce(l) ? l : void 0), L(n) && (n = Ce(l) ? l : void 0);
|
|
3087
3087
|
}
|
|
3088
3088
|
return {
|
|
3089
3089
|
minimum: t,
|
|
@@ -3101,7 +3101,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3101
3101
|
coefficient: this.coefficient,
|
|
3102
3102
|
coordinates: this.coordinates,
|
|
3103
3103
|
aspectRatio: this.getAspectRatio(!0)
|
|
3104
|
-
}, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, He(q(i =
|
|
3104
|
+
}, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, He(q(i = I(n) ? n({
|
|
3105
3105
|
boundaries: t,
|
|
3106
3106
|
aspectRatio: r
|
|
3107
3107
|
}) : n), r) && (i = Q({
|
|
@@ -3146,13 +3146,13 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3146
3146
|
};
|
|
3147
3147
|
},
|
|
3148
3148
|
defaultCoordinates: function() {
|
|
3149
|
-
return
|
|
3149
|
+
return S({}, Re);
|
|
3150
3150
|
},
|
|
3151
3151
|
flip: function(e, t) {
|
|
3152
3152
|
var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
|
|
3153
3153
|
if (!this.transitionsActive) {
|
|
3154
3154
|
r && this.enableTransitions();
|
|
3155
|
-
var i =
|
|
3155
|
+
var i = S({}, this.imageTransforms.flip), a = ut({
|
|
3156
3156
|
flip: {
|
|
3157
3157
|
horizontal: e ? !i.horizontal : i.horizontal,
|
|
3158
3158
|
vertical: t ? !i.vertical : i.vertical
|
|
@@ -3174,7 +3174,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3174
3174
|
var t = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).transitions, n = t === void 0 || t;
|
|
3175
3175
|
if (!this.transitionsActive) {
|
|
3176
3176
|
n && this.enableTransitions();
|
|
3177
|
-
var r =
|
|
3177
|
+
var r = S({}, this.imageSize);
|
|
3178
3178
|
this.appliedImageTransforms.rotate += e;
|
|
3179
3179
|
var i = lt({
|
|
3180
3180
|
visibleArea: this.visibleArea,
|
|
@@ -3206,7 +3206,7 @@ var Lt = ["transitions"], $ = k("vue-advanced-cropper"), Rt = {
|
|
|
3206
3206
|
style: { display: "none" }
|
|
3207
3207
|
};
|
|
3208
3208
|
Rt.render = function(e, t, n, i, a, c) {
|
|
3209
|
-
return o(),
|
|
3209
|
+
return o(), y("div", {
|
|
3210
3210
|
ref: "cropper",
|
|
3211
3211
|
class: c.classes.cropper
|
|
3212
3212
|
}, [p("div", {
|
|
@@ -3215,7 +3215,7 @@ Rt.render = function(e, t, n, i, a, c) {
|
|
|
3215
3215
|
}, null, 2), p("div", {
|
|
3216
3216
|
class: c.classes.boundaries,
|
|
3217
3217
|
style: c.boundariesStyle
|
|
3218
|
-
}, [(o(),
|
|
3218
|
+
}, [(o(), y(l(n.backgroundWrapperComponent), {
|
|
3219
3219
|
class: c.classes.cropperWrapper,
|
|
3220
3220
|
"wheel-resize": c.settings.resizeImage.wheel,
|
|
3221
3221
|
"touch-resize": c.settings.resizeImage.touch,
|
|
@@ -3236,13 +3236,13 @@ Rt.render = function(e, t, n, i, a, c) {
|
|
|
3236
3236
|
src: a.imageAttributes.src,
|
|
3237
3237
|
class: c.classes.image,
|
|
3238
3238
|
style: c.imageStyle,
|
|
3239
|
-
onMousedown: t[1] ||=
|
|
3239
|
+
onMousedown: t[1] ||= ee((function() {}), ["prevent"])
|
|
3240
3240
|
}, null, 46, ["crossorigin", "src"])], 2),
|
|
3241
3241
|
p("div", {
|
|
3242
3242
|
class: c.classes.foreground,
|
|
3243
3243
|
style: c.boundariesStyle
|
|
3244
3244
|
}, null, 6),
|
|
3245
|
-
d((o(),
|
|
3245
|
+
d((o(), y(l(n.stencilComponent), s({
|
|
3246
3246
|
ref: "stencil",
|
|
3247
3247
|
image: c.image,
|
|
3248
3248
|
coordinates: a.coordinates,
|
|
@@ -3262,9 +3262,9 @@ Rt.render = function(e, t, n, i, a, c) {
|
|
|
3262
3262
|
"onResizeEnd",
|
|
3263
3263
|
"onMove",
|
|
3264
3264
|
"onMoveEnd"
|
|
3265
|
-
])), [[
|
|
3266
|
-
n.canvas ? (o(),
|
|
3267
|
-
n.canvas ? (o(),
|
|
3265
|
+
])), [[ie, a.imageLoaded]]),
|
|
3266
|
+
n.canvas ? (o(), y("canvas", zt, null, 512)) : v("", !0),
|
|
3267
|
+
n.canvas ? (o(), y("canvas", Bt, null, 512)) : v("", !0)
|
|
3268
3268
|
];
|
|
3269
3269
|
})),
|
|
3270
3270
|
_: 1
|
|
@@ -3333,70 +3333,107 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3333
3333
|
for: "tpl-media-alt",
|
|
3334
3334
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
3335
3335
|
style: { color: "var(--tpl-text-muted)" }
|
|
3336
|
-
}, vn = ["placeholder"], yn = {
|
|
3336
|
+
}, vn = ["placeholder"], yn = {
|
|
3337
|
+
key: 0,
|
|
3338
|
+
id: "tpl-media-edit-error",
|
|
3339
|
+
role: "alert",
|
|
3340
|
+
class: "tpl:shrink-0 tpl:px-5 tpl:pt-3 tpl:text-xs",
|
|
3341
|
+
style: { color: "var(--tpl-danger)" }
|
|
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__*/ se(/* @__PURE__ */ u({
|
|
3337
3343
|
__name: "MediaEditModal",
|
|
3338
3344
|
props: {
|
|
3339
3345
|
visible: { type: Boolean },
|
|
3340
|
-
item: {}
|
|
3346
|
+
item: {},
|
|
3347
|
+
save: { type: Function },
|
|
3348
|
+
canCrop: { type: Boolean }
|
|
3341
3349
|
},
|
|
3342
|
-
emits: ["
|
|
3350
|
+
emits: ["close"],
|
|
3343
3351
|
setup(i, { emit: a }) {
|
|
3344
|
-
let s = i, l = a, { t: u } =
|
|
3352
|
+
let s = i, l = a, { t: u } = de(), ie = t(ue, null), se = t(ce, c(null)), ve = u.mediaLibrary, { isImageMimeType: S } = le(), C = c(""), ye = c(""), w = c(null), T = c("free"), E = c(void 0), D = c(void 0), O = c(""), k = c(""), A = c(void 0), j = c(null), be = c(!1), M = c(!1), N = c(!1), P = c(null), F = null, I = [
|
|
3345
3353
|
"image/jpeg",
|
|
3346
3354
|
"image/png",
|
|
3347
|
-
"image/webp"
|
|
3348
|
-
|
|
3349
|
-
].includes(s.item.mimeType ?? "") : !1), xe = g(() => E.value === "original" ? k.value : fe[E.value]), F = g(() => A.value ? ge(A.value.width, A.value.height, ye.value, be.value) : null);
|
|
3355
|
+
"image/webp"
|
|
3356
|
+
], L = g(() => !s.item || !s.canCrop ? !1 : I.includes(s.item.mimeType ?? "")), xe = g(() => E.value !== void 0 || D.value !== void 0), Se = g(() => T.value === "original" ? A.value : pe[T.value]), R = g(() => j.value ? _e(j.value.width, j.value.height, E.value, D.value) : null);
|
|
3350
3357
|
e(() => s.visible, (e) => {
|
|
3351
|
-
e && s.item && (
|
|
3358
|
+
e && s.item && (C.value = s.item.filename ?? "", ye.value = s.item.alt ?? "", T.value = "free", E.value = void 0, D.value = void 0, O.value = "", k.value = "", A.value = void 0, j.value = null, be.value = !1, N.value = !1, P.value = null, F = null, s.item.width && s.item.height && (A.value = s.item.width / s.item.height));
|
|
3352
3359
|
}, { immediate: !0 });
|
|
3353
|
-
function
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3360
|
+
function Ce(e) {
|
|
3361
|
+
return {
|
|
3362
|
+
left: Math.round(e.left),
|
|
3363
|
+
top: Math.round(e.top),
|
|
3364
|
+
width: Math.round(e.width),
|
|
3365
|
+
height: Math.round(e.height)
|
|
3366
|
+
};
|
|
3358
3367
|
}
|
|
3359
|
-
function
|
|
3360
|
-
|
|
3368
|
+
function we(e, t) {
|
|
3369
|
+
return e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height;
|
|
3361
3370
|
}
|
|
3362
|
-
function
|
|
3371
|
+
function Te(e) {
|
|
3372
|
+
if (!e.coordinates) return;
|
|
3373
|
+
let t = Ce(e.coordinates);
|
|
3374
|
+
if (j.value = {
|
|
3375
|
+
width: t.width,
|
|
3376
|
+
height: t.height
|
|
3377
|
+
}, !F) {
|
|
3378
|
+
F = t;
|
|
3379
|
+
return;
|
|
3380
|
+
}
|
|
3381
|
+
N.value = !we(t, F);
|
|
3382
|
+
}
|
|
3383
|
+
function z({ imageSize: e }) {
|
|
3384
|
+
return {
|
|
3385
|
+
width: e.width,
|
|
3386
|
+
height: e.height
|
|
3387
|
+
};
|
|
3388
|
+
}
|
|
3389
|
+
function Ee() {
|
|
3390
|
+
be.value = !0, !A.value && s.item?.width && s.item?.height && (A.value = s.item.width / s.item.height);
|
|
3391
|
+
}
|
|
3392
|
+
function De(e) {
|
|
3363
3393
|
let t = e.target.value;
|
|
3364
|
-
|
|
3394
|
+
O.value = t, E.value = t && parseInt(t, 10) || void 0;
|
|
3365
3395
|
}
|
|
3366
|
-
function
|
|
3396
|
+
function Oe(e) {
|
|
3367
3397
|
let t = e.target.value;
|
|
3368
|
-
|
|
3398
|
+
k.value = t, D.value = t && parseInt(t, 10) || void 0;
|
|
3369
3399
|
}
|
|
3370
|
-
async function
|
|
3371
|
-
let e =
|
|
3400
|
+
async function ke() {
|
|
3401
|
+
let e = C.value.trim();
|
|
3372
3402
|
if (!e || !s.item || M.value) return;
|
|
3373
|
-
let t =
|
|
3374
|
-
if (P.value &&
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3403
|
+
let t = s.item, n = S(t.mimeType ?? ""), r;
|
|
3404
|
+
if (M.value = !0, P.value = null, L.value && w.value && (N.value || xe.value)) try {
|
|
3405
|
+
let { canvas: e } = w.value.getResult();
|
|
3406
|
+
if (!e) throw Error("The cropper returned no canvas");
|
|
3407
|
+
let n = he(e, E.value, D.value);
|
|
3408
|
+
(N.value || n !== e) && (r = { file: await ge(n, t.filename ?? "image", me(t.mimeType ?? "")) });
|
|
3409
|
+
} catch {
|
|
3410
|
+
P.value = "crop", M.value = !1;
|
|
3411
|
+
return;
|
|
3412
|
+
}
|
|
3413
|
+
let i = await s.save(t.id, e, n ? ye.value : void 0, r);
|
|
3414
|
+
if (M.value = !1, i === "saved") {
|
|
3415
|
+
l("close");
|
|
3416
|
+
return;
|
|
3387
3417
|
}
|
|
3388
|
-
|
|
3418
|
+
i === "replaced" && Ae(), P.value = "save";
|
|
3419
|
+
}
|
|
3420
|
+
function Ae() {
|
|
3421
|
+
let e = w.value?.getResult().coordinates;
|
|
3422
|
+
e && (F = Ce(e)), N.value = !1, E.value = void 0, D.value = void 0, O.value = "", k.value = "";
|
|
3389
3423
|
}
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3424
|
+
function je() {
|
|
3425
|
+
M.value || l("close");
|
|
3426
|
+
}
|
|
3427
|
+
let Me = c(null), Ne = g(() => s.visible && s.item !== null);
|
|
3428
|
+
fe(Me, Ne);
|
|
3429
|
+
function B(e) {
|
|
3393
3430
|
if (e.stopPropagation(), e.key === "Enter" && !M.value) {
|
|
3394
3431
|
if (e.target?.closest("textarea, [contenteditable]")) return;
|
|
3395
|
-
e.preventDefault(),
|
|
3432
|
+
e.preventDefault(), ke();
|
|
3396
3433
|
}
|
|
3397
|
-
e.key === "Escape" &&
|
|
3434
|
+
e.key === "Escape" && je();
|
|
3398
3435
|
}
|
|
3399
|
-
return (e, t) => (o(),
|
|
3436
|
+
return (e, t) => (o(), y(h, { to: f(se) || "body" }, [p(ne, {
|
|
3400
3437
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
3401
3438
|
"enter-from-class": "tpl:opacity-0",
|
|
3402
3439
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -3406,51 +3443,52 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3406
3443
|
}, {
|
|
3407
3444
|
default: r(() => [i.visible && i.item ? (o(), _("div", {
|
|
3408
3445
|
key: 0,
|
|
3409
|
-
"data-tpl-theme": f(
|
|
3410
|
-
class: m([f(
|
|
3446
|
+
"data-tpl-theme": f(ie),
|
|
3447
|
+
class: m([f(se) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
3411
3448
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
3412
|
-
onClick:
|
|
3413
|
-
onKeydown:
|
|
3414
|
-
}, [
|
|
3449
|
+
onClick: ee(je, ["self"]),
|
|
3450
|
+
onKeydown: B
|
|
3451
|
+
}, [b("div", {
|
|
3415
3452
|
ref_key: "dialogRef",
|
|
3416
|
-
ref:
|
|
3453
|
+
ref: Me,
|
|
3417
3454
|
role: "dialog",
|
|
3418
3455
|
"aria-modal": "true",
|
|
3419
3456
|
"aria-labelledby": "tpl-media-edit-title",
|
|
3420
|
-
class: m(["tpl:flex tpl:max-h-[90%] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl",
|
|
3457
|
+
class: m(["tpl:flex tpl:max-h-[90%] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", L.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
|
|
3421
3458
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
3422
3459
|
}, [
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3460
|
+
b("div", Ht, [b("h3", Ut, x(f(u).mediaLibrary.editFile), 1)]),
|
|
3461
|
+
b("div", Wt, [
|
|
3462
|
+
L.value ? (o(), _("div", Gt, [b("div", Kt, [p(f(Rt), {
|
|
3426
3463
|
ref_key: "cropperRef",
|
|
3427
|
-
ref:
|
|
3464
|
+
ref: w,
|
|
3428
3465
|
src: i.item.url,
|
|
3429
|
-
"stencil-props": { aspectRatio:
|
|
3466
|
+
"stencil-props": { aspectRatio: Se.value },
|
|
3430
3467
|
class: "tpl:h-full tpl:w-full",
|
|
3431
3468
|
"background-class": "tpl-cropper-background",
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3469
|
+
"default-size": z,
|
|
3470
|
+
onChange: Te,
|
|
3471
|
+
onReady: Ee
|
|
3472
|
+
}, null, 8, ["src", "stencil-props"])]), b("div", qt, [
|
|
3473
|
+
b("div", null, [b("label", Jt, x(f(u).mediaLibrary.cropAspectRatio), 1), b("div", Yt, [(o(), _(ae, null, n([
|
|
3436
3474
|
"free",
|
|
3437
3475
|
"square",
|
|
3438
3476
|
"landscape43",
|
|
3439
3477
|
"landscape169",
|
|
3440
3478
|
"original"
|
|
3441
|
-
], (e) =>
|
|
3479
|
+
], (e) => b("button", {
|
|
3442
3480
|
key: e,
|
|
3443
3481
|
type: "button",
|
|
3444
3482
|
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",
|
|
3445
|
-
style:
|
|
3446
|
-
borderColor:
|
|
3447
|
-
backgroundColor:
|
|
3448
|
-
color:
|
|
3483
|
+
style: te({
|
|
3484
|
+
borderColor: T.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
3485
|
+
backgroundColor: T.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
|
|
3486
|
+
color: T.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
3449
3487
|
}),
|
|
3450
|
-
onClick: (t) =>
|
|
3451
|
-
},
|
|
3452
|
-
|
|
3453
|
-
value:
|
|
3488
|
+
onClick: (t) => T.value = e
|
|
3489
|
+
}, x(f(ve)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Xt)), 64))])]),
|
|
3490
|
+
b("div", Zt, [b("div", Qt, [b("label", $t, [oe(x(f(u).mediaLibrary.cropMaxWidth) + " ", 1), b("span", en, x(f(u).mediaLibrary.cropOptional), 1)]), b("div", tn, [b("input", {
|
|
3491
|
+
value: O.value,
|
|
3454
3492
|
type: "number",
|
|
3455
3493
|
min: "1",
|
|
3456
3494
|
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",
|
|
@@ -3459,10 +3497,10 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3459
3497
|
"background-color": "var(--tpl-bg)",
|
|
3460
3498
|
color: "var(--tpl-text)"
|
|
3461
3499
|
},
|
|
3462
|
-
placeholder:
|
|
3463
|
-
onInput:
|
|
3464
|
-
}, null, 40, nn),
|
|
3465
|
-
value:
|
|
3500
|
+
placeholder: j.value?.width?.toString() || "",
|
|
3501
|
+
onInput: De
|
|
3502
|
+
}, null, 40, nn), b("span", rn, x(f(u).mediaLibrary.cropPixels), 1)])]), b("div", an, [b("label", on, [oe(x(f(u).mediaLibrary.cropMaxHeight) + " ", 1), b("span", sn, x(f(u).mediaLibrary.cropOptional), 1)]), b("div", cn, [b("input", {
|
|
3503
|
+
value: k.value,
|
|
3466
3504
|
type: "number",
|
|
3467
3505
|
min: "1",
|
|
3468
3506
|
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",
|
|
@@ -3471,14 +3509,14 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3471
3509
|
"background-color": "var(--tpl-bg)",
|
|
3472
3510
|
color: "var(--tpl-text)"
|
|
3473
3511
|
},
|
|
3474
|
-
placeholder:
|
|
3475
|
-
onInput:
|
|
3476
|
-
}, null, 40, ln),
|
|
3477
|
-
|
|
3512
|
+
placeholder: j.value?.height?.toString() || "",
|
|
3513
|
+
onInput: Oe
|
|
3514
|
+
}, null, 40, ln), b("span", un, x(f(u).mediaLibrary.cropPixels), 1)])])]),
|
|
3515
|
+
R.value ? (o(), _("div", dn, [b("span", null, x(f(u).mediaLibrary.cropOutputSize) + ": ", 1), b("span", fn, x(R.value.width) + " x " + x(R.value.height) + " " + x(f(u).mediaLibrary.cropPixels), 1)])) : v("", !0)
|
|
3478
3516
|
])])) : v("", !0),
|
|
3479
|
-
|
|
3517
|
+
b("div", pn, [b("label", mn, x(f(u).mediaLibrary.fileName), 1), d(b("input", {
|
|
3480
3518
|
id: "tpl-media-filename",
|
|
3481
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
3519
|
+
"onUpdate:modelValue": t[0] ||= (e) => C.value = e,
|
|
3482
3520
|
type: "text",
|
|
3483
3521
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
3484
3522
|
style: {
|
|
@@ -3486,11 +3524,11 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3486
3524
|
"background-color": "var(--tpl-bg)",
|
|
3487
3525
|
color: "var(--tpl-text)"
|
|
3488
3526
|
},
|
|
3489
|
-
autofocus: !
|
|
3490
|
-
}, null, 8, hn), [[
|
|
3491
|
-
f(
|
|
3527
|
+
autofocus: !L.value
|
|
3528
|
+
}, null, 8, hn), [[re, C.value]])]),
|
|
3529
|
+
f(S)(i.item.mimeType ?? "") ? (o(), _("div", gn, [b("label", _n, x(f(u).mediaLibrary.altText), 1), d(b("input", {
|
|
3492
3530
|
id: "tpl-media-alt",
|
|
3493
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
3531
|
+
"onUpdate:modelValue": t[1] ||= (e) => ye.value = e,
|
|
3494
3532
|
type: "text",
|
|
3495
3533
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
3496
3534
|
style: {
|
|
@@ -3499,31 +3537,33 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3499
3537
|
color: "var(--tpl-text)"
|
|
3500
3538
|
},
|
|
3501
3539
|
placeholder: f(u).mediaLibrary.altTextPlaceholder
|
|
3502
|
-
}, null, 8, vn), [[
|
|
3540
|
+
}, null, 8, vn), [[re, ye.value]])])) : v("", !0)
|
|
3503
3541
|
]),
|
|
3504
|
-
|
|
3542
|
+
P.value ? (o(), _("p", yn, x(P.value === "crop" ? f(u).mediaLibrary.editCropError : f(u).mediaLibrary.editSaveError), 1)) : v("", !0),
|
|
3543
|
+
b("div", bn, [b("button", {
|
|
3505
3544
|
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",
|
|
3506
3545
|
style: {
|
|
3507
3546
|
"border-color": "var(--tpl-border)",
|
|
3508
3547
|
color: "var(--tpl-text)",
|
|
3509
3548
|
"background-color": "var(--tpl-bg)"
|
|
3510
3549
|
},
|
|
3511
|
-
|
|
3512
|
-
|
|
3550
|
+
disabled: M.value,
|
|
3551
|
+
onClick: je
|
|
3552
|
+
}, x(f(u).mediaLibrary.cancel), 9, xn), b("button", {
|
|
3513
3553
|
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",
|
|
3514
3554
|
style: {
|
|
3515
3555
|
"background-color": "var(--tpl-primary)",
|
|
3516
3556
|
color: "var(--tpl-on-primary)"
|
|
3517
3557
|
},
|
|
3518
3558
|
disabled: M.value,
|
|
3519
|
-
onClick:
|
|
3520
|
-
},
|
|
3559
|
+
onClick: ke
|
|
3560
|
+
}, x(M.value ? f(u).mediaLibrary.saving : f(u).mediaLibrary.saveChanges), 9, Sn)])
|
|
3521
3561
|
], 2)], 42, Vt)) : v("", !0)]),
|
|
3522
3562
|
_: 1
|
|
3523
3563
|
})], 8, ["to"]));
|
|
3524
3564
|
}
|
|
3525
|
-
}), [["__scopeId", "data-v-
|
|
3565
|
+
}), [["__scopeId", "data-v-7d9a1872"]]);
|
|
3526
3566
|
//#endregion
|
|
3527
|
-
export {
|
|
3567
|
+
export { Cn as default };
|
|
3528
3568
|
|
|
3529
|
-
//# sourceMappingURL=MediaEditModal-
|
|
3569
|
+
//# sourceMappingURL=MediaEditModal-BHp7euCZ.js.map
|