aitu-app 0.6.13 → 0.6.14
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 +3 -3
- package/assets/{ChatMessagesArea-Btxhq7Z2.js → ChatMessagesArea-BQ33OSbv.js} +4 -4
- package/assets/DialogTaskList-D8vkITTk.js +1 -0
- package/assets/KnowledgeBaseContent-iIzzEUb9.js +143 -0
- package/assets/{ToolboxDrawer-CFAgOmIa.js → ToolboxDrawer-BUixzCAh.js} +14 -14
- package/assets/{ai-analyze-CXbDwr-F.js → ai-analyze-BSLl2uAK.js} +1 -1
- package/assets/ai-image-generation-DvTfL5Pf.js +1 -0
- package/assets/ai-video-generation-mgvQmDxU.js +5 -0
- package/assets/{arc-BVpYfX8u.js → arc-7VZa8sld.js} +1 -1
- package/assets/{arc-Vb6QIvRI.js → arc-CPYfXPW2.js} +1 -1
- package/assets/{batch-image-generation-rvn9zCP-.js → batch-image-generation-C7g9dTtb.js} +5 -5
- package/assets/{blockDiagram-38ab4fdb-CbbmIvT5.js → blockDiagram-38ab4fdb-9wKjan3w.js} +1 -1
- package/assets/{blockDiagram-38ab4fdb-CbUExfWH.js → blockDiagram-38ab4fdb-BfYiey8T.js} +1 -1
- package/assets/{c4Diagram-3d4e48cf-Db1GHdmL.js → c4Diagram-3d4e48cf-Cl1CeBZ9.js} +1 -1
- package/assets/{c4Diagram-3d4e48cf-Dw_8bcgE.js → c4Diagram-3d4e48cf-CvDzfWGg.js} +1 -1
- package/assets/channel-Dq0dBTpp.js +1 -0
- package/assets/channel-QRfYJ0c8.js +1 -0
- package/assets/{classDiagram-70f12bd4-CXXAHxeU.js → classDiagram-70f12bd4-7hx7i_r9.js} +1 -1
- package/assets/{classDiagram-70f12bd4-_p3Dnvx6.js → classDiagram-70f12bd4-C4dqbFYb.js} +1 -1
- package/assets/{classDiagram-v2-f2320105-B-9myg44.js → classDiagram-v2-f2320105-BE6EhyIR.js} +1 -1
- package/assets/{classDiagram-v2-f2320105-ChK1LfBX.js → classDiagram-v2-f2320105-BKvCao98.js} +1 -1
- package/assets/{clipper-CJLNPhZM.js → clipper-DMBYubGg.js} +1 -1
- package/assets/clone-8iorvsVH.js +1 -0
- package/assets/clone-CcaoZaCt.js +1 -0
- package/assets/{createText-2e5e7dd3-BCbwgqBS.js → createText-2e5e7dd3-B5bm44t-.js} +1 -1
- package/assets/{createText-2e5e7dd3-BGRSuPih.js → createText-2e5e7dd3-ClED10Yd.js} +1 -1
- package/assets/{edges-e0da2a9e-BoQQRKl3.js → edges-e0da2a9e-CxYbDWHf.js} +1 -1
- package/assets/{edges-e0da2a9e-1EAOsAGW.js → edges-e0da2a9e-D83AKoY_.js} +1 -1
- package/assets/{erDiagram-9861fffd-DrPXJadW.js → erDiagram-9861fffd-By6KGQIp.js} +1 -1
- package/assets/{erDiagram-9861fffd-DIqIVsjO.js → erDiagram-9861fffd-DklWxrea.js} +1 -1
- package/assets/{flowDb-956e92f1-DKdojl1Z.js → flowDb-956e92f1-B5waKznT.js} +1 -1
- package/assets/{flowDb-956e92f1-_yAXk9b2.js → flowDb-956e92f1-zlQFiVfE.js} +1 -1
- package/assets/{flowDiagram-66a62f08-Cn3BWcxJ.js → flowDiagram-66a62f08-Be1TW-l_.js} +1 -1
- package/assets/{flowDiagram-66a62f08-BSNSE1vH.js → flowDiagram-66a62f08-DN-7_2yD.js} +1 -1
- package/assets/flowDiagram-v2-96b9c2cf-Brfi4xIj.js +1 -0
- package/assets/flowDiagram-v2-96b9c2cf-CPIzTRuX.js +1 -0
- package/assets/{flowchart-elk-definition-4a651766-CkhkUOMa.js → flowchart-elk-definition-4a651766-N0AfQRnQ.js} +1 -1
- package/assets/{flowchart-elk-definition-4a651766-CtRYHypS.js → flowchart-elk-definition-4a651766-r-PtKbtF.js} +1 -1
- package/assets/{ganttDiagram-c361ad54-C-olbHti.js → ganttDiagram-c361ad54-Bht9glx_.js} +1 -1
- package/assets/{ganttDiagram-c361ad54-DWZxEumf.js → ganttDiagram-c361ad54-C2_MLBXD.js} +1 -1
- package/assets/{gitGraphDiagram-72cf32ee-DFI0WJ7k.js → gitGraphDiagram-72cf32ee-2be20W2P.js} +1 -1
- package/assets/{gitGraphDiagram-72cf32ee-Dz3X9B4S.js → gitGraphDiagram-72cf32ee-DbRkmH2_.js} +1 -1
- package/assets/{graph-BbAdRpyG.js → graph-B8wbK8JG.js} +1 -1
- package/assets/{graph-CG3zmXkL.js → graph-Cz6eZWdE.js} +1 -1
- package/assets/{grid-image-CahEQ7p7.js → grid-image-BjBUsyzw.js} +1 -1
- package/assets/{has-Cq7YuzG9.js → has-xmSj69Ai.js} +1 -1
- package/assets/{hasIn-4hPyOh4r.js → hasIn-BEuiXUL_.js} +1 -1
- package/assets/{index-3862675e-D_PJ0qZE.js → index-3862675e-B-TzDFUV.js} +1 -1
- package/assets/{index-3862675e-Cy2LJr-t.js → index-3862675e-DUv0NNEX.js} +1 -1
- package/assets/{index-pt9oZHeu.js → index-BFKE1SDS.js} +1 -1
- package/assets/{index-WyqXHNHN.js → index-BGhQ9HiC.js} +10 -10
- package/assets/{index-C1tgh8XV.js → index-BJPn-Z4H.js} +1 -1
- package/assets/{index-CqEazMaK.js → index-BJt4za3u.js} +1 -1
- package/assets/{index-D9rMZcAy.js → index-BYIrI0Fv.js} +52 -49
- package/assets/index-Bf4QGnyR.css +9 -0
- package/assets/{index-DHrV9sCt.js → index-Bi-3shgC.js} +1 -1
- package/assets/{index-BiCrE7Ci.js → index-Biha89Ph.js} +1 -1
- package/assets/{index-BDnSt0a8.js → index-C7Vp0sfc.js} +1 -1
- package/assets/{index-DtNyBFxZ.js → index-CM5A34wJ.js} +1 -1
- package/assets/{index-XoOCAjmC.js → index-CMqABmj9.js} +1 -1
- package/assets/{index-BOZ3fCzl.js → index-CURBM_KW.js} +1 -1
- package/assets/{index-B4IEsL3l.js → index-CZI4rQ66.js} +1 -1
- package/assets/{index-CYf1zrx4.js → index-Cg0P1L1n.js} +1 -1
- package/assets/{index-B9uNbnfa.js → index-Cg4DzaGJ.js} +1 -1
- package/assets/{index-BZIcMnMw.js → index-Cr7eFaRi.js} +1 -1
- package/assets/{index-7WzIC7_D.js → index-CvvgEQLL.js} +557 -519
- package/assets/index-Cz1tSwF3.css +1 -0
- package/assets/{index-Cx19IgV-.js → index-D35EPyAQ.js} +5 -5
- package/assets/{index-Dv8yvI8G.js → index-D55hpwi0.js} +1 -1
- package/assets/{index-CciPE8zM.js → index-D8hBvwzc.js} +1 -1
- package/assets/{index-BkRTZMZM.js → index-DCPnuU9X.js} +1 -1
- package/assets/{index-Bad6y32x.js → index-DFKy--AY.js} +1 -1
- package/assets/{index-Bco0OAak.js → index-DGrNJ_p2.js} +1 -1
- package/assets/{index-DUgUd4bR.js → index-DZUnWUAx.js} +1 -1
- package/assets/{index-BU3nDlFy.js → index-DergpCoU.js} +1 -1
- package/assets/{index-DBCwQvu4.js → index-Dgpls_LJ.js} +1 -1
- package/assets/{index-jHCkpoWQ.js → index-Dh9OAfqP.js} +1 -1
- package/assets/{index-Dqi7TZna.js → index-DoC8-4hw.js} +2 -2
- package/assets/{index-BQS_8NU3.js → index-DoNZZrMr.js} +1 -1
- package/assets/{index-Bfs6Q-lQ.js → index-Dwd3fQIs.js} +1 -1
- package/assets/{index-BE7n-LiY.js → index-H9okbyq7.js} +1 -1
- package/assets/{index-BOHFUhjZ.js → index-iNzLrLfW.js} +1 -1
- package/assets/index-pQpy2-r1.js +1 -0
- package/assets/{index-ICFaM7Tx.js → index-ukQeGfpm.js} +1 -1
- package/assets/{infoDiagram-f8f76790-D8T-erO4.js → infoDiagram-f8f76790-Ds4mXkkB.js} +1 -1
- package/assets/{infoDiagram-f8f76790-C0TYyx3w.js → infoDiagram-f8f76790-Xs3wpNj_.js} +1 -1
- package/assets/{inspiration-board-CiL8hKbX.js → inspiration-board-aPQmVaUX.js} +1 -1
- package/assets/{isEmpty-BoFRUVaJ.js → isEmpty-BQn8FtDD.js} +1 -1
- package/assets/{journeyDiagram-49397b02-CkmFUv6i.js → journeyDiagram-49397b02-CMj7sdKi.js} +1 -1
- package/assets/{journeyDiagram-49397b02-BHw2LUDu.js → journeyDiagram-49397b02-DAcDgbqb.js} +1 -1
- package/assets/{layers-CaY2-pH6.js → layers-D6Y5pCwe.js} +1 -1
- package/assets/{layout-CSua1dGC.js → layout-DFY48Wfc.js} +1 -1
- package/assets/{layout-D_agYVJ_.js → layout-xjQVmyNt.js} +1 -1
- package/assets/{line-CN9rNlXr.js → line-CS-j1kBY.js} +1 -1
- package/assets/{line-CxGDlzoc.js → line-CnJU8oQA.js} +1 -1
- package/assets/{linear-DKP7SWoM.js → linear-8yUIDV7f.js} +1 -1
- package/assets/{linear-CvStv2Ny.js → linear-BNtDceQW.js} +1 -1
- package/assets/{mermaid.core-DawxQi4y.js → mermaid.core-Bse-qmGl.js} +5 -5
- package/assets/{mindmap-definition-fc14e90a-BWrsnm3I.js → mindmap-definition-fc14e90a-B5pHBBH0.js} +1 -1
- package/assets/{mindmap-definition-fc14e90a-Dmo2lz3K.js → mindmap-definition-fc14e90a-BZEj0_V2.js} +1 -1
- package/assets/{photo-wall-splitter-B_WR4Rl2.js → photo-wall-splitter-DNhSfZ1J.js} +1 -1
- package/assets/pick-Bz9u-Vgl.js +1 -0
- package/assets/{pieDiagram-8a3498a8-DhrponMk.js → pieDiagram-8a3498a8-BX6EY38S.js} +1 -1
- package/assets/{pieDiagram-8a3498a8-CmbWJAb7.js → pieDiagram-8a3498a8-C2SKAWPu.js} +1 -1
- package/assets/{quadrantDiagram-120e2f19-CgIF-y-_.js → quadrantDiagram-120e2f19-C_pOTOg2.js} +1 -1
- package/assets/{quadrantDiagram-120e2f19-DOKwrvFF.js → quadrantDiagram-120e2f19-_4F-o39n.js} +1 -1
- package/assets/{requirementDiagram-deff3bca-BqbqHjdU.js → requirementDiagram-deff3bca-CZBh345Y.js} +1 -1
- package/assets/{requirementDiagram-deff3bca-CIXltTSE.js → requirementDiagram-deff3bca-DUvc5b49.js} +1 -1
- package/assets/{sankeyDiagram-04a897e0-DcPermhl.js → sankeyDiagram-04a897e0-DgwQWZaB.js} +1 -1
- package/assets/{sankeyDiagram-04a897e0-DGiABLdx.js → sankeyDiagram-04a897e0-HlGDp0fm.js} +1 -1
- package/assets/{sequenceDiagram-704730f1-piXYTUjh.js → sequenceDiagram-704730f1-CZleNxPQ.js} +1 -1
- package/assets/{sequenceDiagram-704730f1-BUXJ6XVH.js → sequenceDiagram-704730f1-HXnccUr4.js} +1 -1
- package/assets/{settings-dialog-A3AH7O45.css → settings-dialog-Bf8ExAlc.css} +1 -1
- package/assets/settings-dialog-FIIbAUlz.js +11 -0
- package/assets/{shard-sync-service-BCo2qKEA.js → shard-sync-service-BmLCs0-9.js} +1 -1
- package/assets/{stateDiagram-587899a1-Dnd2X4K4.js → stateDiagram-587899a1-BgbU_RYJ.js} +1 -1
- package/assets/{stateDiagram-587899a1-Cdfs3rRO.js → stateDiagram-587899a1-wcO67Z9P.js} +1 -1
- package/assets/{stateDiagram-v2-d93cdb3a-DtC5XSWV.js → stateDiagram-v2-d93cdb3a-CyibEwON.js} +1 -1
- package/assets/{stateDiagram-v2-d93cdb3a-lOfkWHnS.js → stateDiagram-v2-d93cdb3a-D6v0mGya.js} +1 -1
- package/assets/{styles-6aaf32cf-B_EWv7Bz.js → styles-6aaf32cf-CuwtY8aD.js} +1 -1
- package/assets/{styles-6aaf32cf-BTv8Dnxa.js → styles-6aaf32cf-DPVcUAPG.js} +1 -1
- package/assets/{styles-9a916d00-C4vTAlbK.js → styles-9a916d00-5sadXKIs.js} +1 -1
- package/assets/{styles-9a916d00-BNkP2BU4.js → styles-9a916d00-BlcdlroT.js} +1 -1
- package/assets/{styles-c10674c1-BcxLBYaC.js → styles-c10674c1-DMY3sr0M.js} +1 -1
- package/assets/{styles-c10674c1-Dp5J5JrP.js → styles-c10674c1-fyvfh0rz.js} +2 -2
- package/assets/{svgDrawCommon-08f97a94-CalbTy9V.js → svgDrawCommon-08f97a94-D99zFeK3.js} +1 -1
- package/assets/{svgDrawCommon-08f97a94-5_vuhhyn.js → svgDrawCommon-08f97a94-DCKNxHs0.js} +1 -1
- package/assets/{timeline-definition-85554ec2-DBiJ4h6g.js → timeline-definition-85554ec2-B-Hua8_V.js} +1 -1
- package/assets/{timeline-definition-85554ec2-ByBsrbAq.js → timeline-definition-85554ec2-BJFySUyi.js} +1 -1
- package/assets/{ttd-dialog-C9noZsTQ.js → ttd-dialog-D_LEovv1.js} +4 -4
- package/assets/{upload-DP5n1PVz.js → upload-DPuHWdr4.js} +1 -1
- package/assets/{video-recovery-service-DY01FcHI.js → video-recovery-service-BUo0pCsG.js} +1 -1
- package/assets/{xychartDiagram-e933f94c-CJ1NxG0K.js → xychartDiagram-e933f94c-Cf5Uc503.js} +1 -1
- package/assets/{xychartDiagram-e933f94c-CEXcS3Lw.js → xychartDiagram-e933f94c-Cu1l8Kcq.js} +1 -1
- package/changelog.json +42 -0
- package/package.json +1 -1
- package/precache-manifest.json +279 -279
- package/sw.js +4 -4
- package/version.json +29 -3
- package/assets/DialogTaskList-0I91BD1p.js +0 -1
- package/assets/KnowledgeBaseContent-CSEr1paK.js +0 -153
- package/assets/ai-image-generation-CvUX_vnh.js +0 -1
- package/assets/ai-video-generation-BgDcotXE.js +0 -5
- package/assets/channel-ChluHQU5.js +0 -1
- package/assets/channel-DQ0ggWsj.js +0 -1
- package/assets/clone-BscGHP5K.js +0 -1
- package/assets/clone-CTdvgy2F.js +0 -1
- package/assets/flowDiagram-v2-96b9c2cf-BmoA7Lrr.js +0 -1
- package/assets/flowDiagram-v2-96b9c2cf-Du5Aycbt.js +0 -1
- package/assets/index-C_Ed2LrM.js +0 -1
- package/assets/index-V8UiJyjb.css +0 -1
- package/assets/index-qP_w2VHW.css +0 -9
- package/assets/pick-C1hcXSqm.js +0 -1
- package/assets/settings-dialog-D1OnKj0y.js +0 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{r as i,I as Ue,_ as Ge,aM as Ds,aV as Ms,b0 as Ls,cD as $s,a$ as Ts,bk as he,a6 as Ot,cE as Ps,aT as Dt,aX as Ve,aW as mt,aY as Mt,aZ as He,b2 as Is,b4 as ft,bd as y,bo as Be,cF as As,cG as pt,cH as J,cI as Fs,b9 as Ks,ba as Vs,s as Hs,cJ as Bs,aQ as s,aR as K,bh as _,cK as Lt,cL as Us,cs as Gs,b6 as Zs,bi as $t,cM as Tt,ct as Js,cN as Ws,cr as Xs,bj as Pt,cO as Ys,cP as It,bq as qs,cQ as Qs}from"./index-7WzIC7_D.js";function At(w,p){var x=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);p&&(b=b.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),x.push.apply(x,b)}return x}function Ft(w){for(var p=1;p<arguments.length;p++){var x=arguments[p]!=null?arguments[p]:{};p%2?At(Object(x),!0).forEach(function(b){Ge(w,b,x[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(x)):At(Object(x)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(x,b))})}return w}var ea={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.0002 4.5L11.0002 16.0858L6.50015 11.5858L5.08594 13L12.0002 19.9142L18.9144 13L17.5001 11.5858L13.0002 16.0858L13.0002 4.5L11.0002 4.5Z"}}]},je=i.forwardRef(function(w,p){return i.createElement(Ue,Ft(Ft({},w),{},{id:"arrow-down",ref:p,icon:ea}))});je.displayName="ArrowDownIcon";function Kt(w,p){var x=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);p&&(b=b.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),x.push.apply(x,b)}return x}function Vt(w){for(var p=1;p<arguments.length;p++){var x=arguments[p]!=null?arguments[p]:{};p%2?Kt(Object(x),!0).forEach(function(b){Ge(w,b,x[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(x)):Kt(Object(x)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(x,b))})}return w}var ta={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 2H22V22H2V2ZM4 4V20H20V4H4ZM17.9142 9L10.5 16.4142L6.08579 12L7.5 10.5858L10.5 13.5858L16.5 7.58579L17.9142 9Z"}}]},Jt=i.forwardRef(function(w,p){return i.createElement(Ue,Vt(Vt({},w),{},{id:"check-rectangle",ref:p,icon:ta}))});Jt.displayName="CheckRectangleIcon";function Ht(w,p){var x=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);p&&(b=b.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),x.push.apply(x,b)}return x}function Bt(w){for(var p=1;p<arguments.length;p++){var x=arguments[p]!=null?arguments[p]:{};p%2?Ht(Object(x),!0).forEach(function(b){Ge(w,b,x[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(x)):Ht(Object(x)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(x,b))})}return w}var sa={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M3 1H15.4142L21 6.58579V23H3V1ZM19 9H13V3H5V21H19V9ZM15 3.41745V7H18.5853L15 3.41745ZM7 10H9.6V12H9V12.6H7V10ZM10.4 10H13V12.6H11V12H10.4V10ZM9 14V13.4H7V16H9.6V14H9ZM11 14H17V20H11V14ZM13 16V18H15V16H13Z"}}]},Wt=i.forwardRef(function(w,p){return i.createElement(Ue,Bt(Bt({},w),{},{id:"file-paste",ref:p,icon:sa}))});Wt.displayName="FilePasteIcon";function Ut(w,p){var x=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);p&&(b=b.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),x.push.apply(x,b)}return x}function Gt(w){for(var p=1;p<arguments.length;p++){var x=arguments[p]!=null?arguments[p]:{};p%2?Ut(Object(x),!0).forEach(function(b){Ge(w,b,x[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(x)):Ut(Object(x)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(x,b))})}return w}var aa={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15.0002 3.08569L22.4144 10.4999L2.00015 10.4999V8.4999L17.5859 8.4999L13.5859 4.49991L15.0002 3.08569ZM22.0002 13.4999V15.4999L6.41437 15.4999L10.4144 19.4999L9.00015 20.9141L1.58594 13.4999L22.0002 13.4999Z"}}]},Xt=i.forwardRef(function(w,p){return i.createElement(Ue,Gt(Gt({},w),{},{id:"swap",ref:p,icon:aa}))});Xt.displayName="SwapIcon";function na(w={}){const{showNavbar:p=!0,showToolbar:x=!0,showTitle:b=!0,videoAutoPlay:O=!0,videoLoop:l=!0,onClose:F,onIndexChange:ne}=w,[Q,V]=i.useState(!1),[me,fe]=i.useState([]),[pe,ge]=i.useState(0),Ce=i.useCallback((L,ce=0)=>{const ue=Array.isArray(L)?L:[L];ue.length!==0&&(fe(ue),ge(Math.max(0,Math.min(ce,ue.length-1))),V(!0))},[]),oe=i.useCallback(()=>{V(!1),fe([]),ge(0),F==null||F()},[F]),v=i.useCallback(L=>{ge(L),ne==null||ne(L)},[ne]),E=i.useMemo(()=>({visible:Q,items:me,initialIndex:pe,onClose:oe,onIndexChange:v,showNavbar:p,showToolbar:x,showTitle:b,videoAutoPlay:O,videoLoop:l}),[Q,me,pe,oe,v,p,x,b,O,l]);return{openViewer:Ce,closeViewer:oe,isOpen:Q,currentIndex:pe,items:me,viewerProps:E}}function ra(w,p="image"){return w.map((x,b)=>({url:x,type:p,alt:`${p==="image"?"Image":"Video"} ${b+1}`}))}const Zt=Ps.BATCH_IMAGE_CACHE,la=["auto","1x1","1x4","4x1","1x8","8x1","2x3","3x2","3x4","4x3","4x5","5x4","9x16","16x9","21x9"],gt={auto:"自动","1x1":"1:1","1x4":"1:4","4x1":"4:1","1x8":"1:8","8x1":"8:1","2x3":"2:3","3x2":"3:2","3x4":"3:4","4x3":"4:3","4x5":"4:5","5x4":"5:4","9x16":"9:16","16x9":"16:9","21x9":"21:9"},R=["prompt","size","images","count","preview"];function ia(){const w=[];for(let p=0;p<5;p++)w.push({id:p+1,prompt:"",size:"auto",images:[],count:1,taskIds:[]});return w}const da=({onSwitchToSingle:w,selectedModel:p,selectedModelRef:x,onModelChange:b,onModelRefChange:O})=>{var Rt;const{language:l}=Ds(),F=Ms("image"),{createTask:ne,tasks:Q}=Ls(),{addAsset:V,assets:me,loadAssets:fe}=$s(),{isMobile:pe,isTablet:ge}=Ts(),Ce=pe||ge,oe=me.filter(t=>t.type===he.IMAGE);i.useEffect(()=>{fe()},[fe]);const[v,E]=i.useState(ia),[L,ce]=i.useState(6),[ue,wt]=i.useState(!1),[Ze,Je]=i.useState(!1);i.useEffect(()=>{let t=!0;return Ot.get(Zt).then(e=>{t&&(e&&e.tasks&&Array.isArray(e.tasks)&&e.tasks.length>0&&(E(e.tasks),e.taskIdCounter&&ce(e.taskIdCounter)),wt(!0))}).catch(e=>{console.warn("Failed to load batch image cache:",e),t&&wt(!0)}),()=>{t=!1}},[]);const[S,re]=i.useState(null),[I,W]=i.useState([]),[H,D]=i.useState(null),[C,X]=i.useState(new Set),{validSelectedRows:oa,selectedTaskCount:ca,selectedInfoText:Yt}=i.useMemo(()=>{const t=[...C].filter(n=>{const o=v[n];return o&&o.prompt&&o.prompt.trim()!==""}).sort((n,o)=>n-o),e=t.reduce((n,o)=>{const d=v[o];return n+((d==null?void 0:d.count)||1)},0),a=t.length>0?l==="zh"?`已选 ${t.length} 行 / ${e} 任务`:`${t.length} rows / ${e} tasks`:"";return{validSelectedRows:t,selectedTaskCount:e,selectedInfoText:a}},[C,v,l]),B=i.useRef([]),U=i.useRef(-1),we=i.useRef(!1),[bt,We]=i.useState(!0),[qt,Xe]=i.useState(!1),[G,vt]=i.useState(!1),[P,xt]=i.useState(null),[kt,yt]=i.useState([]),[Se,Ye]=i.useState(null),[de,qe]=i.useState(!1),[Ne,Qe]=i.useState(null),[Qt,et]=i.useState(null),[Y,es]=i.useState(1),[ts,tt]=i.useState(!1),[$,st]=i.useState([]),[ee,jt]=i.useState(1),at=i.useMemo(()=>$.slice(0,12).map(t=>URL.createObjectURL(t)),[$]);i.useEffect(()=>()=>{at.forEach(t=>URL.revokeObjectURL(t))},[at]);const te=Dt("image"),ze=Ve(F,te.modelId,mt(te.profileId,te.modelId))||Mt("image",te.modelId,mt(te.profileId,te.modelId)),[M,_e]=i.useState((ze==null?void 0:ze.id)||((Rt=F[0])==null?void 0:Rt.id)||"gemini-2.5-flash-image-vip"),[Z,Re]=i.useState(He(ze)||mt(te.profileId,te.modelId)),se=i.useMemo(()=>{if(Ve(F,M,Z)||!M)return F;const e=Mt("image",M,Z);return e?[e,...F]:F},[F,M,Z]),be=i.useMemo(()=>{const t=Is(M).map(e=>e.value);return t.length>0?t:la},[M]),q=i.useMemo(()=>new Set(be),[be]),A=i.useMemo(()=>q.has("auto")?"auto":be[0]||"auto",[q,be]);i.useEffect(()=>{E(t=>t.map(e=>q.has(e.size)?e:{...e,size:A}))},[A,q]),i.useEffect(()=>{if(se.length===0)return;Ve(se,M,Z)||(_e(se[0].id),Re(He(se[0])))},[M,Z,se]),i.useEffect(()=>{if(!p)return;const t=ft(M,Z),e=ft(p,x);if(t!==e){_e(p);const a=Ve(se,p,x);Re(He(a)||x||null)}},[p,x,M,Z,se]);const{openViewer:Ct,viewerProps:ss}=na(),[ve,nt]=i.useState(null),[as,Ee]=i.useState(!1),[Oe,ns]=i.useState(5),[rs,rt]=i.useState(!1),[lt,it]=i.useState(null),De=i.useRef(null),Me=i.useRef(null),Le=i.useRef(null),$e=i.useRef(null),St=i.useRef(null),Te=i.useRef(null),ot=i.useRef(null);i.useEffect(()=>{if(!ue)return;const t={tasks:v,taskIdCounter:L,timestamp:Date.now()};Ot.set(Zt,t).catch(e=>{console.warn("Failed to save batch image cache:",e)})},[v,L,ue]);const Nt=i.useCallback((t,e,a,n)=>{if(we.current){we.current=!1;return}B.current=B.current.slice(0,U.current+1);const o={tasks:JSON.parse(JSON.stringify(t)),selectedCells:[...e],activeCell:a?{...a}:null,selectedRows:Array.from(n)};B.current.push(o),U.current=B.current.length-1,B.current.length>50&&(B.current.shift(),U.current--)},[]);i.useEffect(()=>{v.length>0&&Nt(v,I,S,C)},[v,Nt]),i.useEffect(()=>{if(B.current.length>0&&U.current>=0&&!we.current){const t=B.current[U.current];t&&(t.selectedCells=[...I],t.activeCell=S?{...S}:null,t.selectedRows=Array.from(C))}},[I,S,C]);const zt=i.useCallback(()=>{if(U.current>0){U.current--,we.current=!0;const t=B.current[U.current];E(JSON.parse(JSON.stringify(t.tasks))),W([...t.selectedCells]),re(t.activeCell?{...t.activeCell}:null),X(new Set(t.selectedRows)),y.info(l==="zh"?"已撤销":"Undone")}else y.warning(l==="zh"?"没有可撤销的操作":"Nothing to undo")},[l]),_t=i.useCallback(()=>{if(U.current<B.current.length-1){U.current++,we.current=!0;const t=B.current[U.current];E(JSON.parse(JSON.stringify(t.tasks))),W([...t.selectedCells]),re(t.activeCell?{...t.activeCell}:null),X(new Set(t.selectedRows)),y.info(l==="zh"?"已重做":"Redone")}else y.warning(l==="zh"?"没有可重做的操作":"Nothing to redo")},[l]),ls=i.useCallback(t=>{E(e=>{const a=[...e];for(let n=0;n<t;n++)a.push({id:L+n,prompt:"",size:A,images:[],count:1,taskIds:[]});return a}),ce(e=>e+t)},[A,L]),is=i.useCallback(()=>{if(C.size===0){y.warning(l==="zh"?"请先勾选要删除的行":"Please check rows to delete");return}E(t=>t.filter((e,a)=>!C.has(a))),X(new Set),W([]),re(null)},[C,l]),N=i.useCallback((t,e)=>{re({row:t,col:e}),W([{row:t,col:e}]),D(null)},[]),Pe=i.useCallback((t,e)=>{N(t,e),R.includes(e)&&e!=="images"&&D({row:t,col:e})},[N]),z=i.useCallback((t,e,a)=>{E(n=>{if(!n[t])return n;const o=[...n];return o[t]={...o[t],[e]:a},o})},[]),xe=i.useCallback((t,e,a)=>{if(t.shiftKey&&S){const n=Math.min(S.row,e),o=Math.max(S.row,e);X(c=>{const u=new Set(c);for(let k=n;k<=o;k++)u.add(k);return u});const d=[];for(let c=n;c<=o;c++)d.push({row:c,col:S.col});W(d),St.current=e}else t.ctrlKey||t.metaKey?W(n=>n.some(d=>d.row===e&&d.col===a)?n.filter(d=>!(d.row===e&&d.col===a)):[...n,{row:e,col:a}]):(N(e,a),St.current=e)},[S,N]),Ie=i.useCallback(t=>{var a;if(!S){y.warning(l==="zh"?"请先选中一个单元格作为填充源":"Please select a cell as fill source");return}const e=(a=v[S.row])==null?void 0:a[t];if(e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0){y.warning(l==="zh"?"选中的单元格没有数据":"Selected cell has no data");return}E(n=>n.map(o=>({...o,[t]:t==="images"&&Array.isArray(e)?[...e]:e}))),y.success(l==="zh"?"已填充整列":"Column filled")},[S,v,l]),Ae=i.useCallback((t,e)=>{qe(!1),Qe(null),vt(!0),xt({row:t,col:e}),Ye(t)},[]),ct=i.useCallback((t,e)=>{G||(qe(!0),Qe({row:t,col:e}),re({row:t,col:e}),W([{row:t,col:e}]))},[G]),os=i.useCallback(t=>{if(!G&&!de)return;const a=t.target.closest("tr[data-row-index]");if(!a)return;const n=parseInt(a.dataset.rowIndex||"-1");if(!(n<0)){if(G&&P){Ye(n);const o=P.row,d=n,c=Math.min(o,d),u=Math.max(o,d),k=[];for(let f=c;f<=u;f++)f!==o&&k.push(f);yt(k)}if(de&&Ne){const o=Ne.col,d=Ne.row,c=n,u=Math.min(d,c),k=Math.max(d,c),f=[];for(let r=u;r<=k;r++)f.push({row:r,col:o});W(f)}}},[G,P,de,Ne]),Fe=i.useCallback(()=>{var t;if(G&&P&&Se!==null&&Se!==P.row){const e=(t=v[P.row])==null?void 0:t[P.col],a=P.row,n=Se,o=Math.min(a,n),d=Math.max(a,n);E(u=>{const k=[...u];for(let f=o;f<=d;f++)f!==a&&k[f]&&(k[f]={...k[f],[P.col]:Array.isArray(e)?[...e]:e});return k});const c=[];for(let u=o;u<=d;u++)c.push({row:u,col:P.col});W(c),y.success(l==="zh"?`已填充 ${Math.abs(n-a)} 行`:`Filled ${Math.abs(n-a)} rows`)}vt(!1),xt(null),Ye(null),yt([]),qe(!1),Qe(null)},[G,P,Se,v,l]),cs=i.useCallback(t=>{const e=t.target.files;e&&(Array.from(e).forEach(a=>{a.type.startsWith("image/")&&V(a,he.IMAGE,Be.LOCAL,a.name).catch(n=>{console.warn("[BatchImageGeneration] Failed to add asset to library:",n)})}),De.current&&(De.current.value=""))},[V]),us=i.useCallback(t=>{let e=[];if(C.size>0?e=[...C]:I.length>0?e=[...new Set(I.map(a=>a.row))]:S&&(e=[S.row]),e.length===0){y.warning(l==="zh"?"请先选中要添加图片的行":"Please select a row first");return}E(a=>{const n=[...a];return e.forEach(o=>{n[o]&&!n[o].images.includes(t)&&(n[o]={...n[o],images:[...n[o].images,t]})}),n})},[C,I,S,l]),le=i.useCallback((t,e)=>{E(a=>{const n=[...a];return n[t]&&!n[t].images.includes(e)&&(n[t]={...n[t],images:[...n[t].images,e]}),n})},[]),ds=i.useCallback((t,e)=>{E(a=>{const n=[...a];return n[t]&&(n[t]={...n[t],images:n[t].images.filter(o=>o!==e)}),n})},[]),hs=i.useCallback(t=>{const e=t.target.files,a=ot.current;!e||e.length===0||a===null||(Array.from(e).forEach(n=>{if(!n.type.startsWith("image/"))return;V(n,he.IMAGE,Be.LOCAL,n.name).catch(d=>{console.warn("[BatchImageGeneration] Failed to add asset to library:",d)});const o=new FileReader;o.onload=d=>{var u;const c=(u=d.target)==null?void 0:u.result;le(a,c)},o.readAsDataURL(n)}),$e.current&&($e.current.value=""),ot.current=null)},[le,V]),ms=i.useCallback(t=>{var e;ot.current=t,We(!0),(e=$e.current)==null||e.click()},[]),fs=i.useCallback(t=>{it(t),rt(!0)},[]),ps=i.useCallback(t=>{lt!==null&&(t.url&&le(lt,t.url),rt(!1),it(null))},[lt,le]),gs=i.useCallback((t,e)=>{t.preventDefault(),t.dataTransfer.dropEffect="copy",et(e)},[]),ws=i.useCallback(t=>{const e=t.relatedTarget;(!e||!t.currentTarget.contains(e))&&et(null)},[]),bs=i.useCallback((t,e)=>{t.preventDefault(),et(null);const a=t.dataTransfer.getData("text/library-image");if(a){le(e,a),y.success(l==="zh"?`已添加图片到第 ${e+1} 行`:`Added image to row ${e+1}`);return}const n=t.dataTransfer.files;if(!n||n.length===0)return;let o=0;Array.from(n).forEach(d=>{if(!d.type.startsWith("image/"))return;V(d,he.IMAGE,Be.LOCAL,d.name).catch(u=>{console.warn("[BatchImageGeneration] Failed to add asset to library:",u)});const c=new FileReader;c.onload=u=>{var f;const k=(f=u.target)==null?void 0:f.result;le(e,k)},c.readAsDataURL(d),o++}),o>0&&y.success(l==="zh"?`已添加 ${o} 张图片到第 ${e+1} 行`:`Added ${o} images to row ${e+1}`)},[le,l,V]),vs=i.useCallback((t,e)=>{t.dataTransfer.setData("text/library-image",e),t.dataTransfer.effectAllowed="copy"},[]),xs=i.useCallback(t=>{const e=t.target.files;if(!e||e.length===0)return;const a=Array.from(e).filter(o=>o.type.startsWith("image/"));if(a.length===0){y.warning(l==="zh"?"请选择图片文件":"Please select image files");return}st(a);const n=S?S.row+1:1;jt(Math.min(n,v.length)),tt(!0),Me.current&&(Me.current.value="")},[l,S,v.length]),ks=i.useCallback(async()=>{if($.length===0)return;const t=As(`批量导入(${$.length}张)`),e=Y,a=$.length,n=Math.ceil(a/e),o=ee-1,d=[];for(const f of $){V(f,he.IMAGE,Be.LOCAL,f.name).catch(h=>{console.warn("[BatchImageGeneration] Failed to add asset to library:",h)});const r=await new Promise((h,g)=>{const m=new FileReader;m.onload=j=>{var T;return h((T=j.target)==null?void 0:T.result)},m.onerror=g,m.readAsDataURL(f)});d.push(r)}E(f=>{const r=[...f];let h=0,g=0;for(let m=0;m<n;m++){const j=o+m,T=[];for(let ie=0;ie<e&&h<a;ie++)T.push(d[h]),h++;j<r.length?r[j]={...r[j],images:[...r[j].images,...T]}:(r.push({id:L+g,prompt:"",size:A,images:T,count:1,taskIds:[]}),g++)}return r});const c=Math.min(n,v.length-o),u=Math.max(0,n-c);u>0&&ce(f=>f+u),st([]),tt(!1),t();const k=l==="zh"?`已导入 ${a} 张图片,从第 ${ee} 行开始`:`Imported ${a} images starting from row ${ee}`;y.success(k)},[$,Y,ee,L,v.length,l,V,A]),ut=i.useCallback(()=>{st([]),tt(!1)},[]),ys=i.useCallback(async()=>{try{const t=await pt(()=>import("./xlsx-CkFp8p6R.js"),[],import.meta.url),e=[{提示词:"一只可爱的橘猫在阳光下睡觉",尺寸:"1x1",数量:1},{提示词:"未来城市的夜景,霓虹灯闪烁",尺寸:"16x9",数量:2},{提示词:"古风美女,水墨画风格",尺寸:"3x4",数量:1},{提示词:"",尺寸:"1x1",数量:1},{提示词:"",尺寸:"1x1",数量:1}],a=t.utils.book_new(),n=t.utils.json_to_sheet(e);n["!cols"]=[{wch:60},{wch:10},{wch:8}],t.utils.book_append_sheet(a,n,"批量出图模板"),t.writeFile(a,"batch-image-template.xlsx"),y.success(l==="zh"?"模板下载成功,填写后可导入使用":"Template downloaded, fill and import to use")}catch(t){console.error("Excel template download error:",t),y.error(l==="zh"?"下载失败,请稍后重试":"Download failed, please try again")}},[l]),js=i.useCallback(async t=>{var a;const e=(a=t.target.files)==null?void 0:a[0];if(e){try{const n=await pt(()=>import("./xlsx-CkFp8p6R.js"),[],import.meta.url),o=new FileReader;o.onload=d=>{var c;try{const u=new Uint8Array((c=d.target)==null?void 0:c.result),k=n.read(u,{type:"array"}),f=k.SheetNames[0],r=k.Sheets[f],h=n.utils.sheet_to_json(r);if(h.length===0){y.warning(l==="zh"?"Excel 文件为空":"Excel file is empty");return}const g=h.map((m,j)=>{const T=m.提示词||m.prompt||m.Prompt||"",ie=m.尺寸||m.size||m.Size||A,Es=parseInt(String(m.数量||m.count||m.Count||"1"))||1,Et=m.参考图||m.images||m.Images||"",Os=Et?Et.split(`
|
|
2
|
-
`).map(ye=>ye.trim()).filter(ye=>ye.length>0&&!ye.startsWith("[")&&!ye.endsWith("]")):[];return{id:L+j,prompt:String(T).trim(),size:q.has(ie)?ie:A,images:Os,count:Math.max(1,Es),taskIds:[]}});E(m=>[...m,...g]),ce(m=>m+g.length),y.success(l==="zh"?`已导入 ${g.length} 行数据`:`Imported ${g.length} rows`)}catch(u){console.error("Excel import error:",u),y.error(l==="zh"?"导入失败,请检查文件格式":"Import failed, please check file format")}},o.readAsArrayBuffer(e)}catch(n){console.error("Excel library load error:",n),y.error(l==="zh"?"加载 Excel 处理库失败":"Failed to load Excel library")}Le.current&&(Le.current.value="")}},[A,L,l,q]),ae=i.useCallback(t=>{if(t.taskIds.length===0)return{status:"idle",tasks:[],completedCount:0,failedCount:0};const e=Q.filter(c=>t.taskIds.includes(c.id)),a=e.filter(c=>c.status===
|
|
1
|
+
import{r as i,I as Ue,_ as Ge,aM as Ds,aT as Ms,a$ as Ls,cC as $s,a_ as Ts,bj as he,a6 as Ot,cD as Ps,aU as Dt,aV as Ve,aW as mt,aX as Mt,aY as He,b1 as Is,b3 as pt,bc as y,bn as Be,cE as As,cF as ft,cG as Z,cH as Fs,b8 as Ks,b9 as Vs,s as Hs,cI as Bs,aQ as s,aR as K,bg as _,cJ as Lt,cK as Us,ct as Gs,b5 as Js,bh as $t,cL as Tt,cu as Zs,cM as Ws,cs as Xs,bi as Pt,cN as Ys,cO as It,bp as qs,cP as Qs}from"./index-CvvgEQLL.js";function At(w,f){var x=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);f&&(b=b.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),x.push.apply(x,b)}return x}function Ft(w){for(var f=1;f<arguments.length;f++){var x=arguments[f]!=null?arguments[f]:{};f%2?At(Object(x),!0).forEach(function(b){Ge(w,b,x[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(x)):At(Object(x)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(x,b))})}return w}var ea={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.0002 4.5L11.0002 16.0858L6.50015 11.5858L5.08594 13L12.0002 19.9142L18.9144 13L17.5001 11.5858L13.0002 16.0858L13.0002 4.5L11.0002 4.5Z"}}]},je=i.forwardRef(function(w,f){return i.createElement(Ue,Ft(Ft({},w),{},{id:"arrow-down",ref:f,icon:ea}))});je.displayName="ArrowDownIcon";function Kt(w,f){var x=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);f&&(b=b.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),x.push.apply(x,b)}return x}function Vt(w){for(var f=1;f<arguments.length;f++){var x=arguments[f]!=null?arguments[f]:{};f%2?Kt(Object(x),!0).forEach(function(b){Ge(w,b,x[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(x)):Kt(Object(x)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(x,b))})}return w}var ta={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 2H22V22H2V2ZM4 4V20H20V4H4ZM17.9142 9L10.5 16.4142L6.08579 12L7.5 10.5858L10.5 13.5858L16.5 7.58579L17.9142 9Z"}}]},Zt=i.forwardRef(function(w,f){return i.createElement(Ue,Vt(Vt({},w),{},{id:"check-rectangle",ref:f,icon:ta}))});Zt.displayName="CheckRectangleIcon";function Ht(w,f){var x=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);f&&(b=b.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),x.push.apply(x,b)}return x}function Bt(w){for(var f=1;f<arguments.length;f++){var x=arguments[f]!=null?arguments[f]:{};f%2?Ht(Object(x),!0).forEach(function(b){Ge(w,b,x[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(x)):Ht(Object(x)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(x,b))})}return w}var sa={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M3 1H15.4142L21 6.58579V23H3V1ZM19 9H13V3H5V21H19V9ZM15 3.41745V7H18.5853L15 3.41745ZM7 10H9.6V12H9V12.6H7V10ZM10.4 10H13V12.6H11V12H10.4V10ZM9 14V13.4H7V16H9.6V14H9ZM11 14H17V20H11V14ZM13 16V18H15V16H13Z"}}]},Wt=i.forwardRef(function(w,f){return i.createElement(Ue,Bt(Bt({},w),{},{id:"file-paste",ref:f,icon:sa}))});Wt.displayName="FilePasteIcon";function Ut(w,f){var x=Object.keys(w);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(w);f&&(b=b.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),x.push.apply(x,b)}return x}function Gt(w){for(var f=1;f<arguments.length;f++){var x=arguments[f]!=null?arguments[f]:{};f%2?Ut(Object(x),!0).forEach(function(b){Ge(w,b,x[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(x)):Ut(Object(x)).forEach(function(b){Object.defineProperty(w,b,Object.getOwnPropertyDescriptor(x,b))})}return w}var aa={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15.0002 3.08569L22.4144 10.4999L2.00015 10.4999V8.4999L17.5859 8.4999L13.5859 4.49991L15.0002 3.08569ZM22.0002 13.4999V15.4999L6.41437 15.4999L10.4144 19.4999L9.00015 20.9141L1.58594 13.4999L22.0002 13.4999Z"}}]},Xt=i.forwardRef(function(w,f){return i.createElement(Ue,Gt(Gt({},w),{},{id:"swap",ref:f,icon:aa}))});Xt.displayName="SwapIcon";function na(w={}){const{showNavbar:f=!0,showToolbar:x=!0,showTitle:b=!0,videoAutoPlay:O=!0,videoLoop:l=!0,onClose:F,onIndexChange:ne}=w,[Q,V]=i.useState(!1),[me,pe]=i.useState([]),[fe,ge]=i.useState(0),Ce=i.useCallback((L,ce=0)=>{const ue=Array.isArray(L)?L:[L];ue.length!==0&&(pe(ue),ge(Math.max(0,Math.min(ce,ue.length-1))),V(!0))},[]),oe=i.useCallback(()=>{V(!1),pe([]),ge(0),F==null||F()},[F]),v=i.useCallback(L=>{ge(L),ne==null||ne(L)},[ne]),E=i.useMemo(()=>({visible:Q,items:me,initialIndex:fe,onClose:oe,onIndexChange:v,showNavbar:f,showToolbar:x,showTitle:b,videoAutoPlay:O,videoLoop:l}),[Q,me,fe,oe,v,f,x,b,O,l]);return{openViewer:Ce,closeViewer:oe,isOpen:Q,currentIndex:fe,items:me,viewerProps:E}}function ra(w,f="image"){return w.map((x,b)=>({url:x,type:f,alt:`${f==="image"?"Image":"Video"} ${b+1}`}))}const Jt=Ps.BATCH_IMAGE_CACHE,la=["auto","1x1","1x4","4x1","1x8","8x1","2x3","3x2","3x4","4x3","4x5","5x4","9x16","16x9","21x9"],gt={auto:"自动","1x1":"1:1","1x4":"1:4","4x1":"4:1","1x8":"1:8","8x1":"8:1","2x3":"2:3","3x2":"3:2","3x4":"3:4","4x3":"4:3","4x5":"4:5","5x4":"5:4","9x16":"9:16","16x9":"16:9","21x9":"21:9"},R=["prompt","size","images","count","preview"];function ia(){const w=[];for(let f=0;f<5;f++)w.push({id:f+1,prompt:"",size:"auto",images:[],count:1,taskIds:[]});return w}const da=({onSwitchToSingle:w,selectedModel:f,selectedModelRef:x,onModelChange:b,onModelRefChange:O})=>{var Rt;const{language:l}=Ds(),F=Ms("image"),{createTask:ne,tasks:Q}=Ls(),{addAsset:V,assets:me,loadAssets:pe}=$s(),{isMobile:fe,isTablet:ge}=Ts(),Ce=fe||ge,oe=me.filter(t=>t.type===he.IMAGE);i.useEffect(()=>{pe()},[pe]);const[v,E]=i.useState(ia),[L,ce]=i.useState(6),[ue,wt]=i.useState(!1),[Je,Ze]=i.useState(!1);i.useEffect(()=>{let t=!0;return Ot.get(Jt).then(e=>{t&&(e&&e.tasks&&Array.isArray(e.tasks)&&e.tasks.length>0&&(E(e.tasks),e.taskIdCounter&&ce(e.taskIdCounter)),wt(!0))}).catch(e=>{console.warn("Failed to load batch image cache:",e),t&&wt(!0)}),()=>{t=!1}},[]);const[S,re]=i.useState(null),[I,W]=i.useState([]),[H,D]=i.useState(null),[C,X]=i.useState(new Set),{validSelectedRows:oa,selectedTaskCount:ca,selectedInfoText:Yt}=i.useMemo(()=>{const t=[...C].filter(n=>{const o=v[n];return o&&o.prompt&&o.prompt.trim()!==""}).sort((n,o)=>n-o),e=t.reduce((n,o)=>{const d=v[o];return n+((d==null?void 0:d.count)||1)},0),a=t.length>0?l==="zh"?`已选 ${t.length} 行 / ${e} 任务`:`${t.length} rows / ${e} tasks`:"";return{validSelectedRows:t,selectedTaskCount:e,selectedInfoText:a}},[C,v,l]),B=i.useRef([]),U=i.useRef(-1),we=i.useRef(!1),[bt,We]=i.useState(!0),[qt,Xe]=i.useState(!1),[G,vt]=i.useState(!1),[P,xt]=i.useState(null),[kt,yt]=i.useState([]),[Se,Ye]=i.useState(null),[de,qe]=i.useState(!1),[Ne,Qe]=i.useState(null),[Qt,et]=i.useState(null),[Y,es]=i.useState(1),[ts,tt]=i.useState(!1),[$,st]=i.useState([]),[ee,jt]=i.useState(1),at=i.useMemo(()=>$.slice(0,12).map(t=>URL.createObjectURL(t)),[$]);i.useEffect(()=>()=>{at.forEach(t=>URL.revokeObjectURL(t))},[at]);const te=Dt("image"),ze=Ve(F,te.modelId,mt(te.profileId,te.modelId))||Mt("image",te.modelId,mt(te.profileId,te.modelId)),[M,_e]=i.useState((ze==null?void 0:ze.id)||((Rt=F[0])==null?void 0:Rt.id)||"gemini-2.5-flash-image-vip"),[J,Re]=i.useState(He(ze)||mt(te.profileId,te.modelId)),se=i.useMemo(()=>{if(Ve(F,M,J)||!M)return F;const e=Mt("image",M,J);return e?[e,...F]:F},[F,M,J]),be=i.useMemo(()=>{const t=Is(M).map(e=>e.value);return t.length>0?t:la},[M]),q=i.useMemo(()=>new Set(be),[be]),A=i.useMemo(()=>q.has("auto")?"auto":be[0]||"auto",[q,be]);i.useEffect(()=>{E(t=>t.map(e=>q.has(e.size)?e:{...e,size:A}))},[A,q]),i.useEffect(()=>{if(se.length===0)return;Ve(se,M,J)||(_e(se[0].id),Re(He(se[0])))},[M,J,se]),i.useEffect(()=>{if(!f)return;const t=pt(M,J),e=pt(f,x);if(t!==e){_e(f);const a=Ve(se,f,x);Re(He(a)||x||null)}},[f,x,M,J,se]);const{openViewer:Ct,viewerProps:ss}=na(),[ve,nt]=i.useState(null),[as,Ee]=i.useState(!1),[Oe,ns]=i.useState(5),[rs,rt]=i.useState(!1),[lt,it]=i.useState(null),De=i.useRef(null),Me=i.useRef(null),Le=i.useRef(null),$e=i.useRef(null),St=i.useRef(null),Te=i.useRef(null),ot=i.useRef(null);i.useEffect(()=>{if(!ue)return;const t={tasks:v,taskIdCounter:L,timestamp:Date.now()};Ot.set(Jt,t).catch(e=>{console.warn("Failed to save batch image cache:",e)})},[v,L,ue]);const Nt=i.useCallback((t,e,a,n)=>{if(we.current){we.current=!1;return}B.current=B.current.slice(0,U.current+1);const o={tasks:JSON.parse(JSON.stringify(t)),selectedCells:[...e],activeCell:a?{...a}:null,selectedRows:Array.from(n)};B.current.push(o),U.current=B.current.length-1,B.current.length>50&&(B.current.shift(),U.current--)},[]);i.useEffect(()=>{v.length>0&&Nt(v,I,S,C)},[v,Nt]),i.useEffect(()=>{if(B.current.length>0&&U.current>=0&&!we.current){const t=B.current[U.current];t&&(t.selectedCells=[...I],t.activeCell=S?{...S}:null,t.selectedRows=Array.from(C))}},[I,S,C]);const zt=i.useCallback(()=>{if(U.current>0){U.current--,we.current=!0;const t=B.current[U.current];E(JSON.parse(JSON.stringify(t.tasks))),W([...t.selectedCells]),re(t.activeCell?{...t.activeCell}:null),X(new Set(t.selectedRows)),y.info(l==="zh"?"已撤销":"Undone")}else y.warning(l==="zh"?"没有可撤销的操作":"Nothing to undo")},[l]),_t=i.useCallback(()=>{if(U.current<B.current.length-1){U.current++,we.current=!0;const t=B.current[U.current];E(JSON.parse(JSON.stringify(t.tasks))),W([...t.selectedCells]),re(t.activeCell?{...t.activeCell}:null),X(new Set(t.selectedRows)),y.info(l==="zh"?"已重做":"Redone")}else y.warning(l==="zh"?"没有可重做的操作":"Nothing to redo")},[l]),ls=i.useCallback(t=>{E(e=>{const a=[...e];for(let n=0;n<t;n++)a.push({id:L+n,prompt:"",size:A,images:[],count:1,taskIds:[]});return a}),ce(e=>e+t)},[A,L]),is=i.useCallback(()=>{if(C.size===0){y.warning(l==="zh"?"请先勾选要删除的行":"Please check rows to delete");return}E(t=>t.filter((e,a)=>!C.has(a))),X(new Set),W([]),re(null)},[C,l]),N=i.useCallback((t,e)=>{re({row:t,col:e}),W([{row:t,col:e}]),D(null)},[]),Pe=i.useCallback((t,e)=>{N(t,e),R.includes(e)&&e!=="images"&&D({row:t,col:e})},[N]),z=i.useCallback((t,e,a)=>{E(n=>{if(!n[t])return n;const o=[...n];return o[t]={...o[t],[e]:a},o})},[]),xe=i.useCallback((t,e,a)=>{if(t.shiftKey&&S){const n=Math.min(S.row,e),o=Math.max(S.row,e);X(c=>{const u=new Set(c);for(let k=n;k<=o;k++)u.add(k);return u});const d=[];for(let c=n;c<=o;c++)d.push({row:c,col:S.col});W(d),St.current=e}else t.ctrlKey||t.metaKey?W(n=>n.some(d=>d.row===e&&d.col===a)?n.filter(d=>!(d.row===e&&d.col===a)):[...n,{row:e,col:a}]):(N(e,a),St.current=e)},[S,N]),Ie=i.useCallback(t=>{var a;if(!S){y.warning(l==="zh"?"请先选中一个单元格作为填充源":"Please select a cell as fill source");return}const e=(a=v[S.row])==null?void 0:a[t];if(e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0){y.warning(l==="zh"?"选中的单元格没有数据":"Selected cell has no data");return}E(n=>n.map(o=>({...o,[t]:t==="images"&&Array.isArray(e)?[...e]:e}))),y.success(l==="zh"?"已填充整列":"Column filled")},[S,v,l]),Ae=i.useCallback((t,e)=>{qe(!1),Qe(null),vt(!0),xt({row:t,col:e}),Ye(t)},[]),ct=i.useCallback((t,e)=>{G||(qe(!0),Qe({row:t,col:e}),re({row:t,col:e}),W([{row:t,col:e}]))},[G]),os=i.useCallback(t=>{if(!G&&!de)return;const a=t.target.closest("tr[data-row-index]");if(!a)return;const n=parseInt(a.dataset.rowIndex||"-1");if(!(n<0)){if(G&&P){Ye(n);const o=P.row,d=n,c=Math.min(o,d),u=Math.max(o,d),k=[];for(let p=c;p<=u;p++)p!==o&&k.push(p);yt(k)}if(de&&Ne){const o=Ne.col,d=Ne.row,c=n,u=Math.min(d,c),k=Math.max(d,c),p=[];for(let r=u;r<=k;r++)p.push({row:r,col:o});W(p)}}},[G,P,de,Ne]),Fe=i.useCallback(()=>{var t;if(G&&P&&Se!==null&&Se!==P.row){const e=(t=v[P.row])==null?void 0:t[P.col],a=P.row,n=Se,o=Math.min(a,n),d=Math.max(a,n);E(u=>{const k=[...u];for(let p=o;p<=d;p++)p!==a&&k[p]&&(k[p]={...k[p],[P.col]:Array.isArray(e)?[...e]:e});return k});const c=[];for(let u=o;u<=d;u++)c.push({row:u,col:P.col});W(c),y.success(l==="zh"?`已填充 ${Math.abs(n-a)} 行`:`Filled ${Math.abs(n-a)} rows`)}vt(!1),xt(null),Ye(null),yt([]),qe(!1),Qe(null)},[G,P,Se,v,l]),cs=i.useCallback(t=>{const e=t.target.files;e&&(Array.from(e).forEach(a=>{a.type.startsWith("image/")&&V(a,he.IMAGE,Be.LOCAL,a.name).catch(n=>{console.warn("[BatchImageGeneration] Failed to add asset to library:",n)})}),De.current&&(De.current.value=""))},[V]),us=i.useCallback(t=>{let e=[];if(C.size>0?e=[...C]:I.length>0?e=[...new Set(I.map(a=>a.row))]:S&&(e=[S.row]),e.length===0){y.warning(l==="zh"?"请先选中要添加图片的行":"Please select a row first");return}E(a=>{const n=[...a];return e.forEach(o=>{n[o]&&!n[o].images.includes(t)&&(n[o]={...n[o],images:[...n[o].images,t]})}),n})},[C,I,S,l]),le=i.useCallback((t,e)=>{E(a=>{const n=[...a];return n[t]&&!n[t].images.includes(e)&&(n[t]={...n[t],images:[...n[t].images,e]}),n})},[]),ds=i.useCallback((t,e)=>{E(a=>{const n=[...a];return n[t]&&(n[t]={...n[t],images:n[t].images.filter(o=>o!==e)}),n})},[]),hs=i.useCallback(t=>{const e=t.target.files,a=ot.current;!e||e.length===0||a===null||(Array.from(e).forEach(n=>{if(!n.type.startsWith("image/"))return;V(n,he.IMAGE,Be.LOCAL,n.name).catch(d=>{console.warn("[BatchImageGeneration] Failed to add asset to library:",d)});const o=new FileReader;o.onload=d=>{var u;const c=(u=d.target)==null?void 0:u.result;le(a,c)},o.readAsDataURL(n)}),$e.current&&($e.current.value=""),ot.current=null)},[le,V]),ms=i.useCallback(t=>{var e;ot.current=t,We(!0),(e=$e.current)==null||e.click()},[]),ps=i.useCallback(t=>{it(t),rt(!0)},[]),fs=i.useCallback(t=>{lt!==null&&(t.url&&le(lt,t.url),rt(!1),it(null))},[lt,le]),gs=i.useCallback((t,e)=>{t.preventDefault(),t.dataTransfer.dropEffect="copy",et(e)},[]),ws=i.useCallback(t=>{const e=t.relatedTarget;(!e||!t.currentTarget.contains(e))&&et(null)},[]),bs=i.useCallback((t,e)=>{t.preventDefault(),et(null);const a=t.dataTransfer.getData("text/library-image");if(a){le(e,a),y.success(l==="zh"?`已添加图片到第 ${e+1} 行`:`Added image to row ${e+1}`);return}const n=t.dataTransfer.files;if(!n||n.length===0)return;let o=0;Array.from(n).forEach(d=>{if(!d.type.startsWith("image/"))return;V(d,he.IMAGE,Be.LOCAL,d.name).catch(u=>{console.warn("[BatchImageGeneration] Failed to add asset to library:",u)});const c=new FileReader;c.onload=u=>{var p;const k=(p=u.target)==null?void 0:p.result;le(e,k)},c.readAsDataURL(d),o++}),o>0&&y.success(l==="zh"?`已添加 ${o} 张图片到第 ${e+1} 行`:`Added ${o} images to row ${e+1}`)},[le,l,V]),vs=i.useCallback((t,e)=>{t.dataTransfer.setData("text/library-image",e),t.dataTransfer.effectAllowed="copy"},[]),xs=i.useCallback(t=>{const e=t.target.files;if(!e||e.length===0)return;const a=Array.from(e).filter(o=>o.type.startsWith("image/"));if(a.length===0){y.warning(l==="zh"?"请选择图片文件":"Please select image files");return}st(a);const n=S?S.row+1:1;jt(Math.min(n,v.length)),tt(!0),Me.current&&(Me.current.value="")},[l,S,v.length]),ks=i.useCallback(async()=>{if($.length===0)return;const t=As(`批量导入(${$.length}张)`),e=Y,a=$.length,n=Math.ceil(a/e),o=ee-1,d=[];for(const p of $){V(p,he.IMAGE,Be.LOCAL,p.name).catch(h=>{console.warn("[BatchImageGeneration] Failed to add asset to library:",h)});const r=await new Promise((h,g)=>{const m=new FileReader;m.onload=j=>{var T;return h((T=j.target)==null?void 0:T.result)},m.onerror=g,m.readAsDataURL(p)});d.push(r)}E(p=>{const r=[...p];let h=0,g=0;for(let m=0;m<n;m++){const j=o+m,T=[];for(let ie=0;ie<e&&h<a;ie++)T.push(d[h]),h++;j<r.length?r[j]={...r[j],images:[...r[j].images,...T]}:(r.push({id:L+g,prompt:"",size:A,images:T,count:1,taskIds:[]}),g++)}return r});const c=Math.min(n,v.length-o),u=Math.max(0,n-c);u>0&&ce(p=>p+u),st([]),tt(!1),t();const k=l==="zh"?`已导入 ${a} 张图片,从第 ${ee} 行开始`:`Imported ${a} images starting from row ${ee}`;y.success(k)},[$,Y,ee,L,v.length,l,V,A]),ut=i.useCallback(()=>{st([]),tt(!1)},[]),ys=i.useCallback(async()=>{try{const t=await ft(()=>import("./xlsx-CkFp8p6R.js"),[],import.meta.url),e=[{提示词:"一只可爱的橘猫在阳光下睡觉",尺寸:"1x1",数量:1},{提示词:"未来城市的夜景,霓虹灯闪烁",尺寸:"16x9",数量:2},{提示词:"古风美女,水墨画风格",尺寸:"3x4",数量:1},{提示词:"",尺寸:"1x1",数量:1},{提示词:"",尺寸:"1x1",数量:1}],a=t.utils.book_new(),n=t.utils.json_to_sheet(e);n["!cols"]=[{wch:60},{wch:10},{wch:8}],t.utils.book_append_sheet(a,n,"批量出图模板"),t.writeFile(a,"batch-image-template.xlsx"),y.success(l==="zh"?"模板下载成功,填写后可导入使用":"Template downloaded, fill and import to use")}catch(t){console.error("Excel template download error:",t),y.error(l==="zh"?"下载失败,请稍后重试":"Download failed, please try again")}},[l]),js=i.useCallback(async t=>{var a;const e=(a=t.target.files)==null?void 0:a[0];if(e){try{const n=await ft(()=>import("./xlsx-CkFp8p6R.js"),[],import.meta.url),o=new FileReader;o.onload=d=>{var c;try{const u=new Uint8Array((c=d.target)==null?void 0:c.result),k=n.read(u,{type:"array"}),p=k.SheetNames[0],r=k.Sheets[p],h=n.utils.sheet_to_json(r);if(h.length===0){y.warning(l==="zh"?"Excel 文件为空":"Excel file is empty");return}const g=h.map((m,j)=>{const T=m.提示词||m.prompt||m.Prompt||"",ie=m.尺寸||m.size||m.Size||A,Es=parseInt(String(m.数量||m.count||m.Count||"1"))||1,Et=m.参考图||m.images||m.Images||"",Os=Et?Et.split(`
|
|
2
|
+
`).map(ye=>ye.trim()).filter(ye=>ye.length>0&&!ye.startsWith("[")&&!ye.endsWith("]")):[];return{id:L+j,prompt:String(T).trim(),size:q.has(ie)?ie:A,images:Os,count:Math.max(1,Es),taskIds:[]}});E(m=>[...m,...g]),ce(m=>m+g.length),y.success(l==="zh"?`已导入 ${g.length} 行数据`:`Imported ${g.length} rows`)}catch(u){console.error("Excel import error:",u),y.error(l==="zh"?"导入失败,请检查文件格式":"Import failed, please check file format")}},o.readAsArrayBuffer(e)}catch(n){console.error("Excel library load error:",n),y.error(l==="zh"?"加载 Excel 处理库失败":"Failed to load Excel library")}Le.current&&(Le.current.value="")}},[A,L,l,q]),ae=i.useCallback(t=>{if(t.taskIds.length===0)return{status:"idle",tasks:[],completedCount:0,failedCount:0};const e=Q.filter(c=>t.taskIds.includes(c.id)),a=e.filter(c=>c.status===Z.COMPLETED).length,n=e.filter(c=>c.status===Z.FAILED).length,o=e.filter(c=>c.status===Z.PENDING||c.status===Z.PROCESSING).length;let d="idle";return o>0?d="generating":n>0&&a>0?d="partial":n>0?d="failed":a>0&&(d="completed"),{status:d,tasks:e,completedCount:a,failedCount:n}},[Q]),Cs=i.useCallback(async()=>{try{const t=await ft(()=>import("./xlsx-CkFp8p6R.js"),[],import.meta.url),e=32e3,a=r=>{const g=r.map((m,j)=>m.startsWith("data:")?`[本地图片${j+1}]`:m).join(`
|
|
3
3
|
`);return g.length>e?g.substring(0,e-20)+`
|
|
4
|
-
...[已截断]`:g},n=v.map(r=>{const h=ae(r),g=h.tasks.filter(m=>{var j;return m.status===
|
|
5
|
-
`);navigator.clipboard.writeText(k).then(()=>{window.__copiedCells=u})}return}if((e.ctrlKey||e.metaKey)&&e.key==="v"){e.preventDefault();const c=I.length>0?I:[{row:a,col:n}],u=window.__copiedCells;if(u&&u.length>0)if(u.length===1){const k=u[0];c.forEach(
|
|
6
|
-
`).filter(r=>r.trim());if(f.length===1||c.length>1){const r=f[0];c.forEach(h=>{if(h.col==="prompt")z(h.row,h.col,r);else if(h.col==="count"){const g=parseInt(r);!isNaN(g)&&g>=1&&z(h.row,h.col,g)}else h.col==="size"&&q.has(r)&&z(h.row,h.col,r)})}else f.forEach((r,h)=>{const g=a+h;if(!(g>=v.length))if(n==="prompt")z(g,n,r);else if(n==="count"){const m=parseInt(r);!isNaN(m)&&m>=1&&z(g,n,m)}else n==="size"&&q.has(r)&&z(g,n,r)})});return}switch(e.key){case"ArrowUp":e.preventDefault(),a>0&&N(a-1,n);break;case"ArrowDown":e.preventDefault(),a<v.length-1&&N(a+1,n);break;case"ArrowLeft":e.preventDefault(),o>0&&N(a,R[o-1]);break;case"ArrowRight":e.preventDefault(),o<R.length-1&&N(a,R[o+1]);break;case"Tab":e.preventDefault(),e.shiftKey?o>0?N(a,R[o-1]):a>0&&N(a-1,R[R.length-1]):o<R.length-1?N(a,R[o+1]):a<v.length-1&&N(a+1,R[0]);break;case"Enter":e.preventDefault(),n!=="images"&&Pe(a,n);break;case"Escape":e.preventDefault(),D(null);break;case"Delete":case"Backspace":{e.preventDefault(),(I.length>0?I:[{row:a,col:n}]).forEach(u=>{u.col==="prompt"?z(u.row,u.col,""):u.col==="count"?z(u.row,u.col,0):u.col==="images"?z(u.row,u.col,[]):u.col==="size"&&z(u.row,u.col,A)});break}}};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[S,A,H,v,I,N,Pe,z,zt,_t,q]),i.useEffect(()=>{const t=()=>{(G||de)&&Fe()};return document.addEventListener("mouseup",t),()=>document.removeEventListener("mouseup",t)},[G,de,Fe]),i.useEffect(()=>{if(!H||H.col!=="size")return;const t=e=>{e.target.closest(".custom-size-dropdown")||D(null)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[H]);const ke=(t,e,a)=>{var k,f;const n=(H==null?void 0:H.row)===e&&(H==null?void 0:H.col)===a,o=(S==null?void 0:S.row)===e&&(S==null?void 0:S.col)===a,d=I.some(r=>r.row===e&&r.col===a),c=G&&(P==null?void 0:P.col)===a&&kt.includes(e),u=`excel-cell cell-${a} ${o?"active":""} ${d?"selected":""} ${c?"filling":""}`;switch(a){case"prompt":return s.jsxs("div",{className:u,onMouseDown:r=>{r.target.classList.contains("fill-handle")||n||r.button===0&&!r.shiftKey&&ct(e,a)},onClick:r=>{n||xe(r,e,a)},onDoubleClick:()=>Pe(e,a),children:[n?s.jsx("textarea",{className:"cell-textarea",autoFocus:!0,value:t.prompt,placeholder:l==="zh"?"输入提示词...":"Enter prompt...",onChange:r=>{z(e,a,r.target.value)},onFocus:r=>{const h=r.target.value.length;r.target.setSelectionRange(h,h),r.target.style.height="auto",r.target.style.height=r.target.scrollHeight+"px"},onInput:r=>{const h=r.target;h.style.height="auto",h.style.height=h.scrollHeight+"px"},onBlur:()=>D(null),onKeyDown:r=>{if(r.key==="Escape")D(null);else if(r.key==="Enter"&&!r.shiftKey)r.preventDefault(),D(null),e<v.length-1&&N(e+1,a);else if(r.key==="Tab"){r.preventDefault(),D(null);const h=R.indexOf(a);r.shiftKey?h>0?N(e,R[h-1]):e>0&&N(e-1,R[R.length-1]):h<R.length-1?N(e,R[h+1]):e<v.length-1&&N(e+1,R[0])}}}):s.jsx("span",{className:"cell-text",children:t.prompt||""}),o&&s.jsx("div",{className:"fill-handle",onMouseDown:r=>{r.stopPropagation(),Ae(e,a)}})]});case"size":return s.jsxs("div",{className:u,onMouseDown:r=>{r.target.classList.contains("fill-handle")||r.button===0&&!r.shiftKey&&ct(e,a)},onClick:r=>xe(r,e,a),onDoubleClick:()=>{N(e,a),D({row:e,col:a})},children:[n?s.jsxs("div",{className:"custom-size-dropdown",children:[s.jsxs("div",{className:"dropdown-trigger",children:[s.jsx("span",{children:gt[t.size]||t.size}),s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"m6 9 6 6 6-6"})})]}),s.jsx("div",{className:"dropdown-menu",children:be.map(r=>s.jsxs("div",{className:`dropdown-item ${t.size===r?"selected":""}`,onMouseDown:h=>{h.preventDefault(),h.stopPropagation(),z(e,a,r),D(null)},children:[t.size===r&&s.jsx("span",{className:"check-icon",children:"✓"}),gt[r]||r]},r))})]}):s.jsx("span",{className:"cell-text",children:gt[t.size]||t.size}),o&&s.jsx("div",{className:"fill-handle",onMouseDown:r=>{r.stopPropagation(),Ae(e,a)}})]});case"images":return s.jsxs("div",{className:u,onClick:r=>xe(r,e,a),children:[s.jsxs("div",{className:"image-cell-content",children:[t.images.map((r,h)=>s.jsxs("div",{className:"cell-image-thumb",children:[s.jsx("img",{src:r,alt:""}),s.jsx("button",{className:"remove-btn",onClick:g=>{g.stopPropagation(),ds(e,r)},children:"×"})]},h)),s.jsxs("div",{className:"add-image-buttons",children:[s.jsx(_,{variant:"text",shape:"square",size:"small",onClick:r=>{r.stopPropagation(),N(e,a),ms(e)},title:l==="zh"?"上传图片":"Upload image",icon:s.jsx(Pt,{size:16}),className:"add-image-btn","data-track":"batch_row_upload_image_click"}),s.jsx(_,{variant:"text",shape:"square",size:"small",onClick:r=>{r.stopPropagation(),N(e,a),fs(e)},title:l==="zh"?"从素材库选择":"Select from library",icon:s.jsx($t,{size:16}),className:"add-image-btn","data-track":"batch_row_select_from_library_click"})]})]}),o&&s.jsx("div",{className:"fill-handle",onMouseDown:r=>{r.stopPropagation(),Ae(e,a)}})]});case"count":return s.jsxs("div",{className:u,onMouseDown:r=>{r.target.classList.contains("fill-handle")||n||r.button===0&&!r.shiftKey&&ct(e,a)},onClick:r=>{n||xe(r,e,a)},onDoubleClick:()=>Pe(e,a),children:[n?s.jsx("input",{type:"number",autoFocus:!0,min:1,max:10,value:t.count===0?"":t.count,className:"cell-count-input",onChange:r=>{const h=r.target.value;if(h===""){z(e,a,0);return}const g=parseInt(h);isNaN(g)||z(e,a,g)},onBlur:()=>{!t.count||t.count<1?z(e,a,1):t.count>10&&z(e,a,10),D(null)},onKeyDown:r=>{r.key==="Escape"?D(null):r.key==="Enter"&&(D(null),e<v.length-1&&N(e+1,a))}}):s.jsx("span",{className:"cell-text",children:t.count}),o&&s.jsx("div",{className:"fill-handle",onMouseDown:r=>{r.stopPropagation(),Ae(e,a)}})]});case"preview":{const r=ae(t);return s.jsxs("div",{className:`${u} preview-cell preview-${r.status}`,onClick:h=>{r.status==="completed"||r.status==="partial"?nt(e):r.status==="failed"?C.has(e)||Ke(e):xe(h,e,a)},children:[r.status==="idle"&&s.jsx("span",{className:"preview-idle",children:"-"}),(r.status==="generating"||r.status==="completed")&&(()=>{const h=r.tasks.filter(j=>{var T;return j.status===J.COMPLETED&&((T=j.result)==null?void 0:T.url)}).map(j=>j.result.url),g=r.status==="generating",m=r.tasks.filter(j=>j.status===J.PENDING||j.status===J.PROCESSING).length;return h.length===0&&g?s.jsxs("span",{className:"preview-generating",children:[s.jsx("span",{className:"loading-spinner"}),l==="zh"?"生成中...":"Generating..."]}):s.jsxs("div",{className:"preview-images",children:[h.slice(0,g?2:3).map((j,T)=>s.jsx("div",{className:"preview-thumb clickable",onClick:ie=>{ie.stopPropagation(),dt(h,T)},title:l==="zh"?"点击放大,左右切换":"Click to enlarge, swipe to navigate",children:s.jsx("img",{src:j,alt:`Result ${T+1}`})},T)),g&&s.jsxs("span",{className:"preview-generating-inline",title:l==="zh"?`还有 ${m} 张生成中`:`${m} more generating`,children:[s.jsx("span",{className:"loading-spinner"}),"+",m]}),!g&&r.completedCount>3&&s.jsxs("span",{className:"preview-more clickable",onClick:j=>{j.stopPropagation(),nt(e)},title:l==="zh"?"查看全部图片":"View all images",children:["+",r.completedCount-3]})]})})(),r.status==="failed"&&((k=r.tasks[0])==null?void 0:k.error)&&s.jsxs("div",{className:"preview-error",children:[s.jsx("span",{className:"preview-error-message",children:r.tasks[0].error.message}),((f=r.tasks[0].error.details)==null?void 0:f.originalError)&&s.jsx(K,{content:s.jsxs("div",{className:"error-details-tooltip",children:[s.jsx("div",{className:"error-details-title",children:"原始错误信息:"}),s.jsx("div",{className:"error-details-content",children:r.tasks[0].error.details.originalError})]}),theme:"light",placement:"bottom",showArrow:!1,children:s.jsx("span",{className:"preview-error-details-link",children:"[详情]"})})]}),r.status==="partial"&&(()=>{const h=r.tasks.filter(g=>{var m;return g.status===J.COMPLETED&&((m=g.result)==null?void 0:m.url)}).map(g=>g.result.url);return s.jsxs("div",{className:"preview-partial",children:[s.jsx("div",{className:"preview-images",children:h.slice(0,2).map((g,m)=>s.jsx("div",{className:"preview-thumb clickable",onClick:j=>{j.stopPropagation(),dt(h,m)},title:l==="zh"?"点击放大,左右切换":"Click to enlarge, swipe to navigate",children:s.jsx("img",{src:g,alt:`Result ${m+1}`})},m))}),s.jsxs("span",{className:"preview-partial-info",children:["⚠️ ",r.completedCount,"/",r.tasks.length]})]})})()]})}default:return null}};return s.jsxs("div",{className:"batch-image-generation",children:[s.jsxs("div",{className:"batch-main-content",children:[s.jsxs("div",{className:"batch-toolbar",children:[s.jsx("input",{ref:Me,type:"file",accept:"image/*",multiple:!0,onChange:xs,style:{display:"none"}}),s.jsx("input",{ref:$e,type:"file",accept:"image/*",multiple:!0,onChange:hs,style:{display:"none"}}),s.jsx("input",{ref:Le,type:"file",accept:".xlsx,.xls,.csv",onChange:js,style:{display:"none"}}),s.jsxs("div",{className:"toolbar-left",children:[s.jsx(K,{content:l==="zh"?"下载模板":"Download Template",theme:"light",children:s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Lt,{}),onClick:ys,"data-track":"batch_download_template_click"})}),s.jsx(K,{content:l==="zh"?"导入 Excel":"Import Excel",theme:"light",children:s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Wt,{}),onClick:()=>{var t;return(t=Le.current)==null?void 0:t.click()},"data-track":"batch_import_excel_click"})}),s.jsx(K,{content:l==="zh"?"批量导入图片":"Batch Import Images",theme:"light",children:s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Us,{}),onClick:()=>{var t;return(t=Me.current)==null?void 0:t.click()},"data-track":"batch_import_images_click","data-track-params":JSON.stringify({source:"toolbar"})})}),s.jsx("span",{className:"toolbar-divider"}),s.jsx(K,{content:l==="zh"?"选择失败行":"Select Failed Rows",theme:"light",children:s.jsx(_,{variant:"text",theme:"default",icon:s.jsx(Jt,{}),onClick:Ss,"data-track":"batch_select_failed_click"})}),s.jsx(K,{content:l==="zh"?"反选":"Invert Selection",theme:"light",children:s.jsx(_,{variant:"text",theme:"default",icon:s.jsx(Xt,{}),onClick:Ns,"data-track":"batch_invert_selection_click"})}),s.jsx("span",{className:"toolbar-divider"}),s.jsx(_,{variant:"text",theme:"default",icon:s.jsx(Gs,{}),onClick:is,className:"batch-delete-btn","data-track":"batch_delete_selected_click","data-track-params":JSON.stringify({count:C.size}),children:l==="zh"?"删除选中":"Delete Selected"}),s.jsx("span",{className:"toolbar-divider"}),s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Lt,{}),onClick:_s,className:"batch-download-btn","data-track":"batch_download_images_click","data-track-params":JSON.stringify({count:C.size}),children:l==="zh"?"下载选中图片":"Download"})]}),s.jsxs("div",{className:"toolbar-right",children:[s.jsx("div",{className:"model-selector-wrapper","data-track":"batch_model_select",children:s.jsx(Zs,{selectedModel:M,selectedSelectionKey:ft(M,Z),onSelect:t=>{_e(t),Re(null),b==null||b(t),O==null||O(null)},onSelectModel:t=>{_e(t.id);const e=He(t);Re(e),b==null||b(t.id),O==null||O(e)},language:l,models:se,placement:"down",variant:"form",disabled:Ze})}),s.jsx(_,{theme:"primary",onClick:Rs,loading:Ze,className:"batch-generate-btn","data-track":"batch_generate_click","data-track-params":JSON.stringify({selectedRows:C.size,model:M}),children:Ze?l==="zh"?"提交中...":"Submitting...":l==="zh"?"生成选中行":"Generate Selected"}),s.jsx("span",{className:"toolbar-divider"}),!Ce&&!bt&&s.jsx(K,{content:l==="zh"?"显示素材库":"Show Library",theme:"light",children:s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx($t,{size:16}),onClick:()=>We(!0),"data-track":"batch_library_show_click"})})]})]}),s.jsxs("div",{className:`excel-table-container ${G?"is-filling":""} ${de?"is-selecting":""}`,onMouseMove:os,onMouseUp:Fe,onMouseLeave:Fe,children:[s.jsxs("table",{className:"excel-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{className:"col-checkbox",children:s.jsx(K,{content:Yt||(l==="zh"?"全选/取消全选":"Select All / Deselect All"),theme:"light",showArrow:!1,visible:qt,onVisibleChange:t=>Xe(t),children:s.jsx("div",{className:"checkbox-wrapper",children:s.jsx(Tt,{checked:v.length>0&&C.size===v.length,indeterminate:C.size>0&&C.size<v.length,onChange:zs})})})}),s.jsx("th",{className:"row-number",children:"#"}),s.jsx("th",{className:"col-prompt",children:s.jsxs("div",{className:"th-content",children:[l==="zh"?"提示词":"Prompt",s.jsx(K,{content:l==="zh"?"向下填充":"Fill down",theme:"light",children:s.jsx(_,{variant:"text",shape:"circle",size:"small",icon:s.jsx(je,{}),className:"column-fill-btn",onClick:()=>Ie("prompt"),"data-track":"batch_fill_column_click","data-track-params":JSON.stringify({column:"prompt"})})})]})}),s.jsx("th",{className:"col-size",children:s.jsxs("div",{className:"th-content",children:[l==="zh"?"尺寸":"Size",s.jsx(K,{content:l==="zh"?"向下填充":"Fill down",theme:"light",children:s.jsx(_,{variant:"text",shape:"circle",size:"small",icon:s.jsx(je,{}),className:"column-fill-btn",onClick:()=>Ie("size"),"data-track":"batch_fill_column_click","data-track-params":JSON.stringify({column:"size"})})})]})}),s.jsx("th",{className:"col-images",children:s.jsxs("div",{className:"th-content",children:[l==="zh"?"参考图片":"Ref Images",s.jsx(K,{content:l==="zh"?"向下填充":"Fill down",theme:"light",children:s.jsx(_,{variant:"text",shape:"circle",size:"small",icon:s.jsx(je,{}),className:"column-fill-btn",onClick:()=>Ie("images"),"data-track":"batch_fill_column_click","data-track-params":JSON.stringify({column:"images"})})})]})}),s.jsx("th",{className:"col-count",children:s.jsxs("div",{className:"th-content",children:[l==="zh"?"数量":"Count",s.jsx(K,{content:l==="zh"?"向下填充":"Fill down",theme:"light",children:s.jsx(_,{variant:"text",shape:"circle",size:"small",icon:s.jsx(je,{}),className:"column-fill-btn",onClick:()=>Ie("count"),"data-track":"batch_fill_column_click","data-track-params":JSON.stringify({column:"count"})})})]})}),s.jsx("th",{className:"col-preview",children:s.jsx("div",{className:"th-content",children:l==="zh"?"预览":"Preview"})})]})}),s.jsx("tbody",{children:v.map((t,e)=>s.jsxs("tr",{"data-row-index":e,className:`${C.has(e)?"row-selected":""} ${Qt===e?"row-drag-over":""} ${kt.includes(e)?"fill-preview":""}`,onDragOver:a=>gs(a,e),onDragLeave:ws,onDrop:a=>bs(a,e),children:[s.jsx("td",{className:"col-checkbox",onClick:a=>{Ke(e,a.shiftKey)},children:s.jsx("div",{className:"checkbox-wrapper",onClick:a=>{a.stopPropagation(),Ke(e,a.shiftKey)},onMouseEnter:()=>C.size>0&&Xe(!0),onMouseLeave:()=>Xe(!1),children:s.jsx(Tt,{checked:C.has(e)})})}),s.jsx("td",{className:"row-number",onClick:a=>Ke(e,a.shiftKey),style:{cursor:"pointer"},children:e+1}),s.jsx("td",{children:ke(t,e,"prompt")}),s.jsx("td",{children:ke(t,e,"size")}),s.jsx("td",{children:ke(t,e,"images")}),s.jsx("td",{children:ke(t,e,"count")}),s.jsx("td",{children:ke(t,e,"preview")})]},t.id))})]}),s.jsxs("div",{className:"add-rows-section",children:[s.jsx(_,{variant:"dashed",shape:"circle",onClick:()=>Ee(!0),title:l==="zh"?"添加行":"Add Rows",icon:s.jsx(Js,{}),className:"add-rows-btn","data-track":"batch_add_rows_click"}),s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Ws,{}),onClick:Cs,className:"export-excel-btn","data-track":"batch_export_excel_click","data-track-params":JSON.stringify({rowCount:v.length}),children:l==="zh"?"导出Excel":"Export Excel"})]})]}),s.jsx("p",{className:"hint-text",children:l==="zh"?"提示:Enter 编辑/确认 | Tab 移动 | Ctrl+Z 撤销 | Ctrl+Y 重做 | 拖拽图片到行":"Tip: Enter to edit/confirm | Tab to move | Ctrl+Z undo | Ctrl+Y redo | Drag images to rows"})]}),!Ce&&s.jsxs("div",{className:`image-library-sidebar ${bt?"":"hidden"}`,children:[s.jsxs("div",{className:"library-header",children:[s.jsx("h3",{children:l==="zh"?"素材库":"Library"}),s.jsx(_,{variant:"text",shape:"square",size:"small",className:"close-btn",onClick:()=>We(!1),icon:s.jsx(Xs,{}),"data-track":"batch_library_close_click"})]}),s.jsxs("div",{className:"library-content",children:[s.jsxs("div",{className:"upload-section",children:[s.jsx("input",{ref:De,type:"file",accept:"image/*",multiple:!0,onChange:cs,style:{display:"none"}}),s.jsx(_,{block:!0,theme:"default",variant:"outline",icon:s.jsx(Pt,{size:16}),onClick:()=>{var t;return(t=De.current)==null?void 0:t.click()},"data-track":"batch_library_upload_click",children:l==="zh"?"上传图片":"Upload"})]}),s.jsx("div",{className:"library-grid",children:oe.length===0?s.jsx("div",{className:"empty-library",children:l==="zh"?"暂无图片,请上传":"No images, please upload"}):oe.map(t=>s.jsx("div",{className:"library-image",onClick:()=>us(t.url),draggable:!0,onDragStart:e=>vs(e,t.url),title:l==="zh"?"点击添加到选中行,或拖拽到指定行":"Click to add to selected rows, or drag to a specific row","data-track":"batch_library_image_click",children:s.jsx("img",{src:t.url,alt:t.name,draggable:!1})},t.id))})]})]}),ts&&s.jsx("div",{className:"batch-import-modal-overlay",onClick:ut,children:s.jsxs("div",{className:"batch-import-modal",onClick:t=>t.stopPropagation(),children:[s.jsxs("div",{className:"modal-header",children:[s.jsx("h3",{children:l==="zh"?"批量导入图片":"Batch Import Images"}),s.jsx("button",{className:"close-btn",onClick:ut,children:"×"})]}),s.jsxs("div",{className:"modal-body",children:[s.jsx("p",{className:"import-info",children:l==="zh"?`已选择 ${$.length} 张图片`:`${$.length} images selected`}),s.jsxs("div",{className:"import-settings-row",children:[s.jsxs("div",{className:"import-setting-item",children:[s.jsx("label",{children:l==="zh"?"从第几行开始:":"Start from row:"}),s.jsx("input",{type:"number",min:1,max:v.length+Math.ceil($.length/Y),value:ee,onChange:t=>{const e=Math.max(1,parseInt(t.target.value)||1);jt(e)},className:"start-row-input"})]}),s.jsxs("div",{className:"import-setting-item",children:[s.jsx("label",{children:l==="zh"?"每行图片数:":"Images per row:"}),s.jsx("div",{className:"per-row-options",children:[1,2,3,4,5].map(t=>s.jsx("button",{className:`per-row-btn ${Y===t?"active":""}`,onClick:()=>es(t),children:t},t))})]})]}),s.jsx("p",{className:"import-preview",children:l==="zh"?`从第 ${ee} 行开始,填充 ${Math.ceil($.length/Y)} 行,每行 ${Y} 张图片`:`Starting from row ${ee}, filling ${Math.ceil($.length/Y)} rows with ${Y} image(s) each`}),s.jsxs("div",{className:"import-preview-grid",children:[at.map((t,e)=>s.jsx("div",{className:"preview-item",children:s.jsx("img",{src:t,alt:""})},e)),$.length>12&&s.jsxs("div",{className:"preview-more",children:["+",$.length-12]})]})]}),s.jsxs("div",{className:"modal-footer",children:[s.jsx(_,{variant:"outline",theme:"default",onClick:ut,"data-track":"batch_import_modal_cancel_click",children:l==="zh"?"取消":"Cancel"}),s.jsx(_,{theme:"default",variant:"outline",onClick:ks,"data-track":"batch_import_modal_confirm_click","data-track-params":JSON.stringify({imageCount:$.length,imagesPerRow:Y,startRow:ee}),children:l==="zh"?"确认导入":"Import"})]})]})}),s.jsx(Ys,{...ss}),s.jsx(It,{visible:as,onClose:()=>Ee(!1),header:l==="zh"?"添加行":"Add Rows",confirmBtn:{content:l==="zh"?"添加":"Add",theme:"default",variant:"outline",onClick:()=>{ls(Oe),Ee(!1),y.success(l==="zh"?`已添加 ${Oe} 行`:`Added ${Oe} rows`)}},cancelBtn:{content:l==="zh"?"取消":"Cancel",onClick:()=>Ee(!1)},width:360,className:"add-rows-dialog",destroyOnClose:!0,children:s.jsxs("div",{className:"add-rows-content",children:[s.jsx("label",{children:l==="zh"?"添加行数:":"Number of rows:"}),s.jsx("input",{type:"number",min:1,max:100,value:Oe,onChange:t=>ns(Math.max(1,Math.min(100,parseInt(t.target.value)||1))),className:"add-rows-input",autoFocus:!0})]})}),s.jsx(It,{visible:ve!==null,onClose:()=>nt(null),header:l==="zh"?`第 ${(ve??0)+1} 行生成结果`:`Row ${(ve??0)+1} Results`,footer:null,width:"70vw",className:"row-gallery-dialog",destroyOnClose:!0,children:ve!==null&&(()=>{const t=v[ve];if(!t)return null;const a=ae(t).tasks.filter(o=>{var d;return o.status===J.COMPLETED&&((d=o.result)==null?void 0:d.url)}),n=a.map(o=>o.result.url);return s.jsxs("div",{className:"row-gallery-content",children:[s.jsx("div",{className:"gallery-grid",children:a.map((o,d)=>s.jsxs("div",{className:"gallery-item",onClick:()=>dt(n,d),children:[s.jsx("img",{src:o.result.url,alt:`Result ${d+1}`}),s.jsx("span",{className:"gallery-item-index",children:d+1})]},o.id))}),a.length===0&&s.jsx("div",{className:"gallery-empty",children:l==="zh"?"暂无生成结果":"No results yet"})]})})()}),s.jsx(qs,{isOpen:rs,onClose:()=>{rt(!1),it(null)},mode:Qs.SELECT,filterType:he.IMAGE,onSelect:ps})]})};export{da as default};
|
|
4
|
+
...[已截断]`:g},n=v.map(r=>{const h=ae(r),g=h.tasks.filter(m=>{var j;return m.status===Z.COMPLETED&&((j=m.result)==null?void 0:j.url)}).map(m=>m.result.url);return{提示词:r.prompt,尺寸:r.size,参考图:a(r.images),数量:r.count,预览图:a(g),状态:h.status==="idle"?"未生成":h.status==="generating"?"生成中":h.status==="completed"?"已完成":h.status==="failed"?"失败":h.status==="partial"?"部分完成":""}}),o=t.utils.book_new(),d=t.utils.json_to_sheet(n);d["!cols"]=[{wch:60},{wch:10},{wch:80},{wch:8},{wch:80},{wch:12}],t.utils.book_append_sheet(o,d,"批量出图数据");const c=new Date,u=`${c.getFullYear()}${String(c.getMonth()+1).padStart(2,"0")}${String(c.getDate()).padStart(2,"0")}`,k=`${String(c.getHours()).padStart(2,"0")}${String(c.getMinutes()).padStart(2,"0")}`,p=`batch-image-export_${u}_${k}.xlsx`;t.writeFile(o,p),y.success(l==="zh"?`已导出 ${v.length} 行数据`:`Exported ${v.length} rows`)}catch(t){console.error("Excel export error:",t),y.error(l==="zh"?"导出失败,请稍后重试":"Export failed, please try again")}},[v,ae,l]),Ss=i.useCallback(()=>{const t=[];if(v.forEach((e,a)=>{const{status:n}=ae(e);(n==="failed"||n==="partial")&&t.push(a)}),t.length===0){y.info(l==="zh"?"没有失败的行":"No failed rows");return}X(new Set(t)),y.success(l==="zh"?`已选中 ${t.length} 个失败行`:`Selected ${t.length} failed rows`)},[v,ae,l]),Ns=i.useCallback(()=>{const t=new Set;v.forEach((e,a)=>{C.has(a)||t.add(a)}),X(t)},[v,C]),dt=i.useCallback((t,e=0)=>{Ct(ra(t,"image"),e)},[Ct]),Ke=i.useCallback((t,e=!1)=>{X(a=>{const n=new Set(a);if(e&&Te.current!==null){const o=Math.min(Te.current,t),d=Math.max(Te.current,t);for(let c=o;c<=d;c++)n.add(c)}else n.has(t)?n.delete(t):n.add(t);return n}),Te.current=t},[]),zs=i.useCallback(()=>{C.size===v.length&&v.length>0?X(new Set):X(new Set(v.map((t,e)=>e)))},[v,C.size]),_s=i.useCallback(async()=>{const t=[...C].sort((a,n)=>a-n);if(t.length===0){y.warning(l==="zh"?"请先勾选要下载的行":"Please check rows to download");return}const e=[];if(t.forEach(a=>{const n=v[a];n&&n.taskIds.forEach((o,d)=>{var u;const c=Q.find(k=>k.id===o);(c==null?void 0:c.status)===Z.COMPLETED&&((u=c.result)!=null&&u.url)&&e.push({url:c.result.url,filename:`row${a+1}_${d+1}_${n.prompt.slice(0,20).replace(/[^\w\u4e00-\u9fa5]/g,"_")}.png`})})}),e.length===0){y.warning(l==="zh"?"选中的行没有已生成的图片":"No generated images in selected rows");return}try{y.info(l==="zh"?"正在准备下载...":"Preparing download...");const a=new Date,n=`${a.getFullYear()}${String(a.getMonth()+1).padStart(2,"0")}${String(a.getDate()).padStart(2,"0")}`,o=`${String(a.getHours()).padStart(2,"0")}${String(a.getMinutes()).padStart(2,"0")}`,d=`aitu_images_${e.length}pics_${n}_${o}.zip`,c=e.map(u=>({url:u.url,type:"image",filename:u.filename}));await Fs(c,d),y.success(l==="zh"?"下载成功":"Download complete")}catch(a){console.error("Download failed:",a),y.error(l==="zh"?"下载失败":"Download failed")}},[C,v,Q,l]),ht=i.useCallback(async t=>{if(Ze(!0),!Ks("image",J||M)&&(D(null),re(null),!await Vs())){Ze(!1),y.warning(l==="zh"?"需要 API Key 才能生成图片":"API Key is required to generate images");return}const e=Date.now();let a=0,n=0;for(const{task:o,rowIndex:d}of t){const c=o.count||1,u=`batch_${o.id}_${e}`,k=o.size||A,p=k==="auto"?void 0:k,r=o.images.map((g,m)=>({type:"url",url:g,name:`reference_${m+1}`})),h=[];for(let g=0;g<c;g++){a++;const m={prompt:o.prompt.trim(),aspectRatio:k,size:p,model:M||Dt("image").modelId||"gemini-2.5-flash-image-vip",modelRef:J||null,uploadedImages:r,batchId:u,batchIndex:g+1,batchTotal:c,globalIndex:a,autoInsertToCanvas:!0},j=ne(m,Hs.IMAGE);j&&(n++,h.push(j.id))}h.length>0&&E(g=>{const m=[...g];return m[d]&&(m[d]={...m[d],taskIds:[...m[d].taskIds,...h]}),m})}Ze(!1),n>0&&y.success(l==="zh"?`已提交 ${n} 个任务到队列`:`Submitted ${n} tasks to queue`)},[ne,A,l,M,J,E,D,re]),Rs=i.useCallback(async()=>{const t=[...C].sort((c,u)=>c-u);if(t.length===0){y.warning(l==="zh"?"请先勾选要生成的行":"Please check rows to generate");return}const e=t.map(c=>({task:v[c],rowIndex:c})).filter(({task:c})=>c&&c.prompt&&c.prompt.trim()!=="");if(e.length===0){y.warning(l==="zh"?"选中的行没有填写提示词":"Selected rows have no prompts");return}const a=e.filter(({task:c})=>ae(c).status==="generating"),n=e.filter(({task:c})=>(c.count||1)>=100),o=e.reduce((c,{task:u})=>c+(u.count||1),0),d=o>=100;if(a.length>0||n.length>0||d){const c=[];if(a.length>0){const r=a.map(({rowIndex:h})=>h+1).join("、");c.push(l==="zh"?`第 ${r} 行正在生成中`:`Row ${r} is generating`)}if(n.length>0){const r=n.map(({task:h,rowIndex:g})=>l==="zh"?`第 ${g+1} 行数量为 ${h.count}`:`Row ${g+1} count is ${h.count}`).join("、");c.push(r)}d&&c.push(l==="zh"?`总任务数为 ${o}`:`Total task count is ${o}`);const u=c.join(l==="zh"?";":"; "),k=l==="zh"?`${u},是否继续?`:`${u}. Continue?`,p=Bs.confirm({header:l==="zh"?"生成提醒":"Generation Warning",body:k,confirmBtn:l==="zh"?"继续生成":"Continue",cancelBtn:l==="zh"?"取消":"Cancel",theme:"warning",closeBtn:!0,onConfirm:()=>{p.destroy(),ht(e)},onCancel:()=>{p.destroy()},onClose:()=>{p.destroy()}});return}ht(e)},[v,C,l,ht,ae]);i.useEffect(()=>{const t=e=>{if(!S||H)return;const{row:a,col:n}=S,o=R.indexOf(n);if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&R.includes(n)&&n!=="images"&&n!=="size"){if(e.preventDefault(),n==="count"){const c=parseInt(e.key);isNaN(c)?z(a,n,0):z(a,n,c)}else n==="prompt"&&z(a,n,e.key);D({row:a,col:n}),window.__cellEditSelectAll=!1;return}if((e.ctrlKey||e.metaKey)&&e.key==="z"&&!e.shiftKey){e.preventDefault(),zt();return}if((e.ctrlKey||e.metaKey)&&(e.key==="y"||e.key==="z"&&e.shiftKey)){e.preventDefault(),_t();return}if((e.ctrlKey||e.metaKey)&&e.key==="c"){e.preventDefault();const u=[...I].sort((k,p)=>k.row-p.row).map(k=>{var r;const p=(r=v[k.row])==null?void 0:r[k.col];return{row:k.row,col:k.col,value:p}});if(u.length>0){const k=u.map(p=>p.col==="images"?JSON.stringify(p.value):String(p.value??"")).join(`
|
|
5
|
+
`);navigator.clipboard.writeText(k).then(()=>{window.__copiedCells=u})}return}if((e.ctrlKey||e.metaKey)&&e.key==="v"){e.preventDefault();const c=I.length>0?I:[{row:a,col:n}],u=window.__copiedCells;if(u&&u.length>0)if(u.length===1){const k=u[0];c.forEach(p=>{p.col===k.col&&z(p.row,p.col,k.value)})}else u.forEach((k,p)=>{const r=a+p;r<v.length&&z(r,n,k.value)});else navigator.clipboard.readText().then(k=>{const p=k.split(`
|
|
6
|
+
`).filter(r=>r.trim());if(p.length===1||c.length>1){const r=p[0];c.forEach(h=>{if(h.col==="prompt")z(h.row,h.col,r);else if(h.col==="count"){const g=parseInt(r);!isNaN(g)&&g>=1&&z(h.row,h.col,g)}else h.col==="size"&&q.has(r)&&z(h.row,h.col,r)})}else p.forEach((r,h)=>{const g=a+h;if(!(g>=v.length))if(n==="prompt")z(g,n,r);else if(n==="count"){const m=parseInt(r);!isNaN(m)&&m>=1&&z(g,n,m)}else n==="size"&&q.has(r)&&z(g,n,r)})});return}switch(e.key){case"ArrowUp":e.preventDefault(),a>0&&N(a-1,n);break;case"ArrowDown":e.preventDefault(),a<v.length-1&&N(a+1,n);break;case"ArrowLeft":e.preventDefault(),o>0&&N(a,R[o-1]);break;case"ArrowRight":e.preventDefault(),o<R.length-1&&N(a,R[o+1]);break;case"Tab":e.preventDefault(),e.shiftKey?o>0?N(a,R[o-1]):a>0&&N(a-1,R[R.length-1]):o<R.length-1?N(a,R[o+1]):a<v.length-1&&N(a+1,R[0]);break;case"Enter":e.preventDefault(),n!=="images"&&Pe(a,n);break;case"Escape":e.preventDefault(),D(null);break;case"Delete":case"Backspace":{e.preventDefault(),(I.length>0?I:[{row:a,col:n}]).forEach(u=>{u.col==="prompt"?z(u.row,u.col,""):u.col==="count"?z(u.row,u.col,0):u.col==="images"?z(u.row,u.col,[]):u.col==="size"&&z(u.row,u.col,A)});break}}};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[S,A,H,v,I,N,Pe,z,zt,_t,q]),i.useEffect(()=>{const t=()=>{(G||de)&&Fe()};return document.addEventListener("mouseup",t),()=>document.removeEventListener("mouseup",t)},[G,de,Fe]),i.useEffect(()=>{if(!H||H.col!=="size")return;const t=e=>{e.target.closest(".custom-size-dropdown")||D(null)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[H]);const ke=(t,e,a)=>{var k,p;const n=(H==null?void 0:H.row)===e&&(H==null?void 0:H.col)===a,o=(S==null?void 0:S.row)===e&&(S==null?void 0:S.col)===a,d=I.some(r=>r.row===e&&r.col===a),c=G&&(P==null?void 0:P.col)===a&&kt.includes(e),u=`excel-cell cell-${a} ${o?"active":""} ${d?"selected":""} ${c?"filling":""}`;switch(a){case"prompt":return s.jsxs("div",{className:u,onMouseDown:r=>{r.target.classList.contains("fill-handle")||n||r.button===0&&!r.shiftKey&&ct(e,a)},onClick:r=>{n||xe(r,e,a)},onDoubleClick:()=>Pe(e,a),children:[n?s.jsx("textarea",{className:"cell-textarea",autoFocus:!0,value:t.prompt,placeholder:l==="zh"?"输入提示词...":"Enter prompt...",onChange:r=>{z(e,a,r.target.value)},onFocus:r=>{const h=r.target.value.length;r.target.setSelectionRange(h,h),r.target.style.height="auto",r.target.style.height=r.target.scrollHeight+"px"},onInput:r=>{const h=r.target;h.style.height="auto",h.style.height=h.scrollHeight+"px"},onBlur:()=>D(null),onKeyDown:r=>{if(r.key==="Escape")D(null);else if(r.key==="Enter"&&!r.shiftKey)r.preventDefault(),D(null),e<v.length-1&&N(e+1,a);else if(r.key==="Tab"){r.preventDefault(),D(null);const h=R.indexOf(a);r.shiftKey?h>0?N(e,R[h-1]):e>0&&N(e-1,R[R.length-1]):h<R.length-1?N(e,R[h+1]):e<v.length-1&&N(e+1,R[0])}}}):s.jsx("span",{className:"cell-text",children:t.prompt||""}),o&&s.jsx("div",{className:"fill-handle",onMouseDown:r=>{r.stopPropagation(),Ae(e,a)}})]});case"size":return s.jsxs("div",{className:u,onMouseDown:r=>{r.target.classList.contains("fill-handle")||r.button===0&&!r.shiftKey&&ct(e,a)},onClick:r=>xe(r,e,a),onDoubleClick:()=>{N(e,a),D({row:e,col:a})},children:[n?s.jsxs("div",{className:"custom-size-dropdown",children:[s.jsxs("div",{className:"dropdown-trigger",children:[s.jsx("span",{children:gt[t.size]||t.size}),s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"m6 9 6 6 6-6"})})]}),s.jsx("div",{className:"dropdown-menu",children:be.map(r=>s.jsxs("div",{className:`dropdown-item ${t.size===r?"selected":""}`,onMouseDown:h=>{h.preventDefault(),h.stopPropagation(),z(e,a,r),D(null)},children:[t.size===r&&s.jsx("span",{className:"check-icon",children:"✓"}),gt[r]||r]},r))})]}):s.jsx("span",{className:"cell-text",children:gt[t.size]||t.size}),o&&s.jsx("div",{className:"fill-handle",onMouseDown:r=>{r.stopPropagation(),Ae(e,a)}})]});case"images":return s.jsxs("div",{className:u,onClick:r=>xe(r,e,a),children:[s.jsxs("div",{className:"image-cell-content",children:[t.images.map((r,h)=>s.jsxs("div",{className:"cell-image-thumb",children:[s.jsx("img",{src:r,alt:""}),s.jsx("button",{className:"remove-btn",onClick:g=>{g.stopPropagation(),ds(e,r)},children:"×"})]},h)),s.jsxs("div",{className:"add-image-buttons",children:[s.jsx(_,{variant:"text",shape:"square",size:"small",onClick:r=>{r.stopPropagation(),N(e,a),ms(e)},title:l==="zh"?"上传图片":"Upload image",icon:s.jsx(Pt,{size:16}),className:"add-image-btn","data-track":"batch_row_upload_image_click"}),s.jsx(_,{variant:"text",shape:"square",size:"small",onClick:r=>{r.stopPropagation(),N(e,a),ps(e)},title:l==="zh"?"从素材库选择":"Select from library",icon:s.jsx($t,{size:16}),className:"add-image-btn","data-track":"batch_row_select_from_library_click"})]})]}),o&&s.jsx("div",{className:"fill-handle",onMouseDown:r=>{r.stopPropagation(),Ae(e,a)}})]});case"count":return s.jsxs("div",{className:u,onMouseDown:r=>{r.target.classList.contains("fill-handle")||n||r.button===0&&!r.shiftKey&&ct(e,a)},onClick:r=>{n||xe(r,e,a)},onDoubleClick:()=>Pe(e,a),children:[n?s.jsx("input",{type:"number",autoFocus:!0,min:1,max:10,value:t.count===0?"":t.count,className:"cell-count-input",onChange:r=>{const h=r.target.value;if(h===""){z(e,a,0);return}const g=parseInt(h);isNaN(g)||z(e,a,g)},onBlur:()=>{!t.count||t.count<1?z(e,a,1):t.count>10&&z(e,a,10),D(null)},onKeyDown:r=>{r.key==="Escape"?D(null):r.key==="Enter"&&(D(null),e<v.length-1&&N(e+1,a))}}):s.jsx("span",{className:"cell-text",children:t.count}),o&&s.jsx("div",{className:"fill-handle",onMouseDown:r=>{r.stopPropagation(),Ae(e,a)}})]});case"preview":{const r=ae(t);return s.jsxs("div",{className:`${u} preview-cell preview-${r.status}`,onClick:h=>{r.status==="completed"||r.status==="partial"?nt(e):r.status==="failed"?C.has(e)||Ke(e):xe(h,e,a)},children:[r.status==="idle"&&s.jsx("span",{className:"preview-idle",children:"-"}),(r.status==="generating"||r.status==="completed")&&(()=>{const h=r.tasks.filter(j=>{var T;return j.status===Z.COMPLETED&&((T=j.result)==null?void 0:T.url)}).map(j=>j.result.url),g=r.status==="generating",m=r.tasks.filter(j=>j.status===Z.PENDING||j.status===Z.PROCESSING).length;return h.length===0&&g?s.jsxs("span",{className:"preview-generating",children:[s.jsx("span",{className:"loading-spinner"}),l==="zh"?"生成中...":"Generating..."]}):s.jsxs("div",{className:"preview-images",children:[h.slice(0,g?2:3).map((j,T)=>s.jsx("div",{className:"preview-thumb clickable",onClick:ie=>{ie.stopPropagation(),dt(h,T)},title:l==="zh"?"点击放大,左右切换":"Click to enlarge, swipe to navigate",children:s.jsx("img",{src:j,alt:`Result ${T+1}`})},T)),g&&s.jsxs("span",{className:"preview-generating-inline",title:l==="zh"?`还有 ${m} 张生成中`:`${m} more generating`,children:[s.jsx("span",{className:"loading-spinner"}),"+",m]}),!g&&r.completedCount>3&&s.jsxs("span",{className:"preview-more clickable",onClick:j=>{j.stopPropagation(),nt(e)},title:l==="zh"?"查看全部图片":"View all images",children:["+",r.completedCount-3]})]})})(),r.status==="failed"&&((k=r.tasks[0])==null?void 0:k.error)&&s.jsxs("div",{className:"preview-error",children:[s.jsx("span",{className:"preview-error-message",children:r.tasks[0].error.message}),((p=r.tasks[0].error.details)==null?void 0:p.originalError)&&s.jsx(K,{content:s.jsxs("div",{className:"error-details-tooltip",children:[s.jsx("div",{className:"error-details-title",children:"原始错误信息:"}),s.jsx("div",{className:"error-details-content",children:r.tasks[0].error.details.originalError})]}),theme:"light",placement:"bottom",showArrow:!1,children:s.jsx("span",{className:"preview-error-details-link",children:"[详情]"})})]}),r.status==="partial"&&(()=>{const h=r.tasks.filter(g=>{var m;return g.status===Z.COMPLETED&&((m=g.result)==null?void 0:m.url)}).map(g=>g.result.url);return s.jsxs("div",{className:"preview-partial",children:[s.jsx("div",{className:"preview-images",children:h.slice(0,2).map((g,m)=>s.jsx("div",{className:"preview-thumb clickable",onClick:j=>{j.stopPropagation(),dt(h,m)},title:l==="zh"?"点击放大,左右切换":"Click to enlarge, swipe to navigate",children:s.jsx("img",{src:g,alt:`Result ${m+1}`})},m))}),s.jsxs("span",{className:"preview-partial-info",children:["⚠️ ",r.completedCount,"/",r.tasks.length]})]})})()]})}default:return null}};return s.jsxs("div",{className:"batch-image-generation",children:[s.jsxs("div",{className:"batch-main-content",children:[s.jsxs("div",{className:"batch-toolbar",children:[s.jsx("input",{ref:Me,type:"file",accept:"image/*",multiple:!0,onChange:xs,style:{display:"none"}}),s.jsx("input",{ref:$e,type:"file",accept:"image/*",multiple:!0,onChange:hs,style:{display:"none"}}),s.jsx("input",{ref:Le,type:"file",accept:".xlsx,.xls,.csv",onChange:js,style:{display:"none"}}),s.jsxs("div",{className:"toolbar-left",children:[s.jsx(K,{content:l==="zh"?"下载模板":"Download Template",theme:"light",children:s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Lt,{}),onClick:ys,"data-track":"batch_download_template_click"})}),s.jsx(K,{content:l==="zh"?"导入 Excel":"Import Excel",theme:"light",children:s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Wt,{}),onClick:()=>{var t;return(t=Le.current)==null?void 0:t.click()},"data-track":"batch_import_excel_click"})}),s.jsx(K,{content:l==="zh"?"批量导入图片":"Batch Import Images",theme:"light",children:s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Us,{}),onClick:()=>{var t;return(t=Me.current)==null?void 0:t.click()},"data-track":"batch_import_images_click","data-track-params":JSON.stringify({source:"toolbar"})})}),s.jsx("span",{className:"toolbar-divider"}),s.jsx(K,{content:l==="zh"?"选择失败行":"Select Failed Rows",theme:"light",children:s.jsx(_,{variant:"text",theme:"default",icon:s.jsx(Zt,{}),onClick:Ss,"data-track":"batch_select_failed_click"})}),s.jsx(K,{content:l==="zh"?"反选":"Invert Selection",theme:"light",children:s.jsx(_,{variant:"text",theme:"default",icon:s.jsx(Xt,{}),onClick:Ns,"data-track":"batch_invert_selection_click"})}),s.jsx("span",{className:"toolbar-divider"}),s.jsx(_,{variant:"text",theme:"default",icon:s.jsx(Gs,{}),onClick:is,className:"batch-delete-btn","data-track":"batch_delete_selected_click","data-track-params":JSON.stringify({count:C.size}),children:l==="zh"?"删除选中":"Delete Selected"}),s.jsx("span",{className:"toolbar-divider"}),s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Lt,{}),onClick:_s,className:"batch-download-btn","data-track":"batch_download_images_click","data-track-params":JSON.stringify({count:C.size}),children:l==="zh"?"下载选中图片":"Download"})]}),s.jsxs("div",{className:"toolbar-right",children:[s.jsx("div",{className:"model-selector-wrapper","data-track":"batch_model_select",children:s.jsx(Js,{selectedModel:M,selectedSelectionKey:pt(M,J),onSelect:t=>{_e(t),Re(null),b==null||b(t),O==null||O(null)},onSelectModel:t=>{_e(t.id);const e=He(t);Re(e),b==null||b(t.id),O==null||O(e)},language:l,models:se,placement:"down",variant:"form",disabled:Je})}),s.jsx(_,{theme:"primary",onClick:Rs,loading:Je,className:"batch-generate-btn","data-track":"batch_generate_click","data-track-params":JSON.stringify({selectedRows:C.size,model:M}),children:Je?l==="zh"?"提交中...":"Submitting...":l==="zh"?"生成选中行":"Generate Selected"}),s.jsx("span",{className:"toolbar-divider"}),!Ce&&!bt&&s.jsx(K,{content:l==="zh"?"显示素材库":"Show Library",theme:"light",children:s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx($t,{size:16}),onClick:()=>We(!0),"data-track":"batch_library_show_click"})})]})]}),s.jsxs("div",{className:`excel-table-container ${G?"is-filling":""} ${de?"is-selecting":""}`,onMouseMove:os,onMouseUp:Fe,onMouseLeave:Fe,children:[s.jsxs("table",{className:"excel-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{className:"col-checkbox",children:s.jsx(K,{content:Yt||(l==="zh"?"全选/取消全选":"Select All / Deselect All"),theme:"light",showArrow:!1,visible:qt,onVisibleChange:t=>Xe(t),children:s.jsx("div",{className:"checkbox-wrapper",children:s.jsx(Tt,{checked:v.length>0&&C.size===v.length,indeterminate:C.size>0&&C.size<v.length,onChange:zs})})})}),s.jsx("th",{className:"row-number",children:"#"}),s.jsx("th",{className:"col-prompt",children:s.jsxs("div",{className:"th-content",children:[l==="zh"?"提示词":"Prompt",s.jsx(K,{content:l==="zh"?"向下填充":"Fill down",theme:"light",children:s.jsx(_,{variant:"text",shape:"circle",size:"small",icon:s.jsx(je,{}),className:"column-fill-btn",onClick:()=>Ie("prompt"),"data-track":"batch_fill_column_click","data-track-params":JSON.stringify({column:"prompt"})})})]})}),s.jsx("th",{className:"col-size",children:s.jsxs("div",{className:"th-content",children:[l==="zh"?"尺寸":"Size",s.jsx(K,{content:l==="zh"?"向下填充":"Fill down",theme:"light",children:s.jsx(_,{variant:"text",shape:"circle",size:"small",icon:s.jsx(je,{}),className:"column-fill-btn",onClick:()=>Ie("size"),"data-track":"batch_fill_column_click","data-track-params":JSON.stringify({column:"size"})})})]})}),s.jsx("th",{className:"col-images",children:s.jsxs("div",{className:"th-content",children:[l==="zh"?"参考图片":"Ref Images",s.jsx(K,{content:l==="zh"?"向下填充":"Fill down",theme:"light",children:s.jsx(_,{variant:"text",shape:"circle",size:"small",icon:s.jsx(je,{}),className:"column-fill-btn",onClick:()=>Ie("images"),"data-track":"batch_fill_column_click","data-track-params":JSON.stringify({column:"images"})})})]})}),s.jsx("th",{className:"col-count",children:s.jsxs("div",{className:"th-content",children:[l==="zh"?"数量":"Count",s.jsx(K,{content:l==="zh"?"向下填充":"Fill down",theme:"light",children:s.jsx(_,{variant:"text",shape:"circle",size:"small",icon:s.jsx(je,{}),className:"column-fill-btn",onClick:()=>Ie("count"),"data-track":"batch_fill_column_click","data-track-params":JSON.stringify({column:"count"})})})]})}),s.jsx("th",{className:"col-preview",children:s.jsx("div",{className:"th-content",children:l==="zh"?"预览":"Preview"})})]})}),s.jsx("tbody",{children:v.map((t,e)=>s.jsxs("tr",{"data-row-index":e,className:`${C.has(e)?"row-selected":""} ${Qt===e?"row-drag-over":""} ${kt.includes(e)?"fill-preview":""}`,onDragOver:a=>gs(a,e),onDragLeave:ws,onDrop:a=>bs(a,e),children:[s.jsx("td",{className:"col-checkbox",onClick:a=>{Ke(e,a.shiftKey)},children:s.jsx("div",{className:"checkbox-wrapper",onClick:a=>{a.stopPropagation(),Ke(e,a.shiftKey)},onMouseEnter:()=>C.size>0&&Xe(!0),onMouseLeave:()=>Xe(!1),children:s.jsx(Tt,{checked:C.has(e)})})}),s.jsx("td",{className:"row-number",onClick:a=>Ke(e,a.shiftKey),style:{cursor:"pointer"},children:e+1}),s.jsx("td",{children:ke(t,e,"prompt")}),s.jsx("td",{children:ke(t,e,"size")}),s.jsx("td",{children:ke(t,e,"images")}),s.jsx("td",{children:ke(t,e,"count")}),s.jsx("td",{children:ke(t,e,"preview")})]},t.id))})]}),s.jsxs("div",{className:"add-rows-section",children:[s.jsx(_,{variant:"dashed",shape:"circle",onClick:()=>Ee(!0),title:l==="zh"?"添加行":"Add Rows",icon:s.jsx(Zs,{}),className:"add-rows-btn","data-track":"batch_add_rows_click"}),s.jsx(_,{variant:"outline",theme:"default",icon:s.jsx(Ws,{}),onClick:Cs,className:"export-excel-btn","data-track":"batch_export_excel_click","data-track-params":JSON.stringify({rowCount:v.length}),children:l==="zh"?"导出Excel":"Export Excel"})]})]}),s.jsx("p",{className:"hint-text",children:l==="zh"?"提示:Enter 编辑/确认 | Tab 移动 | Ctrl+Z 撤销 | Ctrl+Y 重做 | 拖拽图片到行":"Tip: Enter to edit/confirm | Tab to move | Ctrl+Z undo | Ctrl+Y redo | Drag images to rows"})]}),!Ce&&s.jsxs("div",{className:`image-library-sidebar ${bt?"":"hidden"}`,children:[s.jsxs("div",{className:"library-header",children:[s.jsx("h3",{children:l==="zh"?"素材库":"Library"}),s.jsx(_,{variant:"text",shape:"square",size:"small",className:"close-btn",onClick:()=>We(!1),icon:s.jsx(Xs,{}),"data-track":"batch_library_close_click"})]}),s.jsxs("div",{className:"library-content",children:[s.jsxs("div",{className:"upload-section",children:[s.jsx("input",{ref:De,type:"file",accept:"image/*",multiple:!0,onChange:cs,style:{display:"none"}}),s.jsx(_,{block:!0,theme:"default",variant:"outline",icon:s.jsx(Pt,{size:16}),onClick:()=>{var t;return(t=De.current)==null?void 0:t.click()},"data-track":"batch_library_upload_click",children:l==="zh"?"上传图片":"Upload"})]}),s.jsx("div",{className:"library-grid",children:oe.length===0?s.jsx("div",{className:"empty-library",children:l==="zh"?"暂无图片,请上传":"No images, please upload"}):oe.map(t=>s.jsx("div",{className:"library-image",onClick:()=>us(t.url),draggable:!0,onDragStart:e=>vs(e,t.url),title:l==="zh"?"点击添加到选中行,或拖拽到指定行":"Click to add to selected rows, or drag to a specific row","data-track":"batch_library_image_click",children:s.jsx("img",{src:t.url,alt:t.name,draggable:!1})},t.id))})]})]}),ts&&s.jsx("div",{className:"batch-import-modal-overlay",onClick:ut,children:s.jsxs("div",{className:"batch-import-modal",onClick:t=>t.stopPropagation(),children:[s.jsxs("div",{className:"modal-header",children:[s.jsx("h3",{children:l==="zh"?"批量导入图片":"Batch Import Images"}),s.jsx("button",{className:"close-btn",onClick:ut,children:"×"})]}),s.jsxs("div",{className:"modal-body",children:[s.jsx("p",{className:"import-info",children:l==="zh"?`已选择 ${$.length} 张图片`:`${$.length} images selected`}),s.jsxs("div",{className:"import-settings-row",children:[s.jsxs("div",{className:"import-setting-item",children:[s.jsx("label",{children:l==="zh"?"从第几行开始:":"Start from row:"}),s.jsx("input",{type:"number",min:1,max:v.length+Math.ceil($.length/Y),value:ee,onChange:t=>{const e=Math.max(1,parseInt(t.target.value)||1);jt(e)},className:"start-row-input"})]}),s.jsxs("div",{className:"import-setting-item",children:[s.jsx("label",{children:l==="zh"?"每行图片数:":"Images per row:"}),s.jsx("div",{className:"per-row-options",children:[1,2,3,4,5].map(t=>s.jsx("button",{className:`per-row-btn ${Y===t?"active":""}`,onClick:()=>es(t),children:t},t))})]})]}),s.jsx("p",{className:"import-preview",children:l==="zh"?`从第 ${ee} 行开始,填充 ${Math.ceil($.length/Y)} 行,每行 ${Y} 张图片`:`Starting from row ${ee}, filling ${Math.ceil($.length/Y)} rows with ${Y} image(s) each`}),s.jsxs("div",{className:"import-preview-grid",children:[at.map((t,e)=>s.jsx("div",{className:"preview-item",children:s.jsx("img",{src:t,alt:""})},e)),$.length>12&&s.jsxs("div",{className:"preview-more",children:["+",$.length-12]})]})]}),s.jsxs("div",{className:"modal-footer",children:[s.jsx(_,{variant:"outline",theme:"default",onClick:ut,"data-track":"batch_import_modal_cancel_click",children:l==="zh"?"取消":"Cancel"}),s.jsx(_,{theme:"default",variant:"outline",onClick:ks,"data-track":"batch_import_modal_confirm_click","data-track-params":JSON.stringify({imageCount:$.length,imagesPerRow:Y,startRow:ee}),children:l==="zh"?"确认导入":"Import"})]})]})}),s.jsx(Ys,{...ss}),s.jsx(It,{visible:as,onClose:()=>Ee(!1),header:l==="zh"?"添加行":"Add Rows",confirmBtn:{content:l==="zh"?"添加":"Add",theme:"default",variant:"outline",onClick:()=>{ls(Oe),Ee(!1),y.success(l==="zh"?`已添加 ${Oe} 行`:`Added ${Oe} rows`)}},cancelBtn:{content:l==="zh"?"取消":"Cancel",onClick:()=>Ee(!1)},width:360,className:"add-rows-dialog",destroyOnClose:!0,children:s.jsxs("div",{className:"add-rows-content",children:[s.jsx("label",{children:l==="zh"?"添加行数:":"Number of rows:"}),s.jsx("input",{type:"number",min:1,max:100,value:Oe,onChange:t=>ns(Math.max(1,Math.min(100,parseInt(t.target.value)||1))),className:"add-rows-input",autoFocus:!0})]})}),s.jsx(It,{visible:ve!==null,onClose:()=>nt(null),header:l==="zh"?`第 ${(ve??0)+1} 行生成结果`:`Row ${(ve??0)+1} Results`,footer:null,width:"70vw",className:"row-gallery-dialog",destroyOnClose:!0,children:ve!==null&&(()=>{const t=v[ve];if(!t)return null;const a=ae(t).tasks.filter(o=>{var d;return o.status===Z.COMPLETED&&((d=o.result)==null?void 0:d.url)}),n=a.map(o=>o.result.url);return s.jsxs("div",{className:"row-gallery-content",children:[s.jsx("div",{className:"gallery-grid",children:a.map((o,d)=>s.jsxs("div",{className:"gallery-item",onClick:()=>dt(n,d),children:[s.jsx("img",{src:o.result.url,alt:`Result ${d+1}`}),s.jsx("span",{className:"gallery-item-index",children:d+1})]},o.id))}),a.length===0&&s.jsx("div",{className:"gallery-empty",children:l==="zh"?"暂无生成结果":"No results yet"})]})})()}),s.jsx(qs,{isOpen:rs,onClose:()=>{rt(!1),it(null)},mode:Qs.SELECT,filterType:he.IMAGE,onSelect:fs})]})};export{da as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X as se,a7 as ye,d as H,e as Ee,l as S,r as we,k as De,g as he,$ as ve}from"./mermaid.core-
|
|
1
|
+
import{X as se,a7 as ye,d as H,e as Ee,l as S,r as we,k as De,g as he,$ as ve}from"./mermaid.core-Bse-qmGl.js";import{c as Ne}from"./clone-8iorvsVH.js";import{i as ke,a as Ie,b as Oe,p as Te,c as ge,d as ze}from"./edges-e0da2a9e-CxYbDWHf.js";import{G as Ce}from"./graph-B8wbK8JG.js";import{c as Ae}from"./channel-Dq0dBTpp.js";import{o as Re}from"./ordinal-BRr1uYdk.js";import{s as Be}from"./Tableau10-Dnlau_Wv.js";import"./index-CvvgEQLL.js";import"./createText-2e5e7dd3-B5bm44t-.js";import"./line-CS-j1kBY.js";import"./array-B5oSNiGi.js";import"./path-CY0bYimO.js";import"./init-A0kIFD9x.js";var le,oe,ee=(function(){var e=function(D,o,s,i){for(s=s||{},i=D.length;i--;s[D[i]]=o);return s},a=[1,7],d=[1,13],c=[1,14],n=[1,15],g=[1,19],l=[1,16],f=[1,17],b=[1,18],p=[8,30],x=[8,21,28,29,30,31,32,40,44,47],y=[1,23],T=[1,24],v=[8,15,16,21,28,29,30,31,32,40,44,47],N=[8,15,16,21,27,28,29,30,31,32,40,44,47],E=[1,49],L={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(o,s,i,u,h,t,m){var r=t.length-1;switch(h){case 4:u.getLogger().debug("Rule: separator (NL) ");break;case 5:u.getLogger().debug("Rule: separator (Space) ");break;case 6:u.getLogger().debug("Rule: separator (EOF) ");break;case 7:u.getLogger().debug("Rule: hierarchy: ",t[r-1]),u.setHierarchy(t[r-1]);break;case 8:u.getLogger().debug("Stop NL ");break;case 9:u.getLogger().debug("Stop EOF ");break;case 10:u.getLogger().debug("Stop NL2 ");break;case 11:u.getLogger().debug("Stop EOF2 ");break;case 12:u.getLogger().debug("Rule: statement: ",t[r]),typeof t[r].length=="number"?this.$=t[r]:this.$=[t[r]];break;case 13:u.getLogger().debug("Rule: statement #2: ",t[r-1]),this.$=[t[r-1]].concat(t[r]);break;case 14:u.getLogger().debug("Rule: link: ",t[r],o),this.$={edgeTypeStr:t[r],label:""};break;case 15:u.getLogger().debug("Rule: LABEL link: ",t[r-3],t[r-1],t[r]),this.$={edgeTypeStr:t[r],label:t[r-1]};break;case 18:const R=parseInt(t[r]),Y=u.generateId();this.$={id:Y,type:"space",label:"",width:R,children:[]};break;case 23:u.getLogger().debug("Rule: (nodeStatement link node) ",t[r-2],t[r-1],t[r]," typestr: ",t[r-1].edgeTypeStr);const F=u.edgeStrToEdgeData(t[r-1].edgeTypeStr);this.$=[{id:t[r-2].id,label:t[r-2].label,type:t[r-2].type,directions:t[r-2].directions},{id:t[r-2].id+"-"+t[r].id,start:t[r-2].id,end:t[r].id,label:t[r-1].label,type:"edge",directions:t[r].directions,arrowTypeEnd:F,arrowTypeStart:"arrow_open"},{id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions}];break;case 24:u.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[r-1],t[r]),this.$={id:t[r-1].id,label:t[r-1].label,type:u.typeStr2Type(t[r-1].typeStr),directions:t[r-1].directions,widthInColumns:parseInt(t[r],10)};break;case 25:u.getLogger().debug("Rule: nodeStatement (node) ",t[r]),this.$={id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions,widthInColumns:1};break;case 26:u.getLogger().debug("APA123",this?this:"na"),u.getLogger().debug("COLUMNS: ",t[r]),this.$={type:"column-setting",columns:t[r]==="auto"?-1:parseInt(t[r])};break;case 27:u.getLogger().debug("Rule: id-block statement : ",t[r-2],t[r-1]),u.generateId(),this.$={...t[r-2],type:"composite",children:t[r-1]};break;case 28:u.getLogger().debug("Rule: blockStatement : ",t[r-2],t[r-1],t[r]);const C=u.generateId();this.$={id:C,type:"composite",label:"",children:t[r-1]};break;case 29:u.getLogger().debug("Rule: node (NODE_ID separator): ",t[r]),this.$={id:t[r]};break;case 30:u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[r-1],t[r]),this.$={id:t[r-1],label:t[r].label,typeStr:t[r].typeStr,directions:t[r].directions};break;case 31:u.getLogger().debug("Rule: dirList: ",t[r]),this.$=[t[r]];break;case 32:u.getLogger().debug("Rule: dirList: ",t[r-1],t[r]),this.$=[t[r-1]].concat(t[r]);break;case 33:u.getLogger().debug("Rule: nodeShapeNLabel: ",t[r-2],t[r-1],t[r]),this.$={typeStr:t[r-2]+t[r],label:t[r-1]};break;case 34:u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[r-3],t[r-2]," #3:",t[r-1],t[r]),this.$={typeStr:t[r-3]+t[r],label:t[r-2],directions:t[r-1]};break;case 35:case 36:this.$={type:"classDef",id:t[r-1].trim(),css:t[r].trim()};break;case 37:this.$={type:"applyClass",id:t[r-1].trim(),styleClass:t[r].trim()};break;case 38:this.$={type:"applyStyles",id:t[r-1].trim(),stylesStr:t[r].trim()};break}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:f,47:b},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:a,28:d,29:c,31:n,32:g,40:l,44:f,47:b}),e(x,[2,16],{14:22,15:y,16:T}),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),e(x,[2,21]),e(x,[2,22]),e(v,[2,25],{27:[1,25]}),e(x,[2,26]),{19:26,26:12,32:g},{11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:f,47:b},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(N,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,32:g},{32:[2,14]},{17:[1,36]},e(v,[2,24]),{11:37,13:4,14:22,15:y,16:T,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:f,47:b},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(N,[2,30]),{18:[1,43]},{18:[1,44]},e(v,[2,23]),{18:[1,45]},{30:[1,46]},e(x,[2,28]),e(x,[2,35]),e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{37:[1,47]},{34:48,35:E},{15:[1,50]},e(x,[2,27]),e(N,[2,33]),{39:[1,51]},{34:52,35:E,39:[2,31]},{32:[2,15]},e(N,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(o,s){if(s.recoverable)this.trace(o);else{var i=new Error(o);throw i.hash=s,i}},parse:function(o){var s=this,i=[0],u=[],h=[null],t=[],m=this.table,r="",R=0,Y=0,F=2,C=1,Le=t.slice.call(arguments,1),w=Object.create(this.lexer),K={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(K.yy[Z]=this.yy[Z]);w.setInput(o,K.yy),K.yy.lexer=w,K.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var J=w.yylloc;t.push(J);var me=w.options&&w.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(){var P;return P=u.pop()||w.lex()||C,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}for(var I,M,z,Q,W={},X,B,ae,G;;){if(M=i[i.length-1],this.defaultActions[M]?z=this.defaultActions[M]:((I===null||typeof I>"u")&&(I=_e()),z=m[M]&&m[M][I]),typeof z>"u"||!z.length||!z[0]){var $="";G=[];for(X in m[M])this.terminals_[X]&&X>F&&G.push("'"+this.terminals_[X]+"'");w.showPosition?$="Parse error on line "+(R+1)+`:
|
|
2
2
|
`+w.showPosition()+`
|
|
3
3
|
Expecting `+G.join(", ")+", got '"+(this.terminals_[I]||I)+"'":$="Parse error on line "+(R+1)+": Unexpected "+(I==C?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError($,{text:w.match,token:this.terminals_[I]||I,line:w.yylineno,loc:J,expected:G})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+I);switch(z[0]){case 1:i.push(I),h.push(w.yytext),t.push(w.yylloc),i.push(z[1]),I=null,Y=w.yyleng,r=w.yytext,R=w.yylineno,J=w.yylloc;break;case 2:if(B=this.productions_[z[1]][1],W.$=h[h.length-B],W._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},me&&(W._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(W,[r,Y,R,K.yy,z[1],h,t].concat(Le)),typeof Q<"u")return Q;B&&(i=i.slice(0,-1*B*2),h=h.slice(0,-1*B),t=t.slice(0,-1*B)),i.push(this.productions_[z[1]][0]),h.push(W.$),t.push(W._$),ae=m[i[i.length-2]][i[i.length-1]],i.push(ae);break;case 3:return!0}}return!0}},A=(function(){var D={EOF:1,parseError:function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},setInput:function(o,s){return this.yy=s||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,i=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Y as se,a8 as ye,d as H,e as Ee,l as S,r as we,k as De,g as he,a0 as ve}from"./index-
|
|
1
|
+
import{Y as se,a8 as ye,d as H,e as Ee,l as S,r as we,k as De,g as he,a0 as ve}from"./index-D35EPyAQ.js";import{c as Ne}from"./clone-CcaoZaCt.js";import{i as ke,a as Ie,b as Oe,p as Te,c as ge,d as ze}from"./edges-e0da2a9e-D83AKoY_.js";import{G as Ce}from"./graph-Cz6eZWdE.js";import{c as Ae}from"./channel-QRfYJ0c8.js";import{o as Re}from"./ordinal-Cboi1Yqb.js";import{s as Be}from"./Tableau10-B-NsZVaP.js";import"./index-CvvgEQLL.js";import"./isEmpty-BQn8FtDD.js";import"./createText-2e5e7dd3-ClED10Yd.js";import"./index-CURBM_KW.js";import"./line-CnJU8oQA.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./has-xmSj69Ai.js";import"./hasIn-BEuiXUL_.js";import"./init-Gi6I4Gst.js";var oe,le,ee=(function(){var e=function(D,l,s,i){for(s=s||{},i=D.length;i--;s[D[i]]=l);return s},a=[1,7],d=[1,13],c=[1,14],n=[1,15],g=[1,19],o=[1,16],f=[1,17],b=[1,18],p=[8,30],x=[8,21,28,29,30,31,32,40,44,47],y=[1,23],T=[1,24],v=[8,15,16,21,28,29,30,31,32,40,44,47],N=[8,15,16,21,27,28,29,30,31,32,40,44,47],E=[1,49],L={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(l,s,i,u,h,t,m){var r=t.length-1;switch(h){case 4:u.getLogger().debug("Rule: separator (NL) ");break;case 5:u.getLogger().debug("Rule: separator (Space) ");break;case 6:u.getLogger().debug("Rule: separator (EOF) ");break;case 7:u.getLogger().debug("Rule: hierarchy: ",t[r-1]),u.setHierarchy(t[r-1]);break;case 8:u.getLogger().debug("Stop NL ");break;case 9:u.getLogger().debug("Stop EOF ");break;case 10:u.getLogger().debug("Stop NL2 ");break;case 11:u.getLogger().debug("Stop EOF2 ");break;case 12:u.getLogger().debug("Rule: statement: ",t[r]),typeof t[r].length=="number"?this.$=t[r]:this.$=[t[r]];break;case 13:u.getLogger().debug("Rule: statement #2: ",t[r-1]),this.$=[t[r-1]].concat(t[r]);break;case 14:u.getLogger().debug("Rule: link: ",t[r],l),this.$={edgeTypeStr:t[r],label:""};break;case 15:u.getLogger().debug("Rule: LABEL link: ",t[r-3],t[r-1],t[r]),this.$={edgeTypeStr:t[r],label:t[r-1]};break;case 18:const R=parseInt(t[r]),Y=u.generateId();this.$={id:Y,type:"space",label:"",width:R,children:[]};break;case 23:u.getLogger().debug("Rule: (nodeStatement link node) ",t[r-2],t[r-1],t[r]," typestr: ",t[r-1].edgeTypeStr);const F=u.edgeStrToEdgeData(t[r-1].edgeTypeStr);this.$=[{id:t[r-2].id,label:t[r-2].label,type:t[r-2].type,directions:t[r-2].directions},{id:t[r-2].id+"-"+t[r].id,start:t[r-2].id,end:t[r].id,label:t[r-1].label,type:"edge",directions:t[r].directions,arrowTypeEnd:F,arrowTypeStart:"arrow_open"},{id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions}];break;case 24:u.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[r-1],t[r]),this.$={id:t[r-1].id,label:t[r-1].label,type:u.typeStr2Type(t[r-1].typeStr),directions:t[r-1].directions,widthInColumns:parseInt(t[r],10)};break;case 25:u.getLogger().debug("Rule: nodeStatement (node) ",t[r]),this.$={id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions,widthInColumns:1};break;case 26:u.getLogger().debug("APA123",this?this:"na"),u.getLogger().debug("COLUMNS: ",t[r]),this.$={type:"column-setting",columns:t[r]==="auto"?-1:parseInt(t[r])};break;case 27:u.getLogger().debug("Rule: id-block statement : ",t[r-2],t[r-1]),u.generateId(),this.$={...t[r-2],type:"composite",children:t[r-1]};break;case 28:u.getLogger().debug("Rule: blockStatement : ",t[r-2],t[r-1],t[r]);const C=u.generateId();this.$={id:C,type:"composite",label:"",children:t[r-1]};break;case 29:u.getLogger().debug("Rule: node (NODE_ID separator): ",t[r]),this.$={id:t[r]};break;case 30:u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[r-1],t[r]),this.$={id:t[r-1],label:t[r].label,typeStr:t[r].typeStr,directions:t[r].directions};break;case 31:u.getLogger().debug("Rule: dirList: ",t[r]),this.$=[t[r]];break;case 32:u.getLogger().debug("Rule: dirList: ",t[r-1],t[r]),this.$=[t[r-1]].concat(t[r]);break;case 33:u.getLogger().debug("Rule: nodeShapeNLabel: ",t[r-2],t[r-1],t[r]),this.$={typeStr:t[r-2]+t[r],label:t[r-1]};break;case 34:u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[r-3],t[r-2]," #3:",t[r-1],t[r]),this.$={typeStr:t[r-3]+t[r],label:t[r-2],directions:t[r-1]};break;case 35:case 36:this.$={type:"classDef",id:t[r-1].trim(),css:t[r].trim()};break;case 37:this.$={type:"applyClass",id:t[r-1].trim(),styleClass:t[r].trim()};break;case 38:this.$={type:"applyStyles",id:t[r-1].trim(),stylesStr:t[r].trim()};break}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:o,44:f,47:b},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:a,28:d,29:c,31:n,32:g,40:o,44:f,47:b}),e(x,[2,16],{14:22,15:y,16:T}),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),e(x,[2,21]),e(x,[2,22]),e(v,[2,25],{27:[1,25]}),e(x,[2,26]),{19:26,26:12,32:g},{11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:o,44:f,47:b},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(N,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,32:g},{32:[2,14]},{17:[1,36]},e(v,[2,24]),{11:37,13:4,14:22,15:y,16:T,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:o,44:f,47:b},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(N,[2,30]),{18:[1,43]},{18:[1,44]},e(v,[2,23]),{18:[1,45]},{30:[1,46]},e(x,[2,28]),e(x,[2,35]),e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{37:[1,47]},{34:48,35:E},{15:[1,50]},e(x,[2,27]),e(N,[2,33]),{39:[1,51]},{34:52,35:E,39:[2,31]},{32:[2,15]},e(N,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(l,s){if(s.recoverable)this.trace(l);else{var i=new Error(l);throw i.hash=s,i}},parse:function(l){var s=this,i=[0],u=[],h=[null],t=[],m=this.table,r="",R=0,Y=0,F=2,C=1,Le=t.slice.call(arguments,1),w=Object.create(this.lexer),K={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(K.yy[Z]=this.yy[Z]);w.setInput(l,K.yy),K.yy.lexer=w,K.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var J=w.yylloc;t.push(J);var me=w.options&&w.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(){var P;return P=u.pop()||w.lex()||C,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}for(var I,M,z,Q,W={},X,B,ae,G;;){if(M=i[i.length-1],this.defaultActions[M]?z=this.defaultActions[M]:((I===null||typeof I>"u")&&(I=_e()),z=m[M]&&m[M][I]),typeof z>"u"||!z.length||!z[0]){var $="";G=[];for(X in m[M])this.terminals_[X]&&X>F&&G.push("'"+this.terminals_[X]+"'");w.showPosition?$="Parse error on line "+(R+1)+`:
|
|
2
2
|
`+w.showPosition()+`
|
|
3
3
|
Expecting `+G.join(", ")+", got '"+(this.terminals_[I]||I)+"'":$="Parse error on line "+(R+1)+": Unexpected "+(I==C?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError($,{text:w.match,token:this.terminals_[I]||I,line:w.yylineno,loc:J,expected:G})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+I);switch(z[0]){case 1:i.push(I),h.push(w.yytext),t.push(w.yylloc),i.push(z[1]),I=null,Y=w.yyleng,r=w.yytext,R=w.yylineno,J=w.yylloc;break;case 2:if(B=this.productions_[z[1]][1],W.$=h[h.length-B],W._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},me&&(W._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(W,[r,Y,R,K.yy,z[1],h,t].concat(Le)),typeof Q<"u")return Q;B&&(i=i.slice(0,-1*B*2),h=h.slice(0,-1*B),t=t.slice(0,-1*B)),i.push(this.productions_[z[1]][0]),h.push(W.$),t.push(W._$),ae=m[i[i.length-2]][i[i.length-1]],i.push(ae);break;case 3:return!0}}return!0}},A=(function(){var D={EOF:1,parseError:function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},setInput:function(l,s){return this.yy=s||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var s=l.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},unput:function(l){var s=l.length,i=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(l){this.unput(this.match.slice(l))},pastInput:function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var l=this.pastInput(),s=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Dt,s as we,a as Oe,b as Te,c as Re,d as Nt,l as le,e as De,f as Se,h as wt,i as ue,j as Pe,w as Me,k as Kt,m as oe}from"./mermaid.core-DawxQi4y.js";import{d as Le,g as Ne}from"./svgDrawCommon-08f97a94-CalbTy9V.js";import"./index-7WzIC7_D.js";var Yt=(function(){var e=function(bt,_,x,m){for(x=x||{},m=bt.length;m--;x[bt[m]]=_);return x},t=[1,24],a=[1,25],o=[1,26],l=[1,27],i=[1,28],s=[1,63],r=[1,64],n=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],E=[1,29],O=[1,30],R=[1,31],S=[1,32],L=[1,33],Y=[1,34],Q=[1,35],H=[1,36],q=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],$=[1,42],tt=[1,43],et=[1,44],it=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],lt=[1,51],ot=[1,52],ct=[1,53],ht=[1,54],ut=[1,55],dt=[1,56],ft=[1,57],pt=[1,58],yt=[1,59],gt=[1,60],At=[14,42],Vt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],v=[1,82],k=[1,83],A=[1,84],C=[1,85],w=[12,14,42],ne=[12,14,33,42],Pt=[12,14,33,42,76,77,79,80],mt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Xt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(_,x,m,g,T,u,Tt){var y=u.length-1;switch(T){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(u[y-3]);break;case 19:g.setTitle(u[y].substring(6)),this.$=u[y].substring(6);break;case 20:g.setAccDescription(u[y].substring(15)),this.$=u[y].substring(15);break;case 21:this.$=u[y].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=u[y].trim(),g.setAccDescription(this.$);break;case 28:case 29:u[y].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 30:g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 31:u[y].splice(2,0,"CONTAINER"),g.addContainerBoundary(...u[y]),this.$=u[y];break;case 32:g.addDeploymentNode("node",...u[y]),this.$=u[y];break;case 33:g.addDeploymentNode("nodeL",...u[y]),this.$=u[y];break;case 34:g.addDeploymentNode("nodeR",...u[y]),this.$=u[y];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...u[y]),this.$=u[y];break;case 40:g.addPersonOrSystem("external_person",...u[y]),this.$=u[y];break;case 41:g.addPersonOrSystem("system",...u[y]),this.$=u[y];break;case 42:g.addPersonOrSystem("system_db",...u[y]),this.$=u[y];break;case 43:g.addPersonOrSystem("system_queue",...u[y]),this.$=u[y];break;case 44:g.addPersonOrSystem("external_system",...u[y]),this.$=u[y];break;case 45:g.addPersonOrSystem("external_system_db",...u[y]),this.$=u[y];break;case 46:g.addPersonOrSystem("external_system_queue",...u[y]),this.$=u[y];break;case 47:g.addContainer("container",...u[y]),this.$=u[y];break;case 48:g.addContainer("container_db",...u[y]),this.$=u[y];break;case 49:g.addContainer("container_queue",...u[y]),this.$=u[y];break;case 50:g.addContainer("external_container",...u[y]),this.$=u[y];break;case 51:g.addContainer("external_container_db",...u[y]),this.$=u[y];break;case 52:g.addContainer("external_container_queue",...u[y]),this.$=u[y];break;case 53:g.addComponent("component",...u[y]),this.$=u[y];break;case 54:g.addComponent("component_db",...u[y]),this.$=u[y];break;case 55:g.addComponent("component_queue",...u[y]),this.$=u[y];break;case 56:g.addComponent("external_component",...u[y]),this.$=u[y];break;case 57:g.addComponent("external_component_db",...u[y]),this.$=u[y];break;case 58:g.addComponent("external_component_queue",...u[y]),this.$=u[y];break;case 60:g.addRel("rel",...u[y]),this.$=u[y];break;case 61:g.addRel("birel",...u[y]),this.$=u[y];break;case 62:g.addRel("rel_u",...u[y]),this.$=u[y];break;case 63:g.addRel("rel_d",...u[y]),this.$=u[y];break;case 64:g.addRel("rel_l",...u[y]),this.$=u[y];break;case 65:g.addRel("rel_r",...u[y]),this.$=u[y];break;case 66:g.addRel("rel_b",...u[y]),this.$=u[y];break;case 67:u[y].splice(0,1),g.addRel("rel",...u[y]),this.$=u[y];break;case 68:g.updateElStyle("update_el_style",...u[y]),this.$=u[y];break;case 69:g.updateRelStyle("update_rel_style",...u[y]),this.$=u[y];break;case 70:g.updateLayoutConfig("update_layout_config",...u[y]),this.$=u[y];break;case 71:this.$=[u[y]];break;case 72:u[y].unshift(u[y-1]),this.$=u[y];break;case 73:case 75:this.$=u[y].trim();break;case 74:let Et={};Et[u[y-1].trim()]=u[y].trim(),this.$=Et;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{14:[1,74]},e(At,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(At,[2,14]),e(Vt,[2,16],{12:[1,76]}),e(At,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:v,77:k,79:A,80:C},{35:86,75:81,76:v,77:k,79:A,80:C},{35:87,75:81,76:v,77:k,79:A,80:C},{35:88,75:81,76:v,77:k,79:A,80:C},{35:89,75:81,76:v,77:k,79:A,80:C},{35:90,75:81,76:v,77:k,79:A,80:C},{35:91,75:81,76:v,77:k,79:A,80:C},{35:92,75:81,76:v,77:k,79:A,80:C},{35:93,75:81,76:v,77:k,79:A,80:C},{35:94,75:81,76:v,77:k,79:A,80:C},{35:95,75:81,76:v,77:k,79:A,80:C},{35:96,75:81,76:v,77:k,79:A,80:C},{35:97,75:81,76:v,77:k,79:A,80:C},{35:98,75:81,76:v,77:k,79:A,80:C},{35:99,75:81,76:v,77:k,79:A,80:C},{35:100,75:81,76:v,77:k,79:A,80:C},{35:101,75:81,76:v,77:k,79:A,80:C},{35:102,75:81,76:v,77:k,79:A,80:C},{35:103,75:81,76:v,77:k,79:A,80:C},{35:104,75:81,76:v,77:k,79:A,80:C},e(w,[2,59]),{35:105,75:81,76:v,77:k,79:A,80:C},{35:106,75:81,76:v,77:k,79:A,80:C},{35:107,75:81,76:v,77:k,79:A,80:C},{35:108,75:81,76:v,77:k,79:A,80:C},{35:109,75:81,76:v,77:k,79:A,80:C},{35:110,75:81,76:v,77:k,79:A,80:C},{35:111,75:81,76:v,77:k,79:A,80:C},{35:112,75:81,76:v,77:k,79:A,80:C},{35:113,75:81,76:v,77:k,79:A,80:C},{35:114,75:81,76:v,77:k,79:A,80:C},{35:115,75:81,76:v,77:k,79:A,80:C},{20:116,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:v,77:k,79:A,80:C},{35:120,75:81,76:v,77:k,79:A,80:C},{35:121,75:81,76:v,77:k,79:A,80:C},{35:122,75:81,76:v,77:k,79:A,80:C},{35:123,75:81,76:v,77:k,79:A,80:C},{35:124,75:81,76:v,77:k,79:A,80:C},{35:125,75:81,76:v,77:k,79:A,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(At,[2,15]),e(Vt,[2,17],{21:22,19:130,22:t,23:a,24:o,26:l,28:i}),e(At,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:a,24:o,26:l,28:i,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(Ot,[2,21]),e(Ot,[2,22]),e(w,[2,39]),e(ne,[2,71],{75:81,35:132,76:v,77:k,79:A,80:C}),e(Pt,[2,73]),{78:[1,133]},e(Pt,[2,75]),e(Pt,[2,76]),e(w,[2,40]),e(w,[2,41]),e(w,[2,42]),e(w,[2,43]),e(w,[2,44]),e(w,[2,45]),e(w,[2,46]),e(w,[2,47]),e(w,[2,48]),e(w,[2,49]),e(w,[2,50]),e(w,[2,51]),e(w,[2,52]),e(w,[2,53]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(w,[2,60]),e(w,[2,61]),e(w,[2,62]),e(w,[2,63]),e(w,[2,64]),e(w,[2,65]),e(w,[2,66]),e(w,[2,67]),e(w,[2,68]),e(w,[2,69]),e(w,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Vt,[2,18]),e(At,[2,38]),e(ne,[2,72]),e(Pt,[2,74]),e(w,[2,24]),e(w,[2,35]),e(zt,[2,25]),e(zt,[2,26],{12:[1,138]}),e(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(_,x){if(x.recoverable)this.trace(_);else{var m=new Error(_);throw m.hash=x,m}},parse:function(_){var x=this,m=[0],g=[],T=[null],u=[],Tt=this.table,y="",Et=0,se=0,ve=2,ae=1,ke=u.slice.call(arguments,1),D=Object.create(this.lexer),vt={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(vt.yy[Qt]=this.yy[Qt]);D.setInput(_,vt.yy),vt.yy.lexer=D,vt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Ht=D.yylloc;u.push(Ht);var Ae=D.options&&D.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var X;return X=g.pop()||D.lex()||ae,typeof X!="number"&&(X instanceof Array&&(g=X,X=g.pop()),X=x.symbols_[X]||X),X}for(var M,kt,N,qt,Ct={},Mt,z,re,Lt;;){if(kt=m[m.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((M===null||typeof M>"u")&&(M=Ce()),N=Tt[kt]&&Tt[kt][M]),typeof N>"u"||!N.length||!N[0]){var Gt="";Lt=[];for(Mt in Tt[kt])this.terminals_[Mt]&&Mt>ve&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Gt="Parse error on line "+(Et+1)+`:
|
|
1
|
+
import{g as Dt,s as we,a as Oe,b as Te,c as Re,d as Nt,l as le,e as De,f as Se,h as wt,i as ue,j as Pe,w as Me,k as Kt,m as oe}from"./mermaid.core-Bse-qmGl.js";import{d as Le,g as Ne}from"./svgDrawCommon-08f97a94-D99zFeK3.js";import"./index-CvvgEQLL.js";var Yt=(function(){var e=function(bt,_,x,m){for(x=x||{},m=bt.length;m--;x[bt[m]]=_);return x},t=[1,24],a=[1,25],o=[1,26],l=[1,27],i=[1,28],s=[1,63],r=[1,64],n=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],E=[1,29],O=[1,30],R=[1,31],S=[1,32],L=[1,33],Y=[1,34],Q=[1,35],H=[1,36],q=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],$=[1,42],tt=[1,43],et=[1,44],it=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],lt=[1,51],ot=[1,52],ct=[1,53],ht=[1,54],ut=[1,55],dt=[1,56],ft=[1,57],pt=[1,58],yt=[1,59],gt=[1,60],At=[14,42],Vt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],v=[1,82],k=[1,83],A=[1,84],C=[1,85],w=[12,14,42],ne=[12,14,33,42],Pt=[12,14,33,42,76,77,79,80],mt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Xt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(_,x,m,g,T,u,Tt){var y=u.length-1;switch(T){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(u[y-3]);break;case 19:g.setTitle(u[y].substring(6)),this.$=u[y].substring(6);break;case 20:g.setAccDescription(u[y].substring(15)),this.$=u[y].substring(15);break;case 21:this.$=u[y].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=u[y].trim(),g.setAccDescription(this.$);break;case 28:case 29:u[y].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 30:g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 31:u[y].splice(2,0,"CONTAINER"),g.addContainerBoundary(...u[y]),this.$=u[y];break;case 32:g.addDeploymentNode("node",...u[y]),this.$=u[y];break;case 33:g.addDeploymentNode("nodeL",...u[y]),this.$=u[y];break;case 34:g.addDeploymentNode("nodeR",...u[y]),this.$=u[y];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...u[y]),this.$=u[y];break;case 40:g.addPersonOrSystem("external_person",...u[y]),this.$=u[y];break;case 41:g.addPersonOrSystem("system",...u[y]),this.$=u[y];break;case 42:g.addPersonOrSystem("system_db",...u[y]),this.$=u[y];break;case 43:g.addPersonOrSystem("system_queue",...u[y]),this.$=u[y];break;case 44:g.addPersonOrSystem("external_system",...u[y]),this.$=u[y];break;case 45:g.addPersonOrSystem("external_system_db",...u[y]),this.$=u[y];break;case 46:g.addPersonOrSystem("external_system_queue",...u[y]),this.$=u[y];break;case 47:g.addContainer("container",...u[y]),this.$=u[y];break;case 48:g.addContainer("container_db",...u[y]),this.$=u[y];break;case 49:g.addContainer("container_queue",...u[y]),this.$=u[y];break;case 50:g.addContainer("external_container",...u[y]),this.$=u[y];break;case 51:g.addContainer("external_container_db",...u[y]),this.$=u[y];break;case 52:g.addContainer("external_container_queue",...u[y]),this.$=u[y];break;case 53:g.addComponent("component",...u[y]),this.$=u[y];break;case 54:g.addComponent("component_db",...u[y]),this.$=u[y];break;case 55:g.addComponent("component_queue",...u[y]),this.$=u[y];break;case 56:g.addComponent("external_component",...u[y]),this.$=u[y];break;case 57:g.addComponent("external_component_db",...u[y]),this.$=u[y];break;case 58:g.addComponent("external_component_queue",...u[y]),this.$=u[y];break;case 60:g.addRel("rel",...u[y]),this.$=u[y];break;case 61:g.addRel("birel",...u[y]),this.$=u[y];break;case 62:g.addRel("rel_u",...u[y]),this.$=u[y];break;case 63:g.addRel("rel_d",...u[y]),this.$=u[y];break;case 64:g.addRel("rel_l",...u[y]),this.$=u[y];break;case 65:g.addRel("rel_r",...u[y]),this.$=u[y];break;case 66:g.addRel("rel_b",...u[y]),this.$=u[y];break;case 67:u[y].splice(0,1),g.addRel("rel",...u[y]),this.$=u[y];break;case 68:g.updateElStyle("update_el_style",...u[y]),this.$=u[y];break;case 69:g.updateRelStyle("update_rel_style",...u[y]),this.$=u[y];break;case 70:g.updateLayoutConfig("update_layout_config",...u[y]),this.$=u[y];break;case 71:this.$=[u[y]];break;case 72:u[y].unshift(u[y-1]),this.$=u[y];break;case 73:case 75:this.$=u[y].trim();break;case 74:let Et={};Et[u[y-1].trim()]=u[y].trim(),this.$=Et;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{14:[1,74]},e(At,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(At,[2,14]),e(Vt,[2,16],{12:[1,76]}),e(At,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:v,77:k,79:A,80:C},{35:86,75:81,76:v,77:k,79:A,80:C},{35:87,75:81,76:v,77:k,79:A,80:C},{35:88,75:81,76:v,77:k,79:A,80:C},{35:89,75:81,76:v,77:k,79:A,80:C},{35:90,75:81,76:v,77:k,79:A,80:C},{35:91,75:81,76:v,77:k,79:A,80:C},{35:92,75:81,76:v,77:k,79:A,80:C},{35:93,75:81,76:v,77:k,79:A,80:C},{35:94,75:81,76:v,77:k,79:A,80:C},{35:95,75:81,76:v,77:k,79:A,80:C},{35:96,75:81,76:v,77:k,79:A,80:C},{35:97,75:81,76:v,77:k,79:A,80:C},{35:98,75:81,76:v,77:k,79:A,80:C},{35:99,75:81,76:v,77:k,79:A,80:C},{35:100,75:81,76:v,77:k,79:A,80:C},{35:101,75:81,76:v,77:k,79:A,80:C},{35:102,75:81,76:v,77:k,79:A,80:C},{35:103,75:81,76:v,77:k,79:A,80:C},{35:104,75:81,76:v,77:k,79:A,80:C},e(w,[2,59]),{35:105,75:81,76:v,77:k,79:A,80:C},{35:106,75:81,76:v,77:k,79:A,80:C},{35:107,75:81,76:v,77:k,79:A,80:C},{35:108,75:81,76:v,77:k,79:A,80:C},{35:109,75:81,76:v,77:k,79:A,80:C},{35:110,75:81,76:v,77:k,79:A,80:C},{35:111,75:81,76:v,77:k,79:A,80:C},{35:112,75:81,76:v,77:k,79:A,80:C},{35:113,75:81,76:v,77:k,79:A,80:C},{35:114,75:81,76:v,77:k,79:A,80:C},{35:115,75:81,76:v,77:k,79:A,80:C},{20:116,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:v,77:k,79:A,80:C},{35:120,75:81,76:v,77:k,79:A,80:C},{35:121,75:81,76:v,77:k,79:A,80:C},{35:122,75:81,76:v,77:k,79:A,80:C},{35:123,75:81,76:v,77:k,79:A,80:C},{35:124,75:81,76:v,77:k,79:A,80:C},{35:125,75:81,76:v,77:k,79:A,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(At,[2,15]),e(Vt,[2,17],{21:22,19:130,22:t,23:a,24:o,26:l,28:i}),e(At,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:a,24:o,26:l,28:i,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(Ot,[2,21]),e(Ot,[2,22]),e(w,[2,39]),e(ne,[2,71],{75:81,35:132,76:v,77:k,79:A,80:C}),e(Pt,[2,73]),{78:[1,133]},e(Pt,[2,75]),e(Pt,[2,76]),e(w,[2,40]),e(w,[2,41]),e(w,[2,42]),e(w,[2,43]),e(w,[2,44]),e(w,[2,45]),e(w,[2,46]),e(w,[2,47]),e(w,[2,48]),e(w,[2,49]),e(w,[2,50]),e(w,[2,51]),e(w,[2,52]),e(w,[2,53]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(w,[2,60]),e(w,[2,61]),e(w,[2,62]),e(w,[2,63]),e(w,[2,64]),e(w,[2,65]),e(w,[2,66]),e(w,[2,67]),e(w,[2,68]),e(w,[2,69]),e(w,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Vt,[2,18]),e(At,[2,38]),e(ne,[2,72]),e(Pt,[2,74]),e(w,[2,24]),e(w,[2,35]),e(zt,[2,25]),e(zt,[2,26],{12:[1,138]}),e(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(_,x){if(x.recoverable)this.trace(_);else{var m=new Error(_);throw m.hash=x,m}},parse:function(_){var x=this,m=[0],g=[],T=[null],u=[],Tt=this.table,y="",Et=0,se=0,ve=2,ae=1,ke=u.slice.call(arguments,1),D=Object.create(this.lexer),vt={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(vt.yy[Qt]=this.yy[Qt]);D.setInput(_,vt.yy),vt.yy.lexer=D,vt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Ht=D.yylloc;u.push(Ht);var Ae=D.options&&D.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var X;return X=g.pop()||D.lex()||ae,typeof X!="number"&&(X instanceof Array&&(g=X,X=g.pop()),X=x.symbols_[X]||X),X}for(var M,kt,N,qt,Ct={},Mt,z,re,Lt;;){if(kt=m[m.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((M===null||typeof M>"u")&&(M=Ce()),N=Tt[kt]&&Tt[kt][M]),typeof N>"u"||!N.length||!N[0]){var Gt="";Lt=[];for(Mt in Tt[kt])this.terminals_[Mt]&&Mt>ve&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Gt="Parse error on line "+(Et+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+Lt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Gt="Parse error on line "+(Et+1)+": Unexpected "+(M==ae?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Gt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:Ht,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+M);switch(N[0]){case 1:m.push(M),T.push(D.yytext),u.push(D.yylloc),m.push(N[1]),M=null,se=D.yyleng,y=D.yytext,Et=D.yylineno,Ht=D.yylloc;break;case 2:if(z=this.productions_[N[1]][1],Ct.$=T[T.length-z],Ct._$={first_line:u[u.length-(z||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(z||1)].first_column,last_column:u[u.length-1].last_column},Ae&&(Ct._$.range=[u[u.length-(z||1)].range[0],u[u.length-1].range[1]]),qt=this.performAction.apply(Ct,[y,se,Et,vt.yy,N[1],T,u].concat(ke)),typeof qt<"u")return qt;z&&(m=m.slice(0,-1*z*2),T=T.slice(0,-1*z),u=u.slice(0,-1*z)),m.push(this.productions_[N[1]][0]),T.push(Ct.$),u.push(Ct._$),re=Tt[m[m.length-2]][m[m.length-1]],m.push(re);break;case 3:return!0}}return!0}},Ee=(function(){var bt={EOF:1,parseError:function(x,m){if(this.yy.parser)this.yy.parser.parseError(x,m);else throw new Error(x)},setInput:function(_,x){return this.yy=x||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var x=_.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},unput:function(_){var x=_.length,m=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(_){this.unput(this.match.slice(_))},pastInput:function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _=this.pastInput(),x=new Array(_.length+1).join("-");return _+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Dt,s as we,a as Oe,b as Te,c as Re,d as Nt,l as le,e as De,f as Se,h as wt,i as ue,j as Pe,w as Me,k as Kt,m as oe}from"./index-Cx19IgV-.js";import{d as Le,g as Ne}from"./svgDrawCommon-08f97a94-5_vuhhyn.js";import"./index-7WzIC7_D.js";import"./isEmpty-BoFRUVaJ.js";var Yt=(function(){var e=function(bt,_,x,m){for(x=x||{},m=bt.length;m--;x[bt[m]]=_);return x},t=[1,24],a=[1,25],o=[1,26],l=[1,27],i=[1,28],s=[1,63],r=[1,64],n=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],E=[1,29],O=[1,30],R=[1,31],S=[1,32],L=[1,33],Y=[1,34],Q=[1,35],H=[1,36],q=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],$=[1,42],tt=[1,43],et=[1,44],it=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],lt=[1,51],ot=[1,52],ct=[1,53],ht=[1,54],ut=[1,55],dt=[1,56],ft=[1,57],pt=[1,58],yt=[1,59],gt=[1,60],At=[14,42],Vt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],v=[1,82],k=[1,83],A=[1,84],C=[1,85],w=[12,14,42],ne=[12,14,33,42],Pt=[12,14,33,42,76,77,79,80],mt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Xt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(_,x,m,g,T,u,Tt){var y=u.length-1;switch(T){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(u[y-3]);break;case 19:g.setTitle(u[y].substring(6)),this.$=u[y].substring(6);break;case 20:g.setAccDescription(u[y].substring(15)),this.$=u[y].substring(15);break;case 21:this.$=u[y].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=u[y].trim(),g.setAccDescription(this.$);break;case 28:case 29:u[y].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 30:g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 31:u[y].splice(2,0,"CONTAINER"),g.addContainerBoundary(...u[y]),this.$=u[y];break;case 32:g.addDeploymentNode("node",...u[y]),this.$=u[y];break;case 33:g.addDeploymentNode("nodeL",...u[y]),this.$=u[y];break;case 34:g.addDeploymentNode("nodeR",...u[y]),this.$=u[y];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...u[y]),this.$=u[y];break;case 40:g.addPersonOrSystem("external_person",...u[y]),this.$=u[y];break;case 41:g.addPersonOrSystem("system",...u[y]),this.$=u[y];break;case 42:g.addPersonOrSystem("system_db",...u[y]),this.$=u[y];break;case 43:g.addPersonOrSystem("system_queue",...u[y]),this.$=u[y];break;case 44:g.addPersonOrSystem("external_system",...u[y]),this.$=u[y];break;case 45:g.addPersonOrSystem("external_system_db",...u[y]),this.$=u[y];break;case 46:g.addPersonOrSystem("external_system_queue",...u[y]),this.$=u[y];break;case 47:g.addContainer("container",...u[y]),this.$=u[y];break;case 48:g.addContainer("container_db",...u[y]),this.$=u[y];break;case 49:g.addContainer("container_queue",...u[y]),this.$=u[y];break;case 50:g.addContainer("external_container",...u[y]),this.$=u[y];break;case 51:g.addContainer("external_container_db",...u[y]),this.$=u[y];break;case 52:g.addContainer("external_container_queue",...u[y]),this.$=u[y];break;case 53:g.addComponent("component",...u[y]),this.$=u[y];break;case 54:g.addComponent("component_db",...u[y]),this.$=u[y];break;case 55:g.addComponent("component_queue",...u[y]),this.$=u[y];break;case 56:g.addComponent("external_component",...u[y]),this.$=u[y];break;case 57:g.addComponent("external_component_db",...u[y]),this.$=u[y];break;case 58:g.addComponent("external_component_queue",...u[y]),this.$=u[y];break;case 60:g.addRel("rel",...u[y]),this.$=u[y];break;case 61:g.addRel("birel",...u[y]),this.$=u[y];break;case 62:g.addRel("rel_u",...u[y]),this.$=u[y];break;case 63:g.addRel("rel_d",...u[y]),this.$=u[y];break;case 64:g.addRel("rel_l",...u[y]),this.$=u[y];break;case 65:g.addRel("rel_r",...u[y]),this.$=u[y];break;case 66:g.addRel("rel_b",...u[y]),this.$=u[y];break;case 67:u[y].splice(0,1),g.addRel("rel",...u[y]),this.$=u[y];break;case 68:g.updateElStyle("update_el_style",...u[y]),this.$=u[y];break;case 69:g.updateRelStyle("update_rel_style",...u[y]),this.$=u[y];break;case 70:g.updateLayoutConfig("update_layout_config",...u[y]),this.$=u[y];break;case 71:this.$=[u[y]];break;case 72:u[y].unshift(u[y-1]),this.$=u[y];break;case 73:case 75:this.$=u[y].trim();break;case 74:let Et={};Et[u[y-1].trim()]=u[y].trim(),this.$=Et;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{14:[1,74]},e(At,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(At,[2,14]),e(Vt,[2,16],{12:[1,76]}),e(At,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:v,77:k,79:A,80:C},{35:86,75:81,76:v,77:k,79:A,80:C},{35:87,75:81,76:v,77:k,79:A,80:C},{35:88,75:81,76:v,77:k,79:A,80:C},{35:89,75:81,76:v,77:k,79:A,80:C},{35:90,75:81,76:v,77:k,79:A,80:C},{35:91,75:81,76:v,77:k,79:A,80:C},{35:92,75:81,76:v,77:k,79:A,80:C},{35:93,75:81,76:v,77:k,79:A,80:C},{35:94,75:81,76:v,77:k,79:A,80:C},{35:95,75:81,76:v,77:k,79:A,80:C},{35:96,75:81,76:v,77:k,79:A,80:C},{35:97,75:81,76:v,77:k,79:A,80:C},{35:98,75:81,76:v,77:k,79:A,80:C},{35:99,75:81,76:v,77:k,79:A,80:C},{35:100,75:81,76:v,77:k,79:A,80:C},{35:101,75:81,76:v,77:k,79:A,80:C},{35:102,75:81,76:v,77:k,79:A,80:C},{35:103,75:81,76:v,77:k,79:A,80:C},{35:104,75:81,76:v,77:k,79:A,80:C},e(w,[2,59]),{35:105,75:81,76:v,77:k,79:A,80:C},{35:106,75:81,76:v,77:k,79:A,80:C},{35:107,75:81,76:v,77:k,79:A,80:C},{35:108,75:81,76:v,77:k,79:A,80:C},{35:109,75:81,76:v,77:k,79:A,80:C},{35:110,75:81,76:v,77:k,79:A,80:C},{35:111,75:81,76:v,77:k,79:A,80:C},{35:112,75:81,76:v,77:k,79:A,80:C},{35:113,75:81,76:v,77:k,79:A,80:C},{35:114,75:81,76:v,77:k,79:A,80:C},{35:115,75:81,76:v,77:k,79:A,80:C},{20:116,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:v,77:k,79:A,80:C},{35:120,75:81,76:v,77:k,79:A,80:C},{35:121,75:81,76:v,77:k,79:A,80:C},{35:122,75:81,76:v,77:k,79:A,80:C},{35:123,75:81,76:v,77:k,79:A,80:C},{35:124,75:81,76:v,77:k,79:A,80:C},{35:125,75:81,76:v,77:k,79:A,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(At,[2,15]),e(Vt,[2,17],{21:22,19:130,22:t,23:a,24:o,26:l,28:i}),e(At,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:a,24:o,26:l,28:i,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(Ot,[2,21]),e(Ot,[2,22]),e(w,[2,39]),e(ne,[2,71],{75:81,35:132,76:v,77:k,79:A,80:C}),e(Pt,[2,73]),{78:[1,133]},e(Pt,[2,75]),e(Pt,[2,76]),e(w,[2,40]),e(w,[2,41]),e(w,[2,42]),e(w,[2,43]),e(w,[2,44]),e(w,[2,45]),e(w,[2,46]),e(w,[2,47]),e(w,[2,48]),e(w,[2,49]),e(w,[2,50]),e(w,[2,51]),e(w,[2,52]),e(w,[2,53]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(w,[2,60]),e(w,[2,61]),e(w,[2,62]),e(w,[2,63]),e(w,[2,64]),e(w,[2,65]),e(w,[2,66]),e(w,[2,67]),e(w,[2,68]),e(w,[2,69]),e(w,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Vt,[2,18]),e(At,[2,38]),e(ne,[2,72]),e(Pt,[2,74]),e(w,[2,24]),e(w,[2,35]),e(zt,[2,25]),e(zt,[2,26],{12:[1,138]}),e(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(_,x){if(x.recoverable)this.trace(_);else{var m=new Error(_);throw m.hash=x,m}},parse:function(_){var x=this,m=[0],g=[],T=[null],u=[],Tt=this.table,y="",Et=0,se=0,ve=2,ae=1,ke=u.slice.call(arguments,1),D=Object.create(this.lexer),vt={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(vt.yy[Qt]=this.yy[Qt]);D.setInput(_,vt.yy),vt.yy.lexer=D,vt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Ht=D.yylloc;u.push(Ht);var Ae=D.options&&D.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var X;return X=g.pop()||D.lex()||ae,typeof X!="number"&&(X instanceof Array&&(g=X,X=g.pop()),X=x.symbols_[X]||X),X}for(var M,kt,N,qt,Ct={},Mt,z,re,Lt;;){if(kt=m[m.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((M===null||typeof M>"u")&&(M=Ce()),N=Tt[kt]&&Tt[kt][M]),typeof N>"u"||!N.length||!N[0]){var Gt="";Lt=[];for(Mt in Tt[kt])this.terminals_[Mt]&&Mt>ve&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Gt="Parse error on line "+(Et+1)+`:
|
|
1
|
+
import{g as Dt,s as we,a as Oe,b as Te,c as Re,d as Nt,l as le,e as De,f as Se,h as wt,i as ue,j as Pe,w as Me,k as Kt,m as oe}from"./index-D35EPyAQ.js";import{d as Le,g as Ne}from"./svgDrawCommon-08f97a94-DCKNxHs0.js";import"./index-CvvgEQLL.js";import"./isEmpty-BQn8FtDD.js";var Yt=(function(){var e=function(bt,_,x,m){for(x=x||{},m=bt.length;m--;x[bt[m]]=_);return x},t=[1,24],a=[1,25],o=[1,26],l=[1,27],i=[1,28],s=[1,63],r=[1,64],n=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],E=[1,29],O=[1,30],R=[1,31],S=[1,32],L=[1,33],Y=[1,34],Q=[1,35],H=[1,36],q=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],$=[1,42],tt=[1,43],et=[1,44],it=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],lt=[1,51],ot=[1,52],ct=[1,53],ht=[1,54],ut=[1,55],dt=[1,56],ft=[1,57],pt=[1,58],yt=[1,59],gt=[1,60],At=[14,42],Vt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],v=[1,82],k=[1,83],A=[1,84],C=[1,85],w=[12,14,42],ne=[12,14,33,42],Pt=[12,14,33,42,76,77,79,80],mt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Xt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(_,x,m,g,T,u,Tt){var y=u.length-1;switch(T){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(u[y-3]);break;case 19:g.setTitle(u[y].substring(6)),this.$=u[y].substring(6);break;case 20:g.setAccDescription(u[y].substring(15)),this.$=u[y].substring(15);break;case 21:this.$=u[y].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=u[y].trim(),g.setAccDescription(this.$);break;case 28:case 29:u[y].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 30:g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 31:u[y].splice(2,0,"CONTAINER"),g.addContainerBoundary(...u[y]),this.$=u[y];break;case 32:g.addDeploymentNode("node",...u[y]),this.$=u[y];break;case 33:g.addDeploymentNode("nodeL",...u[y]),this.$=u[y];break;case 34:g.addDeploymentNode("nodeR",...u[y]),this.$=u[y];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...u[y]),this.$=u[y];break;case 40:g.addPersonOrSystem("external_person",...u[y]),this.$=u[y];break;case 41:g.addPersonOrSystem("system",...u[y]),this.$=u[y];break;case 42:g.addPersonOrSystem("system_db",...u[y]),this.$=u[y];break;case 43:g.addPersonOrSystem("system_queue",...u[y]),this.$=u[y];break;case 44:g.addPersonOrSystem("external_system",...u[y]),this.$=u[y];break;case 45:g.addPersonOrSystem("external_system_db",...u[y]),this.$=u[y];break;case 46:g.addPersonOrSystem("external_system_queue",...u[y]),this.$=u[y];break;case 47:g.addContainer("container",...u[y]),this.$=u[y];break;case 48:g.addContainer("container_db",...u[y]),this.$=u[y];break;case 49:g.addContainer("container_queue",...u[y]),this.$=u[y];break;case 50:g.addContainer("external_container",...u[y]),this.$=u[y];break;case 51:g.addContainer("external_container_db",...u[y]),this.$=u[y];break;case 52:g.addContainer("external_container_queue",...u[y]),this.$=u[y];break;case 53:g.addComponent("component",...u[y]),this.$=u[y];break;case 54:g.addComponent("component_db",...u[y]),this.$=u[y];break;case 55:g.addComponent("component_queue",...u[y]),this.$=u[y];break;case 56:g.addComponent("external_component",...u[y]),this.$=u[y];break;case 57:g.addComponent("external_component_db",...u[y]),this.$=u[y];break;case 58:g.addComponent("external_component_queue",...u[y]),this.$=u[y];break;case 60:g.addRel("rel",...u[y]),this.$=u[y];break;case 61:g.addRel("birel",...u[y]),this.$=u[y];break;case 62:g.addRel("rel_u",...u[y]),this.$=u[y];break;case 63:g.addRel("rel_d",...u[y]),this.$=u[y];break;case 64:g.addRel("rel_l",...u[y]),this.$=u[y];break;case 65:g.addRel("rel_r",...u[y]),this.$=u[y];break;case 66:g.addRel("rel_b",...u[y]),this.$=u[y];break;case 67:u[y].splice(0,1),g.addRel("rel",...u[y]),this.$=u[y];break;case 68:g.updateElStyle("update_el_style",...u[y]),this.$=u[y];break;case 69:g.updateRelStyle("update_rel_style",...u[y]),this.$=u[y];break;case 70:g.updateLayoutConfig("update_layout_config",...u[y]),this.$=u[y];break;case 71:this.$=[u[y]];break;case 72:u[y].unshift(u[y-1]),this.$=u[y];break;case 73:case 75:this.$=u[y].trim();break;case 74:let Et={};Et[u[y-1].trim()]=u[y].trim(),this.$=Et;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{14:[1,74]},e(At,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(At,[2,14]),e(Vt,[2,16],{12:[1,76]}),e(At,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:v,77:k,79:A,80:C},{35:86,75:81,76:v,77:k,79:A,80:C},{35:87,75:81,76:v,77:k,79:A,80:C},{35:88,75:81,76:v,77:k,79:A,80:C},{35:89,75:81,76:v,77:k,79:A,80:C},{35:90,75:81,76:v,77:k,79:A,80:C},{35:91,75:81,76:v,77:k,79:A,80:C},{35:92,75:81,76:v,77:k,79:A,80:C},{35:93,75:81,76:v,77:k,79:A,80:C},{35:94,75:81,76:v,77:k,79:A,80:C},{35:95,75:81,76:v,77:k,79:A,80:C},{35:96,75:81,76:v,77:k,79:A,80:C},{35:97,75:81,76:v,77:k,79:A,80:C},{35:98,75:81,76:v,77:k,79:A,80:C},{35:99,75:81,76:v,77:k,79:A,80:C},{35:100,75:81,76:v,77:k,79:A,80:C},{35:101,75:81,76:v,77:k,79:A,80:C},{35:102,75:81,76:v,77:k,79:A,80:C},{35:103,75:81,76:v,77:k,79:A,80:C},{35:104,75:81,76:v,77:k,79:A,80:C},e(w,[2,59]),{35:105,75:81,76:v,77:k,79:A,80:C},{35:106,75:81,76:v,77:k,79:A,80:C},{35:107,75:81,76:v,77:k,79:A,80:C},{35:108,75:81,76:v,77:k,79:A,80:C},{35:109,75:81,76:v,77:k,79:A,80:C},{35:110,75:81,76:v,77:k,79:A,80:C},{35:111,75:81,76:v,77:k,79:A,80:C},{35:112,75:81,76:v,77:k,79:A,80:C},{35:113,75:81,76:v,77:k,79:A,80:C},{35:114,75:81,76:v,77:k,79:A,80:C},{35:115,75:81,76:v,77:k,79:A,80:C},{20:116,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:v,77:k,79:A,80:C},{35:120,75:81,76:v,77:k,79:A,80:C},{35:121,75:81,76:v,77:k,79:A,80:C},{35:122,75:81,76:v,77:k,79:A,80:C},{35:123,75:81,76:v,77:k,79:A,80:C},{35:124,75:81,76:v,77:k,79:A,80:C},{35:125,75:81,76:v,77:k,79:A,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(At,[2,15]),e(Vt,[2,17],{21:22,19:130,22:t,23:a,24:o,26:l,28:i}),e(At,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:a,24:o,26:l,28:i,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(Ot,[2,21]),e(Ot,[2,22]),e(w,[2,39]),e(ne,[2,71],{75:81,35:132,76:v,77:k,79:A,80:C}),e(Pt,[2,73]),{78:[1,133]},e(Pt,[2,75]),e(Pt,[2,76]),e(w,[2,40]),e(w,[2,41]),e(w,[2,42]),e(w,[2,43]),e(w,[2,44]),e(w,[2,45]),e(w,[2,46]),e(w,[2,47]),e(w,[2,48]),e(w,[2,49]),e(w,[2,50]),e(w,[2,51]),e(w,[2,52]),e(w,[2,53]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(w,[2,60]),e(w,[2,61]),e(w,[2,62]),e(w,[2,63]),e(w,[2,64]),e(w,[2,65]),e(w,[2,66]),e(w,[2,67]),e(w,[2,68]),e(w,[2,69]),e(w,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Vt,[2,18]),e(At,[2,38]),e(ne,[2,72]),e(Pt,[2,74]),e(w,[2,24]),e(w,[2,35]),e(zt,[2,25]),e(zt,[2,26],{12:[1,138]}),e(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(_,x){if(x.recoverable)this.trace(_);else{var m=new Error(_);throw m.hash=x,m}},parse:function(_){var x=this,m=[0],g=[],T=[null],u=[],Tt=this.table,y="",Et=0,se=0,ve=2,ae=1,ke=u.slice.call(arguments,1),D=Object.create(this.lexer),vt={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(vt.yy[Qt]=this.yy[Qt]);D.setInput(_,vt.yy),vt.yy.lexer=D,vt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Ht=D.yylloc;u.push(Ht);var Ae=D.options&&D.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var X;return X=g.pop()||D.lex()||ae,typeof X!="number"&&(X instanceof Array&&(g=X,X=g.pop()),X=x.symbols_[X]||X),X}for(var M,kt,N,qt,Ct={},Mt,z,re,Lt;;){if(kt=m[m.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((M===null||typeof M>"u")&&(M=Ce()),N=Tt[kt]&&Tt[kt][M]),typeof N>"u"||!N.length||!N[0]){var Gt="";Lt=[];for(Mt in Tt[kt])this.terminals_[Mt]&&Mt>ve&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Gt="Parse error on line "+(Et+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+Lt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Gt="Parse error on line "+(Et+1)+": Unexpected "+(M==ae?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Gt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:Ht,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+M);switch(N[0]){case 1:m.push(M),T.push(D.yytext),u.push(D.yylloc),m.push(N[1]),M=null,se=D.yyleng,y=D.yytext,Et=D.yylineno,Ht=D.yylloc;break;case 2:if(z=this.productions_[N[1]][1],Ct.$=T[T.length-z],Ct._$={first_line:u[u.length-(z||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(z||1)].first_column,last_column:u[u.length-1].last_column},Ae&&(Ct._$.range=[u[u.length-(z||1)].range[0],u[u.length-1].range[1]]),qt=this.performAction.apply(Ct,[y,se,Et,vt.yy,N[1],T,u].concat(ke)),typeof qt<"u")return qt;z&&(m=m.slice(0,-1*z*2),T=T.slice(0,-1*z),u=u.slice(0,-1*z)),m.push(this.productions_[N[1]][0]),T.push(Ct.$),u.push(Ct._$),re=Tt[m[m.length-2]][m[m.length-1]],m.push(re);break;case 3:return!0}}return!0}},Ee=(function(){var bt={EOF:1,parseError:function(x,m){if(this.yy.parser)this.yy.parser.parseError(x,m);else throw new Error(x)},setInput:function(_,x){return this.yy=x||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var x=_.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},unput:function(_){var x=_.length,m=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(_){this.unput(this.match.slice(_))},pastInput:function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _=this.pastInput(),x=new Array(_.length+1).join("-");return _+this.upcomingInput()+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as a,C as n}from"./mermaid.core-Bse-qmGl.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as a,C as n}from"./index-D35EPyAQ.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|