framefields 2.0.9 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -6
- package/dist/audio/index.d.mts +4 -4
- package/dist/audio/index.mjs +10 -10
- package/dist/{audio-BxA0sL9z.d.mts → audio-BHanw8Jb.d.mts} +3 -3
- package/dist/{audio-BxA0sL9z.d.mts.map → audio-BHanw8Jb.d.mts.map} +1 -1
- package/dist/{audio-Dev4NGPa.mjs → audio-COOMNwL5.mjs} +4 -4
- package/dist/{audio-Dev4NGPa.mjs.map → audio-COOMNwL5.mjs.map} +1 -1
- package/dist/{dist-CoSg-CWr.mjs → dist-BAVZdFEJ.mjs} +3 -3
- package/dist/{dist-CoSg-CWr.mjs.map → dist-BAVZdFEJ.mjs.map} +1 -1
- package/dist/{dist-DzUJmIHt.mjs → dist-BYqNNwsl.mjs} +2 -2
- package/dist/{dist-DzUJmIHt.mjs.map → dist-BYqNNwsl.mjs.map} +1 -1
- package/dist/{dist-B9Afsv83.mjs → dist-CbG3QxDw.mjs} +651 -2
- package/dist/dist-CbG3QxDw.mjs.map +1 -0
- package/dist/{dist-DgfykO99.mjs → dist-Cxi68OuY.mjs} +5347 -3286
- package/dist/dist-Cxi68OuY.mjs.map +1 -0
- package/dist/effects/index.d.mts +4 -4
- package/dist/effects/index.mjs +25 -25
- package/dist/{effects-hxRwxjyC.mjs → effects-DzbjFhyA.mjs} +3 -3
- package/dist/{effects-hxRwxjyC.mjs.map → effects-DzbjFhyA.mjs.map} +1 -1
- package/dist/fonts/index.d.mts +2 -2
- package/dist/fonts/index.mjs +1 -1
- package/dist/{fonts-BznIea-I.mjs → fonts-C0W6TgJk.mjs} +52 -5
- package/dist/fonts-C0W6TgJk.mjs.map +1 -0
- package/dist/{index-J9CIK_nu.d.mts → index-9B8CJowc.d.mts} +2 -2
- package/dist/{index-J9CIK_nu.d.mts.map → index-9B8CJowc.d.mts.map} +1 -1
- package/dist/{index-CvDVpaKn.d.mts → index-CDoTrMs1.d.mts} +4 -4
- package/dist/{index-CvDVpaKn.d.mts.map → index-CDoTrMs1.d.mts.map} +1 -1
- package/dist/{index-BXNNJVs8.d.mts → index-CYGpSVsf.d.mts} +2 -2
- package/dist/{index-BXNNJVs8.d.mts.map → index-CYGpSVsf.d.mts.map} +1 -1
- package/dist/{index-D1zaOwEU.d.mts → index-DDEPvMww.d.mts} +520 -71
- package/dist/index-DDEPvMww.d.mts.map +1 -0
- package/dist/{index-oodg5k9K.d.mts → index-DGJp1d30.d.mts} +3 -3
- package/dist/{index-oodg5k9K.d.mts.map → index-DGJp1d30.d.mts.map} +1 -1
- package/dist/{index-fo4E7A6C.d.mts → index-DRZu3ezy.d.mts} +3 -3
- package/dist/{index-fo4E7A6C.d.mts.map → index-DRZu3ezy.d.mts.map} +1 -1
- package/dist/{index-CQcdKyxF.d.mts → index-DnWsbbuZ.d.mts} +54 -2
- package/dist/index-DnWsbbuZ.d.mts.map +1 -0
- package/dist/index.d.mts +398 -18
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +633 -57
- package/dist/index.mjs.map +1 -1
- package/dist/preview/index.d.mts +2 -2
- package/dist/preview/index.mjs +10 -10
- package/dist/{preview-DZTbEON9.mjs → preview-BV2C4Fk6.mjs} +2 -2
- package/dist/{preview-DZTbEON9.mjs.map → preview-BV2C4Fk6.mjs.map} +1 -1
- package/dist/preview-engine/{chunk-VVLM6LZ3.mjs → chunk-6256GQFP.mjs} +1 -1
- package/dist/preview-engine/{chunk-VWLR2AZR.mjs → chunk-AEK5BO3J.mjs} +1 -1
- package/dist/preview-engine/{chunk-YG35X5R5.mjs → chunk-AWTH2WZO.mjs} +1 -1
- package/dist/preview-engine/{chunk-7DIAFPQP.mjs → chunk-ECPP3UG6.mjs} +1 -1
- package/dist/preview-engine/{chunk-5JD65JSJ.mjs → chunk-FGHOHCFG.mjs} +1 -1
- package/dist/preview-engine/chunk-IMV5SBQV.mjs +1 -0
- package/dist/preview-engine/chunk-IQKIHFNZ.mjs +1 -0
- package/dist/preview-engine/chunk-L3IEJZ5S.mjs +474 -0
- package/dist/preview-engine/chunk-M7NMFDJ3.mjs +3 -0
- package/dist/preview-engine/chunk-MJM3NFEC.mjs +315 -0
- package/dist/preview-engine/chunk-NFAGEP43.mjs +1448 -0
- package/dist/preview-engine/{chunk-5PPSCISJ.mjs → chunk-Q66QQI6N.mjs} +1 -1
- package/dist/preview-engine/{chunk-JAOXXYXG.mjs → chunk-QYRDQMNB.mjs} +1 -1
- package/dist/preview-engine/{chunk-XCYFPA34.mjs → chunk-RJUAM52F.mjs} +1 -1
- package/dist/preview-engine/chunk-VRGREB3V.mjs +1 -0
- package/dist/preview-engine/{chunk-AW7HNZKR.mjs → chunk-Y6HWYPKX.mjs} +1 -1
- package/dist/preview-engine/effects.mjs +1 -1
- package/dist/preview-engine/fonts.mjs +1 -1
- package/dist/preview-engine/framefields.mjs +27 -27
- package/dist/preview-engine/player.mjs +1 -1
- package/dist/preview-engine/renderers-5BV6JGTU.mjs +248 -0
- package/dist/preview-engine/renderers-7X2W6QWX.mjs +1 -0
- package/dist/preview-engine/renderers-EOJMPPAQ.mjs +1 -0
- package/dist/preview-engine/renderers-G5KQISVL.mjs +1 -0
- package/dist/preview-engine/renderers-GMX2ZQDG.mjs +1 -0
- package/dist/preview-engine/renderers-TVTQ2R74.mjs +1 -0
- package/dist/preview-engine/renderers-ZIMBODX6.mjs +1 -0
- package/dist/{program-C797QMRL.mjs → program-BmNKgzja.mjs} +281 -23
- package/dist/program-BmNKgzja.mjs.map +1 -0
- package/dist/renderer/index.d.mts +2 -2
- package/dist/renderer/index.mjs +2 -2
- package/dist/{renderer-D-4Yh-RK.mjs → renderer-1VuQTY1Z.mjs} +2 -2
- package/dist/{renderer-D-4Yh-RK.mjs.map → renderer-1VuQTY1Z.mjs.map} +1 -1
- package/dist/renderer-6oMSare3.mjs +3 -0
- package/dist/renderer-B1ComPb2.mjs +3 -0
- package/dist/{renderer-DgSO5OO0.mjs → renderer-B1YMwl2B.mjs} +1 -1
- package/dist/{renderer-9QCHY8Kh.mjs → renderer-B2ieylQ3.mjs} +2 -2
- package/dist/{renderer-9QCHY8Kh.mjs.map → renderer-B2ieylQ3.mjs.map} +1 -1
- package/dist/{renderer-CuqhAB4i.mjs → renderer-B8-kzZdP.mjs} +2 -2
- package/dist/{renderer-CuqhAB4i.mjs.map → renderer-B8-kzZdP.mjs.map} +1 -1
- package/dist/{renderer-Dn8v2o9L.mjs → renderer-B8UaFNqb.mjs} +3 -3
- package/dist/{renderer-Dn8v2o9L.mjs.map → renderer-B8UaFNqb.mjs.map} +1 -1
- package/dist/{renderer-DPpgBTlK.mjs → renderer-BDbTWSpP.mjs} +3 -3
- package/dist/{renderer-DPpgBTlK.mjs.map → renderer-BDbTWSpP.mjs.map} +1 -1
- package/dist/{renderer-CrVAvP92.mjs → renderer-BIIWCg_J.mjs} +3 -3
- package/dist/{renderer-CrVAvP92.mjs.map → renderer-BIIWCg_J.mjs.map} +1 -1
- package/dist/{renderer-5jfDUKd4.mjs → renderer-BJ1aTkZf.mjs} +3 -3
- package/dist/{renderer-5jfDUKd4.mjs.map → renderer-BJ1aTkZf.mjs.map} +1 -1
- package/dist/renderer-BQ5Bz5D0.mjs +3 -0
- package/dist/{renderer-D6Gi_h4K.mjs → renderer-BSaYG8aw.mjs} +1 -1
- package/dist/{renderer-2NQWaZd7.d.mts → renderer-BTdOMMEx.d.mts} +2 -2
- package/dist/{renderer-2NQWaZd7.d.mts.map → renderer-BTdOMMEx.d.mts.map} +1 -1
- package/dist/renderer-BZcn_iBl.mjs +3 -0
- package/dist/{renderer-DnF3aXPX.mjs → renderer-Bc04fivZ.mjs} +3 -3
- package/dist/{renderer-DnF3aXPX.mjs.map → renderer-Bc04fivZ.mjs.map} +1 -1
- package/dist/{renderer-B1UeU7lX.mjs → renderer-BfAWZziM.mjs} +193 -12
- package/dist/renderer-BfAWZziM.mjs.map +1 -0
- package/dist/{renderer-CKJb_Lky.mjs → renderer-Bfgd4N0O.mjs} +3 -3
- package/dist/{renderer-CKJb_Lky.mjs.map → renderer-Bfgd4N0O.mjs.map} +1 -1
- package/dist/{renderer-b6sZN90h.mjs → renderer-BhZZEyFX.mjs} +2 -2
- package/dist/{renderer-b6sZN90h.mjs.map → renderer-BhZZEyFX.mjs.map} +1 -1
- package/dist/{renderer-C-PfbkPu.mjs → renderer-Bhdf90Zq.mjs} +2 -2
- package/dist/{renderer-C-PfbkPu.mjs.map → renderer-Bhdf90Zq.mjs.map} +1 -1
- package/dist/renderer-Bp6sDMa6.mjs +3 -0
- package/dist/renderer-Bt7_sb_Y.mjs +3 -0
- package/dist/{renderer-CB8hMQgm.mjs → renderer-Bv21DbWy.mjs} +1 -1
- package/dist/{renderer-gT0ADXMW.mjs → renderer-Bv6q84TU.mjs} +2 -2
- package/dist/{renderer-gT0ADXMW.mjs.map → renderer-Bv6q84TU.mjs.map} +1 -1
- package/dist/renderer-C606ZPUn.mjs +3 -0
- package/dist/renderer-C9jyKn1i.mjs +3 -0
- package/dist/renderer-CERfcxgv.mjs +3 -0
- package/dist/renderer-CG5PzNkv.mjs +3 -0
- package/dist/{renderer-CpUbDJAV.mjs → renderer-CI7sG_cv.mjs} +2 -2
- package/dist/{renderer-CpUbDJAV.mjs.map → renderer-CI7sG_cv.mjs.map} +1 -1
- package/dist/renderer-CPoIMVdk.mjs +3 -0
- package/dist/{renderer-B4ecTNR7.mjs → renderer-CWTpc4ff.mjs} +2 -2
- package/dist/{renderer-B4ecTNR7.mjs.map → renderer-CWTpc4ff.mjs.map} +1 -1
- package/dist/{renderer-D3uNI10l.mjs → renderer-CXn5HAnK.mjs} +3 -3
- package/dist/{renderer-D3uNI10l.mjs.map → renderer-CXn5HAnK.mjs.map} +1 -1
- package/dist/{renderer-DCK73tcD.mjs → renderer-C_TPMHiH.mjs} +2 -2
- package/dist/{renderer-DCK73tcD.mjs.map → renderer-C_TPMHiH.mjs.map} +1 -1
- package/dist/renderer-Ca7L1EOp.mjs +3 -0
- package/dist/{renderer-6PqlYQjC.mjs → renderer-CaaOKMSd.mjs} +2 -2
- package/dist/{renderer-6PqlYQjC.mjs.map → renderer-CaaOKMSd.mjs.map} +1 -1
- package/dist/{renderer-DX38J6mK.mjs → renderer-CdciwwMI.mjs} +3 -3
- package/dist/{renderer-DX38J6mK.mjs.map → renderer-CdciwwMI.mjs.map} +1 -1
- package/dist/{renderer-DRpE3ZW4.mjs → renderer-CfC_aiew.mjs} +3 -3
- package/dist/{renderer-DRpE3ZW4.mjs.map → renderer-CfC_aiew.mjs.map} +1 -1
- package/dist/{renderer-BE4Ns0nw.mjs → renderer-ChdLYS-G.mjs} +3 -3
- package/dist/{renderer-BE4Ns0nw.mjs.map → renderer-ChdLYS-G.mjs.map} +1 -1
- package/dist/renderer-Cl6GkeHx.mjs +3 -0
- package/dist/renderer-ClcjrFyo.mjs +3 -0
- package/dist/{renderer-B8gTyU3w.mjs → renderer-CnXW28b9.mjs} +2 -2
- package/dist/{renderer-B8gTyU3w.mjs.map → renderer-CnXW28b9.mjs.map} +1 -1
- package/dist/{renderer-C2gnWTQZ.mjs → renderer-Ctk2zzfy.mjs} +3 -3
- package/dist/{renderer-C2gnWTQZ.mjs.map → renderer-Ctk2zzfy.mjs.map} +1 -1
- package/dist/{renderer-EmG34sT2.mjs → renderer-CtyD_Xju.mjs} +2 -2
- package/dist/{renderer-EmG34sT2.mjs.map → renderer-CtyD_Xju.mjs.map} +1 -1
- package/dist/renderer-CySUP_wk.mjs +3 -0
- package/dist/renderer-D2l_Odyg.mjs +3 -0
- package/dist/{renderer-CckJJHbM.mjs → renderer-D2nCGcjv.mjs} +2 -2
- package/dist/{renderer-CckJJHbM.mjs.map → renderer-D2nCGcjv.mjs.map} +1 -1
- package/dist/renderer-DCPCYySt.mjs +3 -0
- package/dist/{renderer-BgqjWI7K.mjs → renderer-DIgsilTw.mjs} +3 -3
- package/dist/{renderer-BgqjWI7K.mjs.map → renderer-DIgsilTw.mjs.map} +1 -1
- package/dist/renderer-DIkpJEOZ.mjs +3 -0
- package/dist/{renderer-CxQ5v4fJ.mjs → renderer-DML9qpmS.mjs} +2 -2
- package/dist/{renderer-CxQ5v4fJ.mjs.map → renderer-DML9qpmS.mjs.map} +1 -1
- package/dist/renderer-DNSXPkf_.mjs +3 -0
- package/dist/renderer-DP-CvZ_Z.mjs +3 -0
- package/dist/renderer-DeXb8R6h.mjs +3 -0
- package/dist/renderer-DezO-ZaP.mjs +4 -0
- package/dist/renderer-DhXe04fC.mjs +3 -0
- package/dist/{renderer-BwmZUkvd.mjs → renderer-DirxsOjq.mjs} +2 -2
- package/dist/{renderer-BwmZUkvd.mjs.map → renderer-DirxsOjq.mjs.map} +1 -1
- package/dist/{renderer-BcPpcKDI.mjs → renderer-Djlb4TLO.mjs} +3 -3
- package/dist/{renderer-BcPpcKDI.mjs.map → renderer-Djlb4TLO.mjs.map} +1 -1
- package/dist/renderer-DnH3SI7w.mjs +3 -0
- package/dist/{renderer-xp_J0ln7.mjs → renderer-DpGc-N3G.mjs} +3 -3
- package/dist/{renderer-xp_J0ln7.mjs.map → renderer-DpGc-N3G.mjs.map} +1 -1
- package/dist/renderer-Dpw4oi33.mjs +3 -0
- package/dist/{renderer-DAFyJ4dv.mjs → renderer-DxTs4Iyi.mjs} +2 -2
- package/dist/{renderer-DAFyJ4dv.mjs.map → renderer-DxTs4Iyi.mjs.map} +1 -1
- package/dist/{renderer-BXaK02qA.mjs → renderer-Dy0utCl7.mjs} +3 -3
- package/dist/{renderer-BXaK02qA.mjs.map → renderer-Dy0utCl7.mjs.map} +1 -1
- package/dist/renderer-Md-ytU0v.mjs +3 -0
- package/dist/{renderer-BTYncYDf.mjs → renderer-RKsXlF_0.mjs} +43 -43
- package/dist/{renderer-BTYncYDf.mjs.map → renderer-RKsXlF_0.mjs.map} +1 -1
- package/dist/renderer-U-bhWO9Q.mjs +3 -0
- package/dist/{renderer-CV8diddR.mjs → renderer-WSGuj_V6.mjs} +2 -2
- package/dist/{renderer-CV8diddR.mjs.map → renderer-WSGuj_V6.mjs.map} +1 -1
- package/dist/{renderer-_bygZSKk.mjs → renderer-bsWnRNpJ.mjs} +2 -2
- package/dist/{renderer-_bygZSKk.mjs.map → renderer-bsWnRNpJ.mjs.map} +1 -1
- package/dist/{renderer-lq4n1hSS.mjs → renderer-cgxO2xN6.mjs} +3 -3
- package/dist/{renderer-lq4n1hSS.mjs.map → renderer-cgxO2xN6.mjs.map} +1 -1
- package/dist/{renderer-zvtpCnqy.mjs → renderer-dncoIVdd.mjs} +1 -1
- package/dist/{renderer-BpJgfBQ8.mjs → renderer-kwmlLQOO.mjs} +3 -3
- package/dist/{renderer-BpJgfBQ8.mjs.map → renderer-kwmlLQOO.mjs.map} +1 -1
- package/dist/{renderer--vY6O19V.mjs → renderer-vqkKWqa5.mjs} +2 -2
- package/dist/{renderer--vY6O19V.mjs.map → renderer-vqkKWqa5.mjs.map} +1 -1
- package/dist/renderer-zA5okHds.mjs +3 -0
- package/dist/{renderers-CP8CFWDs-Ciap7y_j.mjs → renderers-CP8CFWDs-DwQTx8S7.mjs} +3 -3
- package/dist/{renderers-CP8CFWDs-Ciap7y_j.mjs.map → renderers-CP8CFWDs-DwQTx8S7.mjs.map} +1 -1
- package/dist/signals/index.d.mts +5 -5
- package/dist/signals/index.mjs +6 -6
- package/dist/{signals-CsxqD2AA.mjs → signals-Bv1OweKd.mjs} +3 -3
- package/dist/{signals-CsxqD2AA.mjs.map → signals-Bv1OweKd.mjs.map} +1 -1
- package/package.json +55 -55
- package/dist/dist-B9Afsv83.mjs.map +0 -1
- package/dist/dist-DgfykO99.mjs.map +0 -1
- package/dist/fonts-BznIea-I.mjs.map +0 -1
- package/dist/index-CQcdKyxF.d.mts.map +0 -1
- package/dist/index-D1zaOwEU.d.mts.map +0 -1
- package/dist/preview-engine/chunk-BUWK5RJ4.mjs +0 -997
- package/dist/preview-engine/chunk-CNSHAFEA.mjs +0 -1
- package/dist/preview-engine/chunk-OF75EHTX.mjs +0 -418
- package/dist/preview-engine/chunk-UC7CSW2A.mjs +0 -1
- package/dist/preview-engine/chunk-WQ7BFSKF.mjs +0 -3
- package/dist/preview-engine/chunk-ZJFAGIOM.mjs +0 -315
- package/dist/preview-engine/renderers-32PIFHPS.mjs +0 -1
- package/dist/preview-engine/renderers-3Y3EMRDJ.mjs +0 -1
- package/dist/preview-engine/renderers-CHJWUJVI.mjs +0 -1
- package/dist/preview-engine/renderers-CI2GXWLP.mjs +0 -1
- package/dist/preview-engine/renderers-EE2GFG7J.mjs +0 -1
- package/dist/preview-engine/renderers-LTNTQLWE.mjs +0 -248
- package/dist/preview-engine/renderers-UGZUPONY.mjs +0 -1
- package/dist/program-C797QMRL.mjs.map +0 -1
- package/dist/renderer-3uTfN95I.mjs +0 -3
- package/dist/renderer-B1UeU7lX.mjs.map +0 -1
- package/dist/renderer-B5GslTP-.mjs +0 -3
- package/dist/renderer-BUIWeIKQ.mjs +0 -3
- package/dist/renderer-B_LfC88A.mjs +0 -3
- package/dist/renderer-B_zmicsE.mjs +0 -3
- package/dist/renderer-BtNxtXkR.mjs +0 -3
- package/dist/renderer-C-sZSHtf.mjs +0 -3
- package/dist/renderer-C1zifktw.mjs +0 -3
- package/dist/renderer-CCt2XTSM.mjs +0 -3
- package/dist/renderer-CL3evUmF.mjs +0 -3
- package/dist/renderer-CMXcaArD.mjs +0 -3
- package/dist/renderer-CW9D5zCP.mjs +0 -3
- package/dist/renderer-CjY77sB_.mjs +0 -3
- package/dist/renderer-D1R7vBUl.mjs +0 -3
- package/dist/renderer-D5yawxtJ.mjs +0 -3
- package/dist/renderer-DC8jr1Ay.mjs +0 -3
- package/dist/renderer-DCv-Abvn.mjs +0 -4
- package/dist/renderer-DPLFhzaV.mjs +0 -3
- package/dist/renderer-DVsF2FDr.mjs +0 -3
- package/dist/renderer-DetDm3ep.mjs +0 -3
- package/dist/renderer-DhMhJh_G.mjs +0 -3
- package/dist/renderer-DhQld4Qt.mjs +0 -3
- package/dist/renderer-Dn3rc3ah.mjs +0 -3
- package/dist/renderer-Dw9LxE2f.mjs +0 -3
- package/dist/renderer-HvrQZw5E.mjs +0 -3
- package/dist/renderer-QdJE56ts.mjs +0 -3
- package/dist/renderer-euGyUN2O.mjs +0 -3
- package/dist/renderer-p3SmBFP9.mjs +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-JAOXXYXG.mjs";import"./chunk-CNSHAFEA.mjs";import"./chunk-ZNGOAGAI.mjs";import"./chunk-6YJP57MZ.mjs";import"./chunk-BVF64D6H.mjs";export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-YG35X5R5.mjs";import"./chunk-CNSHAFEA.mjs";import"./chunk-ZNGOAGAI.mjs";import"./chunk-BVF64D6H.mjs";export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-XCYFPA34.mjs";import"./chunk-CNSHAFEA.mjs";import"./chunk-ZNGOAGAI.mjs";import"./chunk-6YJP57MZ.mjs";import"./chunk-BVF64D6H.mjs";export{a as RefractionCaustics3DWebGPURenderer,b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-7DIAFPQP.mjs";import"./chunk-CNSHAFEA.mjs";import"./chunk-ZNGOAGAI.mjs";import"./chunk-6YJP57MZ.mjs";import"./chunk-BVF64D6H.mjs";export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as a}from"./chunk-AW7HNZKR.mjs";import"./chunk-YKMBRUAE.mjs";import"./chunk-VXUJWPIK.mjs";import"./chunk-XKO4RYKN.mjs";import"./chunk-UC7CSW2A.mjs";import"./chunk-NQZKBFC6.mjs";import"./chunk-24P6DAB3.mjs";import"./chunk-ZNGOAGAI.mjs";import"./chunk-4GEWSUX5.mjs";import"./chunk-MTJHQATU.mjs";import"./chunk-YAQFFQPG.mjs";import"./chunk-BVF64D6H.mjs";export{a as default};
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import{b as Aa,c as Fa}from"./chunk-5PPSCISJ.mjs";import{A as Ya,C as Ga,F as Bn,K as hn,b as bi,c as Ti,d as L,e as dn,l as Ia,m as za,o as Ea,r as Va,y as Vn}from"./chunk-BUWK5RJ4.mjs";import"./chunk-JPXQPP6J.mjs";import{a as Da}from"./chunk-YKMBRUAE.mjs";import{b as Xa}from"./chunk-N4LHIPHZ.mjs";import{a as En}from"./chunk-CNSHAFEA.mjs";import{a as Ba}from"./chunk-BHFI3Y4T.mjs";import"./chunk-37EFVZWT.mjs";import"./chunk-4VOHF3FF.mjs";import{b as un,l as cn}from"./chunk-24P6DAB3.mjs";import"./chunk-36YGYLKD.mjs";import{c as xi,e as Sa,t as Ca,w as Ra}from"./chunk-ZNGOAGAI.mjs";import"./chunk-6YJP57MZ.mjs";import{d as fn,f as La}from"./chunk-ZJFAGIOM.mjs";import"./chunk-MTJHQATU.mjs";import{c as Oa}from"./chunk-HYBAPT6I.mjs";import"./chunk-YAQFFQPG.mjs";import{e as ue}from"./chunk-BVF64D6H.mjs";ue();ue();ue();var Ua=`
|
|
2
|
-
struct RelightMaterialUniforms {
|
|
3
|
-
// vec4 0
|
|
4
|
-
roughness : f32,
|
|
5
|
-
specularStrength : f32,
|
|
6
|
-
metallic : f32,
|
|
7
|
-
ambientIntensity : f32,
|
|
8
|
-
|
|
9
|
-
// vec4 1
|
|
10
|
-
depthScale : f32,
|
|
11
|
-
depthInvert : f32,
|
|
12
|
-
hasNormalMap : f32,
|
|
13
|
-
volumetricDensity: f32,
|
|
14
|
-
|
|
15
|
-
// vec4 2
|
|
16
|
-
viewportWidth : f32,
|
|
17
|
-
viewportHeight : f32,
|
|
18
|
-
shininess : f32,
|
|
19
|
-
opacity : f32,
|
|
20
|
-
|
|
21
|
-
// vec4 3
|
|
22
|
-
layerX : f32,
|
|
23
|
-
layerY : f32,
|
|
24
|
-
_pad0 : f32,
|
|
25
|
-
_pad1 : f32,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
struct GPULight {
|
|
29
|
-
posType : vec4<f32>, // xyz = position, w = type (0=ambient, 1=directional, 2=point, 3=spot)
|
|
30
|
-
dirRadius : vec4<f32>, // xyz = normalized direction, w = radius
|
|
31
|
-
colorIntensity : vec4<f32>, // rgb = linear color, w = intensity
|
|
32
|
-
spotParams : vec4<f32>, // x = cos(outer), y = cos(inner), z = decay, w = 0
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
struct LightsUniforms {
|
|
36
|
-
ambientColor : vec4<f32>,
|
|
37
|
-
params : vec4<f32>, // x = lightCount, y = hasLights (1=lit, 0=unlit)
|
|
38
|
-
lights : array<GPULight, 8>,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
@group(0) @binding(0) var<uniform> mat : RelightMaterialUniforms;
|
|
42
|
-
@group(1) @binding(0) var<uniform> lights : LightsUniforms;
|
|
43
|
-
|
|
44
|
-
@group(2) @binding(0) var albedoTex : texture_2d<f32>;
|
|
45
|
-
@group(2) @binding(1) var albedoSamp : sampler;
|
|
46
|
-
@group(2) @binding(2) var normalTex : texture_2d<f32>;
|
|
47
|
-
@group(2) @binding(3) var normalSamp : sampler;
|
|
48
|
-
|
|
49
|
-
struct VSOut {
|
|
50
|
-
@builtin(position) pos : vec4<f32>,
|
|
51
|
-
@location(0) uv : vec2<f32>,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
@vertex fn vs(@builtin(vertex_index) vi: u32) -> VSOut {
|
|
55
|
-
var pos = array<vec2<f32>, 4>(
|
|
56
|
-
vec2<f32>(-1.0, 1.0),
|
|
57
|
-
vec2<f32>( 1.0, 1.0),
|
|
58
|
-
vec2<f32>(-1.0, -1.0),
|
|
59
|
-
vec2<f32>( 1.0, -1.0)
|
|
60
|
-
);
|
|
61
|
-
var uv = array<vec2<f32>, 4>(
|
|
62
|
-
vec2<f32>(0.0, 0.0),
|
|
63
|
-
vec2<f32>(1.0, 0.0),
|
|
64
|
-
vec2<f32>(0.0, 1.0),
|
|
65
|
-
vec2<f32>(1.0, 1.0)
|
|
66
|
-
);
|
|
67
|
-
return VSOut(vec4<f32>(pos[vi], 0.0, 1.0), uv[vi]);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@fragment fn fs(in: VSOut) -> @location(0) vec4<f32> {
|
|
71
|
-
let albedo = textureSampleLevel(albedoTex, albedoSamp, in.uv, 0.0);
|
|
72
|
-
if (albedo.a <= 0.001) {
|
|
73
|
-
return vec4<f32>(0.0);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Normal unpacking: [0, 1] -> [-1, 1]
|
|
77
|
-
var N = vec3<f32>(0.0, 0.0, 1.0);
|
|
78
|
-
if (mat.hasNormalMap > 0.5) {
|
|
79
|
-
let rawNormal = textureSampleLevel(normalTex, normalSamp, in.uv, 0.0).xyz;
|
|
80
|
-
let unpacked = rawNormal * 2.0 - 1.0;
|
|
81
|
-
N = normalize(vec3<f32>(unpacked.x, unpacked.y, max(unpacked.z, 0.05)));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
let V = vec3<f32>(0.0, 0.0, 1.0);
|
|
85
|
-
let pSurface = vec3<f32>(
|
|
86
|
-
mat.layerX + in.uv.x * mat.viewportWidth,
|
|
87
|
-
mat.layerY + in.uv.y * mat.viewportHeight,
|
|
88
|
-
0.0
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
// If scene lights are not declared, output base albedo unmodified
|
|
92
|
-
if (lights.params.y < 0.5) {
|
|
93
|
-
return vec4<f32>(albedo.rgb * mat.opacity, albedo.a * mat.opacity);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
let numLights = u32(min(lights.params.x, 8.0));
|
|
97
|
-
var ambientAccum = lights.ambientColor.rgb * mat.ambientIntensity;
|
|
98
|
-
var directDiffuseAccum = vec3<f32>(0.0);
|
|
99
|
-
var directSpecularAccum = vec3<f32>(0.0);
|
|
100
|
-
|
|
101
|
-
let roughness = clamp(mat.roughness, 0.02, 1.0);
|
|
102
|
-
let specPower = max(2.0, 2.0 / (roughness * roughness) - 2.0);
|
|
103
|
-
|
|
104
|
-
for (var i = 0u; i < 8u; i = i + 1u) {
|
|
105
|
-
if (i >= numLights) {
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
let light = lights.lights[i];
|
|
110
|
-
let lightType = light.posType.w;
|
|
111
|
-
let lightColor = light.colorIntensity.rgb;
|
|
112
|
-
let intensity = light.colorIntensity.w;
|
|
113
|
-
|
|
114
|
-
var L = vec3<f32>(0.0, 0.0, 1.0);
|
|
115
|
-
var attenuation: f32 = 1.0;
|
|
116
|
-
|
|
117
|
-
if (lightType > 0.5 && lightType < 1.5) {
|
|
118
|
-
// Directional Light
|
|
119
|
-
L = normalize(-light.dirRadius.xyz);
|
|
120
|
-
} else if (lightType >= 1.5) {
|
|
121
|
-
// Point or Spot Light
|
|
122
|
-
let lightPosCanvas = light.posType.xyz;
|
|
123
|
-
let toLight = lightPosCanvas - pSurface;
|
|
124
|
-
let dist = length(toLight);
|
|
125
|
-
let radius = max(10.0, light.dirRadius.w);
|
|
126
|
-
|
|
127
|
-
if (dist > radius * 2.0) {
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
L = normalize(toLight);
|
|
132
|
-
let dNorm = clamp(dist / radius, 0.0, 1.0);
|
|
133
|
-
let decay = max(0.5, light.spotParams.z);
|
|
134
|
-
attenuation = pow(clamp(1.0 - dNorm, 0.0, 1.0), decay) / (1.0 + dNorm * dNorm);
|
|
135
|
-
|
|
136
|
-
if (lightType > 2.5) {
|
|
137
|
-
// Spot Light
|
|
138
|
-
let spotDir = normalize(light.dirRadius.xyz);
|
|
139
|
-
let cosAngle = dot(-L, spotDir);
|
|
140
|
-
let cosOuter = light.spotParams.x;
|
|
141
|
-
let cosInner = light.spotParams.y;
|
|
142
|
-
|
|
143
|
-
if (cosAngle < cosOuter) {
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
let spotFalloff = smoothstep(cosOuter, cosInner, cosAngle);
|
|
147
|
-
attenuation *= spotFalloff;
|
|
148
|
-
}
|
|
149
|
-
} else {
|
|
150
|
-
// Ambient light in array
|
|
151
|
-
ambientAccum += lightColor * (intensity * mat.ambientIntensity);
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
let NdotL = max(dot(N, L), 0.0);
|
|
156
|
-
let diffuse = lightColor * (NdotL * intensity * attenuation);
|
|
157
|
-
directDiffuseAccum += diffuse;
|
|
158
|
-
|
|
159
|
-
let H = normalize(L + V);
|
|
160
|
-
let NdotH = max(dot(N, H), 0.0);
|
|
161
|
-
let specularFactor = pow(NdotH, specPower) * mat.specularStrength * intensity * attenuation;
|
|
162
|
-
let specColor = mix(lightColor, lightColor * albedo.rgb, mat.metallic);
|
|
163
|
-
directSpecularAccum += specColor * specularFactor;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
let finalColor = albedo.rgb * (ambientAccum + directDiffuseAccum) + directSpecularAccum;
|
|
167
|
-
let outOpacity = albedo.a * mat.opacity;
|
|
168
|
-
|
|
169
|
-
// Premultiplied alpha return
|
|
170
|
-
return vec4<f32>(finalColor * outOpacity, outOpacity);
|
|
171
|
-
}
|
|
172
|
-
`;ue();var Yn=class{device;format;materialLayout;lightsLayout;texturesLayout;pipeline;materialPool;linearSampler;defaultFlatNormalTex;constructor(e,t="rgba8unorm"){this.device=e,this.format=t,this.materialPool=new La(64,GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST),this.linearSampler=e.createSampler({label:"relight_linear_sampler",magFilter:"linear",minFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}),this.materialLayout=e.createBindGroupLayout({label:"relight_material_layout",entries:[{binding:0,visibility:GPUShaderStage.FRAGMENT,buffer:{type:"uniform"}}]}),this.lightsLayout=e.createBindGroupLayout({label:"relight_lights_layout",entries:[{binding:0,visibility:GPUShaderStage.FRAGMENT,buffer:{type:"uniform"}}]}),this.texturesLayout=e.createBindGroupLayout({label:"relight_textures_layout",entries:[{binding:0,visibility:GPUShaderStage.FRAGMENT,texture:{sampleType:"float"}},{binding:1,visibility:GPUShaderStage.FRAGMENT,sampler:{type:"filtering"}},{binding:2,visibility:GPUShaderStage.FRAGMENT,texture:{sampleType:"float"}},{binding:3,visibility:GPUShaderStage.FRAGMENT,sampler:{type:"filtering"}}]});let r=e.createShaderModule({label:"screen_space_relight.wgsl",code:Ua}),n=e.createPipelineLayout({label:"screen_space_relight_pipeline_layout",bindGroupLayouts:[this.materialLayout,this.lightsLayout,this.texturesLayout]});this.pipeline=e.createRenderPipeline({label:"ScreenSpaceRelightPipeline",layout:n,vertex:{module:r,entryPoint:"vs"},fragment:{module:r,entryPoint:"fs",targets:[{format:t,blend:{color:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}}}]},primitive:{topology:"triangle-strip"}})}getOrCreateDefaultFlatNormalTexture(){if(!this.defaultFlatNormalTex){this.defaultFlatNormalTex=this.device.createTexture({label:"default_flat_normal",size:[2,2],format:"rgba8unorm",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST});let e=new Uint8Array([128,128,255,255,128,128,255,255,128,128,255,255,128,128,255,255]);this.device.queue.writeTexture({texture:this.defaultFlatNormalTex},e,{bytesPerRow:8,rowsPerImage:2},[2,2])}return this.defaultFlatNormalTex}resetPools(){this.materialPool.reset()}execute(e,t,r,n,i,o,a="clear"){let l=new Float32Array(16);l[0]=o.roughness??.35,l[1]=o.specularStrength??.7,l[2]=o.metallic??0,l[3]=o.ambientIntensity??.5,l[4]=o.depthScale??1,l[5]=0,l[6]=n?1:0,l[7]=0,l[8]=o.viewportWidth,l[9]=o.viewportHeight,l[10]=32,l[11]=o.opacity??1,l[12]=o.layerX??0,l[13]=o.layerY??0,l[14]=0,l[15]=0;let c=this.materialPool.getBuffer(this.device,l),u=this.device.createBindGroup({layout:this.materialLayout,entries:[{binding:0,resource:{buffer:c}}]}),d=this.device.createBindGroup({layout:this.lightsLayout,entries:[{binding:0,resource:{buffer:i}}]}),g=n??this.getOrCreateDefaultFlatNormalTexture(),y=this.device.createBindGroup({layout:this.texturesLayout,entries:[{binding:0,resource:r.createView()},{binding:1,resource:this.linearSampler},{binding:2,resource:g.createView()},{binding:3,resource:this.linearSampler}]}),_=e.beginRenderPass({label:"screen_space_relight_render_pass",colorAttachments:[{view:t,loadOp:a,storeOp:"store",clearValue:{r:0,g:0,b:0,a:0}}]});_.setPipeline(this.pipeline),_.setBindGroup(0,u),_.setBindGroup(1,d),_.setBindGroup(2,y),_.draw(4,1,0,0),_.end()}destroy(){this.materialPool.destroy(),this.defaultFlatNormalTex?.destroy()}};ue();var Ls=s=>s==="Image"||s==="SVG"||s==="Text",Na=(s,e,t=3e3,r)=>{if(r==="Caption")return e&&e>0?e:s||t;let n=Ls(r);return s&&e&&!n?Math.min(s,e):s||e||t};ue();ue();ue();function ur(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function Ja(s,e){s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.__proto__=e}var yt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},xn={duration:.5,overwrite:!1,delay:0},Bi,tt,Te,zt=1e8,pe=1/zt,Ci=Math.PI*2,Is=Ci/4,zs=0,eo=Math.sqrt,Es=Math.cos,Vs=Math.sin,Xe=function(e){return typeof e=="string"},Oe=function(e){return typeof e=="function"},fr=function(e){return typeof e=="number"},Qn=function(e){return typeof e>"u"},Kt=function(e){return typeof e=="object"},_t=function(e){return e!==!1},Yi=function(){return typeof window<"u"},Gn=function(e){return Oe(e)||Xe(e)},to=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},at=Array.isArray,Bs=/random\([^)]+\)/g,Ys=/,\s*/g,Za=/(?:-?\.?\d|\.)+/gi,Gi=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Vr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,vi=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Xi=/[+-]=-?[.\d]+/,Gs=/[^,'"\[\]\s]+/gi,Xs=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Me,Qt,Ri,Ui,Ot={},Zn={},ro,no=function(e){return(Zn=jr(e,Ot))&&ot},qn=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},bn=function(e,t){return!t&&console.warn(e)},io=function(e,t){return e&&(Ot[e]=t)&&Zn&&(Zn[e]=t)||Ot},Tn=function(){return 0},Us={suppressEvents:!0,isStart:!0,kill:!1},Xn={suppressEvents:!0,kill:!1},Ns={suppressEvents:!0},Ni={},br=[],Oi={},ao,pt={},wi={},Wa=30,Un=[],Zi="",Wi=function(e){var t=e[0],r,n;if(Kt(t)||Oe(t)||(e=[e]),!(r=(t._gsap||{}).harness)){for(n=Un.length;n--&&!Un[n].targetTest(t););r=Un[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new Qi(e[n],r)))||e.splice(n,1);return e},Tr=function(e){return e._gsap||Wi(Et(e))[0]._gsap},$i=function(e,t,r){return(r=e[t])&&Oe(r)?e[t]():Qn(r)&&e.getAttribute&&e.getAttribute(t)||r},ut=function(e,t){return(e=e.split(",")).forEach(t)||e},Ae=function(e){return Math.round(e*1e5)/1e5||0},we=function(e){return Math.round(e*1e7)/1e7||0},Br=function(e,t){var r=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),r==="+"?e+n:r==="-"?e-n:r==="*"?e*n:e/n},Zs=function(e,t){for(var r=t.length,n=0;e.indexOf(t[n])<0&&++n<r;);return n<r},Wn=function(){var e=br.length,t=br.slice(0),r,n;for(Oi={},br.length=0,r=0;r<e;r++)n=t[r],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},ji=function(e){return!!(e._initted||e._startAt||e.add)},oo=function(e,t,r,n){br.length&&!tt&&Wn(),e.render(t,r,n||!!(tt&&t<0&&ji(e))),br.length&&!tt&&Wn()},so=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(Gs).length<2?t:Xe(e)?e.trim():e},lo=function(e){return e},At=function(e,t){for(var r in t)r in e||(e[r]=t[r]);return e},Ws=function(e){return function(t,r){for(var n in r)n in t||n==="duration"&&e||n==="ease"||(t[n]=r[n])}},jr=function(e,t){for(var r in t)e[r]=t[r];return e},$a=function s(e,t){for(var r in t)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=Kt(t[r])?s(e[r]||(e[r]={}),t[r]):t[r]);return e},$n=function(e,t){var r={},n;for(n in e)n in t||(r[n]=e[n]);return r},gn=function(e){var t=e.parent||Me,r=e.keyframes?Ws(at(e.keyframes)):At;if(_t(e.inherit))for(;t;)r(e,t.vars.defaults),t=t.parent||t._dp;return e},$s=function(e,t){for(var r=e.length,n=r===t.length;n&&r--&&e[r]===t[r];);return r<0},uo=function(e,t,r,n,i){r===void 0&&(r="_first"),n===void 0&&(n="_last");var o=e[n],a;if(i)for(a=t[i];o&&o[i]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[r],e[r]=t),t._next?t._next._prev=t:e[n]=t,t._prev=o,t.parent=t._dp=e,t},Kn=function(e,t,r,n){r===void 0&&(r="_first"),n===void 0&&(n="_last");var i=t._prev,o=t._next;i?i._next=o:e[r]===t&&(e[r]=o),o?o._prev=i:e[n]===t&&(e[n]=i),t._next=t._prev=t.parent=null},vr=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Ir=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},js=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Ai=function(e,t,r,n){return e._startAt&&(tt?e._startAt.revert(Xn):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},Hs=function s(e){return!e||e._ts&&s(e.parent)},ja=function(e){return e._repeat?Hr(e._tTime,e=e.duration()+e._rDelay)*e:0},Hr=function(e,t){var r=Math.floor(e=we(e/t));return e&&r===e?r-1:r},jn=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Jn=function(e){return e._end=we(e._start+(e._tDur/Math.abs(e._ts||e._rts||pe)||0))},ei=function(e,t){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=we(r._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Jn(e),r._dirty||Ir(r,e)),e},co=function(e,t){var r;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(r=jn(e.rawTime(),t),(!t._dur||Mn(0,t.totalDuration(),r)-t._tTime>pe)&&t.render(r,!0)),Ir(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-pe}},qt=function(e,t,r,n){return t.parent&&vr(t),t._start=we((fr(r)?r:r||e!==Me?It(e,r,t):e._time)+t._delay),t._end=we(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),uo(e,t,"_first","_last",e._sort?"_start":0),Fi(t)||(e._recent=t),n||co(e,t),e._ts<0&&ei(e,e._tTime),e},fo=function(e,t){return(Ot.ScrollTrigger||qn("scrollTrigger",t))&&Ot.ScrollTrigger.create(t,e)},ho=function(e,t,r,n,i){if(Ji(e,t,i),!e._initted)return 1;if(!r&&e._pt&&!tt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&ao!==gt.frame)return br.push(e),e._lazy=[i,n],1},Qs=function s(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||s(t))},Fi=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},qs=function(e,t,r,n){var i=e.ratio,o=t<0||!t&&(!e._start&&Qs(e)&&!(!e._initted&&Fi(e))||(e._ts<0||e._dp._ts<0)&&!Fi(e))?0:1,a=e._rDelay,l=0,c,u,d;if(a&&e._repeat&&(l=Mn(0,e._tDur,t),u=Hr(l,a),e._yoyo&&u&1&&(o=1-o),u!==Hr(e._tTime,a)&&(i=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==i||tt||n||e._zTime===pe||!t&&e._zTime){if(!e._initted&&ho(e,t,n,r,l))return;for(d=e._zTime,e._zTime=t||(r?pe:0),r||(r=t&&!d),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,c=e._pt;c;)c.r(o,c.d),c=c._next;t<0&&Ai(e,t,r,!0),e._onUpdate&&!r&&Rt(e,"onUpdate"),l&&e._repeat&&!r&&e.parent&&Rt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&vr(e,1),!r&&!tt&&(Rt(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Ks=function(e,t,r){var n;if(r>t)for(n=e._first;n&&n._start<=r;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=r;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},Qr=function(e,t,r,n){var i=e._repeat,o=we(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=i?i<0?1e10:we(o*(i+1)+e._rDelay*i):o,a>0&&!n&&ei(e,e._tTime=e._tDur*a),e.parent&&Jn(e),r||Ir(e.parent,e),e},Ha=function(e){return e instanceof it?Ir(e):Qr(e,e._dur)},Js={_start:0,endTime:Tn,totalDuration:Tn},It=function s(e,t,r){var n=e.labels,i=e._recent||Js,o=e.duration()>=zt?i.endTime(!1):e._dur,a,l,c;return Xe(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),c=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(a<0?i:r).totalDuration()/100:1)):a<0?(t in n||(n[t]=o),n[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),c&&r&&(l=l/100*(at(r)?r[0]:r).totalDuration()),a>1?s(e,t.substr(0,a-1),r)+l:o+l)):t==null?o:+t},_n=function(e,t,r){var n=fr(t[1]),i=(n?2:1)+(e<2?0:1),o=t[i],a,l;if(n&&(o.duration=t[1]),o.parent=r,e){for(a=o,l=r;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=_t(l.vars.inherit)&&l.parent;o.immediateRender=_t(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[i-1]}return new ze(t[0],o,t[i+1])},wr=function(e,t){return e||e===0?t(e):t},Mn=function(e,t,r){return r<e?e:r>t?t:r},rt=function(e,t){return!Xe(e)||!(t=Xs.exec(e))?"":t[1]},el=function(e,t,r){return wr(r,function(n){return Mn(e,t,n)})},Li=[].slice,mo=function(e,t){return e&&Kt(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Kt(e[0]))&&!e.nodeType&&e!==Qt},tl=function(e,t,r){return r===void 0&&(r=[]),e.forEach(function(n){var i;return Xe(n)&&!t||mo(n,1)?(i=r).push.apply(i,Et(n)):r.push(n)})||r},Et=function(e,t,r){return Te&&!t&&Te.selector?Te.selector(e):Xe(e)&&!r&&(Ri||!qr())?Li.call((t||Ui).querySelectorAll(e),0):at(e)?tl(e,r):mo(e)?Li.call(e,0):e?[e]:[]},Ii=function(e){return e=Et(e)[0]||bn("Invalid scope")||{},function(t){var r=e.current||e.nativeElement||e;return Et(t,r.querySelectorAll?r:r===e?bn("Invalid scope")||Ui.createElement("div"):e)}},po=function(e){return e.sort(function(){return .5-Math.random()})},go=function(e){if(Oe(e))return e;var t=Kt(e)?e:{each:e},r=zr(t.ease),n=t.from||0,i=parseFloat(t.base)||0,o={},a=n>0&&n<1,l=isNaN(n)||a,c=t.axis,u=n,d=n;return Xe(n)?u=d={center:.5,edges:.5,end:1}[n]||0:!a&&l&&(u=n[0],d=n[1]),function(g,y,_){var m=(_||t).length,x=o[m],v,T,b,k,h,S,w,M,P;if(!x){if(P=t.grid==="auto"?0:(t.grid||[1,zt])[1],!P){for(w=-zt;w<(w=_[P++].getBoundingClientRect().left)&&P<m;);P<m&&P--}for(x=o[m]=[],v=l?Math.min(P,m)*u-.5:n%P,T=P===zt?0:l?m*d/P-.5:n/P|0,w=0,M=zt,S=0;S<m;S++)b=S%P-v,k=T-(S/P|0),x[S]=h=c?Math.abs(c==="y"?k:b):eo(b*b+k*k),h>w&&(w=h),h<M&&(M=h);n==="random"&&po(x),x.max=w-M,x.min=M,x.v=m=(parseFloat(t.amount)||parseFloat(t.each)*(P>m?m-1:c?c==="y"?m/P:P:Math.max(P,m/P))||0)*(n==="edges"?-1:1),x.b=m<0?i-m:i,x.u=rt(t.amount||t.each)||0,r=r&&m<0?ml(r):r}return m=(x[g]-x.min)/x.max||0,we(x.b+(r?r(m):m)*x.v)+x.u}},zi=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var n=we(Math.round(parseFloat(r)/e)*e*t);return(n-n%1)/t+(fr(r)?0:rt(r))}},_o=function(e,t){var r=at(e),n,i;return!r&&Kt(e)&&(n=r=e.radius||zt,e.values?(e=Et(e.values),(i=!fr(e[0]))&&(n*=n)):e=zi(e.increment)),wr(t,r?Oe(e)?function(o){return i=e(o),Math.abs(i-o)<=n?i:o}:function(o){for(var a=parseFloat(i?o.x:o),l=parseFloat(i?o.y:0),c=zt,u=0,d=e.length,g,y;d--;)i?(g=e[d].x-a,y=e[d].y-l,g=g*g+y*y):g=Math.abs(e[d]-a),g<c&&(c=g,u=d);return u=!n||c<=n?e[u]:o,i||u===o||fr(o)?u:u+rt(o)}:zi(e))},yo=function(e,t,r,n){return wr(at(e)?!t:r===!0?!!(r=0):!n,function(){return at(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(t-e+r*.99))/r)*r*n)/n})},rl=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduce(function(i,o){return o(i)},n)}},nl=function(e,t){return function(r){return e(parseFloat(r))+(t||rt(r))}},il=function(e,t,r){return bo(e,t,0,1,r)},xo=function(e,t,r){return wr(r,function(n){return e[~~t(n)]})},al=function s(e,t,r){var n=t-e;return at(e)?xo(e,s(0,e.length),t):wr(r,function(i){return(n+(i-e)%n)%n+e})},ol=function s(e,t,r){var n=t-e,i=n*2;return at(e)?xo(e,s(0,e.length-1),t):wr(r,function(o){return o=(i+(o-e)%i)%i||0,e+(o>n?i-o:o)})},Kr=function(e){return e.replace(Bs,function(t){var r=t.indexOf("[")+1,n=t.substring(r||7,r?t.indexOf("]"):t.length-1).split(Ys);return yo(r?n:+n[0],r?0:+n[1],+n[2]||1e-5)})},bo=function(e,t,r,n,i){var o=t-e,a=n-r;return wr(i,function(l){return r+((l-e)/o*a||0)})},sl=function s(e,t,r,n){var i=isNaN(e+t)?0:function(y){return(1-y)*e+y*t};if(!i){var o=Xe(e),a={},l,c,u,d,g;if(r===!0&&(n=1)&&(r=null),o)e={p:e},t={p:t};else if(at(e)&&!at(t)){for(u=[],d=e.length,g=d-2,c=1;c<d;c++)u.push(s(e[c-1],e[c]));d--,i=function(_){_*=d;var m=Math.min(g,~~_);return u[m](_-m)},r=t}else n||(e=jr(at(e)?[]:{},e));if(!u){for(l in t)qi.call(a,e,l,"get",t[l]);i=function(_){return ra(_,a)||(o?e.p:e)}}}return wr(r,i)},Qa=function(e,t,r){var n=e.labels,i=zt,o,a,l;for(o in n)a=n[o]-t,a<0==!!r&&a&&i>(a=Math.abs(a))&&(l=o,i=a);return l},Rt=function(e,t,r){var n=e.vars,i=n[t],o=Te,a=e._ctx,l,c,u;if(i)return l=n[t+"Params"],c=n.callbackScope||e,r&&br.length&&Wn(),a&&(Te=a),u=l?i.apply(c,l):i.call(c),Te=o,u},mn=function(e){return vr(e),e.scrollTrigger&&e.scrollTrigger.kill(!!tt),e.progress()<1&&Rt(e,"onInterrupt"),e},$r,To=[],vo=function(e){if(e)if(e=!e.name&&e.default||e,Yi()||e.headless){var t=e.name,r=Oe(e),n=t&&!r&&e.init?function(){this._props=[]}:e,i={init:Tn,render:ra,add:qi,kill:Ml,modifier:wl,rawVars:0},o={targetTest:0,get:0,getSetter:ti,aliases:{},register:0};if(qr(),e!==n){if(pt[t])return;At(n,At($n(e,i),o)),jr(n.prototype,jr(i,$n(e,o))),pt[n.prop=t]=n,e.targetTest&&(Un.push(n),Ni[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}io(t,n),e.register&&e.register(ot,n,ct)}else To.push(e)},me=255,pn={aqua:[0,me,me],lime:[0,me,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,me],navy:[0,0,128],white:[me,me,me],olive:[128,128,0],yellow:[me,me,0],orange:[me,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[me,0,0],pink:[me,192,203],cyan:[0,me,me],transparent:[me,me,me,0]},Mi=function(e,t,r){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(r-t)*e*6:e<.5?r:e*3<2?t+(r-t)*(2/3-e)*6:t)*me+.5|0},wo=function(e,t,r){var n=e?fr(e)?[e>>16,e>>8&me,e&me]:0:pn.black,i,o,a,l,c,u,d,g,y,_;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),pn[e])n=pn[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+i+i+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&me,n&me,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&me,e&me]}else if(e.substr(0,3)==="hsl"){if(n=_=e.match(Za),!t)l=+n[0]%360/360,c=+n[1]/100,u=+n[2]/100,o=u<=.5?u*(c+1):u+c-u*c,i=u*2-o,n.length>3&&(n[3]*=1),n[0]=Mi(l+1/3,i,o),n[1]=Mi(l,i,o),n[2]=Mi(l-1/3,i,o);else if(~e.indexOf("="))return n=e.match(Gi),r&&n.length<4&&(n[3]=1),n}else n=e.match(Za)||pn.transparent;n=n.map(Number)}return t&&!_&&(i=n[0]/me,o=n[1]/me,a=n[2]/me,d=Math.max(i,o,a),g=Math.min(i,o,a),u=(d+g)/2,d===g?l=c=0:(y=d-g,c=u>.5?y/(2-d-g):y/(d+g),l=d===i?(o-a)/y+(o<a?6:0):d===o?(a-i)/y+2:(i-o)/y+4,l*=60),n[0]=~~(l+.5),n[1]=~~(c*100+.5),n[2]=~~(u*100+.5)),r&&n.length<4&&(n[3]=1),n},Mo=function(e){var t=[],r=[],n=-1;return e.split(cr).forEach(function(i){var o=i.match(Vr)||[];t.push.apply(t,o),r.push(n+=o.length+1)}),t.c=r,t},qa=function(e,t,r){var n="",i=(e+n).match(cr),o=t?"hsla(":"rgba(",a=0,l,c,u,d;if(!i)return e;if(i=i.map(function(g){return(g=wo(g,t,1))&&o+(t?g[0]+","+g[1]+"%,"+g[2]+"%,"+g[3]:g.join(","))+")"}),r&&(u=Mo(e),l=r.c,l.join(n)!==u.c.join(n)))for(c=e.replace(cr,"1").split(Vr),d=c.length-1;a<d;a++)n+=c[a]+(~l.indexOf(a)?i.shift()||o+"0,0,0,0)":(u.length?u:i.length?i:r).shift());if(!c)for(c=e.split(cr),d=c.length-1;a<d;a++)n+=c[a]+i[a];return n+c[d]},cr=(function(){var s="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in pn)s+="|"+e+"\\b";return new RegExp(s+")","gi")})(),ll=/hsl[a]?\(/,Hi=function(e){var t=e.join(" "),r;if(cr.lastIndex=0,cr.test(t))return r=ll.test(t),e[1]=qa(e[1],r),e[0]=qa(e[0],r,Mo(e[1])),!0},vn,gt=(function(){var s=Date.now,e=500,t=33,r=s(),n=r,i=1e3/240,o=i,a=[],l,c,u,d,g,y,_=function m(x){var v=s()-n,T=x===!0,b,k,h,S;if((v>e||v<0)&&(r+=v-t),n+=v,h=n-r,b=h-o,(b>0||T)&&(S=++d.frame,g=h-d.time*1e3,d.time=h=h/1e3,o+=b+(b>=i?4:i-b),k=1),T||(l=c(m)),k)for(y=0;y<a.length;y++)a[y](h,g,S,x)};return d={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(x){return g/(1e3/(x||60))},wake:function(){ro&&(!Ri&&Yi()&&(Qt=Ri=window,Ui=Qt.document||{},Ot.gsap=ot,(Qt.gsapVersions||(Qt.gsapVersions=[])).push(ot.version),no(Zn||Qt.GreenSockGlobals||!Qt.gsap&&Qt||{}),To.forEach(vo)),u=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&d.sleep(),c=u||function(x){return setTimeout(x,o-d.time*1e3+1|0)},vn=1,_(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(l),vn=0,c=Tn},lagSmoothing:function(x,v){e=x||1/0,t=Math.min(v||33,e)},fps:function(x){i=1e3/(x||240),o=d.time*1e3+i},add:function(x,v,T){var b=v?function(k,h,S,w){x(k,h,S,w),d.remove(b)}:x;return d.remove(x),a[T?"unshift":"push"](b),qr(),b},remove:function(x,v){~(v=a.indexOf(x))&&a.splice(v,1)&&y>=v&&y--},_listeners:a},d})(),qr=function(){return!vn&>.wake()},Q={},ul=/^[\d.\-M][\d.\-,\s]/,cl=/["']/g,fl=function(e){for(var t={},r=e.substr(1,e.length-3).split(":"),n=r[0],i=1,o=r.length,a,l,c;i<o;i++)l=r[i],a=i!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),t[n]=isNaN(c)?c.replace(cl,"").trim():+c,n=l.substr(a+1).trim();return t},dl=function(e){var t=e.indexOf("(")+1,r=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<r?e.indexOf(")",r+1):r)},hl=function(e){var t=(e+"").split("("),r=Q[t[0]];return r&&t.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[fl(t[1])]:dl(e).split(",").map(so)):Q._CE&&ul.test(e)?Q._CE("",e):r},ml=function(e){return function(t){return 1-e(1-t)}},zr=function(e,t){return e&&(Oe(e)?e:Q[e]||hl(e))||t},Yr=function(e,t,r,n){r===void 0&&(r=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var i={easeIn:t,easeOut:r,easeInOut:n},o;return ut(e,function(a){Q[a]=Ot[a]=i,Q[o=a.toLowerCase()]=r;for(var l in i)Q[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Q[a+"."+l]=i[l]}),i},ko=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},ki=function s(e,t,r){var n=t>=1?t:1,i=(r||(e?.3:.45))/(t<1?t:1),o=i/Ci*(Math.asin(1/n)||0),a=function(u){return u===1?1:n*Math.pow(2,-10*u)*Vs((u-o)*i)+1},l=e==="out"?a:e==="in"?function(c){return 1-a(1-c)}:ko(a);return i=Ci/i,l.config=function(c,u){return s(e,c,u)},l},Pi=function s(e,t){t===void 0&&(t=1.70158);var r=function(o){return o?--o*o*((t+1)*o+t)+1:0},n=e==="out"?r:e==="in"?function(i){return 1-r(1-i)}:ko(r);return n.config=function(i){return s(e,i)},n};ut("Linear,Quad,Cubic,Quart,Quint,Strong",function(s,e){var t=e<5?e+1:e;Yr(s+",Power"+(t-1),e?function(r){return Math.pow(r,t)}:function(r){return r},function(r){return 1-Math.pow(1-r,t)},function(r){return r<.5?Math.pow(r*2,t)/2:1-Math.pow((1-r)*2,t)/2})});Q.Linear.easeNone=Q.none=Q.Linear.easeIn;Yr("Elastic",ki("in"),ki("out"),ki());(function(s,e){var t=1/e,r=2*t,n=2.5*t,i=function(a){return a<t?s*a*a:a<r?s*Math.pow(a-1.5/e,2)+.75:a<n?s*(a-=2.25/e)*a+.9375:s*Math.pow(a-2.625/e,2)+.984375};Yr("Bounce",function(o){return 1-i(1-o)},i)})(7.5625,2.75);Yr("Expo",function(s){return Math.pow(2,10*(s-1))*s+s*s*s*s*s*s*(1-s)});Yr("Circ",function(s){return-(eo(1-s*s)-1)});Yr("Sine",function(s){return s===1?1:-Es(s*Is)+1});Yr("Back",Pi("in"),Pi("out"),Pi());Q.SteppedEase=Q.steps=Ot.SteppedEase={config:function(e,t){e===void 0&&(e=1);var r=1/e,n=e+(t?0:1),i=t?1:0,o=1-pe;return function(a){return((n*Mn(0,o,a)|0)+i)*r}}};xn.ease=Q["quad.out"];ut("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(s){return Zi+=s+","+s+"Params,"});var Qi=function(e,t){this.id=zs++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:$i,this.set=t?t.getSetter:ti},wn=(function(){function s(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Qr(this,+t.duration,1,1),this.data=t.data,Te&&(this._ctx=Te,Te.data.push(this)),vn||gt.wake()}var e=s.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,Qr(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,n){if(qr(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(ei(this,r),!i._dp||i.parent||co(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&qt(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===pe||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),oo(this,r,n)),this},e.time=function(r,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+ja(this))%(this._dur+this._rDelay)||(r?this._dur:0),n):this._time},e.totalProgress=function(r,n){return arguments.length?this.totalTime(this.totalDuration()*r,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+ja(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,n){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*i,n):this._repeat?Hr(this._tTime,i)+1:1},e.timeScale=function(r,n){if(!arguments.length)return this._rts===-pe?0:this._rts;if(this._rts===r)return this;var i=this.parent&&this._ts?jn(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-pe?0:this._rts,this.totalTime(Mn(-Math.abs(this._delay),this.totalDuration(),i),n!==!1),Jn(this),js(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(qr(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==pe&&(this._tTime-=pe)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=we(r);var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&qt(n,this,this._start-this._delay),this}return this._start},e.endTime=function(r){return this._start+(_t(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var n=this.parent||this._dp;return n?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?jn(n.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=Ns);var n=tt;return tt=r,ji(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),tt=n,this},e.globalTime=function(r){for(var n=this,i=arguments.length?r:n.rawTime();n;)i=n._start+i/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(r):i},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Ha(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var n=this._time;return this._rDelay=r,Ha(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,n){return this.totalTime(It(this,r),_t(n))},e.restart=function(r,n){return this.play().totalTime(r?-this._delay:0,_t(n)),this._dur||(this._zTime=-pe),this},e.play=function(r,n){return r!=null&&this.seek(r,n),this.reversed(!1).paused(!1)},e.reverse=function(r,n){return r!=null&&this.seek(r||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(r,n){return r!=null&&this.seek(r,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-pe:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-pe,this},e.isActive=function(){var r=this.parent||this._dp,n=this._start,i;return!!(!r||this._ts&&this._initted&&r.isActive()&&(i=r.rawTime(!0))>=n&&i<this.endTime(!0)-pe)},e.eventCallback=function(r,n,i){var o=this.vars;return arguments.length>1?(n?(o[r]=n,i&&(o[r+"Params"]=i),r==="onUpdate"&&(this._onUpdate=n)):delete o[r],this):o[r]},e.then=function(r){var n=this,i=n._prom;return new Promise(function(o){var a=Oe(r)?r:lo,l=function(){var u=n.then;n.then=null,i&&i(),Oe(a)&&(a=a(n))&&(a.then||a===n)&&(n.then=u),o(a),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?l():n._prom=l})},e.kill=function(){mn(this)},s})();At(wn.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-pe,_prom:0,_ps:!1,_rts:1});var it=(function(s){Ja(e,s);function e(r,n){var i;return r===void 0&&(r={}),i=s.call(this,r)||this,i.labels={},i.smoothChildTiming=!!r.smoothChildTiming,i.autoRemoveChildren=!!r.autoRemoveChildren,i._sort=_t(r.sortChildren),Me&&qt(r.parent||Me,ur(i),n),r.reversed&&i.reverse(),r.paused&&i.paused(!0),r.scrollTrigger&&fo(ur(i),r.scrollTrigger),i}var t=e.prototype;return t.to=function(n,i,o){return _n(0,arguments,this),this},t.from=function(n,i,o){return _n(1,arguments,this),this},t.fromTo=function(n,i,o,a){return _n(2,arguments,this),this},t.set=function(n,i,o){return i.duration=0,i.parent=this,gn(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new ze(n,i,It(this,o),1),this},t.call=function(n,i,o){return qt(this,ze.delayedCall(0,n,i),o)},t.staggerTo=function(n,i,o,a,l,c,u){return o.duration=i,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=u,o.parent=this,new ze(n,o,It(this,l)),this},t.staggerFrom=function(n,i,o,a,l,c,u){return o.runBackwards=1,gn(o).immediateRender=_t(o.immediateRender),this.staggerTo(n,i,o,a,l,c,u)},t.staggerFromTo=function(n,i,o,a,l,c,u,d){return a.startAt=o,gn(a).immediateRender=_t(a.immediateRender),this.staggerTo(n,i,a,l,c,u,d)},t.render=function(n,i,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,u=n<=0?0:we(n),d=this._zTime<0!=n<0&&(this._initted||!c),g,y,_,m,x,v,T,b,k,h,S,w;if(this!==Me&&u>l&&n>=0&&(u=l),u!==this._tTime||o||d){if(a!==this._time&&c&&(u+=this._time-a,n+=this._time-a),g=u,k=this._start,b=this._ts,v=!b,d&&(c||(a=this._zTime),(n||!i)&&(this._zTime=n)),this._repeat){if(S=this._yoyo,x=c+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(x*100+n,i,o);if(g=we(u%x),u===l?(m=this._repeat,g=c):(h=we(u/x),m=~~h,m&&m===h&&(g=c,m--),g>c&&(g=c)),h=Hr(this._tTime,x),!a&&this._tTime&&h!==m&&this._tTime-h*x-this._dur<=0&&(h=m),S&&m&1&&(g=c-g,w=1),m!==h&&!this._lock){var M=S&&h&1,P=M===(S&&m&1);if(m<h&&(M=!M),a=M?0:u%c?c:u,this._lock=1,this.render(a||(w?0:we(m*x)),i,!c)._lock=0,this._tTime=u,!i&&this.parent&&Rt(this,"onRepeat"),this.vars.repeatRefresh&&!w&&(this.invalidate()._lock=1,h=m),a&&a!==this._time||v!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,P&&(this._lock=2,a=M?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!w&&this.invalidate()),this._lock=0,!this._ts&&!v)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(T=Ks(this,we(a),we(g)),T&&(u-=g-(g=T._start))),this._tTime=u,this._time=g,this._act=!!b,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&u&&c&&!i&&!h&&(Rt(this,"onStart"),this._tTime!==u))return this;if(g>=a&&n>=0)for(y=this._first;y;){if(_=y._next,(y._act||g>=y._start)&&y._ts&&T!==y){if(y.parent!==this)return this.render(n,i,o);if(y.render(y._ts>0?(g-y._start)*y._ts:(y._dirty?y.totalDuration():y._tDur)+(g-y._start)*y._ts,i,o),g!==this._time||!this._ts&&!v){T=0,_&&(u+=this._zTime=-pe);break}}y=_}else{y=this._last;for(var A=n<0?n:g;y;){if(_=y._prev,(y._act||A<=y._end)&&y._ts&&T!==y){if(y.parent!==this)return this.render(n,i,o);if(y.render(y._ts>0?(A-y._start)*y._ts:(y._dirty?y.totalDuration():y._tDur)+(A-y._start)*y._ts,i,o||tt&&ji(y)),g!==this._time||!this._ts&&!v){T=0,_&&(u+=this._zTime=A?-pe:pe);break}}y=_}}if(T&&!i&&(this.pause(),T.render(g>=a?0:-pe)._zTime=g>=a?1:-1,this._ts))return this._start=k,Jn(this),this.render(n,i,o);this._onUpdate&&!i&&Rt(this,"onUpdate",!0),(u===l&&this._tTime>=this.totalDuration()||!u&&a)&&(k===this._start||Math.abs(b)!==Math.abs(this._ts))&&(this._lock||((n||!c)&&(u===l&&this._ts>0||!u&&this._ts<0)&&vr(this,1),!i&&!(n<0&&!a)&&(u||a||!l)&&(Rt(this,u===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,i){var o=this;if(fr(i)||(i=It(this,i,n)),!(n instanceof wn)){if(at(n))return n.forEach(function(a){return o.add(a,i)}),this;if(Xe(n))return this.addLabel(n,i);if(Oe(n))n=ze.delayedCall(0,n);else return this}return this!==n?qt(this,n,i):this},t.getChildren=function(n,i,o,a){n===void 0&&(n=!0),i===void 0&&(i=!0),o===void 0&&(o=!0),a===void 0&&(a=-zt);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof ze?i&&l.push(c):(o&&l.push(c),n&&l.push.apply(l,c.getChildren(!0,i,o)))),c=c._next;return l},t.getById=function(n){for(var i=this.getChildren(1,1,1),o=i.length;o--;)if(i[o].vars.id===n)return i[o]},t.remove=function(n){return Xe(n)?this.removeLabel(n):Oe(n)?this.killTweensOf(n):(n.parent===this&&Kn(this,n),n===this._recent&&(this._recent=this._last),Ir(this))},t.totalTime=function(n,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=we(gt.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),s.prototype.totalTime.call(this,n,i),this._forcing=0,this):this._tTime},t.addLabel=function(n,i){return this.labels[n]=It(this,i),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,i,o){var a=ze.delayedCall(0,i||Tn,o);return a.data="isPause",this._hasPause=1,qt(this,a,It(this,n))},t.removePause=function(n){var i=this._first;for(n=It(this,n);i;)i._start===n&&i.data==="isPause"&&vr(i),i=i._next},t.killTweensOf=function(n,i,o){for(var a=this.getTweensOf(n,o),l=a.length;l--;)xr!==a[l]&&a[l].kill(n,i);return this},t.getTweensOf=function(n,i){for(var o=[],a=Et(n),l=this._first,c=fr(i),u;l;)l instanceof ze?Zs(l._targets,a)&&(c?(!xr||l._initted&&l._ts)&&l.globalTime(0)<=i&&l.globalTime(l.totalDuration())>i:!i||l.isActive())&&o.push(l):(u=l.getTweensOf(a,i)).length&&o.push.apply(o,u),l=l._next;return o},t.tweenTo=function(n,i){i=i||{};var o=this,a=It(o,n),l=i,c=l.startAt,u=l.onStart,d=l.onStartParams,g=l.immediateRender,y,_=ze.to(o,At({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:i.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||pe,onStart:function(){if(o.pause(),!y){var x=i.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==x&&Qr(_,x,0,1).render(_._time,!0,!0),y=1}u&&u.apply(_,d||[])}},i));return g?_.render(0):_},t.tweenFromTo=function(n,i,o){return this.tweenTo(i,At({startAt:{time:It(this,n)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),Qa(this,It(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),Qa(this,It(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+pe)},t.shiftChildren=function(n,i,o){o===void 0&&(o=0);var a=this._first,l=this.labels,c;for(n=we(n);a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(i)for(c in l)l[c]>=o&&(l[c]+=n);return Ir(this)},t.invalidate=function(n){var i=this._first;for(this._lock=0;i;)i.invalidate(n),i=i._next;return s.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var i=this._first,o;i;)o=i._next,this.remove(i),i=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),Ir(this)},t.totalDuration=function(n){var i=0,o=this,a=o._last,l=zt,c,u,d;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(d=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,qt(o,a,u-a._delay,1)._lock=0):l=u,u<0&&a._ts&&(i-=u,(!d&&!o._dp||d&&d.smoothChildTiming)&&(o._start+=we(u/o._ts),o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),l=0),a._end>i&&a._ts&&(i=a._end),a=c;Qr(o,o===Me&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(n){if(Me._ts&&(oo(Me,jn(n,Me)),ao=gt.frame),gt.frame>=Wa){Wa+=yt.autoSleep||120;var i=Me._first;if((!i||!i._ts)&&yt.autoSleep&>._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||gt.sleep()}}},e})(wn);At(it.prototype,{_lock:0,_hasPause:0,_forcing:0});var pl=function(e,t,r,n,i,o,a){var l=new ct(this._pt,e,t,0,1,ta,null,i),c=0,u=0,d,g,y,_,m,x,v,T;for(l.b=r,l.e=n,r+="",n+="",(v=~n.indexOf("random("))&&(n=Kr(n)),o&&(T=[r,n],o(T,e,t),r=T[0],n=T[1]),g=r.match(vi)||[];d=vi.exec(n);)_=d[0],m=n.substring(c,d.index),y?y=(y+1)%5:m.substr(-5)==="rgba("&&(y=1),_!==g[u++]&&(x=parseFloat(g[u-1])||0,l._pt={_next:l._pt,p:m||u===1?m:",",s:x,c:_.charAt(1)==="="?Br(x,_)-x:parseFloat(_)-x,m:y&&y<4?Math.round:0},c=vi.lastIndex);return l.c=c<n.length?n.substring(c,n.length):"",l.fp=a,(Xi.test(n)||v)&&(l.e=0),this._pt=l,l},qi=function(e,t,r,n,i,o,a,l,c,u){Oe(n)&&(n=n(i||0,e,o));var d=e[t],g=r!=="get"?r:Oe(d)?c?e[t.indexOf("set")||!Oe(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():d,y=Oe(d)?c?bl:Do:ea,_;if(Xe(n)&&(~n.indexOf("random(")&&(n=Kr(n)),n.charAt(1)==="="&&(_=Br(g,n)+(rt(g)||0),(_||_===0)&&(n=_))),!u||g!==n||Ei)return!isNaN(g*n)&&n!==""?(_=new ct(this._pt,e,t,+g||0,n-(g||0),typeof d=="boolean"?vl:Co,0,y),c&&(_.fp=c),a&&_.modifier(a,this,e),this._pt=_):(!d&&!(t in e)&&qn(t,n),pl.call(this,e,t,g,n,y,l||yt.stringFilter,c))},gl=function(e,t,r,n,i){if(Oe(e)&&(e=yn(e,i,t,r,n)),!Kt(e)||e.style&&e.nodeType||at(e)||to(e))return Xe(e)?yn(e,i,t,r,n):e;var o={},a;for(a in e)o[a]=yn(e[a],i,t,r,n);return o},Ki=function(e,t,r,n,i,o){var a,l,c,u;if(pt[e]&&(a=new pt[e]).init(i,a.rawVars?t[e]:gl(t[e],n,i,o,r),r,n,o)!==!1&&(r._pt=l=new ct(r._pt,i,e,0,1,a.render,a,0,a.priority),r!==$r))for(c=r._ptLookup[r._targets.indexOf(i)],u=a._props.length;u--;)c[a._props[u]]=l;return a},xr,Ei,Ji=function s(e,t,r){var n=e.vars,i=n.ease,o=n.startAt,a=n.immediateRender,l=n.lazy,c=n.onUpdate,u=n.runBackwards,d=n.yoyoEase,g=n.keyframes,y=n.autoRevert,_=e._dur,m=e._startAt,x=e._targets,v=e.parent,T=v&&v.data==="nested"?v.vars.targets:x,b=e._overwrite==="auto"&&!Bi,k=e.timeline,h=n.easeReverse||d,S,w,M,P,A,U,oe,Z,W,Fe,ve,fe,bt;if(k&&(!g||!i)&&(i="none"),e._ease=zr(i,xn.ease),e._rEase=h&&(zr(h)||e._ease),e._from=!k&&!!n.runBackwards,e._from&&(e.ratio=1),!k||g&&!n.stagger){if(Z=x[0]?Tr(x[0]).harness:0,fe=Z&&n[Z.prop],S=$n(n,Ni),m&&(m._zTime<0&&m.progress(1),t<0&&u&&a&&!y?m.render(-1,!0):m.revert(u&&_?Xn:Us),m._lazy=0),o){if(vr(e._startAt=ze.set(x,At({data:"isStart",overwrite:!1,parent:v,immediateRender:!0,lazy:!m&&_t(l),startAt:null,delay:0,onUpdate:c&&function(){return Rt(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(tt||!a&&!y)&&e._startAt.revert(Xn),a&&_&&t<=0&&r<=0){t&&(e._zTime=t);return}}else if(u&&_&&!m){if(t&&(a=!1),M=At({overwrite:!1,data:"isFromStart",lazy:a&&!m&&_t(l),immediateRender:a,stagger:0,parent:v},S),fe&&(M[Z.prop]=fe),vr(e._startAt=ze.set(x,M)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(tt?e._startAt.revert(Xn):e._startAt.render(-1,!0)),e._zTime=t,!a)s(e._startAt,pe,pe);else if(!t)return}for(e._pt=e._ptCache=0,l=_&&_t(l)||l&&!_,w=0;w<x.length;w++){if(A=x[w],oe=A._gsap||Wi(x)[w]._gsap,e._ptLookup[w]=Fe={},Oi[oe.id]&&br.length&&Wn(),ve=T===x?w:T.indexOf(A),Z&&(W=new Z).init(A,fe||S,e,ve,T)!==!1&&(e._pt=P=new ct(e._pt,A,W.name,0,1,W.render,W,0,W.priority),W._props.forEach(function(er){Fe[er]=P}),W.priority&&(U=1)),!Z||fe)for(M in S)pt[M]&&(W=Ki(M,S,e,ve,A,T))?W.priority&&(U=1):Fe[M]=P=qi.call(e,A,M,"get",S[M],ve,T,0,n.stringFilter);e._op&&e._op[w]&&e.kill(A,e._op[w]),b&&e._pt&&(xr=e,Me.killTweensOf(A,Fe,e.globalTime(t)),bt=!e.parent,xr=0),e._pt&&l&&(Oi[oe.id]=1)}U&&na(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!bt,g&&t<=0&&k.render(zt,!0,!0)},_l=function(e,t,r,n,i,o,a,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],u,d,g,y;if(!c)for(c=e._ptCache[t]=[],g=e._ptLookup,y=e._targets.length;y--;){if(u=g[y][t],u&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==t&&u.fp!==t;)u=u._next;if(!u)return Ei=1,e.vars[t]="+=0",Ji(e,a),Ei=0,l?bn(t+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(y=c.length;y--;)d=c[y],u=d._pt||d,u.s=(n||n===0)&&!i?n:u.s+(n||0)+o*u.c,u.c=r-u.s,d.e&&(d.e=Ae(r)+rt(d.e)),d.b&&(d.b=u.s+rt(d.b))},yl=function(e,t){var r=e[0]?Tr(e[0]).harness:0,n=r&&r.aliases,i,o,a,l;if(!n)return t;i=jr({},t);for(o in n)if(o in i)for(l=n[o].split(","),a=l.length;a--;)i[l[a]]=i[o];return i},xl=function(e,t,r,n){var i=t.ease||n||"power1.inOut",o,a;if(at(t))a=r[e]||(r[e]=[]),t.forEach(function(l,c){return a.push({t:c/(t.length-1)*100,v:l,e:i})});else for(o in t)a=r[o]||(r[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:i})},yn=function(e,t,r,n,i){return Oe(e)?e.call(t,r,n,i):Xe(e)&&~e.indexOf("random(")?Kr(e):e},Po=Zi+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",So={};ut(Po+",id,stagger,delay,duration,paused,scrollTrigger",function(s){return So[s]=1});var ze=(function(s){Ja(e,s);function e(r,n,i,o){var a;typeof n=="number"&&(i.duration=n,n=i,i=null),a=s.call(this,o?n:gn(n))||this;var l=a.vars,c=l.duration,u=l.delay,d=l.immediateRender,g=l.stagger,y=l.overwrite,_=l.keyframes,m=l.defaults,x=l.scrollTrigger,v=n.parent||Me,T=(at(r)||to(r)?fr(r[0]):"length"in n)?[r]:Et(r),b,k,h,S,w,M,P,A;if(a._targets=T.length?Wi(T):bn("GSAP target "+r+" not found. https://gsap.com",!yt.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=y,_||g||Gn(c)||Gn(u)){n=a.vars;var U=n.easeReverse||n.yoyoEase;if(b=a.timeline=new it({data:"nested",defaults:m||{},targets:v&&v.data==="nested"?v.vars.targets:T}),b.kill(),b.parent=b._dp=ur(a),b._start=0,g||Gn(c)||Gn(u)){if(S=T.length,P=g&&go(g),Kt(g))for(w in g)~Po.indexOf(w)&&(A||(A={}),A[w]=g[w]);for(k=0;k<S;k++)h=$n(n,So),h.stagger=0,U&&(h.easeReverse=U),A&&jr(h,A),M=T[k],h.duration=+yn(c,ur(a),k,M,T),h.delay=(+yn(u,ur(a),k,M,T)||0)-a._delay,!g&&S===1&&h.delay&&(a._delay=u=h.delay,a._start+=u,h.delay=0),b.to(M,h,P?P(k,M,T):0),b._ease=Q.none;b.duration()?c=u=0:a.timeline=0}else if(_){gn(At(b.vars.defaults,{ease:"none"})),b._ease=zr(_.ease||n.ease||"none");var oe=0,Z,W,Fe;if(at(_))_.forEach(function(ve){return b.to(T,ve,">")}),b.duration();else{h={};for(w in _)w==="ease"||w==="easeEach"||xl(w,_[w],h,_.easeEach);for(w in h)for(Z=h[w].sort(function(ve,fe){return ve.t-fe.t}),oe=0,k=0;k<Z.length;k++)W=Z[k],Fe={ease:W.e,duration:(W.t-(k?Z[k-1].t:0))/100*c},Fe[w]=W.v,b.to(T,Fe,oe),oe+=Fe.duration;b.duration()<c&&b.to({},{duration:c-b.duration()})}}c||a.duration(c=b.duration())}else a.timeline=0;return y===!0&&!Bi&&(xr=ur(a),Me.killTweensOf(T),xr=0),qt(v,ur(a),i),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(d||!c&&!_&&a._start===we(v._time)&&_t(d)&&Hs(ur(a))&&v.data!=="nested")&&(a._tTime=-pe,a.render(Math.max(0,-u)||0)),x&&fo(ur(a),x),a}var t=e.prototype;return t.render=function(n,i,o){var a=this._time,l=this._tDur,c=this._dur,u=n<0,d=n>l-pe&&!u?l:n<pe?0:n,g,y,_,m,x,v,T,b;if(!c)qs(this,n,i,o);else if(d!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u||this._lazy){if(g=d,b=this.timeline,this._repeat){if(m=c+this._rDelay,this._repeat<-1&&u)return this.totalTime(m*100+n,i,o);if(g=we(d%m),d===l?(_=this._repeat,g=c):(x=we(d/m),_=~~x,_&&_===x?(g=c,_--):g>c&&(g=c)),v=this._yoyo&&_&1,v&&(g=c-g),x=Hr(this._tTime,m),g===a&&!o&&this._initted&&_===x)return this._tTime=d,this;_!==x&&this.vars.repeatRefresh&&!v&&!this._lock&&g!==m&&this._initted&&(this._lock=o=1,this.render(we(m*_),!0).invalidate()._lock=0)}if(!this._initted){if(ho(this,u?n:g,o,i,d))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&_!==x))return this;if(c!==this._dur)return this.render(n,i,o)}if(this._rEase){var k=g<a;if(k!==this._inv){var h=k?a:c-a;this._inv=k,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=a,this._invRecip=h?(k?-1:1)/h:0,this._invScale=k?-this.ratio:1-this.ratio,this._invEase=k?this._rEase:this._ease}this.ratio=T=this._invRatio+this._invScale*this._invEase((g-this._invTime)*this._invRecip)}else this.ratio=T=this._ease(g/c);if(this._from&&(this.ratio=T=1-T),this._tTime=d,this._time=g,!this._act&&this._ts&&(this._act=1,this._lazy=0),!a&&d&&!i&&!x&&(Rt(this,"onStart"),this._tTime!==d))return this;for(y=this._pt;y;)y.r(T,y.d),y=y._next;b&&b.render(n<0?n:b._dur*b._ease(g/this._dur),i,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!i&&(u&&Ai(this,n,i,o),Rt(this,"onUpdate")),this._repeat&&_!==x&&this.vars.onRepeat&&!i&&this.parent&&Rt(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(u&&!this._onUpdate&&Ai(this,n,!0,!0),(n||!c)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&vr(this,1),!i&&!(u&&!a)&&(d||a||v)&&(Rt(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),s.prototype.invalidate.call(this,n)},t.resetTo=function(n,i,o,a,l){vn||gt.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||Ji(this,c),u=this._ease(c/this._dur),_l(this,n,i,o,a,u,c,l)?this.resetTo(n,i,o,a,1):(ei(this,0),this.parent||uo(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,i){if(i===void 0&&(i="all"),!n&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?mn(this):this.scrollTrigger&&this.scrollTrigger.kill(!!tt),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,i,xr&&xr.vars.overwrite!==!0)._first||mn(this),this.parent&&o!==this.timeline.totalDuration()&&Qr(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=n?Et(n):a,c=this._ptLookup,u=this._pt,d,g,y,_,m,x,v;if((!i||i==="all")&&$s(a,l))return i==="all"&&(this._pt=0),mn(this);for(d=this._op=this._op||[],i!=="all"&&(Xe(i)&&(m={},ut(i,function(T){return m[T]=1}),i=m),i=yl(a,i)),v=a.length;v--;)if(~l.indexOf(a[v])){g=c[v],i==="all"?(d[v]=i,_=g,y={}):(y=d[v]=d[v]||{},_=i);for(m in _)x=g&&g[m],x&&((!("kill"in x.d)||x.d.kill(m)===!0)&&Kn(this,x,"_pt"),delete g[m]),y!=="all"&&(y[m]=1)}return this._initted&&!this._pt&&u&&mn(this),this},e.to=function(n,i){return new e(n,i,arguments[2])},e.from=function(n,i){return _n(1,arguments)},e.delayedCall=function(n,i,o,a){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:i,onReverseComplete:i,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(n,i,o){return _n(2,arguments)},e.set=function(n,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(n,i)},e.killTweensOf=function(n,i,o){return Me.killTweensOf(n,i,o)},e})(wn);At(ze.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ut("staggerTo,staggerFrom,staggerFromTo",function(s){ze[s]=function(){var e=new it,t=Li.call(arguments,0);return t.splice(s==="staggerFromTo"?5:4,0,0),e[s].apply(e,t)}});var ea=function(e,t,r){return e[t]=r},Do=function(e,t,r){return e[t](r)},bl=function(e,t,r,n){return e[t](n.fp,r)},Tl=function(e,t,r){return e.setAttribute(t,r)},ti=function(e,t){return Oe(e[t])?Do:Qn(e[t])&&e.setAttribute?Tl:ea},Co=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},vl=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},ta=function(e,t){var r=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+n,r=r._next;n+=t.c}t.set(t.t,t.p,n,t)},ra=function(e,t){for(var r=t._pt;r;)r.r(e,r.d),r=r._next},wl=function(e,t,r,n){for(var i=this._pt,o;i;)o=i._next,i.p===n&&i.modifier(e,t,r),i=o},Ml=function(e){for(var t=this._pt,r,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?Kn(this,t,"_pt"):t.dep||(r=1),t=n;return!r},kl=function(e,t,r,n){n.mSet(e,t,n.m.call(n.tween,r,n.mt),n)},na=function(e){for(var t=e._pt,r,n,i,o;t;){for(r=t._next,n=i;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:o)?t._prev._next=t:i=t,(t._next=n)?n._prev=t:o=t,t=r}e._pt=i},ct=(function(){function s(t,r,n,i,o,a,l,c,u){this.t=r,this.s=i,this.c=o,this.p=n,this.r=a||Co,this.d=l||this,this.set=c||ea,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=s.prototype;return e.modifier=function(r,n,i){this.mSet=this.mSet||this.set,this.set=kl,this.m=r,this.mt=i,this.tween=n},s})();ut(Zi+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(s){return Ni[s]=1});Ot.TweenMax=Ot.TweenLite=ze;Ot.TimelineLite=Ot.TimelineMax=it;Me=new it({sortChildren:!1,defaults:xn,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});yt.stringFilter=Hi;var Er=[],Nn={},Pl=[],Ka=0,Sl=0,Si=function(e){return(Nn[e]||Pl).map(function(t){return t()})},Vi=function(){var e=Date.now(),t=[];e-Ka>2&&(Si("matchMediaInit"),Er.forEach(function(r){var n=r.queries,i=r.conditions,o,a,l,c;for(a in n)o=Qt.matchMedia(n[a]).matches,o&&(l=1),o!==i[a]&&(i[a]=o,c=1);c&&(r.revert(),l&&t.push(r))}),Si("matchMediaRevert"),t.forEach(function(r){return r.onMatch(r,function(n){return r.add(null,n)})}),Ka=e,Si("matchMedia"))},Ro=(function(){function s(t,r){this.selector=r&&Ii(r),this.data=[],this._r=[],this.isReverted=!1,this.id=Sl++,t&&this.add(t)}var e=s.prototype;return e.add=function(r,n,i){Oe(r)&&(i=n,n=r,r=Oe);var o=this,a=function(){var c=Te,u=o.selector,d;return c&&c!==o&&c.data.push(o),i&&(o.selector=Ii(i)),Te=o,d=n.apply(o,arguments),Oe(d)&&o._r.push(d),Te=c,o.selector=u,o.isReverted=!1,d};return o.last=a,r===Oe?a(o,function(l){return o.add(null,l)}):r?o[r]=a:a},e.ignore=function(r){var n=Te;Te=null,r(this),Te=n},e.getTweens=function(){var r=[];return this.data.forEach(function(n){return n instanceof s?r.push.apply(r,n.getTweens()):n instanceof ze&&!(n.parent&&n.parent.data==="nested")&&r.push(n)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,n){var i=this;if(r?(function(){for(var a=i.getTweens(),l=i.data.length,c;l--;)c=i.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,d){return d.g-u.g||-1/0}).forEach(function(u){return u.t.revert(r)}),l=i.data.length;l--;)c=i.data[l],c instanceof it?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof ze)&&c.revert&&c.revert(r);i._r.forEach(function(u){return u(r,i)}),i.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=Er.length;o--;)Er[o].id===this.id&&Er.splice(o,1)},e.revert=function(r){this.kill(r||{})},s})(),Dl=(function(){function s(t){this.contexts=[],this.scope=t,Te&&Te.data.push(this)}var e=s.prototype;return e.add=function(r,n,i){Kt(r)||(r={matches:r});var o=new Ro(0,i||this.scope),a=o.conditions={},l,c,u;Te&&!o.selector&&(o.selector=Te.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=r;for(c in r)c==="all"?u=1:(l=Qt.matchMedia(r[c]),l&&(Er.indexOf(o)<0&&Er.push(o),(a[c]=l.matches)&&(u=1),l.addListener?l.addListener(Vi):l.addEventListener("change",Vi)));return u&&n(o,function(d){return o.add(null,d)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(n){return n.kill(r,!0)})},s})(),Hn={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach(function(n){return vo(n)})},timeline:function(e){return new it(e)},getTweensOf:function(e,t){return Me.getTweensOf(e,t)},getProperty:function(e,t,r,n){Xe(e)&&(e=Et(e)[0]);var i=Tr(e||{}).get,o=r?lo:so;return r==="native"&&(r=""),e&&(t?o((pt[t]&&pt[t].get||i)(e,t,r,n)):function(a,l,c){return o((pt[a]&&pt[a].get||i)(e,a,l,c))})},quickSetter:function(e,t,r){if(e=Et(e),e.length>1){var n=e.map(function(u){return ot.quickSetter(u,t,r)}),i=n.length;return function(u){for(var d=i;d--;)n[d](u)}}e=e[0]||{};var o=pt[t],a=Tr(e),l=a.harness&&(a.harness.aliases||{})[t]||t,c=o?function(u){var d=new o;$r._pt=0,d.init(e,r?u+r:u,$r,0,[e]),d.render(1,d),$r._pt&&ra(1,$r)}:a.set(e,l);return o?c:function(u){return c(e,l,r?u+r:u,a,1)}},quickTo:function(e,t,r){var n,i=ot.to(e,At((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),r||{})),o=function(l,c,u){return i.resetTo(t,l,c,u)};return o.tween=i,o},isTweening:function(e){return Me.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=zr(e.ease,xn.ease)),$a(xn,e||{})},config:function(e){return $a(yt,e||{})},registerEffect:function(e){var t=e.name,r=e.effect,n=e.plugins,i=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!pt[a]&&!Ot[a]&&bn(t+" effect requires "+a+" plugin.")}),wi[t]=function(a,l,c){return r(Et(a),At(l||{},i),c)},o&&(it.prototype[t]=function(a,l,c){return this.add(wi[t](a,Kt(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){Q[e]=zr(t)},parseEase:function(e,t){return arguments.length?zr(e,t):Q},getById:function(e){return Me.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var r=new it(e),n,i;for(r.smoothChildTiming=_t(e.smoothChildTiming),Me.remove(r),r._dp=0,r._time=r._tTime=Me._time,n=Me._first;n;)i=n._next,(t||!(!n._dur&&n instanceof ze&&n.vars.onComplete===n._targets[0]))&&qt(r,n,n._start-n._delay),n=i;return qt(Me,r,0),r},context:function(e,t){return e?new Ro(e,t):Te},matchMedia:function(e){return new Dl(e)},matchMediaRefresh:function(){return Er.forEach(function(e){var t=e.conditions,r,n;for(n in t)t[n]&&(t[n]=!1,r=1);r&&e.revert()})||Vi()},addEventListener:function(e,t){var r=Nn[e]||(Nn[e]=[]);~r.indexOf(t)||r.push(t)},removeEventListener:function(e,t){var r=Nn[e],n=r&&r.indexOf(t);n>=0&&r.splice(n,1)},utils:{wrap:al,wrapYoyo:ol,distribute:go,random:yo,snap:_o,normalize:il,getUnit:rt,clamp:el,splitColor:wo,toArray:Et,selector:Ii,mapRange:bo,pipe:rl,unitize:nl,interpolate:sl,shuffle:po},install:no,effects:wi,ticker:gt,updateRoot:it.updateRoot,plugins:pt,globalTimeline:Me,core:{PropTween:ct,globals:io,Tween:ze,Timeline:it,Animation:wn,getCache:Tr,_removeLinkedListItem:Kn,reverting:function(){return tt},context:function(e){return e&&Te&&(Te.data.push(e),e._ctx=Te),Te},suppressOverwrites:function(e){return Bi=e}}};ut("to,from,fromTo,delayedCall,set,killTweensOf",function(s){return Hn[s]=ze[s]});gt.add(it.updateRoot);$r=Hn.to({},{duration:0});var Cl=function(e,t){for(var r=e._pt;r&&r.p!==t&&r.op!==t&&r.fp!==t;)r=r._next;return r},Rl=function(e,t){var r=e._targets,n,i,o;for(n in t)for(i=r.length;i--;)o=e._ptLookup[i][n],o&&(o=o.d)&&(o._pt&&(o=Cl(o,n)),o&&o.modifier&&o.modifier(t[n],e,r[i],n))},Di=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,i,o){o._onInit=function(a){var l,c;if(Xe(i)&&(l={},ut(i,function(u){return l[u]=1}),i=l),t){l={};for(c in i)l[c]=t(i[c]);i=l}Rl(a,i)}}}},ot=Hn.registerPlugin({name:"attr",init:function(e,t,r,n,i){var o,a,l;this.tween=r;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],n,i,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var r=t._pt;r;)tt?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,t){for(var r=t.length;r--;)this.add(e,r,e[r]||0,t[r],0,0,0,0,0,1)}},Di("roundProps",zi),Di("modifiers"),Di("snap",_o))||Hn;ze.version=it.version=ot.version="3.15.0";ro=1;Yi()&&qr();var Ol=Q.Power0,Al=Q.Power1,Fl=Q.Power2,Ll=Q.Power3,Il=Q.Power4,zl=Q.Linear,El=Q.Quad,Vl=Q.Cubic,Bl=Q.Quart,Yl=Q.Quint,Gl=Q.Strong,Xl=Q.Elastic,Ul=Q.Back,Nl=Q.SteppedEase,Zl=Q.Bounce,Wl=Q.Sine,$l=Q.Expo,jl=Q.Circ;ue();var Oo,Mr,en,ua,Nr,Hl,Ao,ca,Ql=function(){return typeof window<"u"},hr={},Ur=180/Math.PI,tn=Math.PI/180,Jr=Math.atan2,Fo=1e8,fa=/([A-Z])/g,ql=/(left|right|width|margin|padding|x)/i,Kl=/[\s,\(]\S/,Jt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},aa=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Jl=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},eu=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},tu=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},ru=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},Go=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Xo=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},nu=function(e,t,r){return e.style[t]=r},iu=function(e,t,r){return e.style.setProperty(t,r)},au=function(e,t,r){return e._gsap[t]=r},ou=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},su=function(e,t,r,n,i){var o=e._gsap;o.scaleX=o.scaleY=r,o.renderTransform(i,o)},lu=function(e,t,r,n,i){var o=e._gsap;o[t]=r,o.renderTransform(i,o)},ke="transform",xt=ke+"Origin",uu=function s(e,t){var r=this,n=this.target,i=n.style,o=n._gsap;if(e in hr&&i){if(this.tfm=this.tfm||{},e!=="transform")e=Jt[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return r.tfm[a]=dr(n,a)}):this.tfm[e]=o.x?o[e]:dr(n,e),e===xt&&(this.tfm.zOrigin=o.zOrigin);else return Jt.transform.split(",").forEach(function(a){return s.call(r,a,t)});if(this.props.indexOf(ke)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(xt,t,"")),e=ke}(i||t)&&this.props.push(e,t,i[e])},Uo=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},cu=function(){var e=this.props,t=this.target,r=t.style,n=t._gsap,i,o;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?r[e[i]]=e[i+2]:r.removeProperty(e[i].substr(0,2)==="--"?e[i]:e[i].replace(fa,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),i=ca(),(!i||!i.isStart)&&!r[ke]&&(Uo(r),n.zOrigin&&r[xt]&&(r[xt]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},No=function(e,t){var r={target:e,props:[],revert:cu,save:uu};return e._gsap||ot.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return r.save(n)}),r},Zo,oa=function(e,t){var r=Mr.createElementNS?Mr.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Mr.createElement(e);return r&&r.style?r:Mr.createElement(e)},Ft=function s(e,t,r){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(fa,"-$1").toLowerCase())||n.getPropertyValue(t)||!r&&s(e,rn(t)||t,1)||""},Lo="O,Moz,ms,Ms,Webkit".split(","),rn=function(e,t,r){var n=t||Nr,i=n.style,o=5;if(e in i&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Lo[o]+e in i););return o<0?null:(o===3?"ms":o>=0?Lo[o]:"")+e},sa=function(){Ql()&&window.document&&(Oo=window,Mr=Oo.document,en=Mr.documentElement,Nr=oa("div")||{style:{}},Hl=oa("div"),ke=rn(ke),xt=ke+"Origin",Nr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Zo=!!rn("perspective"),ca=ot.core.reverting,ua=1)},Io=function(e){var t=e.ownerSVGElement,r=oa("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),i;n.style.display="block",r.appendChild(n),en.appendChild(r);try{i=n.getBBox()}catch{}return r.removeChild(n),en.removeChild(r),i},zo=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},Wo=function(e){var t,r;try{t=e.getBBox()}catch{t=Io(e),r=1}return t&&(t.width||t.height)||r||(t=Io(e)),t&&!t.width&&!t.x&&!t.y?{x:+zo(e,["x","cx","x1"])||0,y:+zo(e,["y","cy","y1"])||0,width:0,height:0}:t},$o=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Wo(e))},Pr=function(e,t){if(t){var r=e.style,n;t in hr&&t!==xt&&(t=ke),r.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),r.removeProperty(n==="--"?t:t.replace(fa,"-$1").toLowerCase())):r.removeAttribute(t)}},kr=function(e,t,r,n,i,o){var a=new ct(e._pt,t,r,0,1,o?Xo:Go);return e._pt=a,a.b=n,a.e=i,e._props.push(r),a},Eo={deg:1,rad:1,turn:1},fu={grid:1,flex:1},Sr=function s(e,t,r,n){var i=parseFloat(r)||0,o=(r+"").trim().substr((i+"").length)||"px",a=Nr.style,l=ql.test(t),c=e.tagName.toLowerCase()==="svg",u=(c?"client":"offset")+(l?"Width":"Height"),d=100,g=n==="px",y=n==="%",_,m,x,v;if(n===o||!i||Eo[n]||Eo[o])return i;if(o!=="px"&&!g&&(i=s(e,t,r,"px")),v=e.getCTM&&$o(e),(y||o==="%")&&(hr[t]||~t.indexOf("adius")))return _=v?e.getBBox()[l?"width":"height"]:e[u],Ae(y?i/_*d:i/100*_);if(a[l?"width":"height"]=d+(g?o:n),m=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!c?e:e.parentNode,v&&(m=(e.ownerSVGElement||{}).parentNode),(!m||m===Mr||!m.appendChild)&&(m=Mr.body),x=m._gsap,x&&y&&x.width&&l&&x.time===gt.time&&!x.uncache)return Ae(i/x.width*d);if(y&&(t==="height"||t==="width")){var T=e.style[t];e.style[t]=d+n,_=e[u],T?e.style[t]=T:Pr(e,t)}else(y||o==="%")&&!fu[Ft(m,"display")]&&(a.position=Ft(e,"position")),m===e&&(a.position="static"),m.appendChild(Nr),_=Nr[u],m.removeChild(Nr),a.position="absolute";return l&&y&&(x=Tr(m),x.time=gt.time,x.width=m[u]),Ae(g?_*i/d:_&&i?d/_*i:0)},dr=function(e,t,r,n){var i;return ua||sa(),t in Jt&&t!=="transform"&&(t=Jt[t],~t.indexOf(",")&&(t=t.split(",")[0])),hr[t]&&t!=="transform"?(i=Sn(e,n),i=t!=="transformOrigin"?i[t]:i.svg?i.origin:ni(Ft(e,xt))+" "+i.zOrigin+"px"):(i=e.style[t],(!i||i==="auto"||n||~(i+"").indexOf("calc("))&&(i=ri[t]&&ri[t](e,t,r)||Ft(e,t)||$i(e,t)||(t==="opacity"?1:0))),r&&!~(i+"").trim().indexOf(" ")?Sr(e,t,i,r)+r:i},du=function(e,t,r,n){if(!r||r==="none"){var i=rn(t,e,1),o=i&&Ft(e,i,1);o&&o!==r?(t=i,r=o):t==="borderColor"&&(r=Ft(e,"borderTopColor"))}var a=new ct(this._pt,e.style,t,0,1,ta),l=0,c=0,u,d,g,y,_,m,x,v,T,b,k,h;if(a.b=r,a.e=n,r+="",n+="",n.substring(0,6)==="var(--"&&(n=Ft(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(m=e.style[t],e.style[t]=n,n=Ft(e,t)||n,m?e.style[t]=m:Pr(e,t)),u=[r,n],Hi(u),r=u[0],n=u[1],g=r.match(Vr)||[],h=n.match(Vr)||[],h.length){for(;d=Vr.exec(n);)x=d[0],T=n.substring(l,d.index),_?_=(_+1)%5:(T.substr(-5)==="rgba("||T.substr(-5)==="hsla(")&&(_=1),x!==(m=g[c++]||"")&&(y=parseFloat(m)||0,k=m.substr((y+"").length),x.charAt(1)==="="&&(x=Br(y,x)+k),v=parseFloat(x),b=x.substr((v+"").length),l=Vr.lastIndex-b.length,b||(b=b||yt.units[t]||k,l===n.length&&(n+=b,a.e+=b)),k!==b&&(y=Sr(e,t,m,b)||0),a._pt={_next:a._pt,p:T||c===1?T:",",s:y,c:v-y,m:_&&_<4||t==="zIndex"?Math.round:0});a.c=l<n.length?n.substring(l,n.length):""}else a.r=t==="display"&&n==="none"?Xo:Go;return Xi.test(n)&&(a.e=0),this._pt=a,a},Vo={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},hu=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return(r==="top"||r==="bottom"||n==="left"||n==="right")&&(e=r,r=n,n=e),t[0]=Vo[r]||r,t[1]=Vo[n]||n,t.join(" ")},mu=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r=t.t,n=r.style,i=t.u,o=r._gsap,a,l,c;if(i==="all"||i===!0)n.cssText="",l=1;else for(i=i.split(","),c=i.length;--c>-1;)a=i[c],hr[a]&&(l=1,a=a==="transformOrigin"?xt:ke),Pr(r,a);l&&(Pr(r,ke),o&&(o.svg&&r.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",Sn(r,1),o.uncache=1,Uo(n)))}},ri={clearProps:function(e,t,r,n,i){if(i.data!=="isFromStart"){var o=e._pt=new ct(e._pt,t,r,0,0,mu);return o.u=n,o.pr=-10,o.tween=i,e._props.push(r),1}}},Pn=[1,0,0,1,0,0],jo={},Ho=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Bo=function(e){var t=Ft(e,ke);return Ho(t)?Pn:t.substr(7).match(Gi).map(Ae)},da=function(e,t){var r=e._gsap||Tr(e),n=e.style,i=Bo(e),o,a,l,c;return r.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,i=[l.a,l.b,l.c,l.d,l.e,l.f],i.join(",")==="1,0,0,1,0,0"?Pn:i):(i===Pn&&!e.offsetParent&&e!==en&&!r.svg&&(l=n.display,n.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,a=e.nextElementSibling,en.appendChild(e)),i=Bo(e),l?n.display=l:Pr(e,"display"),c&&(a?o.insertBefore(e,a):o?o.appendChild(e):en.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},la=function(e,t,r,n,i,o){var a=e._gsap,l=i||da(e,!0),c=a.xOrigin||0,u=a.yOrigin||0,d=a.xOffset||0,g=a.yOffset||0,y=l[0],_=l[1],m=l[2],x=l[3],v=l[4],T=l[5],b=t.split(" "),k=parseFloat(b[0])||0,h=parseFloat(b[1])||0,S,w,M,P;r?l!==Pn&&(w=y*x-_*m)&&(M=k*(x/w)+h*(-m/w)+(m*T-x*v)/w,P=k*(-_/w)+h*(y/w)-(y*T-_*v)/w,k=M,h=P):(S=Wo(e),k=S.x+(~b[0].indexOf("%")?k/100*S.width:k),h=S.y+(~(b[1]||b[0]).indexOf("%")?h/100*S.height:h)),n||n!==!1&&a.smooth?(v=k-c,T=h-u,a.xOffset=d+(v*y+T*m)-v,a.yOffset=g+(v*_+T*x)-T):a.xOffset=a.yOffset=0,a.xOrigin=k,a.yOrigin=h,a.smooth=!!n,a.origin=t,a.originIsAbsolute=!!r,e.style[xt]="0px 0px",o&&(kr(o,a,"xOrigin",c,k),kr(o,a,"yOrigin",u,h),kr(o,a,"xOffset",d,a.xOffset),kr(o,a,"yOffset",g,a.yOffset)),e.setAttribute("data-svg-origin",k+" "+h)},Sn=function(e,t){var r=e._gsap||new Qi(e);if("x"in r&&!t&&!r.uncache)return r;var n=e.style,i=r.scaleX<0,o="px",a="deg",l=getComputedStyle(e),c=Ft(e,xt)||"0",u,d,g,y,_,m,x,v,T,b,k,h,S,w,M,P,A,U,oe,Z,W,Fe,ve,fe,bt,er,Wt,mr,tr,Dr,Tt,Vt;return u=d=g=m=x=v=T=b=k=0,y=_=1,r.svg=!!(e.getCTM&&$o(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[ke]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[ke]!=="none"?l[ke]:"")),n.scale=n.rotate=n.translate="none"),w=da(e,r.svg),r.svg&&(r.uncache?(bt=e.getBBox(),c=r.xOrigin-bt.x+"px "+(r.yOrigin-bt.y)+"px",fe=""):fe=!t&&e.getAttribute("data-svg-origin"),la(e,fe||c,!!fe||r.originIsAbsolute,r.smooth!==!1,w)),h=r.xOrigin||0,S=r.yOrigin||0,w!==Pn&&(U=w[0],oe=w[1],Z=w[2],W=w[3],u=Fe=w[4],d=ve=w[5],w.length===6?(y=Math.sqrt(U*U+oe*oe),_=Math.sqrt(W*W+Z*Z),m=U||oe?Jr(oe,U)*Ur:0,T=Z||W?Jr(Z,W)*Ur+m:0,T&&(_*=Math.abs(Math.cos(T*tn))),r.svg&&(u-=h-(h*U+S*Z),d-=S-(h*oe+S*W))):(Vt=w[6],Dr=w[7],Wt=w[8],mr=w[9],tr=w[10],Tt=w[11],u=w[12],d=w[13],g=w[14],M=Jr(Vt,tr),x=M*Ur,M&&(P=Math.cos(-M),A=Math.sin(-M),fe=Fe*P+Wt*A,bt=ve*P+mr*A,er=Vt*P+tr*A,Wt=Fe*-A+Wt*P,mr=ve*-A+mr*P,tr=Vt*-A+tr*P,Tt=Dr*-A+Tt*P,Fe=fe,ve=bt,Vt=er),M=Jr(-Z,tr),v=M*Ur,M&&(P=Math.cos(-M),A=Math.sin(-M),fe=U*P-Wt*A,bt=oe*P-mr*A,er=Z*P-tr*A,Tt=W*A+Tt*P,U=fe,oe=bt,Z=er),M=Jr(oe,U),m=M*Ur,M&&(P=Math.cos(M),A=Math.sin(M),fe=U*P+oe*A,bt=Fe*P+ve*A,oe=oe*P-U*A,ve=ve*P-Fe*A,U=fe,Fe=bt),x&&Math.abs(x)+Math.abs(m)>359.9&&(x=m=0,v=180-v),y=Ae(Math.sqrt(U*U+oe*oe+Z*Z)),_=Ae(Math.sqrt(ve*ve+Vt*Vt)),M=Jr(Fe,ve),T=Math.abs(M)>2e-4?M*Ur:0,k=Tt?1/(Tt<0?-Tt:Tt):0),r.svg&&(fe=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!Ho(Ft(e,ke)),fe&&e.setAttribute("transform",fe))),Math.abs(T)>90&&Math.abs(T)<270&&(i?(y*=-1,T+=m<=0?180:-180,m+=m<=0?180:-180):(_*=-1,T+=T<=0?180:-180)),t=t||r.uncache,r.x=u-((r.xPercent=u&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+o,r.y=d-((r.yPercent=d&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-d)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+o,r.z=g+o,r.scaleX=Ae(y),r.scaleY=Ae(_),r.rotation=Ae(m)+a,r.rotationX=Ae(x)+a,r.rotationY=Ae(v)+a,r.skewX=T+a,r.skewY=b+a,r.transformPerspective=k+o,(r.zOrigin=parseFloat(c.split(" ")[2])||!t&&r.zOrigin||0)&&(n[xt]=ni(c)),r.xOffset=r.yOffset=0,r.force3D=yt.force3D,r.renderTransform=r.svg?gu:Zo?Qo:pu,r.uncache=0,r},ni=function(e){return(e=e.split(" "))[0]+" "+e[1]},ia=function(e,t,r){var n=rt(t);return Ae(parseFloat(t)+parseFloat(Sr(e,"x",r+"px",n)))+n},pu=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,Qo(e,t)},Gr="0deg",kn="0px",Xr=") ",Qo=function(e,t){var r=t||this,n=r.xPercent,i=r.yPercent,o=r.x,a=r.y,l=r.z,c=r.rotation,u=r.rotationY,d=r.rotationX,g=r.skewX,y=r.skewY,_=r.scaleX,m=r.scaleY,x=r.transformPerspective,v=r.force3D,T=r.target,b=r.zOrigin,k="",h=v==="auto"&&e&&e!==1||v===!0;if(b&&(d!==Gr||u!==Gr)){var S=parseFloat(u)*tn,w=Math.sin(S),M=Math.cos(S),P;S=parseFloat(d)*tn,P=Math.cos(S),o=ia(T,o,w*P*-b),a=ia(T,a,-Math.sin(S)*-b),l=ia(T,l,M*P*-b+b)}x!==kn&&(k+="perspective("+x+Xr),(n||i)&&(k+="translate("+n+"%, "+i+"%) "),(h||o!==kn||a!==kn||l!==kn)&&(k+=l!==kn||h?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Xr),c!==Gr&&(k+="rotate("+c+Xr),u!==Gr&&(k+="rotateY("+u+Xr),d!==Gr&&(k+="rotateX("+d+Xr),(g!==Gr||y!==Gr)&&(k+="skew("+g+", "+y+Xr),(_!==1||m!==1)&&(k+="scale("+_+", "+m+Xr),T.style[ke]=k||"translate(0, 0)"},gu=function(e,t){var r=t||this,n=r.xPercent,i=r.yPercent,o=r.x,a=r.y,l=r.rotation,c=r.skewX,u=r.skewY,d=r.scaleX,g=r.scaleY,y=r.target,_=r.xOrigin,m=r.yOrigin,x=r.xOffset,v=r.yOffset,T=r.forceCSS,b=parseFloat(o),k=parseFloat(a),h,S,w,M,P;l=parseFloat(l),c=parseFloat(c),u=parseFloat(u),u&&(u=parseFloat(u),c+=u,l+=u),l||c?(l*=tn,c*=tn,h=Math.cos(l)*d,S=Math.sin(l)*d,w=Math.sin(l-c)*-g,M=Math.cos(l-c)*g,c&&(u*=tn,P=Math.tan(c-u),P=Math.sqrt(1+P*P),w*=P,M*=P,u&&(P=Math.tan(u),P=Math.sqrt(1+P*P),h*=P,S*=P)),h=Ae(h),S=Ae(S),w=Ae(w),M=Ae(M)):(h=d,M=g,S=w=0),(b&&!~(o+"").indexOf("px")||k&&!~(a+"").indexOf("px"))&&(b=Sr(y,"x",o,"px"),k=Sr(y,"y",a,"px")),(_||m||x||v)&&(b=Ae(b+_-(_*h+m*w)+x),k=Ae(k+m-(_*S+m*M)+v)),(n||i)&&(P=y.getBBox(),b=Ae(b+n/100*P.width),k=Ae(k+i/100*P.height)),P="matrix("+h+","+S+","+w+","+M+","+b+","+k+")",y.setAttribute("transform",P),T&&(y.style[ke]=P)},_u=function(e,t,r,n,i){var o=360,a=Xe(i),l=parseFloat(i)*(a&&~i.indexOf("rad")?Ur:1),c=l-n,u=n+c+"deg",d,g;return a&&(d=i.split("_")[1],d==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),d==="cw"&&c<0?c=(c+o*Fo)%o-~~(c/o)*o:d==="ccw"&&c>0&&(c=(c-o*Fo)%o-~~(c/o)*o)),e._pt=g=new ct(e._pt,t,r,n,c,Jl),g.e=u,g.u="deg",e._props.push(r),g},Yo=function(e,t){for(var r in t)e[r]=t[r];return e},yu=function(e,t,r){var n=Yo({},r._gsap),i="perspective,force3D,transformOrigin,svgOrigin",o=r.style,a,l,c,u,d,g,y,_;n.svg?(c=r.getAttribute("transform"),r.setAttribute("transform",""),o[ke]=t,a=Sn(r,1),Pr(r,ke),r.setAttribute("transform",c)):(c=getComputedStyle(r)[ke],o[ke]=t,a=Sn(r,1),o[ke]=c);for(l in hr)c=n[l],u=a[l],c!==u&&i.indexOf(l)<0&&(y=rt(c),_=rt(u),d=y!==_?Sr(r,l,c,_):parseFloat(c),g=parseFloat(u),e._pt=new ct(e._pt,a,l,d,g-d,aa),e._pt.u=_||0,e._props.push(l));Yo(a,n)};ut("padding,margin,Width,Radius",function(s,e){var t="Top",r="Right",n="Bottom",i="Left",o=(e<3?[t,r,n,i]:[t+i,t+r,n+r,n+i]).map(function(a){return e<2?s+a:"border"+a+s});ri[e>1?"border"+s:s]=function(a,l,c,u,d){var g,y;if(arguments.length<4)return g=o.map(function(_){return dr(a,_,c)}),y=g.join(" "),y.split(g[0]).length===5?g[0]:y;g=(u+"").split(" "),y={},o.forEach(function(_,m){return y[_]=g[m]=g[m]||g[(m-1)/2|0]}),a.init(l,y,d)}});var ha={name:"css",register:sa,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,i){var o=this._props,a=e.style,l=r.vars.startAt,c,u,d,g,y,_,m,x,v,T,b,k,h,S,w,M,P;ua||sa(),this.styles=this.styles||No(e),M=this.styles.props,this.tween=r;for(m in t)if(m!=="autoRound"&&(u=t[m],!(pt[m]&&Ki(m,t,r,n,e,i)))){if(y=typeof u,_=ri[m],y==="function"&&(u=u.call(r,n,e,i),y=typeof u),y==="string"&&~u.indexOf("random(")&&(u=Kr(u)),_)_(this,e,m,u,r)&&(w=1);else if(m.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(m)+"").trim(),u+="",cr.lastIndex=0,cr.test(c)||(x=rt(c),v=rt(u),v?x!==v&&(c=Sr(e,m,c,v)+v):x&&(u+=x)),this.add(a,"setProperty",c,u,n,i,0,0,m),o.push(m),M.push(m,0,a[m]);else if(y!=="undefined"){if(l&&m in l?(c=typeof l[m]=="function"?l[m].call(r,n,e,i):l[m],Xe(c)&&~c.indexOf("random(")&&(c=Kr(c)),rt(c+"")||c==="auto"||(c+=yt.units[m]||rt(dr(e,m))||""),(c+"").charAt(1)==="="&&(c=dr(e,m))):c=dr(e,m),g=parseFloat(c),T=y==="string"&&u.charAt(1)==="="&&u.substr(0,2),T&&(u=u.substr(2)),d=parseFloat(u),m in Jt&&(m==="autoAlpha"&&(g===1&&dr(e,"visibility")==="hidden"&&d&&(g=0),M.push("visibility",0,a.visibility),kr(this,a,"visibility",g?"inherit":"hidden",d?"inherit":"hidden",!d)),m!=="scale"&&m!=="transform"&&(m=Jt[m],~m.indexOf(",")&&(m=m.split(",")[0]))),b=m in hr,b){if(this.styles.save(m),P=u,y==="string"&&u.substring(0,6)==="var(--"){if(u=Ft(e,u.substring(4,u.indexOf(")"))),u.substring(0,5)==="calc("){var A=e.style.perspective;e.style.perspective=u,u=Ft(e,"perspective"),A?e.style.perspective=A:Pr(e,"perspective")}d=parseFloat(u)}if(k||(h=e._gsap,h.renderTransform&&!t.parseTransform||Sn(e,t.parseTransform),S=t.smoothOrigin!==!1&&h.smooth,k=this._pt=new ct(this._pt,a,ke,0,1,h.renderTransform,h,0,-1),k.dep=1),m==="scale")this._pt=new ct(this._pt,h,"scaleY",h.scaleY,(T?Br(h.scaleY,T+d):d)-h.scaleY||0,aa),this._pt.u=0,o.push("scaleY",m),m+="X";else if(m==="transformOrigin"){M.push(xt,0,a[xt]),u=hu(u),h.svg?la(e,u,0,S,0,this):(v=parseFloat(u.split(" ")[2])||0,v!==h.zOrigin&&kr(this,h,"zOrigin",h.zOrigin,v),kr(this,a,m,ni(c),ni(u)));continue}else if(m==="svgOrigin"){la(e,u,1,S,0,this);continue}else if(m in jo){_u(this,h,m,g,T?Br(g,T+u):u);continue}else if(m==="smoothOrigin"){kr(this,h,"smooth",h.smooth,u);continue}else if(m==="force3D"){h[m]=u;continue}else if(m==="transform"){yu(this,u,e);continue}}else m in a||(m=rn(m)||m);if(b||(d||d===0)&&(g||g===0)&&!Kl.test(u)&&m in a)x=(c+"").substr((g+"").length),d||(d=0),v=rt(u)||(m in yt.units?yt.units[m]:x),x!==v&&(g=Sr(e,m,c,v)),this._pt=new ct(this._pt,b?h:a,m,g,(T?Br(g,T+d):d)-g,!b&&(v==="px"||m==="zIndex")&&t.autoRound!==!1?ru:aa),this._pt.u=v||0,b&&P!==u?(this._pt.b=c,this._pt.e=P,this._pt.r=tu):x!==v&&v!=="%"&&(this._pt.b=c,this._pt.r=eu);else if(m in a)du.call(this,e,m,c,T?T+u:u);else if(m in e)this.add(e,m,c||e[m],T?T+u:u,n,i);else if(m!=="parseTransform"){qn(m,u);continue}b||(m in a?M.push(m,0,a[m]):typeof e[m]=="function"?M.push(m,2,e[m]()):M.push(m,1,c||e[m])),o.push(m)}}w&&na(this)},render:function(e,t){if(t.tween._time||!ca())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:dr,aliases:Jt,getSetter:function(e,t,r){var n=Jt[t];return n&&n.indexOf(",")<0&&(t=n),t in hr&&t!==xt&&(e._gsap.x||dr(e,"x"))?r&&Ao===r?t==="scale"?ou:au:(Ao=r||{})&&(t==="scale"?su:lu):e.style&&!Qn(e.style[t])?nu:~t.indexOf("-")?iu:ti(e,t)},core:{_removeProperty:Pr,_getMatrix:da}};ot.utils.checkPrefix=rn;ot.core.getStyleSaver=No;(function(s,e,t,r){var n=ut(s+","+e+","+t,function(i){hr[i]=1});ut(e,function(i){yt.units[i]="deg",jo[i]=1}),Jt[n[13]]=s+","+e,ut(r,function(i){var o=i.split(":");Jt[o[1]]=n[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ut("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(s){yt.units[s]="px"});ot.registerPlugin(ha);var nn=ot.registerPlugin(ha)||ot,tc=nn.core.Tween;ue();function qo(s,e,t,r,n){if(n<=0)return 0;if(n>=1)return 1;if(s===e&&t===r)return n;let i=n;for(let c=0;c<8;c++){let u=1-i,d=u*u,g=i*i,_=3*d*i*s+3*u*g*t+g*i-n;if(Math.abs(_)<1e-6)break;let m=3*d*s+6*u*i*(t-s)+3*g*(1-t);if(Math.abs(m)<1e-6)break;i-=_/m,i=Math.max(0,Math.min(1,i))}let o=1-i,a=3*o*o*i*s+3*o*i*i*t+i*i*i;if(Math.abs(a-n)>.001){let c=0,u=1;i=n;for(let d=0;d<16;d++){let g=(c+u)*.5,y=1-g,_=3*y*y*g*s+3*y*g*g*t+g*g*g;if(Math.abs(_-n)<1e-5){i=g;break}_<n?c=g:u=g,i=g}}let l=1-i;return 3*l*l*i*e+3*l*i*i*r+i*i*i}var ts=nn.timeline?nn:nn.default||nn,an=new Map,Ko=new WeakMap,ma=1e4,xu=50,bu=50;function pa(s){let e=2166136261;for(let t=0;t<s.length;t++)e^=s.charCodeAt(t),e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24);return(e>>>0).toString(16)}var Jo=new WeakMap,Tu=0;function vu(s){return!s||typeof s!="object"?on(s):Object.keys(s).sort().map(e=>{let t=s[e];if(t&&typeof t=="object"&&typeof t.get=="function"){let r=Jo.get(t);return r===void 0&&(r=Tu++,Jo.set(t,r)),`${JSON.stringify(e)}:#${r}`}return`${JSON.stringify(e)}:${on(t)}`}).join(",")}function oi(s){s.tl.kill()}function rs(s,e){let t=Date.now();for(let[r,n]of s.entries())t-n.cacheTime>ma&&(s.delete(r),oi(n.value));if(s.size>=e){let r=s.keys().next().value;if(r!==void 0){let n=s.get(r);s.delete(r),n&&oi(n.value)}}}function on(s){return s===null?"null":s===void 0?"undefined":typeof s!="object"?JSON.stringify(s):ArrayBuffer.isView(s)?`[TypedArray:${s.byteLength}]`:Array.isArray(s)?"["+s.map(on).join(",")+"]":"{"+Object.keys(s).sort().map(r=>`${JSON.stringify(r)}:${on(s[r])}`).join(",")+"}"}function wu(s){let e=an.get(s);if(e){if(Date.now()-e.cacheTime>ma){an.delete(s),oi(e.value);return}return e.cacheTime=Date.now(),an.delete(s),an.set(s,e),e.value}}function Mu(s,e){rs(an,xu),an.set(s,{cacheTime:Date.now(),value:e})}function es(s,e,t=24){if(!s)return"none";let{name:r,dir:n,params:i}=s;if(r==="none")return"none";if(r==="spring"){let l=Math.max(.001,i?.[0]??10),c=Math.max(.001,i?.[1]??100),u=Math.max(.001,i?.[2]??1);return d=>{let g=t>0?t:24,y=e&&e>0?e/g:1,_=d*y,m=u,x=c,v=l,T=Math.sqrt(x/m),b=v/(2*Math.sqrt(x*m)),k=0;if(b<1){let h=T*Math.sqrt(1-b*b),S=-1,w=-b*T/h;k=Math.exp(-b*T*_)*(S*Math.cos(h*_)+w*Math.sin(h*_))}else if(b===1){let S=-T;k=Math.exp(-T*_)*(-1+S*_)}else{let h=-T*(b-Math.sqrt(b*b-1)),S=-T*(b+Math.sqrt(b*b-1)),w=-1/(1-h/S),M=-1-w;k=w*Math.exp(h*_)+M*Math.exp(S*_)}return 1+k}}if(r==="cubic"){let l=i?.[0]??.25,c=i?.[1]??.1,u=i?.[2]??.25,d=i?.[3]??1;return g=>qo(l,c,u,d,g)}if(r==="hold")return l=>l>=1-1e-4?1:0;let o=r,a="";return i&&i.length>0?a=`(${i.join(", ")})`:r==="back"?a="(1.7)":r==="elastic"&&(a="(1, 0.3)"),`${o}.${n}${a}`}function ns(s,e,t,r,n,i,o){let a=t.prop;if((t.source??{type:"keyframe"}).type!=="keyframe"){let _=Number.isFinite(i)?i:Math.round(n*5),m=1/n,x=[],v=Bn(t,r,n,{startFrame:r,baseValues:e,signals:o});e[a]=v,x.push({[a]:v,duration:0});for(let T=1;T<=_;T++){let b=Bn(t,r+T,n,{startFrame:r,baseValues:e,signals:o});x.push({[a]:b,duration:m,ease:"none"})}return s.to(e,{keyframes:x,repeat:t.repeat??0,yoyo:!!t.yoyo,lazy:!1,overwrite:!1,immediateRender:!1},r/n),{dropped:0,maxAuthoredFrame:0}}let c=[...t.keyframes].sort((_,m)=>_.frame-m.frame),u=c.filter(_=>_.frame>=0&&_.frame<=i),d=c.length-u.length,g=d>0?c[c.length-1].frame:0;if(u.length===0)return{dropped:d,maxAuthoredFrame:g};if(a==="hidden"||a==="muted")for(let _ of u){let m=(r+_.frame)/n;s.set(e,{[a]:_.value,immediateRender:!1},m)}else{let _=t.repeat??0,m=!!t.yoyo;if(u.length===1){let x=u[0],v=(r+x.frame)/n;s.set(e,{[a]:x.value,immediateRender:!1},v)}else if(u.length===2){let x=u[0],v=u[1],T=x.value,b=v.value,k=(r+x.frame)/n,h=(v.frame-x.frame)/n,S=t.durationFrames??v.frame-x.frame,w=v.ease??x.ease,M=es(w,S,n);T===e[a]?s.to(e,{[a]:b,duration:h,ease:M,repeat:_,yoyo:m,lazy:!1,overwrite:!1,immediateRender:!1},k):s.fromTo(e,{[a]:T},{[a]:b,duration:h,ease:M,repeat:_,yoyo:m,lazy:!1,overwrite:!1,immediateRender:!1},k)}else{let x=u[0],v=(r+x.frame)/n,T=[];T.push({[a]:x.value,duration:0});for(let b=1;b<u.length;b++){let k=u[b-1],h=u[b],S=h.frame-k.frame,w=S/n,M=es(h.ease,S,n);T.push({[a]:h.value,duration:w,ease:M})}s.to(e,{keyframes:T,repeat:_,yoyo:m,lazy:!1,overwrite:!1,immediateRender:!1},v)}}return{dropped:d,maxAuthoredFrame:g}}var ii=new Set,ku=100;function Pu(s,e){if(ii.has(s))return;ii.size>=ku&&ii.clear(),ii.add(s);let t=e.map(r=>`'${r.prop}' (track '${r.trackId}') on '${r.layerId}': ${r.dropped} keyframe(s) past the clip window (last authored frame ${r.maxAuthoredFrame})`).join("; ");console.warn(`[compositor] ${e.length} track(s) truncated \u2014 animation tails will not play: ${t}. Extend durationFrames or move those keyframes.`)}function Su(s,e,t,r,n){let i=on({nodes:s.map(o=>{let a=o?.operation||{};return{id:a.id,animation:a.animation,startFrame:a.startFrame,durationFrames:a.durationFrames,x:a.x,y:a.y,scale:a.scale,rotation:a.rotation,opacity:a.opacity,volume:a.volume,width:a.width,height:a.height,hidden:a.hidden,muted:a.muted,backgroundColor:a.backgroundColor,fill:a.fill,borderColor:a.borderColor,textBackgroundColor:a.textBackgroundColor,rotateX:a.rotateX,rotateY:a.rotateY,rotateZ:a.rotateZ,perspective:a.perspective,perspectiveOriginX:a.perspectiveOriginX,perspectiveOriginY:a.perspectiveOriginY,translateZ:a.translateZ,backfaceVisibility:a.backfaceVisibility,transformStyle:a.transformStyle,is3D:a.is3D,z:a.z,scaleZ:a.scaleZ,twoSided:a.twoSided,cameraX:a.cameraX,cameraY:a.cameraY,cameraZ:a.cameraZ,targetX:a.targetX,targetY:a.targetY,targetZ:a.targetZ,cameraPitch:a.cameraPitch,cameraYaw:a.cameraYaw,cameraRoll:a.cameraRoll,cameraFov:a.cameraFov,cameraZoom:a.cameraZoom,focalLength:a.focalLength,focusDistance:a.focusDistance,fStop:a.fStop,maxBlurRadius:a.maxBlurRadius,shakeTranslation:a.shakeTranslation,shakeRotation:a.shakeRotation,orbitRadius:a.orbitRadius,orbitAzimuth:a.orbitAzimuth,orbitElevation:a.orbitElevation,material:a.material,shininess:a.shininess,roughness:a.roughness,specularIntensity:a.specularIntensity,ambientIntensity:a.ambientIntensity,metallic:a.metallic,lightType:a.lightType,intensity:a.intensity,radius:a.radius,angle:a.angle,penumbra:a.penumbra,animationProgress:a.animationProgress,animationTime:a.animationTime,animationSpeed:a.animationSpeed,wireframe:a.wireframe,scaleX:a.scaleX,scaleY:a.scaleY,fontSize:a.fontSize,text:a.text}}),width:e,height:t,fps:r,durationSec:n});return pa(i)}function is(s,e,t){let r=t.fps,n=t.durationSec,i=e?.metadata?.width??1920,o=e?.metadata?.height??1080,a=hn(e?.children??[]),l=e?.children,c=l?Ko.get(l):void 0,u;c&&c.width===i&&c.height===o&&c.fps===r&&c.durationSec===n?u=c.hash:(u=Su(a,i,o,r,n),l&&Ko.set(l,{width:i,height:o,fps:r,durationSec:n,hash:u}));let d=pa(`${u}|${vu(e?.operation?.signals??e?.signals)}`),g=`${s}_${d}`,y=wu(g);if(y)return y;let _=ts.timeline({paused:!0,smoothChildTiming:!1}),m={},x=e?.operation?.signals??e?.signals??{};a.forEach((b,k)=>{let h=b?.operation||{},S=h.id||h.inputHandleId||`layer_${k}`,w={id:S,inputHandleId:h.inputHandleId||`layer_${k}`,trackId:S,x:h.kind==="camera"||h.kind==="light"?h.x??h.cameraX:h.x??0,y:h.kind==="camera"||h.kind==="light"?h.y??h.cameraY:h.y??0,scale:h.scale??1,rotation:h.rotation??0,opacity:h.opacity??1,volume:h.volume??1,width:h.width,height:h.height,hidden:!!h.hidden,muted:!!h.muted,rotateX:h.rotateX??0,rotateY:h.rotateY??0,rotateZ:h.rotateZ??0,perspective:h.perspective??0,perspectiveOriginX:h.perspectiveOriginX??.5,perspectiveOriginY:h.perspectiveOriginY??.5,translateZ:h.translateZ??0,backfaceVisibility:h.backfaceVisibility??"visible",transformStyle:h.transformStyle??"flat",fontSize:h.fontSize,text:1,fill:h.fill,fillColor:h.fillColor??h.fill,strokeColor:h.strokeColor??h.stroke,strokeWidth:h.strokeWidth,letterSpacing:h.letterSpacing,firstMargin:h.firstMargin??h.pathOptions?.firstMargin,lastMargin:h.lastMargin??h.pathOptions?.lastMargin,baselineShift:h.baselineShift??h.pathOptions?.baselineShift,offset:h.offset,rangeStart:h.rangeStart,rangeEnd:h.rangeEnd,animators:h.animators,pathOptions:h.pathOptions,typewriter:h.typewriter,marquee:h.marquee,is3D:h.is3D??(h.kind==="camera"||h.kind==="light"||h.kind==="model3d"),z:h.z??(h.kind==="camera"?h.z??-1500:0),scaleZ:h.scaleZ??1,twoSided:h.twoSided??!0,material:h.material,shininess:h.shininess,roughness:h.roughness,specularIntensity:h.specularIntensity,ambientIntensity:h.ambientIntensity,metallic:h.metallic,animationProgress:h.animationProgress??0,animationTime:h.animationTime??0,animationSpeed:h.animationSpeed??1,wireframe:h.wireframe??!1,scaleX:h.scaleX??1,scaleY:h.scaleY??1,cameraX:h.cameraX??(h.kind==="camera"?h.x:void 0),cameraY:h.cameraY??(h.kind==="camera"?h.y:void 0),cameraZ:h.cameraZ??(h.kind==="camera"?h.z:void 0),targetX:h.targetX,targetY:h.targetY,targetZ:h.targetZ,cameraPitch:h.cameraPitch??h.pitch??0,cameraYaw:h.cameraYaw??h.yaw??0,cameraRoll:h.cameraRoll??h.roll??0,cameraFov:h.cameraFov??h.lens?.fov??50,cameraZoom:h.cameraZoom??h.lens?.zoom??1,focalLength:h.focalLength??h.lens?.focalLength??50,focusDistance:h.focusDistance??h.dof?.focusDistance,fStop:h.fStop??h.dof?.fStop??2.8,maxBlurRadius:h.maxBlurRadius??h.dof?.maxBlurRadius??24,shakeTranslation:h.shakeTranslation??(h.shake?.enabled?h.shake?.translationAmplitude??0:0),shakeRotation:h.shakeRotation??(h.shake?.enabled?h.shake?.rotationAmplitude??0:0),orbitRadius:h.orbitRadius,orbitAzimuth:h.orbitAzimuth,orbitElevation:h.orbitElevation,lightType:h.lightType,intensity:h.intensity??(h.kind==="light"?1:void 0),radius:h.radius,angle:h.angle,penumbra:h.penumbra,decay:h.decay};for(let M of h.animation?.tracks??[])if((M.source??{type:"keyframe"}).type!=="keyframe")w[M.prop]=Bn(M,h.startFrame??0,r,{startFrame:h.startFrame??0,baseValues:w,signals:x});else if(M.keyframes&&M.keyframes.length>0){let A=M.keyframes[0],U=w;A.frame===0?U[M.prop]=A.value:U[M.prop]===void 0&&(U[M.prop]=h[M.prop]??A.value)}m[S]=w});let v=[];if(a.forEach(b=>{let k=b?.operation||{},h=k.id||k.inputHandleId,S=h?m[h]:void 0;if(!S)return;let w=k.startFrame??0,M=k.durationFrames;if(M===void 0){let P=b.children?.[0],A=P?cn(P):null,U=e?.metadata?.durationMs??3e3,oe=k.type??(k.kind==="text"?"Text":k.kind==="media"&&P?P.operation?.dataType:void 0),Z=Na(void 0,A?.durationMs??void 0,U,oe);M=Math.max(1,Math.round(Z/1e3*r))}for(let P of k.animation?.tracks??[]){let{dropped:A,maxAuthoredFrame:U}=ns(_,S,P,w,r,M,x);A>0&&v.push({layerId:h,trackId:P.id,prop:P.prop,dropped:A,maxAuthoredFrame:U})}}),v.length>0){Pu(s.startsWith("img-")?`frame_${d}`:g,v);for(let b of v)Da(s,{severity:"warning",code:"animation_truncated",layerId:b.layerId,message:`'${b.prop}' on '${b.layerId}': ${b.dropped} keyframe(s) past the clip window (last authored frame ${b.maxAuthoredFrame}) never play`})}_.seek(1e-6),_.seek(0);let T={tl:_,targetsById:m,nodes:a};return Mu(g,T),T}var ai=new Map;function as(s,e,t,r,n){let i=on({animation:e,baseVolume:t,baseMuted:r,fps:n}),o=pa(i),a=`layer_${s}_${o}`,l=ai.get(a);if(l){if(Date.now()-l.cacheTime<=ma)return l.cacheTime=Date.now(),l.value;ai.delete(a),oi(l.value)}let c=ts.timeline({paused:!0,smoothChildTiming:!1}),u={volume:t,muted:r},d=e?.tracks??[];for(let y of d){let _=y.prop;_!=="volume"&&_!=="muted"||ns(c,u,y,0,n,1/0)}c.seek(1e-6),c.seek(0);let g={tl:c,stub:u};return rs(ai,bu),ai.set(a,{cacheTime:Date.now(),value:g}),g}ue();function Dn(s,e){return e?s==="flex"||s==="block"||s==="box":!1}ue();function ga(s,e){return{a:1,b:0,c:0,d:1,e:s,f:e}}function Du(s){let e=s*Math.PI/180,t=Math.cos(e),r=Math.sin(e);return{a:t,b:r,c:-r,d:t,e:0,f:0}}function Cu(s,e=s){return{a:s,b:0,c:0,d:e,e:0,f:0}}function si(s,e){return{a:s.a*e.a+s.c*e.b,b:s.b*e.a+s.d*e.b,c:s.a*e.c+s.c*e.d,d:s.b*e.c+s.d*e.d,e:s.a*e.e+s.c*e.f+s.e,f:s.b*e.e+s.d*e.f+s.f}}function os(s){return new DOMMatrix([s.a,s.b,s.c,s.d,s.e,s.f])}function ss(s){let e=s.anchorX??.5,t=s.anchorY??.5,r=e*s.width,n=t*s.height;return si(ga(s.x,s.y),si(ga(r,n),si(Du(s.rotation),si(Cu(s.scale),ga(-r,-n)))))}ue();var ce={identity(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},multiply(s,e){let t=new Array(16);for(let r=0;r<4;r++)for(let n=0;n<4;n++)t[n*4+r]=s[0+r]*e[n*4+0]+s[4+r]*e[n*4+1]+s[8+r]*e[n*4+2]+s[12+r]*e[n*4+3];return t},translate(s,e,t=0){return[1,0,0,0,0,1,0,0,0,0,1,0,s,e,t,1]},scale(s,e,t=1){return[s,0,0,0,0,e,0,0,0,0,t,0,0,0,0,1]},rotateX(s){let e=Math.cos(s),t=Math.sin(s);return[1,0,0,0,0,e,t,0,0,-t,e,0,0,0,0,1]},rotateY(s){let e=Math.cos(s),t=Math.sin(s);return[e,0,-t,0,0,1,0,0,t,0,e,0,0,0,0,1]},rotateZ(s){let e=Math.cos(s),t=Math.sin(s);return[e,t,0,0,-t,e,0,0,0,0,1,0,0,0,0,1]},perspective(s){if(s<=0)return ce.identity();let e=ce.identity();return e[11]=-1/s,e},buildLayer3DMatrix(s){let{x:e,y:t,width:r,height:n,rotateXDeg:i=0,rotateYDeg:o=0,rotateZDeg:a=0,scaleX:l=1,scaleY:c=1,perspectivePx:u=0,originXRatio:d=.5,originYRatio:g=.5,translateZPx:y=0}=s,_=e+r*d,m=t+n*g,x=i*Math.PI/180,v=o*Math.PI/180,T=a*Math.PI/180,b=ce.identity();return b=ce.multiply(b,ce.translate(_,m,0)),u>0&&(b=ce.multiply(b,ce.perspective(u))),y!==0&&(b=ce.multiply(b,ce.translate(0,0,y))),T!==0&&(b=ce.multiply(b,ce.rotateZ(T))),v!==0&&(b=ce.multiply(b,ce.rotateY(v))),x!==0&&(b=ce.multiply(b,ce.rotateX(x))),b=ce.multiply(b,ce.translate(-r*d,-n*g,0)),(l!==1||c!==1)&&(b=ce.multiply(b,ce.scale(l,c,1))),b},projectPoint(s,e){let t=e.x,r=e.y,n=e.z,i=s[0]*t+s[4]*r+s[8]*n+s[12],o=s[1]*t+s[5]*r+s[9]*n+s[13],a=s[3]*t+s[7]*r+s[11]*n+s[15],l=Math.abs(a)>1e-6?1/a:1;return{x:i*l,y:o*l}},projectRectangleCorners(s,e,t){return{topLeft:ce.projectPoint(s,{x:0,y:0,z:0}),topRight:ce.projectPoint(s,{x:e,y:0,z:0}),bottomLeft:ce.projectPoint(s,{x:0,y:t,z:0}),bottomRight:ce.projectPoint(s,{x:e,y:t,z:0})}},computeSignedArea(s){let{topLeft:e,topRight:t,bottomRight:r,bottomLeft:n}=s;return .5*(e.x*t.y-t.x*e.y+(t.x*r.y-r.x*t.y)+(r.x*n.y-n.x*r.y)+(n.x*e.y-e.x*n.y))}};function ls(s,e=[{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]){let t=[],r=[];for(let o=0;o<4;o++){let a=s[o]?.x??0,l=s[o]?.y??0,c=e[o]?.x??0,u=e[o]?.y??0;t.push([a,l,1,0,0,0,-a*c,-l*c]),r.push(c),t.push([0,0,0,a,l,1,-a*u,-l*u]),r.push(u)}let n=8;for(let o=0;o<n;o++){let a=o,l=Math.abs(t[o][o]);for(let g=o+1;g<n;g++)Math.abs(t[g][o])>l&&(l=Math.abs(t[g][o]),a=g);let c=t[o];t[o]=t[a],t[a]=c;let u=r[o];r[o]=r[a],r[a]=u;let d=t[o][o];Math.abs(d)<1e-12&&(t[o][o]=d<0?-1e-12:1e-12);for(let g=o+1;g<n;g++){let y=t[g][o]/t[o][o];for(let _=o;_<n;_++)t[g][_]-=y*t[o][_];r[g]-=y*r[o]}}let i=new Array(8).fill(0);for(let o=n-1;o>=0;o--){let a=r[o];for(let l=o+1;l<n;l++)a-=t[o][l]*i[l];i[o]=a/t[o][o]}return[i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],1]}function us(s,e){let t=s?.rotateX??e?.rotateX??0,r=s?.rotateY??e?.rotateY??0,n=s?.rotateZ??e?.rotateZ??0,i=s?.translateZ??e?.translateZ??0,o=s?.perspective??e?.perspective??0;if(t!==0||r!==0||i!==0||o>0&&(t!==0||r!==0||i!==0||n!==0)||s?.rotateZ!==void 0&&s.rotateZ!==0||e?.rotateZ!==void 0&&e.rotateZ!==0)return!0;let a=e?.animation?.tracks;if(a&&a.length>0){for(let l of a)if(l.prop==="rotateX"||l.prop==="rotateY"||l.prop==="rotateZ"||l.prop==="translateZ"||l.prop==="perspective")return!0}return!1}var Ru=["width","height","gap","padding","fontSize","letterSpacing"],cs=new WeakMap;function Ou(s,e,t,r){let n=[s,e];for(let i in t){let o=t[i];for(let a of Ru)o[a]!==void 0&&n.push(i,a,o[a])}for(let[i,o]of r)n.push(i,o.width,o.height);return JSON.stringify(n)}var Au=`
|
|
173
|
-
struct HomographyUniforms {
|
|
174
|
-
matrix_row0 : vec4<f32>,
|
|
175
|
-
matrix_row1 : vec4<f32>,
|
|
176
|
-
matrix_row2 : vec4<f32>,
|
|
177
|
-
params : vec4<f32>, // params.x = opacity
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
@group(0) @binding(0) var<uniform> u : HomographyUniforms;
|
|
181
|
-
@group(1) @binding(0) var tex : texture_2d<f32>;
|
|
182
|
-
@group(1) @binding(1) var samp : sampler;
|
|
183
|
-
|
|
184
|
-
struct VSOut {
|
|
185
|
-
@builtin(position) pos : vec4<f32>,
|
|
186
|
-
@location(0) uv : vec2<f32>,
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
@vertex fn vs(@builtin(vertex_index) vi: u32) -> VSOut {
|
|
190
|
-
var pos = array<vec2<f32>, 4>(
|
|
191
|
-
vec2<f32>(-1.0, 1.0),
|
|
192
|
-
vec2<f32>(1.0, 1.0),
|
|
193
|
-
vec2<f32>(-1.0, -1.0),
|
|
194
|
-
vec2<f32>(1.0, -1.0)
|
|
195
|
-
);
|
|
196
|
-
var uv = array<vec2<f32>, 4>(
|
|
197
|
-
vec2<f32>(0.0, 0.0),
|
|
198
|
-
vec2<f32>(1.0, 0.0),
|
|
199
|
-
vec2<f32>(0.0, 1.0),
|
|
200
|
-
vec2<f32>(1.0, 1.0)
|
|
201
|
-
);
|
|
202
|
-
return VSOut(vec4<f32>(pos[vi], 0.0, 1.0), uv[vi]);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
@fragment fn fs(in : VSOut) -> @location(0) vec4<f32> {
|
|
206
|
-
let x = in.uv.x;
|
|
207
|
-
let y = in.uv.y;
|
|
208
|
-
|
|
209
|
-
let d = u.matrix_row2.x * x + u.matrix_row2.y * y + u.matrix_row2.z;
|
|
210
|
-
if (d <= 1e-6) {
|
|
211
|
-
return vec4<f32>(0.0);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
let src_u = (u.matrix_row0.x * x + u.matrix_row0.y * y + u.matrix_row0.z) / d;
|
|
215
|
-
let src_v = (u.matrix_row1.x * x + u.matrix_row1.y * y + u.matrix_row1.z) / d;
|
|
216
|
-
|
|
217
|
-
if (src_u < 0.0 || src_u > 1.0 || src_v < 0.0 || src_v > 1.0) {
|
|
218
|
-
return vec4<f32>(0.0);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
let color = textureSampleLevel(tex, samp, vec2<f32>(src_u, src_v), 0.0);
|
|
222
|
-
return color * u.params.x;
|
|
223
|
-
}
|
|
224
|
-
`,fs=new WeakMap;function Fu(s,e){let t=fs.get(s);if(!t){let r=s.createBindGroupLayout({entries:[{binding:0,visibility:GPUShaderStage.FRAGMENT,buffer:{type:"uniform"}}]}),n=s.createBindGroupLayout({entries:[{binding:0,visibility:GPUShaderStage.FRAGMENT,texture:{sampleType:"float"}},{binding:1,visibility:GPUShaderStage.FRAGMENT,sampler:{type:"filtering"}}]}),i=s.createShaderModule({label:"compositor_homography.wgsl",code:Au});t={pipeline:s.createRenderPipeline({label:"CompositorHomographyPipeline",layout:s.createPipelineLayout({bindGroupLayouts:[r,n]}),vertex:{module:i,entryPoint:"vs"},fragment:{module:i,entryPoint:"fs",targets:[{format:e,blend:{color:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}}}]},primitive:{topology:"triangle-strip"}}),uniformLayout:r,textureLayout:n},fs.set(s,t)}return t}var li=new Map,ds=new WeakMap;function Cn(s,e,t){let r=ds.get(s);r||(r=new Map,ds.set(s,r));let n=`${e}|${t}`,i=r.get(n);return i||(i=new Ea(s,e,t),r.set(n,i)),i}var hs=new WeakMap;function _a(s,e){let t=hs.get(s);return(!t||t.format!==e)&&(t=new Yn(s,e),hs.set(s,t)),t}var ms=new WeakMap;function ps(s,e){let t=ms.get(s);t||(t=new Map,ms.set(s,t));let r=t.get(e);return r||(r=new Xa(s),t.set(e,r)),r}function st(s,e,t,r){if(s==null)return e;if(typeof s=="number")return Number.isFinite(s)?s:e;if(typeof s=="object"&&s!==null){if("get"in s&&typeof s.get=="function")try{let i=s.get({frame:t,fps:r,time:r>0?t/r:0,duration:0,durationMs:0,progress:0,deltaTime:r>0?1/r:0}),o=Number(i);if(Number.isFinite(o))return o}catch{}if("value"in s){let i=Number(s.value);if(Number.isFinite(i))return i}}if(typeof s=="function")try{let i=Number(s({frame:t,fps:r,time:r>0?t/r:0}));if(Number.isFinite(i))return i}catch{}let n=Number(s);return Number.isFinite(n)?n:e}function gs(s,e,t,r,n){if(e.length>0||s.lightType===void 0&&s.intensity===void 0&&s.lightPosX===void 0)return e;let i=String(s.lightType??"point").toLowerCase(),o=i==="directional"?"directional":i==="spot"?"spot":"point",a=s.intensity??1,l=st(a,1,r,n),c=st(s.lightPosX,.5,r,n),u=st(s.lightPosY,.5,r,n),d=st(s.lightPosZ,.25,r,n),g=st(s.lightRadius,.75,r,n),y=t.x+c*t.width,_=t.y+u*t.height,m=d*Math.max(t.width,t.height),x=g*Math.max(t.width,t.height),v={lightType:o,color:s.lightColor??"#ffffff",intensity:l,x:y,y:_,z:m,radius:x,decay:1},T=st(s.ambientIntensity,.15,r,n);return[{lightType:"ambient",color:s.ambientColor??"#ffffff",intensity:T},v]}function ui(s,e,t,r,n,i,o,a){if(Math.abs(ce.computeSignedArea(n))<1e-4)return;let c=Math.max(0,Math.min(i,Math.floor(Math.min(n.topLeft.x,n.topRight.x,n.bottomLeft.x,n.bottomRight.x)))),u=Math.max(0,Math.min(o,Math.floor(Math.min(n.topLeft.y,n.topRight.y,n.bottomLeft.y,n.bottomRight.y)))),d=Math.max(0,Math.min(i,Math.ceil(Math.max(n.topLeft.x,n.topRight.x,n.bottomLeft.x,n.bottomRight.x)))),g=Math.max(0,Math.min(o,Math.ceil(Math.max(n.topLeft.y,n.topRight.y,n.bottomLeft.y,n.bottomRight.y)))),y=d-c,_=g-u;if(y<=0||_<=0)return;let m=[{x:n.topLeft.x/i,y:n.topLeft.y/o},{x:n.topRight.x/i,y:n.topRight.y/o},{x:n.bottomLeft.x/i,y:n.bottomLeft.y/o},{x:n.bottomRight.x/i,y:n.bottomRight.y/o}],x=ls(m);for(let A of x)if(!Number.isFinite(A))return;let v=new Float32Array(16);v[0]=x[0],v[1]=x[1],v[2]=x[2],v[3]=0,v[4]=x[3],v[5]=x[4],v[6]=x[5],v[7]=0,v[8]=x[6],v[9]=x[7],v[10]=x[8],v[11]=0,v[12]=a,v[13]=0,v[14]=0,v[15]=0;let{pipeline:T,uniformLayout:b,textureLayout:k}=Fu(s.device,s.renderer.format),h=s.renderer.samplerCache.getSampler(s.device),S=s.renderer.getTemporaryBuffer(v),w=s.device.createBindGroup({layout:b,entries:[{binding:0,resource:{buffer:S}}]}),M=s.renderer.bindGroupCache.getBindGroup(s.device,k,r,h),P=e.beginRenderPass({colorAttachments:[{view:t,loadOp:"load",storeOp:"store"}]});P.setPipeline(T),P.setScissorRect(c,u,y,_),P.setBindGroup(0,w),P.setBindGroup(1,M),P.draw(4),P.end()}function Lu(s,e,t){let r=[s.transformPoint(new DOMPoint(0,0)),s.transformPoint(new DOMPoint(e,0)),s.transformPoint(new DOMPoint(0,t)),s.transformPoint(new DOMPoint(e,t))],n=r.map(u=>u.x),i=r.map(u=>u.y),o=Math.min(...n),a=Math.min(...i),l=Math.max(...n),c=Math.max(...i);return{x:Math.round(o),y:Math.round(a),width:Math.max(0,Math.round(l-o)),height:Math.max(0,Math.round(c-a))}}var _s=async s=>{let{ctx:e,pass:t,targetView:r,targetTexture:n,targetWidth:i,targetHeight:o,encoder:a,props:l,drawChild:c}=s,{virtualMedia:u,fps:d,frame:g}=l,y=u.operation;if(y){if(t.end(),y.op==="CompositorLayer"){console.warn("CompositorWebGPURenderer called directly with legacy CompositorLayer operation. This is a bug."),s.pass=e.renderer.beginFrame(a,r,{r:0,g:0,b:0,a:0},i,o,"load");return}if(y.op==="Compositor"){let _=y,m=_.antialias3d===!1?1:4,x=l.containerWidth??e.surface.width,v=l.containerHeight??e.surface.height,T=_.width??x,b=_.height??v,k=typeof _.opacity=="number"?_.opacity:1,h=l.isVideoMode??(_.mode==="Video"||_.dataType==="Video"||u?.metadata?.durationMs!=null),S=l.inheritedSeekOffset??0,w=Math.max(0,g!=null&&d!=null?g+Math.round(S*d):g??0),M=l.compositionFrame??w,P=e.renderer.getTemporaryTexture(T,b,[...l.excludeTextures||[],n]),A=P.createView(),U=u?.metadata?.durationMs??3e3,oe=U/1e3,{tl:Z,targetsById:W}=is(l.renderId,u,{fps:d??24,durationSec:oe});Z.seek(w/(d??24)),Cn(e.device,e.renderer.format??"rgba8unorm",m).resetPools(),_a(e.device,e.renderer.format??"rgba8unorm").resetPools();let fe=En(_.backgroundColor);e.renderer.beginFrame(a,A,fe,T,b,"clear").end();let er=P;e.renderer.pushScissor({x:0,y:0,width:T,height:b}),e.renderer.pushIdentity(),await Ya();let Wt=new Map;for(let D of hn(u.children)){let O=D.operation;if(O.kind==="media"){let ie=cn(D.children?.[0]);if(ie?.width&&ie?.height)Wt.set(O.id,{width:ie.width,height:ie.height});else if(O.dataType==="Caption"||D.children?.[0]?.operation?.dataType==="Caption"||D.children?.[0]?.operation?.srtText!==void 0){let q=W[O.id]?.width??O.width,Ee=typeof q=="number"?q:Math.round(T*.8),_e=W[O.id]?.height??O.height,Le=typeof _e=="number"?_e:160,Ve=D.children?.[0],$=Oa(Ve)??Ve?.operation?.url??Ve?.operation?.src??Ve?.operation?.srtText??O.src??O.url;if(typeof _e!="number"&&$)try{let X=await Fa.load($);X&&X.length>0&&(Le=Aa(X,O,Ee))}catch{}Wt.set(O.id,{width:Ee,height:Le})}}}let mr=D=>{let O=D?.operation??{},ie=W[O.id],q=_e=>ie&&ie[_e]!==void 0?ie[_e]:O[_e],Ee={...O,width:q("width"),height:q("height"),gap:q("gap"),padding:q("padding"),fontSize:q("fontSize"),letterSpacing:q("letterSpacing")};return Ee.children=(D?.children??[]).map(mr),Ee.children.length||(Ee.children=void 0),Ee},tr=()=>(u.children??[]).map(mr).filter(D=>D?.kind!=="camera"&&D?.kind!=="light"),Dr=u.children,Tt=Ou(T,b,W,Wt),Vt=Dr?cs.get(Dr):void 0,{rects:ya}=Vt?.key===Tt?Vt:await Ga({layout:tr(),viewport:{width:T,height:b},measure:(D,O)=>{if(D.kind==="text"){let ie={fontSize:D.fontSize??48,fontWeight:D.fontWeight,fontFamily:D.fontFamily,letterSpacing:D.letterSpacing,lineHeight:D.lineHeight,padding:D.padding};if(O!==void 0){let _e=typeof D.width!="number",Le=Vn(D.text??"",{...ie,width:_e?void 0:O,keepNaturalWidth:!0});return{width:_e?Math.ceil(Le.width):Math.min(O,Math.ceil(Le.width)),height:Math.ceil(Le.height)}}let q=Vn(D.text??"",ie);if(typeof D.width!="number")return{width:Math.ceil(q.width),height:Math.ceil(q.height)};let Ee=Vn(D.text??"",{...ie,width:D.width});return{width:Math.ceil(Ee.width),height:Math.ceil(Ee.height)}}return D.kind==="media"?Wt.get(D.id)??null:null}});Dr&&Vt?.key!==Tt&&cs.set(Dr,{key:Tt,rects:ya});let fi=hn(u.children??[]),xa=fi.filter(D=>D.operation?.kind==="camera"),ba=h?xa.filter(D=>{let O=D.operation,ie=O.startFrame??0,q=O.durationFrames;return w>=ie&&(q===void 0||w<ie+q)}).sort((D,O)=>(O.operation.startFrame??0)-(D.operation.startFrame??0))[0]:xa[0],Ta=fi.filter(D=>D.operation?.kind==="light"),ys=fi.some(D=>{let O=D.operation,ie=O.id?W[O.id]:void 0;return O.kind!=="camera"&&O.kind!=="light"&&(!!(ie?.is3D??O.is3D)||(ie?.z??O.z??0)!==0)}),xs=!!(ba||ys||Ta.length>0),ge=null,Cr=!1,Rn=[];if(xs){let D=ba?.operation,O=D?.id?W[D.id]:void 0,ie=O?.cameraFov??D?.lens?.fov??50;ge=dn.createDefaultCamera(T,b,ie),ge.near=D?.lens?.near??1,ge.far=D?.lens?.far??5e4,ge.zoom=O?.cameraZoom??D?.lens?.zoom??1;let q=ge.eye,Ee=ge.target,_e=O?.cameraX??O?.x??D?.x??q[0],Le=O?.cameraY??O?.y??D?.y??q[1],Ve=O?.cameraZ??O?.z??D?.z??q[2];ge.eye=[_e,Le,Ve],O?.targetX!==void 0||O?.targetY!==void 0||O?.targetZ!==void 0||D?.targetX!==void 0||D?.targetY!==void 0||D?.targetZ!==void 0?ge.target=[O?.targetX??D?.targetX??Ee[0],O?.targetY??D?.targetY??Ee[1],O?.targetZ??D?.targetZ??Ee[2]]:ge.target=[_e,Le,0];let X=O?.cameraPitch??D?.pitch??0,Pe=O?.cameraYaw??D?.yaw??0,rr=O?.cameraRoll??D?.roll??0;(X!==0||Pe!==0||rr!==0)&&(ge=dn.applyOrientation(ge,X,Pe,rr));let E=O?.orbitAzimuth,f=O?.orbitElevation,ye=O?.orbitRadius;if(E!==void 0||f!==void 0||ye!==void 0){let wt=ye??Ti.distance(ge.eye,ge.target);ge.eye=dn.orbit(ge.target,wt,E??0,f??0)}let p=O?.shakeTranslation??(D?.shake?.enabled?D?.shake?.translationAmplitude:0)??0,K=O?.shakeRotation??(D?.shake?.enabled?D?.shake?.rotationAmplitude:0)??0;if(p>0||K>0){let wt=w/(d??24);ge=dn.applyCameraShake(ge,wt,{translationAmplitude:p,rotationAmplitude:K,frequency:D?.shake?.frequency??1.5,octaves:D?.shake?.octaves??3,seed:D?.shake?.seed??42})}Cr=!!(D?.dof?.enabled||O?.focusDistance!==void 0),Cr&&(ge.focusDistance=O?.focusDistance??D?.dof?.focusDistance??Ti.distance(ge.eye,ge.target),ge.fStop=O?.fStop??D?.dof?.fStop??2.8,ge.maxBlurRadius=O?.maxBlurRadius??D?.dof?.maxBlurRadius??24);for(let wt of Ta){let V=wt.operation,Bt=V.id||V.inputHandleId,de=Bt?W[Bt]:void 0;if(de?.hidden||V.hidden)continue;if(h){let Y=V.startFrame??0,sn=V.durationFrames;if(w<Y||sn!==void 0&&w>=Y+sn)continue}let ft=de?.lightType??V.lightType??"point",nr=de?.color??V.color??"#ffffff",$t=En(nr),jt=de?.intensity??V.intensity??1,nt=de?.x??V.x??0,ir=de?.y??V.y??0,$e=de?.z??V.z??0,Yt=de?.targetX??V.targetX??0,Lt=de?.targetY??V.targetY??0,On=de?.targetZ??V.targetZ??0,hi=de?.radius??V.radius??1e3,Or=de?.angle??V.angle??45,Ar=de?.penumbra??V.penumbra??.2,B=de?.decay??V.decay??1;Rn.push({type:ft,color:$t,intensity:jt,position:[nt,ir,$e],target:[Yt,Lt,On],radius:hi,angle:Or,penumbra:Ar,decay:B})}}let vt=[],va=(D,O,ie)=>{if(vt.length===0||!ge)return{finalTex:D,finalView:O};let q=Cn(e.device,e.renderer.format??"rgba8unorm",m);for(let p of vt)p.kind==="mesh"&&p.opts.audioDeform&&(p.meshBuffers=q.deformMesh(a,p.mesh,p.opts.audioDeform));let Ee=vt.map(p=>(p.kind==="quad",p.texture)).filter(p=>!!p),_e=e.renderer.getTemporaryTexture(T,b,[D,n,...ie,...Ee]),Le=_e.createView(),Ve,$;Cr&&(Ve=q.getOrCreateLinearDepthTexture(T,b),$=Ve.createView());let{pass:X,cameraBindGroup:Pe,cameraBuffer:rr,lightsBindGroup:E}=q.beginPass(a,Le,T,b,ge,"clear",{r:0,g:0,b:0,a:0},$,Rn);for(let p of vt)p.kind==="quad"?q.drawTextureQuad(X,Pe,E,p.texture,p.opts,Cr):p.kind==="slug"?q.drawSlugText(X,Pe,E,p.batches,p.opts,p.stackBase,Cr):p.kind==="mesh"&&q.drawMesh3D(X,Pe,E,p.meshBuffers??p.mesh,p.texture,p.opts,Cr);X.end();let f=_e;if(Cr&&Ve){let p=e.renderer.getTemporaryTexture(T,b,[D,n,_e,...ie]);q.applyDepthOfField(a,_e,Ve,p.createView(),rr),f=p}let ye=e.renderer.composite(a,D,f,"normal",[n,...ie]);return vt.length=0,{finalTex:ye,finalView:ye.createView()}},di=0,Rr=async(D,O,ie,q,Ee=1,_e=new DOMMatrix,Le=null,Ve=T,$=b,X=null,Pe=!1)=>{let rr=[...D].sort((p,K)=>{let wt=p.operation?.zIndex??0,V=K.operation?.zIndex??0;return wt-V}),E=O,f=ie,ye=q;for(let p of rr){let K=p.operation;if(K.kind==="camera"||K.kind==="light")continue;let wt=K.id||K.inputHandleId,V=wt?W[wt]:void 0,Bt=!!(V?.is3D??K.is3D)||!!(ge&&((V?.z??K.z??0)!==0||K.is3D))||!!X;if(Pe&&!Bt&&vt.length>0){let ft=va(E,f,ye);ft.finalTex!==E&&(ye=[...ye,ft.finalTex]),E=ft.finalTex,f=ft.finalView}if(K.op!=="CompositorLayer"){await c(p,{containerWidth:Ve,containerHeight:$,renderId:`${l.renderId}-c${di}-${K.op}`,fps:d,isVideoMode:h,frame:w,compositionFrame:M,excludeTextures:[n,...ye]},f,E,Ve,$);continue}di+=1;let de=await bs(p,di,E,f,ye,Ee,_e,Le,Ve,$,X,Pe);de&&(de.finalTex!==E&&(ye=[...ye,de.finalTex]),E=de.finalTex,f=de.finalView)}if(Pe&&vt.length>0){let p=va(E,f,ye);p.finalTex!==E&&(ye=[...ye,p.finalTex]),E=p.finalTex,f=p.finalView}return{finalTex:E,finalView:f}},bs=async(D,O,ie,q,Ee,_e,Le,Ve,$=T,X=b,Pe=null,rr=!1)=>{let E=[...Ee,...vt.map(R=>R.texture).filter(R=>!!R)],f=D.operation;if(f.kind==="camera"||f.kind==="light")return;let ye=f.id||f.inputHandleId,p=ye?W[ye]:void 0;if(p?.hidden||f.hidden)return;let K=f.kind,wt=K==="flex"||K==="block"||K==="box";if(h){let R=f.startFrame??0,C=f.durationFrames;if(w<R||C!==void 0&&w>=R+C)return}if(K==="model3d"){let R=Cn(e.device,e.renderer.format??"rgba8unorm",m),C=f.modelData??f.src;if(!C&&f.text3dOptions){let N=f.text3dOptions,H=(N.fontFamily?fn.getParsed(N.fontFamily):null)??fn.getParsed("Inter")??fn.getParsed("Unbounded")??fn.getFirstParsed();H&&(C=Va({...N,font:H}).modelData,f.modelData=C)}if(!C)return;let I;try{I=typeof C=="object"&&C!==null&&"meshes"in C?C:R.loadModel(C,f.modelFormat??"auto",{center:f.center,normalizeSize:f.normalizeSize})}catch(N){console.error("Failed to load 3D model:",N);return}if(!I||I.meshes.length===0)return;let te=p?.x??f.x??0,z=p?.y??f.y??0,xe=p?.z??f.z??0,Ne=p?.rotateX??f.rotateX??0,Se=p?.rotateY??f.rotateY??0,J=(p?.rotateZ??f.rotateZ??0)!==0?p?.rotateZ??f.rotateZ??0:p?.rotation??f.rotation??0,j=p?.scale??f.scale??1,ae=(p?.scaleX??f.scaleX??1)*j,le=(p?.scaleY??f.scaleY??1)*j,Be=(p?.scaleZ??f.scaleZ??1)*j,he=L.identity();he=L.multiply(he,L.translate(te,z,xe));let Mt=Ne*Math.PI/180,Ht=Se*Math.PI/180,Ut=J*Math.PI/180;Ut!==0&&(he=L.multiply(he,L.rotateZ(Ut))),Ht!==0&&(he=L.multiply(he,L.rotateY(Ht))),Mt!==0&&(he=L.multiply(he,L.rotateX(Mt))),he=L.multiply(he,L.scale(ae,le,Be));let qe=Pe?L.multiply(Pe,he):he,Nt=p?.colorTint||p?.color||f.colorTint||f.color?En(p?.colorTint??p?.color??f.colorTint??f.color):void 0,kt=Nt?[Nt.r,Nt.g,Nt.b,Nt.a]:[1,1,1,1],F=(p?.opacity??f.opacity??1)*_e,re,De=p?.animationProgress??f.animationProgress??0,Ke=p?.animationTime??f.animationTime??0,Ye=p?.animationSpeed??f.animationSpeed??1,Ge=(f.animationName?I.animations.find(N=>N.name===f.animationName):void 0)??I.animations[0],Ze=0;Ge&&Ge.duration>0&&(Ze=De>0?De*Ge.duration:Ke+(w??0)/(d||30)*Ye,(f.loop??!0)&&(Ze%=Ge.duration));let Ce=L.multiply(qe,I.rootTransform??L.identity()),dt=I.nodes?Ia(I,Ge,Ze):void 0,Ie=new Map,Zt=N=>{if(!dt)return{matrix:Ce};if(N.skin!==void 0){let H=Ie.get(N.skin);return H||(H=za(I,N.skin,dt),Ie.set(N.skin,H)),{matrix:Ce,joints:H}}return N.node!==void 0?{matrix:L.multiply(Ce,dt[N.node])}:{matrix:Ce}};if(!dt&&Ge&&Ge.duration>0){let N=Ze;if(I.skeleton&&I.skeleton.bones.length>0){let H=Math.min(128,I.skeleton.bones.length);re=new Float32Array(2048);for(let be=0;be<128;be++)re[be*16]=1,re[be*16+5]=1,re[be*16+10]=1,re[be*16+15]=1;for(let be of Ge.tracks){let Pt=I.skeleton.boneIndicesByName[be.nodeName];if(Pt!==void 0&&Pt<H){let Je=be.times,Re=0;for(let St=0;St<Je.length-1;St++)if(N>=Je[St]&&N<=Je[St+1]){Re=St;break}let sr=Je[Re]??0,Wr=Je[Re+1]??sr,yr=Wr>sr?(N-sr)/(Wr-sr):0;if(be.translations){let St=be.translations[Re*3]??0,ht=be.translations[Re*3+1]??0,ne=be.translations[Re*3+2]??0,et=be.translations[(Re+1)*3]??St,lr=be.translations[(Re+1)*3+1]??ht,mt=be.translations[(Re+1)*3+2]??ne,lt=St+(et-St)*yr,Dt=ht+(lr-ht)*yr,yi=ne+(mt-ne)*yr,In=L.translate(lt,Dt,yi),zn=I.skeleton.bones[Pt],Fs=zn?L.multiply(In,zn.inverseBindMatrix):In;re.set(Fs,Pt*16)}}}}}let We=N=>N.materialName?I.materials[N.materialName]?.alphaMode==="blend":!1,ee=[...I.meshes].sort((N,H)=>Number(We(N))-Number(We(H)));for(let N of ee){let H=N.materialName?I.materials[N.materialName]:void 0,be=Zt(N),Pt=be.joints??re,Je;Nt?H?.diffuseColor?Je=[H.diffuseColor[0]*kt[0],H.diffuseColor[1]*kt[1],H.diffuseColor[2]*kt[2],(H.diffuseColor[3]??1)*kt[3]]:Je=kt:H?.diffuseColor?Je=H.diffuseColor:Je=[.8,.8,.85,1];let Re=p?.audioDeform??f.audioDeform,sr;if(Re){let yr=(w??0)/(d||30),St=yr*1e3,ht=Re.latentBuffer;if(!ht&&Re.audioBuffer&&(ht=Re.audioBuffer),!ht){let ne=Re.audioData;if(ne){let et=(f.id??"audio-mesh")+"-direct-audio",lr=li.get(et);if(!lr){let mt=Array.isArray(ne)?ne:ne.channels,lt=Array.isArray(ne)?48e3:ne.sampleRate,Dt=Math.max(10,Math.ceil((mt[0]?.length??0)/lt*(d||30))+10);lr=new bi(mt,lt,d||30,Dt),li.set(et,lr)}ht=lr.getGpuBuffer(e.device,w??0)}}if(!ht&&Re.audioTrackId){let ne=Re.audioTrackId,et,lr=mt=>{for(let lt of mt){let Dt=lt.operation;if(Dt){if(Dt.id===ne||Dt.inputHandleId===ne){et=Dt.inputHandleId||Dt.src||Dt.url;return}lt.children&&lr(lt.children)}}};if(u.children&&lr(u.children),!et&&(ne.endsWith(".mp3")||ne.endsWith(".wav")||ne.endsWith(".ogg"))&&(et=ne),et)try{let mt=li.get(et);if(!mt){let lt=await Ba(et);if(lt&<.channels.length>0){let Dt=lt.sampleRate||48e3,yi=lt.channels[0]?.length??0,In=lt.durationSec??yi/Dt,zn=Math.max(10,Math.ceil(In*(d||30))+10);mt=new bi(lt.channels,Dt,d||30,zn),li.set(et,mt)}}mt&&(ht=mt.getGpuBuffer(e.device,w??0))}catch(mt){console.warn("[webgpu-renderer] Failed to decode audio for deformWithAudio:",mt)}}if(ht){let ne=Re.amplitudeMultiplier??1;if(typeof ne!="number"&&typeof ne?.get=="function"){let et={frame:w??0,fps:d||30,time:yr,duration:0,durationMs:0,progress:0,deltaTime:1/(d||30)};ne=Number(ne.get(et))}else typeof ne!="number"&&typeof ne?.value=="number"&&(ne=ne.value);sr={config:{...Re,amplitudeMultiplier:Number.isFinite(ne)?ne:1},latentBuffer:ht,timeMs:St,sampleRate:48e3}}}let Wr={modelMatrix:be.matrix,opacity:F*(H?.opacity??1),colorTint:Je,twoSided:p?.twoSided??f.twoSided??H?.twoSided??!0,wireframe:!!(p?.wireframe??f.wireframe),isSkinned:!!(Pt||N.jointIndices&&N.jointWeights),skinningMatrices:Pt,material:p?.material??f.material??H?.shading??"lit",shadeColor:H?.shadeColor,alphaCutoff:H?.alphaCutoff,textureWrap:H?.textureWrap,shininess:p?.shininess??f.shininess??H?.shininess??32,roughness:p?.roughness??f.roughness??H?.roughness,specularIntensity:p?.specularIntensity??f.specularIntensity??.5,ambientIntensity:p?.ambientIntensity??f.ambientIntensity??1,metallic:p?.metallic??f.metallic??H?.metallic,audioDeform:sr};vt.push({kind:"mesh",mesh:N,texture:H?await R.materialTexture(H):void 0,opts:Wr})}return{finalTex:ie,finalView:q}}let V=ya[f.id];if(!V)return wt?await Rr(D.children??[],ie,q,E,_e,Le,Ve,$,X,Pe,rr):void 0;let Bt=f.x??0,de=f.y??0,ft=p?.x??Bt,nr=p?.y??de,$t=0,jt=0;if(Ve){let R=V.x-Ve.x,C=V.y-Ve.y;$t=R+(ft-Bt),jt=C+(nr-de)}else $t=V.x+(ft-Bt),jt=V.y+(nr-de);let nt=p?.scale??f.scale??1,ir=p?.rotation??f.rotation??0,$e=(p?.opacity??f.opacity??1)*_e,Yt=p?.animators??f.animators,Lt=K==="text"&&!!(f.pathOptions||p?.pathOptions),On=K==="text"&&Array.isArray(Yt)&&Yt.length>0,hi=K==="text"&&Array.isArray(Yt)&&Yt.some(R=>{let C=R;return C?.props?.formation!==void 0||C?.formation!==void 0}),Or=0,Ar=0;if(hi){let R=0,C=0;for(let I of Yt){let te=I,z=te?.props?.formation??te?.formation;z&&(typeof z.radius=="number"&&(R=Math.max(R,z.radius)),typeof z.pitch=="number"&&(C=Math.max(C,z.pitch)))}Or=Math.max(160,Math.ceil(R+100)),Ar=Math.max(100,Math.ceil(R+C*15+100))}else!Lt&&On&&(Or=Math.max(80,Math.ceil(V.width*.2)),Ar=Math.max(50,Math.ceil(V.height*.5)));let B=Lt?$:V.width+Or*2,Y=Lt?X:V.height+Ar*2;!Lt&&On&&($t-=Or,jt-=Ar);let sn=f.anchorX??.5,Ma=f.anchorY??.5,vs=os(ss({x:$t,y:jt,width:B,height:Y,rotation:ir,scale:nt,anchorX:Lt?sn*V.width/B:sn,anchorY:Lt?Ma*V.height/Y:Ma})),pr=Le.multiply(vs),Gt=f.blendMode||"normal",G=ie,Ue=q,An=us(p,f),ws=p?.rotateX??f.rotateX??0,Ms=p?.rotateY??f.rotateY??0,ka=p?.rotateZ??f.rotateZ??0,ks=p?.translateZ??f.translateZ??0,Ps=p?.perspective??f.perspective??0,Ss=p?.perspectiveOriginX??f.perspectiveOriginX??f.anchorX??.5,Ds=p?.perspectiveOriginY??f.perspectiveOriginY??f.anchorY??.5,Cs=p?.backfaceVisibility??f.backfaceVisibility??"visible",gr=null;if(An){let R=ce.buildLayer3DMatrix({x:$t,y:jt,width:B,height:Y,rotateXDeg:ws,rotateYDeg:Ms,rotateZDeg:ka!==0?ka:ir,scaleX:nt,scaleY:nt,perspectivePx:Ps,originXRatio:Ss,originYRatio:Ds,translateZPx:ks}),C=ce.projectRectangleCorners(R,B,Y);if(Le.isIdentity||(C={topLeft:Le.transformPoint(new DOMPoint(C.topLeft.x,C.topLeft.y)),topRight:Le.transformPoint(new DOMPoint(C.topRight.x,C.topRight.y)),bottomLeft:Le.transformPoint(new DOMPoint(C.bottomLeft.x,C.bottomLeft.y)),bottomRight:Le.transformPoint(new DOMPoint(C.bottomRight.x,C.bottomRight.y))}),Cs==="hidden"&&ce.computeSignedArea(C)<0)return;gr=C}let _r=!!(p?.is3D??f.is3D)||!!(ge&&((p?.z??f.z??0)!==0||f.is3D));if(wt){if(f.transformStyle==="preserve-3d"&&_r){let F=L.identity(),re=Pe!==null?p?.x??f.x??0:p?.x??f.x??$t+B*.5,De=Pe!==null?p?.y??f.y??0:p?.y??f.y??jt+Y*.5,Ke=p?.z??f.z??0;F=L.multiply(F,L.translate(re,De,Ke));let Ye=(p?.rotateX??f.rotateX??0)*Math.PI/180,Ge=(p?.rotateY??f.rotateY??0)*Math.PI/180,Ze=((p?.rotateZ??f.rotateZ??0)!==0?p?.rotateZ??f.rotateZ??0:ir)*(Math.PI/180);Ze!==0&&(F=L.multiply(F,L.rotateZ(Ze))),Ge!==0&&(F=L.multiply(F,L.rotateY(Ge))),Ye!==0&&(F=L.multiply(F,L.rotateX(Ye)));let Ce=(p?.scaleX??f.scaleX??1)*nt,dt=(p?.scaleY??f.scaleY??1)*nt,Ie=(p?.scaleZ??f.scaleZ??1)*nt;if((Ce!==1||dt!==1||Ie!==1)&&(F=L.multiply(F,L.scale(Ce,dt,Ie))),Pe&&(F=L.multiply(Pe,F)),D.children&&D.children.length>0){let Zt=await Rr(D.children,G,Ue,E,$e,new DOMMatrix,null,B,Y,F,!1);G=Zt.finalTex,Ue=Zt.finalView}return{finalTex:G,finalView:Ue}}if(_r){let F=Math.max(1,Math.ceil(B)),re=Math.max(1,Math.ceil(Y)),De=[G,n,...E,...vt.map(ee=>ee.texture).filter(ee=>!!ee)],Ke=e.renderer.getTemporaryTexture(F,re,De),Ye=Ke.createView();e.renderer.beginFrame(a,Ye,{r:0,g:0,b:0,a:0},F,re,"clear").end();let Ze=Math.min(f.borderRadius??f.strokeRadius??0,B/2,Y/2);if(Dn(K,f.background)){let ee=e.renderer.beginFrame(a,Ye,{r:0,g:0,b:0,a:0},F,re,"load");e.renderer.drawRect(ee,{x:0,y:0,width:B,height:Y},f.background,0,{opacity:1}),ee.end()}let Ce=Ke,dt=Ye;if(D.children&&D.children.length>0){let ee=await Rr(D.children,Ke,Ye,[Ke,...De],1,new DOMMatrix,V,F,re,null,!1);Ce=ee.finalTex,dt=ee.finalView}let Ie=!_r&&f.borderWidth!==void 0&&f.borderColor?ci(e,a,B,Y,Ze,f.borderWidth,f.borderColor,f.strokeAlign??"inside",[Ce,...De]):null;if(Ie){let ee=e.renderer.beginFrame(a,dt,{r:0,g:0,b:0,a:0},F,re,"load");e.renderer.drawTexture(ee,Ie.borderTex,{x:Ie.ox,y:Ie.oy,width:Ie.ow,height:Ie.oh},{opacity:1}),ee.end()}let Zt;if(Pe){let ee=L.identity(),N=p?.x??f.x??0,H=p?.y??f.y??0,be=p?.z??f.z??0;ee=L.multiply(ee,L.translate(N,H,be));let Pt=(p?.rotateX??f.rotateX??0)*Math.PI/180,Je=(p?.rotateY??f.rotateY??0)*Math.PI/180,Re=((p?.rotateZ??f.rotateZ??0)!==0?p?.rotateZ??f.rotateZ??0:ir)*(Math.PI/180);Re!==0&&(ee=L.multiply(ee,L.rotateZ(Re))),Je!==0&&(ee=L.multiply(ee,L.rotateY(Je))),Pt!==0&&(ee=L.multiply(ee,L.rotateX(Pt)));let sr=B*nt,Wr=Y*nt,yr=p?.scaleZ??f.scaleZ??1;ee=L.multiply(ee,L.scale(sr,Wr,yr));let St=f.anchorX??.5,ht=f.anchorY??.5,ne=.5-St,et=.5-ht;(ne!==0||et!==0)&&(ee=L.multiply(ee,L.translate(ne,et,0))),Zt=L.multiply(Pe,ee)}let We={position:[$t+B*.5,jt+Y*.5,p?.z??f.z??0],width:B,height:Y,textureExtent:[B/Ce.width,Y/Ce.height],rotation:[p?.rotateX??f.rotateX??0,p?.rotateY??f.rotateY??0,(p?.rotateZ??f.rotateZ??0)!==0?p?.rotateZ??f.rotateZ??0:ir],scale:[nt,nt,p?.scaleZ??f.scaleZ??1],anchor:[f.anchorX??.5,f.anchorY??.5],borderRadius:Ze,borderWidth:f.borderWidth,borderColor:f.borderColor,opacity:$e,twoSided:p?.twoSided??f.twoSided??!0,material:p?.material??f.material,shininess:p?.shininess??f.shininess,roughness:p?.roughness??f.roughness,specularIntensity:p?.specularIntensity??f.specularIntensity,ambientIntensity:p?.ambientIntensity??f.ambientIntensity,metallic:p?.metallic??f.metallic,...Zt&&{modelMatrix:Zt}};return vt.push({kind:"quad",texture:Ce,opts:We}),{finalTex:G,finalView:Ue}}if(An&&gr){let F=Math.max(1,Math.ceil(B)),re=Math.max(1,Math.ceil(Y)),De=[G,n,...E],Ke=e.renderer.getTemporaryTexture(F,re,De),Ye=Ke.createView();e.renderer.beginFrame(a,Ye,{r:0,g:0,b:0,a:0},F,re,"clear").end();let Ze=Math.min(f.borderRadius??f.strokeRadius??0,B/2,Y/2);if(Dn(K,f.background)){let We=e.renderer.beginFrame(a,Ye,{r:0,g:0,b:0,a:0},F,re,"load");e.renderer.drawRect(We,{x:0,y:0,width:B,height:Y},f.background,Ze,{opacity:1}),We.end()}let Ce=Ke,dt=Ye;if(D.children&&D.children.length>0){let We=await Rr(D.children,Ke,Ye,[Ke,...De],1,new DOMMatrix,V,F,re,null,!1);Ce=We.finalTex,dt=We.finalView}let Ie=f.borderWidth!==void 0&&f.borderColor?ci(e,a,B,Y,Ze,f.borderWidth,f.borderColor,f.strokeAlign??"inside",[Ce,...De]):null;if(Ie){let We=e.renderer.beginFrame(a,dt,{r:0,g:0,b:0,a:0},F,re,"load");e.renderer.drawTexture(We,Ie.borderTex,{x:Ie.ox,y:Ie.oy,width:Ie.ow,height:Ie.oh},{opacity:1}),We.end()}let Zt=p?.motionBlurShutter??f.motionBlurShutter??0;if(Zt>0&&d&&w!==void 0){let We=w/d,ee=(w-1)/d;Z.seek(ee);let N=ye?W[ye]:void 0,H=N?.x??Bt,be=N?.y??de;Z.seek(We);let Pt=ft-H,Je=nr-be;Math.hypot(Pt,Je)>.5&&(Ce=e.renderer.applyMotionBlur(a,Ce,Pt,Je,Zt,16,[G,n,...E]),dt=Ce.createView())}if(Gt==="normal"||Gt==="source-over")ui(e,a,Ue,Ce,gr,$,X,$e);else{let We=[G,n,Ce,...E];Ie&&We.push(Ie.borderTex);let ee=e.renderer.getTemporaryTexture($,X,We),N=ee.createView();e.renderer.beginFrame(a,N,{r:0,g:0,b:0,a:0},$,X,"clear").end(),ui(e,a,N,Ce,gr,$,X,$e),G=e.renderer.composite(a,G,ee,Gt,[n,...E]),Ue=G.createView()}return{finalTex:G,finalView:Ue}}let R=f.overflow!=="visible",C=R?Lu(pr,B,Y):null,I=R?Math.min(p?.borderRadius??f.borderRadius??0,B/2,Y/2):0;if((K==="flex"||K==="block")&&I<=0&&!Dn(K,f.background)&&$e===1&&Gt==="normal"&&!f.borderWidth&&!f.borderColor&&(typeof f.relighting!="object"||!f.relighting)&&(typeof f.relight!="object"||!f.relight)&&(typeof p?.relighting!="object"||!p?.relighting)&&(typeof p?.relight!="object"||!p?.relight)&&(typeof f.deflicker!="object"||!f.deflicker)&&(typeof p?.deflicker!="object"||!p?.deflicker)){C&&e.renderer.pushScissor(C);let F=await Rr(D.children??[],G,Ue,E,_e,pr,V,$,X,null,rr);return C&&e.renderer.popScissor(),F}let te=[G,n,...E],z=e.renderer.getTemporaryTexture($,X,te),xe=z.createView();e.renderer.beginFrame(a,xe,{r:0,g:0,b:0,a:0},$,X,"clear").end();let Se=Math.min(p?.borderRadius??f.borderRadius??f.strokeRadius??0,B/2,Y/2);if(Dn(K,f.background)){let F=e.renderer.beginFrame(a,xe,{r:0,g:0,b:0,a:0},$,X,"load");e.renderer.pushTransform(pr),e.renderer.drawRect(F,{x:0,y:0,width:B,height:Y},f.background,Se,{opacity:$e}),e.renderer.popTransform(),F.end()}let J=z,j=xe;if(D.children&&D.children.length>0){C&&e.renderer.pushScissor(C);let F=await Rr(D.children,z,xe,[z,...te],$e,pr,V,$,X,null,!1);C&&e.renderer.popScissor(),J=F.finalTex,j=F.finalView}if(I>0){let F=e.renderer.getTemporaryTexture($,X,[J,...te]),re=e.renderer.beginFrame(a,F.createView(),{r:0,g:0,b:0,a:0},$,X,"clear");e.renderer.pushTransform(pr),e.renderer.drawRect(re,{x:0,y:0,width:B,height:Y},"#ffffff",I),e.renderer.popTransform(),re.end(),J=e.renderer.composite(a,J,F,"mask-in",[J,F,...te]),j=J.createView()}let ae=f.borderWidth!==void 0&&f.borderColor?ci(e,a,B,Y,Se,f.borderWidth,f.borderColor,f.strokeAlign??"inside",[J,...te]):null;if(ae){let F=e.renderer.beginFrame(a,j,{r:0,g:0,b:0,a:0},$,X,"load");e.renderer.pushTransform(pr),e.renderer.drawTexture(F,ae.borderTex,{x:ae.ox,y:ae.oy,width:ae.ow,height:ae.oh},{opacity:$e}),e.renderer.popTransform(),F.end()}let le=p?.motionBlurShutter??f.motionBlurShutter??0;if(le>0&&d&&w!==void 0){let F=w/d,re=(w-1)/d;Z.seek(re);let De=ye?W[ye]:void 0,Ke=De?.x??Bt,Ye=De?.y??de;Z.seek(F);let Ge=ft-Ke,Ze=nr-Ye;Math.hypot(Ge,Ze)>.5&&(J=e.renderer.applyMotionBlur(a,J,Ge,Ze,le,16,[G,n,...E]),j=J.createView())}let Be=Array.isArray(f.effects)?f.effects.find(F=>F?.op==="TemporalDeflicker"||F?.op==="Deflicker"||F?.constructor?.name==="TemporalDeflicker"):void 0,he=p?.deflicker??f.deflicker??Be,Mt=typeof he=="object"&&he!==null?he:void 0;if(Mt){let F=ps(e.device,f.id||`layer_${O}`);w===0&&F.reset(),J=F.execute(J,Mt,a),j=J.createView()}let Ht=Array.isArray(f.effects)?f.effects.find(F=>F?.op==="Relight3D"||F?.constructor?.name==="Relight3D"):void 0,Ut=p?.relighting??f.relighting??(typeof f.relight=="object"?f.relight:void 0)??Ht,qe=typeof Ut=="object"&&Ut!==null?Ut:void 0;if(qe){let F=_a(e.device,e.renderer.format??"rgba8unorm"),re=Cn(e.device,e.renderer.format??"rgba8unorm",m),De=gs(qe,Rn,V,M,d??24),Ke=re.getOrCreateLightsBuffer(De),Ye=e.renderer.getTemporaryTexture($,X,[J,G,n,...E]),Ge=Ye.createView(),Ze=qe.normalTexture??qe.normalMap;F.execute(a,Ge,J,Ze,Ke,{viewportWidth:$,viewportHeight:X,layerX:0,layerY:0,roughness:st(p?.roughness??p?.relightRoughness??qe.specularRoughness??qe.roughness,.35,M,d??24),specularStrength:st(p?.specularStrength??p?.relightSpecularStrength??qe.specularStrength,.7,M,d??24),metallic:st(p?.metallic??p?.relightMetallic??qe.metallic,0,M,d??24),ambientIntensity:st(p?.ambientIntensity??p?.relightAmbientIntensity??qe.ambientIntensity,.15,M,d??24),depthScale:st(p?.depthScale??p?.relightDepthScale??qe.depthScale,1,M,d??24),opacity:1},"clear"),J=Ye,j=Ge}let Nt=[G,n,...E];return ae&&Nt.push(ae.borderTex),G=e.renderer.composite(a,G,J,Gt,Nt),Ue=G.createView(),{finalTex:G,finalView:Ue}}if(!(B>0&&Y>0))return{finalTex:G,finalView:Ue};let Fn=Math.min(f.borderRadius??f.strokeRadius??0,B/2,Y/2),je=Math.ceil(B),He=Math.ceil(Y),Pa=e.renderer.suspendScissors?.()??[],Zr=e.renderer.getTemporaryTexture(je,He,[G,n,...E]),Ln=Zr.createView();e.renderer.beginFrame(a,Ln,{r:0,g:0,b:0,a:0},je,He,"clear").end();let ar,mi=!1;if(K==="media")ar=D.children?.[0],mi=ar?.operation?.dataType==="Caption"||f.dataType==="Caption"||ar?.operation?.srtText!==void 0;else if(K==="text"){let R=f.text??"",C=R,I=Yt;Array.isArray(Yt)&&Yt.length>0&&(I=Yt.map((Se,J)=>{let j={...Se,transform:{...Se.transform??{}}};if(J===0){let ae=typeof p?.offset=="number"?p.offset:typeof p?.animatorOffset=="number"?p.animatorOffset:void 0,le=typeof p?.rangeStart=="number"?p.rangeStart:typeof p?.animatorRangeStart=="number"?p.animatorRangeStart:void 0,Be=typeof p?.rangeEnd=="number"?p.rangeEnd:typeof p?.animatorRangeEnd=="number"?p.animatorRangeEnd:void 0;ae!==void 0&&(j.offset=ae),le!==void 0&&(j.rangeStart=le),Be!==void 0&&(j.rangeEnd=Be),Array.isArray(j.selectors)&&(j.selectors=j.selectors.map(he=>he.type==="range"?{...he,...ae!==void 0?{offset:ae}:{},...le!==void 0?{start:le}:{},...Be!==void 0?{end:Be}:{}}:he))}return j}));let te=Array.isArray(I)&&I.length>0,z=!!(f.typewriter||p?.typewriter),xe=f.animation?.tracks?.find(Se=>Se.prop==="text");if(!te&&!z&&(xe!==void 0||typeof p?.text=="number")&&R.length>0){let Se=typeof p?.text=="number"?Math.max(0,Math.min(1,p.text)):1;if(Se>=1)C=R;else if(Se<=0)C="";else{let J=xe?.keyframes?.find(le=>le.presetType)?.presetType??"typewriter",j=typeof p?.text=="number"?p.text:null,ae=j!==null&&j>1.0001;if(J==="word-reveal"||J==="karaoke"){let le=R.split(/(\s+)/),Be=[];le.forEach((Mt,Ht)=>{Mt.trim().length>0&&Be.push(Ht)});let he=ae&&j!==null?Math.min(Be.length,Math.round(j)):Math.round(Be.length*Se);if(he===0)C="";else{let Mt=Be[Math.min(Be.length-1,he-1)];C=le.slice(0,Mt+1).join("")}}else if(J==="line-reveal"){let le=R.split(`
|
|
225
|
-
`),Be=ae&&j!==null?Math.min(le.length,Math.round(j)):Math.round(le.length*Se);C=le.slice(0,Math.max(0,Be)).join(`
|
|
226
|
-
`)}else{let le=ae&&j!==null?Math.min(R.length,Math.round(j)):Math.round(R.length*Se);C=R.slice(0,le)}}}ar={metadata:{},operation:{op:"text",text:C,animators:I,pathOptions:p?.pathOptions??f.pathOptions,typewriter:p?.typewriter??f.typewriter,marquee:p?.marquee??f.marquee,textProgress:typeof p?.text=="number"?p.text:void 0,firstMargin:p?.firstMargin??f.firstMargin,lastMargin:p?.lastMargin??f.lastMargin,baselineShift:p?.baselineShift??f.baselineShift,signals:u?.operation?.signals??u?.signals,fontSize:p?.fontSize??f.fontSize,fontFamily:f.fontFamily,fontStyle:f.fontStyle,fontWeight:f.fontWeight,fill:p?.fill??p?.color??f.fill,align:f.align==="start"?"left":f.align==="end"?"right":f.align,verticalAlign:f.verticalAlign,letterSpacing:p?.letterSpacing??f.letterSpacing,lineHeight:f.lineHeight,padding:f.padding,textBackgroundColor:p?.textBackgroundColor??p?.background??f.background,borderRadius:f.borderRadius,stroke:p?.stroke??p?.strokeColor??f.stroke,strokeWidth:p?.strokeWidth??f.strokeWidth,strokeAlign:f.strokeAlign,textShadow:f.textShadow,shadows:f.shadows,x:Lt?0:Or,y:Lt?0:Ar,width:Lt?$:f.width!==void 0?V.width:void 0,height:Lt?X:f.height!==void 0?V.height:void 0},children:[]}}let or=null,pi=!0;if(ar){let C=cn(ar)?.durationMs??U,te=Math.max(1,Math.round(C/1e3*(d??24)))/(d??24)*1e3,z=ar.operation?.op==="Compositor"&&ar.operation?.dataType==="Image",xe=_r&&K==="text",Ne=e.renderer.rasterDrawCount;xe&&e.renderer.slugPipeline.beginCapture();try{await c(ar,{containerWidth:B,containerHeight:Y,renderId:`${l.renderId}-l${O}`,durationMs:te,opacity:1,fps:d,excludeTextures:[G,n,...E],isVideoMode:h&&!z,...h&&{frame:Math.max(0,w-(f.startFrame??0))+(f.mediaStartFrame??f.trimStartFrames??(f.trimStartSec!=null?Math.round(f.trimStartSec*(d??24)):0))},compositionFrame:M,...mi&&{fontFamily:f.fontFamily,fontSize:p?.fontSize??f.fontSize,fontWeight:f.fontWeight,fontStyle:f.fontStyle,fill:f.fill,color:f.fill,align:f.align==="start"?"left":f.align==="end"?"right":f.align??"center",verticalAlign:f.verticalAlign??f.textAlignVertical,lineHeight:f.lineHeight,letterSpacing:f.letterSpacing,textBackgroundColor:f.background??f.textBackgroundColor,borderRadius:f.borderRadius??f.strokeRadius,strokeRadius:f.strokeRadius??f.borderRadius,stroke:f.stroke,strokeWidth:f.strokeWidth,shadows:f.shadows,padding:f.padding,maxWidth:f.maxWidth??B}},Ln,Zr,je,He)}finally{xe&&(or=e.renderer.slugPipeline.endCapture())}pi=e.renderer.rasterDrawCount!==Ne}else if(K==="shape"){let R=e.renderer.beginFrame(a,Ln,{r:0,g:0,b:0,a:0},je,He,"load"),I={shapeType:f.shapeType??f.shape??"rect",width:B,height:Y,path:f.d??f.path,cornerRadius:p?.cornerRadius??f.cornerRadius??f.borderRadius??f.radius??0,starPoints:f.starPoints??5,starInnerRadiusRatio:p?.starInnerRadiusRatio??f.starInnerRadiusRatio??.5,polygonSides:f.polygonSides??5},te=f.fillType??"solid",z=p?.fillColor??p?.fill??f.fillColor??f.fill??"#38bdf8",xe=p?.gradientEndColor??f.gradientEndColor??f.fillColor2??"#9333ea",Ne=f.fillStartX,Se=f.fillStartY,J=f.fillEndX,j=f.fillEndY;if(te==="linear"&&Ne===void 0&&f.gradientAngle!==void 0){let kt=f.gradientAngle*Math.PI/180,F=B/2,re=Y/2,De=(Math.abs(B*Math.cos(kt))+Math.abs(Y*Math.sin(kt)))/2;Ne=F-Math.cos(kt)*De,Se=re-Math.sin(kt)*De,J=F+Math.cos(kt)*De,j=re+Math.sin(kt)*De}let ae={type:te,color:z,color2:xe,startX:Ne,startY:Se,endX:J,endY:j,cx:f.fillCx,cy:f.fillCy,radius:f.fillRadius},le=p?.strokeWidth??f.strokeWidth??0,Be=p?.strokeColor??f.strokeColor??f.stroke??"#ffffff",he=f.strokeLineCap??"round",Mt=f.strokeDashArray,Ht=p?.strokeDashOffset??f.strokeDashOffset??0,Ut=p?.trimStart??f.trimStart??0,qe=p?.trimEnd??f.trimEnd??1,Nt=p?.trimOffset??f.trimOffset??0;e.renderer.drawShape(R,I,ae,le>0?{color:Be,width:le,cap:he,trimStart:Ut,trimEnd:qe,trimOffset:Nt,dashArray:Mt,dashOffset:Ht}:void 0),R.end()}let Rs=Array.isArray(f.effects)?f.effects.find(R=>R?.op==="TemporalDeflicker"||R?.constructor?.name==="TemporalDeflicker"):void 0,gi=p?.deflicker??f.deflicker??Rs,Os=Array.isArray(f.effects)?f.effects.find(R=>R?.op==="Relight3D"||R?.constructor?.name==="Relight3D"):void 0,_i=p?.relighting??f.relighting??(typeof f.relight=="object"?f.relight:void 0)??Os,Xt=typeof _i=="object"&&_i!==null?_i:void 0,ln=p?.motionBlurShutter??f.motionBlurShutter??0;if(or&&or.length>0&&(gi||Xt||ln>0)){let R=e.renderer.beginFrame(a,Ln,{r:0,g:0,b:0,a:0},je,He,"load");e.renderer.slugPipeline.drawBatches(R,or,je,He),R.end(),or=null,pi=!0}let Qe=Zr;if(!_r&&Fn>0&&!mi&&K!=="shape"){let R=e.renderer.getTemporaryTexture(je,He,[Zr,G,n,...E]),C=R.createView();e.renderer.beginFrame(a,C,{r:0,g:0,b:0,a:0},je,He,"clear").end();let te=e.renderer.beginFrame(a,C,{r:0,g:0,b:0,a:0},je,He,"load");e.renderer.drawRect(te,{x:0,y:0,width:B,height:Y},{r:1,g:1,b:1,a:1},Fn),te.end(),Qe=e.renderer.composite(a,Zr,R,"mask-in",[G,n,...E])}if(gi){let R=ps(e.device,f.id||`layer_${O}`);w===0&&R.reset(),Qe=R.execute(Qe,gi,a)}if(Xt){let R=_a(e.device,e.renderer.format??"rgba8unorm"),C=Cn(e.device,e.renderer.format??"rgba8unorm",m),I=gs(Xt,Rn,{x:ft,y:nr,width:je,height:He},M,d??24),te=C.getOrCreateLightsBuffer(I),z=e.renderer.getTemporaryTexture(je,He,[Qe,G,n,...E]),xe=z.createView(),Ne=Xt.normalTexture??Xt.normalMap;R.execute(a,xe,Qe,Ne,te,{viewportWidth:je,viewportHeight:He,layerX:ft,layerY:nr,roughness:st(p?.roughness??p?.relightRoughness??Xt.specularRoughness??Xt.roughness,.35,M,d??24),specularStrength:st(p?.specularStrength??p?.relightSpecularStrength??Xt.specularStrength,.7,M,d??24),metallic:st(p?.metallic??p?.relightMetallic??Xt.metallic,0,M,d??24),ambientIntensity:st(p?.ambientIntensity??p?.relightAmbientIntensity??Xt.ambientIntensity,.15,M,d??24),depthScale:st(p?.depthScale??p?.relightDepthScale??Xt.depthScale,1,M,d??24),opacity:1},"clear"),Qe=z}let Fr=0,Lr=0;if(ln>0&&d&&w!==void 0){let R=w/d,C=(w-1)/d;Z.seek(C);let I=ye?W[ye]:void 0,te=I?.x??Bt,z=I?.y??de;Z.seek(R);let xe=ft-te,Ne=nr-z;if(Math.hypot(xe,Ne)>.5){if(!_r&&!(An&&gr)){let j=ln/360;Fr=Math.ceil(Math.abs(xe)*j),Lr=Math.ceil(Math.abs(Ne)*j);let ae=e.renderer.getTemporaryTexture(je+Fr*2,He+Lr*2,[Qe,G,n,...E]),le=e.renderer.beginFrame(a,ae.createView(),{r:0,g:0,b:0,a:0},ae.width,ae.height,"clear");e.renderer.drawTexture(le,Qe,{x:Fr,y:Lr,width:je,height:He},{opacity:1}),le.end(),Qe=ae}let Se=Math.hypot(xe,Ne)*(ln/360)*2,J=Math.min(128,Math.max(16,Math.ceil(Se/2)));Qe=e.renderer.applyMotionBlur(a,Qe,xe,Ne,ln,J,[G,n,...E])}}let As=[Zr,Qe,G,n,...E],se=!_r&&f.borderWidth!==void 0&&f.borderColor?ci(e,a,B,Y,Fn,f.borderWidth,f.borderColor,f.strokeAlign??"inside",As):null;if(Pa.length>0&&e.renderer.resumeScissors?.(Pa),_r){let R=Qe;if(se){let z=e.renderer.beginFrame(a,R.createView(),{r:0,g:0,b:0,a:0},je,He,"load");e.renderer.drawTexture(z,se.borderTex,{x:se.ox,y:se.oy,width:se.ow,height:se.oh},{opacity:1}),z.end()}let C;if(Pe){let z=L.identity(),xe=p?.x??f.x??0,Ne=p?.y??f.y??0,Se=p?.z??f.z??0;z=L.multiply(z,L.translate(xe,Ne,Se));let J=(p?.rotateX??f.rotateX??0)*Math.PI/180,j=(p?.rotateY??f.rotateY??0)*Math.PI/180,ae=((p?.rotateZ??f.rotateZ??0)!==0?p?.rotateZ??f.rotateZ??0:ir)*(Math.PI/180);ae!==0&&(z=L.multiply(z,L.rotateZ(ae))),j!==0&&(z=L.multiply(z,L.rotateY(j))),J!==0&&(z=L.multiply(z,L.rotateX(J)));let le=B*nt,Be=Y*nt,he=p?.scaleZ??f.scaleZ??1;z=L.multiply(z,L.scale(le,Be,he));let Mt=f.anchorX??.5,Ht=f.anchorY??.5,Ut=.5-Mt,qe=.5-Ht;(Ut!==0||qe!==0)&&(z=L.multiply(z,L.translate(Ut,qe,0))),C=L.multiply(Pe,z)}let I={position:[$t+B*.5,jt+Y*.5,p?.z??f.z??0],width:B,height:Y,textureExtent:[B/je,Y/He],rotation:[p?.rotateX??f.rotateX??0,p?.rotateY??f.rotateY??0,(p?.rotateZ??f.rotateZ??0)!==0?p?.rotateZ??f.rotateZ??0:ir],scale:[nt,nt,p?.scaleZ??f.scaleZ??1],anchor:[f.anchorX??.5,f.anchorY??.5],borderRadius:Fn,borderWidth:f.borderWidth,borderColor:f.borderColor,opacity:$e,twoSided:p?.twoSided??f.twoSided??!0,material:p?.material??f.material,shininess:p?.shininess??f.shininess,roughness:p?.roughness??f.roughness,specularIntensity:p?.specularIntensity??f.specularIntensity,ambientIntensity:p?.ambientIntensity??f.ambientIntensity,metallic:p?.metallic??f.metallic,...C&&{modelMatrix:C}},te=pi||!!(I.borderWidth&&I.borderWidth>0&&I.borderColor);return(!or||te)&&vt.push({kind:"quad",texture:R,opts:I}),or&&or.length>0&&vt.push({kind:"slug",batches:or,opts:I,stackBase:te?1:0}),{finalTex:G,finalView:Ue}}if(An&&gr){let R=Qe;if(se){let C=e.renderer.beginFrame(a,R.createView(),{r:0,g:0,b:0,a:0},je,He,"load");e.renderer.drawTexture(C,se.borderTex,{x:se.ox,y:se.oy,width:se.ow,height:se.oh},{opacity:1}),C.end()}if(Gt==="normal"||Gt==="source-over")ui(e,a,Ue,R,gr,$,X,$e);else{let C=[G,n,R,...E];se&&C.push(se.borderTex);let I=e.renderer.getTemporaryTexture($,X,C),te=I.createView();e.renderer.beginFrame(a,te,{r:0,g:0,b:0,a:0},$,X,"clear").end(),ui(e,a,te,R,gr,$,X,$e),G=e.renderer.composite(a,G,I,Gt,[n,...E]),Ue=G.createView()}return{finalTex:G,finalView:Ue}}if(Gt==="normal"||Gt==="source-over"){let R=e.renderer.beginFrame(a,Ue,{r:0,g:0,b:0,a:0},$,X,"load");e.renderer.pushTransform(pr),e.renderer.drawTexture(R,Qe,{x:-Fr,y:-Lr,width:B+Fr*2,height:Y+Lr*2},{opacity:$e}),se&&e.renderer.drawTexture(R,se.borderTex,{x:se.ox,y:se.oy,width:se.ow,height:se.oh},{opacity:$e}),e.renderer.popTransform(),R.end()}else{let R=[Qe,G,n,...E];se&&R.push(se.borderTex);let C=e.renderer.getTemporaryTexture($,X,R),I=C.createView();e.renderer.beginFrame(a,I,{r:0,g:0,b:0,a:0},$,X,"clear").end();let z=e.renderer.beginFrame(a,I,{r:0,g:0,b:0,a:0},$,X,"load");e.renderer.pushTransform(pr),e.renderer.drawTexture(z,Qe,{x:-Fr,y:-Lr,width:B+Fr*2,height:Y+Lr*2},{opacity:$e}),se&&e.renderer.drawTexture(z,se.borderTex,{x:se.ox,y:se.oy,width:se.ow,height:se.oh},{opacity:$e}),e.renderer.popTransform(),z.end(),G=e.renderer.composite(a,G,C,Gt,[n,...E]),Ue=G.createView()}return{finalTex:G,finalView:Ue}},Ts=[P,n,...l.excludeTextures||[]];er=(await Rr(u.children??[],P,A,Ts,1,new DOMMatrix,null,T,b,null,!0)).finalTex,e.renderer.popTransform(),e.renderer.popScissor();let wa=e.renderer.beginFrame(a,r,{r:0,g:0,b:0,a:0},i,o,"load");e.renderer.drawTexture(wa,er,{x:0,y:0,width:l.containerWidth??i,height:l.containerHeight??o},{opacity:k}),s.pass=wa}}};function ci(s,e,t,r,n,i,o,a,l){if(t<=0||r<=0||!o||!i||i<=0)return null;let c=0,u=0,d=t,g=r,y=n,_=n;if(a==="inside"?(c=0,u=0,d=t,g=r,y=n,_=Math.max(0,n-i)):a==="outside"?(c=-i,u=-i,d=t+2*i,g=r+2*i,y=n+i,_=n):(c=-i/2,u=-i/2,d=t+i,g=r+i,y=n+i/2,_=Math.max(0,n-i/2)),n<=0&&(y=0,_=0),d<=0||g<=0)return null;let m=Math.ceil(d),x=Math.ceil(g),v=s.renderer.getTemporaryTexture(m,x,l),T=v.createView();s.renderer.beginFrame(e,T,{r:0,g:0,b:0,a:0},m,x,"clear").end();let k=s.renderer.beginFrame(e,T,{r:0,g:0,b:0,a:0},m,x,"load");s.renderer.drawRect(k,{x:0,y:0,width:d,height:g},o,y),k.end();let h=d-2*i,S=g-2*i;if(h>0&&S>0){let w=s.renderer.getTemporaryTexture(m,x,[v,...l]),M=w.createView();s.renderer.beginFrame(e,M,{r:0,g:0,b:0,a:0},m,x,"clear").end();let A=s.renderer.beginFrame(e,M,{r:0,g:0,b:0,a:0},m,x,"load");return s.renderer.drawRect(A,{x:i,y:i,width:h,height:S},{r:1,g:1,b:1,a:1},_),A.end(),{borderTex:s.renderer.composite(e,v,w,"mask-out",l),ox:c,oy:u,ow:d,oh:g}}return{borderTex:v,ox:c,oy:u,ow:d,oh:g}}ue();var Iu=async(s,e,t,r)=>{let n=t.operation;if(!n)return;let i=s.length;if(i===0)return;let o=s[0].length;if(o===0)return;if(n.op==="Compositor"){let S=xi(n.volume,1);if(S===1)return;for(let w=0;w<i;w++){let M=s[w];for(let P=0;P<M.length;P++)M[P]*=S}return}let a=xi(n.volume,1),l=Sa(n.muted,!1),c=n.animation,u=r?.fps??24,d=c?.tracks||[],g=d.some(S=>S.prop==="volume"&&S.keyframes&&S.keyframes.length>0),y=d.some(S=>S.prop==="muted"&&S.keyframes&&S.keyframes.length>0);if(!g&&!y)return;let{tl:_,stub:m}=as(n.id||n.inputHandleId||"layer",c,a,l,u),v=(r?.elapsedMs??0)/1e3,T=128;_.seek(v);let b=m.volume,k=m.muted,h=l?0:a;for(let S=0;S<o;S+=T){let w=Math.min(o,S+T),M=v+w/e;_.seek(M);let P=m.volume,A=m.muted;for(let U=S;U<w;U++){let oe=(U-S)/(w-S),Z=Math.min(1,Math.max(0,b+(P-b)*oe)),Fe=(U-S<(w-S)/2?k:A)?0:Z,ve=h===0?0:Fe/h;if(ve!==1)for(let fe=0;fe<i;fe++)s[fe][U]*=ve}b=P,k=A}};Ra.register("CompositorLayer",Iu);var Bc=Ca({WebGPURenderer:_s});export{ce as Transform3DMath,Bc as default,us as has3DTransform,ls as solveHomography};
|
|
227
|
-
/*! Bundled license information:
|
|
228
|
-
|
|
229
|
-
gsap/gsap-core.js:
|
|
230
|
-
(*!
|
|
231
|
-
* GSAP 3.15.0
|
|
232
|
-
* https://gsap.com
|
|
233
|
-
*
|
|
234
|
-
* @license Copyright 2008-2026, GreenSock. All rights reserved.
|
|
235
|
-
* Subject to the terms at https://gsap.com/standard-license
|
|
236
|
-
* @author: Jack Doyle, jack@greensock.com
|
|
237
|
-
*)
|
|
238
|
-
|
|
239
|
-
gsap/CSSPlugin.js:
|
|
240
|
-
(*!
|
|
241
|
-
* CSSPlugin 3.15.0
|
|
242
|
-
* https://gsap.com
|
|
243
|
-
*
|
|
244
|
-
* Copyright 2008-2026, GreenSock. All rights reserved.
|
|
245
|
-
* Subject to the terms at https://gsap.com/standard-license
|
|
246
|
-
* @author: Jack Doyle, jack@greensock.com
|
|
247
|
-
*)
|
|
248
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-5JD65JSJ.mjs";import"./chunk-CNSHAFEA.mjs";import"./chunk-6YJP57MZ.mjs";import"./chunk-BVF64D6H.mjs";export{a as GradientMapWebGPURenderer,b as default};
|