shaders 2.2.12 → 2.2.15

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 (126) hide show
  1. package/dist/core/{AngularBlur-BTUdXC0g.js → AngularBlur-ClvtyURQ.js} +12 -13
  2. package/dist/core/{Ascii-Bu8ii7oo.js → Ascii-BT0-K_vw.js} +28 -29
  3. package/dist/core/{Blob-C0G0efjG.js → Blob-BlQ_1T_8.js} +12 -13
  4. package/dist/core/{Blur-BzUO9yxF.js → Blur-421AjWLH.js} +8 -9
  5. package/dist/core/{Bulge-BCXYAzig.js → Bulge-CZRVoR6C.js} +6 -7
  6. package/dist/core/{CRTScreen-cJ3XHrI9.js → CRTScreen-C_U9g_IR.js} +8 -9
  7. package/dist/core/{ChannelBlur-BEK1qzGn.js → ChannelBlur-5pzcB6Zv.js} +4 -5
  8. package/dist/core/{Checkerboard-BPkiSF5I.js → Checkerboard-CrQkqXhD.js} +10 -11
  9. package/dist/core/{ChromaFlow-AHO3C4o3.js → ChromaFlow-CNrQdL8f.js} +16 -17
  10. package/dist/core/{ChromaticAberration-nVg3r1FK.js → ChromaticAberration-D9H7O17Y.js} +6 -7
  11. package/dist/core/{Circle-C8ltF4BZ.js → Circle-DnLaDn8V.js} +7 -8
  12. package/dist/core/{CursorTrail-BeJGeovB.js → CursorTrail-NY6n97VG.js} +19 -20
  13. package/dist/core/{DiffuseBlur-Dq_vFrB1.js → DiffuseBlur-C_n01ABk.js} +11 -12
  14. package/dist/core/{Dither-CpN3vGSh.js → Dither-4s-c4zh4.js} +6 -7
  15. package/dist/core/{DotGrid-BFUzeSQw.js → DotGrid-BYl8XdMi.js} +9 -10
  16. package/dist/core/{Duotone-_nR_o3-g.js → Duotone-DbewOoB4.js} +12 -13
  17. package/dist/core/{FilmGrain-BAKXXtLg.js → FilmGrain-zA_-knOw.js} +7 -8
  18. package/dist/core/{FloatingParticles-Fv8JIzKk.js → FloatingParticles-BhVnqMsE.js} +22 -23
  19. package/dist/core/{GlassTiles-5MyBj1ff.js → GlassTiles-CFI57glh.js} +7 -8
  20. package/dist/core/{Glow-DvJj7BB7.js → Glow-CQgl3IoS.js} +10 -11
  21. package/dist/core/{Godrays-D3VnYrAm.js → Godrays-BBCtZxbv.js} +18 -19
  22. package/dist/core/{Grayscale-oWIF3PV5.js → Grayscale-CAEFLteL.js} +9 -10
  23. package/dist/core/{Grid-Bov7AA9m.js → Grid-DlM-rVbZ.js} +5 -6
  24. package/dist/core/{GridDistortion-CWYom5Dw.js → GridDistortion-ZOZphSAT.js} +29 -30
  25. package/dist/core/{Group-CPk-7fiA.js → Group-BQAs3RiH.js} +7 -8
  26. package/dist/core/{Halftone-F7fsdu7W.js → Halftone-ci4ga-_J.js} +8 -9
  27. package/dist/core/{HueShift-CiS4hdtk.js → HueShift-CyxzPcJV.js} +11 -12
  28. package/dist/core/{ImageTexture-B3Q29OHX.js → ImageTexture-CdAGsPuH.js} +18 -20
  29. package/dist/core/{Invert-Cyc4JHWc.js → Invert-iPsiIqNZ.js} +7 -8
  30. package/dist/core/{LinearBlur-BTC54qzk.js → LinearBlur-BEaaoIk-.js} +13 -14
  31. package/dist/core/{LinearGradient-LEMeW0KM.js → LinearGradient-DR_7RxLX.js} +10 -11
  32. package/dist/core/{Liquify-D2nzMDzq.js → Liquify-Bi02_ugh.js} +33 -34
  33. package/dist/core/{Pixelate-irPzmtQm.js → Pixelate-CSsdT1rr.js} +4 -5
  34. package/dist/core/{PolarCoordinates-Ck5ZWrQO.js → PolarCoordinates-D626ml58.js} +10 -11
  35. package/dist/core/{Posterize-DICq_t96.js → Posterize-DhZkMaC7.js} +8 -10
  36. package/dist/core/{ProgressiveBlur-BuORe3VH.js → ProgressiveBlur-CGtCfLF8.js} +16 -17
  37. package/dist/core/{RadialGradient-D0cN67jm.js → RadialGradient-C0_WzmbH.js} +13 -14
  38. package/dist/core/{RectangularCoordinates-1LIDaeHR.js → RectangularCoordinates-DfXw7fhI.js} +6 -7
  39. package/dist/core/{Ripples-DH71sFJc.js → Ripples-DkemN3eh.js} +12 -12
  40. package/dist/core/{Saturation-DbSXtSeK.js → Saturation-Dup81Pnq.js} +7 -8
  41. package/dist/core/{SimplexNoise-DPGC2OPJ.js → SimplexNoise-BYEiCjDj.js} +9 -9
  42. package/dist/core/{SineWave-CkWtnzHF.js → SineWave-C6MRPtsy.js} +9 -10
  43. package/dist/core/{SolidColor-DaB-FHNX.js → SolidColor-BZHRczgb.js} +1 -1
  44. package/dist/core/{Spherize-CqjZj4yV.js → Spherize-DOAnDx2l.js} +13 -14
  45. package/dist/core/{Spiral-BRrismPI.js → Spiral-BMjnWXh1.js} +11 -12
  46. package/dist/core/{Strands-DyrV6zDO.js → Strands-BOVsuJLe.js} +14 -15
  47. package/dist/core/{Stretch-DeBlJ-NH.js → Stretch-D6bHc6yp.js} +13 -14
  48. package/dist/core/{Swirl-PxpHzkdC.js → Swirl-BFoc0ImG.js} +14 -15
  49. package/dist/core/{TiltShift-DiArippe.js → TiltShift-BiNvvhzj.js} +14 -15
  50. package/dist/core/{Tritone-KtJgZviA.js → Tritone-gdx2AA0m.js} +9 -10
  51. package/dist/core/{Twirl-C6xj1p52.js → Twirl-BsV8YbqC.js} +8 -9
  52. package/dist/core/{Vibrance-C6lNgpWH.js → Vibrance-C182fbSw.js} +5 -6
  53. package/dist/core/{WaveDistortion-DcXxPZ2w.js → WaveDistortion-CmaS2zDB.js} +12 -13
  54. package/dist/core/{ZoomBlur-_feIVJs6.js → ZoomBlur-DLf5xQ16.js} +10 -11
  55. package/dist/core/colorMixing--dhzx0ch.js +21 -0
  56. package/dist/core/edges-CDzKsauJ.js +15 -0
  57. package/dist/core/index.js +636 -684
  58. package/dist/core/renderer.d.ts.map +1 -1
  59. package/dist/core/shaders/AngularBlur/index.js +3 -3
  60. package/dist/core/shaders/Ascii/index.js +2 -2
  61. package/dist/core/shaders/Blob/index.js +5 -5
  62. package/dist/core/shaders/Blur/index.js +2 -2
  63. package/dist/core/shaders/Bulge/index.js +4 -4
  64. package/dist/core/shaders/CRTScreen/index.js +2 -2
  65. package/dist/core/shaders/ChannelBlur/index.js +2 -2
  66. package/dist/core/shaders/Checkerboard/index.js +4 -4
  67. package/dist/core/shaders/ChromaFlow/index.js +3 -3
  68. package/dist/core/shaders/ChromaticAberration/index.js +3 -3
  69. package/dist/core/shaders/Circle/index.js +3 -3
  70. package/dist/core/shaders/CursorTrail/index.js +4 -4
  71. package/dist/core/shaders/DiffuseBlur/index.js +4 -4
  72. package/dist/core/shaders/Dither/index.js +3 -3
  73. package/dist/core/shaders/DotGrid/index.js +3 -3
  74. package/dist/core/shaders/Duotone/index.js +4 -4
  75. package/dist/core/shaders/FilmGrain/index.js +2 -2
  76. package/dist/core/shaders/FloatingParticles/index.js +3 -3
  77. package/dist/core/shaders/GlassTiles/index.js +2 -2
  78. package/dist/core/shaders/Glow/index.js +2 -2
  79. package/dist/core/shaders/Godrays/index.js +3 -3
  80. package/dist/core/shaders/Grayscale/index.js +2 -2
  81. package/dist/core/shaders/Grid/index.js +3 -3
  82. package/dist/core/shaders/GridDistortion/index.js +4 -4
  83. package/dist/core/shaders/Group/index.js +2 -2
  84. package/dist/core/shaders/Halftone/index.js +3 -3
  85. package/dist/core/shaders/HueShift/index.js +2 -2
  86. package/dist/core/shaders/ImageTexture/index.js +2 -2
  87. package/dist/core/shaders/Invert/index.js +2 -2
  88. package/dist/core/shaders/LinearBlur/index.js +3 -3
  89. package/dist/core/shaders/LinearGradient/index.js +4 -4
  90. package/dist/core/shaders/Liquify/index.js +4 -4
  91. package/dist/core/shaders/Pixelate/index.js +2 -2
  92. package/dist/core/shaders/PolarCoordinates/index.js +4 -4
  93. package/dist/core/shaders/Posterize/index.js +2 -2
  94. package/dist/core/shaders/ProgressiveBlur/index.js +3 -3
  95. package/dist/core/shaders/RadialGradient/index.js +4 -4
  96. package/dist/core/shaders/RectangularCoordinates/index.js +4 -4
  97. package/dist/core/shaders/Ripples/index.d.ts.map +1 -1
  98. package/dist/core/shaders/Ripples/index.js +7 -6
  99. package/dist/core/shaders/Saturation/index.js +2 -2
  100. package/dist/core/shaders/SimplexNoise/index.d.ts.map +1 -1
  101. package/dist/core/shaders/SimplexNoise/index.js +7 -6
  102. package/dist/core/shaders/SineWave/index.js +3 -3
  103. package/dist/core/shaders/SolidColor/index.js +3 -3
  104. package/dist/core/shaders/Spherize/index.js +3 -3
  105. package/dist/core/shaders/Spiral/index.js +4 -4
  106. package/dist/core/shaders/Strands/index.js +4 -4
  107. package/dist/core/shaders/Stretch/index.js +4 -4
  108. package/dist/core/shaders/Swirl/index.js +5 -5
  109. package/dist/core/shaders/TiltShift/index.js +3 -3
  110. package/dist/core/shaders/Tritone/index.js +4 -4
  111. package/dist/core/shaders/Twirl/index.js +4 -4
  112. package/dist/core/shaders/Vibrance/index.js +2 -2
  113. package/dist/core/shaders/WaveDistortion/index.js +4 -4
  114. package/dist/core/shaders/ZoomBlur/index.js +3 -3
  115. package/dist/core/three.tsl-Btj1hLsf.js +43845 -0
  116. package/dist/core/{time-5uQ65blS.js → time-DbRMw6Jm.js} +4 -5
  117. package/dist/core/{transformations-DBjTkQ5b.js → transformations-CsrIJXh-.js} +176 -177
  118. package/dist/core/utilities/colorMixing.d.ts.map +1 -1
  119. package/dist/react/index.cjs +83 -79
  120. package/dist/react/index.js +51221 -50954
  121. package/dist/svelte/index.js +50809 -50542
  122. package/dist/vue/index.js +50619 -50352
  123. package/package.json +1 -1
  124. package/dist/core/colorMixing-DPZ-Td4U.js +0 -22
  125. package/dist/core/edges-B-tVdqcI.js +0 -16
  126. package/dist/core/three.tsl-BqgDcRt9.js +0 -43424
@@ -1,245 +1,219 @@
1
- import { A as G, B as Xn, D as R, E as Me, F as un, H as Yn, I as Ze, J as Hn, K as In, L as Wn, M as N, N as S, P as we, R as jn, S as ge, T as Rn, U as Qn, V as Jn, _ as xe, c as Kn, d as Q, g as en, h as nn, i as Zn, k as me, l as Tn, m as D, n as k, o as et, q as nt, s as tt, t as rt, v as c, w as ot, x as J, z as it } from "./three.tsl-BqgDcRt9.js";
2
- import { n as se, t as be } from "./edges-B-tVdqcI.js";
3
- import { t as io } from "./time-5uQ65blS.js";
4
- import "./transformations-DBjTkQ5b.js";
5
- import { n as at } from "./AngularBlur-BTUdXC0g.js";
6
- import { n as st } from "./Ascii-Bu8ii7oo.js";
7
- import "./colorMixing-DPZ-Td4U.js";
8
- import { n as lt } from "./Blob-C0G0efjG.js";
9
- import { n as ct } from "./Blur-BzUO9yxF.js";
10
- import { n as ft } from "./Bulge-BCXYAzig.js";
11
- import { n as ut } from "./ChannelBlur-BEK1qzGn.js";
12
- import { n as mt } from "./Checkerboard-BPkiSF5I.js";
13
- import { n as dt } from "./ChromaFlow-AHO3C4o3.js";
14
- import { n as ht } from "./ChromaticAberration-nVg3r1FK.js";
15
- import { n as pt } from "./Circle-C8ltF4BZ.js";
16
- import { n as gt } from "./CRTScreen-cJ3XHrI9.js";
17
- import { n as bt } from "./CursorTrail-BeJGeovB.js";
18
- import { n as vt } from "./DiffuseBlur-Dq_vFrB1.js";
19
- import { n as Ct } from "./Dither-CpN3vGSh.js";
20
- import { n as Rt } from "./DotGrid-BFUzeSQw.js";
21
- import { n as Tt } from "./Duotone-_nR_o3-g.js";
22
- import { n as kt } from "./FilmGrain-BAKXXtLg.js";
23
- import { n as yt } from "./FloatingParticles-Fv8JIzKk.js";
24
- import { n as wt } from "./GlassTiles-5MyBj1ff.js";
25
- import { n as Ut } from "./Glow-DvJj7BB7.js";
26
- import { n as St } from "./Godrays-D3VnYrAm.js";
1
+ import { B as _n, C as Nn, E as R, F as Ze, I as Pn, L as Xn, M as S, N as ye, O as ue, P as fn, R as Yn, T as Se, V as In, _ as c, b as j, c as Hn, d as Q, g as Me, h as Ke, i as Wn, j as _, k as G, l as Cn, m as en, n as k, o as jn, s as Qn, t as Jn, w as Rn, x as pe, z as Zn } from "./three.tsl-Btj1hLsf.js";
2
+ import { n as ae, t as ge } from "./edges-CDzKsauJ.js";
3
+ import { t as Jr } from "./time-DbRMw6Jm.js";
4
+ import "./transformations-CsrIJXh-.js";
5
+ import { n as Kn } from "./AngularBlur-ClvtyURQ.js";
6
+ import { n as et } from "./Ascii-BT0-K_vw.js";
7
+ import "./colorMixing--dhzx0ch.js";
8
+ import { n as nt } from "./Blob-BlQ_1T_8.js";
9
+ import { n as tt } from "./Blur-421AjWLH.js";
10
+ import { n as rt } from "./Bulge-CZRVoR6C.js";
11
+ import { n as ot } from "./ChannelBlur-5pzcB6Zv.js";
12
+ import { n as it } from "./Checkerboard-CrQkqXhD.js";
13
+ import { n as at } from "./ChromaFlow-CNrQdL8f.js";
14
+ import { n as st } from "./ChromaticAberration-D9H7O17Y.js";
15
+ import { n as lt } from "./Circle-DnLaDn8V.js";
16
+ import { n as ct } from "./CRTScreen-C_U9g_IR.js";
17
+ import { n as ft } from "./CursorTrail-NY6n97VG.js";
18
+ import { n as ut } from "./DiffuseBlur-C_n01ABk.js";
19
+ import { n as mt } from "./Dither-4s-c4zh4.js";
20
+ import { n as dt } from "./DotGrid-BYl8XdMi.js";
21
+ import { n as ht } from "./Duotone-DbewOoB4.js";
22
+ import { n as pt } from "./FilmGrain-zA_-knOw.js";
23
+ import { n as gt } from "./FloatingParticles-BhVnqMsE.js";
24
+ import { n as bt } from "./GlassTiles-CFI57glh.js";
25
+ import { n as vt } from "./Glow-CQgl3IoS.js";
26
+ import { n as Ct } from "./Godrays-BBCtZxbv.js";
27
27
  import "./TSLBase-BFMvTOak.js";
28
28
  import "./ColorAdjustment-CKwpE_4M.js";
29
- import { n as Mt } from "./Grayscale-oWIF3PV5.js";
30
- import { n as xt } from "./Grid-Bov7AA9m.js";
31
- import { n as At } from "./GridDistortion-CWYom5Dw.js";
32
- import { n as Dt } from "./Group-CPk-7fiA.js";
33
- import { n as zt } from "./Halftone-F7fsdu7W.js";
34
- import { n as Et } from "./HueShift-CiS4hdtk.js";
35
- import { n as $t } from "./ImageTexture-B3Q29OHX.js";
36
- import { n as Ft } from "./Invert-Cyc4JHWc.js";
37
- import { n as Ot } from "./LinearBlur-BTC54qzk.js";
38
- import { n as Bt } from "./LinearGradient-LEMeW0KM.js";
39
- import { n as _t } from "./Liquify-D2nzMDzq.js";
40
- import { n as Vt } from "./Pixelate-irPzmtQm.js";
41
- import { n as qt } from "./PolarCoordinates-Ck5ZWrQO.js";
42
- import { n as Gt } from "./Posterize-DICq_t96.js";
43
- import { n as Lt } from "./ProgressiveBlur-BuORe3VH.js";
44
- import { n as Nt } from "./RadialGradient-D0cN67jm.js";
45
- import { n as Pt } from "./RectangularCoordinates-1LIDaeHR.js";
46
- import { n as Xt } from "./Ripples-DH71sFJc.js";
47
- import { n as Yt } from "./Saturation-DbSXtSeK.js";
48
- import { n as Ht } from "./SimplexNoise-DPGC2OPJ.js";
49
- import { n as It } from "./SineWave-CkWtnzHF.js";
50
- import { n as Wt } from "./SolidColor-DaB-FHNX.js";
51
- import { n as jt } from "./Spherize-CqjZj4yV.js";
52
- import { n as Qt } from "./Spiral-BRrismPI.js";
53
- import { n as Jt } from "./Strands-DyrV6zDO.js";
54
- import { n as Kt } from "./Stretch-DeBlJ-NH.js";
55
- import { n as Zt } from "./Swirl-PxpHzkdC.js";
56
- import { n as er } from "./TiltShift-DiArippe.js";
57
- import { n as nr } from "./Tritone-KtJgZviA.js";
58
- import { n as tr } from "./Twirl-C6xj1p52.js";
59
- import { n as rr } from "./Vibrance-C6lNgpWH.js";
60
- import { n as or } from "./WaveDistortion-DcXxPZ2w.js";
61
- import { n as ir } from "./ZoomBlur-_feIVJs6.js";
62
- import { WebGLRenderer as ar } from "three";
63
- Wn();
64
- D();
65
- function sr(e, n, l = 1) {
29
+ import { n as Rt } from "./Grayscale-CAEFLteL.js";
30
+ import { n as Tt } from "./Grid-DlM-rVbZ.js";
31
+ import { n as kt } from "./GridDistortion-ZOZphSAT.js";
32
+ import { n as yt } from "./Group-BQAs3RiH.js";
33
+ import { n as wt } from "./Halftone-ci4ga-_J.js";
34
+ import { n as Ut } from "./HueShift-CyxzPcJV.js";
35
+ import { n as St } from "./ImageTexture-CdAGsPuH.js";
36
+ import { n as Mt } from "./Invert-iPsiIqNZ.js";
37
+ import { n as xt } from "./LinearBlur-BEaaoIk-.js";
38
+ import { n as At } from "./LinearGradient-DR_7RxLX.js";
39
+ import { n as Dt } from "./Liquify-Bi02_ugh.js";
40
+ import { n as zt } from "./Pixelate-CSsdT1rr.js";
41
+ import { n as Et } from "./PolarCoordinates-D626ml58.js";
42
+ import { n as $t } from "./Posterize-DhZkMaC7.js";
43
+ import { n as Ft } from "./ProgressiveBlur-CGtCfLF8.js";
44
+ import { n as Ot } from "./RadialGradient-C0_WzmbH.js";
45
+ import { n as Bt } from "./RectangularCoordinates-DfXw7fhI.js";
46
+ import { n as qt } from "./Ripples-DkemN3eh.js";
47
+ import { n as Vt } from "./Saturation-Dup81Pnq.js";
48
+ import { n as Gt } from "./SimplexNoise-BYEiCjDj.js";
49
+ import { n as Lt } from "./SineWave-C6MRPtsy.js";
50
+ import { n as _t } from "./SolidColor-BZHRczgb.js";
51
+ import { n as Nt } from "./Spherize-DOAnDx2l.js";
52
+ import { n as Pt } from "./Spiral-BMjnWXh1.js";
53
+ import { n as Xt } from "./Strands-BOVsuJLe.js";
54
+ import { n as Yt } from "./Stretch-D6bHc6yp.js";
55
+ import { n as It } from "./Swirl-BFoc0ImG.js";
56
+ import { n as Ht } from "./TiltShift-BiNvvhzj.js";
57
+ import { n as Wt } from "./Tritone-gdx2AA0m.js";
58
+ import { n as jt } from "./Twirl-BsV8YbqC.js";
59
+ import { n as Qt } from "./Vibrance-C182fbSw.js";
60
+ import { n as Jt } from "./WaveDistortion-CmaS2zDB.js";
61
+ import { n as Zt } from "./ZoomBlur-DLf5xQ16.js";
62
+ import { WebGLRenderer as Kt } from "three";
63
+ function er(e, n, l = 1) {
66
64
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
67
65
  return S(k(c(n.rgb, t), c(e.rgb, c(e.a, R(1, t)))), u);
68
66
  }
69
- D();
70
- var mn = (e) => N(e.x.mul(1.2249401).sub(e.y.mul(0.2249404)).sub(e.z.mul(0)), e.x.mul(-0.0420569).add(e.y.mul(1.0420571)).add(e.z.mul(0)), e.x.mul(-0.0196376).sub(e.y.mul(0.0786361)).add(e.z.mul(1.0982735))), lr = (e) => N(e.x.mul(0.8224621).add(e.y.mul(0.177538)).add(e.z.mul(0)), e.x.mul(0.0331941).add(e.y.mul(0.9668058)).add(e.z.mul(0)), e.x.mul(0.0170826).add(e.y.mul(0.0723974)).add(e.z.mul(0.9105199))), dn = (e) => {
71
- const n = e.x, l = e.y, t = e.z, u = n.mul(0.4122214708).add(l.mul(0.5363325363)).add(t.mul(0.0514459929)), p = n.mul(0.2119034982).add(l.mul(0.6806995451).add(t.mul(0.1073969566))), h = n.mul(0.0883024619).add(l.mul(0.2817188376)).add(t.mul(0.6299787005)), d = J(u, Q(1 / 3)), T = J(p, Q(1 / 3)), U = J(h, Q(1 / 3));
72
- return N(d.mul(0.2104542553).add(T.mul(0.793617785)).sub(U.mul(0.0040720468)), d.mul(1.9779984951).sub(T.mul(2.428592205)).add(U.mul(0.4505937099)), d.mul(0.0259040371).add(T.mul(0.7827717662)).sub(U.mul(0.808675766)));
73
- }, cr = (e) => {
74
- const n = e.x, l = e.y, t = e.z, u = n.add(l.mul(0.3963377774)).add(t.mul(0.2158037573)), p = n.sub(l.mul(0.1055613458)).sub(t.mul(0.0638541728)), h = n.sub(l.mul(0.0894841775)).sub(t.mul(1.291485548)), d = J(u, Q(3)), T = J(p, Q(3)), U = J(h, Q(3));
75
- return N(d.mul(4.0767416621).sub(T.mul(3.3077115913)).add(U.mul(0.2309699292)), d.mul(-1.2684380046).add(T.mul(2.6097574011)).sub(U.mul(0.3413193965)), d.mul(-0.0041960863).sub(T.mul(0.7034186147)).add(U.mul(1.707614701)));
76
- }, hn = (e) => {
67
+ var un = (e) => _(e.x.mul(1.2249401).sub(e.y.mul(0.2249404)).sub(e.z.mul(0)), e.x.mul(-0.0420569).add(e.y.mul(1.0420571)).add(e.z.mul(0)), e.x.mul(-0.0196376).sub(e.y.mul(0.0786361)).add(e.z.mul(1.0982735))), nr = (e) => _(e.x.mul(0.8224621).add(e.y.mul(0.177538)).add(e.z.mul(0)), e.x.mul(0.0331941).add(e.y.mul(0.9668058)).add(e.z.mul(0)), e.x.mul(0.0170826).add(e.y.mul(0.0723974)).add(e.z.mul(0.9105199))), mn = (e) => {
68
+ const n = e.x, l = e.y, t = e.z, u = n.mul(0.4122214708).add(l.mul(0.5363325363)).add(t.mul(0.0514459929)), p = n.mul(0.2119034982).add(l.mul(0.6806995451).add(t.mul(0.1073969566))), h = n.mul(0.0883024619).add(l.mul(0.2817188376)).add(t.mul(0.6299787005)), d = j(u, Q(1 / 3)), T = j(p, Q(1 / 3)), U = j(h, Q(1 / 3));
69
+ return _(d.mul(0.2104542553).add(T.mul(0.793617785)).sub(U.mul(0.0040720468)), d.mul(1.9779984951).sub(T.mul(2.428592205)).add(U.mul(0.4505937099)), d.mul(0.0259040371).add(T.mul(0.7827717662)).sub(U.mul(0.808675766)));
70
+ }, tr = (e) => {
71
+ const n = e.x, l = e.y, t = e.z, u = n.add(l.mul(0.3963377774)).add(t.mul(0.2158037573)), p = n.sub(l.mul(0.1055613458)).sub(t.mul(0.0638541728)), h = n.sub(l.mul(0.0894841775)).sub(t.mul(1.291485548)), d = j(u, Q(3)), T = j(p, Q(3)), U = j(h, Q(3));
72
+ return _(d.mul(4.0767416621).sub(T.mul(3.3077115913)).add(U.mul(0.2309699292)), d.mul(-1.2684380046).add(T.mul(2.6097574011)).sub(U.mul(0.3413193965)), d.mul(-0.0041960863).sub(T.mul(0.7034186147)).add(U.mul(1.707614701)));
73
+ }, dn = (e) => {
77
74
  const n = e.x, l = e.y, t = e.z;
78
- return N(n, Rn(l.mul(l).add(t.mul(t))), Zn(t, l));
79
- }, fr = (e) => {
75
+ return _(n, Rn(l.mul(l).add(t.mul(t))), Wn(t, l));
76
+ }, rr = (e) => {
80
77
  const n = e.x, l = e.y, t = e.z;
81
- return N(n, l.mul(tt(t)), l.mul(ot(t)));
78
+ return _(n, l.mul(Qn(t)), l.mul(Nn(t)));
82
79
  };
83
- function ur(e, n, l = 1) {
84
- const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = mn(N(e.r, e.g, e.b)), h = mn(N(n.r, n.g, n.b)), d = dn(p), T = dn(h), U = hn(d);
85
- return S(lr(cr(fr(k(c(hn(T), t), c(U, c(e.a, R(1, t))))))), u);
80
+ function or(e, n, l = 1) {
81
+ const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = un(_(e.r, e.g, e.b)), h = un(_(n.r, n.g, n.b)), d = mn(p), T = mn(h), U = dn(d);
82
+ return S(nr(tr(rr(k(c(dn(T), t), c(U, c(e.a, R(1, t))))))), u);
86
83
  }
87
- D();
88
- var pn = (e) => N(e.x.mul(1.2249401).sub(e.y.mul(0.2249404)).sub(e.z.mul(0)), e.x.mul(-0.0420569).add(e.y.mul(1.0420571)).add(e.z.mul(0)), e.x.mul(-0.0196376).sub(e.y.mul(0.0786361)).add(e.z.mul(1.0982735))), mr = (e) => N(e.x.mul(0.8224621).add(e.y.mul(0.177538)).add(e.z.mul(0)), e.x.mul(0.0331941).add(e.y.mul(0.9668058)).add(e.z.mul(0)), e.x.mul(0.0170826).add(e.y.mul(0.0723974)).add(e.z.mul(0.9105199))), gn = (e) => {
89
- const n = e.x, l = e.y, t = e.z, u = n.mul(0.4122214708).add(l.mul(0.5363325363)).add(t.mul(0.0514459929)), p = n.mul(0.2119034982).add(l.mul(0.6806995451).add(t.mul(0.1073969566))), h = n.mul(0.0883024619).add(l.mul(0.2817188376)).add(t.mul(0.6299787005)), d = J(u, Q(1 / 3)), T = J(p, Q(1 / 3)), U = J(h, Q(1 / 3));
90
- return N(d.mul(0.2104542553).add(T.mul(0.793617785)).sub(U.mul(0.0040720468)), d.mul(1.9779984951).sub(T.mul(2.428592205)).add(U.mul(0.4505937099)), d.mul(0.0259040371).add(T.mul(0.7827717662)).sub(U.mul(0.808675766)));
91
- }, dr = (e) => {
92
- const n = e.x, l = e.y, t = e.z, u = n.add(l.mul(0.3963377774)).add(t.mul(0.2158037573)), p = n.sub(l.mul(0.1055613458)).sub(t.mul(0.0638541728)), h = n.sub(l.mul(0.0894841775)).sub(t.mul(1.291485548)), d = J(u, Q(3)), T = J(p, Q(3)), U = J(h, Q(3));
93
- return N(d.mul(4.0767416621).sub(T.mul(3.3077115913)).add(U.mul(0.2309699292)), d.mul(-1.2684380046).add(T.mul(2.6097574011)).sub(U.mul(0.3413193965)), d.mul(-0.0041960863).sub(T.mul(0.7034186147)).add(U.mul(1.707614701)));
84
+ var hn = (e) => _(e.x.mul(1.2249401).sub(e.y.mul(0.2249404)).sub(e.z.mul(0)), e.x.mul(-0.0420569).add(e.y.mul(1.0420571)).add(e.z.mul(0)), e.x.mul(-0.0196376).sub(e.y.mul(0.0786361)).add(e.z.mul(1.0982735))), ir = (e) => _(e.x.mul(0.8224621).add(e.y.mul(0.177538)).add(e.z.mul(0)), e.x.mul(0.0331941).add(e.y.mul(0.9668058)).add(e.z.mul(0)), e.x.mul(0.0170826).add(e.y.mul(0.0723974)).add(e.z.mul(0.9105199))), pn = (e) => {
85
+ const n = e.x, l = e.y, t = e.z, u = n.mul(0.4122214708).add(l.mul(0.5363325363)).add(t.mul(0.0514459929)), p = n.mul(0.2119034982).add(l.mul(0.6806995451).add(t.mul(0.1073969566))), h = n.mul(0.0883024619).add(l.mul(0.2817188376)).add(t.mul(0.6299787005)), d = j(u, Q(1 / 3)), T = j(p, Q(1 / 3)), U = j(h, Q(1 / 3));
86
+ return _(d.mul(0.2104542553).add(T.mul(0.793617785)).sub(U.mul(0.0040720468)), d.mul(1.9779984951).sub(T.mul(2.428592205)).add(U.mul(0.4505937099)), d.mul(0.0259040371).add(T.mul(0.7827717662)).sub(U.mul(0.808675766)));
87
+ }, ar = (e) => {
88
+ const n = e.x, l = e.y, t = e.z, u = n.add(l.mul(0.3963377774)).add(t.mul(0.2158037573)), p = n.sub(l.mul(0.1055613458)).sub(t.mul(0.0638541728)), h = n.sub(l.mul(0.0894841775)).sub(t.mul(1.291485548)), d = j(u, Q(3)), T = j(p, Q(3)), U = j(h, Q(3));
89
+ return _(d.mul(4.0767416621).sub(T.mul(3.3077115913)).add(U.mul(0.2309699292)), d.mul(-1.2684380046).add(T.mul(2.6097574011)).sub(U.mul(0.3413193965)), d.mul(-0.0041960863).sub(T.mul(0.7034186147)).add(U.mul(1.707614701)));
94
90
  };
95
- function hr(e, n, l = 1) {
96
- const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = pn(N(e.r, e.g, e.b)), h = pn(N(n.r, n.g, n.b)), d = gn(p);
97
- return S(mr(dr(k(c(gn(h), t), c(d, c(e.a, R(1, t)))))), u);
91
+ function sr(e, n, l = 1) {
92
+ const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = hn(_(e.r, e.g, e.b)), h = hn(_(n.r, n.g, n.b)), d = pn(p);
93
+ return S(ir(ar(k(c(pn(h), t), c(d, c(e.a, R(1, t)))))), u);
98
94
  }
99
- D();
100
- function pr(e, n, l = 1) {
95
+ function lr(e, n, l = 1) {
101
96
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
102
97
  return S(k(c(c(e.rgb, n.rgb), t), c(e.rgb, c(e.a, R(1, t)))), u);
103
98
  }
104
- D();
105
- function gr(e, n, l = 1) {
99
+ function cr(e, n, l = 1) {
106
100
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
107
101
  return S(k(c(R(1, c(R(1, e.rgb), R(1, n.rgb))), t), c(e.rgb, c(e.a, R(1, t)))), u);
108
102
  }
109
- D();
110
- function br(e, n, l = 1) {
103
+ function fr(e, n, l = 1) {
111
104
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
112
- return S(k(c(en(k(e.rgb, n.rgb), 1), t), c(e.rgb, c(e.a, R(1, t)))), u);
105
+ return S(k(c(Ke(k(e.rgb, n.rgb), 1), t), c(e.rgb, c(e.a, R(1, t)))), u);
113
106
  }
114
- D();
115
- function vr(e, n, l = 1) {
107
+ function ur(e, n, l = 1) {
116
108
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
117
- return S(k(c(xe(c(2, c(e.rgb, n.rgb)), R(1, c(2, c(R(1, e.rgb), R(1, n.rgb)))), Me(0.5, e.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
109
+ return S(k(c(Me(c(2, c(e.rgb, n.rgb)), R(1, c(2, c(R(1, e.rgb), R(1, n.rgb)))), Se(0.5, e.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
118
110
  }
119
- D();
120
- function Cr(e, n, l = 1) {
111
+ function mr(e, n, l = 1) {
121
112
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
122
- return S(k(c(rt(R(e.rgb, n.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
113
+ return S(k(c(Jn(R(e.rgb, n.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
123
114
  }
124
- D();
125
- function Rr(e, n, l = 1) {
115
+ function dr(e, n, l = 1) {
126
116
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
127
- return S(k(c(xe(e.rgb, en(Kn(e.rgb, R(1, n.rgb)), 1), Me(1e-3, R(1, n.rgb))), t), c(e.rgb, c(e.a, R(1, t)))), u);
117
+ return S(k(c(Me(e.rgb, Ke(Hn(e.rgb, R(1, n.rgb)), 1), Se(1e-3, R(1, n.rgb))), t), c(e.rgb, c(e.a, R(1, t)))), u);
128
118
  }
129
- D();
130
- function Tr(e, n, l = 1) {
119
+ function hr(e, n, l = 1) {
131
120
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
132
121
  return S(k(c(R(k(e.rgb, n.rgb), c(2, c(e.rgb, n.rgb))), t), c(e.rgb, c(e.a, R(1, t)))), u);
133
122
  }
134
- D();
135
- function le(e) {
123
+ function se(e) {
136
124
  return k(k(c(e.r, 0.2126), c(e.g, 0.7152)), c(e.b, 0.0722));
137
125
  }
138
- D();
139
- function kr(e, n, l = 1) {
140
- const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = R(le(e.rgb), le(n.rgb));
126
+ function pr(e, n, l = 1) {
127
+ const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = R(se(e.rgb), se(n.rgb));
141
128
  return S(k(c(k(n.rgb, p), t), c(e.rgb, c(e.a, R(1, t)))), u);
142
129
  }
143
- D();
144
- function yr(e, n, l = 1) {
145
- const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = le(e.rgb), h = le(n.rgb).div(k(p, 1e-4));
130
+ function gr(e, n, l = 1) {
131
+ const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = se(e.rgb), h = se(n.rgb).div(k(p, 1e-4));
146
132
  return S(k(c(c(e.rgb, h), t), c(e.rgb, c(e.a, R(1, t)))), u);
147
133
  }
148
- D();
149
- function wr(e, n, l = 1) {
134
+ function br(e, n, l = 1) {
150
135
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
151
- return S(k(c(en(e.rgb, n.rgb), t), c(e.rgb, c(e.a, R(1, t)))), u);
136
+ return S(k(c(Ke(e.rgb, n.rgb), t), c(e.rgb, c(e.a, R(1, t)))), u);
152
137
  }
153
- D();
154
- function Ur(e, n, l = 1) {
138
+ function vr(e, n, l = 1) {
155
139
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
156
- return S(k(c(nn(e.rgb, n.rgb), t), c(e.rgb, c(e.a, R(1, t)))), u);
140
+ return S(k(c(en(e.rgb, n.rgb), t), c(e.rgb, c(e.a, R(1, t)))), u);
157
141
  }
158
- D();
159
- function Sr(e, n, l = 1) {
142
+ function Cr(e, n, l = 1) {
160
143
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
161
- return S(k(c(xe(S(0, 0, 0, 1).rgb, nn(R(1, R(1, e.rgb).div(k(n.rgb, 1e-4))), 0), Me(1e-4, n.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
144
+ return S(k(c(Me(S(0, 0, 0, 1).rgb, en(R(1, R(1, e.rgb).div(k(n.rgb, 1e-4))), 0), Se(1e-4, n.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
162
145
  }
163
- D();
164
- function Mr(e, n, l = 1) {
146
+ function Rr(e, n, l = 1) {
165
147
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
166
- return S(k(c(nn(k(k(e.rgb, n.rgb), -1), 0), t), c(e.rgb, c(e.a, R(1, t)))), u);
148
+ return S(k(c(en(k(k(e.rgb, n.rgb), -1), 0), t), c(e.rgb, c(e.a, R(1, t)))), u);
167
149
  }
168
- D();
169
- function xr(e, n, l = 1) {
150
+ function Tr(e, n, l = 1) {
170
151
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = k(c(2, c(e.rgb, n.rgb)), c(c(e.rgb, e.rgb), R(1, c(2, n.rgb)))), h = Rn(e.rgb);
171
- return S(k(c(xe(p, k(c(2, c(e.rgb, R(1, n.rgb))), c(h, R(c(2, n.rgb), 1))), Me(0.5, n.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
152
+ return S(k(c(Me(p, k(c(2, c(e.rgb, R(1, n.rgb))), c(h, R(c(2, n.rgb), 1))), Se(0.5, n.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
172
153
  }
173
- D();
174
- function Ar(e, n, l = 1) {
154
+ function kr(e, n, l = 1) {
175
155
  const t = c(n.a, l), u = k(t, c(e.a, R(1, t)));
176
- return S(k(c(xe(c(2, c(e.rgb, n.rgb)), R(1, c(2, c(R(1, e.rgb), R(1, n.rgb)))), Me(0.5, n.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
156
+ return S(k(c(Me(c(2, c(e.rgb, n.rgb)), R(1, c(2, c(R(1, e.rgb), R(1, n.rgb)))), Se(0.5, n.rgb)), t), c(e.rgb, c(e.a, R(1, t)))), u);
177
157
  }
178
- D();
179
- function Dr(e, n, l = 1) {
180
- const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = le(e.rgb), h = le(n.rgb), d = e.rgb.sub(p), T = n.rgb.sub(h), U = d.length();
158
+ function yr(e, n, l = 1) {
159
+ const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = se(e.rgb), h = se(n.rgb), d = e.rgb.sub(p), T = n.rgb.sub(h), U = d.length();
181
160
  return S(k(c(k(c(T.normalize(), U), p), t), c(e.rgb, c(e.a, R(1, t)))), u);
182
161
  }
183
- D();
184
- function zr(e, n, l = 1) {
185
- const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = le(e.rgb), h = le(n.rgb), d = e.rgb.sub(p), T = n.rgb.sub(h);
162
+ function wr(e, n, l = 1) {
163
+ const t = c(n.a, l), u = k(t, c(e.a, R(1, t))), p = se(e.rgb), h = se(n.rgb), d = e.rgb.sub(p), T = n.rgb.sub(h);
186
164
  return S(k(c(k(c(d.normalize(), T.length()), p), t), c(e.rgb, c(e.a, R(1, t)))), u);
187
165
  }
188
- var bn = {
189
- normal: sr,
190
- "normal-oklch": ur,
191
- "normal-oklab": hr,
192
- multiply: pr,
193
- screen: gr,
194
- linearDodge: br,
195
- overlay: vr,
196
- difference: Cr,
197
- colorDodge: Rr,
198
- exclusion: Tr,
199
- color: kr,
200
- luminosity: yr,
201
- darken: wr,
202
- lighten: Ur,
203
- colorBurn: Sr,
204
- linearBurn: Mr,
205
- softLight: xr,
206
- hardLight: Ar,
207
- hue: Dr,
208
- saturation: zr
166
+ var gn = {
167
+ normal: er,
168
+ "normal-oklch": or,
169
+ "normal-oklab": sr,
170
+ multiply: lr,
171
+ screen: cr,
172
+ linearDodge: fr,
173
+ overlay: ur,
174
+ difference: mr,
175
+ colorDodge: dr,
176
+ exclusion: hr,
177
+ color: pr,
178
+ luminosity: gr,
179
+ darken: br,
180
+ lighten: vr,
181
+ colorBurn: Cr,
182
+ linearBurn: Rr,
183
+ softLight: Tr,
184
+ hardLight: kr,
185
+ hue: yr,
186
+ saturation: wr
209
187
  };
210
- function j(e, n, l = "normal", t = 1) {
211
- return (bn[l] || bn.normal)(e, n, t);
188
+ function W(e, n, l = "normal", t = 1) {
189
+ return (gn[l] || gn.normal)(e, n, t);
212
190
  }
213
- D();
214
- function Er(e, n) {
191
+ function Ur(e, n) {
215
192
  const l = c(e.a, n.a);
216
193
  return S(e.rgb, l);
217
194
  }
218
- D();
219
- function $r(e, n) {
195
+ function Sr(e, n) {
220
196
  const l = R(1, n.a), t = c(e.a, l);
221
197
  return S(e.rgb, t);
222
198
  }
223
- D();
224
- function Fr(e, n) {
225
- const l = N(0.2126, 0.7152, 0.0722), t = Tn(n.rgb, l), u = c(e.a, t);
199
+ function Mr(e, n) {
200
+ const l = _(0.2126, 0.7152, 0.0722), t = Cn(n.rgb, l), u = c(e.a, t);
226
201
  return S(e.rgb, u);
227
202
  }
228
- D();
229
- function Or(e, n) {
230
- const l = N(0.2126, 0.7152, 0.0722), t = R(1, Tn(n.rgb, l)), u = c(e.a, t);
203
+ function xr(e, n) {
204
+ const l = _(0.2126, 0.7152, 0.0722), t = R(1, Cn(n.rgb, l)), u = c(e.a, t);
231
205
  return S(e.rgb, u);
232
206
  }
233
- var vn = {
234
- alpha: Er,
235
- alphaInverted: $r,
236
- luminance: Fr,
237
- luminanceInverted: Or
207
+ var bn = {
208
+ alpha: Ur,
209
+ alphaInverted: Sr,
210
+ luminance: Mr,
211
+ luminanceInverted: xr
238
212
  };
239
- function Br(e, n, l = "alpha") {
240
- return (vn[l] || vn.alpha)(e, n);
213
+ function Ar(e, n, l = "alpha") {
214
+ return (bn[l] || bn.alpha)(e, n);
241
215
  }
242
- var _r = class {
216
+ var Dr = class {
243
217
  frameTimesMs = [];
244
218
  maxSamples = 60;
245
219
  targetFrameTime = 16.67;
@@ -351,7 +325,7 @@ var _r = class {
351
325
  score: 0,
352
326
  label: "N/A"
353
327
  };
354
- const n = this.frameTimesMs.reduce((U, _) => U + _, 0) / e, l = Math.min(n / 16.67 * 100, 100), t = this.calculateComplexityScore(), u = Math.min(t / 100 * 100, 100);
328
+ const n = this.frameTimesMs.reduce((U, B) => U + B, 0) / e, l = Math.min(n / 16.67 * 100, 100), t = this.calculateComplexityScore(), u = Math.min(t / 100 * 100, 100);
355
329
  let p = 0;
356
330
  this.lastGpuTime !== null && (p = Math.min(this.lastGpuTime / 16.67 * 100, 100));
357
331
  const h = this.lastGpuTime !== null ? {
@@ -373,7 +347,7 @@ var _r = class {
373
347
  * Gets current performance statistics
374
348
  */
375
349
  getStats(e) {
376
- const n = this.frameTimesMs.length, l = this.frameIntervals.length > 0 ? 1e3 / (this.frameIntervals.reduce((z, E) => z + E, 0) / this.frameIntervals.length) : 0, t = n > 0 ? this.frameTimesMs.reduce((z, E) => z + E, 0) / n : 0, u = n > 0 ? Math.min(...this.frameTimesMs) : 0, p = n > 0 ? Math.max(...this.frameTimesMs) : 0, h = this.calculateP99(this.frameTimesMs), d = this.calculateStdDev(this.frameTimesMs), T = this.totalFrameCount > 0 ? this.jankFrameCount / this.totalFrameCount * 100 : 0, U = performance.memory, _ = U ? U.usedJSHeapSize / (1024 * 1024) : null, B = this.calculateMemoryGrowthRate(), K = t > 0 ? t / this.targetFrameTime * 100 : 0, P = e?.render?.calls ?? null, X = e?.programs?.length ?? null, L = e?.memory?.textures ?? null, ie = this.calculateIntensityScore();
350
+ const n = this.frameTimesMs.length, l = this.frameIntervals.length > 0 ? 1e3 / (this.frameIntervals.reduce((D, z) => D + z, 0) / this.frameIntervals.length) : 0, t = n > 0 ? this.frameTimesMs.reduce((D, z) => D + z, 0) / n : 0, u = n > 0 ? Math.min(...this.frameTimesMs) : 0, p = n > 0 ? Math.max(...this.frameTimesMs) : 0, h = this.calculateP99(this.frameTimesMs), d = this.calculateStdDev(this.frameTimesMs), T = this.totalFrameCount > 0 ? this.jankFrameCount / this.totalFrameCount * 100 : 0, U = performance.memory, B = U ? U.usedJSHeapSize / (1024 * 1024) : null, O = this.calculateMemoryGrowthRate(), J = t > 0 ? t / this.targetFrameTime * 100 : 0, N = e?.render?.calls ?? null, P = e?.programs?.length ?? null, L = e?.memory?.textures ?? null, oe = this.calculateIntensityScore();
377
351
  return {
378
352
  fps: Math.round(l),
379
353
  avgFrameTime: Math.round(t * 100) / 100,
@@ -386,16 +360,16 @@ var _r = class {
386
360
  nodeCount: this.nodeCount,
387
361
  rttNodeCount: this.rttNodeCount,
388
362
  complexityScore: this.calculateComplexityScore(),
389
- memoryUsedMB: _ !== null ? Math.round(_ * 100) / 100 : null,
390
- memoryGrowthRate: B !== null ? Math.round(B * 1e3) / 1e3 : null,
363
+ memoryUsedMB: B !== null ? Math.round(B * 100) / 100 : null,
364
+ memoryGrowthRate: O !== null ? Math.round(O * 1e3) / 1e3 : null,
391
365
  cpuTime: this.lastCpuTime !== null ? Math.round(this.lastCpuTime * 100) / 100 : null,
392
366
  gpuTime: this.lastGpuTime !== null ? Math.round(this.lastGpuTime * 100) / 100 : null,
393
- budgetUsed: Math.round(K * 10) / 10,
394
- drawCalls: P,
395
- shaderPrograms: X,
367
+ budgetUsed: Math.round(J * 10) / 10,
368
+ drawCalls: N,
369
+ shaderPrograms: P,
396
370
  textureCount: L,
397
- intensityScore: ie.score,
398
- intensityLabel: ie.label,
371
+ intensityScore: oe.score,
372
+ intensityLabel: oe.label,
399
373
  isRendering: this.isRendering
400
374
  };
401
375
  }
@@ -405,18 +379,13 @@ var _r = class {
405
379
  reset() {
406
380
  this.frameTimesMs = [], this.frameIntervals = [], this.lastFrameTimestamp = 0, this.jankFrameCount = 0, this.totalFrameCount = 0, this.memorySnapshots = [], this.lastCpuTime = null, this.lastGpuTime = null;
407
381
  }
382
+ }, { vec2: we, cos: zr, sin: Er, float: $r, PI: Fr } = ue;
383
+ const re = (e) => e ? e.offsetX !== 0 || e.offsetY !== 0 || e.rotation !== 0 || e.scale !== 1 || e.anchorX !== 0.5 || e.anchorY !== 0.5 : !1, Ue = (e, n, l, t, u, p, h, d) => {
384
+ const T = t.mul(Fr).div($r(180)), U = zr(T), B = Er(T), O = we(p, h), J = e.sub(O).div(u), N = we(J.x.mul(d), J.y), P = we(N.x.mul(U).sub(N.y.mul(B)), N.x.mul(B).add(N.y.mul(U)));
385
+ return we(P.x.div(d), P.y).sub(we(n, l)).add(O);
408
386
  };
409
- D();
410
- var { vec2: Ue, cos: Vr, sin: qr, float: Gr, PI: Lr } = me;
411
- const oe = (e) => e ? e.offsetX !== 0 || e.offsetY !== 0 || e.rotation !== 0 || e.scale !== 1 || e.anchorX !== 0.5 || e.anchorY !== 0.5 : !1, Se = (e, n, l, t, u, p, h, d) => {
412
- const T = t.mul(Lr).div(Gr(180)), U = Vr(T), _ = qr(T), B = Ue(p, h), K = e.sub(B).div(u), P = Ue(K.x.mul(d), K.y), X = Ue(P.x.mul(U).sub(P.y.mul(_)), P.x.mul(_).add(P.y.mul(U)));
413
- return Ue(X.x.div(d), X.y).sub(Ue(n, l)).add(B);
414
- };
415
- var Nr = /* @__PURE__ */ nt({
416
- createUniformsMap: () => Pr,
417
- updateUniformValue: () => Xr
418
- });
419
- function Pr(e, n, l) {
387
+ var { uniform: Or } = ue;
388
+ function oi(e, n, l) {
420
389
  const t = {};
421
390
  return Object.entries(e.props).forEach(([u, p]) => {
422
391
  const h = n[u];
@@ -435,24 +404,20 @@ function Pr(e, n, l) {
435
404
  default: p.default,
436
405
  hasTransform: !!p.transform
437
406
  }), d = 0);
438
- const T = kn(d).setName(`${u}_${l}`);
407
+ const T = Or(d).setName(`${u}_${l}`);
439
408
  typeof d == "string" && T.value === null && (T.value = d), t[u] = {
440
409
  uniform: T,
441
410
  transform: p.transform || void 0
442
411
  };
443
412
  }), t;
444
413
  }
445
- function Xr(e, n) {
414
+ function Br(e, n) {
446
415
  if (e?.transform) {
447
416
  const l = e.transform(n), t = l?.data ?? l;
448
417
  e.uniform.value = t;
449
418
  } else e.uniform.value = n;
450
419
  }
451
- var kn, yn = In({ "src/utilities/uniforms.ts": (() => {
452
- D(), { uniform: kn } = me;
453
- }) });
454
- D();
455
- var Cn = !1, Yr = /* @__PURE__ */ (() => {
420
+ var vn = !1, qr = /* @__PURE__ */ (() => {
456
421
  let e = 0;
457
422
  const n = /* @__PURE__ */ new Set(), l = (h) => {
458
423
  n.forEach((d) => {
@@ -492,7 +457,7 @@ var Cn = !1, Yr = /* @__PURE__ */ (() => {
492
457
  n.delete(h), e--, e === 0 && (window.removeEventListener("mousemove", l), window.removeEventListener("touchmove", t), window.removeEventListener("mouseup", u), window.removeEventListener("touchend", p));
493
458
  };
494
459
  } };
495
- })(), Hr = () => {
460
+ })(), Vr = () => {
496
461
  try {
497
462
  {
498
463
  const { MODE: e, DEV: n } = {
@@ -510,24 +475,24 @@ var Cn = !1, Yr = /* @__PURE__ */ (() => {
510
475
  return !1;
511
476
  }
512
477
  };
513
- function mi() {
478
+ function ii() {
514
479
  let e = null, n, l, t, u, p;
515
480
  const h = {
516
481
  nodes: /* @__PURE__ */ new Map(),
517
482
  rootId: null,
518
483
  idToNodeId: /* @__PURE__ */ new Map()
519
484
  }, d = /* @__PURE__ */ new Map();
520
- let T = null, U = null, _ = null, B = !1, K = !1, P = !1, X = null, L = !1, ie = !0, z = 0, E = 0, ne = !1, Ge = 0, Le = !1, Ae = 0.5, De = 0.5, ce = !1, ze = !1, Ee = null, ve = null, fe = !1;
521
- const ae = new _r();
522
- let te = [], Ne = !1, $e = [], de = null, Fe = [], he = null, tn = /* @__PURE__ */ new Set(), rn = /* @__PURE__ */ new Set(), Pe = 0, Ce = /* @__PURE__ */ new Set(), Xe = /* @__PURE__ */ new Set(), Re = null, Oe = !1;
523
- const Ye = (i, r) => {
524
- i <= 0 || r <= 0 || i === z && r === E || (Re = {
485
+ let T = null, U = null, B = null, O = !1, J = !1, N = !1, P = null, L = !1, oe = !0, D = 0, z = 0, ee = !1, Ge = 0, Le = !1, xe = 0.5, Ae = 0.5, le = !1, De = !1, ze = null, be = null, ce = !1;
486
+ const ie = new Dr();
487
+ let ne = [], _e = !1, Ee = [], me = null, $e = [], de = null, nn = /* @__PURE__ */ new Set(), tn = /* @__PURE__ */ new Set(), Ne = 0, ve = /* @__PURE__ */ new Set(), Pe = /* @__PURE__ */ new Set(), Ce = null, Fe = !1;
488
+ const Xe = (i, r) => {
489
+ i <= 0 || r <= 0 || i === D && r === z || (Ce = {
525
490
  width: i,
526
491
  height: r
527
- }, Oe || (Oe = !0, requestAnimationFrame(() => {
528
- if (Oe = !1, !Re) return;
529
- const { width: o, height: f } = Re;
530
- Re = null, z = o, E = f, P || (P = !0), n.setSize(o, f, !1);
492
+ }, Fe || (Fe = !0, requestAnimationFrame(() => {
493
+ if (Fe = !1, !Ce) return;
494
+ const { width: o, height: f } = Ce;
495
+ Ce = null, D = o, z = f, N || (N = !0), n.setSize(o, f, !1);
531
496
  const s = o / f, v = 2, b = v * s;
532
497
  l.left = -b / 2, l.right = b / 2, l.top = v / 2, l.bottom = -v / 2, l.updateProjectionMatrix(), u.scale.set(b, v, 1), h.nodes.forEach((m) => {
533
498
  m.transformUniforms?.aspectRatio && (m.transformUniforms.aspectRatio.value = s), m.resizeCallbacks.forEach((M) => {
@@ -536,13 +501,13 @@ function mi() {
536
501
  width: o,
537
502
  height: f
538
503
  });
539
- } catch ($) {
540
- console.error("Error in resize callback:", $);
504
+ } catch (E) {
505
+ console.error("Error in resize callback:", E);
541
506
  }
542
507
  });
543
508
  }), Z().catch(console.warn);
544
509
  })));
545
- }, wn = () => B && !!n && !!t && !!l && !!p && z > 0 && E > 0 && L, Un = (i) => {
510
+ }, Tn = () => O && !!n && !!t && !!l && !!p && D > 0 && z > 0 && L, kn = (i) => {
546
511
  if (!n || !l || !u) return;
547
512
  const r = i[0];
548
513
  if (!r) return;
@@ -552,73 +517,73 @@ function mi() {
552
517
  s ? (o = Math.round(s.inlineSize), f = Math.round(s.blockSize)) : (o = Math.round(r.contentRect.width), f = Math.round(r.contentRect.height));
553
518
  } else
554
519
  o = Math.round(r.contentRect.width), f = Math.round(r.contentRect.height);
555
- o === 0 || f === 0 || Ye(o, f);
556
- }, Sn = (i) => {
520
+ o === 0 || f === 0 || Xe(o, f);
521
+ }, yn = (i) => {
557
522
  const r = i[0];
558
523
  if (!r) return;
559
524
  const o = L;
560
525
  L = r.isIntersecting;
561
- const f = e?.getBoundingClientRect(), s = ne;
562
- if (ne = L && !!f && f.width > 0 && f.height > 0, L && !o) {
526
+ const f = e?.getBoundingClientRect(), s = ee;
527
+ if (ee = L && !!f && f.width > 0 && f.height > 0, L && !o) {
563
528
  if (Le = !0, e) {
564
529
  const { width: v, height: b } = e.getBoundingClientRect(), m = Math.round(v), M = Math.round(b);
565
- m > 0 && M > 0 && (z === 0 || E === 0 || m !== z || M !== E ? (Ye(m, M), !s && ne && ue()) : p && B && h.rootId && (p.needsUpdate = !0, ue(), Z().catch(console.warn)));
530
+ m > 0 && M > 0 && (D === 0 || z === 0 || m !== D || M !== z ? (Xe(m, M), !s && ee && fe()) : p && O && h.rootId && (p.needsUpdate = !0, fe(), Z().catch(console.warn)));
566
531
  }
567
- ie && Je();
568
- } else !L && o && Ke();
569
- }, Mn = (i, r) => {
532
+ oe && Qe();
533
+ } else !L && o && Je();
534
+ }, wn = (i, r) => {
570
535
  if (i.size !== r.size) return !1;
571
536
  for (const o of i) if (!r.has(o)) return !1;
572
537
  return !0;
573
- }, Te = (i) => {
574
- Pe++;
575
- const r = et(i);
576
- return Ce.add(r), r;
577
- }, on = () => {
578
- Xe.forEach((i) => {
538
+ }, Re = (i) => {
539
+ Ne++;
540
+ const r = jn(i);
541
+ return ve.add(r), r;
542
+ }, rn = () => {
543
+ Pe.forEach((i) => {
579
544
  try {
580
545
  i?.renderTarget?.dispose && i.renderTarget.dispose();
581
546
  } catch {
582
547
  }
583
- }), Xe.clear();
548
+ }), Pe.clear();
584
549
  };
585
- let pe = !1;
586
- const ue = () => {
587
- if (!(!h.rootId || !p || ze) && h.nodes.get(h.rootId)) {
588
- if (z === 0 || E === 0) {
589
- pe || (pe = !0, requestAnimationFrame(() => {
590
- pe = !1, z > 0 && E > 0 && ue();
550
+ let he = !1;
551
+ const fe = () => {
552
+ if (!(!h.rootId || !p || De) && h.nodes.get(h.rootId)) {
553
+ if (D === 0 || z === 0) {
554
+ he || (he = !0, requestAnimationFrame(() => {
555
+ he = !1, D > 0 && z > 0 && fe();
591
556
  }));
592
557
  return;
593
558
  }
594
- ze = !0;
559
+ De = !0;
595
560
  try {
596
- Xe = new Set(Ce), Ce.clear();
561
+ Pe = new Set(ve), ve.clear();
597
562
  const i = /* @__PURE__ */ new Set();
598
- rn.clear(), h.nodes.forEach((o, f) => {
599
- (o.requiresRTT || o.transformRTTActive) && rn.add(f);
600
- }), Pe = 0;
601
- const r = W(h.rootId, /* @__PURE__ */ new Set(), i);
563
+ tn.clear(), h.nodes.forEach((o, f) => {
564
+ (o.requiresRTT || o.transformRTTActive) && tn.add(f);
565
+ }), Ne = 0;
566
+ const r = H(h.rootId, /* @__PURE__ */ new Set(), i);
602
567
  if (r && p) {
603
- const o = !Mn(tn, i), f = p.fragmentNode !== r;
568
+ const o = !wn(nn, i), f = p.fragmentNode !== r;
604
569
  if (o || Le || f) {
605
- on();
570
+ rn();
606
571
  try {
607
572
  p.dispose(), n.renderTarget && n.renderTarget.dispose();
608
573
  } catch {
609
574
  }
610
- const s = new un({ transparent: !0 });
611
- s.fragmentNode = r, s.needsUpdate = !0, u.material = s, p = s, Le = !1, tn = i;
575
+ const s = new fn({ transparent: !0 });
576
+ s.fragmentNode = r, s.needsUpdate = !0, u.material = s, p = s, Le = !1, nn = i;
612
577
  }
613
578
  }
614
579
  } catch (i) {
615
580
  console.error("Error composing shader tree:", i);
616
581
  } finally {
617
- ze = !1;
582
+ De = !1;
618
583
  }
619
584
  L && Z().catch(console.warn);
620
585
  }
621
- }, Y = (i) => {
586
+ }, X = (i) => {
622
587
  const r = d.get(i);
623
588
  if (!r) return [];
624
589
  const o = [];
@@ -627,90 +592,90 @@ function mi() {
627
592
  s && o.push(s);
628
593
  }
629
594
  return o;
630
- }, xn = (i) => {
595
+ }, Un = (i) => {
631
596
  for (const [r, o] of h.nodes.entries()) if (o.metadata.id === i) return r;
632
597
  return null;
633
- }, ee = (i, r, o, f, s) => {
598
+ }, K = (i, r, o, f, s) => {
634
599
  if (!r.metadata.mask?.source) return i;
635
- const v = r.metadata.mask.source, b = xn(v);
600
+ const v = r.metadata.mask.source, b = Un(v);
636
601
  if (!b) return i;
637
602
  if (f.has(b))
638
603
  return console.error("Uh oh, looks like you've got a circular dependency in your shader masks."), i;
639
604
  const m = new Set(f);
640
605
  m.add(o);
641
- const M = W(b, m);
642
- let $ = M;
643
- s && ($ = Te(M).sample(s));
606
+ const M = H(b, m);
607
+ let E = M;
608
+ s && (E = Re(M).sample(s));
644
609
  const y = r.metadata.mask.type || "alpha";
645
- return Br(i, $, y);
646
- }, re = (i, r) => {
647
- if (!r.metadata.transform || !r.transformUniforms || !oe(r.metadata.transform) && !r.transformRTTActive) return i;
648
- const o = Te(i), f = Se(ge, r.transformUniforms.offsetX, r.transformUniforms.offsetY, r.transformUniforms.rotation, r.transformUniforms.scale, r.transformUniforms.anchorX, r.transformUniforms.anchorY, r.transformUniforms.aspectRatio);
649
- return be(f, o.sample(f), o, r.transformUniforms.edges);
650
- }, H = (i) => !!i.uvTransformFunc && i.requiresChild && i.metadata.blendMode === "normal" && (i.metadata.opacity === void 0 || i.metadata.opacity === 1) && i.metadata.visible !== !1 && !i.metadata.mask?.source && !(i.transformUniforms && i.metadata.transform && oe(i.metadata.transform)), Be = (i) => {
610
+ return Ar(i, E, y);
611
+ }, te = (i, r) => {
612
+ if (!r.metadata.transform || !r.transformUniforms || !re(r.metadata.transform) && !r.transformRTTActive) return i;
613
+ const o = Re(i), f = Ue(pe, r.transformUniforms.offsetX, r.transformUniforms.offsetY, r.transformUniforms.rotation, r.transformUniforms.scale, r.transformUniforms.anchorX, r.transformUniforms.anchorY, r.transformUniforms.aspectRatio);
614
+ return ge(f, o.sample(f), o, r.transformUniforms.edges);
615
+ }, Y = (i) => !!i.uvTransformFunc && i.requiresChild && i.metadata.blendMode === "normal" && (i.metadata.opacity === void 0 || i.metadata.opacity === 1) && i.metadata.visible !== !1 && !i.metadata.mask?.source && !(i.transformUniforms && i.metadata.transform && re(i.metadata.transform)), Oe = (i) => {
651
616
  const r = [];
652
617
  let o = i;
653
618
  for (; o; ) {
654
619
  const f = h.nodes.get(o);
655
- if (!f || !H(f)) break;
620
+ if (!f || !Y(f)) break;
656
621
  r.push(f);
657
- const s = Y(f.id);
622
+ const s = X(f.id);
658
623
  if (s.length !== 1) break;
659
624
  const v = s[0];
660
- if (H(v)) o = v.id;
625
+ if (Y(v)) o = v.id;
661
626
  else break;
662
627
  }
663
628
  return r;
664
- }, An = (i) => {
629
+ }, Sn = (i) => {
665
630
  if (i.length === 0) return null;
666
- const r = i[i.length - 1], o = Y(r.id);
631
+ const r = i[i.length - 1], o = X(r.id);
667
632
  return o.length === 0 ? null : o.length === 1 ? o[0] : null;
668
- }, ke = (i) => {
669
- if (!i.uvTransformFunc || !H(i)) return !1;
670
- const r = Y(i.id);
633
+ }, Te = (i) => {
634
+ if (!i.uvTransformFunc || !Y(i)) return !1;
635
+ const r = X(i.id);
671
636
  if (r.length !== 1) return !1;
672
637
  const o = r[0];
673
- return o.acceptsUVContext && !o.requiresChild ? !0 : o.uvTransformFunc && H(o) ? ke(o) : !1;
674
- }, _e = (i, r, o) => {
638
+ return o.acceptsUVContext && !o.requiresChild ? !0 : o.uvTransformFunc && Y(o) ? Te(o) : !1;
639
+ }, Be = (i, r, o) => {
675
640
  const f = [];
676
641
  let s = i;
677
642
  for (; s; ) {
678
643
  const g = h.nodes.get(s);
679
644
  if (!g) break;
680
- if (f.length >= 2) return W(i, r, o, !0);
645
+ if (f.length >= 2) return H(i, r, o, !0);
681
646
  if (f.push(g), o && o.add(g.id), g.acceptsUVContext && !g.requiresChild) break;
682
- const a = Y(s);
647
+ const a = X(s);
683
648
  if (a.length !== 1) break;
684
649
  s = a[0].id;
685
650
  }
686
651
  if (f.length === 0) return S(0, 0, 0, 0);
687
652
  const v = f[f.length - 1];
688
- let b = ge;
653
+ let b = pe;
689
654
  for (let g = 0; g < f.length; g++) {
690
655
  const a = f[g];
691
656
  a.uvTransformFunc && (b = a.uvTransformFunc({
692
657
  uv: b,
693
658
  uniforms: a.uniforms,
694
- viewportSize: we
695
- })), a.transformUniforms && a.metadata.transform && oe(a.metadata.transform) && (b = Se(b, a.transformUniforms.offsetX, a.transformUniforms.offsetY, a.transformUniforms.rotation, a.transformUniforms.scale, a.transformUniforms.anchorX, a.transformUniforms.anchorY, a.transformUniforms.aspectRatio), a.transformUniforms.edges && (b = se(b, a.transformUniforms.edges)), a.transformRTTActive = !0);
659
+ viewportSize: ye
660
+ })), a.transformUniforms && a.metadata.transform && re(a.metadata.transform) && (b = Ue(b, a.transformUniforms.offsetX, a.transformUniforms.offsetY, a.transformUniforms.rotation, a.transformUniforms.scale, a.transformUniforms.anchorX, a.transformUniforms.anchorY, a.transformUniforms.aspectRatio), a.transformUniforms.edges && (b = ae(b, a.transformUniforms.edges)), a.transformRTTActive = !0);
696
661
  }
697
662
  for (let g = 0; g < f.length - 1; g++) {
698
663
  const a = f[g];
699
664
  if (!a.requiresChild) continue;
700
- const A = (V) => {
701
- a.cleanupCallbacks.push(V);
702
- }, I = (V) => {
703
- a.beforeRenderCallbacks.push(V);
704
- }, x = (V) => {
705
- a.afterRenderCallbacks.push(V);
706
- }, w = (V) => {
707
- a.resizeCallbacks.push(V);
665
+ const A = (q) => {
666
+ a.cleanupCallbacks.push(q);
667
+ }, I = (q) => {
668
+ a.beforeRenderCallbacks.push(q);
669
+ }, x = (q) => {
670
+ a.afterRenderCallbacks.push(q);
671
+ }, w = (q) => {
672
+ a.resizeCallbacks.push(q);
708
673
  };
709
- a.cleanupCallbacks.forEach((V) => {
674
+ a.cleanupCallbacks.forEach((q) => {
710
675
  try {
711
- V();
712
- } catch (F) {
713
- console.error("Error in cleanup callback:", F);
676
+ q();
677
+ } catch ($) {
678
+ console.error("Error in cleanup callback:", $);
714
679
  }
715
680
  }), a.cleanupCallbacks = [], a.beforeRenderCallbacks = [], a.afterRenderCallbacks = [], a.resizeCallbacks = [], a.fragmentNodeFunc({
716
681
  uniforms: a.uniforms ?? {},
@@ -722,8 +687,8 @@ function mi() {
722
687
  onResize: w,
723
688
  canvas: e,
724
689
  dimensions: {
725
- width: z,
726
- height: E
690
+ width: D,
691
+ height: z
727
692
  },
728
693
  renderer: n
729
694
  });
@@ -732,7 +697,7 @@ function mi() {
732
697
  v.cleanupCallbacks.push(g);
733
698
  }, M = (g) => {
734
699
  v.beforeRenderCallbacks.push(g);
735
- }, $ = (g) => {
700
+ }, E = (g) => {
736
701
  v.afterRenderCallbacks.push(g);
737
702
  }, y = (g) => {
738
703
  v.resizeCallbacks.push(g);
@@ -750,80 +715,80 @@ function mi() {
750
715
  uvContext: b,
751
716
  onCleanup: m,
752
717
  onBeforeRender: M,
753
- onAfterRender: $,
718
+ onAfterRender: E,
754
719
  onResize: y,
755
720
  canvas: e,
756
721
  dimensions: {
757
- width: z,
758
- height: E
722
+ width: D,
723
+ height: z
759
724
  },
760
725
  renderer: n
761
726
  });
762
- for (const g of f) if (g.uniforms.edges?.uniform) return be(b, C, null, g.uniforms.edges.uniform);
727
+ for (const g of f) if (g.uniforms.edges?.uniform) return ge(b, C, null, g.uniforms.edges.uniform);
763
728
  return C;
764
- }, Ve = (i, r, o) => {
729
+ }, qe = (i, r, o) => {
765
730
  if (i.length === 0) return S(0, 0, 0, 0);
766
- const f = An(i);
731
+ const f = Sn(i);
767
732
  let s;
768
- if (f) s = W(f.id, r, o);
733
+ if (f) s = H(f.id, r, o);
769
734
  else {
770
- const $ = i[i.length - 1];
771
- if (Y($.id).length === 0) return S(0, 0, 0, 0);
772
- s = W($.id, r, o);
735
+ const E = i[i.length - 1];
736
+ if (X(E.id).length === 0) return S(0, 0, 0, 0);
737
+ s = H(E.id, r, o);
773
738
  }
774
- const v = Te(s);
775
- let b = ge;
776
- for (let $ = i.length - 1; $ >= 0; $--) {
777
- const y = i[$];
739
+ const v = Re(s);
740
+ let b = pe;
741
+ for (let E = i.length - 1; E >= 0; E--) {
742
+ const y = i[E];
778
743
  y.uvTransformFunc && (b = y.uvTransformFunc({
779
744
  uv: b,
780
745
  uniforms: y.uniforms,
781
- viewportSize: we
782
- }), y.uniforms.edges?.uniform && (b = se(b, y.uniforms.edges.uniform))), o && o.add(y.id);
746
+ viewportSize: ye
747
+ }), y.uniforms.edges?.uniform && (b = ae(b, y.uniforms.edges.uniform))), o && o.add(y.id);
783
748
  }
784
749
  const m = v.sample(b), M = i[0];
785
- return M.uniforms.edges?.uniform ? be(b, m, v, M.uniforms.edges.uniform) : m;
786
- }, He = (i, r) => {
750
+ return M.uniforms.edges?.uniform ? ge(b, m, v, M.uniforms.edges.uniform) : m;
751
+ }, Ye = (i, r) => {
787
752
  const o = [];
788
753
  for (let f = r; f < i.length; f++) {
789
754
  const s = i[f];
790
- if (!H(s) || Y(s.id).length > 0) break;
755
+ if (!Y(s) || X(s.id).length > 0) break;
791
756
  o.push(s);
792
757
  }
793
758
  return o;
794
759
  }, Ie = (i, r, o) => {
795
760
  if (i.length === 0) return r;
796
- const f = Te(r);
797
- let s = ge;
761
+ const f = Re(r);
762
+ let s = pe;
798
763
  for (let m = i.length - 1; m >= 0; m--) {
799
764
  const M = i[m];
800
765
  M.uvTransformFunc && (s = M.uvTransformFunc({
801
766
  uv: s,
802
767
  uniforms: M.uniforms,
803
- viewportSize: we
804
- }), M.uniforms.edges?.uniform && (s = se(s, M.uniforms.edges.uniform))), o && o.add(M.id);
768
+ viewportSize: ye
769
+ }), M.uniforms.edges?.uniform && (s = ae(s, M.uniforms.edges.uniform))), o && o.add(M.id);
805
770
  }
806
771
  const v = f.sample(s), b = i[i.length - 1];
807
- return b.uniforms.edges?.uniform ? be(s, v, f, b.uniforms.edges.uniform) : v;
808
- }, We = (i) => {
772
+ return b.uniforms.edges?.uniform ? ge(s, v, f, b.uniforms.edges.uniform) : v;
773
+ }, He = (i) => {
809
774
  const r = [], o = [];
810
775
  let f = !1;
811
776
  for (let b = 0; b < i.length; b++) {
812
- const m = i[b], M = Y(m.id).length > 0;
813
- m.acceptsUVContext && !m.requiresChild && r.push(b), H(m) && !M && (o.push(b), r.length > 0 && (f = !0));
777
+ const m = i[b], M = X(m.id).length > 0;
778
+ m.acceptsUVContext && !m.requiresChild && r.push(b), Y(m) && !M && (o.push(b), r.length > 0 && (f = !0));
814
779
  }
815
780
  if (r.length === 0 || o.length === 0 || !f) return !1;
816
781
  const s = Math.min(...r), v = Math.max(...o);
817
782
  for (let b = s + 1; b < v; b++) {
818
783
  const m = i[b];
819
- if (m.requiresRTT && !H(m) && !(m.acceptsUVContext && !m.requiresChild)) return !1;
784
+ if (m.requiresRTT && !Y(m) && !(m.acceptsUVContext && !m.requiresChild)) return !1;
820
785
  }
821
786
  return !(o.length > 2);
822
- }, je = (i, r, o) => {
787
+ }, We = (i, r, o) => {
823
788
  const f = [], s = [];
824
789
  i.forEach((b, m) => {
825
- const M = Y(b.id).length > 0;
826
- H(b) && !M ? s.push({
790
+ const M = X(b.id).length > 0;
791
+ Y(b) && !M ? s.push({
827
792
  node: b,
828
793
  index: m
829
794
  }) : b.acceptsUVContext && !b.requiresChild && !M && f.push({
@@ -840,19 +805,19 @@ function mi() {
840
805
  console.error("Cleanup error:", a);
841
806
  }
842
807
  }), m.cleanupCallbacks = [], m.beforeRenderCallbacks = [], m.afterRenderCallbacks = [], m.resizeCallbacks = [];
843
- const M = (g) => m.cleanupCallbacks.push(g), $ = (g) => m.beforeRenderCallbacks.push(g), y = (g) => m.afterRenderCallbacks.push(g), C = (g) => m.resizeCallbacks.push(g);
808
+ const M = (g) => m.cleanupCallbacks.push(g), E = (g) => m.beforeRenderCallbacks.push(g), y = (g) => m.afterRenderCallbacks.push(g), C = (g) => m.resizeCallbacks.push(g);
844
809
  m.fragmentNodeFunc({
845
810
  uniforms: m.uniforms ?? {},
846
811
  childNode: void 0,
847
812
  uvContext: void 0,
848
813
  onCleanup: M,
849
- onBeforeRender: $,
814
+ onBeforeRender: E,
850
815
  onAfterRender: y,
851
816
  onResize: C,
852
817
  canvas: e,
853
818
  dimensions: {
854
- width: z,
855
- height: E
819
+ width: D,
820
+ height: z
856
821
  },
857
822
  renderer: n
858
823
  }), o && o.add(m.id);
@@ -863,29 +828,29 @@ function mi() {
863
828
  if (m.metadata.visible === !1) continue;
864
829
  const M = m.metadata.opacity ?? 1;
865
830
  m.opacityUniform.value = M, o && o.add(m.id);
866
- const $ = Y(m.id).length > 0;
831
+ const E = X(m.id).length > 0;
867
832
  let y;
868
833
  const C = f.find((g) => g.index === b);
869
834
  if (C) {
870
- const g = s.filter((F) => F.index > C.index).sort((F, O) => F.index - O.index).map((F) => F.node);
871
- let a = ge;
872
- for (let F = g.length - 1; F >= 0; F--) {
873
- const O = g[F];
874
- O.uvTransformFunc && (a = O.uvTransformFunc({
835
+ const g = s.filter(($) => $.index > C.index).sort(($, F) => $.index - F.index).map(($) => $.node);
836
+ let a = pe;
837
+ for (let $ = g.length - 1; $ >= 0; $--) {
838
+ const F = g[$];
839
+ F.uvTransformFunc && (a = F.uvTransformFunc({
875
840
  uv: a,
876
- uniforms: O.uniforms,
877
- viewportSize: we
878
- })), O.transformUniforms && O.metadata.transform && oe(O.metadata.transform) && (a = Se(a, O.transformUniforms.offsetX, O.transformUniforms.offsetY, O.transformUniforms.rotation, O.transformUniforms.scale, O.transformUniforms.anchorX, O.transformUniforms.anchorY, O.transformUniforms.aspectRatio), O.transformUniforms.edges && (a = se(a, O.transformUniforms.edges)), O.transformRTTActive = !0), O.uniforms.edges?.uniform && (a = se(a, O.uniforms.edges.uniform));
841
+ uniforms: F.uniforms,
842
+ viewportSize: ye
843
+ })), F.transformUniforms && F.metadata.transform && re(F.metadata.transform) && (a = Ue(a, F.transformUniforms.offsetX, F.transformUniforms.offsetY, F.transformUniforms.rotation, F.transformUniforms.scale, F.transformUniforms.anchorX, F.transformUniforms.anchorY, F.transformUniforms.aspectRatio), F.transformUniforms.edges && (a = ae(a, F.transformUniforms.edges)), F.transformRTTActive = !0), F.uniforms.edges?.uniform && (a = ae(a, F.uniforms.edges.uniform));
879
844
  }
880
- C.node.transformUniforms && C.node.metadata.transform && oe(C.node.metadata.transform) && (a = Se(a, C.node.transformUniforms.offsetX, C.node.transformUniforms.offsetY, C.node.transformUniforms.rotation, C.node.transformUniforms.scale, C.node.transformUniforms.anchorX, C.node.transformUniforms.anchorY, C.node.transformUniforms.aspectRatio), C.node.transformUniforms.edges && (a = se(a, C.node.transformUniforms.edges)), C.node.transformRTTActive = !0), m.cleanupCallbacks.forEach((F) => {
845
+ C.node.transformUniforms && C.node.metadata.transform && re(C.node.metadata.transform) && (a = Ue(a, C.node.transformUniforms.offsetX, C.node.transformUniforms.offsetY, C.node.transformUniforms.rotation, C.node.transformUniforms.scale, C.node.transformUniforms.anchorX, C.node.transformUniforms.anchorY, C.node.transformUniforms.aspectRatio), C.node.transformUniforms.edges && (a = ae(a, C.node.transformUniforms.edges)), C.node.transformRTTActive = !0), m.cleanupCallbacks.forEach(($) => {
881
846
  try {
882
- F();
883
- } catch (O) {
884
- console.error("Cleanup error:", O);
847
+ $();
848
+ } catch (F) {
849
+ console.error("Cleanup error:", F);
885
850
  }
886
851
  }), m.cleanupCallbacks = [], m.beforeRenderCallbacks = [], m.afterRenderCallbacks = [], m.resizeCallbacks = [];
887
- const A = (F) => m.cleanupCallbacks.push(F), I = (F) => m.beforeRenderCallbacks.push(F), x = (F) => m.afterRenderCallbacks.push(F), w = (F) => m.resizeCallbacks.push(F);
888
- let V = m.fragmentNodeFunc({
852
+ const A = ($) => m.cleanupCallbacks.push($), I = ($) => m.beforeRenderCallbacks.push($), x = ($) => m.afterRenderCallbacks.push($), w = ($) => m.resizeCallbacks.push($);
853
+ let q = m.fragmentNodeFunc({
889
854
  uniforms: m.uniforms ?? {},
890
855
  childNode: void 0,
891
856
  uvContext: a,
@@ -895,51 +860,51 @@ function mi() {
895
860
  onResize: w,
896
861
  canvas: e,
897
862
  dimensions: {
898
- width: z,
899
- height: E
863
+ width: D,
864
+ height: z
900
865
  },
901
866
  renderer: n
902
867
  });
903
868
  if (g.length > 0) {
904
- const F = g[0];
905
- F.uniforms.edges?.uniform && (V = be(a, V, null, F.uniforms.edges.uniform));
869
+ const $ = g[0];
870
+ $.uniforms.edges?.uniform && (q = ge(a, q, null, $.uniforms.edges.uniform));
906
871
  }
907
- y = ee(V, m, m.id, r, a);
872
+ y = K(q, m, m.id, r, a);
908
873
  } else {
909
874
  if (s.find((g) => g.index === b)) continue;
910
- if ($) {
911
- if (ke(m)) y = _e(m.id, r, o);
912
- else if (H(m)) {
913
- const a = Be(m.id);
914
- a.length > 1 ? y = Ve(a, r, o) : y = W(m.id, r, o);
915
- } else y = W(m.id, r, o);
875
+ if (E) {
876
+ if (Te(m)) y = Be(m.id, r, o);
877
+ else if (Y(m)) {
878
+ const a = Oe(m.id);
879
+ a.length > 1 ? y = qe(a, r, o) : y = H(m.id, r, o);
880
+ } else y = H(m.id, r, o);
916
881
  const g = s.filter((a) => a.index > b).sort((a, A) => a.index - A.index).map((a) => a.node);
917
882
  if (g.length > 0) {
918
- const a = Te(y);
919
- let A = ge;
883
+ const a = Re(y);
884
+ let A = pe;
920
885
  for (let x = g.length - 1; x >= 0; x--) {
921
886
  const w = g[x];
922
887
  w.uvTransformFunc && (A = w.uvTransformFunc({
923
888
  uv: A,
924
889
  uniforms: w.uniforms,
925
- viewportSize: we
926
- })), w.transformUniforms && w.metadata.transform && oe(w.metadata.transform) && (A = Se(A, w.transformUniforms.offsetX, w.transformUniforms.offsetY, w.transformUniforms.rotation, w.transformUniforms.scale, w.transformUniforms.anchorX, w.transformUniforms.anchorY, w.transformUniforms.aspectRatio), w.transformUniforms.edges && (A = se(A, w.transformUniforms.edges)), w.transformRTTActive = !0), w.uniforms.edges?.uniform && (A = se(A, w.uniforms.edges.uniform));
890
+ viewportSize: ye
891
+ })), w.transformUniforms && w.metadata.transform && re(w.metadata.transform) && (A = Ue(A, w.transformUniforms.offsetX, w.transformUniforms.offsetY, w.transformUniforms.rotation, w.transformUniforms.scale, w.transformUniforms.anchorX, w.transformUniforms.anchorY, w.transformUniforms.aspectRatio), w.transformUniforms.edges && (A = ae(A, w.transformUniforms.edges)), w.transformRTTActive = !0), w.uniforms.edges?.uniform && (A = ae(A, w.uniforms.edges.uniform));
927
892
  }
928
893
  y = a.sample(A);
929
894
  const I = g[g.length - 1];
930
- I.transformUniforms?.edges && (y = be(A, y, a, I.transformUniforms.edges));
895
+ I.transformUniforms?.edges && (y = ge(A, y, a, I.transformUniforms.edges));
931
896
  }
932
897
  } else {
933
898
  m.cleanupCallbacks.forEach((w) => {
934
899
  try {
935
900
  w();
936
- } catch (V) {
937
- console.error("Cleanup error:", V);
901
+ } catch (q) {
902
+ console.error("Cleanup error:", q);
938
903
  }
939
904
  }), m.cleanupCallbacks = [], m.beforeRenderCallbacks = [], m.afterRenderCallbacks = [], m.resizeCallbacks = [];
940
905
  const g = (w) => m.cleanupCallbacks.push(w), a = (w) => m.beforeRenderCallbacks.push(w), A = (w) => m.afterRenderCallbacks.push(w), I = (w) => m.resizeCallbacks.push(w);
941
906
  let x = v;
942
- m.requiresRTT && v !== void 0 && (x = j(S(0, 0, 0, 0), v, "normal", 1)), y = ee(re(m.fragmentNodeFunc({
907
+ m.requiresRTT && v !== void 0 && (x = W(S(0, 0, 0, 0), v, "normal", 1)), y = K(te(m.fragmentNodeFunc({
943
908
  uniforms: m.uniforms ?? {},
944
909
  childNode: x,
945
910
  onCleanup: g,
@@ -948,18 +913,18 @@ function mi() {
948
913
  onResize: I,
949
914
  canvas: e,
950
915
  dimensions: {
951
- width: z,
952
- height: E
916
+ width: D,
917
+ height: z
953
918
  },
954
919
  renderer: n
955
920
  }), m), m, m.id, r);
956
921
  }
957
922
  }
958
- m.requiresChild && m.metadata.blendMode === "normal" && !$ ? v = j(S(0, 0, 0, 0), y, "normal", m.opacityUniform) : v === void 0 ? v = j(S(1, 1, 1, 0), y, m.metadata.blendMode, m.opacityUniform) : v = j(v, y, m.metadata.blendMode, m.opacityUniform);
923
+ m.requiresChild && m.metadata.blendMode === "normal" && !E ? v = W(S(0, 0, 0, 0), y, "normal", m.opacityUniform) : v === void 0 ? v = W(S(1, 1, 1, 0), y, m.metadata.blendMode, m.opacityUniform) : v = W(v, y, m.metadata.blendMode, m.opacityUniform);
959
924
  }
960
925
  return v ?? S(0, 0, 0, 0);
961
- }, W = (i, r = /* @__PURE__ */ new Set(), o, f = !1) => {
962
- if (z === 0 || E === 0) return S(0, 0, 0, 0);
926
+ }, H = (i, r = /* @__PURE__ */ new Set(), o, f = !1) => {
927
+ if (D === 0 || z === 0) return S(0, 0, 0, 0);
963
928
  const s = h.nodes.get(i);
964
929
  if (!s) return S(0, 0, 0, 0);
965
930
  const v = (y) => {
@@ -970,15 +935,15 @@ function mi() {
970
935
  s.afterRenderCallbacks.push(y);
971
936
  }, M = (y) => {
972
937
  s.resizeCallbacks.push(y);
973
- }, $ = Y(i);
974
- if ($.length === 0)
975
- return s.requiresRTT && !ne ? S(0, 0, 0, 0) : (s.cleanupCallbacks.forEach((y) => {
938
+ }, E = X(i);
939
+ if (E.length === 0)
940
+ return s.requiresRTT && !ee ? S(0, 0, 0, 0) : (s.cleanupCallbacks.forEach((y) => {
976
941
  try {
977
942
  y();
978
943
  } catch (C) {
979
944
  console.error("Error in cleanup callback:", C);
980
945
  }
981
- }), s.cleanupCallbacks = [], s.beforeRenderCallbacks = [], s.afterRenderCallbacks = [], s.resizeCallbacks = [], ee(re(s.fragmentNodeFunc({
946
+ }), s.cleanupCallbacks = [], s.beforeRenderCallbacks = [], s.afterRenderCallbacks = [], s.resizeCallbacks = [], K(te(s.fragmentNodeFunc({
982
947
  uniforms: s.uniforms ?? {},
983
948
  childNode: void 0,
984
949
  onCleanup: v,
@@ -987,80 +952,80 @@ function mi() {
987
952
  onResize: M,
988
953
  canvas: e,
989
954
  dimensions: {
990
- width: z,
991
- height: E
955
+ width: D,
956
+ height: z
992
957
  },
993
958
  renderer: n
994
959
  }), s), s, i, r));
995
960
  {
996
- const y = [...$].sort((C, g) => C.metadata.renderOrder - g.metadata.renderOrder);
961
+ const y = [...E].sort((C, g) => C.metadata.renderOrder - g.metadata.renderOrder);
997
962
  if (s.parentId === null) {
998
- if (!f && We(y)) return ee(re(je(y, r, o), s), s, i, r);
963
+ if (!f && He(y)) return K(te(We(y, r, o), s), s, i, r);
999
964
  let C;
1000
965
  for (let g = 0; g < y.length; g++) {
1001
966
  const a = y[g];
1002
967
  let A;
1003
968
  if (a.metadata.opacity === void 0 ? (A = 1, a.opacityUniform.value = A) : (A = a.metadata.opacity, a.opacityUniform.value = A), a.metadata.visible === !1) continue;
1004
969
  o && o.add(a.id);
1005
- const I = Y(a.id).length > 0;
970
+ const I = X(a.id).length > 0;
1006
971
  let x;
1007
- if (I) if (f) x = W(a.id, r, o, !0);
1008
- else if (ke(a)) x = _e(a.id, r, o);
1009
- else if (H(a)) {
1010
- const w = Be(a.id);
1011
- w.length > 1 ? x = Ve(w, r, o) : x = W(a.id, r, o);
1012
- } else x = W(a.id, r, o);
972
+ if (I) if (f) x = H(a.id, r, o, !0);
973
+ else if (Te(a)) x = Be(a.id, r, o);
974
+ else if (Y(a)) {
975
+ const w = Oe(a.id);
976
+ w.length > 1 ? x = qe(w, r, o) : x = H(a.id, r, o);
977
+ } else x = H(a.id, r, o);
1013
978
  else {
1014
- if (H(a) && a.requiresChild && C !== void 0) {
1015
- const w = He(y, g);
979
+ if (Y(a) && a.requiresChild && C !== void 0) {
980
+ const w = Ye(y, g);
1016
981
  if (w.length > 1) {
1017
982
  x = Ie(w, C, o), g += w.length - 1, C = x;
1018
983
  continue;
1019
984
  }
1020
985
  }
1021
- if (a.requiresRTT && !ne) x = S(0, 0, 0, 0);
986
+ if (a.requiresRTT && !ee) x = S(0, 0, 0, 0);
1022
987
  else {
1023
- const w = (q) => {
1024
- a.cleanupCallbacks.push(q);
1025
- }, V = (q) => {
1026
- a.beforeRenderCallbacks.push(q);
1027
- }, F = (q) => {
1028
- a.afterRenderCallbacks.push(q);
1029
- }, O = (q) => {
1030
- a.resizeCallbacks.push(q);
988
+ const w = (V) => {
989
+ a.cleanupCallbacks.push(V);
990
+ }, q = (V) => {
991
+ a.beforeRenderCallbacks.push(V);
992
+ }, $ = (V) => {
993
+ a.afterRenderCallbacks.push(V);
994
+ }, F = (V) => {
995
+ a.resizeCallbacks.push(V);
1031
996
  };
1032
- let ye = C;
1033
- a.requiresRTT && C !== void 0 && (ye = j(S(0, 0, 0, 0), C, "normal", 1)), a.cleanupCallbacks.forEach((q) => {
997
+ let ke = C;
998
+ a.requiresRTT && C !== void 0 && (ke = W(S(0, 0, 0, 0), C, "normal", 1)), a.cleanupCallbacks.forEach((V) => {
1034
999
  try {
1035
- q();
1036
- } catch (Pn) {
1037
- console.error("Error in cleanup callback:", Pn);
1000
+ V();
1001
+ } catch (Ln) {
1002
+ console.error("Error in cleanup callback:", Ln);
1038
1003
  }
1039
- }), a.cleanupCallbacks = [], a.beforeRenderCallbacks = [], a.afterRenderCallbacks = [], a.resizeCallbacks = [], x = ee(re(a.fragmentNodeFunc({
1004
+ }), a.cleanupCallbacks = [], a.beforeRenderCallbacks = [], a.afterRenderCallbacks = [], a.resizeCallbacks = [], x = K(te(a.fragmentNodeFunc({
1040
1005
  uniforms: a.uniforms ?? {},
1041
- childNode: ye,
1006
+ childNode: ke,
1042
1007
  onCleanup: w,
1043
- onBeforeRender: V,
1044
- onAfterRender: F,
1045
- onResize: O,
1008
+ onBeforeRender: q,
1009
+ onAfterRender: $,
1010
+ onResize: F,
1046
1011
  canvas: e,
1047
1012
  dimensions: {
1048
- width: z,
1049
- height: E
1013
+ width: D,
1014
+ height: z
1050
1015
  },
1051
1016
  renderer: n
1052
1017
  }), a), a, a.id, r);
1053
1018
  }
1054
1019
  }
1055
- a.requiresChild && a.metadata.blendMode === "normal" && !I ? C = j(S(0, 0, 0, 0), x, "normal", a.opacityUniform) : C === void 0 ? s.requiresRTT || A !== 1 ? C = j(S(1, 1, 1, 0), x, a.metadata.blendMode, a.opacityUniform) : C = x : C = j(C, x, a.metadata.blendMode, a.opacityUniform);
1020
+ a.requiresChild && a.metadata.blendMode === "normal" && !I ? C = W(S(0, 0, 0, 0), x, "normal", a.opacityUniform) : C === void 0 ? s.requiresRTT || A !== 1 ? C = W(S(1, 1, 1, 0), x, a.metadata.blendMode, a.opacityUniform) : C = x : C = W(C, x, a.metadata.blendMode, a.opacityUniform);
1056
1021
  }
1057
- return s.requiresRTT && !ne ? S(0, 0, 0, 0) : (s.cleanupCallbacks.forEach((g) => {
1022
+ return s.requiresRTT && !ee ? S(0, 0, 0, 0) : (s.cleanupCallbacks.forEach((g) => {
1058
1023
  try {
1059
1024
  g();
1060
1025
  } catch (a) {
1061
1026
  console.error("Error in cleanup callback:", a);
1062
1027
  }
1063
- }), s.cleanupCallbacks = [], s.beforeRenderCallbacks = [], s.afterRenderCallbacks = [], s.resizeCallbacks = [], ee(re(s.fragmentNodeFunc({
1028
+ }), s.cleanupCallbacks = [], s.beforeRenderCallbacks = [], s.afterRenderCallbacks = [], s.resizeCallbacks = [], K(te(s.fragmentNodeFunc({
1064
1029
  uniforms: s.uniforms ?? {},
1065
1030
  childNode: C,
1066
1031
  onCleanup: v,
@@ -1069,15 +1034,15 @@ function mi() {
1069
1034
  onResize: M,
1070
1035
  canvas: e,
1071
1036
  dimensions: {
1072
- width: z,
1073
- height: E
1037
+ width: D,
1038
+ height: z
1074
1039
  },
1075
1040
  renderer: n
1076
1041
  }), s), s, i, r));
1077
1042
  } else {
1078
- if (!f && We(y)) {
1079
- const g = je(y, r, o);
1080
- return ee(re(s.fragmentNodeFunc({
1043
+ if (!f && He(y)) {
1044
+ const g = We(y, r, o);
1045
+ return K(te(s.fragmentNodeFunc({
1081
1046
  uniforms: s.uniforms ?? {},
1082
1047
  childNode: g,
1083
1048
  onCleanup: v,
@@ -1086,8 +1051,8 @@ function mi() {
1086
1051
  onResize: M,
1087
1052
  canvas: e,
1088
1053
  dimensions: {
1089
- width: z,
1090
- height: E
1054
+ width: D,
1055
+ height: z
1091
1056
  },
1092
1057
  renderer: n
1093
1058
  }), s), s, i, r);
@@ -1098,59 +1063,59 @@ function mi() {
1098
1063
  let A;
1099
1064
  if (a.metadata.opacity === void 0 ? (A = 1, a.opacityUniform.value = A) : (A = a.metadata.opacity, a.opacityUniform.value = A), a.metadata.visible === !1) continue;
1100
1065
  o && o.add(a.id);
1101
- const I = Y(a.id).length > 0;
1066
+ const I = X(a.id).length > 0;
1102
1067
  let x;
1103
- if (I) if (f) x = W(a.id, r, o, !0);
1104
- else if (ke(a)) x = _e(a.id, r, o);
1105
- else if (H(a)) {
1106
- const w = Be(a.id);
1107
- w.length > 1 ? x = Ve(w, r, o) : x = W(a.id, r, o);
1108
- } else x = W(a.id, r, o);
1068
+ if (I) if (f) x = H(a.id, r, o, !0);
1069
+ else if (Te(a)) x = Be(a.id, r, o);
1070
+ else if (Y(a)) {
1071
+ const w = Oe(a.id);
1072
+ w.length > 1 ? x = qe(w, r, o) : x = H(a.id, r, o);
1073
+ } else x = H(a.id, r, o);
1109
1074
  else {
1110
- if (H(a) && a.requiresChild && C !== void 0) {
1111
- const w = He(y, g);
1075
+ if (Y(a) && a.requiresChild && C !== void 0) {
1076
+ const w = Ye(y, g);
1112
1077
  if (w.length > 1) {
1113
1078
  x = Ie(w, C, o), g += w.length - 1, C = x;
1114
1079
  continue;
1115
1080
  }
1116
1081
  }
1117
- if (a.requiresRTT && !ne) x = S(0, 0, 0, 0);
1082
+ if (a.requiresRTT && !ee) x = S(0, 0, 0, 0);
1118
1083
  else {
1119
- const w = (q) => {
1120
- a.cleanupCallbacks.push(q);
1121
- }, V = (q) => {
1122
- a.beforeRenderCallbacks.push(q);
1123
- }, F = (q) => {
1124
- a.afterRenderCallbacks.push(q);
1125
- }, O = (q) => {
1126
- a.resizeCallbacks.push(q);
1084
+ const w = (V) => {
1085
+ a.cleanupCallbacks.push(V);
1086
+ }, q = (V) => {
1087
+ a.beforeRenderCallbacks.push(V);
1088
+ }, $ = (V) => {
1089
+ a.afterRenderCallbacks.push(V);
1090
+ }, F = (V) => {
1091
+ a.resizeCallbacks.push(V);
1127
1092
  };
1128
- let ye = C;
1129
- a.requiresRTT && C !== void 0 && (ye = j(S(0, 0, 0, 0), C, "normal", 1)), a.cleanupCallbacks = [], a.beforeRenderCallbacks = [], a.afterRenderCallbacks = [], a.resizeCallbacks = [], x = ee(re(a.fragmentNodeFunc({
1093
+ let ke = C;
1094
+ a.requiresRTT && C !== void 0 && (ke = W(S(0, 0, 0, 0), C, "normal", 1)), a.cleanupCallbacks = [], a.beforeRenderCallbacks = [], a.afterRenderCallbacks = [], a.resizeCallbacks = [], x = K(te(a.fragmentNodeFunc({
1130
1095
  uniforms: a.uniforms ?? {},
1131
- childNode: ye,
1096
+ childNode: ke,
1132
1097
  onCleanup: w,
1133
- onBeforeRender: V,
1134
- onAfterRender: F,
1135
- onResize: O,
1098
+ onBeforeRender: q,
1099
+ onAfterRender: $,
1100
+ onResize: F,
1136
1101
  canvas: e,
1137
1102
  dimensions: {
1138
- width: z,
1139
- height: E
1103
+ width: D,
1104
+ height: z
1140
1105
  },
1141
1106
  renderer: n
1142
1107
  }), a), a, a.id, r);
1143
1108
  }
1144
1109
  }
1145
- a.requiresChild && a.metadata.blendMode === "normal" && !I ? C = j(S(0, 0, 0, 0), x, "normal", a.opacityUniform) : C === void 0 ? s.requiresRTT || A !== 1 ? C = j(S(1, 1, 1, 0), x, a.metadata.blendMode, a.opacityUniform) : C = x : C = j(C, x, a.metadata.blendMode, a.opacityUniform);
1110
+ a.requiresChild && a.metadata.blendMode === "normal" && !I ? C = W(S(0, 0, 0, 0), x, "normal", a.opacityUniform) : C === void 0 ? s.requiresRTT || A !== 1 ? C = W(S(1, 1, 1, 0), x, a.metadata.blendMode, a.opacityUniform) : C = x : C = W(C, x, a.metadata.blendMode, a.opacityUniform);
1146
1111
  }
1147
- return s.requiresRTT && !ne ? S(0, 0, 0, 0) : (s.cleanupCallbacks.forEach((g) => {
1112
+ return s.requiresRTT && !ee ? S(0, 0, 0, 0) : (s.cleanupCallbacks.forEach((g) => {
1148
1113
  try {
1149
1114
  g();
1150
1115
  } catch (a) {
1151
1116
  console.error("Error in cleanup callback:", a);
1152
1117
  }
1153
- }), s.cleanupCallbacks = [], s.beforeRenderCallbacks = [], s.afterRenderCallbacks = [], s.resizeCallbacks = [], ee(re(s.fragmentNodeFunc({
1118
+ }), s.cleanupCallbacks = [], s.beforeRenderCallbacks = [], s.afterRenderCallbacks = [], s.resizeCallbacks = [], K(te(s.fragmentNodeFunc({
1154
1119
  uniforms: s.uniforms ?? {},
1155
1120
  childNode: C,
1156
1121
  onCleanup: v,
@@ -1159,33 +1124,33 @@ function mi() {
1159
1124
  onResize: M,
1160
1125
  canvas: e,
1161
1126
  dimensions: {
1162
- width: z,
1163
- height: E
1127
+ width: D,
1128
+ height: z
1164
1129
  },
1165
1130
  renderer: n
1166
1131
  }), s), s, i, r));
1167
1132
  }
1168
1133
  }
1169
- }, an = (i, r, o, f, s = {}, v) => {
1134
+ }, on = (i, r, o, f, s = {}, v) => {
1170
1135
  if (r === null) {
1171
- const C = te.findIndex((g) => g.id === i);
1136
+ const C = ne.findIndex((g) => g.id === i);
1172
1137
  if (C !== -1) {
1173
- te.splice(C, 1);
1138
+ ne.splice(C, 1);
1174
1139
  return;
1175
1140
  }
1176
- Qe(i);
1141
+ je(i);
1177
1142
  return;
1178
1143
  }
1179
- if (!Ne) {
1180
- const C = te.findIndex((g) => g.id === i);
1181
- C !== -1 ? te[C] = {
1144
+ if (!_e) {
1145
+ const C = ne.findIndex((g) => g.id === i);
1146
+ C !== -1 ? ne[C] = {
1182
1147
  id: i,
1183
1148
  fragmentNodeFunc: r,
1184
1149
  parentId: o,
1185
1150
  metadata: f,
1186
1151
  uniforms: s,
1187
1152
  componentDefinition: v
1188
- } : te.push({
1153
+ } : ne.push({
1189
1154
  id: i,
1190
1155
  fragmentNodeFunc: r,
1191
1156
  parentId: o,
@@ -1210,7 +1175,7 @@ function mi() {
1210
1175
  const m = G(f?.opacity !== void 0 ? f.opacity : 1);
1211
1176
  let M;
1212
1177
  if (f?.transform) {
1213
- const C = z / Math.max(1, E);
1178
+ const C = D / Math.max(1, z);
1214
1179
  M = {
1215
1180
  offsetX: G(f.transform.offsetX),
1216
1181
  offsetY: G(f.transform.offsetY),
@@ -1222,7 +1187,7 @@ function mi() {
1222
1187
  aspectRatio: G(C)
1223
1188
  };
1224
1189
  }
1225
- const $ = {
1190
+ const E = {
1226
1191
  id: i,
1227
1192
  componentName: v?.name || "Unknown",
1228
1193
  fragmentNodeFunc: r,
@@ -1249,34 +1214,28 @@ function mi() {
1249
1214
  uvTransformFunc: v?.uvTransformNode,
1250
1215
  acceptsUVContext: v?.acceptsUVContext || !1
1251
1216
  };
1252
- h.nodes.set(i, $), o === null && (h.rootId = i);
1217
+ h.nodes.set(i, E), o === null && (h.rootId = i);
1253
1218
  const y = d.get(o) || /* @__PURE__ */ new Set();
1254
- y.add(i), d.set(o, y), p && B && z > 0 && E > 0 ? ($e.includes(i) || $e.push(i), de === null && (de = requestAnimationFrame(() => {
1255
- de = null, $e = [], ue();
1256
- }))) : p && B && (pe || (pe = !0, requestAnimationFrame(() => {
1257
- pe = !1, z > 0 && E > 0 && ue();
1219
+ y.add(i), d.set(o, y), p && O && D > 0 && z > 0 ? (Ee.includes(i) || Ee.push(i), me === null && (me = requestAnimationFrame(() => {
1220
+ me = null, Ee = [], fe();
1221
+ }))) : p && O && (he || (he = !0, requestAnimationFrame(() => {
1222
+ he = !1, D > 0 && z > 0 && fe();
1258
1223
  })));
1259
- }, Dn = (i, r, o) => {
1224
+ }, Mn = (i, r, o) => {
1260
1225
  const f = h.nodes.get(i);
1261
1226
  if (!f || !f.uniforms) return;
1262
1227
  const s = f.uniforms[r];
1263
- if (!(!s || !s.uniform)) {
1264
- if (s.transform) {
1265
- const { updateUniformValue: v } = (yn(), Hn(Nr));
1266
- v(s, o);
1267
- } else s.uniform.value = o;
1268
- L && Z();
1269
- }
1270
- }, zn = (i, r) => {
1228
+ !s || !s.uniform || (s.transform ? Br(s, o) : s.uniform.value = o, L && Z());
1229
+ }, xn = (i, r) => {
1271
1230
  const o = h.nodes.get(i);
1272
1231
  if (!o) return;
1273
1232
  let f = !1;
1274
1233
  r.blendMode !== void 0 && o.metadata.blendMode !== r.blendMode && (o.metadata.blendMode = r.blendMode, f = !0), r.opacity !== void 0 && o.metadata.opacity !== r.opacity && (o.metadata.opacity = r.opacity, o.opacityUniform.value = r.opacity), r.renderOrder !== void 0 && o.metadata.renderOrder !== r.renderOrder && (o.metadata.renderOrder = r.renderOrder, f = !0);
1275
1234
  const s = r.visible !== !1;
1276
1235
  if (o.metadata.visible !== s && (o.metadata.visible = s, f = !0), r.id !== void 0 && o.metadata.id !== r.id && (o.metadata.id = r.id, f = !0), r.mask !== void 0 && (o.metadata.mask?.source !== r.mask?.source || o.metadata.mask?.type !== r.mask?.type) && (o.metadata.mask = r.mask, f = !0), r.transform !== void 0) {
1277
- const v = o.metadata.transform ? oe(o.metadata.transform) : !1, b = oe(r.transform);
1236
+ const v = o.metadata.transform ? re(o.metadata.transform) : !1, b = re(r.transform);
1278
1237
  if (o.metadata.transform = r.transform, !o.transformUniforms && r.transform) {
1279
- const m = z / Math.max(1, E);
1238
+ const m = D / Math.max(1, z);
1280
1239
  o.transformUniforms = {
1281
1240
  offsetX: G(r.transform.offsetX),
1282
1241
  offsetY: G(r.transform.offsetY),
@@ -1290,10 +1249,10 @@ function mi() {
1290
1249
  } else o.transformUniforms && (o.transformUniforms.offsetX.value = r.transform.offsetX, o.transformUniforms.offsetY.value = r.transform.offsetY, o.transformUniforms.rotation.value = r.transform.rotation, o.transformUniforms.scale.value = r.transform.scale, o.transformUniforms.anchorX.value = r.transform.anchorX, o.transformUniforms.anchorY.value = r.transform.anchorY, o.transformUniforms.edges.value = r.transform.edges === "stretch" ? 0 : r.transform.edges === "transparent" ? 1 : r.transform.edges === "mirror" ? 2 : 3);
1291
1250
  b && !o.transformRTTActive && (o.transformRTTActive = !0, f = !0), !v && b && !o.transformRTTActive && (f = !0);
1292
1251
  }
1293
- f && p && B ? (Fe.includes(i) || Fe.push(i), he === null && (he = requestAnimationFrame(() => {
1294
- he = null, Fe = [], ue();
1252
+ f && p && O ? ($e.includes(i) || $e.push(i), de === null && (de = requestAnimationFrame(() => {
1253
+ de = null, $e = [], fe();
1295
1254
  }))) : L && Z();
1296
- }, Qe = (i) => {
1255
+ }, je = (i) => {
1297
1256
  if (!h.nodes.has(i)) return;
1298
1257
  const r = h.nodes.get(i);
1299
1258
  if (r && r.cleanupCallbacks.length > 0) for (const f of r.cleanupCallbacks) try {
@@ -1301,24 +1260,24 @@ function mi() {
1301
1260
  } catch (s) {
1302
1261
  console.error(`Error executing cleanup callback for node ${i}:`, s);
1303
1262
  }
1304
- const o = Y(i);
1305
- for (const f of o) Qe(f.id);
1263
+ const o = X(i);
1264
+ for (const f of o) je(f.id);
1306
1265
  if (h.rootId === i && (h.rootId = null), r) {
1307
1266
  const f = d.get(r.parentId);
1308
1267
  f && (f.delete(i), f.size === 0 && d.delete(r.parentId));
1309
1268
  }
1310
- h.nodes.delete(i), p && B && ue();
1311
- }, En = (i) => {
1269
+ h.nodes.delete(i), p && O && fe();
1270
+ }, An = (i) => {
1312
1271
  const r = {
1313
1272
  deltaTime: i,
1314
1273
  pointer: {
1315
- x: Ae,
1316
- y: De
1274
+ x: xe,
1275
+ y: Ae
1317
1276
  },
1318
- pointerActive: ce,
1277
+ pointerActive: le,
1319
1278
  dimensions: {
1320
- width: z,
1321
- height: E
1279
+ width: D,
1280
+ height: z
1322
1281
  }
1323
1282
  };
1324
1283
  for (const o of h.nodes.values()) if (o.beforeRenderCallbacks.length > 0) for (const f of o.beforeRenderCallbacks) try {
@@ -1326,17 +1285,17 @@ function mi() {
1326
1285
  } catch (s) {
1327
1286
  console.error(`Error executing before render callback for node ${o.id}:`, s);
1328
1287
  }
1329
- }, $n = (i) => {
1288
+ }, Dn = (i) => {
1330
1289
  const r = {
1331
1290
  deltaTime: i,
1332
1291
  pointer: {
1333
- x: Ae,
1334
- y: De
1292
+ x: xe,
1293
+ y: Ae
1335
1294
  },
1336
- pointerActive: ce,
1295
+ pointerActive: le,
1337
1296
  dimensions: {
1338
- width: z,
1339
- height: E
1297
+ width: D,
1298
+ height: z
1340
1299
  }
1341
1300
  };
1342
1301
  for (const o of h.nodes.values()) if (o.afterRenderCallbacks.length > 0) for (const f of o.afterRenderCallbacks) try {
@@ -1345,19 +1304,19 @@ function mi() {
1345
1304
  console.error(`Error executing after render callback for node ${o.id}:`, s);
1346
1305
  }
1347
1306
  }, Z = async () => {
1348
- if (!wn()) return;
1349
- const i = fe ? performance.now() : 0, r = i || performance.now(), o = Ge > 0 ? (r - Ge) / 1e3 : 0.016, f = Math.min(o, 0.1);
1350
- Ge = r, fe && performance.mark("shader-cpu-start"), En(f);
1307
+ if (!Tn()) return;
1308
+ const i = ce ? performance.now() : 0, r = i || performance.now(), o = Ge > 0 ? (r - Ge) / 1e3 : 0.016, f = Math.min(o, 0.1);
1309
+ Ge = r, ce && performance.mark("shader-cpu-start"), An(f);
1351
1310
  try {
1352
- if (ze) return;
1353
- if (fe && performance.mark("shader-gpu-start"), n.render(t, l), $n(f), fe) {
1311
+ if (De) return;
1312
+ if (ce && performance.mark("shader-gpu-start"), n.render(t, l), Dn(f), ce) {
1354
1313
  if (performance.mark("shader-gpu-end"), n instanceof Ze) try {
1355
1314
  const s = n.backend;
1356
1315
  if (s && s.get && s.get(n)) {
1357
1316
  const v = s.get(n);
1358
1317
  if (v?.timestampQuery) {
1359
1318
  const b = v.timestampQuery.getResult();
1360
- b != null && ae.recordGpuTime(b / 1e6);
1319
+ b != null && ie.recordGpuTime(b / 1e6);
1361
1320
  }
1362
1321
  }
1363
1322
  } catch {
@@ -1365,41 +1324,41 @@ function mi() {
1365
1324
  try {
1366
1325
  performance.measure("shader-gpu-time", "shader-gpu-start", "shader-gpu-end");
1367
1326
  const s = performance.getEntriesByName("shader-gpu-time")[0];
1368
- s && ae.recordGpuTime(s.duration), performance.clearMarks("shader-gpu-start"), performance.clearMarks("shader-gpu-end"), performance.clearMeasures("shader-gpu-time");
1327
+ s && ie.recordGpuTime(s.duration), performance.clearMarks("shader-gpu-start"), performance.clearMarks("shader-gpu-end"), performance.clearMeasures("shader-gpu-time");
1369
1328
  } catch {
1370
1329
  }
1371
1330
  }
1372
- if (fe) {
1331
+ if (ce) {
1373
1332
  performance.mark("shader-cpu-end");
1374
1333
  try {
1375
1334
  performance.measure("shader-cpu-time", "shader-cpu-start", "shader-cpu-end");
1376
1335
  const v = performance.getEntriesByName("shader-cpu-time")[0];
1377
- v && ae.recordCpuTime(v.duration), performance.clearMarks("shader-cpu-start"), performance.clearMarks("shader-cpu-end"), performance.clearMeasures("shader-cpu-time");
1336
+ v && ie.recordCpuTime(v.duration), performance.clearMarks("shader-cpu-start"), performance.clearMarks("shader-cpu-end"), performance.clearMeasures("shader-cpu-time");
1378
1337
  } catch {
1379
1338
  }
1380
1339
  const s = performance.now() - i;
1381
- ae.recordFrame(s);
1340
+ ie.recordFrame(s);
1382
1341
  }
1383
1342
  } catch (s) {
1384
1343
  console.error("Render frame error:", s);
1385
1344
  }
1386
- }, Fn = () => {
1387
- const i = Math.max(0, h.nodes.size - 1), r = Pe;
1388
- ae.updateNodeCounts(i, r);
1389
- }, On = () => {
1390
- Fn();
1345
+ }, zn = () => {
1346
+ const i = Math.max(0, h.nodes.size - 1), r = Ne;
1347
+ ie.updateNodeCounts(i, r);
1348
+ }, En = () => {
1349
+ zn();
1391
1350
  const i = n?.info;
1392
- return ae.getStats(i);
1393
- }, Je = () => {
1394
- if (T || !ie || !L) return;
1395
- ae.setRendering(!0);
1351
+ return ie.getStats(i);
1352
+ }, Qe = () => {
1353
+ if (T || !oe || !L) return;
1354
+ ie.setRendering(!0);
1396
1355
  const i = () => {
1397
1356
  T = requestAnimationFrame(i), Z().catch(console.warn);
1398
1357
  };
1399
1358
  i();
1400
- }, Ke = () => {
1401
- T && (cancelAnimationFrame(T), T = null), ae.setRendering(!1);
1402
- }, sn = (i) => {
1359
+ }, Je = () => {
1360
+ T && (cancelAnimationFrame(T), T = null), ie.setRendering(!1);
1361
+ }, an = (i) => {
1403
1362
  if (!e) return;
1404
1363
  let r, o;
1405
1364
  if ("touches" in i) {
@@ -1408,51 +1367,51 @@ function mi() {
1408
1367
  } else
1409
1368
  r = i.clientX, o = i.clientY;
1410
1369
  const f = e.getBoundingClientRect(), s = (r - f.left) / f.width, v = (o - f.top) / f.height;
1411
- Ae = s, De = v;
1412
- }, Bn = (i) => {
1413
- !B || !e || sn(i);
1414
- }, _n = (i) => {
1415
- !B || !e || sn(i);
1416
- }, Vn = () => {
1417
- B && (ce = !1, Z().catch(console.warn));
1418
- }, qn = () => {
1419
- B && (ce = !1, Z().catch(console.warn));
1370
+ xe = s, Ae = v;
1371
+ }, $n = (i) => {
1372
+ !O || !e || an(i);
1373
+ }, Fn = (i) => {
1374
+ !O || !e || an(i);
1375
+ }, On = () => {
1376
+ O && (le = !1, Z().catch(console.warn));
1377
+ }, Bn = () => {
1378
+ O && (le = !1, Z().catch(console.warn));
1379
+ }, sn = () => {
1380
+ le = !0, Z().catch(console.warn);
1420
1381
  }, ln = () => {
1421
- ce = !0, Z().catch(console.warn);
1422
- }, cn = () => {
1423
- ce = !0, Z().catch(console.warn);
1424
- }, Gn = () => {
1425
- if (te.length === 0) return;
1426
- const i = [...te];
1427
- te = [];
1428
- for (const { id: r, fragmentNodeFunc: o, parentId: f, metadata: s, uniforms: v, componentDefinition: b } of i) o && an(r, o, f, s, v, b);
1429
- }, Ln = async ({ canvas: i, enablePerformanceTracking: r = !1 }) => {
1430
- if (B || K) return;
1431
- fe = r, K = !0, X = new AbortController();
1432
- const o = X;
1382
+ le = !0, Z().catch(console.warn);
1383
+ }, qn = () => {
1384
+ if (ne.length === 0) return;
1385
+ const i = [...ne];
1386
+ ne = [];
1387
+ for (const { id: r, fragmentNodeFunc: o, parentId: f, metadata: s, uniforms: v, componentDefinition: b } of i) o && on(r, o, f, s, v, b);
1388
+ }, Vn = async ({ canvas: i, enablePerformanceTracking: r = !1 }) => {
1389
+ if (O || J) return;
1390
+ ce = r, J = !0, P = new AbortController();
1391
+ const o = P;
1433
1392
  try {
1434
- if (e = i, t = new Qn(), t.background = null, l = new Xn(-1, 1, 1, -1, 0.1, 10), l.position.z = 1, l.lookAt(0, 0, 0), Ee = Yr.register({
1435
- onMouseMove: Bn,
1436
- onTouchMove: _n,
1437
- onMouseUp: Vn,
1438
- onTouchEnd: qn
1439
- }), i.addEventListener("mousedown", ln), i.addEventListener("touchstart", cn), ve = () => {
1440
- fn();
1441
- }, window.addEventListener("beforeunload", ve), o.signal.aborted) return;
1393
+ if (e = i, t = new In(), t.background = null, l = new Yn(-1, 1, 1, -1, 0.1, 10), l.position.z = 1, l.lookAt(0, 0, 0), ze = qr.register({
1394
+ onMouseMove: $n,
1395
+ onTouchMove: Fn,
1396
+ onMouseUp: On,
1397
+ onTouchEnd: Bn
1398
+ }), i.addEventListener("mousedown", sn), i.addEventListener("touchstart", ln), be = () => {
1399
+ cn();
1400
+ }, window.addEventListener("beforeunload", be), o.signal.aborted) return;
1442
1401
  try {
1443
- const $ = {
1402
+ const E = {
1444
1403
  canvas: i,
1445
1404
  antialias: !0,
1446
1405
  alpha: !0,
1447
1406
  depth: !1,
1448
1407
  powerPreference: "high-performance"
1449
1408
  };
1450
- if (fe && ($.forceWebGL = !1, $.requiredFeatures = ["timestamp-query"]), n = new Ze($), await n.init(), o.signal.aborted) return;
1451
- } catch ($) {
1409
+ if (ce && (E.forceWebGL = !1, E.requiredFeatures = ["timestamp-query"]), n = new Ze(E), await n.init(), o.signal.aborted) return;
1410
+ } catch (E) {
1452
1411
  if (o.signal.aborted) return;
1453
- console.warn("[Shaders] WebGPU initialization failed, falling back to WebGL:", $);
1412
+ console.warn("[Shaders] WebGPU initialization failed, falling back to WebGL:", E);
1454
1413
  try {
1455
- if (n = new ar({
1414
+ if (n = new Kt({
1456
1415
  canvas: i,
1457
1416
  antialias: !0,
1458
1417
  alpha: !0,
@@ -1466,38 +1425,38 @@ function mi() {
1466
1425
  }
1467
1426
  }
1468
1427
  if (o.signal.aborted) return;
1469
- n.setPixelRatio(Math.min(window.devicePixelRatio, 2)), n.outputColorSpace = Yn, p = new un({ transparent: !0 }), p.fragmentNode = S(0, 0, 0, 0), u = new it(new Jn(2, 2), p), t.add(u);
1428
+ n.setPixelRatio(Math.min(window.devicePixelRatio, 2)), n.outputColorSpace = _n, p = new fn({ transparent: !0 }), p.fragmentNode = S(0, 0, 0, 0), u = new Xn(new Zn(2, 2), p), t.add(u);
1470
1429
  const f = i.parentElement;
1471
1430
  if (!f) {
1472
1431
  console.warn("[Shaders] Canvas has no parent element for resize observation");
1473
1432
  return;
1474
1433
  }
1475
- U = new ResizeObserver(Un), U.observe(f), _ = new IntersectionObserver(Sn, { threshold: 0 }), _.observe(i);
1434
+ U = new ResizeObserver(kn), U.observe(f), B = new IntersectionObserver(yn, { threshold: 0 }), B.observe(i);
1476
1435
  const s = i.getBoundingClientRect();
1477
- L = s.width > 0 && s.height > 0 && s.top < window.innerHeight && s.bottom > 0 && s.left < window.innerWidth && s.right > 0, ne = L && s.width > 0 && s.height > 0, ie = !0;
1436
+ L = s.width > 0 && s.height > 0 && s.top < window.innerHeight && s.bottom > 0 && s.left < window.innerWidth && s.right > 0, ee = L && s.width > 0 && s.height > 0, oe = !0;
1478
1437
  const { width: v, height: b } = i.getBoundingClientRect(), m = Math.round(v), M = Math.round(b);
1479
- m > 0 && M > 0 ? (Ye(m, M), P = !0, await Z()) : P = !1, ie && L && Je(), o.signal.aborted || (B = !0, Ne = !0, Gn());
1438
+ m > 0 && M > 0 ? (Xe(m, M), N = !0, await Z()) : N = !1, oe && L && Qe(), o.signal.aborted || (O = !0, _e = !0, qn());
1480
1439
  } catch (f) {
1481
1440
  console.error("[Shaders] Initialization error:", f);
1482
1441
  } finally {
1483
- K = !1, X === o && (X = null);
1442
+ J = !1, P === o && (P = null);
1484
1443
  }
1485
- }, Nn = () => {
1486
- !Hr() || Cn || (console.warn("Shaders is running in development mode. Please purchase a license at https://shaders.com to use it in production."), Cn = !0);
1487
- }, fn = () => {
1488
- if (X && X.abort(), U && (U.disconnect(), U = null), _ && (_.disconnect(), _ = null), Ee && (Ee(), Ee = null), e && (e.removeEventListener("mousedown", ln), e.removeEventListener("touchstart", cn)), ve && (window.removeEventListener("beforeunload", ve), ve = null), Ke(), on(), Ce.forEach((i) => {
1444
+ }, Gn = () => {
1445
+ !Vr() || vn || (console.warn("Shaders is running in development mode. Please purchase a license at https://shaders.com to use it in production."), vn = !0);
1446
+ }, cn = () => {
1447
+ if (P && P.abort(), U && (U.disconnect(), U = null), B && (B.disconnect(), B = null), ze && (ze(), ze = null), e && (e.removeEventListener("mousedown", sn), e.removeEventListener("touchstart", ln)), be && (window.removeEventListener("beforeunload", be), be = null), Je(), rn(), ve.forEach((i) => {
1489
1448
  try {
1490
1449
  i?.renderTarget?.dispose && i.renderTarget.dispose();
1491
1450
  } catch {
1492
1451
  }
1493
- }), Ce.clear(), h.nodes.clear(), h.rootId = null, h.idToNodeId.clear(), d.clear(), te = [], Ne = !1, $e = [], de !== null && (cancelAnimationFrame(de), de = null), Fe = [], he !== null && (cancelAnimationFrame(he), he = null), Re = null, Oe = !1, u) {
1452
+ }), ve.clear(), h.nodes.clear(), h.rootId = null, h.idToNodeId.clear(), d.clear(), ne = [], _e = !1, Ee = [], me !== null && (cancelAnimationFrame(me), me = null), $e = [], de !== null && (cancelAnimationFrame(de), de = null), Ce = null, Fe = !1, u) {
1494
1453
  t && t.remove(u);
1495
1454
  try {
1496
1455
  u.geometry && typeof u.geometry.dispose == "function" && u.geometry.dispose();
1497
1456
  } catch {
1498
1457
  }
1499
1458
  try {
1500
- u.material instanceof jn && typeof u.material.dispose == "function" && u.material.dispose();
1459
+ u.material instanceof Pn && typeof u.material.dispose == "function" && u.material.dispose();
1501
1460
  } catch {
1502
1461
  }
1503
1462
  }
@@ -1505,43 +1464,42 @@ function mi() {
1505
1464
  n.dispose();
1506
1465
  } catch {
1507
1466
  }
1508
- e = null, n = null, l = null, t = null, u = null, p = null, B = !1, K = !1, P = !1, X = null, z = 0, E = 0, L = !1, ie = !0, Ae = 0.5, De = 0.5, ce = !1;
1467
+ e = null, n = null, l = null, t = null, u = null, p = null, O = !1, J = !1, N = !1, P = null, D = 0, z = 0, L = !1, oe = !0, xe = 0.5, Ae = 0.5, le = !1;
1509
1468
  };
1510
1469
  return {
1511
- initialize: Ln,
1512
- cleanup: fn,
1513
- registerNode: an,
1514
- removeNode: Qe,
1515
- updateUniformValue: Dn,
1516
- updateNodeMetadata: zn,
1517
- showLicenseWarning: Nn,
1518
- isInitialized: () => B,
1519
- startAnimation: Je,
1520
- stopAnimation: Ke,
1521
- getPerformanceStats: On,
1470
+ initialize: Vn,
1471
+ cleanup: cn,
1472
+ registerNode: on,
1473
+ removeNode: je,
1474
+ updateUniformValue: Mn,
1475
+ updateNodeMetadata: xn,
1476
+ showLicenseWarning: Gn,
1477
+ isInitialized: () => O,
1478
+ startAnimation: Qe,
1479
+ stopAnimation: Je,
1480
+ getPerformanceStats: En,
1522
1481
  getNodeRegistry: () => ({ nodes: new Map(h.nodes) }),
1523
1482
  getRendererType: () => n ? n instanceof Ze ? "webgpu" : "webgl" : null,
1524
1483
  __testing: {
1525
- isUVComposable: H,
1526
- canSkipRTT: ke,
1527
- hasUVPropagationOpportunity: We,
1528
- needsTransformation: oe,
1529
- findUVChain: Be,
1530
- findSiblingUVChain: He,
1531
- findChildNodes: Y,
1532
- composeUVContextChain: _e,
1533
- composeUVChain: Ve,
1484
+ isUVComposable: Y,
1485
+ canSkipRTT: Te,
1486
+ hasUVPropagationOpportunity: He,
1487
+ needsTransformation: re,
1488
+ findUVChain: Oe,
1489
+ findSiblingUVChain: Ye,
1490
+ findChildNodes: X,
1491
+ composeUVContextChain: Be,
1492
+ composeUVChain: qe,
1534
1493
  composeSiblingUVChain: Ie,
1535
- composeSiblingsWithUVContext: je,
1536
- applyMaskIfNeeded: ee,
1537
- applyNodeTransformation: re,
1494
+ composeSiblingsWithUVContext: We,
1495
+ applyMaskIfNeeded: K,
1496
+ applyNodeTransformation: te,
1538
1497
  getNodeRegistry: () => h,
1539
1498
  getParentToChildren: () => d
1540
1499
  }
1541
1500
  };
1542
1501
  }
1543
- yn();
1544
- function di(e) {
1502
+ function ai(e) {
1545
1503
  const n = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), t = {
1546
1504
  processingOrder: [],
1547
1505
  maskSources: /* @__PURE__ */ new Map(),
@@ -1554,20 +1512,20 @@ function di(e) {
1554
1512
  const p = u.mask.source.startsWith("#") ? u.mask.source.substring(1) : u.mask.source, h = n.get(p);
1555
1513
  h ? (l.has(u.id) || l.set(u.id, []), l.get(u.id)?.push(h), t.maskSources.set(u.id, h)) : console.warn(`Mask source "${p}" not found for node "${u.id}"`);
1556
1514
  }
1557
- }), t.processingOrder = Ir(l, t.circularDependencies), t;
1515
+ }), t.processingOrder = Gr(l, t.circularDependencies), t;
1558
1516
  }
1559
- function Ir(e, n) {
1517
+ function Gr(e, n) {
1560
1518
  const l = [], t = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
1561
1519
  function p(d, T = []) {
1562
1520
  if (t.has(d)) return;
1563
1521
  if (u.has(d)) {
1564
- const _ = [...T.slice(T.indexOf(d)), d];
1565
- n.push(_);
1522
+ const B = [...T.slice(T.indexOf(d)), d];
1523
+ n.push(B);
1566
1524
  return;
1567
1525
  }
1568
1526
  u.add(d), T.push(d);
1569
1527
  const U = e.get(d) || [];
1570
- for (const _ of U) p(_, [...T]);
1528
+ for (const B of U) p(B, [...T]);
1571
1529
  u.delete(d), t.add(d), l.push(d);
1572
1530
  }
1573
1531
  for (const d of e.keys()) t.has(d) || p(d);
@@ -1575,82 +1533,76 @@ function Ir(e, n) {
1575
1533
  for (const d of h) !t.has(d) && !e.has(d) && l.push(d);
1576
1534
  return l.reverse();
1577
1535
  }
1578
- D();
1579
- var { vec2: Wr, fract: jr, sin: Qr, dot: Jr } = me;
1580
- const Kr = (e) => jr(Qr(Jr(e, Wr(12.12345, 78.12345))).mul(40000.12345)), hi = (e = 0.03) => (n) => Kr(n).mul(e).mul(0.10012345);
1581
- D();
1582
- var { vec2: Zr } = me;
1583
- const pi = (e = Zr(0), n = 0.02, l = 1, t = 1) => {
1584
- const { vec2: u, sin: p, cos: h, time: d } = me, T = t * 1.618033988749895, U = t * 2.718281828459045, _ = (Math.sin(t) + 2) * 5, B = (Math.cos(t) + 2) * 5, K = u(p(e.x.mul(l).mul(_).add(d.mul(0.1)).add(T)), h(e.y.mul(l).mul(_).add(d.mul(0.1)).add(U))), P = u(p(e.y.mul(l).mul(B).add(d.mul(0.05)).add(U)), h(e.x.mul(l).mul(B).add(d.mul(0.05)).add(T))), X = K.add(P).mul(n);
1585
- return e.add(X);
1586
- };
1587
- D();
1588
- const gi = (e, n, l = 0.6, t = 0.3, u = 1) => {
1589
- const { max: p, smoothstep: h, vec4: d } = me, T = p(p(e.r, e.g), e.b), U = h(l, l + t, T).mul(u).mul(1);
1536
+ var { vec2: Lr, fract: _r, sin: Nr, dot: Pr } = ue;
1537
+ const Xr = (e) => _r(Nr(Pr(e, Lr(12.12345, 78.12345))).mul(40000.12345)), si = (e = 0.03) => (n) => Xr(n).mul(e).mul(0.10012345);
1538
+ var { vec2: Yr } = ue;
1539
+ const li = (e = Yr(0), n = 0.02, l = 1, t = 1) => {
1540
+ const { vec2: u, sin: p, cos: h, time: d } = ue, T = t * 1.618033988749895, U = t * 2.718281828459045, B = (Math.sin(t) + 2) * 5, O = (Math.cos(t) + 2) * 5, J = u(p(e.x.mul(l).mul(B).add(d.mul(0.1)).add(T)), h(e.y.mul(l).mul(B).add(d.mul(0.1)).add(U))), N = u(p(e.y.mul(l).mul(O).add(d.mul(0.05)).add(U)), h(e.x.mul(l).mul(O).add(d.mul(0.05)).add(T))), P = J.add(N).mul(n);
1541
+ return e.add(P);
1542
+ }, ci = (e, n, l = 0.6, t = 0.3, u = 1) => {
1543
+ const { max: p, smoothstep: h, vec4: d } = ue, T = p(p(e.r, e.g), e.b), U = h(l, l + t, T).mul(u).mul(1);
1590
1544
  return d(e.rgb.add(n.rgb.mul(U)), e.a);
1545
+ }, fi = (e = {}) => {
1546
+ const { inset: n = 0.4, softness: l = 0.5, offsetX: t = 0, offsetY: u = 0 } = e, { float: p, smoothstep: h, uv: d } = ue, T = d(), U = T.x.sub(0.5).sub(p(t)).mul(2), B = T.y.sub(0.5).add(p(u)).mul(2), O = U.mul(U).add(B.mul(B)).sqrt();
1547
+ return p(1).sub(h(p(1).sub(p(n)), p(1).sub(p(n)).add(p(l)), O.mul(p(1).add(p(l)))));
1591
1548
  };
1592
- D();
1593
- const bi = (e = {}) => {
1594
- const { inset: n = 0.4, softness: l = 0.5, offsetX: t = 0, offsetY: u = 0 } = e, { float: p, smoothstep: h, uv: d } = me, T = d(), U = T.x.sub(0.5).sub(p(t)).mul(2), _ = T.y.sub(0.5).add(p(u)).mul(2), B = U.mul(U).add(_.mul(_)).sqrt();
1595
- return p(1).sub(h(p(1).sub(p(n)), p(1).sub(p(n)).add(p(l)), B.mul(p(1).add(p(l)))));
1596
- };
1597
- var eo = () => {
1549
+ var Ir = () => {
1598
1550
  const e = {};
1599
1551
  return Object.entries({
1600
- AngularBlur: at,
1601
- Ascii: st,
1602
- Blob: lt,
1603
- Blur: ct,
1604
- Bulge: ft,
1605
- ChannelBlur: ut,
1606
- Checkerboard: mt,
1607
- ChromaFlow: dt,
1608
- ChromaticAberration: ht,
1609
- Circle: pt,
1610
- CRTScreen: gt,
1611
- CursorTrail: bt,
1612
- DiffuseBlur: vt,
1613
- Dither: Ct,
1614
- DotGrid: Rt,
1615
- Duotone: Tt,
1616
- FilmGrain: kt,
1617
- FloatingParticles: yt,
1618
- GlassTiles: wt,
1619
- Glow: Ut,
1620
- Godrays: St,
1621
- Grayscale: Mt,
1622
- Grid: xt,
1623
- GridDistortion: At,
1624
- Group: Dt,
1625
- Halftone: zt,
1626
- HueShift: Et,
1627
- ImageTexture: $t,
1628
- Invert: Ft,
1629
- LinearBlur: Ot,
1630
- LinearGradient: Bt,
1631
- Liquify: _t,
1632
- Pixelate: Vt,
1633
- PolarCoordinates: qt,
1634
- Posterize: Gt,
1635
- ProgressiveBlur: Lt,
1636
- RadialGradient: Nt,
1637
- RectangularCoordinates: Pt,
1638
- Ripples: Xt,
1639
- Saturation: Yt,
1640
- SimplexNoise: Ht,
1641
- SineWave: It,
1642
- SolidColor: Wt,
1643
- Spherize: jt,
1644
- Spiral: Qt,
1645
- Strands: Jt,
1646
- Stretch: Kt,
1647
- Swirl: Zt,
1648
- TiltShift: er,
1649
- Tritone: nr,
1650
- Twirl: tr,
1651
- Vibrance: rr,
1652
- WaveDistortion: or,
1653
- ZoomBlur: ir
1552
+ AngularBlur: Kn,
1553
+ Ascii: et,
1554
+ Blob: nt,
1555
+ Blur: tt,
1556
+ Bulge: rt,
1557
+ ChannelBlur: ot,
1558
+ Checkerboard: it,
1559
+ ChromaFlow: at,
1560
+ ChromaticAberration: st,
1561
+ Circle: lt,
1562
+ CRTScreen: ct,
1563
+ CursorTrail: ft,
1564
+ DiffuseBlur: ut,
1565
+ Dither: mt,
1566
+ DotGrid: dt,
1567
+ Duotone: ht,
1568
+ FilmGrain: pt,
1569
+ FloatingParticles: gt,
1570
+ GlassTiles: bt,
1571
+ Glow: vt,
1572
+ Godrays: Ct,
1573
+ Grayscale: Rt,
1574
+ Grid: Tt,
1575
+ GridDistortion: kt,
1576
+ Group: yt,
1577
+ Halftone: wt,
1578
+ HueShift: Ut,
1579
+ ImageTexture: St,
1580
+ Invert: Mt,
1581
+ LinearBlur: xt,
1582
+ LinearGradient: At,
1583
+ Liquify: Dt,
1584
+ Pixelate: zt,
1585
+ PolarCoordinates: Et,
1586
+ Posterize: $t,
1587
+ ProgressiveBlur: Ft,
1588
+ RadialGradient: Ot,
1589
+ RectangularCoordinates: Bt,
1590
+ Ripples: qt,
1591
+ Saturation: Vt,
1592
+ SimplexNoise: Gt,
1593
+ SineWave: Lt,
1594
+ SolidColor: _t,
1595
+ Spherize: Nt,
1596
+ Spiral: Pt,
1597
+ Strands: Xt,
1598
+ Stretch: Yt,
1599
+ Swirl: It,
1600
+ TiltShift: Ht,
1601
+ Tritone: Wt,
1602
+ Twirl: jt,
1603
+ Vibrance: Qt,
1604
+ WaveDistortion: Jt,
1605
+ ZoomBlur: Zt
1654
1606
  }).forEach(([l, t]) => {
1655
1607
  const u = {};
1656
1608
  t.props && Object.entries(t.props).forEach(([p, h]) => {
@@ -1668,33 +1620,33 @@ var eo = () => {
1668
1620
  };
1669
1621
  }), e;
1670
1622
  };
1671
- const qe = eo();
1672
- function vi() {
1673
- return Object.values(qe);
1623
+ const Ve = Ir();
1624
+ function ui() {
1625
+ return Object.values(Ve);
1674
1626
  }
1675
- function Ci(e) {
1676
- return qe[e];
1627
+ function mi(e) {
1628
+ return Ve[e];
1677
1629
  }
1678
- function Ri(e) {
1679
- return Object.values(qe).filter((n) => n.category === e);
1630
+ function di(e) {
1631
+ return Object.values(Ve).filter((n) => n.category === e);
1680
1632
  }
1681
- function Ti() {
1682
- const e = new Set(Object.values(qe).map((n) => n.category));
1633
+ function hi() {
1634
+ const e = new Set(Object.values(Ve).map((n) => n.category));
1683
1635
  return Array.from(e).sort();
1684
1636
  }
1685
1637
  export {
1686
- io as createAnimatedTime,
1687
- Pr as createUniformsMap,
1688
- pi as distort,
1689
- bi as edgeMask,
1690
- vi as getAllShaders,
1691
- Ci as getShaderByName,
1692
- Ti as getShaderCategories,
1693
- Ri as getShadersByCategory,
1694
- gi as glow,
1695
- hi as grain,
1696
- di as resolveMaskDependencies,
1697
- qe as shaderRegistry,
1698
- mi as shaderRenderer,
1699
- Xr as updateUniformValue
1638
+ Jr as createAnimatedTime,
1639
+ oi as createUniformsMap,
1640
+ li as distort,
1641
+ fi as edgeMask,
1642
+ ui as getAllShaders,
1643
+ mi as getShaderByName,
1644
+ hi as getShaderCategories,
1645
+ di as getShadersByCategory,
1646
+ ci as glow,
1647
+ si as grain,
1648
+ ai as resolveMaskDependencies,
1649
+ Ve as shaderRegistry,
1650
+ ii as shaderRenderer,
1651
+ Br as updateUniformValue
1700
1652
  };