chatlab-cli 0.30.2 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/{chat-command-VBDMWOKL.mjs → chat-command-CHV7RLBH.mjs} +9 -8
  2. package/dist/{chat-command-VBDMWOKL.mjs.map → chat-command-CHV7RLBH.mjs.map} +1 -1
  3. package/dist/{chunk-326OCJOT.mjs → chunk-DA5T64RY.mjs} +2 -2
  4. package/dist/{chunk-M2PXDX4G.mjs → chunk-DBBL74RK.mjs} +31 -22
  5. package/dist/chunk-DBBL74RK.mjs.map +1 -0
  6. package/dist/{chunk-KBSAVUFV.mjs → chunk-EXD2SXWL.mjs} +89 -15
  7. package/dist/chunk-EXD2SXWL.mjs.map +1 -0
  8. package/dist/{chunk-D3DPCDII.mjs → chunk-JH5RAJT2.mjs} +83 -34
  9. package/dist/chunk-JH5RAJT2.mjs.map +1 -0
  10. package/dist/{chunk-5EE2EFPE.mjs → chunk-RD335EMA.mjs} +4 -4
  11. package/dist/{chunk-WV5GSRQM.mjs → chunk-RDCUGC24.mjs} +5 -15
  12. package/dist/chunk-RDCUGC24.mjs.map +1 -0
  13. package/dist/{chunk-TEX44HNL.mjs → chunk-SNCXU2QL.mjs} +5 -15
  14. package/dist/chunk-SNCXU2QL.mjs.map +1 -0
  15. package/dist/{chunk-36JGKW6K.mjs → chunk-T64GA5HP.mjs} +1134 -364
  16. package/dist/chunk-T64GA5HP.mjs.map +1 -0
  17. package/dist/{chunk-LVEJHB3X.mjs → chunk-UWWFOEGF.mjs} +494 -97
  18. package/dist/chunk-UWWFOEGF.mjs.map +1 -0
  19. package/dist/{chunk-ULNRUS55.mjs → chunk-WQCY45U2.mjs} +3 -3
  20. package/dist/chunk-YAQLYL52.mjs +14 -0
  21. package/dist/chunk-YAQLYL52.mjs.map +1 -0
  22. package/dist/{chunk-TCZHG3G7.mjs → chunk-YPQ72HMX.mjs} +2 -2
  23. package/dist/cli.mjs +8 -7
  24. package/dist/contacts-worker.mjs +2 -2
  25. package/dist/global-insight-worker.mjs +179 -0
  26. package/dist/global-insight-worker.mjs.map +1 -0
  27. package/dist/{http-L4AMELPZ.mjs → http-3B5ARN7A.mjs} +12 -11
  28. package/dist/{import-WWCSXGVS.mjs → import-2DZGNSEX.mjs} +10 -7
  29. package/dist/index.mjs +12 -11
  30. package/dist/{mcp-A4M3LT5O.mjs → mcp-44I6FUUQ.mjs} +12 -11
  31. package/dist/{mcp-A4M3LT5O.mjs.map → mcp-44I6FUUQ.mjs.map} +1 -1
  32. package/dist/people-relationships-worker.mjs +2 -2
  33. package/dist/semantic-index-worker.mjs +1 -1
  34. package/dist/{src-MPNBTFOE.mjs → src-R3QX6L3L.mjs} +26 -6
  35. package/dist/{stream-import-HIE7PNL4.mjs → stream-import-VUEL2TTU.mjs} +10 -7
  36. package/dist/{worker-runtime-BJXO24XX.mjs → worker-runtime-GJAOIIZW.mjs} +6 -5
  37. package/dist/{worker-runtime-BJXO24XX.mjs.map → worker-runtime-GJAOIIZW.mjs.map} +1 -1
  38. package/dist-web/assets/ActionToolsPanel-fAio70bI.css +1 -0
  39. package/dist-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-CdJT0t2f.js +110 -0
  40. package/dist-web/assets/{BufferResource-q3rzaWWd.js → BufferResource-BPGkshPa.js} +1 -1
  41. package/dist-web/assets/{CanvasRenderer-BRk1y8tp.js → CanvasRenderer-DTKkZhq4.js} +1 -1
  42. package/dist-web/assets/{EChartWordcloud-Clg60FMo.js → EChartWordcloud-DU3ZYdgz.js} +1 -1
  43. package/dist-web/assets/{Filter-BJwode73.js → Filter-CHXKzS2l.js} +1 -1
  44. package/dist-web/assets/{LoadingState.vue_vue_type_script_setup_true_lang-D_dJuLWJ.js → LoadingState.vue_vue_type_script_setup_true_lang-DACMroOe.js} +1 -1
  45. package/dist-web/assets/MessageExportModal-h-zl0dx1.js +1 -0
  46. package/dist-web/assets/PageHeader-CK0hTsdx.js +1 -0
  47. package/dist-web/assets/PageHeader-XIXMTomn.css +1 -0
  48. package/dist-web/assets/{RelationshipGalaxyCanvas-CORMD7vL.js → RelationshipGalaxyCanvas-Dwdy5flh.js} +3 -3
  49. package/dist-web/assets/{RelationshipGalaxyThreeCanvas-B_w_P4ob.js → RelationshipGalaxyThreeCanvas-CtY4TGen.js} +1 -1
  50. package/dist-web/assets/{RenderTargetSystem-CGhV9R9E.js → RenderTargetSystem-BE56mKRG.js} +1 -1
  51. package/dist-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-BoZyssJF.js +1 -0
  52. package/dist-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-27hMyAUE.js +1 -0
  53. package/dist-web/assets/{WebGLRenderer-CAokTE5X.js → WebGLRenderer-Dm18dxOf.js} +1 -1
  54. package/dist-web/assets/{WebGPURenderer-DzP4ggSy.js → WebGPURenderer-BF6TF-is.js} +1 -1
  55. package/dist-web/assets/annual-summary-time-range-DVLXK1r4.js +1 -0
  56. package/dist-web/assets/base-CFPyD9Gy.js +1 -0
  57. package/dist-web/assets/{browserAll-CAZCK6dd.js → browserAll-Cn_CfkXl.js} +1 -1
  58. package/dist-web/assets/dateFormat-BcqNKTQ1.js +1 -0
  59. package/dist-web/assets/{electron-CkPDbAaS.js → electron-B6xOabTq.js} +1 -1
  60. package/dist-web/assets/electron-hcWiB7Gg.js +1 -0
  61. package/dist-web/assets/fetch-BPkgnY0R.js +1 -0
  62. package/dist-web/assets/{fetch-LX9jrJCC.js → fetch-BRXmDI_2.js} +1 -1
  63. package/dist-web/assets/{fetch-Apd5OLJw.js → fetch-BUm1isWe.js} +1 -1
  64. package/dist-web/assets/{fetch-B8rik0TM.js → fetch-CBOJwwJp.js} +3 -3
  65. package/dist-web/assets/{fetch-wqMSiaK3.js → fetch-CEhUu1Yu.js} +1 -1
  66. package/dist-web/assets/fetch-C_EfVFJi.js +3 -0
  67. package/dist-web/assets/{fetch-DQ9UNNAy.js → fetch-DL_u25Ui.js} +1 -1
  68. package/dist-web/assets/{fetch-BIEXkvDq.js → fetch-DMLq3xPG.js} +1 -1
  69. package/dist-web/assets/{fetch--UbRoBT7.js → fetch-DylpNKCR.js} +1 -1
  70. package/dist-web/assets/fetch-etgwVKIw.js +1 -0
  71. package/dist-web/assets/index-0x1QPzKZ.js +1 -0
  72. package/dist-web/assets/index-B5S9FnfP.js +1 -0
  73. package/dist-web/assets/index-BS6loLHW.js +1 -0
  74. package/dist-web/assets/index-BfO_LpDv.css +1 -0
  75. package/dist-web/assets/index-BrTlAl8b.js +1 -0
  76. package/dist-web/assets/index-ByUaiVQK.css +1 -0
  77. package/dist-web/assets/{index-S-YQRH1E.js → index-C3TnydSt.js} +1 -1
  78. package/dist-web/assets/index-CAWO10k1.js +2 -0
  79. package/dist-web/assets/index-C_0GHEcb.css +1 -0
  80. package/dist-web/assets/index-Chm17wNe.js +2 -0
  81. package/dist-web/assets/index-DAr_2DlV.js +173 -0
  82. package/dist-web/assets/index-Em6upenM.js +64 -0
  83. package/dist-web/assets/index-FoTy2Cce.js +1 -0
  84. package/dist-web/assets/index-YADL4XIp.js +22 -0
  85. package/dist-web/assets/index-ZsZwPLWy.css +1 -0
  86. package/dist-web/assets/index-_6lck7Bv.css +1 -0
  87. package/dist-web/assets/index-aMIgqj43.js +1 -0
  88. package/dist-web/assets/index-y7cxH1Et.css +1 -0
  89. package/dist-web/assets/index-zZVsV5HB.js +1 -0
  90. package/dist-web/assets/{people-page-header-Mupn-U_b.js → people-page-header-BdKM1qhX.js} +1 -1
  91. package/dist-web/assets/types-CZnACqaB.js +1 -0
  92. package/dist-web/assets/{vendor-echarts-hJVnODyU.js → vendor-echarts-B-i_56Av.js} +1 -1
  93. package/dist-web/assets/{vendor-echarts-wordcloud-k5ih2Jl4.js → vendor-echarts-wordcloud-Ca8n6qS6.js} +1 -1
  94. package/dist-web/assets/{vendor-nuxt-ui-DaLxYaC4.js → vendor-nuxt-ui-CS1uxE9C.js} +2 -2
  95. package/dist-web/assets/{vendor-reka-ui-CzM4kDQ7.js → vendor-reka-ui-Cta6JPvN.js} +1 -1
  96. package/dist-web/assets/{web-DbKs6-1b.js → web-BUZ-dZy0.js} +1 -1
  97. package/dist-web/assets/{webworkerAll-Bhv-hBqR.js → webworkerAll-BKGP--A4.js} +1 -1
  98. package/dist-web/index.html +4 -4
  99. package/package.json +1 -1
  100. package/dist/chunk-36JGKW6K.mjs.map +0 -1
  101. package/dist/chunk-D3DPCDII.mjs.map +0 -1
  102. package/dist/chunk-KBSAVUFV.mjs.map +0 -1
  103. package/dist/chunk-LVEJHB3X.mjs.map +0 -1
  104. package/dist/chunk-M2PXDX4G.mjs.map +0 -1
  105. package/dist/chunk-TEX44HNL.mjs.map +0 -1
  106. package/dist/chunk-WV5GSRQM.mjs.map +0 -1
  107. package/dist-web/assets/DebugToolsPanel-D_lFIW6j.css +0 -1
  108. package/dist-web/assets/DebugToolsPanel.vue_vue_type_script_setup_true_lang-F4n0zNX2.js +0 -110
  109. package/dist-web/assets/MessageExportModal-CGcdMOyw.js +0 -1
  110. package/dist-web/assets/PageHeader-Bbn87QZS.css +0 -1
  111. package/dist-web/assets/PageHeader-CZaqOdBQ.js +0 -1
  112. package/dist-web/assets/electron-D9vE5t3H.js +0 -1
  113. package/dist-web/assets/fetch-1pB-HbYw.js +0 -3
  114. package/dist-web/assets/fetch-CF_3ZqRa.js +0 -1
  115. package/dist-web/assets/fetch-FSNxSnAp.js +0 -1
  116. package/dist-web/assets/index---rXG1hZ.css +0 -1
  117. package/dist-web/assets/index-B01uUoHE.js +0 -1
  118. package/dist-web/assets/index-B4l3rHie.css +0 -1
  119. package/dist-web/assets/index-BSIyyt0z.js +0 -1
  120. package/dist-web/assets/index-Bh8z441f.js +0 -2
  121. package/dist-web/assets/index-C0rya8v4.js +0 -1
  122. package/dist-web/assets/index-C1p9CbmN.css +0 -1
  123. package/dist-web/assets/index-COpza1A4.css +0 -1
  124. package/dist-web/assets/index-CZbZv2fh.js +0 -64
  125. package/dist-web/assets/index-CqUuHQBQ.js +0 -22
  126. package/dist-web/assets/index-CzeTP5MJ.js +0 -173
  127. package/dist-web/assets/index-DgNxTM_8.js +0 -2
  128. package/dist-web/assets/index-DosG7LmJ.css +0 -1
  129. /package/dist/{chunk-326OCJOT.mjs.map → chunk-DA5T64RY.mjs.map} +0 -0
  130. /package/dist/{chunk-5EE2EFPE.mjs.map → chunk-RD335EMA.mjs.map} +0 -0
  131. /package/dist/{chunk-ULNRUS55.mjs.map → chunk-WQCY45U2.mjs.map} +0 -0
  132. /package/dist/{chunk-TCZHG3G7.mjs.map → chunk-YPQ72HMX.mjs.map} +0 -0
  133. /package/dist/{http-L4AMELPZ.mjs.map → http-3B5ARN7A.mjs.map} +0 -0
  134. /package/dist/{import-WWCSXGVS.mjs.map → import-2DZGNSEX.mjs.map} +0 -0
  135. /package/dist/{src-MPNBTFOE.mjs.map → src-R3QX6L3L.mjs.map} +0 -0
  136. /package/dist/{stream-import-HIE7PNL4.mjs.map → stream-import-VUEL2TTU.mjs.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{w as U,g,c,u as S,B as _,d as m,E as I,e as p}from"./RelationshipGalaxyCanvas-CORMD7vL.js";const x={name:"local-uniform-bit",vertex:{header:`
1
+ import{w as U,g,c,u as S,B as _,d as m,E as I,e as p}from"./RelationshipGalaxyCanvas-Dwdy5flh.js";const x={name:"local-uniform-bit",vertex:{header:`
2
2
 
3
3
  struct LocalUniforms {
4
4
  uTransformMatrix:mat3x3<f32>,
@@ -1 +1 @@
1
- import{f as C,h as Ce,i as Te,m as Z,M as A,j as _,k as Le,w as Oe,s as Pe,l as ke,n as je,C as be,T as _e,o as Ne,F as Ye,p as Ve,q as $e,D as Se,A as Xe,R as Je,r as te}from"./RelationshipGalaxyCanvas-CORMD7vL.js";import{R as Ke,S as Qe,B as ze,a as Ze,b as et,c as tt,A as st,C as nt}from"./RenderTargetSystem-CGhV9R9E.js";import"./vendor-snapdom-XnBoh1gd.js";import"./index-CqUuHQBQ.js";import"./vendor-reka-ui-CzM4kDQ7.js";import"./vendor-nuxt-ui-DaLxYaC4.js";import"./index-DgNxTM_8.js";import"./LoadingState.vue_vue_type_script_setup_true_lang-D_dJuLWJ.js";import"./people-page-header-Mupn-U_b.js";import"./relationship-galaxy-viewport-Cwfa51ER.js";import"./Filter-BJwode73.js";const he=class L{static _getPatternRepeat(e,t){const a=e&&e!=="clamp-to-edge",s=t&&t!=="clamp-to-edge";return a&&s?"repeat":a?"repeat-x":s?"repeat-y":"no-repeat"}start(e,t,a){}execute(e,t){const a=t.elements;if(!a||!a.length)return;const s=e.renderer,o=s.canvasContext,r=o.activeContext;for(let l=0;l<a.length;l++){const i=a[l];if(!i.packAsQuad)continue;const d=i,h=d.texture,v=h?C.getCanvasSource(h):null;if(!v)continue;const y=h.source.style,H=o.smoothProperty,W=y.scaleMode!=="nearest";r[H]!==W&&(r[H]=W),o.setBlendMode(t.blendMode);const F=s.globalUniforms.globalUniformData?.worldColor??4294967295,S=d.color,G=(F>>>24&255)/255,P=(S>>>24&255)/255,g=s.filter?.alphaMultiplier??1,M=G*P*g;if(M<=0)continue;r.globalAlpha=M;const K=F&16777215,k=S&16777215,q=Te(Z(k,K)),I=h.frame,V=y.addressModeU??y.addressMode,O=y.addressModeV??y.addressMode,u=L._getPatternRepeat(V,O),m=h.source._resolution??h.source.resolution??1,f=d.renderable?.renderGroup?.isCachedAsTexture,D=I.x*m,j=I.y*m,b=I.width*m,E=I.height*m,x=d.bounds,w=s.renderTarget.renderTarget.isRoot,R=x.minX,$=x.minY,U=x.maxX-x.minX,B=x.maxY-x.minY,T=h.rotate,c=h.uvs,se=Math.min(c.x0,c.x1,c.x2,c.x3,c.y0,c.y1,c.y2,c.y3),Fe=Math.max(c.x0,c.x1,c.x2,c.x3,c.y0,c.y1,c.y2,c.y3),de=u!=="no-repeat"&&(se<0||Fe>1),Q=T&&!(!de&&(q!==16777215||T));Q?(L._tempPatternMatrix.copyFrom(d.transform),Ce.matrixAppendRotationInv(L._tempPatternMatrix,T,R,$,U,B),o.setContextTransform(L._tempPatternMatrix,d.roundPixels===1,void 0,f&&w)):o.setContextTransform(d.transform,d.roundPixels===1,void 0,f&&w);const ne=U,ae=B;let X=Q?0:R,J=Q?0:$;if(!Q&&d.roundPixels===1&&(X|=0,J|=0),de){let oe=v;const N=q!==16777215&&!T,Y=I.width<=h.source.width&&I.height<=h.source.height;N&&Y&&(oe=C.getTintedCanvas({texture:h},q));const re=r.createPattern(oe,u);if(!re)continue;const pe=ne,ue=ae;if(pe===0||ue===0)continue;const me=1/pe,fe=1/ue,ge=(c.x1-c.x0)*me,ve=(c.y1-c.y0)*me,ye=(c.x3-c.x0)*fe,xe=(c.y3-c.y0)*fe,qe=c.x0-ge*X-ye*J,Ue=c.y0-ve*X-xe*J,ie=h.source.pixelWidth,ce=h.source.pixelHeight;L._tempPatternMatrix.set(ge*ie,ve*ce,ye*ie,xe*ce,qe*ie,Ue*ce),C.applyPatternTransform(re,L._tempPatternMatrix),r.fillStyle=re,r.fillRect(X,J,ne,ae)}else{const N=q!==16777215||T?C.getTintedCanvas({texture:h},q):v,Y=N!==v;r.drawImage(N,Y?0:D,Y?0:j,Y?N.width:b,Y?N.height:E,X,J,ne,ae)}}}};he._tempPatternMatrix=new A;he.extension={type:[_.CanvasPipesAdaptor],name:"batch"};let at=he;class Me{constructor(e){this._colorStack=[],this._colorStackIndex=0,this._currentColor=0,this._renderer=e}buildStart(){this._colorStack[0]=15,this._colorStackIndex=1,this._currentColor=15}push(e,t,a){this._renderer.renderPipes.batch.break(a);const s=this._colorStack;s[this._colorStackIndex]=s[this._colorStackIndex-1]&e.mask;const o=this._colorStack[this._colorStackIndex];o!==this._currentColor&&(this._currentColor=o,a.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1})),this._colorStackIndex++}pop(e,t,a){this._renderer.renderPipes.batch.break(a);const s=this._colorStack;this._colorStackIndex--;const o=s[this._colorStackIndex-1];o!==this._currentColor&&(this._currentColor=o,a.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1}))}execute(e){}destroy(){this._renderer=null,this._colorStack=null}}Me.extension={type:[_.CanvasPipes],name:"colorMask"};function ot(n,e,t,a,s,o){o=Math.max(0,Math.min(o,Math.min(a,s)/2)),n.moveTo(e+o,t),n.lineTo(e+a-o,t),n.quadraticCurveTo(e+a,t,e+a,t+o),n.lineTo(e+a,t+s-o),n.quadraticCurveTo(e+a,t+s,e+a-o,t+s),n.lineTo(e+o,t+s),n.quadraticCurveTo(e,t+s,e,t+s-o),n.lineTo(e,t+o),n.quadraticCurveTo(e,t,e+o,t)}function we(n,e){switch(e.type){case"rectangle":{const t=e;n.rect(t.x,t.y,t.width,t.height);break}case"roundedRectangle":{const t=e;ot(n,t.x,t.y,t.width,t.height,t.radius);break}case"circle":{const t=e;n.moveTo(t.x+t.radius,t.y),n.arc(t.x,t.y,t.radius,0,Math.PI*2);break}case"ellipse":{const t=e;n.ellipse?(n.moveTo(t.x+t.halfWidth,t.y),n.ellipse(t.x,t.y,t.halfWidth,t.halfHeight,0,0,Math.PI*2)):(n.save(),n.translate(t.x,t.y),n.scale(t.halfWidth,t.halfHeight),n.moveTo(1,0),n.arc(0,0,1,0,Math.PI*2),n.restore());break}case"triangle":{const t=e;n.moveTo(t.x,t.y),n.lineTo(t.x2,t.y2),n.lineTo(t.x3,t.y3),n.closePath();break}default:{const t=e,a=t.points;if(!a?.length)break;n.moveTo(a[0],a[1]);for(let s=2;s<a.length;s+=2)n.lineTo(a[s],a[s+1]);t.closePath&&n.closePath();break}}}function rt(n,e,t){const a=[],s=[],o=[];if(!Pe[e.type]?.build(e,a))return!1;const l=e.closePath??!0;ke(a,t,!1,l,s,o);for(let i=0;i<o.length;i+=3){const d=o[i]*2,h=o[i+1]*2,v=o[i+2]*2;n.moveTo(s[d],s[d+1]),n.lineTo(s[h],s[h+1]),n.lineTo(s[v],s[v+1]),n.closePath()}return!0}function it(n,e){if(!e?.length)return!1;for(let t=0;t<e.length;t++){const a=e[t];if(!a?.shape)continue;const s=a.transform,o=s&&!s.isIdentity();o&&(n.save(),n.transform(s.a,s.b,s.c,s.d,s.tx,s.ty)),we(n,a.shape),o&&n.restore()}return!0}class Re{constructor(e){this._warnedMaskTypes=new Set,this._canvasMaskStack=[],this._renderer=e}push(e,t,a){this._renderer.renderPipes.batch.break(a),a.add({renderPipeId:"stencilMask",action:"pushMaskBegin",mask:e,inverse:t._maskOptions.inverse,canBundle:!1})}pop(e,t,a){this._renderer.renderPipes.batch.break(a),a.add({renderPipeId:"stencilMask",action:"popMaskEnd",mask:e,inverse:t._maskOptions.inverse,canBundle:!1})}execute(e){if(e.action!=="pushMaskBegin"&&e.action!=="popMaskEnd")return;const t=this._renderer,a=t.canvasContext,s=a?.activeContext;if(!s)return;if(e.action==="popMaskEnd"){this._canvasMaskStack.pop()&&s.restore();return}e.inverse&&this._warnOnce("inverse","CanvasRenderer: inverse masks are not supported on Canvas2D; ignoring inverse flag.");const o=e.mask.mask;if(!(o instanceof Le)){this._warnOnce("nonGraphics","CanvasRenderer: only Graphics masks are supported in Canvas2D; skipping mask."),this._canvasMaskStack.push(!1);return}const r=o,l=r.context?.instructions;if(!l?.length){this._canvasMaskStack.push(!1);return}s.save(),a.setContextTransform(r.groupTransform,(t._roundPixels|r._roundPixels)===1),s.beginPath();let i=!1,d=!1;for(let h=0;h<l.length;h++){const v=l[h],y=v.action;if(y!=="fill"&&y!=="stroke")continue;const H=v.data,W=H?.path?.shapePath;if(!W?.shapePrimitives?.length)continue;const F=y==="stroke",S=W.shapePrimitives;for(let G=0;G<S.length;G++){const P=S[G];if(!P?.shape)continue;const g=P.transform,M=g&&!g.isIdentity();M&&(s.save(),s.transform(g.a,g.b,g.c,g.d,g.tx,g.ty)),F&&H.style?i=rt(s,P.shape,H.style)||i:(we(s,P.shape),d=it(s,P.holes)||d,i=!0),M&&s.restore()}}if(!i){s.restore(),this._canvasMaskStack.push(!1);return}d?s.clip("evenodd"):s.clip(),this._canvasMaskStack.push(!0)}destroy(){this._renderer=null,this._warnedMaskTypes=null,this._canvasMaskStack=null}_warnOnce(e,t){this._warnedMaskTypes.has(e)||(this._warnedMaskTypes.add(e),Oe(t))}}Re.extension={type:[_.CanvasPipes],name:"stencilMask"};const p="source-over";function ct(){const n=je(),e=Object.create(null);return e.inherit=p,e.none=p,e.normal="source-over",e.add="lighter",e.multiply=n?"multiply":p,e.screen=n?"screen":p,e.overlay=n?"overlay":p,e.darken=n?"darken":p,e.lighten=n?"lighten":p,e["color-dodge"]=n?"color-dodge":p,e["color-burn"]=n?"color-burn":p,e["hard-light"]=n?"hard-light":p,e["soft-light"]=n?"soft-light":p,e.difference=n?"difference":p,e.exclusion=n?"exclusion":p,e.saturation=n?"saturation":p,e.color=n?"color":p,e.luminosity=n?"luminosity":p,e["linear-burn"]=n?"color-burn":p,e["linear-dodge"]=n?"color-dodge":p,e["linear-light"]=n?"hard-light":p,e["pin-light"]=n?"hard-light":p,e["vivid-light"]=n?"hard-light":p,e["hard-mix"]=p,e.negation=n?"difference":p,e["normal-npm"]=e.normal,e["add-npm"]=e.add,e["screen-npm"]=e.screen,e.erase="destination-out",e.subtract=p,e.divide=p,e.min=p,e.max=p,e}const lt=new A;class Ie{constructor(e){this.activeResolution=1,this.smoothProperty="imageSmoothingEnabled",this.blendModes=ct(),this._activeBlendMode="normal",this._projTransform=null,this._outerBlend=!1,this._warnedBlendModes=new Set,this._renderer=e}resolutionChange(e){this.activeResolution=e}init(){const e=this._renderer.background.alpha<1;if(this.rootContext=this._renderer.canvas.getContext("2d",{alpha:e}),this.activeContext=this.rootContext,this.activeResolution=this._renderer.resolution,!this.rootContext.imageSmoothingEnabled){const t=this.rootContext;t.webkitImageSmoothingEnabled?this.smoothProperty="webkitImageSmoothingEnabled":t.mozImageSmoothingEnabled?this.smoothProperty="mozImageSmoothingEnabled":t.oImageSmoothingEnabled?this.smoothProperty="oImageSmoothingEnabled":t.msImageSmoothingEnabled&&(this.smoothProperty="msImageSmoothingEnabled")}}setContextTransform(e,t,a,s){const o=s?A.IDENTITY:this._renderer.globalUniforms.globalUniformData?.worldTransformMatrix||A.IDENTITY;let r=lt;r.copyFrom(o),r.append(e);const l=this._projTransform,i=this.activeResolution;if(a=a||i,l){const d=A.shared;d.copyFrom(r),d.prepend(l),r=d}t?this.activeContext.setTransform(r.a*a,r.b*a,r.c*a,r.d*a,r.tx*i|0,r.ty*i|0):this.activeContext.setTransform(r.a*a,r.b*a,r.c*a,r.d*a,r.tx*i,r.ty*i)}clear(e,t){const a=this.activeContext,s=this._renderer;if(a.clearRect(0,0,s.width,s.height),e){const o=be.shared.setValue(e);a.globalAlpha=t??o.alpha,a.fillStyle=o.toHex(),a.fillRect(0,0,s.width,s.height),a.globalAlpha=1}}setBlendMode(e){if(this._activeBlendMode===e)return;this._activeBlendMode=e,this._outerBlend=!1;const t=this.blendModes[e];if(!t){this._warnedBlendModes.has(e)||(console.warn(`CanvasRenderer: blend mode "${e}" is not supported in Canvas2D; falling back to "source-over".`),this._warnedBlendModes.add(e)),this.activeContext.globalCompositeOperation="source-over";return}this.activeContext.globalCompositeOperation=t}destroy(){this.rootContext=null,this.activeContext=null,this._warnedBlendModes.clear()}}Ie.extension={type:[_.CanvasSystem],name:"canvasContext"};class Be{constructor(){this.maxTextures=16,this.maxBatchableTextures=16,this.maxUniformBindings=0}init(){}}Be.extension={type:[_.CanvasSystem],name:"limits"};const ht="#808080",z=new A,dt=new A,pt=new A,le=new A;function ut(n,e,t){n.beginPath();for(let a=0;a<t.length;a+=3){const s=t[a]*2,o=t[a+1]*2,r=t[a+2]*2;n.moveTo(e[s],e[s+1]),n.lineTo(e[o],e[o+1]),n.lineTo(e[r],e[r+1]),n.closePath()}n.fill()}function mt(n){return`#${(n&16777215).toString(16).padStart(6,"0")}`}function ft(n,e,t,a,s,o){o=Math.max(0,Math.min(o,Math.min(a,s)/2)),n.moveTo(e+o,t),n.lineTo(e+a-o,t),n.quadraticCurveTo(e+a,t,e+a,t+o),n.lineTo(e+a,t+s-o),n.quadraticCurveTo(e+a,t+s,e+a-o,t+s),n.lineTo(e+o,t+s),n.quadraticCurveTo(e,t+s,e,t+s-o),n.lineTo(e,t+o),n.quadraticCurveTo(e,t,e+o,t)}function ee(n,e){switch(e.type){case"rectangle":{const t=e;n.rect(t.x,t.y,t.width,t.height);break}case"roundedRectangle":{const t=e;ft(n,t.x,t.y,t.width,t.height,t.radius);break}case"circle":{const t=e;n.arc(t.x,t.y,t.radius,0,Math.PI*2);break}case"ellipse":{const t=e;n.ellipse?n.ellipse(t.x,t.y,t.halfWidth,t.halfHeight,0,0,Math.PI*2):(n.save(),n.translate(t.x,t.y),n.scale(t.halfWidth,t.halfHeight),n.arc(0,0,1,0,Math.PI*2),n.restore());break}case"triangle":{const t=e;n.moveTo(t.x,t.y),n.lineTo(t.x2,t.y2),n.lineTo(t.x3,t.y3),n.closePath();break}default:{const t=e,a=t.points;if(!a?.length)break;n.moveTo(a[0],a[1]);for(let s=2;s<a.length;s+=2)n.lineTo(a[s],a[s+1]);t.closePath&&n.closePath();break}}}function gt(n,e){if(!e?.length)return!1;for(let t=0;t<e.length;t++){const a=e[t];if(!a?.shape)continue;const s=a.transform,o=s&&!s.isIdentity();o&&(n.save(),n.transform(s.a,s.b,s.c,s.d,s.tx,s.ty)),ee(n,a.shape),o&&n.restore()}return!0}function vt(n,e,t,a){const s=n.fill;if(s instanceof Ye){s.buildGradient();const r=s.texture;if(r){const l=C.getTintedPattern(r,e),i=t?le.copyFrom(t).scale(r.source.pixelWidth,r.source.pixelHeight):le.copyFrom(s.transform);return a&&!n.textureSpace&&i.append(a),C.applyPatternTransform(l,i),l}}if(s instanceof Ve){const r=C.getTintedPattern(s.texture,e);return C.applyPatternTransform(r,s.transform,!1),r}const o=n.texture;if(o&&o!==_e.WHITE){if(!o.source.resource)return ht;const r=C.getTintedPattern(o,e),l=t?le.copyFrom(t).scale(o.source.pixelWidth,o.source.pixelHeight):n.matrix;return C.applyPatternTransform(r,l),r}return mt(e)}class Ae{constructor(){this.shader=null}contextChange(e){}execute(e,t){const a=e.renderer,s=a.canvasContext,o=s.activeContext,r=t.groupTransform,l=a.globalUniforms.globalUniformData?.worldColor??4294967295,i=t.groupColorAlpha,d=(l>>>24&255)/255,h=(i>>>24&255)/255,v=a.filter?.alphaMultiplier??1,y=d*h*v;if(y<=0)return;const H=l&16777215,W=i&16777215,F=Te(Z(W,H)),S=a._roundPixels|t._roundPixels;o.save(),s.setContextTransform(r,S===1),s.setBlendMode(t.groupBlendMode);const G=t.context.instructions;for(let P=0;P<G.length;P++){const g=G[P];if(g.action==="texture"){const u=g.data,m=u.image,f=m?C.getCanvasSource(m):null;if(!f)continue;const D=u.alpha*y;if(D<=0)continue;const j=Z(u.style,F);o.globalAlpha=D;let b=f;j!==16777215&&(b=C.getTintedCanvas({texture:m},j));const E=m.frame,x=m.source._resolution??m.source.resolution??1;let w=E.x*x,R=E.y*x;const $=E.width*x,U=E.height*x;b!==f&&(w=0,R=0);const B=u.transform,T=B&&!B.isIdentity(),c=m.rotate;T||c?(z.copyFrom(r),T&&z.append(B),c&&Ce.matrixAppendRotationInv(z,c,u.dx,u.dy,u.dw,u.dh),s.setContextTransform(z,S===1)):s.setContextTransform(r,S===1),o.drawImage(b,w,R,b===f?$:b.width,b===f?U:b.height,c?0:u.dx,c?0:u.dy,u.dw,u.dh),(T||c)&&s.setContextTransform(r,S===1);continue}const M=g.data,K=M?.path?.shapePath;if(!K?.shapePrimitives?.length)continue;const k=M.style,q=Z(k.color,F),I=k.alpha*y;if(I<=0)continue;const V=g.action==="stroke";if(o.globalAlpha=I,V){const u=k;o.lineWidth=u.width,o.lineCap=u.cap,o.lineJoin=u.join,o.miterLimit=u.miterLimit}const O=K.shapePrimitives;if(!V&&M.hole?.shapePath?.shapePrimitives?.length){const u=O[O.length-1];u.holes=M.hole.shapePath.shapePrimitives}for(let u=0;u<O.length;u++){const m=O[u];if(!m?.shape)continue;const f=m.transform,D=f&&!f.isIdentity(),j=k.texture&&k.texture!==_e.WHITE,b=k.textureSpace==="global"?f:null,E=j?Ne(dt,k,m.shape,b):null,x=D?pt.copyFrom(r).append(f):r,w=vt(k,q,E,x);if(D&&(o.save(),o.transform(f.a,f.b,f.c,f.d,f.tx,f.ty)),V){const R=k;if(R.alignment!==.5&&!R.pixelLine){const U=[],B=[],T=[];if(Pe[m.shape.type]?.build(m.shape,U)){const se=m.shape.closePath??!0;ke(U,R,!1,se,B,T),o.fillStyle=w,ut(o,B,T)}else o.strokeStyle=w,o.beginPath(),ee(o,m.shape),o.stroke()}else o.strokeStyle=w,o.beginPath(),ee(o,m.shape),o.stroke()}else o.fillStyle=w,o.beginPath(),ee(o,m.shape),gt(o,m.holes)?o.fill("evenodd"):o.fill();D&&o.restore()}}o.restore()}destroy(){this.shader=null}}Ae.extension={type:[_.CanvasPipesAdaptor],name:"graphics"};class yt{init(e,t){this._renderer=e,this._renderTargetSystem=t}initGpuRenderTarget(e){const t=e.colorTexture,{canvas:a,context:s}=this._ensureCanvas(t);return{canvas:a,context:s,width:a.width,height:a.height}}resizeGpuRenderTarget(e){const t=e.colorTexture,{canvas:a}=this._ensureCanvas(t);a.width=e.pixelWidth,a.height=e.pixelHeight}startRenderPass(e,t,a,s){const o=this._renderTargetSystem.getGpuRenderTarget(e);this._renderer.canvasContext.activeContext=o.context,this._renderer.canvasContext.activeResolution=e.resolution,t&&this.clear(e,t,a,s)}clear(e,t,a,s){const r=this._renderTargetSystem.getGpuRenderTarget(e).context,l=s||{x:0,y:0,width:e.pixelWidth,height:e.pixelHeight};if(r.setTransform(1,0,0,1,0,0),r.clearRect(l.x,l.y,l.width,l.height),a){const i=be.shared.setValue(a);i.alpha>0&&(r.globalAlpha=i.alpha,r.fillStyle=i.toHex(),r.fillRect(l.x,l.y,l.width,l.height),r.globalAlpha=1)}}finishRenderPass(){}copyToTexture(e,t,a,s,o){const l=this._renderTargetSystem.getGpuRenderTarget(e).canvas,i=t.source,{context:d}=this._ensureCanvas(i),h=o?.x??0,v=o?.y??0;return d.drawImage(l,a.x,a.y,s.width,s.height,h,v,s.width,s.height),i.update(),t}destroyGpuRenderTarget(e){}_ensureCanvas(e){let t=e.resource;(!t||!$e.test(t))&&(t=Se.get().createCanvas(e.pixelWidth,e.pixelHeight),e.resource=t),(t.width!==e.pixelWidth||t.height!==e.pixelHeight)&&(t.width=e.pixelWidth,t.height=e.pixelHeight);const a=t.getContext("2d");return{canvas:t,context:a}}}class He extends Ke{constructor(e){super(e),this.adaptor=new yt,this.adaptor.init(e,this)}}He.extension={type:[_.CanvasSystem],name:"renderTarget"};class Ge{constructor(e){}init(){}initSource(e){}generateCanvas(e){const t=Se.get().createCanvas(),a=t.getContext("2d"),s=C.getCanvasSource(e);if(!s)return t;const o=e.frame,r=e.source._resolution??e.source.resolution??1,l=o.x*r,i=o.y*r,d=o.width*r,h=o.height*r;return t.width=Math.ceil(d),t.height=Math.ceil(h),a.drawImage(s,l,i,d,h,0,0,d,h),t}getPixels(e){const t=this.generateCanvas(e);return{pixels:t.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,t.width,t.height).data,width:t.width,height:t.height}}destroy(){}}Ge.extension={type:[_.CanvasSystem],name:"texture"};const xt=[...Qe,Ie,Be,Ge,He],Ct=[ze,Ze,et,tt,st,Re,Me,nt],Tt=[at,Ae],De=[],Ee=[],We=[];te.handleByNamedList(_.CanvasSystem,De);te.handleByNamedList(_.CanvasPipes,Ee);te.handleByNamedList(_.CanvasPipesAdaptor,We);te.add(...xt,...Ct,...Tt);class Gt extends Xe{constructor(){const e={name:"canvas",type:Je.CANVAS,systems:De,renderPipes:Ee,renderPipeAdaptors:We};super(e)}}export{Gt as CanvasRenderer};
1
+ import{f as C,h as Ce,i as Te,m as Z,M as A,j as _,k as Le,w as Oe,s as Pe,l as ke,n as je,C as be,T as _e,o as Ne,F as Ye,p as Ve,q as $e,D as Se,A as Xe,R as Je,r as te}from"./RelationshipGalaxyCanvas-Dwdy5flh.js";import{R as Ke,S as Qe,B as ze,a as Ze,b as et,c as tt,A as st,C as nt}from"./RenderTargetSystem-BE56mKRG.js";import"./vendor-snapdom-XnBoh1gd.js";import"./index-YADL4XIp.js";import"./vendor-reka-ui-Cta6JPvN.js";import"./vendor-nuxt-ui-CS1uxE9C.js";import"./index-CAWO10k1.js";import"./LoadingState.vue_vue_type_script_setup_true_lang-DACMroOe.js";import"./people-page-header-BdKM1qhX.js";import"./relationship-galaxy-viewport-Cwfa51ER.js";import"./Filter-CHXKzS2l.js";const he=class L{static _getPatternRepeat(e,t){const a=e&&e!=="clamp-to-edge",s=t&&t!=="clamp-to-edge";return a&&s?"repeat":a?"repeat-x":s?"repeat-y":"no-repeat"}start(e,t,a){}execute(e,t){const a=t.elements;if(!a||!a.length)return;const s=e.renderer,o=s.canvasContext,r=o.activeContext;for(let l=0;l<a.length;l++){const i=a[l];if(!i.packAsQuad)continue;const d=i,h=d.texture,v=h?C.getCanvasSource(h):null;if(!v)continue;const y=h.source.style,H=o.smoothProperty,W=y.scaleMode!=="nearest";r[H]!==W&&(r[H]=W),o.setBlendMode(t.blendMode);const F=s.globalUniforms.globalUniformData?.worldColor??4294967295,S=d.color,G=(F>>>24&255)/255,P=(S>>>24&255)/255,g=s.filter?.alphaMultiplier??1,M=G*P*g;if(M<=0)continue;r.globalAlpha=M;const K=F&16777215,k=S&16777215,q=Te(Z(k,K)),I=h.frame,V=y.addressModeU??y.addressMode,O=y.addressModeV??y.addressMode,u=L._getPatternRepeat(V,O),m=h.source._resolution??h.source.resolution??1,f=d.renderable?.renderGroup?.isCachedAsTexture,D=I.x*m,j=I.y*m,b=I.width*m,E=I.height*m,x=d.bounds,w=s.renderTarget.renderTarget.isRoot,R=x.minX,$=x.minY,U=x.maxX-x.minX,B=x.maxY-x.minY,T=h.rotate,c=h.uvs,se=Math.min(c.x0,c.x1,c.x2,c.x3,c.y0,c.y1,c.y2,c.y3),Fe=Math.max(c.x0,c.x1,c.x2,c.x3,c.y0,c.y1,c.y2,c.y3),de=u!=="no-repeat"&&(se<0||Fe>1),Q=T&&!(!de&&(q!==16777215||T));Q?(L._tempPatternMatrix.copyFrom(d.transform),Ce.matrixAppendRotationInv(L._tempPatternMatrix,T,R,$,U,B),o.setContextTransform(L._tempPatternMatrix,d.roundPixels===1,void 0,f&&w)):o.setContextTransform(d.transform,d.roundPixels===1,void 0,f&&w);const ne=U,ae=B;let X=Q?0:R,J=Q?0:$;if(!Q&&d.roundPixels===1&&(X|=0,J|=0),de){let oe=v;const N=q!==16777215&&!T,Y=I.width<=h.source.width&&I.height<=h.source.height;N&&Y&&(oe=C.getTintedCanvas({texture:h},q));const re=r.createPattern(oe,u);if(!re)continue;const pe=ne,ue=ae;if(pe===0||ue===0)continue;const me=1/pe,fe=1/ue,ge=(c.x1-c.x0)*me,ve=(c.y1-c.y0)*me,ye=(c.x3-c.x0)*fe,xe=(c.y3-c.y0)*fe,qe=c.x0-ge*X-ye*J,Ue=c.y0-ve*X-xe*J,ie=h.source.pixelWidth,ce=h.source.pixelHeight;L._tempPatternMatrix.set(ge*ie,ve*ce,ye*ie,xe*ce,qe*ie,Ue*ce),C.applyPatternTransform(re,L._tempPatternMatrix),r.fillStyle=re,r.fillRect(X,J,ne,ae)}else{const N=q!==16777215||T?C.getTintedCanvas({texture:h},q):v,Y=N!==v;r.drawImage(N,Y?0:D,Y?0:j,Y?N.width:b,Y?N.height:E,X,J,ne,ae)}}}};he._tempPatternMatrix=new A;he.extension={type:[_.CanvasPipesAdaptor],name:"batch"};let at=he;class Me{constructor(e){this._colorStack=[],this._colorStackIndex=0,this._currentColor=0,this._renderer=e}buildStart(){this._colorStack[0]=15,this._colorStackIndex=1,this._currentColor=15}push(e,t,a){this._renderer.renderPipes.batch.break(a);const s=this._colorStack;s[this._colorStackIndex]=s[this._colorStackIndex-1]&e.mask;const o=this._colorStack[this._colorStackIndex];o!==this._currentColor&&(this._currentColor=o,a.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1})),this._colorStackIndex++}pop(e,t,a){this._renderer.renderPipes.batch.break(a);const s=this._colorStack;this._colorStackIndex--;const o=s[this._colorStackIndex-1];o!==this._currentColor&&(this._currentColor=o,a.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1}))}execute(e){}destroy(){this._renderer=null,this._colorStack=null}}Me.extension={type:[_.CanvasPipes],name:"colorMask"};function ot(n,e,t,a,s,o){o=Math.max(0,Math.min(o,Math.min(a,s)/2)),n.moveTo(e+o,t),n.lineTo(e+a-o,t),n.quadraticCurveTo(e+a,t,e+a,t+o),n.lineTo(e+a,t+s-o),n.quadraticCurveTo(e+a,t+s,e+a-o,t+s),n.lineTo(e+o,t+s),n.quadraticCurveTo(e,t+s,e,t+s-o),n.lineTo(e,t+o),n.quadraticCurveTo(e,t,e+o,t)}function we(n,e){switch(e.type){case"rectangle":{const t=e;n.rect(t.x,t.y,t.width,t.height);break}case"roundedRectangle":{const t=e;ot(n,t.x,t.y,t.width,t.height,t.radius);break}case"circle":{const t=e;n.moveTo(t.x+t.radius,t.y),n.arc(t.x,t.y,t.radius,0,Math.PI*2);break}case"ellipse":{const t=e;n.ellipse?(n.moveTo(t.x+t.halfWidth,t.y),n.ellipse(t.x,t.y,t.halfWidth,t.halfHeight,0,0,Math.PI*2)):(n.save(),n.translate(t.x,t.y),n.scale(t.halfWidth,t.halfHeight),n.moveTo(1,0),n.arc(0,0,1,0,Math.PI*2),n.restore());break}case"triangle":{const t=e;n.moveTo(t.x,t.y),n.lineTo(t.x2,t.y2),n.lineTo(t.x3,t.y3),n.closePath();break}default:{const t=e,a=t.points;if(!a?.length)break;n.moveTo(a[0],a[1]);for(let s=2;s<a.length;s+=2)n.lineTo(a[s],a[s+1]);t.closePath&&n.closePath();break}}}function rt(n,e,t){const a=[],s=[],o=[];if(!Pe[e.type]?.build(e,a))return!1;const l=e.closePath??!0;ke(a,t,!1,l,s,o);for(let i=0;i<o.length;i+=3){const d=o[i]*2,h=o[i+1]*2,v=o[i+2]*2;n.moveTo(s[d],s[d+1]),n.lineTo(s[h],s[h+1]),n.lineTo(s[v],s[v+1]),n.closePath()}return!0}function it(n,e){if(!e?.length)return!1;for(let t=0;t<e.length;t++){const a=e[t];if(!a?.shape)continue;const s=a.transform,o=s&&!s.isIdentity();o&&(n.save(),n.transform(s.a,s.b,s.c,s.d,s.tx,s.ty)),we(n,a.shape),o&&n.restore()}return!0}class Re{constructor(e){this._warnedMaskTypes=new Set,this._canvasMaskStack=[],this._renderer=e}push(e,t,a){this._renderer.renderPipes.batch.break(a),a.add({renderPipeId:"stencilMask",action:"pushMaskBegin",mask:e,inverse:t._maskOptions.inverse,canBundle:!1})}pop(e,t,a){this._renderer.renderPipes.batch.break(a),a.add({renderPipeId:"stencilMask",action:"popMaskEnd",mask:e,inverse:t._maskOptions.inverse,canBundle:!1})}execute(e){if(e.action!=="pushMaskBegin"&&e.action!=="popMaskEnd")return;const t=this._renderer,a=t.canvasContext,s=a?.activeContext;if(!s)return;if(e.action==="popMaskEnd"){this._canvasMaskStack.pop()&&s.restore();return}e.inverse&&this._warnOnce("inverse","CanvasRenderer: inverse masks are not supported on Canvas2D; ignoring inverse flag.");const o=e.mask.mask;if(!(o instanceof Le)){this._warnOnce("nonGraphics","CanvasRenderer: only Graphics masks are supported in Canvas2D; skipping mask."),this._canvasMaskStack.push(!1);return}const r=o,l=r.context?.instructions;if(!l?.length){this._canvasMaskStack.push(!1);return}s.save(),a.setContextTransform(r.groupTransform,(t._roundPixels|r._roundPixels)===1),s.beginPath();let i=!1,d=!1;for(let h=0;h<l.length;h++){const v=l[h],y=v.action;if(y!=="fill"&&y!=="stroke")continue;const H=v.data,W=H?.path?.shapePath;if(!W?.shapePrimitives?.length)continue;const F=y==="stroke",S=W.shapePrimitives;for(let G=0;G<S.length;G++){const P=S[G];if(!P?.shape)continue;const g=P.transform,M=g&&!g.isIdentity();M&&(s.save(),s.transform(g.a,g.b,g.c,g.d,g.tx,g.ty)),F&&H.style?i=rt(s,P.shape,H.style)||i:(we(s,P.shape),d=it(s,P.holes)||d,i=!0),M&&s.restore()}}if(!i){s.restore(),this._canvasMaskStack.push(!1);return}d?s.clip("evenodd"):s.clip(),this._canvasMaskStack.push(!0)}destroy(){this._renderer=null,this._warnedMaskTypes=null,this._canvasMaskStack=null}_warnOnce(e,t){this._warnedMaskTypes.has(e)||(this._warnedMaskTypes.add(e),Oe(t))}}Re.extension={type:[_.CanvasPipes],name:"stencilMask"};const p="source-over";function ct(){const n=je(),e=Object.create(null);return e.inherit=p,e.none=p,e.normal="source-over",e.add="lighter",e.multiply=n?"multiply":p,e.screen=n?"screen":p,e.overlay=n?"overlay":p,e.darken=n?"darken":p,e.lighten=n?"lighten":p,e["color-dodge"]=n?"color-dodge":p,e["color-burn"]=n?"color-burn":p,e["hard-light"]=n?"hard-light":p,e["soft-light"]=n?"soft-light":p,e.difference=n?"difference":p,e.exclusion=n?"exclusion":p,e.saturation=n?"saturation":p,e.color=n?"color":p,e.luminosity=n?"luminosity":p,e["linear-burn"]=n?"color-burn":p,e["linear-dodge"]=n?"color-dodge":p,e["linear-light"]=n?"hard-light":p,e["pin-light"]=n?"hard-light":p,e["vivid-light"]=n?"hard-light":p,e["hard-mix"]=p,e.negation=n?"difference":p,e["normal-npm"]=e.normal,e["add-npm"]=e.add,e["screen-npm"]=e.screen,e.erase="destination-out",e.subtract=p,e.divide=p,e.min=p,e.max=p,e}const lt=new A;class Ie{constructor(e){this.activeResolution=1,this.smoothProperty="imageSmoothingEnabled",this.blendModes=ct(),this._activeBlendMode="normal",this._projTransform=null,this._outerBlend=!1,this._warnedBlendModes=new Set,this._renderer=e}resolutionChange(e){this.activeResolution=e}init(){const e=this._renderer.background.alpha<1;if(this.rootContext=this._renderer.canvas.getContext("2d",{alpha:e}),this.activeContext=this.rootContext,this.activeResolution=this._renderer.resolution,!this.rootContext.imageSmoothingEnabled){const t=this.rootContext;t.webkitImageSmoothingEnabled?this.smoothProperty="webkitImageSmoothingEnabled":t.mozImageSmoothingEnabled?this.smoothProperty="mozImageSmoothingEnabled":t.oImageSmoothingEnabled?this.smoothProperty="oImageSmoothingEnabled":t.msImageSmoothingEnabled&&(this.smoothProperty="msImageSmoothingEnabled")}}setContextTransform(e,t,a,s){const o=s?A.IDENTITY:this._renderer.globalUniforms.globalUniformData?.worldTransformMatrix||A.IDENTITY;let r=lt;r.copyFrom(o),r.append(e);const l=this._projTransform,i=this.activeResolution;if(a=a||i,l){const d=A.shared;d.copyFrom(r),d.prepend(l),r=d}t?this.activeContext.setTransform(r.a*a,r.b*a,r.c*a,r.d*a,r.tx*i|0,r.ty*i|0):this.activeContext.setTransform(r.a*a,r.b*a,r.c*a,r.d*a,r.tx*i,r.ty*i)}clear(e,t){const a=this.activeContext,s=this._renderer;if(a.clearRect(0,0,s.width,s.height),e){const o=be.shared.setValue(e);a.globalAlpha=t??o.alpha,a.fillStyle=o.toHex(),a.fillRect(0,0,s.width,s.height),a.globalAlpha=1}}setBlendMode(e){if(this._activeBlendMode===e)return;this._activeBlendMode=e,this._outerBlend=!1;const t=this.blendModes[e];if(!t){this._warnedBlendModes.has(e)||(console.warn(`CanvasRenderer: blend mode "${e}" is not supported in Canvas2D; falling back to "source-over".`),this._warnedBlendModes.add(e)),this.activeContext.globalCompositeOperation="source-over";return}this.activeContext.globalCompositeOperation=t}destroy(){this.rootContext=null,this.activeContext=null,this._warnedBlendModes.clear()}}Ie.extension={type:[_.CanvasSystem],name:"canvasContext"};class Be{constructor(){this.maxTextures=16,this.maxBatchableTextures=16,this.maxUniformBindings=0}init(){}}Be.extension={type:[_.CanvasSystem],name:"limits"};const ht="#808080",z=new A,dt=new A,pt=new A,le=new A;function ut(n,e,t){n.beginPath();for(let a=0;a<t.length;a+=3){const s=t[a]*2,o=t[a+1]*2,r=t[a+2]*2;n.moveTo(e[s],e[s+1]),n.lineTo(e[o],e[o+1]),n.lineTo(e[r],e[r+1]),n.closePath()}n.fill()}function mt(n){return`#${(n&16777215).toString(16).padStart(6,"0")}`}function ft(n,e,t,a,s,o){o=Math.max(0,Math.min(o,Math.min(a,s)/2)),n.moveTo(e+o,t),n.lineTo(e+a-o,t),n.quadraticCurveTo(e+a,t,e+a,t+o),n.lineTo(e+a,t+s-o),n.quadraticCurveTo(e+a,t+s,e+a-o,t+s),n.lineTo(e+o,t+s),n.quadraticCurveTo(e,t+s,e,t+s-o),n.lineTo(e,t+o),n.quadraticCurveTo(e,t,e+o,t)}function ee(n,e){switch(e.type){case"rectangle":{const t=e;n.rect(t.x,t.y,t.width,t.height);break}case"roundedRectangle":{const t=e;ft(n,t.x,t.y,t.width,t.height,t.radius);break}case"circle":{const t=e;n.arc(t.x,t.y,t.radius,0,Math.PI*2);break}case"ellipse":{const t=e;n.ellipse?n.ellipse(t.x,t.y,t.halfWidth,t.halfHeight,0,0,Math.PI*2):(n.save(),n.translate(t.x,t.y),n.scale(t.halfWidth,t.halfHeight),n.arc(0,0,1,0,Math.PI*2),n.restore());break}case"triangle":{const t=e;n.moveTo(t.x,t.y),n.lineTo(t.x2,t.y2),n.lineTo(t.x3,t.y3),n.closePath();break}default:{const t=e,a=t.points;if(!a?.length)break;n.moveTo(a[0],a[1]);for(let s=2;s<a.length;s+=2)n.lineTo(a[s],a[s+1]);t.closePath&&n.closePath();break}}}function gt(n,e){if(!e?.length)return!1;for(let t=0;t<e.length;t++){const a=e[t];if(!a?.shape)continue;const s=a.transform,o=s&&!s.isIdentity();o&&(n.save(),n.transform(s.a,s.b,s.c,s.d,s.tx,s.ty)),ee(n,a.shape),o&&n.restore()}return!0}function vt(n,e,t,a){const s=n.fill;if(s instanceof Ye){s.buildGradient();const r=s.texture;if(r){const l=C.getTintedPattern(r,e),i=t?le.copyFrom(t).scale(r.source.pixelWidth,r.source.pixelHeight):le.copyFrom(s.transform);return a&&!n.textureSpace&&i.append(a),C.applyPatternTransform(l,i),l}}if(s instanceof Ve){const r=C.getTintedPattern(s.texture,e);return C.applyPatternTransform(r,s.transform,!1),r}const o=n.texture;if(o&&o!==_e.WHITE){if(!o.source.resource)return ht;const r=C.getTintedPattern(o,e),l=t?le.copyFrom(t).scale(o.source.pixelWidth,o.source.pixelHeight):n.matrix;return C.applyPatternTransform(r,l),r}return mt(e)}class Ae{constructor(){this.shader=null}contextChange(e){}execute(e,t){const a=e.renderer,s=a.canvasContext,o=s.activeContext,r=t.groupTransform,l=a.globalUniforms.globalUniformData?.worldColor??4294967295,i=t.groupColorAlpha,d=(l>>>24&255)/255,h=(i>>>24&255)/255,v=a.filter?.alphaMultiplier??1,y=d*h*v;if(y<=0)return;const H=l&16777215,W=i&16777215,F=Te(Z(W,H)),S=a._roundPixels|t._roundPixels;o.save(),s.setContextTransform(r,S===1),s.setBlendMode(t.groupBlendMode);const G=t.context.instructions;for(let P=0;P<G.length;P++){const g=G[P];if(g.action==="texture"){const u=g.data,m=u.image,f=m?C.getCanvasSource(m):null;if(!f)continue;const D=u.alpha*y;if(D<=0)continue;const j=Z(u.style,F);o.globalAlpha=D;let b=f;j!==16777215&&(b=C.getTintedCanvas({texture:m},j));const E=m.frame,x=m.source._resolution??m.source.resolution??1;let w=E.x*x,R=E.y*x;const $=E.width*x,U=E.height*x;b!==f&&(w=0,R=0);const B=u.transform,T=B&&!B.isIdentity(),c=m.rotate;T||c?(z.copyFrom(r),T&&z.append(B),c&&Ce.matrixAppendRotationInv(z,c,u.dx,u.dy,u.dw,u.dh),s.setContextTransform(z,S===1)):s.setContextTransform(r,S===1),o.drawImage(b,w,R,b===f?$:b.width,b===f?U:b.height,c?0:u.dx,c?0:u.dy,u.dw,u.dh),(T||c)&&s.setContextTransform(r,S===1);continue}const M=g.data,K=M?.path?.shapePath;if(!K?.shapePrimitives?.length)continue;const k=M.style,q=Z(k.color,F),I=k.alpha*y;if(I<=0)continue;const V=g.action==="stroke";if(o.globalAlpha=I,V){const u=k;o.lineWidth=u.width,o.lineCap=u.cap,o.lineJoin=u.join,o.miterLimit=u.miterLimit}const O=K.shapePrimitives;if(!V&&M.hole?.shapePath?.shapePrimitives?.length){const u=O[O.length-1];u.holes=M.hole.shapePath.shapePrimitives}for(let u=0;u<O.length;u++){const m=O[u];if(!m?.shape)continue;const f=m.transform,D=f&&!f.isIdentity(),j=k.texture&&k.texture!==_e.WHITE,b=k.textureSpace==="global"?f:null,E=j?Ne(dt,k,m.shape,b):null,x=D?pt.copyFrom(r).append(f):r,w=vt(k,q,E,x);if(D&&(o.save(),o.transform(f.a,f.b,f.c,f.d,f.tx,f.ty)),V){const R=k;if(R.alignment!==.5&&!R.pixelLine){const U=[],B=[],T=[];if(Pe[m.shape.type]?.build(m.shape,U)){const se=m.shape.closePath??!0;ke(U,R,!1,se,B,T),o.fillStyle=w,ut(o,B,T)}else o.strokeStyle=w,o.beginPath(),ee(o,m.shape),o.stroke()}else o.strokeStyle=w,o.beginPath(),ee(o,m.shape),o.stroke()}else o.fillStyle=w,o.beginPath(),ee(o,m.shape),gt(o,m.holes)?o.fill("evenodd"):o.fill();D&&o.restore()}}o.restore()}destroy(){this.shader=null}}Ae.extension={type:[_.CanvasPipesAdaptor],name:"graphics"};class yt{init(e,t){this._renderer=e,this._renderTargetSystem=t}initGpuRenderTarget(e){const t=e.colorTexture,{canvas:a,context:s}=this._ensureCanvas(t);return{canvas:a,context:s,width:a.width,height:a.height}}resizeGpuRenderTarget(e){const t=e.colorTexture,{canvas:a}=this._ensureCanvas(t);a.width=e.pixelWidth,a.height=e.pixelHeight}startRenderPass(e,t,a,s){const o=this._renderTargetSystem.getGpuRenderTarget(e);this._renderer.canvasContext.activeContext=o.context,this._renderer.canvasContext.activeResolution=e.resolution,t&&this.clear(e,t,a,s)}clear(e,t,a,s){const r=this._renderTargetSystem.getGpuRenderTarget(e).context,l=s||{x:0,y:0,width:e.pixelWidth,height:e.pixelHeight};if(r.setTransform(1,0,0,1,0,0),r.clearRect(l.x,l.y,l.width,l.height),a){const i=be.shared.setValue(a);i.alpha>0&&(r.globalAlpha=i.alpha,r.fillStyle=i.toHex(),r.fillRect(l.x,l.y,l.width,l.height),r.globalAlpha=1)}}finishRenderPass(){}copyToTexture(e,t,a,s,o){const l=this._renderTargetSystem.getGpuRenderTarget(e).canvas,i=t.source,{context:d}=this._ensureCanvas(i),h=o?.x??0,v=o?.y??0;return d.drawImage(l,a.x,a.y,s.width,s.height,h,v,s.width,s.height),i.update(),t}destroyGpuRenderTarget(e){}_ensureCanvas(e){let t=e.resource;(!t||!$e.test(t))&&(t=Se.get().createCanvas(e.pixelWidth,e.pixelHeight),e.resource=t),(t.width!==e.pixelWidth||t.height!==e.pixelHeight)&&(t.width=e.pixelWidth,t.height=e.pixelHeight);const a=t.getContext("2d");return{canvas:t,context:a}}}class He extends Ke{constructor(e){super(e),this.adaptor=new yt,this.adaptor.init(e,this)}}He.extension={type:[_.CanvasSystem],name:"renderTarget"};class Ge{constructor(e){}init(){}initSource(e){}generateCanvas(e){const t=Se.get().createCanvas(),a=t.getContext("2d"),s=C.getCanvasSource(e);if(!s)return t;const o=e.frame,r=e.source._resolution??e.source.resolution??1,l=o.x*r,i=o.y*r,d=o.width*r,h=o.height*r;return t.width=Math.ceil(d),t.height=Math.ceil(h),a.drawImage(s,l,i,d,h,0,0,d,h),t}getPixels(e){const t=this.generateCanvas(e);return{pixels:t.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,t.width,t.height).data,width:t.width,height:t.height}}destroy(){}}Ge.extension={type:[_.CanvasSystem],name:"texture"};const xt=[...Qe,Ie,Be,Ge,He],Ct=[ze,Ze,et,tt,st,Re,Me,nt],Tt=[at,Ae],De=[],Ee=[],We=[];te.handleByNamedList(_.CanvasSystem,De);te.handleByNamedList(_.CanvasPipes,Ee);te.handleByNamedList(_.CanvasPipesAdaptor,We);te.add(...xt,...Ct,...Tt);class Gt extends Xe{constructor(){const e={name:"canvas",type:Je.CANVAS,systems:De,renderPipes:Ee,renderPipeAdaptors:We};super(e)}}export{Gt as CanvasRenderer};
@@ -1 +1 @@
1
- import"./vendor-echarts-wordcloud-k5ih2Jl4.js";import{p as L,w as r,d as W,F,G as D,P as I,a0 as T,h as S,b as j}from"./vendor-reka-ui-CzM4kDQ7.js";import{u as A,i as G,j as P,k as U}from"./vendor-echarts-hJVnODyU.js";import"./vendor-zrender-5DcYjSZk.js";const N=L({__name:"EChartWordcloud",props:{data:{},height:{default:400},loading:{type:Boolean,default:!1},maxWords:{default:100},colorScheme:{default:"default"},sizeScale:{default:1},drawOutOfBound:{type:Boolean,default:!1},shape:{default:"circle"}},emits:["wordClick"],setup(M,{expose:x,emit:y}){A([G,P]);const e=M,v=y,c=j();let n=null;const C=S(()=>typeof e.height=="number"?`${e.height}px`:e.height),p=S(()=>document.documentElement.classList.contains("dark")),k={default:["#6366f1","#8b5cf6","#ec4899","#f43f5e","#f97316","#22c55e","#14b8a6","#3b82f6"],warm:["#f97316","#fb923c","#fbbf24","#facc15","#f59e0b","#ea580c","#dc2626","#ef4444"],cool:["#3b82f6","#6366f1","#8b5cf6","#a855f7","#14b8a6","#06b6d4","#0ea5e9","#0284c7"],rainbow:["#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#8b5cf6","#ec4899"]},b=()=>{const t=e.data.words.slice(0,e.maxWords);if(t.length===0)return null;const a=Math.max(...t.map(o=>o.count)),g=Math.min(...t.map(o=>o.count)),O=a-g||1,w=k[e.colorScheme],B=14,R=56,f=Math.round(B*e.sizeScale),z=Math.round(R*e.sizeScale),_=z-f,E=t.map((o,i)=>{const h=(o.count-g)/O,m=Math.round(f+h*_),$=w[i%w.length];return{name:o.word,value:o.count,textStyle:{fontSize:m,color:$}}});return{backgroundColor:"transparent",tooltip:{show:!0,formatter:o=>{const i=t.find(m=>m.word===o.name),h=i?.percentage?` (${i.percentage}%)`:"";return`${o.name}: ${o.value}次${h}`},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"}},series:[{type:"wordCloud",shape:e.shape==="rectangle"?o=>1/Math.max(Math.abs(Math.cos(o)),Math.abs(Math.sin(o))):e.shape,left:0,top:0,right:0,bottom:0,width:"100%",height:"100%",gridSize:Math.max(2,Math.round(4*e.sizeScale)),sizeRange:[f,z],rotationRange:[-45,45],rotationStep:15,drawOutOfBound:e.drawOutOfBound,layoutAnimation:!0,textStyle:{fontFamily:"sans-serif",fontWeight:"bold"},emphasis:{focus:"self",textStyle:{shadowBlur:10,shadowColor:p.value?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.3)"}},data:E}]}};function s(){if(!c.value)return;n&&n.dispose(),n=U(c.value);const t=b();t&&n.setOption(t),n.on("click",a=>{a.componentType==="series"&&a.seriesType==="wordCloud"&&v("wordClick",a.name,a.value)})}function l(){if(!n){s();return}const t=b();t&&n.setOption(t,{notMerge:!0})}function u(){n?.resize()}r(()=>e.data,l,{deep:!0}),r(()=>e.colorScheme,l),r(()=>e.sizeScale,l),r(p,()=>{s()}),r(()=>e.loading,t=>{t?n?.showLoading("default",{text:"",spinnerRadius:12,lineWidth:2}):n?.hideLoading()});let d=null;return W(()=>{s(),window.addEventListener("resize",u),d=new MutationObserver(()=>{s()}),d.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),F(()=>{window.removeEventListener("resize",u),d?.disconnect(),n?.dispose(),n=null}),x({getInstance:()=>n,resize:u}),(t,a)=>(D(),I("div",{ref_key:"chartRef",ref:c,style:T({height:C.value,width:"100%"})},null,4))}});export{N as default};
1
+ import"./vendor-echarts-wordcloud-Ca8n6qS6.js";import{p as L,w as r,d as W,F,G as D,P as I,a0 as T,h as S,b as j}from"./vendor-reka-ui-Cta6JPvN.js";import{u as A,i as G,j as P,k as U}from"./vendor-echarts-B-i_56Av.js";import"./vendor-zrender-5DcYjSZk.js";const N=L({__name:"EChartWordcloud",props:{data:{},height:{default:400},loading:{type:Boolean,default:!1},maxWords:{default:100},colorScheme:{default:"default"},sizeScale:{default:1},drawOutOfBound:{type:Boolean,default:!1},shape:{default:"circle"}},emits:["wordClick"],setup(M,{expose:x,emit:y}){A([G,P]);const e=M,v=y,c=j();let n=null;const C=S(()=>typeof e.height=="number"?`${e.height}px`:e.height),p=S(()=>document.documentElement.classList.contains("dark")),k={default:["#6366f1","#8b5cf6","#ec4899","#f43f5e","#f97316","#22c55e","#14b8a6","#3b82f6"],warm:["#f97316","#fb923c","#fbbf24","#facc15","#f59e0b","#ea580c","#dc2626","#ef4444"],cool:["#3b82f6","#6366f1","#8b5cf6","#a855f7","#14b8a6","#06b6d4","#0ea5e9","#0284c7"],rainbow:["#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#8b5cf6","#ec4899"]},b=()=>{const t=e.data.words.slice(0,e.maxWords);if(t.length===0)return null;const a=Math.max(...t.map(o=>o.count)),g=Math.min(...t.map(o=>o.count)),O=a-g||1,w=k[e.colorScheme],B=14,R=56,f=Math.round(B*e.sizeScale),z=Math.round(R*e.sizeScale),_=z-f,E=t.map((o,i)=>{const h=(o.count-g)/O,m=Math.round(f+h*_),$=w[i%w.length];return{name:o.word,value:o.count,textStyle:{fontSize:m,color:$}}});return{backgroundColor:"transparent",tooltip:{show:!0,formatter:o=>{const i=t.find(m=>m.word===o.name),h=i?.percentage?` (${i.percentage}%)`:"";return`${o.name}: ${o.value}次${h}`},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"}},series:[{type:"wordCloud",shape:e.shape==="rectangle"?o=>1/Math.max(Math.abs(Math.cos(o)),Math.abs(Math.sin(o))):e.shape,left:0,top:0,right:0,bottom:0,width:"100%",height:"100%",gridSize:Math.max(2,Math.round(4*e.sizeScale)),sizeRange:[f,z],rotationRange:[-45,45],rotationStep:15,drawOutOfBound:e.drawOutOfBound,layoutAnimation:!0,textStyle:{fontFamily:"sans-serif",fontWeight:"bold"},emphasis:{focus:"self",textStyle:{shadowBlur:10,shadowColor:p.value?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.3)"}},data:E}]}};function s(){if(!c.value)return;n&&n.dispose(),n=U(c.value);const t=b();t&&n.setOption(t),n.on("click",a=>{a.componentType==="series"&&a.seriesType==="wordCloud"&&v("wordClick",a.name,a.value)})}function l(){if(!n){s();return}const t=b();t&&n.setOption(t,{notMerge:!0})}function u(){n?.resize()}r(()=>e.data,l,{deep:!0}),r(()=>e.colorScheme,l),r(()=>e.sizeScale,l),r(p,()=>{s()}),r(()=>e.loading,t=>{t?n?.showLoading("default",{text:"",spinnerRadius:12,lineWidth:2}):n?.hideLoading()});let d=null;return W(()=>{s(),window.addEventListener("resize",u),d=new MutationObserver(()=>{s()}),d.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),F(()=>{window.removeEventListener("resize",u),d?.disconnect(),n?.dispose(),n=null}),x({getInstance:()=>n,resize:u}),(t,a)=>(D(),I("div",{ref_key:"chartRef",ref:c,style:T({height:C.value,width:"100%"})},null,4))}});export{N as default};
@@ -1 +1 @@
1
- import{S as n,a as u,G as o,b as f}from"./RelationshipGalaxyCanvas-CORMD7vL.js";const s=class i extends n{constructor(e){e={...i.defaultOptions,...e},super(e),this.enabled=!0,this._state=u.for2d(),this.blendMode=e.blendMode,this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.clipToViewport=e.clipToViewport,this.addResource("uTexture",0,1),e.blendRequired&&this.addResource("uBackTexture",0,3)}apply(e,t,a,r){e.applyFilter(this,t,a,r)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:t,gl:a,...r}=e;let l,d;return t&&(l=o.from(t)),a&&(d=f.from(a)),new i({gpuProgram:l,glProgram:d,...r})}};s.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let b=s;export{b as F};
1
+ import{S as n,a as u,G as o,b as f}from"./RelationshipGalaxyCanvas-Dwdy5flh.js";const s=class i extends n{constructor(e){e={...i.defaultOptions,...e},super(e),this.enabled=!0,this._state=u.for2d(),this.blendMode=e.blendMode,this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.clipToViewport=e.clipToViewport,this.addResource("uTexture",0,1),e.blendRequired&&this.addResource("uBackTexture",0,3)}apply(e,t,a,r){e.applyFilter(this,t,a,r)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:t,gl:a,...r}=e;let l,d;return t&&(l=o.from(t)),a&&(d=f.from(a)),new i({gpuProgram:l,glProgram:d,...r})}};s.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let b=s;export{b as F};
@@ -1 +1 @@
1
- import{_ as c}from"./vendor-nuxt-ui-DaLxYaC4.js";import{p as i,P as s,Q as l,a5 as m,L as p,T as u,U as d,h as f,G as n}from"./vendor-reka-ui-CzM4kDQ7.js";const h={class:"flex flex-col items-center justify-center text-center"},x={key:0,class:"mt-2 text-sm text-gray-500"},y=i({__name:"LoadingState",props:{text:{},height:{},variant:{default:"inline"}},setup(t){const a=t,r=f(()=>{const e="flex items-center justify-center";switch(a.variant){case"page":return`${e} h-full w-full`;case"overlay":return`${e} absolute inset-0 z-10 bg-white/50 backdrop-blur-sm dark:bg-page-dark/50`;default:return`${e} ${a.height||"py-8"}`}});return(e,_)=>{const o=c;return n(),s("div",{class:l(r.value)},[m("div",h,[p(o,{name:"i-heroicons-arrow-path",class:"h-6 w-6 animate-spin text-pink-500"}),t.text?(n(),s("p",x,u(t.text),1)):d("",!0)])],2)}}});export{y as _};
1
+ import{_ as c}from"./vendor-nuxt-ui-CS1uxE9C.js";import{p as i,P as s,Q as l,a5 as m,L as p,T as u,U as d,h as f,G as n}from"./vendor-reka-ui-Cta6JPvN.js";const h={class:"flex flex-col items-center justify-center text-center"},x={key:0,class:"mt-2 text-sm text-gray-500"},y=i({__name:"LoadingState",props:{text:{},height:{},variant:{default:"inline"}},setup(t){const a=t,r=f(()=>{const e="flex items-center justify-center";switch(a.variant){case"page":return`${e} h-full w-full`;case"overlay":return`${e} absolute inset-0 z-10 bg-white/50 backdrop-blur-sm dark:bg-page-dark/50`;default:return`${e} ${a.height||"py-8"}`}});return(e,_)=>{const o=c;return n(),s("div",{class:l(r.value)},[m("div",h,[p(o,{name:"i-heroicons-arrow-path",class:"h-6 w-6 animate-spin text-pink-500"}),t.text?(n(),s("p",x,u(t.text),1)):d("",!0)])],2)}}});export{y as _};
@@ -0,0 +1 @@
1
+ import{d as O,g as A}from"./vendor-nuxt-ui-CS1uxE9C.js";import{u as j,T as I,n as G,o as H,q as P}from"./index-YADL4XIp.js";import{p as z,J as U,w as F,G as T,P as M,a5 as a,T as p,u as k,L as v,bx as $,by as D,U as L,h as C,b as g,H as J,K as E,a0 as K,R as B,bp as Y}from"./vendor-reka-ui-Cta6JPvN.js";import"./vendor-snapdom-XnBoh1gd.js";const q={class:"space-y-4 p-4"},W={class:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300"},X={key:0,class:"mt-2 flex items-center gap-2"},Q={class:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300"},Z=z({__name:"ConditionPanel",props:{timeRange:{default:null},timeRangeModifiers:{},exportFormat:{default:"txt"},exportFormatModifiers:{}},emits:["update:timeRange","update:exportFormat"],setup(w){const{t:x}=j(),d=U(w,"timeRange"),h=U(w,"exportFormat"),i=C(()=>[{label:"TXT",value:"txt"},{label:"ChatLab JSON",value:"json"},{label:"Markdown",value:"markdown"}]),u=g("all"),c=g(""),l=g(""),b=[{id:"all",label:"analysis.filter.allTime"},{id:"today",label:"analysis.filter.today"},{id:"week",label:"analysis.filter.lastWeek"},{id:"month",label:"analysis.filter.lastMonth"},{id:"3months",label:"analysis.filter.last3Months"},{id:"year",label:"analysis.filter.lastYear"},{id:"custom",label:"analysis.filter.customTime"}],f=C(()=>b.map(e=>({label:x(e.label),value:e.id})));F(u,()=>{m()});function m(){const e=Math.floor(Date.now()/1e3),t=new Date;t.setHours(0,0,0,0);const n=Math.floor(t.getTime()/1e3);switch(u.value){case"all":d.value=null;break;case"today":d.value={start:n,end:e};break;case"week":d.value={start:e-10080*60,end:e};break;case"month":d.value={start:e-720*60*60,end:e};break;case"3months":d.value={start:e-2160*60*60,end:e};break;case"year":d.value={start:e-365*24*60*60,end:e};break;case"custom":if(c.value&&l.value){const _=new Date(c.value).getTime()/1e3,R=new Date(l.value).getTime()/1e3+86399;d.value={start:_,end:R}}break}}return(e,t)=>(T(),M("div",q,[a("div",null,[a("label",W,p(k(x)("analysis.filter.timeRange")),1),v(I,{modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=n=>u.value=n),items:f.value,size:"sm"},null,8,["modelValue","items"]),u.value==="custom"?(T(),M("div",X,[$(a("input",{"onUpdate:modelValue":t[1]||(t[1]=n=>c.value=n),type:"date",class:"flex-1 rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm dark:border-gray-600 dark:bg-gray-800",onChange:m},null,544),[[D,c.value]]),t[4]||(t[4]=a("span",{class:"text-gray-500"},"~",-1)),$(a("input",{"onUpdate:modelValue":t[2]||(t[2]=n=>l.value=n),type:"date",class:"flex-1 rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm dark:border-gray-600 dark:bg-gray-800",onChange:m},null,544),[[D,l.value]])])):L("",!0)]),a("div",null,[a("label",Q,p(k(x)("analysis.messageExport.format")),1),v(I,{modelValue:h.value,"onUpdate:modelValue":t[3]||(t[3]=n=>h.value=n),items:i.value,size:"sm"},null,8,["modelValue","items"])])]))}}),ee={class:"flex flex-col overflow-hidden bg-white dark:bg-page-dark"},te={class:"flex items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},ae={class:"text-lg font-semibold text-gray-900 dark:text-white"},se={class:"flex flex-col gap-3 border-t border-gray-200 px-5 py-4 dark:border-gray-700"},oe={key:0,class:"w-full"},le={class:"mb-1 flex items-center justify-between text-sm text-gray-600 dark:text-gray-400"},ne={class:"h-2 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700"},re={class:"flex items-center justify-end gap-3"},N="chatlab-export-format",ce=z({__name:"MessageExportModal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(w,{emit:x}){const d=w,h=x,{t:i}=j(),u=G(),c=H(),l=C({get:()=>d.modelValue,set:s=>h("update:modelValue",s)}),b=g(null),f=g(localStorage.getItem(N)||"txt");F(f,s=>localStorage.setItem(N,s));const m=g(!1),e=g(null);let t=null;function n(){t=P().onExportProgress(s=>{e.value={percentage:s.percentage,message:s.message},(s.stage==="done"||s.stage==="error")&&(e.value=null)})}function _(){t&&(t(),t=null),e.value=null}async function R(){const s=c.currentSessionId;if(!s)return;const y=c.currentSession?.name||"unknown";let S="";m.value=!0,e.value={percentage:0,message:i("analysis.filter.exportPreparing")},n();try{const o=Y(b.value),V=await P().exportFilterResultToFile({sessionId:s,sessionName:y,outputDir:S,format:f.value,timeFilter:o?{startTs:o.start,endTs:o.end}:void 0});V.success?(u.success(i("analysis.filter.exportSuccess"),{description:V.filePath}),l.value=!1):u.fail(i("analysis.filter.exportFailed"),{description:V.error||i("common.error.unknown")})}catch(o){console.error("Export failed:",o),u.fail(i("analysis.filter.exportFailed"),{description:String(o)})}finally{_(),m.value=!1}}return F(l,s=>{s||_()}),(s,r)=>{const y=O,S=A;return T(),J(S,{open:l.value,"onUpdate:open":r[4]||(r[4]=o=>l.value=o),ui:{content:"sm:max-w-md"}},{content:E(()=>[a("div",ee,[a("div",te,[a("h2",ae,p(k(i)("analysis.messageExport.title")),1),v(y,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:r[0]||(r[0]=o=>l.value=!1)})]),v(Z,{"time-range":b.value,"onUpdate:timeRange":r[1]||(r[1]=o=>b.value=o),"export-format":f.value,"onUpdate:exportFormat":r[2]||(r[2]=o=>f.value=o)},null,8,["time-range","export-format"]),a("div",se,[m.value&&e.value?(T(),M("div",oe,[a("div",le,[a("span",null,p(e.value.message),1),a("span",null,p(e.value.percentage)+"%",1)]),a("div",ne,[a("div",{class:"h-full bg-primary-500 transition-all duration-300",style:K({width:`${e.value.percentage}%`})},null,4)])])):L("",!0),a("div",re,[v(y,{variant:"ghost",onClick:r[3]||(r[3]=o=>l.value=!1)},{default:E(()=>[B(p(k(i)("common.cancel")),1)]),_:1}),v(y,{color:"primary",icon:"i-heroicons-document-arrow-down",loading:m.value,disabled:m.value,onClick:R},{default:E(()=>[B(p(k(i)("common.export")),1)]),_:1},8,["loading","disabled"])])])])]),_:1},8,["open"])}}});export{ce as default};
@@ -0,0 +1 @@
1
+ import{_ as p}from"./vendor-nuxt-ui-CS1uxE9C.js";import{p as u,P as i,Q as a,a5 as s,L as f,U as n,T as l,O as d,G as r}from"./vendor-reka-ui-Cta6JPvN.js";import{m as x}from"./index-YADL4XIp.js";const v={class:"flex items-center justify-between"},g=["src","alt"],y={class:"group/title flex items-baseline gap-2"},b={class:"header-actions relative z-[40] flex items-center gap-2"},h=u({__name:"PageHeader",props:{title:{},description:{},icon:{},iconClass:{},avatar:{},size:{default:"default"},bordered:{type:Boolean,default:!0}},setup(e){const t=e;return(c,o)=>{const m=p;return r(),i("div",{class:a(["relative px-6",[t.bordered?"border-b border-gray-200/50 dark:border-gray-800/50":"",t.size==="compact"?"pb-1.5":"pb-2"]])},[o[1]||(o[1]=s("div",{class:"titlebar-drag-cover"},null,-1)),s("div",v,[s("div",{class:a(["flex items-center",t.size==="compact"?"gap-2.5":"gap-3"])},[e.avatar?(r(),i("img",{key:0,src:e.avatar,alt:e.title,class:a(["object-cover",t.size==="compact"?"h-6 w-6 rounded-md":"h-10 w-10 rounded-xl"])},null,10,g)):e.icon?(r(),i("div",{key:1,class:a(["flex items-center justify-center",[e.iconClass,t.size==="compact"?"h-6 w-6 rounded-md":"h-10 w-10 rounded-xl"]])},[f(m,{name:e.icon,class:a(["text-white",t.size==="compact"?"h-3 w-3":"h-5 w-5"])},null,8,["name","class"])],2)):n("",!0),s("div",y,[s("h1",{class:a(["font-semibold text-gray-900 dark:text-white",t.size==="compact"?"text-base":"text-lg"])},l(e.title),3),e.description?(r(),i("p",{key:0,class:a(["pointer-events-none whitespace-nowrap text-gray-500 opacity-0 transition-opacity duration-200 group-hover/title:opacity-100 dark:text-gray-400",t.size==="compact"?"text-[11px]":"text-xs"])},l(e.description),3)):n("",!0)])],2),o[0]||(o[0]=s("div",{class:"flex-1 self-stretch mx-4",style:{"-webkit-app-region":"drag"}},null,-1)),s("div",b,[d(c.$slots,"actions",{},void 0,!0)])]),d(c.$slots,"default",{},void 0,!0)],2)}}}),C=x(h,[["__scopeId","data-v-e4defd45"]]);export{C as P};
@@ -0,0 +1 @@
1
+ .titlebar-drag-cover[data-v-e4defd45]{position:absolute;left:0;right:0;z-index:30;top:calc(-1 * var(--titlebar-area-height));height:calc(var(--titlebar-area-height) + 1rem);-webkit-app-region:drag}.header-actions[data-v-e4defd45]{-webkit-app-region:drag}.header-actions[data-v-e4defd45] button,.header-actions[data-v-e4defd45] button *,.header-actions[data-v-e4defd45] a,.header-actions[data-v-e4defd45] a *,.header-actions[data-v-e4defd45] [role=button],.header-actions[data-v-e4defd45] [role=button] *{-webkit-app-region:no-drag}