@highstate/designer 0.19.1 → 0.21.1
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/.output/nitro.json +5 -5
- package/.output/public/_nuxt/-OnKOwAh.js +1 -0
- package/.output/public/_nuxt/32ctXXKs.js +1 -0
- package/.output/public/_nuxt/5X7smno1.js +1 -0
- package/.output/public/_nuxt/5gjbd9sK.js +1 -0
- package/.output/public/_nuxt/9OHRRPkh.js +1 -0
- package/.output/public/_nuxt/B-dJABhs.js +1 -0
- package/.output/public/_nuxt/B2SoM2pd.js +2 -0
- package/.output/public/_nuxt/B4FDp1sn.js +1 -0
- package/.output/public/_nuxt/{CmALWFRB.js → B69Z0Xk1.js} +16 -468
- package/.output/public/_nuxt/B7RpoNQl.js +1 -0
- package/.output/public/_nuxt/B7c-h3xW.js +1 -0
- package/.output/public/_nuxt/BA47KaF1.js +1 -0
- package/.output/public/_nuxt/BArXRmKu.js +1 -0
- package/.output/public/_nuxt/BBf5iR-q.js +1 -0
- package/.output/public/_nuxt/BCJKqJxW.js +1 -0
- package/.output/public/_nuxt/{YB_1Ta41.js → BD_Kvn-W.js} +1 -1
- package/.output/public/_nuxt/BGHnOYBU.js +1 -0
- package/.output/public/_nuxt/BH7IYjvW.js +1 -0
- package/.output/public/_nuxt/BIPWeF69.js +1 -0
- package/.output/public/_nuxt/BJDFO7_C.js +1 -0
- package/.output/public/_nuxt/BKIVPvZX.js +1 -0
- package/.output/public/_nuxt/{Xi2tawMN.js → BLmx8bSh.js} +1 -1
- package/.output/public/_nuxt/BN7gUcg9.js +1 -0
- package/.output/public/_nuxt/{DlfHMoPT.js → BPQ3VLAy.js} +1 -1
- package/.output/public/_nuxt/{BBGuKPBd.js → BR5kRUq4.js} +1 -1
- package/.output/public/_nuxt/BTd2ZN65.js +1 -0
- package/.output/public/_nuxt/BTifaqeh.js +1 -0
- package/.output/public/_nuxt/BUw7H-hv.js +1 -0
- package/.output/public/_nuxt/{DRprw4p4.js → BVQ-GDCI.js} +1 -1
- package/.output/public/_nuxt/BXphdu9w.js +2 -0
- package/.output/public/_nuxt/{BbQj0Z2C.js → BYV0-3_D.js} +1 -1
- package/.output/public/_nuxt/BYmSxWA_.js +1 -0
- package/.output/public/_nuxt/BZvkOJ9d.js +1 -0
- package/.output/public/_nuxt/BcVCzyr7.js +1 -0
- package/.output/public/_nuxt/BdRuKvw2.js +1 -0
- package/.output/public/_nuxt/Bdd5S2WL.js +1 -0
- package/.output/public/_nuxt/BeH2EWoN.js +1 -0
- package/.output/public/_nuxt/BhozkjGO.js +1 -0
- package/.output/public/_nuxt/Bl_Sz9PU.js +1 -0
- package/.output/public/_nuxt/Bmn6On1c.js +1 -0
- package/.output/public/_nuxt/{BIAuTxu3.js → Br6cN0cg.js} +1 -1
- package/.output/public/_nuxt/Bs8TB6Bu.js +1 -0
- package/.output/public/_nuxt/BtrNScOx.js +1 -0
- package/.output/public/_nuxt/{DcmvOc98.js → Bu1xs0Fv.js} +1 -1
- package/.output/public/_nuxt/BupMEc6X.js +6 -0
- package/.output/public/_nuxt/Bv_4Rxtq.js +1 -0
- package/.output/public/_nuxt/Bv_vOb-Y.js +14 -0
- package/.output/public/_nuxt/BvzEVeQv.js +1 -0
- package/.output/public/_nuxt/BwKAHWnp.js +1 -0
- package/.output/public/_nuxt/BxAss8Tj.js +1 -0
- package/.output/public/_nuxt/BxgE0vQu.js +1 -0
- package/.output/public/_nuxt/ByE1aAlg.js +2 -0
- package/.output/public/_nuxt/{COI20M4I.js → BzTr9Aqm.js} +1 -1
- package/.output/public/_nuxt/BzhaMbyl.js +1 -0
- package/.output/public/_nuxt/{CXu1NL6O.js → C-HG3fhB.js} +1 -1
- package/.output/public/_nuxt/C2zyO9uX.js +1 -0
- package/.output/public/_nuxt/C3Wv6jpd.js +1 -0
- package/.output/public/_nuxt/C4EeE6gA.js +1 -0
- package/.output/public/_nuxt/C4XpvUuq.js +1 -0
- package/.output/public/_nuxt/{C-Jbm3Hp.js → C4gqWexZ.js} +1 -1
- package/.output/public/_nuxt/C5BYcBs_.js +1 -0
- package/.output/public/_nuxt/{DTMYz4Jt.js → C5YyOfLZ.js} +1 -1
- package/.output/public/_nuxt/C7zT0LnQ.js +1 -0
- package/.output/public/_nuxt/C973_vs5.js +5 -0
- package/.output/public/_nuxt/C9dUb6Cb.js +1 -0
- package/.output/public/_nuxt/{DS1LvVMU.js → C9oPPf7i.js} +1 -1
- package/.output/public/_nuxt/CBIEPWAA.js +1 -0
- package/.output/public/_nuxt/CBVcjGJL.js +1 -0
- package/.output/public/_nuxt/CENFIVCM.js +1 -0
- package/.output/public/_nuxt/{D1uDOp7C.js → CFHQjOhq.js} +1 -1
- package/.output/public/_nuxt/{DKzvysjW.js → CH1njM8p.js} +1 -1
- package/.output/public/_nuxt/CJN4g-3R.js +1 -0
- package/.output/public/_nuxt/CLZrNe3w.js +1 -0
- package/.output/public/_nuxt/CMTm3GFP.js +1 -0
- package/.output/public/_nuxt/COcwbKMJ.js +1 -0
- package/.output/public/_nuxt/CPsHsqGU.js +1 -0
- package/.output/public/_nuxt/CTRkBkra.js +1 -0
- package/.output/public/_nuxt/{CcyOm34o.js → CVdnzihN.js} +1 -1
- package/.output/public/_nuxt/CW8IKDeL.js +1 -0
- package/.output/public/_nuxt/{pkIJ47B4.js → CXZktZb0.js} +1 -1
- package/.output/public/_nuxt/CYL3VlR9.js +1 -0
- package/.output/public/_nuxt/CYpkKp66.js +1 -0
- package/.output/public/_nuxt/CYsAdtH9.js +1 -0
- package/.output/public/_nuxt/{BUyGWigt.js → CZhp0h8q.js} +1 -1
- package/.output/public/_nuxt/CaehGOgh.js +1 -0
- package/.output/public/_nuxt/CemiMtCX.js +1 -0
- package/.output/public/_nuxt/{oTG82Wo1.js → CenWIFCC.js} +1 -1
- package/.output/public/_nuxt/{Dtc2v4kS.js → CgK0fS9t.js} +1 -1
- package/.output/public/_nuxt/{BtsDLbAf.js → Cl0AqbOI.js} +1 -1
- package/.output/public/_nuxt/{DUSGQflk.js → Cm3UrAx6.js} +1 -1
- package/.output/public/_nuxt/{BGHREFWD.js → CmIQRyeF.js} +1 -1
- package/.output/public/_nuxt/CmJE87KM.js +1 -0
- package/.output/public/_nuxt/Cn-bp-IR.js +1 -0
- package/.output/public/_nuxt/{f7oK2omx.js → Cn7AkR1O.js} +1 -1
- package/.output/public/_nuxt/CnhVSb6R.js +1 -0
- package/.output/public/_nuxt/{JhPuU2gP.js → CnnebwVN.js} +1 -1
- package/.output/public/_nuxt/CnsnAmq5.js +1 -0
- package/.output/public/_nuxt/CoDkCxhg.js +1 -0
- package/.output/public/_nuxt/CpGRan2R.js +1 -0
- package/.output/public/_nuxt/{B-hkwWGT.js → CpOuai2O.js} +1 -1
- package/.output/public/_nuxt/CqQg8Ldy.js +1 -0
- package/.output/public/_nuxt/Cs-GjQ8R.js +1 -0
- package/.output/public/_nuxt/CtbC3i8L.js +1 -0
- package/.output/public/_nuxt/{BDzgwa52.js → CufHLc7y.js} +1 -1
- package/.output/public/_nuxt/CvSiusML.js +1 -0
- package/.output/public/_nuxt/CwoSXNpI.js +1 -0
- package/.output/public/_nuxt/CxLEBnE3.js +1 -0
- package/.output/public/_nuxt/{DNrj_gVY.js → CxbxFI8M.js} +1 -1
- package/.output/public/_nuxt/CxoCegAs.js +13 -0
- package/.output/public/_nuxt/Cz-197mS.js +1 -0
- package/.output/public/_nuxt/Cz2AlsmD.js +1 -0
- package/.output/public/_nuxt/D-7HtdRe.js +12 -0
- package/.output/public/_nuxt/{NleAzG8P.js → D4_iv3hh.js} +1 -1
- package/.output/public/_nuxt/D53aC0YG.js +1 -0
- package/.output/public/_nuxt/{Dg5xB15N.js → D82vCrfD.js} +1 -1
- package/.output/public/_nuxt/D87Tk5Gz.js +1 -0
- package/.output/public/_nuxt/D8_7TLub.js +1 -0
- package/.output/public/_nuxt/D8l8udqQ.js +1 -0
- package/.output/public/_nuxt/DCK6hB22.js +1 -0
- package/.output/public/_nuxt/{Cb0HU5_O.js → DDvzSYfr.js} +1 -1
- package/.output/public/_nuxt/DEtIJe2u.js +1 -0
- package/.output/public/_nuxt/DEthMvLe.js +1 -0
- package/.output/public/_nuxt/DFWUc33u.js +1 -0
- package/.output/public/_nuxt/{5bLW0GMw.js → DGP4VlC8.js} +1 -1
- package/.output/public/_nuxt/DHJ62FKo.js +2 -0
- package/.output/public/_nuxt/{CnK8MTSM.js → DHQR4-dF.js} +1 -1
- package/.output/public/_nuxt/DJjDtW9f.js +1 -0
- package/.output/public/_nuxt/DKWXhhCy.js +1 -0
- package/.output/public/_nuxt/DPOp833l.js +1 -0
- package/.output/public/_nuxt/DQyhUUbL.js +1 -0
- package/.output/public/_nuxt/DRJZaHtK.js +1 -0
- package/.output/public/_nuxt/{DPcUKYIF.js → DRw_LuNl.js} +1 -1
- package/.output/public/_nuxt/DSDbyhpJ.js +1 -0
- package/.output/public/_nuxt/{B8ROHVmM.js → DSeZwD4N.js} +1 -1
- package/.output/public/_nuxt/{GAB5JH5K.js → DSpiceQe.js} +1 -1
- package/.output/public/_nuxt/DTPYfUid.js +1 -0
- package/.output/public/_nuxt/DUHba1vY.js +1 -0
- package/.output/public/_nuxt/DV7GczEv.js +1 -0
- package/.output/public/_nuxt/DXyfavJr.js +1 -0
- package/.output/public/_nuxt/DYE7WIF3.js +1 -0
- package/.output/public/_nuxt/DZf3V79B.js +1 -0
- package/.output/public/_nuxt/{BPzJO5Oe.js → DZu-aV2c.js} +1 -1
- package/.output/public/_nuxt/D_wY_uke.js +1 -0
- package/.output/public/_nuxt/Dahes9VH.js +1 -0
- package/.output/public/_nuxt/DdvHdmGh.js +1 -0
- package/.output/public/_nuxt/DfvKjH24.js +1 -0
- package/.output/public/_nuxt/DgsIRcX7.js +1 -0
- package/.output/public/_nuxt/{Cdx7mHEO.js → DhmSosst.js} +1 -1
- package/.output/public/_nuxt/{D32k8WzR.js → DjAJT7YJ.js} +1 -1
- package/.output/public/_nuxt/Djg8J2AC.js +1 -0
- package/.output/public/_nuxt/DkkrdwgN.js +1 -0
- package/.output/public/_nuxt/DnpKvmH_.js +1 -0
- package/.output/public/_nuxt/{CA7CTBwS.js → Dph4kLrZ.js} +1 -1
- package/.output/public/_nuxt/DqQDbK_p.js +1 -0
- package/.output/public/_nuxt/DrWe3t51.js +2 -0
- package/.output/public/_nuxt/DsG1SoRB.js +1 -0
- package/.output/public/_nuxt/Dspwwk_N.js +1 -0
- package/.output/public/_nuxt/DsumFeuD.js +1 -0
- package/.output/public/_nuxt/DtBrxin9.js +1 -0
- package/.output/public/_nuxt/{D7ScPSBf.js → DxNHbxmM.js} +1 -1
- package/.output/public/_nuxt/{CLvts2aQ.js → DxSwrfjg.js} +1 -1
- package/.output/public/_nuxt/{COEtLSDF.js → Dzze3sRP.js} +1 -1
- package/.output/public/_nuxt/EnN6XTXK.js +1 -0
- package/.output/public/_nuxt/Fcs-0n6A.js +1 -0
- package/.output/public/_nuxt/{B5ZR69Tn.js → FtFNcQmh.js} +1 -1
- package/.output/public/_nuxt/GXzlut8R.js +1 -0
- package/.output/public/_nuxt/{DkhsQLT2.js → GsRaNv29.js} +1 -1
- package/.output/public/_nuxt/IF9eRakj.js +1 -0
- package/.output/public/_nuxt/Lks7C8cK.js +3 -0
- package/.output/public/_nuxt/M0WOzN-S.js +269 -0
- package/.output/public/_nuxt/OuCcJFrZ.js +1 -0
- package/.output/public/_nuxt/{SecretValueField.DcyO8gGc.css → SecretValueField.Dy80RlGP.css} +1 -1
- package/.output/public/_nuxt/UD_auLNX.js +1 -0
- package/.output/public/_nuxt/Ve4PFQV2.js +1 -0
- package/.output/public/_nuxt/{CU27uY9n.js → W9tJ9s81.js} +1 -1
- package/.output/public/_nuxt/{DeWFVDHI.js → YqXBG_HV.js} +1 -1
- package/.output/public/_nuxt/ZpmLW6rw.js +1 -0
- package/.output/public/_nuxt/_H4v1dQx.js +1 -0
- package/.output/public/_nuxt/_snapshotId_.ChuSNeNY.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/d356de5d-6230-4e66-aba2-c48f455ae207.json +1 -0
- package/.output/public/_nuxt/builds/meta/ed797280-2bf0-44e6-a601-2ff2462bfbbc.json +1 -0
- package/.output/public/_nuxt/c6k-jVO-.js +1 -0
- package/.output/public/_nuxt/edge-router-BdPMCV6u.js +1 -0
- package/.output/public/_nuxt/{entry.dxugZJXl.css → entry.Bc0aTA0K.css} +1 -1
- package/.output/public/_nuxt/eo99z4R2.js +1 -0
- package/.output/public/_nuxt/error-404.iOXvqd5J.css +1 -0
- package/.output/public/_nuxt/error-500.D0BgXBui.css +1 -0
- package/.output/public/_nuxt/{DrZfEa88.js → fKv21gyL.js} +1 -1
- package/.output/public/_nuxt/graph-layout-B7wl80r3.js +1 -0
- package/.output/public/_nuxt/graph-resolver-E9RSC1Ga.js +180 -0
- package/.output/public/_nuxt/hAFXcJ2_.js +1 -0
- package/.output/public/_nuxt/{CGqH5EJj.js → hJgmCMqR.js} +1 -1
- package/.output/public/_nuxt/{BoKiGodi.js → k_qm7-4y.js} +1 -1
- package/.output/public/_nuxt/{IvJ92aGK.js → m17aaUwq.js} +1 -1
- package/.output/public/_nuxt/mWjccvbQ.js +1 -0
- package/.output/public/_nuxt/{BXY8tDGw.js → mjskCLCv.js} +1 -1
- package/.output/public/_nuxt/monaco-editor.DOXZIHvr.css +1 -0
- package/.output/public/_nuxt/n2N0HUVH.js +1 -0
- package/.output/public/_nuxt/oH_c3LbQ.js +1 -0
- package/.output/public/_nuxt/{BHrmToEH.js → qdsjHGoJ.js} +1 -1
- package/.output/public/_nuxt/{BbcW6ACK.js → rGO070M0.js} +1 -1
- package/.output/public/_nuxt/rZm6bMo-.js +1 -0
- package/.output/public/_nuxt/rscZxuQ2.js +1 -0
- package/.output/public/_nuxt/sB5TSp0H.js +18 -0
- package/.output/public/_nuxt/u5AG7uiY.js +1 -0
- package/.output/public/_nuxt/uYugtg8r.js +1 -0
- package/.output/public/_nuxt/vuetify.BzdWZaIq.css +1 -0
- package/.output/public/_nuxt/wCosSBIO.js +1 -0
- package/.output/public/_nuxt/{BMMyXqK5.js → wDzz0qaB.js} +1 -1
- package/.output/public/_nuxt/xnReCuE4.js +1 -0
- package/.output/public/_nuxt/y0GN4iGv.js +1 -0
- package/.output/public/_nuxt/yaml.worker-CYOhFCVP.js +395 -0
- package/.output/public/libavoid.wasm +0 -0
- package/.output/server/index.mjs +3216 -13095
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@babel/parser/lib/index.js +428 -441
- package/.output/server/node_modules/@babel/parser/package.json +6 -6
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.cjs +57 -0
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.mjs +4 -4
- package/.output/server/node_modules/@trpc/server/dist/codes-BfZsPdy-.cjs +222 -0
- package/.output/server/node_modules/@trpc/server/dist/{utils-CLZnJdb_.mjs → codes-DagpWZLc.mjs} +66 -66
- package/.output/server/node_modules/@trpc/server/dist/{contentTypeParsers-SN4WL9ze.mjs → contentTypeParsers-iAFF_pJG.cjs} +7 -2
- package/.output/server/node_modules/@trpc/server/dist/getErrorShape-MR4DZeb7.cjs +341 -0
- package/.output/server/node_modules/@trpc/server/dist/{getErrorShape-BH60iMC2.mjs → getErrorShape-vC8mUXJD.mjs} +3 -3
- package/.output/server/node_modules/@trpc/server/dist/http.cjs +14 -0
- package/.output/server/node_modules/@trpc/server/dist/index.cjs +22 -0
- package/.output/server/node_modules/@trpc/server/dist/index.mjs +4 -4
- package/.output/server/node_modules/@trpc/server/dist/{initTRPC-CB9uBez5.mjs → initTRPC-B1ggxyJl.mjs} +4 -4
- package/.output/server/node_modules/@trpc/server/dist/initTRPC-BXPPV9Tx.cjs +416 -0
- package/.output/server/node_modules/@trpc/server/dist/observable/index.cjs +13 -0
- package/.output/server/node_modules/@trpc/server/dist/observable-B1Nk6r1H.cjs +181 -0
- package/.output/server/node_modules/@trpc/server/dist/{observable-CUiPknO-.mjs → observable-BVzLuBs6.cjs} +42 -8
- package/.output/server/node_modules/@trpc/server/dist/{parseTRPCMessage-BlZeZ60t.mjs → parseTRPCMessage-7Ltmq-Fb.cjs} +14 -4
- package/.output/server/node_modules/@trpc/server/dist/resolveResponse-B0CCg8nq.cjs +2365 -0
- package/.output/server/node_modules/@trpc/server/dist/{resolveResponse-DngSgha6.mjs → resolveResponse-C5I6V_wc.mjs} +109 -63
- package/.output/server/node_modules/@trpc/server/dist/rpc.cjs +6 -0
- package/.output/server/node_modules/@trpc/server/dist/{tracked-Blz8XOf1.mjs → tracked-DiE3uR1B.mjs} +22 -11
- package/.output/server/node_modules/@trpc/server/dist/tracked-Dj_dpOJE.cjs +486 -0
- package/.output/server/node_modules/@trpc/server/package.json +17 -7
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +129 -107
- package/.output/server/node_modules/@vue/compiler-core/package.json +5 -5
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +54 -54
- package/.output/server/node_modules/@vue/compiler-dom/package.json +3 -3
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +35 -33
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +134 -53
- package/.output/server/node_modules/@vue/reactivity/package.json +2 -2
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +1900 -1771
- package/.output/server/node_modules/@vue/runtime-core/package.json +3 -3
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +147 -39
- package/.output/server/node_modules/@vue/runtime-dom/package.json +5 -5
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +8 -4
- package/.output/server/node_modules/@vue/server-renderer/package.json +4 -4
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +1 -1
- package/.output/server/node_modules/@vue/shared/package.json +1 -1
- package/.output/server/node_modules/copy-anything/dist/index.js +47 -31
- package/.output/server/node_modules/copy-anything/package.json +19 -72
- package/.output/server/node_modules/devalue/index.js +1 -0
- package/.output/server/node_modules/devalue/package.json +5 -2
- package/.output/server/node_modules/devalue/src/base64.js +46 -96
- package/.output/server/node_modules/devalue/src/constants.js +1 -0
- package/.output/server/node_modules/devalue/src/parse.js +82 -9
- package/.output/server/node_modules/devalue/src/stringify.js +108 -34
- package/.output/server/node_modules/devalue/src/uneval.js +207 -58
- package/.output/server/node_modules/devalue/src/utils.js +38 -8
- package/.output/server/node_modules/entities/{lib/decode_codepoint.js → dist/commonjs/decode-codepoint.js} +16 -15
- package/.output/server/node_modules/entities/{lib → dist/commonjs}/decode.js +200 -168
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/entities/package.json +99 -69
- package/.output/server/node_modules/hookable/dist/index.mjs +238 -271
- package/.output/server/node_modules/hookable/package.json +33 -29
- package/.output/server/node_modules/is-what/dist/getType.js +4 -0
- package/.output/server/node_modules/is-what/dist/index.js +43 -171
- package/.output/server/node_modules/is-what/dist/isAnyObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBigInt.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBlob.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBoolean.js +5 -0
- package/.output/server/node_modules/is-what/dist/isDate.js +5 -0
- package/.output/server/node_modules/is-what/dist/isEmptyArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isEmptyObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isEmptyString.js +4 -0
- package/.output/server/node_modules/is-what/dist/isError.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFile.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFullArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFullObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isFullString.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFunction.js +4 -0
- package/.output/server/node_modules/is-what/dist/isHexDecimal.js +12 -0
- package/.output/server/node_modules/is-what/dist/isInstanceOf.js +19 -0
- package/.output/server/node_modules/is-what/dist/isInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isIterable.js +16 -0
- package/.output/server/node_modules/is-what/dist/isMap.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNaNValue.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNegativeInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNegativeNumber.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNull.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNullOrUndefined.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNumber.js +9 -0
- package/.output/server/node_modules/is-what/dist/isObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isObjectLike.js +11 -0
- package/.output/server/node_modules/is-what/dist/isOneOf.js +15 -0
- package/.output/server/node_modules/is-what/dist/isPlainObject.js +11 -0
- package/.output/server/node_modules/is-what/dist/isPositiveInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isPositiveNumber.js +5 -0
- package/.output/server/node_modules/is-what/dist/isPrimitive.js +21 -0
- package/.output/server/node_modules/is-what/dist/isPromise.js +5 -0
- package/.output/server/node_modules/is-what/dist/isRegExp.js +5 -0
- package/.output/server/node_modules/is-what/dist/isSet.js +5 -0
- package/.output/server/node_modules/is-what/dist/isString.js +5 -0
- package/.output/server/node_modules/is-what/dist/isSymbol.js +5 -0
- package/.output/server/node_modules/is-what/dist/isType.js +20 -0
- package/.output/server/node_modules/is-what/dist/isUndefined.js +5 -0
- package/.output/server/node_modules/is-what/dist/isWeakMap.js +5 -0
- package/.output/server/node_modules/is-what/dist/isWeakSet.js +5 -0
- package/.output/server/node_modules/is-what/package.json +23 -88
- package/.output/server/node_modules/superjson/dist/index.js +9 -6
- package/.output/server/node_modules/superjson/dist/pathstringifier.js +13 -2
- package/.output/server/node_modules/superjson/dist/plainer.js +23 -11
- package/.output/server/node_modules/superjson/dist/transformer.js +4 -1
- package/.output/server/node_modules/superjson/package.json +5 -21
- package/.output/server/node_modules/trpc-bun-adapter/dist/index.js +406 -0
- package/.output/server/node_modules/trpc-bun-adapter/package.json +44 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +16 -9
- package/.output/server/node_modules/ufo/package.json +15 -14
- package/.output/server/node_modules/unhead/dist/plugins.mjs +4 -4
- package/.output/server/node_modules/unhead/dist/server.mjs +4 -6
- package/.output/server/node_modules/unhead/dist/shared/{unhead.BpRRHAhY.mjs → unhead.B5FWS6X0.mjs} +35 -22
- package/.output/server/node_modules/unhead/dist/shared/{unhead.DZbvapt-.mjs → unhead.CbpEuj3y.mjs} +3 -2
- package/.output/server/node_modules/unhead/dist/shared/{unhead.DH45uomy.mjs → unhead.Ct24BOby.mjs} +6 -4
- package/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
- package/.output/server/node_modules/unhead/dist/shared/{unhead.Djo8ep_Y.mjs → unhead.TxTMM7cM.mjs} +2 -2
- package/.output/server/node_modules/unhead/dist/utils.mjs +2 -2
- package/.output/server/node_modules/unhead/package.json +2 -2
- package/.output/server/node_modules/vue/dist/vue.cjs.js +1 -1
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +1 -1
- package/.output/server/node_modules/vue/package.json +7 -7
- package/.output/server/node_modules/zod/package.json +1 -1
- package/.output/server/node_modules/zod/v4/classic/checks.js +1 -1
- package/.output/server/node_modules/zod/v4/classic/external.js +3 -1
- package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/.output/server/node_modules/zod/v4/classic/schemas.js +121 -4
- package/.output/server/node_modules/zod/v4/core/api.js +157 -0
- package/.output/server/node_modules/zod/v4/core/checks.js +8 -2
- package/.output/server/node_modules/zod/v4/core/core.js +20 -11
- package/.output/server/node_modules/zod/v4/core/index.js +2 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/.output/server/node_modules/zod/v4/core/regexes.js +8 -2
- package/.output/server/node_modules/zod/v4/core/registries.js +3 -4
- package/.output/server/node_modules/zod/v4/core/schemas.js +204 -66
- package/.output/server/node_modules/zod/v4/core/to-json-schema.js +391 -869
- package/.output/server/node_modules/zod/v4/core/util.js +58 -8
- package/.output/server/node_modules/zod/v4/core/versions.js +2 -2
- package/.output/server/node_modules/zod/v4/locales/ar.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/az.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/be.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/bg.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ca.js +14 -25
- package/.output/server/node_modules/zod/v4/locales/cs.js +18 -42
- package/.output/server/node_modules/zod/v4/locales/da.js +23 -39
- package/.output/server/node_modules/zod/v4/locales/de.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/en.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/eo.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/es.js +42 -59
- package/.output/server/node_modules/zod/v4/locales/fa.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/fi.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/fr-CA.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/fr.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/he.js +175 -78
- package/.output/server/node_modules/zod/v4/locales/hu.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/hy.js +147 -0
- package/.output/server/node_modules/zod/v4/locales/id.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/index.js +2 -0
- package/.output/server/node_modules/zod/v4/locales/is.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/it.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ja.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ka.js +19 -32
- package/.output/server/node_modules/zod/v4/locales/km.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/ko.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/lt.js +27 -54
- package/.output/server/node_modules/zod/v4/locales/mk.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ms.js +15 -24
- package/.output/server/node_modules/zod/v4/locales/nl.js +25 -32
- package/.output/server/node_modules/zod/v4/locales/no.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ota.js +17 -25
- package/.output/server/node_modules/zod/v4/locales/pl.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ps.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/pt.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ru.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/sl.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/sv.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ta.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/th.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/tr.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/uk.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ur.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/uz.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/vi.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/yo.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/zh-CN.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/zh-TW.js +14 -24
- package/.output/server/package.json +22 -22
- package/package.json +20 -14
- package/.output/public/_nuxt/-oaD50UK.js +0 -1
- package/.output/public/_nuxt/0ekw3e2V.js +0 -1
- package/.output/public/_nuxt/1DNp92w6.js +0 -1
- package/.output/public/_nuxt/1f5tAgHw.js +0 -1
- package/.output/public/_nuxt/5ggY4uig.js +0 -1
- package/.output/public/_nuxt/6nHXG8SA.js +0 -1
- package/.output/public/_nuxt/9hmcqHPO.js +0 -1
- package/.output/public/_nuxt/BBxmzUt6.js +0 -1
- package/.output/public/_nuxt/BE2KfCdU.js +0 -1
- package/.output/public/_nuxt/BFNM2w_f.js +0 -1
- package/.output/public/_nuxt/BGLu70Yq.js +0 -1
- package/.output/public/_nuxt/BIuj43Wh.js +0 -1
- package/.output/public/_nuxt/BLsOQd1H.js +0 -280
- package/.output/public/_nuxt/BNGfscqk.js +0 -1
- package/.output/public/_nuxt/BQvybpQq.js +0 -1
- package/.output/public/_nuxt/BU7Cl-8B.js +0 -1
- package/.output/public/_nuxt/BUXOnL59.js +0 -1
- package/.output/public/_nuxt/Bbwybh3N.js +0 -2
- package/.output/public/_nuxt/BczD6j-v.js +0 -1
- package/.output/public/_nuxt/BepWV7mh.js +0 -1
- package/.output/public/_nuxt/Bh0qehhp.js +0 -1
- package/.output/public/_nuxt/Bl2oy6fF.js +0 -1
- package/.output/public/_nuxt/BmDdxTjo.js +0 -1
- package/.output/public/_nuxt/BqeRdtD4.js +0 -2
- package/.output/public/_nuxt/BvAqAH-y.js +0 -1
- package/.output/public/_nuxt/BxZD33h1.js +0 -1
- package/.output/public/_nuxt/C4zpeTvm.js +0 -1
- package/.output/public/_nuxt/C7Pw0Ztw.js +0 -1
- package/.output/public/_nuxt/C8-UwF3o.js +0 -1
- package/.output/public/_nuxt/CCd08HS_.js +0 -1
- package/.output/public/_nuxt/CEYFgC8B.js +0 -1
- package/.output/public/_nuxt/CHadp7IV.js +0 -1
- package/.output/public/_nuxt/CHh-QcGE.js +0 -1
- package/.output/public/_nuxt/CIUZ1G5V.js +0 -1
- package/.output/public/_nuxt/CJ6lOLXp.js +0 -1
- package/.output/public/_nuxt/CN9dMhDM.js +0 -1
- package/.output/public/_nuxt/CQ4fj8p0.js +0 -1
- package/.output/public/_nuxt/CTWiQX6C.js +0 -1
- package/.output/public/_nuxt/CUEJCptM.js +0 -1
- package/.output/public/_nuxt/CXxzV4dz.js +0 -1
- package/.output/public/_nuxt/CZlF05X6.js +0 -1
- package/.output/public/_nuxt/CatV_12G.js +0 -1
- package/.output/public/_nuxt/CeMkeBDb.js +0 -1
- package/.output/public/_nuxt/CelvVQyk.js +0 -1
- package/.output/public/_nuxt/CfV455SO.js +0 -1
- package/.output/public/_nuxt/CfeIJUat.js +0 -1
- package/.output/public/_nuxt/CfqrF6sE.js +0 -1
- package/.output/public/_nuxt/Cfs9EX91.js +0 -1
- package/.output/public/_nuxt/ChH_ziBE.js +0 -1
- package/.output/public/_nuxt/ChM1GEGa.js +0 -1
- package/.output/public/_nuxt/Cp2bjttb.js +0 -1
- package/.output/public/_nuxt/Cu8OsqJL.js +0 -1
- package/.output/public/_nuxt/CusJppg0.js +0 -1
- package/.output/public/_nuxt/Cv9koXgw.js +0 -1
- package/.output/public/_nuxt/CvELRi2k.js +0 -5
- package/.output/public/_nuxt/Cw6nGM9K.js +0 -1
- package/.output/public/_nuxt/CwUT5n6w.js +0 -1
- package/.output/public/_nuxt/D-AHKB2i.js +0 -6
- package/.output/public/_nuxt/D-kcn2fr.js +0 -1
- package/.output/public/_nuxt/D08WgyRC.js +0 -1
- package/.output/public/_nuxt/D1Jbgd7O.js +0 -13
- package/.output/public/_nuxt/D1ibY74j.js +0 -1
- package/.output/public/_nuxt/D22FLkUw.js +0 -1
- package/.output/public/_nuxt/D2CYqzqI.js +0 -1
- package/.output/public/_nuxt/D34EmFco.js +0 -1
- package/.output/public/_nuxt/D4OhWExI.js +0 -1
- package/.output/public/_nuxt/DDHikT5j.js +0 -1
- package/.output/public/_nuxt/DDTT3lYc.js +0 -1
- package/.output/public/_nuxt/DHLkt8Yr.js +0 -1
- package/.output/public/_nuxt/DHuTDtaT.js +0 -12
- package/.output/public/_nuxt/DKYwYmdq.js +0 -1
- package/.output/public/_nuxt/DMDPKkZ0.js +0 -1
- package/.output/public/_nuxt/DNEoBllO.js +0 -1
- package/.output/public/_nuxt/DRzH1pOL.js +0 -1
- package/.output/public/_nuxt/DSUF3NDE.js +0 -1
- package/.output/public/_nuxt/DTAwr92a.js +0 -1
- package/.output/public/_nuxt/DWmtspXK.js +0 -1
- package/.output/public/_nuxt/DXh9HyqW.js +0 -1
- package/.output/public/_nuxt/DXtl0MQI.js +0 -1
- package/.output/public/_nuxt/D_zCY0Xl.js +0 -1
- package/.output/public/_nuxt/DaZJpzOl.js +0 -1
- package/.output/public/_nuxt/Df68jz8_.js +0 -1
- package/.output/public/_nuxt/DhQfdAdO.js +0 -1
- package/.output/public/_nuxt/DiinP2Uv.js +0 -1
- package/.output/public/_nuxt/DljmTZ5-.js +0 -1
- package/.output/public/_nuxt/Dm4QKadl.js +0 -26
- package/.output/public/_nuxt/DmCK90gL.js +0 -1
- package/.output/public/_nuxt/Dn2_MT6a.js +0 -1
- package/.output/public/_nuxt/Don94nLk.js +0 -1
- package/.output/public/_nuxt/Dr8Zlu6v.js +0 -1
- package/.output/public/_nuxt/Drp5UXmf.js +0 -1
- package/.output/public/_nuxt/DtFoCuZo.js +0 -1
- package/.output/public/_nuxt/Dv7Oe6Be.js +0 -1
- package/.output/public/_nuxt/DxuitVdg.js +0 -2
- package/.output/public/_nuxt/DyJlTyXw.js +0 -1
- package/.output/public/_nuxt/Jep7L2Wt.js +0 -1
- package/.output/public/_nuxt/LUl67wzp.js +0 -1
- package/.output/public/_nuxt/M2rHlmBj.js +0 -1
- package/.output/public/_nuxt/N3RVRbLb.js +0 -1
- package/.output/public/_nuxt/NBseiqgx.js +0 -1
- package/.output/public/_nuxt/PoHY5YXO.js +0 -1
- package/.output/public/_nuxt/SdwduGaY.js +0 -1
- package/.output/public/_nuxt/SytC7lKg.js +0 -1
- package/.output/public/_nuxt/U3pqMjXV.js +0 -1
- package/.output/public/_nuxt/UInuXPgp.js +0 -1
- package/.output/public/_nuxt/YXI84j39.js +0 -2
- package/.output/public/_nuxt/ZZ6g6dXy.js +0 -2
- package/.output/public/_nuxt/builds/meta/033f259e-8ba9-4c82-8824-56febea80b7d.json +0 -1
- package/.output/public/_nuxt/dglhsJpM.js +0 -1
- package/.output/public/_nuxt/dwrHE3tM.js +0 -14
- package/.output/public/_nuxt/edge-router-yEORMNQw.js +0 -4
- package/.output/public/_nuxt/error-404.CttAF9VE.css +0 -1
- package/.output/public/_nuxt/error-500.DXXd6-x4.css +0 -1
- package/.output/public/_nuxt/ga9TZ2z5.js +0 -1
- package/.output/public/_nuxt/graph-layout-CFj469YF.js +0 -1
- package/.output/public/_nuxt/graph-resolver-eG1ZUsYn.js +0 -166
- package/.output/public/_nuxt/monaco-editor.D_J4ItrK.css +0 -1
- package/.output/public/_nuxt/ov4D99rA.js +0 -1
- package/.output/public/_nuxt/qYU5Tabh.js +0 -1
- package/.output/public/_nuxt/qliWkHmV.js +0 -1
- package/.output/public/_nuxt/uMbE6_td.js +0 -1
- package/.output/public/_nuxt/vuetify.BrkCt9t5.css +0 -5
- package/.output/public/_nuxt/yaml.worker-CQ6dFw39.js +0 -405
- package/.output/server/node_modules/@trpc/server/dist/adapters/ws.mjs +0 -15
- package/.output/server/node_modules/@trpc/server/dist/node-http-8dtdvMrE.mjs +0 -222
- package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import-D89CaGtL.mjs +0 -29
- package/.output/server/node_modules/@trpc/server/dist/ws-BR20IWki.mjs +0 -420
- package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +0 -9
- package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +0 -148
- package/.output/server/node_modules/ws/lib/buffer-util.js +0 -131
- package/.output/server/node_modules/ws/lib/constants.js +0 -18
- package/.output/server/node_modules/ws/lib/event-target.js +0 -292
- package/.output/server/node_modules/ws/lib/extension.js +0 -203
- package/.output/server/node_modules/ws/lib/limiter.js +0 -55
- package/.output/server/node_modules/ws/lib/permessage-deflate.js +0 -528
- package/.output/server/node_modules/ws/lib/receiver.js +0 -706
- package/.output/server/node_modules/ws/lib/sender.js +0 -602
- package/.output/server/node_modules/ws/lib/stream.js +0 -161
- package/.output/server/node_modules/ws/lib/subprotocol.js +0 -62
- package/.output/server/node_modules/ws/lib/validation.js +0 -152
- package/.output/server/node_modules/ws/lib/websocket-server.js +0 -550
- package/.output/server/node_modules/ws/lib/websocket.js +0 -1388
- package/.output/server/node_modules/ws/package.json +0 -69
- package/.output/server/node_modules/ws/wrapper.mjs +0 -8
- package/LICENSE +0 -21
- /package/.output/server/node_modules/@trpc/server/dist/{http-CWyjOa1l.mjs → http-DXy3XyhL.cjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.33
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -376,7 +376,144 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
function provide(key, value) {
|
|
380
|
+
if (currentInstance) {
|
|
381
|
+
let provides = currentInstance.provides;
|
|
382
|
+
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
383
|
+
if (parentProvides === provides) {
|
|
384
|
+
provides = currentInstance.provides = Object.create(parentProvides);
|
|
385
|
+
}
|
|
386
|
+
provides[key] = value;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
390
|
+
const instance = getCurrentInstance();
|
|
391
|
+
if (instance || currentApp) {
|
|
392
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
393
|
+
if (provides && key in provides) {
|
|
394
|
+
return provides[key];
|
|
395
|
+
} else if (arguments.length > 1) {
|
|
396
|
+
return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
397
|
+
} else ;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function hasInjectionContext() {
|
|
401
|
+
return !!(getCurrentInstance() || currentApp);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
|
|
405
|
+
const useSSRContext = () => {
|
|
406
|
+
{
|
|
407
|
+
const ctx = inject(ssrContextKey);
|
|
408
|
+
return ctx;
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
function watchEffect(effect, options) {
|
|
413
|
+
return doWatch(effect, null, options);
|
|
414
|
+
}
|
|
415
|
+
function watchPostEffect(effect, options) {
|
|
416
|
+
return doWatch(
|
|
417
|
+
effect,
|
|
418
|
+
null,
|
|
419
|
+
{ flush: "post" }
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
function watchSyncEffect(effect, options) {
|
|
423
|
+
return doWatch(
|
|
424
|
+
effect,
|
|
425
|
+
null,
|
|
426
|
+
{ flush: "sync" }
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
function watch(source, cb, options) {
|
|
430
|
+
return doWatch(source, cb, options);
|
|
431
|
+
}
|
|
432
|
+
function doWatch(source, cb, options = shared.EMPTY_OBJ) {
|
|
433
|
+
const { immediate, deep, flush, once } = options;
|
|
434
|
+
const baseWatchOptions = shared.extend({}, options);
|
|
435
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
436
|
+
let ssrCleanup;
|
|
437
|
+
if (isInSSRComponentSetup) {
|
|
438
|
+
if (flush === "sync") {
|
|
439
|
+
const ctx = useSSRContext();
|
|
440
|
+
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
441
|
+
} else if (!runsImmediately) {
|
|
442
|
+
const watchStopHandle = () => {
|
|
443
|
+
};
|
|
444
|
+
watchStopHandle.stop = shared.NOOP;
|
|
445
|
+
watchStopHandle.resume = shared.NOOP;
|
|
446
|
+
watchStopHandle.pause = shared.NOOP;
|
|
447
|
+
return watchStopHandle;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
const instance = currentInstance;
|
|
451
|
+
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
452
|
+
let isPre = false;
|
|
453
|
+
if (flush === "post") {
|
|
454
|
+
baseWatchOptions.scheduler = (job) => {
|
|
455
|
+
queuePostRenderEffect(job, instance && instance.suspense);
|
|
456
|
+
};
|
|
457
|
+
} else if (flush !== "sync") {
|
|
458
|
+
isPre = true;
|
|
459
|
+
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
460
|
+
if (isFirstRun) {
|
|
461
|
+
job();
|
|
462
|
+
} else {
|
|
463
|
+
queueJob(job);
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
baseWatchOptions.augmentJob = (job) => {
|
|
468
|
+
if (cb) {
|
|
469
|
+
job.flags |= 4;
|
|
470
|
+
}
|
|
471
|
+
if (isPre) {
|
|
472
|
+
job.flags |= 2;
|
|
473
|
+
if (instance) {
|
|
474
|
+
job.id = instance.uid;
|
|
475
|
+
job.i = instance;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
const watchHandle = reactivity.watch(source, cb, baseWatchOptions);
|
|
480
|
+
if (isInSSRComponentSetup) {
|
|
481
|
+
if (ssrCleanup) {
|
|
482
|
+
ssrCleanup.push(watchHandle);
|
|
483
|
+
} else if (runsImmediately) {
|
|
484
|
+
watchHandle();
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
return watchHandle;
|
|
488
|
+
}
|
|
489
|
+
function instanceWatch(source, value, options) {
|
|
490
|
+
const publicThis = this.proxy;
|
|
491
|
+
const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
492
|
+
let cb;
|
|
493
|
+
if (shared.isFunction(value)) {
|
|
494
|
+
cb = value;
|
|
495
|
+
} else {
|
|
496
|
+
cb = value.handler;
|
|
497
|
+
options = value;
|
|
498
|
+
}
|
|
499
|
+
const reset = setCurrentInstance(this);
|
|
500
|
+
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
501
|
+
reset();
|
|
502
|
+
return res;
|
|
503
|
+
}
|
|
504
|
+
function createPathGetter(ctx, path) {
|
|
505
|
+
const segments = path.split(".");
|
|
506
|
+
return () => {
|
|
507
|
+
let cur = ctx;
|
|
508
|
+
for (let i = 0; i < segments.length && cur; i++) {
|
|
509
|
+
cur = cur[segments[i]];
|
|
510
|
+
}
|
|
511
|
+
return cur;
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
516
|
+
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
380
517
|
const isTeleport = (type) => type.__isTeleport;
|
|
381
518
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
382
519
|
const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
|
|
@@ -403,81 +540,82 @@ const TeleportImpl = {
|
|
|
403
540
|
mc: mountChildren,
|
|
404
541
|
pc: patchChildren,
|
|
405
542
|
pbc: patchBlockChildren,
|
|
406
|
-
o: { insert, querySelector, createText, createComment }
|
|
543
|
+
o: { insert, querySelector, createText, createComment, parentNode }
|
|
407
544
|
} = internals;
|
|
408
545
|
const disabled = isTeleportDisabled(n2.props);
|
|
409
|
-
let {
|
|
546
|
+
let { dynamicChildren } = n2;
|
|
547
|
+
const mount = (vnode, container2, anchor2) => {
|
|
548
|
+
if (vnode.shapeFlag & 16) {
|
|
549
|
+
mountChildren(
|
|
550
|
+
vnode.children,
|
|
551
|
+
container2,
|
|
552
|
+
anchor2,
|
|
553
|
+
parentComponent,
|
|
554
|
+
parentSuspense,
|
|
555
|
+
namespace,
|
|
556
|
+
slotScopeIds,
|
|
557
|
+
optimized
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
const mountToTarget = (vnode = n2) => {
|
|
562
|
+
const disabled2 = isTeleportDisabled(vnode.props);
|
|
563
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
564
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
565
|
+
if (target) {
|
|
566
|
+
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
567
|
+
namespace = "svg";
|
|
568
|
+
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
569
|
+
namespace = "mathml";
|
|
570
|
+
}
|
|
571
|
+
if (parentComponent && parentComponent.isCE) {
|
|
572
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
573
|
+
}
|
|
574
|
+
if (!disabled2) {
|
|
575
|
+
mount(vnode, target, targetAnchor);
|
|
576
|
+
updateCssVars(vnode, false);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
const queuePendingMount = (vnode) => {
|
|
581
|
+
const mountJob = () => {
|
|
582
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
583
|
+
pendingMounts.delete(vnode);
|
|
584
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
585
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
586
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
587
|
+
updateCssVars(vnode, true);
|
|
588
|
+
}
|
|
589
|
+
mountToTarget(vnode);
|
|
590
|
+
};
|
|
591
|
+
pendingMounts.set(vnode, mountJob);
|
|
592
|
+
queuePostRenderEffect(mountJob, parentSuspense);
|
|
593
|
+
};
|
|
410
594
|
if (n1 == null) {
|
|
411
595
|
const placeholder = n2.el = createText("");
|
|
412
596
|
const mainAnchor = n2.anchor = createText("");
|
|
413
597
|
insert(placeholder, container, anchor);
|
|
414
598
|
insert(mainAnchor, container, anchor);
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
container2,
|
|
420
|
-
anchor2,
|
|
421
|
-
parentComponent,
|
|
422
|
-
parentSuspense,
|
|
423
|
-
namespace,
|
|
424
|
-
slotScopeIds,
|
|
425
|
-
optimized
|
|
426
|
-
);
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
const mountToTarget = () => {
|
|
430
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
431
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
432
|
-
if (target) {
|
|
433
|
-
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
434
|
-
namespace = "svg";
|
|
435
|
-
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
436
|
-
namespace = "mathml";
|
|
437
|
-
}
|
|
438
|
-
if (parentComponent && parentComponent.isCE) {
|
|
439
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
440
|
-
}
|
|
441
|
-
if (!disabled) {
|
|
442
|
-
mount(target, targetAnchor);
|
|
443
|
-
updateCssVars(n2, false);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
};
|
|
599
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
600
|
+
queuePendingMount(n2);
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
447
603
|
if (disabled) {
|
|
448
|
-
mount(container, mainAnchor);
|
|
604
|
+
mount(n2, container, mainAnchor);
|
|
449
605
|
updateCssVars(n2, true);
|
|
450
606
|
}
|
|
451
|
-
|
|
452
|
-
n2.el.__isMounted = false;
|
|
453
|
-
queuePostRenderEffect(() => {
|
|
454
|
-
mountToTarget();
|
|
455
|
-
delete n2.el.__isMounted;
|
|
456
|
-
}, parentSuspense);
|
|
457
|
-
} else {
|
|
458
|
-
mountToTarget();
|
|
459
|
-
}
|
|
607
|
+
mountToTarget();
|
|
460
608
|
} else {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
parentComponent,
|
|
469
|
-
parentSuspense,
|
|
470
|
-
namespace,
|
|
471
|
-
slotScopeIds,
|
|
472
|
-
optimized,
|
|
473
|
-
internals
|
|
474
|
-
);
|
|
475
|
-
}, parentSuspense);
|
|
609
|
+
n2.el = n1.el;
|
|
610
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
611
|
+
const pendingMount = pendingMounts.get(n1);
|
|
612
|
+
if (pendingMount) {
|
|
613
|
+
pendingMount.flags |= 8;
|
|
614
|
+
pendingMounts.delete(n1);
|
|
615
|
+
queuePendingMount(n2);
|
|
476
616
|
return;
|
|
477
617
|
}
|
|
478
|
-
n2.el = n1.el;
|
|
479
618
|
n2.targetStart = n1.targetStart;
|
|
480
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
481
619
|
const target = n2.target = n1.target;
|
|
482
620
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
483
621
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
@@ -564,13 +702,19 @@ const TeleportImpl = {
|
|
|
564
702
|
target,
|
|
565
703
|
props
|
|
566
704
|
} = vnode;
|
|
705
|
+
let shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
706
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
707
|
+
if (pendingMount) {
|
|
708
|
+
pendingMount.flags |= 8;
|
|
709
|
+
pendingMounts.delete(vnode);
|
|
710
|
+
shouldRemove = false;
|
|
711
|
+
}
|
|
567
712
|
if (target) {
|
|
568
713
|
hostRemove(targetStart);
|
|
569
714
|
hostRemove(targetAnchor);
|
|
570
715
|
}
|
|
571
716
|
doRemove && hostRemove(anchor);
|
|
572
717
|
if (shapeFlag & 16) {
|
|
573
|
-
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
574
718
|
for (let i = 0; i < children.length; i++) {
|
|
575
719
|
const child = children[i];
|
|
576
720
|
unmount(
|
|
@@ -595,7 +739,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
595
739
|
if (isReorder) {
|
|
596
740
|
insert(el, container, parentAnchor);
|
|
597
741
|
}
|
|
598
|
-
if (!isReorder || isTeleportDisabled(props)) {
|
|
742
|
+
if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
|
|
599
743
|
if (shapeFlag & 16) {
|
|
600
744
|
for (let i = 0; i < children.length; i++) {
|
|
601
745
|
move(
|
|
@@ -614,7 +758,22 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
614
758
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
615
759
|
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
616
760
|
}, hydrateChildren) {
|
|
617
|
-
function
|
|
761
|
+
function hydrateAnchor(target2, targetNode) {
|
|
762
|
+
let targetAnchor = targetNode;
|
|
763
|
+
while (targetAnchor) {
|
|
764
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
765
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
766
|
+
vnode.targetStart = targetAnchor;
|
|
767
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
768
|
+
vnode.targetAnchor = targetAnchor;
|
|
769
|
+
target2._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
770
|
+
break;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
function hydrateDisabledTeleport(node2, vnode2) {
|
|
618
777
|
vnode2.anchor = hydrateChildren(
|
|
619
778
|
nextSibling(node2),
|
|
620
779
|
vnode2,
|
|
@@ -624,8 +783,6 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
624
783
|
slotScopeIds,
|
|
625
784
|
optimized
|
|
626
785
|
);
|
|
627
|
-
vnode2.targetStart = targetStart;
|
|
628
|
-
vnode2.targetAnchor = targetAnchor;
|
|
629
786
|
}
|
|
630
787
|
const target = vnode.target = resolveTarget(
|
|
631
788
|
vnode.props,
|
|
@@ -636,27 +793,22 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
636
793
|
const targetNode = target._lpa || target.firstChild;
|
|
637
794
|
if (vnode.shapeFlag & 16) {
|
|
638
795
|
if (disabled) {
|
|
639
|
-
hydrateDisabledTeleport(
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
796
|
+
hydrateDisabledTeleport(node, vnode);
|
|
797
|
+
hydrateAnchor(target, targetNode);
|
|
798
|
+
if (!vnode.targetAnchor) {
|
|
799
|
+
prepareAnchor(
|
|
800
|
+
target,
|
|
801
|
+
vnode,
|
|
802
|
+
createText,
|
|
803
|
+
insert,
|
|
804
|
+
// if target is the same as the main view, insert anchors before current node
|
|
805
|
+
// to avoid hydrating mismatch
|
|
806
|
+
parentNode(node) === target ? node : null
|
|
807
|
+
);
|
|
808
|
+
}
|
|
645
809
|
} else {
|
|
646
810
|
vnode.anchor = nextSibling(node);
|
|
647
|
-
|
|
648
|
-
while (targetAnchor) {
|
|
649
|
-
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
650
|
-
if (targetAnchor.data === "teleport start anchor") {
|
|
651
|
-
vnode.targetStart = targetAnchor;
|
|
652
|
-
} else if (targetAnchor.data === "teleport anchor") {
|
|
653
|
-
vnode.targetAnchor = targetAnchor;
|
|
654
|
-
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
655
|
-
break;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
targetAnchor = nextSibling(targetAnchor);
|
|
659
|
-
}
|
|
811
|
+
hydrateAnchor(target, targetNode);
|
|
660
812
|
if (!vnode.targetAnchor) {
|
|
661
813
|
prepareAnchor(target, vnode, createText, insert);
|
|
662
814
|
}
|
|
@@ -674,7 +826,9 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
674
826
|
updateCssVars(vnode, disabled);
|
|
675
827
|
} else if (disabled) {
|
|
676
828
|
if (vnode.shapeFlag & 16) {
|
|
677
|
-
hydrateDisabledTeleport(node, vnode
|
|
829
|
+
hydrateDisabledTeleport(node, vnode);
|
|
830
|
+
vnode.targetStart = node;
|
|
831
|
+
vnode.targetAnchor = nextSibling(node);
|
|
678
832
|
}
|
|
679
833
|
}
|
|
680
834
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
@@ -698,19 +852,19 @@ function updateCssVars(vnode, isDisabled) {
|
|
|
698
852
|
ctx.ut();
|
|
699
853
|
}
|
|
700
854
|
}
|
|
701
|
-
function prepareAnchor(target, vnode, createText, insert) {
|
|
855
|
+
function prepareAnchor(target, vnode, createText, insert, anchor = null) {
|
|
702
856
|
const targetStart = vnode.targetStart = createText("");
|
|
703
857
|
const targetAnchor = vnode.targetAnchor = createText("");
|
|
704
858
|
targetStart[TeleportEndKey] = targetAnchor;
|
|
705
859
|
if (target) {
|
|
706
|
-
insert(targetStart, target);
|
|
707
|
-
insert(targetAnchor, target);
|
|
860
|
+
insert(targetStart, target, anchor);
|
|
861
|
+
insert(targetAnchor, target, anchor);
|
|
708
862
|
}
|
|
709
863
|
return targetAnchor;
|
|
710
864
|
}
|
|
711
865
|
|
|
712
|
-
const leaveCbKey = Symbol("_leaveCb");
|
|
713
|
-
const enterCbKey = Symbol("_enterCb");
|
|
866
|
+
const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
|
|
867
|
+
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
714
868
|
function useTransitionState() {
|
|
715
869
|
const state = {
|
|
716
870
|
isMounted: false,
|
|
@@ -759,10 +913,14 @@ const BaseTransitionImpl = {
|
|
|
759
913
|
const state = useTransitionState();
|
|
760
914
|
return () => {
|
|
761
915
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
762
|
-
|
|
916
|
+
const child = children && children.length ? findNonCommentChild(children) : (
|
|
917
|
+
// Keep explicit default-slot conditionals on the same transition path
|
|
918
|
+
// as regular v-if branches, which render a comment placeholder.
|
|
919
|
+
instance.subTree ? createCommentVNode() : void 0
|
|
920
|
+
);
|
|
921
|
+
if (!child) {
|
|
763
922
|
return;
|
|
764
923
|
}
|
|
765
|
-
const child = findNonCommentChild(children);
|
|
766
924
|
const rawProps = reactivity.toRaw(props);
|
|
767
925
|
const { mode } = rawProps;
|
|
768
926
|
if (state.isLeaving) {
|
|
@@ -916,6 +1074,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
916
1074
|
callHook(hook, [el]);
|
|
917
1075
|
},
|
|
918
1076
|
enter(el) {
|
|
1077
|
+
if (leavingVNodesCache[key] === vnode) return;
|
|
919
1078
|
let hook = onEnter;
|
|
920
1079
|
let afterHook = onAfterEnter;
|
|
921
1080
|
let cancelHook = onEnterCancelled;
|
|
@@ -929,7 +1088,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
929
1088
|
}
|
|
930
1089
|
}
|
|
931
1090
|
let called = false;
|
|
932
|
-
|
|
1091
|
+
el[enterCbKey] = (cancelled) => {
|
|
933
1092
|
if (called) return;
|
|
934
1093
|
called = true;
|
|
935
1094
|
if (cancelled) {
|
|
@@ -942,6 +1101,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
942
1101
|
}
|
|
943
1102
|
el[enterCbKey] = void 0;
|
|
944
1103
|
};
|
|
1104
|
+
const done = el[enterCbKey].bind(null, false);
|
|
945
1105
|
if (hook) {
|
|
946
1106
|
callAsyncHook(hook, [el, done]);
|
|
947
1107
|
} else {
|
|
@@ -961,7 +1121,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
961
1121
|
}
|
|
962
1122
|
callHook(onBeforeLeave, [el]);
|
|
963
1123
|
let called = false;
|
|
964
|
-
|
|
1124
|
+
el[leaveCbKey] = (cancelled) => {
|
|
965
1125
|
if (called) return;
|
|
966
1126
|
called = true;
|
|
967
1127
|
remove();
|
|
@@ -975,6 +1135,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
975
1135
|
delete leavingVNodesCache[key2];
|
|
976
1136
|
}
|
|
977
1137
|
};
|
|
1138
|
+
const done = el[leaveCbKey].bind(null, false);
|
|
978
1139
|
leavingVNodesCache[key2] = vnode;
|
|
979
1140
|
if (onLeave) {
|
|
980
1141
|
callAsyncHook(onLeave, [el, done]);
|
|
@@ -1093,6 +1254,10 @@ function useTemplateRef(key) {
|
|
|
1093
1254
|
const ret = r;
|
|
1094
1255
|
return ret;
|
|
1095
1256
|
}
|
|
1257
|
+
function isTemplateRefKey(refs, key) {
|
|
1258
|
+
let desc;
|
|
1259
|
+
return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
|
|
1260
|
+
}
|
|
1096
1261
|
|
|
1097
1262
|
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
1098
1263
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
@@ -1122,8 +1287,17 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1122
1287
|
const setupState = owner.setupState;
|
|
1123
1288
|
const rawSetupState = reactivity.toRaw(setupState);
|
|
1124
1289
|
const canSetSetupRef = setupState === shared.EMPTY_OBJ ? shared.NO : (key) => {
|
|
1290
|
+
if (isTemplateRefKey(refs, key)) {
|
|
1291
|
+
return false;
|
|
1292
|
+
}
|
|
1125
1293
|
return shared.hasOwn(rawSetupState, key);
|
|
1126
1294
|
};
|
|
1295
|
+
const canSetRef = (ref2, key) => {
|
|
1296
|
+
if (key && isTemplateRefKey(refs, key)) {
|
|
1297
|
+
return false;
|
|
1298
|
+
}
|
|
1299
|
+
return true;
|
|
1300
|
+
};
|
|
1127
1301
|
if (oldRef != null && oldRef !== ref) {
|
|
1128
1302
|
invalidatePendingSetRef(oldRawRef);
|
|
1129
1303
|
if (shared.isString(oldRef)) {
|
|
@@ -1132,10 +1306,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1132
1306
|
setupState[oldRef] = null;
|
|
1133
1307
|
}
|
|
1134
1308
|
} else if (reactivity.isRef(oldRef)) {
|
|
1135
|
-
|
|
1309
|
+
const oldRawRefAtom = oldRawRef;
|
|
1310
|
+
if (canSetRef(oldRef, oldRawRefAtom.k)) {
|
|
1136
1311
|
oldRef.value = null;
|
|
1137
1312
|
}
|
|
1138
|
-
const oldRawRefAtom = oldRawRef;
|
|
1139
1313
|
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
1140
1314
|
}
|
|
1141
1315
|
}
|
|
@@ -1147,7 +1321,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1147
1321
|
if (_isString || _isRef) {
|
|
1148
1322
|
const doSet = () => {
|
|
1149
1323
|
if (rawRef.f) {
|
|
1150
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value ;
|
|
1324
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef() || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
1151
1325
|
if (isUnmount) {
|
|
1152
1326
|
shared.isArray(existing) && shared.remove(existing, refValue);
|
|
1153
1327
|
} else {
|
|
@@ -1159,7 +1333,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1159
1333
|
}
|
|
1160
1334
|
} else {
|
|
1161
1335
|
const newVal = [refValue];
|
|
1162
|
-
{
|
|
1336
|
+
if (canSetRef(ref, rawRef.k)) {
|
|
1163
1337
|
ref.value = newVal;
|
|
1164
1338
|
}
|
|
1165
1339
|
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
@@ -1174,7 +1348,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1174
1348
|
setupState[ref] = value;
|
|
1175
1349
|
}
|
|
1176
1350
|
} else if (_isRef) {
|
|
1177
|
-
{
|
|
1351
|
+
if (canSetRef(ref, rawRef.k)) {
|
|
1178
1352
|
ref.value = value;
|
|
1179
1353
|
}
|
|
1180
1354
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
@@ -1456,7 +1630,9 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1456
1630
|
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
1457
1631
|
clientText = clientText.slice(1);
|
|
1458
1632
|
}
|
|
1459
|
-
|
|
1633
|
+
const { textContent } = el;
|
|
1634
|
+
if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
|
|
1635
|
+
textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
|
|
1460
1636
|
if (!isMismatchAllowed(el, 0 /* TEXT */)) {
|
|
1461
1637
|
logMismatchError();
|
|
1462
1638
|
}
|
|
@@ -1468,7 +1644,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1468
1644
|
const isCustomElement = el.tagName.includes("-");
|
|
1469
1645
|
for (const key in props) {
|
|
1470
1646
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
1471
|
-
key[0] === "." || isCustomElement) {
|
|
1647
|
+
key[0] === "." || isCustomElement && !shared.isReservedProp(key)) {
|
|
1472
1648
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
1473
1649
|
}
|
|
1474
1650
|
}
|
|
@@ -1902,7 +2078,10 @@ function defineAsyncComponent(source) {
|
|
|
1902
2078
|
error: error.value
|
|
1903
2079
|
});
|
|
1904
2080
|
} else if (loadingComponent && !delayed.value) {
|
|
1905
|
-
return
|
|
2081
|
+
return createInnerComp(
|
|
2082
|
+
loadingComponent,
|
|
2083
|
+
instance
|
|
2084
|
+
);
|
|
1906
2085
|
}
|
|
1907
2086
|
};
|
|
1908
2087
|
}
|
|
@@ -1998,7 +2177,9 @@ const KeepAliveImpl = {
|
|
|
1998
2177
|
}
|
|
1999
2178
|
function pruneCache(filter) {
|
|
2000
2179
|
cache.forEach((vnode, key) => {
|
|
2001
|
-
const name = getComponentName(
|
|
2180
|
+
const name = getComponentName(
|
|
2181
|
+
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
|
|
2182
|
+
);
|
|
2002
2183
|
if (name && !filter(name)) {
|
|
2003
2184
|
pruneCacheEntry(key);
|
|
2004
2185
|
}
|
|
@@ -2217,7 +2398,7 @@ const DIRECTIVES = "directives";
|
|
|
2217
2398
|
function resolveComponent(name, maybeSelfReference) {
|
|
2218
2399
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
2219
2400
|
}
|
|
2220
|
-
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2401
|
+
const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
|
|
2221
2402
|
function resolveDynamicComponent(component) {
|
|
2222
2403
|
if (shared.isString(component)) {
|
|
2223
2404
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -2280,9 +2461,11 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2280
2461
|
);
|
|
2281
2462
|
}
|
|
2282
2463
|
} else if (typeof source === "number") {
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2464
|
+
{
|
|
2465
|
+
ret = new Array(source);
|
|
2466
|
+
for (let i = 0; i < source; i++) {
|
|
2467
|
+
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
2468
|
+
}
|
|
2286
2469
|
}
|
|
2287
2470
|
} else if (shared.isObject(source)) {
|
|
2288
2471
|
if (source[Symbol.iterator]) {
|
|
@@ -2415,7 +2598,6 @@ const PublicInstanceProxyHandlers = {
|
|
|
2415
2598
|
return true;
|
|
2416
2599
|
}
|
|
2417
2600
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
2418
|
-
let normalizedProps;
|
|
2419
2601
|
if (key[0] !== "$") {
|
|
2420
2602
|
const n = accessCache[key];
|
|
2421
2603
|
if (n !== void 0) {
|
|
@@ -2435,11 +2617,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
2435
2617
|
} else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
|
|
2436
2618
|
accessCache[key] = 2 /* DATA */;
|
|
2437
2619
|
return data[key];
|
|
2438
|
-
} else if (
|
|
2439
|
-
// only cache other properties when instance has declared (thus stable)
|
|
2440
|
-
// props
|
|
2441
|
-
(normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key)
|
|
2442
|
-
) {
|
|
2620
|
+
} else if (shared.hasOwn(props, key)) {
|
|
2443
2621
|
accessCache[key] = 3 /* PROPS */;
|
|
2444
2622
|
return props[key];
|
|
2445
2623
|
} else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
|
|
@@ -2494,10 +2672,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
2494
2672
|
return true;
|
|
2495
2673
|
},
|
|
2496
2674
|
has({
|
|
2497
|
-
_: { data, setupState, accessCache, ctx, appContext,
|
|
2675
|
+
_: { data, setupState, accessCache, ctx, appContext, props, type }
|
|
2498
2676
|
}, key) {
|
|
2499
|
-
let
|
|
2500
|
-
return !!(accessCache[key] || data !== shared.EMPTY_OBJ && key[0] !== "$" && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) ||
|
|
2677
|
+
let cssModules;
|
|
2678
|
+
return !!(accessCache[key] || data !== shared.EMPTY_OBJ && key[0] !== "$" && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || shared.hasOwn(props, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
2501
2679
|
},
|
|
2502
2680
|
defineProperty(target, key, descriptor) {
|
|
2503
2681
|
if (descriptor.get != null) {
|
|
@@ -2594,15 +2772,39 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
2594
2772
|
}
|
|
2595
2773
|
function withAsyncContext(getAwaitable) {
|
|
2596
2774
|
const ctx = getCurrentInstance();
|
|
2775
|
+
const inSSRSetup = isInSSRComponentSetup;
|
|
2597
2776
|
let awaitable = getAwaitable();
|
|
2598
2777
|
unsetCurrentInstance();
|
|
2778
|
+
if (inSSRSetup) {
|
|
2779
|
+
setInSSRSetupState(false);
|
|
2780
|
+
}
|
|
2781
|
+
const restore = () => {
|
|
2782
|
+
setCurrentInstance(ctx);
|
|
2783
|
+
if (inSSRSetup) {
|
|
2784
|
+
setInSSRSetupState(true);
|
|
2785
|
+
}
|
|
2786
|
+
};
|
|
2787
|
+
const cleanup = () => {
|
|
2788
|
+
if (getCurrentInstance() !== ctx) ctx.scope.off();
|
|
2789
|
+
unsetCurrentInstance();
|
|
2790
|
+
if (inSSRSetup) {
|
|
2791
|
+
setInSSRSetupState(false);
|
|
2792
|
+
}
|
|
2793
|
+
};
|
|
2599
2794
|
if (shared.isPromise(awaitable)) {
|
|
2600
2795
|
awaitable = awaitable.catch((e) => {
|
|
2601
|
-
|
|
2796
|
+
restore();
|
|
2797
|
+
Promise.resolve().then(() => Promise.resolve().then(cleanup));
|
|
2602
2798
|
throw e;
|
|
2603
2799
|
});
|
|
2604
2800
|
}
|
|
2605
|
-
return [
|
|
2801
|
+
return [
|
|
2802
|
+
awaitable,
|
|
2803
|
+
() => {
|
|
2804
|
+
restore();
|
|
2805
|
+
Promise.resolve().then(cleanup);
|
|
2806
|
+
}
|
|
2807
|
+
];
|
|
2606
2808
|
}
|
|
2607
2809
|
|
|
2608
2810
|
let shouldCacheAccess = true;
|
|
@@ -3075,984 +3277,1350 @@ function createAppAPI(render, hydrate) {
|
|
|
3075
3277
|
}
|
|
3076
3278
|
let currentApp = null;
|
|
3077
3279
|
|
|
3078
|
-
function
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
const internalObjectProto = {};
|
|
3104
|
-
const createInternalObject = () => Object.create(internalObjectProto);
|
|
3105
|
-
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
3106
|
-
|
|
3107
|
-
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
3108
|
-
const props = {};
|
|
3109
|
-
const attrs = createInternalObject();
|
|
3110
|
-
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
3111
|
-
setFullProps(instance, rawProps, props, attrs);
|
|
3112
|
-
for (const key in instance.propsOptions[0]) {
|
|
3113
|
-
if (!(key in props)) {
|
|
3114
|
-
props[key] = void 0;
|
|
3115
|
-
}
|
|
3116
|
-
}
|
|
3117
|
-
if (isStateful) {
|
|
3118
|
-
instance.props = isSSR ? props : reactivity.shallowReactive(props);
|
|
3119
|
-
} else {
|
|
3120
|
-
if (!instance.type.props) {
|
|
3121
|
-
instance.props = attrs;
|
|
3122
|
-
} else {
|
|
3123
|
-
instance.props = props;
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
instance.attrs = attrs;
|
|
3127
|
-
}
|
|
3128
|
-
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
3129
|
-
const {
|
|
3130
|
-
props,
|
|
3131
|
-
attrs,
|
|
3132
|
-
vnode: { patchFlag }
|
|
3133
|
-
} = instance;
|
|
3134
|
-
const rawCurrentProps = reactivity.toRaw(props);
|
|
3135
|
-
const [options] = instance.propsOptions;
|
|
3136
|
-
let hasAttrsChanged = false;
|
|
3137
|
-
if (
|
|
3138
|
-
// always force full diff in dev
|
|
3139
|
-
// - #1942 if hmr is enabled with sfc component
|
|
3140
|
-
// - vite#872 non-sfc component used by sfc component
|
|
3141
|
-
(optimized || patchFlag > 0) && !(patchFlag & 16)
|
|
3142
|
-
) {
|
|
3143
|
-
if (patchFlag & 8) {
|
|
3144
|
-
const propsToUpdate = instance.vnode.dynamicProps;
|
|
3145
|
-
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
3146
|
-
let key = propsToUpdate[i];
|
|
3147
|
-
if (isEmitListener(instance.emitsOptions, key)) {
|
|
3148
|
-
continue;
|
|
3280
|
+
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
3281
|
+
const i = getCurrentInstance();
|
|
3282
|
+
const camelizedName = shared.camelize(name);
|
|
3283
|
+
const hyphenatedName = shared.hyphenate(name);
|
|
3284
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
3285
|
+
const res = reactivity.customRef((track, trigger) => {
|
|
3286
|
+
let localValue;
|
|
3287
|
+
let prevSetValue = shared.EMPTY_OBJ;
|
|
3288
|
+
let prevEmittedValue;
|
|
3289
|
+
watchSyncEffect(() => {
|
|
3290
|
+
const propValue = props[camelizedName];
|
|
3291
|
+
if (shared.hasChanged(localValue, propValue)) {
|
|
3292
|
+
localValue = propValue;
|
|
3293
|
+
trigger();
|
|
3294
|
+
}
|
|
3295
|
+
});
|
|
3296
|
+
return {
|
|
3297
|
+
get() {
|
|
3298
|
+
track();
|
|
3299
|
+
return options.get ? options.get(localValue) : localValue;
|
|
3300
|
+
},
|
|
3301
|
+
set(value) {
|
|
3302
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
3303
|
+
if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) {
|
|
3304
|
+
return;
|
|
3149
3305
|
}
|
|
3150
|
-
const
|
|
3151
|
-
if (
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
props[camelizedKey] = resolvePropValue(
|
|
3160
|
-
options,
|
|
3161
|
-
rawCurrentProps,
|
|
3162
|
-
camelizedKey,
|
|
3163
|
-
value,
|
|
3164
|
-
instance,
|
|
3165
|
-
false
|
|
3166
|
-
);
|
|
3167
|
-
}
|
|
3168
|
-
} else {
|
|
3169
|
-
if (value !== attrs[key]) {
|
|
3170
|
-
attrs[key] = value;
|
|
3171
|
-
hasAttrsChanged = true;
|
|
3172
|
-
}
|
|
3306
|
+
const rawProps = i.vnode.props;
|
|
3307
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
3308
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
|
|
3309
|
+
localValue = value;
|
|
3310
|
+
trigger();
|
|
3311
|
+
}
|
|
3312
|
+
i.emit(`update:${name}`, emittedValue);
|
|
3313
|
+
if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {
|
|
3314
|
+
trigger();
|
|
3173
3315
|
}
|
|
3316
|
+
prevSetValue = value;
|
|
3317
|
+
prevEmittedValue = emittedValue;
|
|
3174
3318
|
}
|
|
3175
|
-
}
|
|
3176
|
-
}
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
!shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
|
|
3184
|
-
// and converted to camelCase (#955)
|
|
3185
|
-
((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) {
|
|
3186
|
-
if (options) {
|
|
3187
|
-
if (rawPrevProps && // for camelCase
|
|
3188
|
-
(rawPrevProps[key] !== void 0 || // for kebab-case
|
|
3189
|
-
rawPrevProps[kebabKey] !== void 0)) {
|
|
3190
|
-
props[key] = resolvePropValue(
|
|
3191
|
-
options,
|
|
3192
|
-
rawCurrentProps,
|
|
3193
|
-
key,
|
|
3194
|
-
void 0,
|
|
3195
|
-
instance,
|
|
3196
|
-
true
|
|
3197
|
-
);
|
|
3198
|
-
}
|
|
3319
|
+
};
|
|
3320
|
+
});
|
|
3321
|
+
res[Symbol.iterator] = () => {
|
|
3322
|
+
let i2 = 0;
|
|
3323
|
+
return {
|
|
3324
|
+
next() {
|
|
3325
|
+
if (i2 < 2) {
|
|
3326
|
+
return { value: i2++ ? modifiers || shared.EMPTY_OBJ : res, done: false };
|
|
3199
3327
|
} else {
|
|
3200
|
-
|
|
3328
|
+
return { done: true };
|
|
3201
3329
|
}
|
|
3202
3330
|
}
|
|
3331
|
+
};
|
|
3332
|
+
};
|
|
3333
|
+
return res;
|
|
3334
|
+
}
|
|
3335
|
+
const getModelModifiers = (props, modelName) => {
|
|
3336
|
+
return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${shared.camelize(modelName)}Modifiers`] || props[`${shared.hyphenate(modelName)}Modifiers`];
|
|
3337
|
+
};
|
|
3338
|
+
|
|
3339
|
+
function emit(instance, event, ...rawArgs) {
|
|
3340
|
+
if (instance.isUnmounted) return;
|
|
3341
|
+
const props = instance.vnode.props || shared.EMPTY_OBJ;
|
|
3342
|
+
let args = rawArgs;
|
|
3343
|
+
const isModelListener = event.startsWith("update:");
|
|
3344
|
+
const modifiers = isModelListener && getModelModifiers(props, event.slice(7));
|
|
3345
|
+
if (modifiers) {
|
|
3346
|
+
if (modifiers.trim) {
|
|
3347
|
+
args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a);
|
|
3203
3348
|
}
|
|
3204
|
-
if (
|
|
3205
|
-
|
|
3206
|
-
if (!rawProps || !shared.hasOwn(rawProps, key) && true) {
|
|
3207
|
-
delete attrs[key];
|
|
3208
|
-
hasAttrsChanged = true;
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3349
|
+
if (modifiers.number) {
|
|
3350
|
+
args = rawArgs.map(shared.looseToNumber);
|
|
3211
3351
|
}
|
|
3212
3352
|
}
|
|
3213
|
-
|
|
3214
|
-
|
|
3353
|
+
let handlerName;
|
|
3354
|
+
let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249)
|
|
3355
|
+
props[handlerName = shared.toHandlerKey(shared.camelize(event))];
|
|
3356
|
+
if (!handler && isModelListener) {
|
|
3357
|
+
handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))];
|
|
3358
|
+
}
|
|
3359
|
+
if (handler) {
|
|
3360
|
+
callWithAsyncErrorHandling(
|
|
3361
|
+
handler,
|
|
3362
|
+
instance,
|
|
3363
|
+
6,
|
|
3364
|
+
args
|
|
3365
|
+
);
|
|
3366
|
+
}
|
|
3367
|
+
const onceHandler = props[handlerName + `Once`];
|
|
3368
|
+
if (onceHandler) {
|
|
3369
|
+
if (!instance.emitted) {
|
|
3370
|
+
instance.emitted = {};
|
|
3371
|
+
} else if (instance.emitted[handlerName]) {
|
|
3372
|
+
return;
|
|
3373
|
+
}
|
|
3374
|
+
instance.emitted[handlerName] = true;
|
|
3375
|
+
callWithAsyncErrorHandling(
|
|
3376
|
+
onceHandler,
|
|
3377
|
+
instance,
|
|
3378
|
+
6,
|
|
3379
|
+
args
|
|
3380
|
+
);
|
|
3215
3381
|
}
|
|
3216
3382
|
}
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
if (
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
}
|
|
3234
|
-
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
3235
|
-
if (!(key in attrs) || value !== attrs[key]) {
|
|
3236
|
-
attrs[key] = value;
|
|
3237
|
-
hasAttrsChanged = true;
|
|
3238
|
-
}
|
|
3383
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
3384
|
+
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
3385
|
+
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
3386
|
+
const cached = cache.get(comp);
|
|
3387
|
+
if (cached !== void 0) {
|
|
3388
|
+
return cached;
|
|
3389
|
+
}
|
|
3390
|
+
const raw = comp.emits;
|
|
3391
|
+
let normalized = {};
|
|
3392
|
+
let hasExtends = false;
|
|
3393
|
+
if (!shared.isFunction(comp)) {
|
|
3394
|
+
const extendEmits = (raw2) => {
|
|
3395
|
+
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
3396
|
+
if (normalizedFromExtend) {
|
|
3397
|
+
hasExtends = true;
|
|
3398
|
+
shared.extend(normalized, normalizedFromExtend);
|
|
3239
3399
|
}
|
|
3400
|
+
};
|
|
3401
|
+
if (!asMixin && appContext.mixins.length) {
|
|
3402
|
+
appContext.mixins.forEach(extendEmits);
|
|
3403
|
+
}
|
|
3404
|
+
if (comp.extends) {
|
|
3405
|
+
extendEmits(comp.extends);
|
|
3406
|
+
}
|
|
3407
|
+
if (comp.mixins) {
|
|
3408
|
+
comp.mixins.forEach(extendEmits);
|
|
3240
3409
|
}
|
|
3241
3410
|
}
|
|
3242
|
-
if (
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
for (let i = 0; i < needCastKeys.length; i++) {
|
|
3246
|
-
const key = needCastKeys[i];
|
|
3247
|
-
props[key] = resolvePropValue(
|
|
3248
|
-
options,
|
|
3249
|
-
rawCurrentProps,
|
|
3250
|
-
key,
|
|
3251
|
-
castValues[key],
|
|
3252
|
-
instance,
|
|
3253
|
-
!shared.hasOwn(castValues, key)
|
|
3254
|
-
);
|
|
3411
|
+
if (!raw && !hasExtends) {
|
|
3412
|
+
if (shared.isObject(comp)) {
|
|
3413
|
+
cache.set(comp, null);
|
|
3255
3414
|
}
|
|
3415
|
+
return null;
|
|
3256
3416
|
}
|
|
3257
|
-
|
|
3417
|
+
if (shared.isArray(raw)) {
|
|
3418
|
+
raw.forEach((key) => normalized[key] = null);
|
|
3419
|
+
} else {
|
|
3420
|
+
shared.extend(normalized, raw);
|
|
3421
|
+
}
|
|
3422
|
+
if (shared.isObject(comp)) {
|
|
3423
|
+
cache.set(comp, normalized);
|
|
3424
|
+
}
|
|
3425
|
+
return normalized;
|
|
3258
3426
|
}
|
|
3259
|
-
function
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3427
|
+
function isEmitListener(options, key) {
|
|
3428
|
+
if (!options || !shared.isOn(key)) {
|
|
3429
|
+
return false;
|
|
3430
|
+
}
|
|
3431
|
+
key = key.slice(2).replace(/Once$/, "");
|
|
3432
|
+
return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key);
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
function markAttrsAccessed() {
|
|
3436
|
+
}
|
|
3437
|
+
function renderComponentRoot(instance) {
|
|
3438
|
+
const {
|
|
3439
|
+
type: Component,
|
|
3440
|
+
vnode,
|
|
3441
|
+
proxy,
|
|
3442
|
+
withProxy,
|
|
3443
|
+
propsOptions: [propsOptions],
|
|
3444
|
+
slots,
|
|
3445
|
+
attrs,
|
|
3446
|
+
emit,
|
|
3447
|
+
render,
|
|
3448
|
+
renderCache,
|
|
3449
|
+
props,
|
|
3450
|
+
data,
|
|
3451
|
+
setupState,
|
|
3452
|
+
ctx,
|
|
3453
|
+
inheritAttrs
|
|
3454
|
+
} = instance;
|
|
3455
|
+
const prev = setCurrentRenderingInstance(instance);
|
|
3456
|
+
let result;
|
|
3457
|
+
let fallthroughAttrs;
|
|
3458
|
+
try {
|
|
3459
|
+
if (vnode.shapeFlag & 4) {
|
|
3460
|
+
const proxyToUse = withProxy || proxy;
|
|
3461
|
+
const thisProxy = false ? new Proxy(proxyToUse, {
|
|
3462
|
+
get(target, key, receiver) {
|
|
3463
|
+
warn(
|
|
3464
|
+
`Property '${String(
|
|
3465
|
+
key
|
|
3466
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
3274
3467
|
);
|
|
3275
|
-
|
|
3468
|
+
return Reflect.get(target, key, receiver);
|
|
3276
3469
|
}
|
|
3277
|
-
}
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3470
|
+
}) : proxyToUse;
|
|
3471
|
+
result = normalizeVNode(
|
|
3472
|
+
render.call(
|
|
3473
|
+
thisProxy,
|
|
3474
|
+
proxyToUse,
|
|
3475
|
+
renderCache,
|
|
3476
|
+
false ? shallowReadonly(props) : props,
|
|
3477
|
+
setupState,
|
|
3478
|
+
data,
|
|
3479
|
+
ctx
|
|
3480
|
+
)
|
|
3481
|
+
);
|
|
3482
|
+
fallthroughAttrs = attrs;
|
|
3483
|
+
} else {
|
|
3484
|
+
const render2 = Component;
|
|
3485
|
+
if (false) ;
|
|
3486
|
+
result = normalizeVNode(
|
|
3487
|
+
render2.length > 1 ? render2(
|
|
3488
|
+
false ? shallowReadonly(props) : props,
|
|
3489
|
+
false ? {
|
|
3490
|
+
get attrs() {
|
|
3491
|
+
markAttrsAccessed();
|
|
3492
|
+
return shallowReadonly(attrs);
|
|
3493
|
+
},
|
|
3494
|
+
slots,
|
|
3495
|
+
emit
|
|
3496
|
+
} : { attrs, slots, emit }
|
|
3497
|
+
) : render2(
|
|
3498
|
+
false ? shallowReadonly(props) : props,
|
|
3499
|
+
null
|
|
3500
|
+
)
|
|
3501
|
+
);
|
|
3502
|
+
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
3283
3503
|
}
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3504
|
+
} catch (err) {
|
|
3505
|
+
blockStack.length = 0;
|
|
3506
|
+
handleError(err, instance, 1);
|
|
3507
|
+
result = createVNode(Comment);
|
|
3508
|
+
}
|
|
3509
|
+
let root = result;
|
|
3510
|
+
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
3511
|
+
const keys = Object.keys(fallthroughAttrs);
|
|
3512
|
+
const { shapeFlag } = root;
|
|
3513
|
+
if (keys.length) {
|
|
3514
|
+
if (shapeFlag & (1 | 6)) {
|
|
3515
|
+
if (propsOptions && keys.some(shared.isModelListener)) {
|
|
3516
|
+
fallthroughAttrs = filterModelListeners(
|
|
3517
|
+
fallthroughAttrs,
|
|
3518
|
+
propsOptions
|
|
3519
|
+
);
|
|
3520
|
+
}
|
|
3521
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
3289
3522
|
}
|
|
3290
3523
|
}
|
|
3291
3524
|
}
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
3296
|
-
const cache = asMixin ? mixinPropsCache : appContext.propsCache;
|
|
3297
|
-
const cached = cache.get(comp);
|
|
3298
|
-
if (cached) {
|
|
3299
|
-
return cached;
|
|
3525
|
+
if (vnode.dirs) {
|
|
3526
|
+
root = cloneVNode(root, null, false, true);
|
|
3527
|
+
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
3300
3528
|
}
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
const needCastKeys = [];
|
|
3304
|
-
let hasExtends = false;
|
|
3305
|
-
if (!shared.isFunction(comp)) {
|
|
3306
|
-
const extendProps = (raw2) => {
|
|
3307
|
-
hasExtends = true;
|
|
3308
|
-
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
3309
|
-
shared.extend(normalized, props);
|
|
3310
|
-
if (keys) needCastKeys.push(...keys);
|
|
3311
|
-
};
|
|
3312
|
-
if (!asMixin && appContext.mixins.length) {
|
|
3313
|
-
appContext.mixins.forEach(extendProps);
|
|
3314
|
-
}
|
|
3315
|
-
if (comp.extends) {
|
|
3316
|
-
extendProps(comp.extends);
|
|
3317
|
-
}
|
|
3318
|
-
if (comp.mixins) {
|
|
3319
|
-
comp.mixins.forEach(extendProps);
|
|
3320
|
-
}
|
|
3529
|
+
if (vnode.transition) {
|
|
3530
|
+
setTransitionHooks(root, vnode.transition);
|
|
3321
3531
|
}
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
cache.set(comp, shared.EMPTY_ARR);
|
|
3325
|
-
}
|
|
3326
|
-
return shared.EMPTY_ARR;
|
|
3532
|
+
{
|
|
3533
|
+
result = root;
|
|
3327
3534
|
}
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
const opt = raw[key];
|
|
3340
|
-
const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
|
|
3341
|
-
const propType = prop.type;
|
|
3342
|
-
let shouldCast = false;
|
|
3343
|
-
let shouldCastTrue = true;
|
|
3344
|
-
if (shared.isArray(propType)) {
|
|
3345
|
-
for (let index = 0; index < propType.length; ++index) {
|
|
3346
|
-
const type = propType[index];
|
|
3347
|
-
const typeName = shared.isFunction(type) && type.name;
|
|
3348
|
-
if (typeName === "Boolean") {
|
|
3349
|
-
shouldCast = true;
|
|
3350
|
-
break;
|
|
3351
|
-
} else if (typeName === "String") {
|
|
3352
|
-
shouldCastTrue = false;
|
|
3353
|
-
}
|
|
3354
|
-
}
|
|
3535
|
+
setCurrentRenderingInstance(prev);
|
|
3536
|
+
return result;
|
|
3537
|
+
}
|
|
3538
|
+
function filterSingleRoot(children, recurse = true) {
|
|
3539
|
+
let singleRoot;
|
|
3540
|
+
for (let i = 0; i < children.length; i++) {
|
|
3541
|
+
const child = children[i];
|
|
3542
|
+
if (isVNode(child)) {
|
|
3543
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
3544
|
+
if (singleRoot) {
|
|
3545
|
+
return;
|
|
3355
3546
|
} else {
|
|
3356
|
-
|
|
3357
|
-
}
|
|
3358
|
-
prop[0 /* shouldCast */] = shouldCast;
|
|
3359
|
-
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
3360
|
-
if (shouldCast || shared.hasOwn(prop, "default")) {
|
|
3361
|
-
needCastKeys.push(normalizedKey);
|
|
3547
|
+
singleRoot = child;
|
|
3362
3548
|
}
|
|
3363
3549
|
}
|
|
3550
|
+
} else {
|
|
3551
|
+
return;
|
|
3364
3552
|
}
|
|
3365
3553
|
}
|
|
3366
|
-
|
|
3367
|
-
if (shared.isObject(comp)) {
|
|
3368
|
-
cache.set(comp, res);
|
|
3369
|
-
}
|
|
3370
|
-
return res;
|
|
3554
|
+
return singleRoot;
|
|
3371
3555
|
}
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3556
|
+
const getFunctionalFallthrough = (attrs) => {
|
|
3557
|
+
let res;
|
|
3558
|
+
for (const key in attrs) {
|
|
3559
|
+
if (key === "class" || key === "style" || shared.isOn(key)) {
|
|
3560
|
+
(res || (res = {}))[key] = attrs[key];
|
|
3561
|
+
}
|
|
3375
3562
|
}
|
|
3376
|
-
return
|
|
3377
|
-
}
|
|
3378
|
-
|
|
3379
|
-
const
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3563
|
+
return res;
|
|
3564
|
+
};
|
|
3565
|
+
const filterModelListeners = (attrs, props) => {
|
|
3566
|
+
const res = {};
|
|
3567
|
+
for (const key in attrs) {
|
|
3568
|
+
if (!shared.isModelListener(key) || !(key.slice(9) in props)) {
|
|
3569
|
+
res[key] = attrs[key];
|
|
3570
|
+
}
|
|
3384
3571
|
}
|
|
3385
|
-
|
|
3386
|
-
if (false) ;
|
|
3387
|
-
return normalizeSlotValue(rawSlot(...args));
|
|
3388
|
-
}, ctx);
|
|
3389
|
-
normalized._c = false;
|
|
3390
|
-
return normalized;
|
|
3572
|
+
return res;
|
|
3391
3573
|
};
|
|
3392
|
-
|
|
3393
|
-
const
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3574
|
+
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
3575
|
+
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
3576
|
+
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
3577
|
+
const emits = component.emitsOptions;
|
|
3578
|
+
if (nextVNode.dirs || nextVNode.transition) {
|
|
3579
|
+
return true;
|
|
3580
|
+
}
|
|
3581
|
+
if (optimized && patchFlag >= 0) {
|
|
3582
|
+
if (patchFlag & 1024) {
|
|
3583
|
+
return true;
|
|
3584
|
+
}
|
|
3585
|
+
if (patchFlag & 16) {
|
|
3586
|
+
if (!prevProps) {
|
|
3587
|
+
return !!nextProps;
|
|
3588
|
+
}
|
|
3589
|
+
return hasPropsChanged(prevProps, nextProps, emits);
|
|
3590
|
+
} else if (patchFlag & 8) {
|
|
3591
|
+
const dynamicProps = nextVNode.dynamicProps;
|
|
3592
|
+
for (let i = 0; i < dynamicProps.length; i++) {
|
|
3593
|
+
const key = dynamicProps[i];
|
|
3594
|
+
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emits, key)) {
|
|
3595
|
+
return true;
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
} else {
|
|
3600
|
+
if (prevChildren || nextChildren) {
|
|
3601
|
+
if (!nextChildren || !nextChildren.$stable) {
|
|
3602
|
+
return true;
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
if (prevProps === nextProps) {
|
|
3606
|
+
return false;
|
|
3607
|
+
}
|
|
3608
|
+
if (!prevProps) {
|
|
3609
|
+
return !!nextProps;
|
|
3610
|
+
}
|
|
3611
|
+
if (!nextProps) {
|
|
3612
|
+
return true;
|
|
3402
3613
|
}
|
|
3614
|
+
return hasPropsChanged(prevProps, nextProps, emits);
|
|
3403
3615
|
}
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3616
|
+
return false;
|
|
3617
|
+
}
|
|
3618
|
+
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
3619
|
+
const nextKeys = Object.keys(nextProps);
|
|
3620
|
+
if (nextKeys.length !== Object.keys(prevProps).length) {
|
|
3621
|
+
return true;
|
|
3622
|
+
}
|
|
3623
|
+
for (let i = 0; i < nextKeys.length; i++) {
|
|
3624
|
+
const key = nextKeys[i];
|
|
3625
|
+
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
3626
|
+
return true;
|
|
3413
3627
|
}
|
|
3414
3628
|
}
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3629
|
+
return false;
|
|
3630
|
+
}
|
|
3631
|
+
function hasPropValueChanged(nextProps, prevProps, key) {
|
|
3632
|
+
const nextProp = nextProps[key];
|
|
3633
|
+
const prevProp = prevProps[key];
|
|
3634
|
+
if (key === "style" && shared.isObject(nextProp) && shared.isObject(prevProp)) {
|
|
3635
|
+
return !shared.looseEqual(nextProp, prevProp);
|
|
3636
|
+
}
|
|
3637
|
+
return nextProp !== prevProp;
|
|
3638
|
+
}
|
|
3639
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
3640
|
+
while (parent) {
|
|
3641
|
+
const root = parent.subTree;
|
|
3642
|
+
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
3643
|
+
root.suspense.vnode.el = root.el = el;
|
|
3644
|
+
vnode = root;
|
|
3645
|
+
}
|
|
3646
|
+
if (root === vnode) {
|
|
3647
|
+
(vnode = parent.vnode).el = el;
|
|
3648
|
+
parent = parent.parent;
|
|
3425
3649
|
} else {
|
|
3426
|
-
|
|
3650
|
+
break;
|
|
3427
3651
|
}
|
|
3428
|
-
} else if (children) {
|
|
3429
|
-
normalizeVNodeSlots(instance, children);
|
|
3430
3652
|
}
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3653
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
3654
|
+
suspense.vnode.el = el;
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3658
|
+
const internalObjectProto = {};
|
|
3659
|
+
const createInternalObject = () => Object.create(internalObjectProto);
|
|
3660
|
+
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
3661
|
+
|
|
3662
|
+
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
3663
|
+
const props = {};
|
|
3664
|
+
const attrs = createInternalObject();
|
|
3665
|
+
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
3666
|
+
setFullProps(instance, rawProps, props, attrs);
|
|
3667
|
+
for (const key in instance.propsOptions[0]) {
|
|
3668
|
+
if (!(key in props)) {
|
|
3669
|
+
props[key] = void 0;
|
|
3447
3670
|
}
|
|
3448
|
-
deletionComparisonTarget = children;
|
|
3449
|
-
} else if (children) {
|
|
3450
|
-
normalizeVNodeSlots(instance, children);
|
|
3451
|
-
deletionComparisonTarget = { default: 1 };
|
|
3452
3671
|
}
|
|
3453
|
-
if (
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3672
|
+
if (isStateful) {
|
|
3673
|
+
instance.props = isSSR ? props : reactivity.shallowReactive(props);
|
|
3674
|
+
} else {
|
|
3675
|
+
if (!instance.type.props) {
|
|
3676
|
+
instance.props = attrs;
|
|
3677
|
+
} else {
|
|
3678
|
+
instance.props = props;
|
|
3458
3679
|
}
|
|
3459
3680
|
}
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
const queuePostRenderEffect = queueEffectWithSuspense ;
|
|
3463
|
-
function createRenderer(options) {
|
|
3464
|
-
return baseCreateRenderer(options);
|
|
3465
|
-
}
|
|
3466
|
-
function createHydrationRenderer(options) {
|
|
3467
|
-
return baseCreateRenderer(options, createHydrationFunctions);
|
|
3681
|
+
instance.attrs = attrs;
|
|
3468
3682
|
}
|
|
3469
|
-
function
|
|
3470
|
-
const target = shared.getGlobalThis();
|
|
3471
|
-
target.__VUE__ = true;
|
|
3683
|
+
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
3472
3684
|
const {
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3685
|
+
props,
|
|
3686
|
+
attrs,
|
|
3687
|
+
vnode: { patchFlag }
|
|
3688
|
+
} = instance;
|
|
3689
|
+
const rawCurrentProps = reactivity.toRaw(props);
|
|
3690
|
+
const [options] = instance.propsOptions;
|
|
3691
|
+
let hasAttrsChanged = false;
|
|
3692
|
+
if (
|
|
3693
|
+
// always force full diff in dev
|
|
3694
|
+
// - #1942 if hmr is enabled with sfc component
|
|
3695
|
+
// - vite#872 non-sfc component used by sfc component
|
|
3696
|
+
(optimized || patchFlag > 0) && !(patchFlag & 16)
|
|
3697
|
+
) {
|
|
3698
|
+
if (patchFlag & 8) {
|
|
3699
|
+
const propsToUpdate = instance.vnode.dynamicProps;
|
|
3700
|
+
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
3701
|
+
let key = propsToUpdate[i];
|
|
3702
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
3703
|
+
continue;
|
|
3704
|
+
}
|
|
3705
|
+
const value = rawProps[key];
|
|
3706
|
+
if (options) {
|
|
3707
|
+
if (shared.hasOwn(attrs, key)) {
|
|
3708
|
+
if (value !== attrs[key]) {
|
|
3709
|
+
attrs[key] = value;
|
|
3710
|
+
hasAttrsChanged = true;
|
|
3711
|
+
}
|
|
3712
|
+
} else {
|
|
3713
|
+
const camelizedKey = shared.camelize(key);
|
|
3714
|
+
props[camelizedKey] = resolvePropValue(
|
|
3715
|
+
options,
|
|
3716
|
+
rawCurrentProps,
|
|
3717
|
+
camelizedKey,
|
|
3718
|
+
value,
|
|
3719
|
+
instance,
|
|
3720
|
+
false
|
|
3721
|
+
);
|
|
3722
|
+
}
|
|
3723
|
+
} else {
|
|
3724
|
+
if (value !== attrs[key]) {
|
|
3725
|
+
attrs[key] = value;
|
|
3726
|
+
hasAttrsChanged = true;
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3494
3730
|
}
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3731
|
+
} else {
|
|
3732
|
+
if (setFullProps(instance, rawProps, props, attrs)) {
|
|
3733
|
+
hasAttrsChanged = true;
|
|
3498
3734
|
}
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3735
|
+
let kebabKey;
|
|
3736
|
+
for (const key in rawCurrentProps) {
|
|
3737
|
+
if (!rawProps || // for camelCase
|
|
3738
|
+
!shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
|
|
3739
|
+
// and converted to camelCase (#955)
|
|
3740
|
+
((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) {
|
|
3741
|
+
if (options) {
|
|
3742
|
+
if (rawPrevProps && // for camelCase
|
|
3743
|
+
(rawPrevProps[key] !== void 0 || // for kebab-case
|
|
3744
|
+
rawPrevProps[kebabKey] !== void 0)) {
|
|
3745
|
+
props[key] = resolvePropValue(
|
|
3746
|
+
options,
|
|
3747
|
+
rawCurrentProps,
|
|
3748
|
+
key,
|
|
3749
|
+
void 0,
|
|
3750
|
+
instance,
|
|
3751
|
+
true
|
|
3752
|
+
);
|
|
3753
|
+
}
|
|
3754
|
+
} else {
|
|
3755
|
+
delete props[key];
|
|
3510
3756
|
}
|
|
3511
|
-
break;
|
|
3512
|
-
case Fragment:
|
|
3513
|
-
processFragment(
|
|
3514
|
-
n1,
|
|
3515
|
-
n2,
|
|
3516
|
-
container,
|
|
3517
|
-
anchor,
|
|
3518
|
-
parentComponent,
|
|
3519
|
-
parentSuspense,
|
|
3520
|
-
namespace,
|
|
3521
|
-
slotScopeIds,
|
|
3522
|
-
optimized
|
|
3523
|
-
);
|
|
3524
|
-
break;
|
|
3525
|
-
default:
|
|
3526
|
-
if (shapeFlag & 1) {
|
|
3527
|
-
processElement(
|
|
3528
|
-
n1,
|
|
3529
|
-
n2,
|
|
3530
|
-
container,
|
|
3531
|
-
anchor,
|
|
3532
|
-
parentComponent,
|
|
3533
|
-
parentSuspense,
|
|
3534
|
-
namespace,
|
|
3535
|
-
slotScopeIds,
|
|
3536
|
-
optimized
|
|
3537
|
-
);
|
|
3538
|
-
} else if (shapeFlag & 6) {
|
|
3539
|
-
processComponent(
|
|
3540
|
-
n1,
|
|
3541
|
-
n2,
|
|
3542
|
-
container,
|
|
3543
|
-
anchor,
|
|
3544
|
-
parentComponent,
|
|
3545
|
-
parentSuspense,
|
|
3546
|
-
namespace,
|
|
3547
|
-
slotScopeIds,
|
|
3548
|
-
optimized
|
|
3549
|
-
);
|
|
3550
|
-
} else if (shapeFlag & 64) {
|
|
3551
|
-
type.process(
|
|
3552
|
-
n1,
|
|
3553
|
-
n2,
|
|
3554
|
-
container,
|
|
3555
|
-
anchor,
|
|
3556
|
-
parentComponent,
|
|
3557
|
-
parentSuspense,
|
|
3558
|
-
namespace,
|
|
3559
|
-
slotScopeIds,
|
|
3560
|
-
optimized,
|
|
3561
|
-
internals
|
|
3562
|
-
);
|
|
3563
|
-
} else if (shapeFlag & 128) {
|
|
3564
|
-
type.process(
|
|
3565
|
-
n1,
|
|
3566
|
-
n2,
|
|
3567
|
-
container,
|
|
3568
|
-
anchor,
|
|
3569
|
-
parentComponent,
|
|
3570
|
-
parentSuspense,
|
|
3571
|
-
namespace,
|
|
3572
|
-
slotScopeIds,
|
|
3573
|
-
optimized,
|
|
3574
|
-
internals
|
|
3575
|
-
);
|
|
3576
|
-
} else ;
|
|
3577
|
-
}
|
|
3578
|
-
if (ref != null && parentComponent) {
|
|
3579
|
-
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
3580
|
-
} else if (ref == null && n1 && n1.ref != null) {
|
|
3581
|
-
setRef(n1.ref, null, parentSuspense, n1, true);
|
|
3582
|
-
}
|
|
3583
|
-
};
|
|
3584
|
-
const processText = (n1, n2, container, anchor) => {
|
|
3585
|
-
if (n1 == null) {
|
|
3586
|
-
hostInsert(
|
|
3587
|
-
n2.el = hostCreateText(n2.children),
|
|
3588
|
-
container,
|
|
3589
|
-
anchor
|
|
3590
|
-
);
|
|
3591
|
-
} else {
|
|
3592
|
-
const el = n2.el = n1.el;
|
|
3593
|
-
if (n2.children !== n1.children) {
|
|
3594
|
-
hostSetText(el, n2.children);
|
|
3595
3757
|
}
|
|
3596
3758
|
}
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
);
|
|
3605
|
-
} else {
|
|
3606
|
-
n2.el = n1.el;
|
|
3607
|
-
}
|
|
3608
|
-
};
|
|
3609
|
-
const mountStaticNode = (n2, container, anchor, namespace) => {
|
|
3610
|
-
[n2.el, n2.anchor] = hostInsertStaticContent(
|
|
3611
|
-
n2.children,
|
|
3612
|
-
container,
|
|
3613
|
-
anchor,
|
|
3614
|
-
namespace,
|
|
3615
|
-
n2.el,
|
|
3616
|
-
n2.anchor
|
|
3617
|
-
);
|
|
3618
|
-
};
|
|
3619
|
-
const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
|
|
3620
|
-
let next;
|
|
3621
|
-
while (el && el !== anchor) {
|
|
3622
|
-
next = hostNextSibling(el);
|
|
3623
|
-
hostInsert(el, container, nextSibling);
|
|
3624
|
-
el = next;
|
|
3625
|
-
}
|
|
3626
|
-
hostInsert(anchor, container, nextSibling);
|
|
3627
|
-
};
|
|
3628
|
-
const removeStaticNode = ({ el, anchor }) => {
|
|
3629
|
-
let next;
|
|
3630
|
-
while (el && el !== anchor) {
|
|
3631
|
-
next = hostNextSibling(el);
|
|
3632
|
-
hostRemove(el);
|
|
3633
|
-
el = next;
|
|
3634
|
-
}
|
|
3635
|
-
hostRemove(anchor);
|
|
3636
|
-
};
|
|
3637
|
-
const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
3638
|
-
if (n2.type === "svg") {
|
|
3639
|
-
namespace = "svg";
|
|
3640
|
-
} else if (n2.type === "math") {
|
|
3641
|
-
namespace = "mathml";
|
|
3759
|
+
if (attrs !== rawCurrentProps) {
|
|
3760
|
+
for (const key in attrs) {
|
|
3761
|
+
if (!rawProps || !shared.hasOwn(rawProps, key) && true) {
|
|
3762
|
+
delete attrs[key];
|
|
3763
|
+
hasAttrsChanged = true;
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3642
3766
|
}
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3767
|
+
}
|
|
3768
|
+
if (hasAttrsChanged) {
|
|
3769
|
+
reactivity.trigger(instance.attrs, "set", "");
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
function setFullProps(instance, rawProps, props, attrs) {
|
|
3773
|
+
const [options, needCastKeys] = instance.propsOptions;
|
|
3774
|
+
let hasAttrsChanged = false;
|
|
3775
|
+
let rawCastValues;
|
|
3776
|
+
if (rawProps) {
|
|
3777
|
+
for (let key in rawProps) {
|
|
3778
|
+
if (shared.isReservedProp(key)) {
|
|
3779
|
+
continue;
|
|
3780
|
+
}
|
|
3781
|
+
const value = rawProps[key];
|
|
3782
|
+
let camelKey;
|
|
3783
|
+
if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) {
|
|
3784
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) {
|
|
3785
|
+
props[camelKey] = value;
|
|
3786
|
+
} else {
|
|
3787
|
+
(rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
3788
|
+
}
|
|
3789
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
3790
|
+
if (!(key in attrs) || value !== attrs[key]) {
|
|
3791
|
+
attrs[key] = value;
|
|
3792
|
+
hasAttrsChanged = true;
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3664
3795
|
}
|
|
3665
|
-
}
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
} else if (shapeFlag & 16) {
|
|
3679
|
-
mountChildren(
|
|
3680
|
-
vnode.children,
|
|
3681
|
-
el,
|
|
3682
|
-
null,
|
|
3683
|
-
parentComponent,
|
|
3684
|
-
parentSuspense,
|
|
3685
|
-
resolveChildrenNamespace(vnode, namespace),
|
|
3686
|
-
slotScopeIds,
|
|
3687
|
-
optimized
|
|
3796
|
+
}
|
|
3797
|
+
if (needCastKeys) {
|
|
3798
|
+
const rawCurrentProps = reactivity.toRaw(props);
|
|
3799
|
+
const castValues = rawCastValues || shared.EMPTY_OBJ;
|
|
3800
|
+
for (let i = 0; i < needCastKeys.length; i++) {
|
|
3801
|
+
const key = needCastKeys[i];
|
|
3802
|
+
props[key] = resolvePropValue(
|
|
3803
|
+
options,
|
|
3804
|
+
rawCurrentProps,
|
|
3805
|
+
key,
|
|
3806
|
+
castValues[key],
|
|
3807
|
+
instance,
|
|
3808
|
+
!shared.hasOwn(castValues, key)
|
|
3688
3809
|
);
|
|
3689
3810
|
}
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3811
|
+
}
|
|
3812
|
+
return hasAttrsChanged;
|
|
3813
|
+
}
|
|
3814
|
+
function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
3815
|
+
const opt = options[key];
|
|
3816
|
+
if (opt != null) {
|
|
3817
|
+
const hasDefault = shared.hasOwn(opt, "default");
|
|
3818
|
+
if (hasDefault && value === void 0) {
|
|
3819
|
+
const defaultValue = opt.default;
|
|
3820
|
+
if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) {
|
|
3821
|
+
const { propsDefaults } = instance;
|
|
3822
|
+
if (key in propsDefaults) {
|
|
3823
|
+
value = propsDefaults[key];
|
|
3824
|
+
} else {
|
|
3825
|
+
const reset = setCurrentInstance(instance);
|
|
3826
|
+
value = propsDefaults[key] = defaultValue.call(
|
|
3827
|
+
null,
|
|
3828
|
+
props
|
|
3829
|
+
);
|
|
3830
|
+
reset();
|
|
3698
3831
|
}
|
|
3832
|
+
} else {
|
|
3833
|
+
value = defaultValue;
|
|
3699
3834
|
}
|
|
3700
|
-
if (
|
|
3701
|
-
|
|
3702
|
-
}
|
|
3703
|
-
if (vnodeHook = props.onVnodeBeforeMount) {
|
|
3704
|
-
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3835
|
+
if (instance.ce) {
|
|
3836
|
+
instance.ce._setProp(key, value);
|
|
3705
3837
|
}
|
|
3706
3838
|
}
|
|
3707
|
-
if (
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
transition.beforeEnter(el);
|
|
3713
|
-
}
|
|
3714
|
-
hostInsert(el, container, anchor);
|
|
3715
|
-
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
3716
|
-
queuePostRenderEffect(() => {
|
|
3717
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3718
|
-
needCallTransitionHooks && transition.enter(el);
|
|
3719
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
3720
|
-
}, parentSuspense);
|
|
3721
|
-
}
|
|
3722
|
-
};
|
|
3723
|
-
const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
|
|
3724
|
-
if (scopeId) {
|
|
3725
|
-
hostSetScopeId(el, scopeId);
|
|
3726
|
-
}
|
|
3727
|
-
if (slotScopeIds) {
|
|
3728
|
-
for (let i = 0; i < slotScopeIds.length; i++) {
|
|
3729
|
-
hostSetScopeId(el, slotScopeIds[i]);
|
|
3730
|
-
}
|
|
3731
|
-
}
|
|
3732
|
-
if (parentComponent) {
|
|
3733
|
-
let subTree = parentComponent.subTree;
|
|
3734
|
-
if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
|
|
3735
|
-
const parentVNode = parentComponent.vnode;
|
|
3736
|
-
setScopeId(
|
|
3737
|
-
el,
|
|
3738
|
-
parentVNode,
|
|
3739
|
-
parentVNode.scopeId,
|
|
3740
|
-
parentVNode.slotScopeIds,
|
|
3741
|
-
parentComponent.parent
|
|
3742
|
-
);
|
|
3839
|
+
if (opt[0 /* shouldCast */]) {
|
|
3840
|
+
if (isAbsent && !hasDefault) {
|
|
3841
|
+
value = false;
|
|
3842
|
+
} else if (opt[1 /* shouldCastTrue */] && (value === "" || value === shared.hyphenate(key))) {
|
|
3843
|
+
value = true;
|
|
3743
3844
|
}
|
|
3744
3845
|
}
|
|
3745
|
-
}
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3846
|
+
}
|
|
3847
|
+
return value;
|
|
3848
|
+
}
|
|
3849
|
+
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
3850
|
+
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
3851
|
+
const cache = asMixin ? mixinPropsCache : appContext.propsCache;
|
|
3852
|
+
const cached = cache.get(comp);
|
|
3853
|
+
if (cached) {
|
|
3854
|
+
return cached;
|
|
3855
|
+
}
|
|
3856
|
+
const raw = comp.props;
|
|
3857
|
+
const normalized = {};
|
|
3858
|
+
const needCastKeys = [];
|
|
3859
|
+
let hasExtends = false;
|
|
3860
|
+
if (!shared.isFunction(comp)) {
|
|
3861
|
+
const extendProps = (raw2) => {
|
|
3862
|
+
hasExtends = true;
|
|
3863
|
+
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
3864
|
+
shared.extend(normalized, props);
|
|
3865
|
+
if (keys) needCastKeys.push(...keys);
|
|
3866
|
+
};
|
|
3867
|
+
if (!asMixin && appContext.mixins.length) {
|
|
3868
|
+
appContext.mixins.forEach(extendProps);
|
|
3760
3869
|
}
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
const el = n2.el = n1.el;
|
|
3764
|
-
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
3765
|
-
patchFlag |= n1.patchFlag & 16;
|
|
3766
|
-
const oldProps = n1.props || shared.EMPTY_OBJ;
|
|
3767
|
-
const newProps = n2.props || shared.EMPTY_OBJ;
|
|
3768
|
-
let vnodeHook;
|
|
3769
|
-
parentComponent && toggleRecurse(parentComponent, false);
|
|
3770
|
-
if (vnodeHook = newProps.onVnodeBeforeUpdate) {
|
|
3771
|
-
invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
3870
|
+
if (comp.extends) {
|
|
3871
|
+
extendProps(comp.extends);
|
|
3772
3872
|
}
|
|
3773
|
-
if (
|
|
3774
|
-
|
|
3873
|
+
if (comp.mixins) {
|
|
3874
|
+
comp.mixins.forEach(extendProps);
|
|
3775
3875
|
}
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3876
|
+
}
|
|
3877
|
+
if (!raw && !hasExtends) {
|
|
3878
|
+
if (shared.isObject(comp)) {
|
|
3879
|
+
cache.set(comp, shared.EMPTY_ARR);
|
|
3779
3880
|
}
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
slotScopeIds
|
|
3789
|
-
);
|
|
3790
|
-
} else if (!optimized) {
|
|
3791
|
-
patchChildren(
|
|
3792
|
-
n1,
|
|
3793
|
-
n2,
|
|
3794
|
-
el,
|
|
3795
|
-
null,
|
|
3796
|
-
parentComponent,
|
|
3797
|
-
parentSuspense,
|
|
3798
|
-
resolveChildrenNamespace(n2, namespace),
|
|
3799
|
-
slotScopeIds,
|
|
3800
|
-
false
|
|
3801
|
-
);
|
|
3881
|
+
return shared.EMPTY_ARR;
|
|
3882
|
+
}
|
|
3883
|
+
if (shared.isArray(raw)) {
|
|
3884
|
+
for (let i = 0; i < raw.length; i++) {
|
|
3885
|
+
const normalizedKey = shared.camelize(raw[i]);
|
|
3886
|
+
if (validatePropName(normalizedKey)) {
|
|
3887
|
+
normalized[normalizedKey] = shared.EMPTY_OBJ;
|
|
3888
|
+
}
|
|
3802
3889
|
}
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
if (
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
if (next !== prev || key === "value") {
|
|
3822
|
-
hostPatchProp(el, key, prev, next, namespace, parentComponent);
|
|
3890
|
+
} else if (raw) {
|
|
3891
|
+
for (const key in raw) {
|
|
3892
|
+
const normalizedKey = shared.camelize(key);
|
|
3893
|
+
if (validatePropName(normalizedKey)) {
|
|
3894
|
+
const opt = raw[key];
|
|
3895
|
+
const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
|
|
3896
|
+
const propType = prop.type;
|
|
3897
|
+
let shouldCast = false;
|
|
3898
|
+
let shouldCastTrue = true;
|
|
3899
|
+
if (shared.isArray(propType)) {
|
|
3900
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
3901
|
+
const type = propType[index];
|
|
3902
|
+
const typeName = shared.isFunction(type) && type.name;
|
|
3903
|
+
if (typeName === "Boolean") {
|
|
3904
|
+
shouldCast = true;
|
|
3905
|
+
break;
|
|
3906
|
+
} else if (typeName === "String") {
|
|
3907
|
+
shouldCastTrue = false;
|
|
3823
3908
|
}
|
|
3824
3909
|
}
|
|
3910
|
+
} else {
|
|
3911
|
+
shouldCast = shared.isFunction(propType) && propType.name === "Boolean";
|
|
3825
3912
|
}
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
if (
|
|
3829
|
-
|
|
3913
|
+
prop[0 /* shouldCast */] = shouldCast;
|
|
3914
|
+
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
3915
|
+
if (shouldCast || shared.hasOwn(prop, "default")) {
|
|
3916
|
+
needCastKeys.push(normalizedKey);
|
|
3830
3917
|
}
|
|
3831
3918
|
}
|
|
3832
|
-
} else if (!optimized && dynamicChildren == null) {
|
|
3833
|
-
patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
3834
|
-
}
|
|
3835
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
3836
|
-
queuePostRenderEffect(() => {
|
|
3837
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
3838
|
-
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
3839
|
-
}, parentSuspense);
|
|
3840
3919
|
}
|
|
3841
|
-
}
|
|
3842
|
-
const
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3920
|
+
}
|
|
3921
|
+
const res = [normalized, needCastKeys];
|
|
3922
|
+
if (shared.isObject(comp)) {
|
|
3923
|
+
cache.set(comp, res);
|
|
3924
|
+
}
|
|
3925
|
+
return res;
|
|
3926
|
+
}
|
|
3927
|
+
function validatePropName(key) {
|
|
3928
|
+
if (key[0] !== "$" && !shared.isReservedProp(key)) {
|
|
3929
|
+
return true;
|
|
3930
|
+
}
|
|
3931
|
+
return false;
|
|
3932
|
+
}
|
|
3933
|
+
|
|
3934
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
3935
|
+
const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
3936
|
+
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
3937
|
+
if (rawSlot._n) {
|
|
3938
|
+
return rawSlot;
|
|
3939
|
+
}
|
|
3940
|
+
const normalized = withCtx((...args) => {
|
|
3941
|
+
if (false) ;
|
|
3942
|
+
return normalizeSlotValue(rawSlot(...args));
|
|
3943
|
+
}, ctx);
|
|
3944
|
+
normalized._c = false;
|
|
3945
|
+
return normalized;
|
|
3946
|
+
};
|
|
3947
|
+
const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
3948
|
+
const ctx = rawSlots._ctx;
|
|
3949
|
+
for (const key in rawSlots) {
|
|
3950
|
+
if (isInternalKey(key)) continue;
|
|
3951
|
+
const value = rawSlots[key];
|
|
3952
|
+
if (shared.isFunction(value)) {
|
|
3953
|
+
slots[key] = normalizeSlot(key, value, ctx);
|
|
3954
|
+
} else if (value != null) {
|
|
3955
|
+
const normalized = normalizeSlotValue(value);
|
|
3956
|
+
slots[key] = () => normalized;
|
|
3871
3957
|
}
|
|
3872
|
-
}
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3958
|
+
}
|
|
3959
|
+
};
|
|
3960
|
+
const normalizeVNodeSlots = (instance, children) => {
|
|
3961
|
+
const normalized = normalizeSlotValue(children);
|
|
3962
|
+
instance.slots.default = () => normalized;
|
|
3963
|
+
};
|
|
3964
|
+
const assignSlots = (slots, children, optimized) => {
|
|
3965
|
+
for (const key in children) {
|
|
3966
|
+
if (optimized || !isInternalKey(key)) {
|
|
3967
|
+
slots[key] = children[key];
|
|
3968
|
+
}
|
|
3969
|
+
}
|
|
3970
|
+
};
|
|
3971
|
+
const initSlots = (instance, children, optimized) => {
|
|
3972
|
+
const slots = instance.slots = createInternalObject();
|
|
3973
|
+
if (instance.vnode.shapeFlag & 32) {
|
|
3974
|
+
const type = children._;
|
|
3975
|
+
if (type) {
|
|
3976
|
+
assignSlots(slots, children, optimized);
|
|
3977
|
+
if (optimized) {
|
|
3978
|
+
shared.def(slots, "_", type, true);
|
|
3888
3979
|
}
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3980
|
+
} else {
|
|
3981
|
+
normalizeObjectSlots(children, slots);
|
|
3982
|
+
}
|
|
3983
|
+
} else if (children) {
|
|
3984
|
+
normalizeVNodeSlots(instance, children);
|
|
3985
|
+
}
|
|
3986
|
+
};
|
|
3987
|
+
const updateSlots = (instance, children, optimized) => {
|
|
3988
|
+
const { vnode, slots } = instance;
|
|
3989
|
+
let needDeletionCheck = true;
|
|
3990
|
+
let deletionComparisonTarget = shared.EMPTY_OBJ;
|
|
3991
|
+
if (vnode.shapeFlag & 32) {
|
|
3992
|
+
const type = children._;
|
|
3993
|
+
if (type) {
|
|
3994
|
+
if (optimized && type === 1) {
|
|
3995
|
+
needDeletionCheck = false;
|
|
3996
|
+
} else {
|
|
3997
|
+
assignSlots(slots, children, optimized);
|
|
3896
3998
|
}
|
|
3897
|
-
|
|
3898
|
-
|
|
3999
|
+
} else {
|
|
4000
|
+
needDeletionCheck = !children.$stable;
|
|
4001
|
+
normalizeObjectSlots(children, slots);
|
|
4002
|
+
}
|
|
4003
|
+
deletionComparisonTarget = children;
|
|
4004
|
+
} else if (children) {
|
|
4005
|
+
normalizeVNodeSlots(instance, children);
|
|
4006
|
+
deletionComparisonTarget = { default: 1 };
|
|
4007
|
+
}
|
|
4008
|
+
if (needDeletionCheck) {
|
|
4009
|
+
for (const key in slots) {
|
|
4010
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
4011
|
+
delete slots[key];
|
|
3899
4012
|
}
|
|
3900
4013
|
}
|
|
3901
|
-
}
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
4014
|
+
}
|
|
4015
|
+
};
|
|
4016
|
+
|
|
4017
|
+
const queuePostRenderEffect = queueEffectWithSuspense ;
|
|
4018
|
+
function createRenderer(options) {
|
|
4019
|
+
return baseCreateRenderer(options);
|
|
4020
|
+
}
|
|
4021
|
+
function createHydrationRenderer(options) {
|
|
4022
|
+
return baseCreateRenderer(options, createHydrationFunctions);
|
|
4023
|
+
}
|
|
4024
|
+
function baseCreateRenderer(options, createHydrationFns) {
|
|
4025
|
+
const target = shared.getGlobalThis();
|
|
4026
|
+
target.__VUE__ = true;
|
|
4027
|
+
const {
|
|
4028
|
+
insert: hostInsert,
|
|
4029
|
+
remove: hostRemove,
|
|
4030
|
+
patchProp: hostPatchProp,
|
|
4031
|
+
createElement: hostCreateElement,
|
|
4032
|
+
createText: hostCreateText,
|
|
4033
|
+
createComment: hostCreateComment,
|
|
4034
|
+
setText: hostSetText,
|
|
4035
|
+
setElementText: hostSetElementText,
|
|
4036
|
+
parentNode: hostParentNode,
|
|
4037
|
+
nextSibling: hostNextSibling,
|
|
4038
|
+
setScopeId: hostSetScopeId = shared.NOOP,
|
|
4039
|
+
insertStaticContent: hostInsertStaticContent
|
|
4040
|
+
} = options;
|
|
4041
|
+
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {
|
|
4042
|
+
if (n1 === n2) {
|
|
4043
|
+
return;
|
|
3908
4044
|
}
|
|
3909
|
-
if (n1
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
n1.dynamicChildren) {
|
|
3930
|
-
patchBlockChildren(
|
|
3931
|
-
n1.dynamicChildren,
|
|
3932
|
-
dynamicChildren,
|
|
3933
|
-
container,
|
|
3934
|
-
parentComponent,
|
|
3935
|
-
parentSuspense,
|
|
3936
|
-
namespace,
|
|
3937
|
-
slotScopeIds
|
|
3938
|
-
);
|
|
3939
|
-
if (
|
|
3940
|
-
// #2080 if the stable fragment has a key, it's a <template v-for> that may
|
|
3941
|
-
// get moved around. Make sure all root level vnodes inherit el.
|
|
3942
|
-
// #2134 or if it's a component root, it may also get moved around
|
|
3943
|
-
// as the component is being moved.
|
|
3944
|
-
n2.key != null || parentComponent && n2 === parentComponent.subTree
|
|
3945
|
-
) {
|
|
3946
|
-
traverseStaticChildren(
|
|
3947
|
-
n1,
|
|
3948
|
-
n2,
|
|
3949
|
-
true
|
|
3950
|
-
/* shallow */
|
|
3951
|
-
);
|
|
4045
|
+
if (n1 && !isSameVNodeType(n1, n2)) {
|
|
4046
|
+
anchor = getNextHostNode(n1);
|
|
4047
|
+
unmount(n1, parentComponent, parentSuspense, true);
|
|
4048
|
+
n1 = null;
|
|
4049
|
+
}
|
|
4050
|
+
if (n2.patchFlag === -2) {
|
|
4051
|
+
optimized = false;
|
|
4052
|
+
n2.dynamicChildren = null;
|
|
4053
|
+
}
|
|
4054
|
+
const { type, ref, shapeFlag } = n2;
|
|
4055
|
+
switch (type) {
|
|
4056
|
+
case Text:
|
|
4057
|
+
processText(n1, n2, container, anchor);
|
|
4058
|
+
break;
|
|
4059
|
+
case Comment:
|
|
4060
|
+
processCommentNode(n1, n2, container, anchor);
|
|
4061
|
+
break;
|
|
4062
|
+
case Static:
|
|
4063
|
+
if (n1 == null) {
|
|
4064
|
+
mountStaticNode(n2, container, anchor, namespace);
|
|
3952
4065
|
}
|
|
3953
|
-
|
|
3954
|
-
|
|
4066
|
+
break;
|
|
4067
|
+
case Fragment:
|
|
4068
|
+
processFragment(
|
|
3955
4069
|
n1,
|
|
3956
4070
|
n2,
|
|
3957
4071
|
container,
|
|
3958
|
-
|
|
4072
|
+
anchor,
|
|
3959
4073
|
parentComponent,
|
|
3960
4074
|
parentSuspense,
|
|
3961
4075
|
namespace,
|
|
3962
4076
|
slotScopeIds,
|
|
3963
4077
|
optimized
|
|
3964
4078
|
);
|
|
4079
|
+
break;
|
|
4080
|
+
default:
|
|
4081
|
+
if (shapeFlag & 1) {
|
|
4082
|
+
processElement(
|
|
4083
|
+
n1,
|
|
4084
|
+
n2,
|
|
4085
|
+
container,
|
|
4086
|
+
anchor,
|
|
4087
|
+
parentComponent,
|
|
4088
|
+
parentSuspense,
|
|
4089
|
+
namespace,
|
|
4090
|
+
slotScopeIds,
|
|
4091
|
+
optimized
|
|
4092
|
+
);
|
|
4093
|
+
} else if (shapeFlag & 6) {
|
|
4094
|
+
processComponent(
|
|
4095
|
+
n1,
|
|
4096
|
+
n2,
|
|
4097
|
+
container,
|
|
4098
|
+
anchor,
|
|
4099
|
+
parentComponent,
|
|
4100
|
+
parentSuspense,
|
|
4101
|
+
namespace,
|
|
4102
|
+
slotScopeIds,
|
|
4103
|
+
optimized
|
|
4104
|
+
);
|
|
4105
|
+
} else if (shapeFlag & 64) {
|
|
4106
|
+
type.process(
|
|
4107
|
+
n1,
|
|
4108
|
+
n2,
|
|
4109
|
+
container,
|
|
4110
|
+
anchor,
|
|
4111
|
+
parentComponent,
|
|
4112
|
+
parentSuspense,
|
|
4113
|
+
namespace,
|
|
4114
|
+
slotScopeIds,
|
|
4115
|
+
optimized,
|
|
4116
|
+
internals
|
|
4117
|
+
);
|
|
4118
|
+
} else if (shapeFlag & 128) {
|
|
4119
|
+
type.process(
|
|
4120
|
+
n1,
|
|
4121
|
+
n2,
|
|
4122
|
+
container,
|
|
4123
|
+
anchor,
|
|
4124
|
+
parentComponent,
|
|
4125
|
+
parentSuspense,
|
|
4126
|
+
namespace,
|
|
4127
|
+
slotScopeIds,
|
|
4128
|
+
optimized,
|
|
4129
|
+
internals
|
|
4130
|
+
);
|
|
4131
|
+
} else ;
|
|
4132
|
+
}
|
|
4133
|
+
if (ref != null && parentComponent) {
|
|
4134
|
+
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
4135
|
+
} else if (ref == null && n1 && n1.ref != null) {
|
|
4136
|
+
setRef(n1.ref, null, parentSuspense, n1, true);
|
|
4137
|
+
}
|
|
4138
|
+
};
|
|
4139
|
+
const processText = (n1, n2, container, anchor) => {
|
|
4140
|
+
if (n1 == null) {
|
|
4141
|
+
hostInsert(
|
|
4142
|
+
n2.el = hostCreateText(n2.children),
|
|
4143
|
+
container,
|
|
4144
|
+
anchor
|
|
4145
|
+
);
|
|
4146
|
+
} else {
|
|
4147
|
+
const el = n2.el = n1.el;
|
|
4148
|
+
if (n2.children !== n1.children) {
|
|
4149
|
+
hostSetText(el, n2.children);
|
|
3965
4150
|
}
|
|
3966
4151
|
}
|
|
3967
4152
|
};
|
|
3968
|
-
const
|
|
3969
|
-
n2.slotScopeIds = slotScopeIds;
|
|
4153
|
+
const processCommentNode = (n1, n2, container, anchor) => {
|
|
3970
4154
|
if (n1 == null) {
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
4155
|
+
hostInsert(
|
|
4156
|
+
n2.el = hostCreateComment(n2.children || ""),
|
|
4157
|
+
container,
|
|
4158
|
+
anchor
|
|
4159
|
+
);
|
|
4160
|
+
} else {
|
|
4161
|
+
n2.el = n1.el;
|
|
4162
|
+
}
|
|
4163
|
+
};
|
|
4164
|
+
const mountStaticNode = (n2, container, anchor, namespace) => {
|
|
4165
|
+
[n2.el, n2.anchor] = hostInsertStaticContent(
|
|
4166
|
+
n2.children,
|
|
4167
|
+
container,
|
|
4168
|
+
anchor,
|
|
4169
|
+
namespace,
|
|
4170
|
+
n2.el,
|
|
4171
|
+
n2.anchor
|
|
4172
|
+
);
|
|
4173
|
+
};
|
|
4174
|
+
const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
|
|
4175
|
+
let next;
|
|
4176
|
+
while (el && el !== anchor) {
|
|
4177
|
+
next = hostNextSibling(el);
|
|
4178
|
+
hostInsert(el, container, nextSibling);
|
|
4179
|
+
el = next;
|
|
4180
|
+
}
|
|
4181
|
+
hostInsert(anchor, container, nextSibling);
|
|
4182
|
+
};
|
|
4183
|
+
const removeStaticNode = ({ el, anchor }) => {
|
|
4184
|
+
let next;
|
|
4185
|
+
while (el && el !== anchor) {
|
|
4186
|
+
next = hostNextSibling(el);
|
|
4187
|
+
hostRemove(el);
|
|
4188
|
+
el = next;
|
|
4189
|
+
}
|
|
4190
|
+
hostRemove(anchor);
|
|
4191
|
+
};
|
|
4192
|
+
const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4193
|
+
if (n2.type === "svg") {
|
|
4194
|
+
namespace = "svg";
|
|
4195
|
+
} else if (n2.type === "math") {
|
|
4196
|
+
namespace = "mathml";
|
|
4197
|
+
}
|
|
4198
|
+
if (n1 == null) {
|
|
4199
|
+
mountElement(
|
|
4200
|
+
n2,
|
|
4201
|
+
container,
|
|
4202
|
+
anchor,
|
|
4203
|
+
parentComponent,
|
|
4204
|
+
parentSuspense,
|
|
4205
|
+
namespace,
|
|
4206
|
+
slotScopeIds,
|
|
4207
|
+
optimized
|
|
4208
|
+
);
|
|
4209
|
+
} else {
|
|
4210
|
+
const customElement = n1.el && n1.el._isVueCE ? n1.el : null;
|
|
4211
|
+
try {
|
|
4212
|
+
if (customElement) {
|
|
4213
|
+
customElement._beginPatch();
|
|
4214
|
+
}
|
|
4215
|
+
patchElement(
|
|
4216
|
+
n1,
|
|
3981
4217
|
n2,
|
|
3982
|
-
container,
|
|
3983
|
-
anchor,
|
|
3984
4218
|
parentComponent,
|
|
3985
4219
|
parentSuspense,
|
|
3986
4220
|
namespace,
|
|
4221
|
+
slotScopeIds,
|
|
3987
4222
|
optimized
|
|
3988
4223
|
);
|
|
4224
|
+
} finally {
|
|
4225
|
+
if (customElement) {
|
|
4226
|
+
customElement._endPatch();
|
|
4227
|
+
}
|
|
3989
4228
|
}
|
|
3990
|
-
} else {
|
|
3991
|
-
updateComponent(n1, n2, optimized);
|
|
3992
4229
|
}
|
|
3993
4230
|
};
|
|
3994
|
-
const
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4231
|
+
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4232
|
+
let el;
|
|
4233
|
+
let vnodeHook;
|
|
4234
|
+
const { props, shapeFlag, transition, dirs } = vnode;
|
|
4235
|
+
el = vnode.el = hostCreateElement(
|
|
4236
|
+
vnode.type,
|
|
4237
|
+
namespace,
|
|
4238
|
+
props && props.is,
|
|
4239
|
+
props
|
|
4240
|
+
);
|
|
4241
|
+
if (shapeFlag & 8) {
|
|
4242
|
+
hostSetElementText(el, vnode.children);
|
|
4243
|
+
} else if (shapeFlag & 16) {
|
|
4244
|
+
mountChildren(
|
|
4245
|
+
vnode.children,
|
|
4246
|
+
el,
|
|
4247
|
+
null,
|
|
4248
|
+
parentComponent,
|
|
4249
|
+
parentSuspense,
|
|
4250
|
+
resolveChildrenNamespace(vnode, namespace),
|
|
4251
|
+
slotScopeIds,
|
|
4252
|
+
optimized
|
|
4253
|
+
);
|
|
4002
4254
|
}
|
|
4003
|
-
{
|
|
4004
|
-
|
|
4255
|
+
if (dirs) {
|
|
4256
|
+
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
4005
4257
|
}
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4258
|
+
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
4259
|
+
if (props) {
|
|
4260
|
+
for (const key in props) {
|
|
4261
|
+
if (key !== "value" && !shared.isReservedProp(key)) {
|
|
4262
|
+
hostPatchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4263
|
+
}
|
|
4012
4264
|
}
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4265
|
+
if ("value" in props) {
|
|
4266
|
+
hostPatchProp(el, "value", null, props.value, namespace);
|
|
4267
|
+
}
|
|
4268
|
+
if (vnodeHook = props.onVnodeBeforeMount) {
|
|
4269
|
+
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4272
|
+
if (dirs) {
|
|
4273
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
4274
|
+
}
|
|
4275
|
+
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
4276
|
+
if (needCallTransitionHooks) {
|
|
4277
|
+
transition.beforeEnter(el);
|
|
4278
|
+
}
|
|
4279
|
+
hostInsert(el, container, anchor);
|
|
4280
|
+
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
4281
|
+
queuePostRenderEffect(() => {
|
|
4282
|
+
try {
|
|
4283
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4284
|
+
needCallTransitionHooks && transition.enter(el);
|
|
4285
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
4286
|
+
} finally {
|
|
4287
|
+
}
|
|
4288
|
+
}, parentSuspense);
|
|
4289
|
+
}
|
|
4290
|
+
};
|
|
4291
|
+
const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
|
|
4292
|
+
if (scopeId) {
|
|
4293
|
+
hostSetScopeId(el, scopeId);
|
|
4294
|
+
}
|
|
4295
|
+
if (slotScopeIds) {
|
|
4296
|
+
for (let i = 0; i < slotScopeIds.length; i++) {
|
|
4297
|
+
hostSetScopeId(el, slotScopeIds[i]);
|
|
4298
|
+
}
|
|
4299
|
+
}
|
|
4300
|
+
if (parentComponent) {
|
|
4301
|
+
let subTree = parentComponent.subTree;
|
|
4302
|
+
if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
|
|
4303
|
+
const parentVNode = parentComponent.vnode;
|
|
4304
|
+
setScopeId(
|
|
4305
|
+
el,
|
|
4306
|
+
parentVNode,
|
|
4307
|
+
parentVNode.scopeId,
|
|
4308
|
+
parentVNode.slotScopeIds,
|
|
4309
|
+
parentComponent.parent
|
|
4310
|
+
);
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
};
|
|
4314
|
+
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
4315
|
+
for (let i = start; i < children.length; i++) {
|
|
4316
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
4317
|
+
patch(
|
|
4318
|
+
null,
|
|
4319
|
+
child,
|
|
4017
4320
|
container,
|
|
4018
4321
|
anchor,
|
|
4322
|
+
parentComponent,
|
|
4019
4323
|
parentSuspense,
|
|
4020
4324
|
namespace,
|
|
4325
|
+
slotScopeIds,
|
|
4021
4326
|
optimized
|
|
4022
4327
|
);
|
|
4023
4328
|
}
|
|
4024
4329
|
};
|
|
4025
|
-
const
|
|
4026
|
-
const
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
} else {
|
|
4036
|
-
n2.el = n1.el;
|
|
4037
|
-
instance.vnode = n2;
|
|
4330
|
+
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4331
|
+
const el = n2.el = n1.el;
|
|
4332
|
+
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
4333
|
+
patchFlag |= n1.patchFlag & 16;
|
|
4334
|
+
const oldProps = n1.props || shared.EMPTY_OBJ;
|
|
4335
|
+
const newProps = n2.props || shared.EMPTY_OBJ;
|
|
4336
|
+
let vnodeHook;
|
|
4337
|
+
parentComponent && toggleRecurse(parentComponent, false);
|
|
4338
|
+
if (vnodeHook = newProps.onVnodeBeforeUpdate) {
|
|
4339
|
+
invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
4038
4340
|
}
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4341
|
+
if (dirs) {
|
|
4342
|
+
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
4343
|
+
}
|
|
4344
|
+
parentComponent && toggleRecurse(parentComponent, true);
|
|
4345
|
+
if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
|
|
4346
|
+
hostSetElementText(el, "");
|
|
4347
|
+
}
|
|
4348
|
+
if (dynamicChildren) {
|
|
4349
|
+
patchBlockChildren(
|
|
4350
|
+
n1.dynamicChildren,
|
|
4351
|
+
dynamicChildren,
|
|
4352
|
+
el,
|
|
4353
|
+
parentComponent,
|
|
4354
|
+
parentSuspense,
|
|
4355
|
+
resolveChildrenNamespace(n2, namespace),
|
|
4356
|
+
slotScopeIds
|
|
4357
|
+
);
|
|
4358
|
+
} else if (!optimized) {
|
|
4359
|
+
patchChildren(
|
|
4360
|
+
n1,
|
|
4361
|
+
n2,
|
|
4362
|
+
el,
|
|
4363
|
+
null,
|
|
4364
|
+
parentComponent,
|
|
4365
|
+
parentSuspense,
|
|
4366
|
+
resolveChildrenNamespace(n2, namespace),
|
|
4367
|
+
slotScopeIds,
|
|
4368
|
+
false
|
|
4369
|
+
);
|
|
4370
|
+
}
|
|
4371
|
+
if (patchFlag > 0) {
|
|
4372
|
+
if (patchFlag & 16) {
|
|
4373
|
+
patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
4374
|
+
} else {
|
|
4375
|
+
if (patchFlag & 2) {
|
|
4376
|
+
if (oldProps.class !== newProps.class) {
|
|
4377
|
+
hostPatchProp(el, "class", null, newProps.class, namespace);
|
|
4378
|
+
}
|
|
4050
4379
|
}
|
|
4051
|
-
if (
|
|
4052
|
-
|
|
4380
|
+
if (patchFlag & 4) {
|
|
4381
|
+
hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
|
|
4053
4382
|
}
|
|
4054
|
-
|
|
4055
|
-
|
|
4383
|
+
if (patchFlag & 8) {
|
|
4384
|
+
const propsToUpdate = n2.dynamicProps;
|
|
4385
|
+
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
4386
|
+
const key = propsToUpdate[i];
|
|
4387
|
+
const prev = oldProps[key];
|
|
4388
|
+
const next = newProps[key];
|
|
4389
|
+
if (next !== prev || key === "value") {
|
|
4390
|
+
hostPatchProp(el, key, prev, next, namespace, parentComponent);
|
|
4391
|
+
}
|
|
4392
|
+
}
|
|
4393
|
+
}
|
|
4394
|
+
}
|
|
4395
|
+
if (patchFlag & 1) {
|
|
4396
|
+
if (n1.children !== n2.children) {
|
|
4397
|
+
hostSetElementText(el, n2.children);
|
|
4398
|
+
}
|
|
4399
|
+
}
|
|
4400
|
+
} else if (!optimized && dynamicChildren == null) {
|
|
4401
|
+
patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
4402
|
+
}
|
|
4403
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
4404
|
+
queuePostRenderEffect(() => {
|
|
4405
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
4406
|
+
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
4407
|
+
}, parentSuspense);
|
|
4408
|
+
}
|
|
4409
|
+
};
|
|
4410
|
+
const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
|
|
4411
|
+
for (let i = 0; i < newChildren.length; i++) {
|
|
4412
|
+
const oldVNode = oldChildren[i];
|
|
4413
|
+
const newVNode = newChildren[i];
|
|
4414
|
+
const container = (
|
|
4415
|
+
// oldVNode may be an errored async setup() component inside Suspense
|
|
4416
|
+
// which will not have a mounted element
|
|
4417
|
+
oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
|
|
4418
|
+
// of the Fragment itself so it can move its children.
|
|
4419
|
+
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
4420
|
+
// which also requires the correct parent container
|
|
4421
|
+
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
4422
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
|
|
4423
|
+
// In other cases, the parent container is not actually used so we
|
|
4424
|
+
// just pass the block element here to avoid a DOM parentNode call.
|
|
4425
|
+
fallbackContainer
|
|
4426
|
+
)
|
|
4427
|
+
);
|
|
4428
|
+
patch(
|
|
4429
|
+
oldVNode,
|
|
4430
|
+
newVNode,
|
|
4431
|
+
container,
|
|
4432
|
+
null,
|
|
4433
|
+
parentComponent,
|
|
4434
|
+
parentSuspense,
|
|
4435
|
+
namespace,
|
|
4436
|
+
slotScopeIds,
|
|
4437
|
+
true
|
|
4438
|
+
);
|
|
4439
|
+
}
|
|
4440
|
+
};
|
|
4441
|
+
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
4442
|
+
if (oldProps !== newProps) {
|
|
4443
|
+
if (oldProps !== shared.EMPTY_OBJ) {
|
|
4444
|
+
for (const key in oldProps) {
|
|
4445
|
+
if (!shared.isReservedProp(key) && !(key in newProps)) {
|
|
4446
|
+
hostPatchProp(
|
|
4447
|
+
el,
|
|
4448
|
+
key,
|
|
4449
|
+
oldProps[key],
|
|
4450
|
+
null,
|
|
4451
|
+
namespace,
|
|
4452
|
+
parentComponent
|
|
4453
|
+
);
|
|
4454
|
+
}
|
|
4455
|
+
}
|
|
4456
|
+
}
|
|
4457
|
+
for (const key in newProps) {
|
|
4458
|
+
if (shared.isReservedProp(key)) continue;
|
|
4459
|
+
const next = newProps[key];
|
|
4460
|
+
const prev = oldProps[key];
|
|
4461
|
+
if (next !== prev && key !== "value") {
|
|
4462
|
+
hostPatchProp(el, key, prev, next, namespace, parentComponent);
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
if ("value" in newProps) {
|
|
4466
|
+
hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
};
|
|
4470
|
+
const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4471
|
+
const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
|
|
4472
|
+
const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
|
|
4473
|
+
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
|
|
4474
|
+
if (fragmentSlotScopeIds) {
|
|
4475
|
+
slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4476
|
+
}
|
|
4477
|
+
if (n1 == null) {
|
|
4478
|
+
hostInsert(fragmentStartAnchor, container, anchor);
|
|
4479
|
+
hostInsert(fragmentEndAnchor, container, anchor);
|
|
4480
|
+
mountChildren(
|
|
4481
|
+
// #10007
|
|
4482
|
+
// such fragment like `<></>` will be compiled into
|
|
4483
|
+
// a fragment which doesn't have a children.
|
|
4484
|
+
// In this case fallback to an empty array
|
|
4485
|
+
n2.children || [],
|
|
4486
|
+
container,
|
|
4487
|
+
fragmentEndAnchor,
|
|
4488
|
+
parentComponent,
|
|
4489
|
+
parentSuspense,
|
|
4490
|
+
namespace,
|
|
4491
|
+
slotScopeIds,
|
|
4492
|
+
optimized
|
|
4493
|
+
);
|
|
4494
|
+
} else {
|
|
4495
|
+
if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
|
|
4496
|
+
// of renderSlot() with no valid children
|
|
4497
|
+
n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
|
|
4498
|
+
patchBlockChildren(
|
|
4499
|
+
n1.dynamicChildren,
|
|
4500
|
+
dynamicChildren,
|
|
4501
|
+
container,
|
|
4502
|
+
parentComponent,
|
|
4503
|
+
parentSuspense,
|
|
4504
|
+
namespace,
|
|
4505
|
+
slotScopeIds
|
|
4506
|
+
);
|
|
4507
|
+
if (
|
|
4508
|
+
// #2080 if the stable fragment has a key, it's a <template v-for> that may
|
|
4509
|
+
// get moved around. Make sure all root level vnodes inherit el.
|
|
4510
|
+
// #2134 or if it's a component root, it may also get moved around
|
|
4511
|
+
// as the component is being moved.
|
|
4512
|
+
n2.key != null || parentComponent && n2 === parentComponent.subTree
|
|
4513
|
+
) {
|
|
4514
|
+
traverseStaticChildren(
|
|
4515
|
+
n1,
|
|
4516
|
+
n2,
|
|
4517
|
+
true
|
|
4518
|
+
/* shallow */
|
|
4519
|
+
);
|
|
4520
|
+
}
|
|
4521
|
+
} else {
|
|
4522
|
+
patchChildren(
|
|
4523
|
+
n1,
|
|
4524
|
+
n2,
|
|
4525
|
+
container,
|
|
4526
|
+
fragmentEndAnchor,
|
|
4527
|
+
parentComponent,
|
|
4528
|
+
parentSuspense,
|
|
4529
|
+
namespace,
|
|
4530
|
+
slotScopeIds,
|
|
4531
|
+
optimized
|
|
4532
|
+
);
|
|
4533
|
+
}
|
|
4534
|
+
}
|
|
4535
|
+
};
|
|
4536
|
+
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4537
|
+
n2.slotScopeIds = slotScopeIds;
|
|
4538
|
+
if (n1 == null) {
|
|
4539
|
+
if (n2.shapeFlag & 512) {
|
|
4540
|
+
parentComponent.ctx.activate(
|
|
4541
|
+
n2,
|
|
4542
|
+
container,
|
|
4543
|
+
anchor,
|
|
4544
|
+
namespace,
|
|
4545
|
+
optimized
|
|
4546
|
+
);
|
|
4547
|
+
} else {
|
|
4548
|
+
mountComponent(
|
|
4549
|
+
n2,
|
|
4550
|
+
container,
|
|
4551
|
+
anchor,
|
|
4552
|
+
parentComponent,
|
|
4553
|
+
parentSuspense,
|
|
4554
|
+
namespace,
|
|
4555
|
+
optimized
|
|
4556
|
+
);
|
|
4557
|
+
}
|
|
4558
|
+
} else {
|
|
4559
|
+
updateComponent(n1, n2, optimized);
|
|
4560
|
+
}
|
|
4561
|
+
};
|
|
4562
|
+
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
4563
|
+
const instance = (initialVNode.component = createComponentInstance(
|
|
4564
|
+
initialVNode,
|
|
4565
|
+
parentComponent,
|
|
4566
|
+
parentSuspense
|
|
4567
|
+
));
|
|
4568
|
+
if (isKeepAlive(initialVNode)) {
|
|
4569
|
+
instance.ctx.renderer = internals;
|
|
4570
|
+
}
|
|
4571
|
+
{
|
|
4572
|
+
setupComponent(instance, false, optimized);
|
|
4573
|
+
}
|
|
4574
|
+
if (instance.asyncDep) {
|
|
4575
|
+
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
|
|
4576
|
+
if (!initialVNode.el) {
|
|
4577
|
+
const placeholder = instance.subTree = createVNode(Comment);
|
|
4578
|
+
processCommentNode(null, placeholder, container, anchor);
|
|
4579
|
+
initialVNode.placeholder = placeholder.el;
|
|
4580
|
+
}
|
|
4581
|
+
} else {
|
|
4582
|
+
setupRenderEffect(
|
|
4583
|
+
instance,
|
|
4584
|
+
initialVNode,
|
|
4585
|
+
container,
|
|
4586
|
+
anchor,
|
|
4587
|
+
parentSuspense,
|
|
4588
|
+
namespace,
|
|
4589
|
+
optimized
|
|
4590
|
+
);
|
|
4591
|
+
}
|
|
4592
|
+
};
|
|
4593
|
+
const updateComponent = (n1, n2, optimized) => {
|
|
4594
|
+
const instance = n2.component = n1.component;
|
|
4595
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
4596
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
4597
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
4598
|
+
return;
|
|
4599
|
+
} else {
|
|
4600
|
+
instance.next = n2;
|
|
4601
|
+
instance.update();
|
|
4602
|
+
}
|
|
4603
|
+
} else {
|
|
4604
|
+
n2.el = n1.el;
|
|
4605
|
+
instance.vnode = n2;
|
|
4606
|
+
}
|
|
4607
|
+
};
|
|
4608
|
+
const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
|
|
4609
|
+
const componentUpdateFn = () => {
|
|
4610
|
+
if (!instance.isMounted) {
|
|
4611
|
+
let vnodeHook;
|
|
4612
|
+
const { el, props } = initialVNode;
|
|
4613
|
+
const { bm, m, parent, root, type } = instance;
|
|
4614
|
+
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
4615
|
+
toggleRecurse(instance, false);
|
|
4616
|
+
if (bm) {
|
|
4617
|
+
shared.invokeArrayFns(bm);
|
|
4618
|
+
}
|
|
4619
|
+
if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
4620
|
+
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
4621
|
+
}
|
|
4622
|
+
toggleRecurse(instance, true);
|
|
4623
|
+
if (el && hydrateNode) {
|
|
4056
4624
|
const hydrateSubTree = () => {
|
|
4057
4625
|
instance.subTree = renderComponentRoot(instance);
|
|
4058
4626
|
hydrateNode(
|
|
@@ -4073,9 +4641,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4073
4641
|
hydrateSubTree();
|
|
4074
4642
|
}
|
|
4075
4643
|
} else {
|
|
4076
|
-
if (root.ce &&
|
|
4077
|
-
|
|
4078
|
-
|
|
4644
|
+
if (root.ce && root.ce._hasShadowRoot()) {
|
|
4645
|
+
root.ce._injectChildStyle(
|
|
4646
|
+
type,
|
|
4647
|
+
instance.parent ? instance.parent.type : void 0
|
|
4648
|
+
);
|
|
4079
4649
|
}
|
|
4080
4650
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
4081
4651
|
patch(
|
|
@@ -4114,9 +4684,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4114
4684
|
updateComponentPreRender(instance, next, optimized);
|
|
4115
4685
|
}
|
|
4116
4686
|
nonHydratedAsyncRoot.asyncDep.then(() => {
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
}
|
|
4687
|
+
queuePostRenderEffect(() => {
|
|
4688
|
+
if (!instance.isUnmounted) update();
|
|
4689
|
+
}, parentSuspense);
|
|
4120
4690
|
});
|
|
4121
4691
|
return;
|
|
4122
4692
|
}
|
|
@@ -4443,8 +5013,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4443
5013
|
const nextChild = c2[nextIndex];
|
|
4444
5014
|
const anchorVNode = c2[nextIndex + 1];
|
|
4445
5015
|
const anchor = nextIndex + 1 < l2 ? (
|
|
4446
|
-
// #13559, fallback to el placeholder for unresolved async component
|
|
4447
|
-
anchorVNode.el || anchorVNode
|
|
5016
|
+
// #13559, #14173 fallback to el placeholder for unresolved async component
|
|
5017
|
+
anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
|
|
4448
5018
|
) : parentAnchor;
|
|
4449
5019
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
4450
5020
|
patch(
|
|
@@ -4485,828 +5055,370 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4485
5055
|
if (type === Fragment) {
|
|
4486
5056
|
hostInsert(el, container, anchor);
|
|
4487
5057
|
for (let i = 0; i < children.length; i++) {
|
|
4488
|
-
move(children[i], container, anchor, moveType);
|
|
4489
|
-
}
|
|
4490
|
-
hostInsert(vnode.anchor, container, anchor);
|
|
4491
|
-
return;
|
|
4492
|
-
}
|
|
4493
|
-
if (type === Static) {
|
|
4494
|
-
moveStaticNode(vnode, container, anchor);
|
|
4495
|
-
return;
|
|
4496
|
-
}
|
|
4497
|
-
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
4498
|
-
if (needTransition2) {
|
|
4499
|
-
if (moveType === 0) {
|
|
4500
|
-
transition.beforeEnter(el);
|
|
4501
|
-
hostInsert(el, container, anchor);
|
|
4502
|
-
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
4503
|
-
} else {
|
|
4504
|
-
const { leave, delayLeave, afterLeave } = transition;
|
|
4505
|
-
const remove2 = () => {
|
|
4506
|
-
if (vnode.ctx.isUnmounted) {
|
|
4507
|
-
hostRemove(el);
|
|
4508
|
-
} else {
|
|
4509
|
-
hostInsert(el, container, anchor);
|
|
4510
|
-
}
|
|
4511
|
-
};
|
|
4512
|
-
const performLeave = () => {
|
|
4513
|
-
if (el._isLeaving) {
|
|
4514
|
-
el[leaveCbKey](
|
|
4515
|
-
true
|
|
4516
|
-
/* cancelled */
|
|
4517
|
-
);
|
|
4518
|
-
}
|
|
4519
|
-
leave(el, () => {
|
|
4520
|
-
remove2();
|
|
4521
|
-
afterLeave && afterLeave();
|
|
4522
|
-
});
|
|
4523
|
-
};
|
|
4524
|
-
if (delayLeave) {
|
|
4525
|
-
delayLeave(el, remove2, performLeave);
|
|
4526
|
-
} else {
|
|
4527
|
-
performLeave();
|
|
4528
|
-
}
|
|
4529
|
-
}
|
|
4530
|
-
} else {
|
|
4531
|
-
hostInsert(el, container, anchor);
|
|
4532
|
-
}
|
|
4533
|
-
};
|
|
4534
|
-
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
4535
|
-
const {
|
|
4536
|
-
type,
|
|
4537
|
-
props,
|
|
4538
|
-
ref,
|
|
4539
|
-
children,
|
|
4540
|
-
dynamicChildren,
|
|
4541
|
-
shapeFlag,
|
|
4542
|
-
patchFlag,
|
|
4543
|
-
dirs,
|
|
4544
|
-
cacheIndex
|
|
4545
|
-
} = vnode;
|
|
4546
|
-
if (patchFlag === -2) {
|
|
4547
|
-
optimized = false;
|
|
4548
|
-
}
|
|
4549
|
-
if (ref != null) {
|
|
4550
|
-
reactivity.pauseTracking();
|
|
4551
|
-
setRef(ref, null, parentSuspense, vnode, true);
|
|
4552
|
-
reactivity.resetTracking();
|
|
4553
|
-
}
|
|
4554
|
-
if (cacheIndex != null) {
|
|
4555
|
-
parentComponent.renderCache[cacheIndex] = void 0;
|
|
4556
|
-
}
|
|
4557
|
-
if (shapeFlag & 256) {
|
|
4558
|
-
parentComponent.ctx.deactivate(vnode);
|
|
4559
|
-
return;
|
|
4560
|
-
}
|
|
4561
|
-
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
4562
|
-
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
4563
|
-
let vnodeHook;
|
|
4564
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
4565
|
-
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4566
|
-
}
|
|
4567
|
-
if (shapeFlag & 6) {
|
|
4568
|
-
unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
4569
|
-
} else {
|
|
4570
|
-
if (shapeFlag & 128) {
|
|
4571
|
-
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
4572
|
-
return;
|
|
4573
|
-
}
|
|
4574
|
-
if (shouldInvokeDirs) {
|
|
4575
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
4576
|
-
}
|
|
4577
|
-
if (shapeFlag & 64) {
|
|
4578
|
-
vnode.type.remove(
|
|
4579
|
-
vnode,
|
|
4580
|
-
parentComponent,
|
|
4581
|
-
parentSuspense,
|
|
4582
|
-
internals,
|
|
4583
|
-
doRemove
|
|
4584
|
-
);
|
|
4585
|
-
} else if (dynamicChildren && // #5154
|
|
4586
|
-
// when v-once is used inside a block, setBlockTracking(-1) marks the
|
|
4587
|
-
// parent block with hasOnce: true
|
|
4588
|
-
// so that it doesn't take the fast path during unmount - otherwise
|
|
4589
|
-
// components nested in v-once are never unmounted.
|
|
4590
|
-
!dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
4591
|
-
(type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
|
|
4592
|
-
unmountChildren(
|
|
4593
|
-
dynamicChildren,
|
|
4594
|
-
parentComponent,
|
|
4595
|
-
parentSuspense,
|
|
4596
|
-
false,
|
|
4597
|
-
true
|
|
4598
|
-
);
|
|
4599
|
-
} else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
|
|
4600
|
-
unmountChildren(children, parentComponent, parentSuspense);
|
|
4601
|
-
}
|
|
4602
|
-
if (doRemove) {
|
|
4603
|
-
remove(vnode);
|
|
4604
|
-
}
|
|
4605
|
-
}
|
|
4606
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
|
|
4607
|
-
queuePostRenderEffect(() => {
|
|
4608
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4609
|
-
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
4610
|
-
}, parentSuspense);
|
|
4611
|
-
}
|
|
4612
|
-
};
|
|
4613
|
-
const remove = (vnode) => {
|
|
4614
|
-
const { type, el, anchor, transition } = vnode;
|
|
4615
|
-
if (type === Fragment) {
|
|
4616
|
-
{
|
|
4617
|
-
removeFragment(el, anchor);
|
|
4618
|
-
}
|
|
4619
|
-
return;
|
|
4620
|
-
}
|
|
4621
|
-
if (type === Static) {
|
|
4622
|
-
removeStaticNode(vnode);
|
|
4623
|
-
return;
|
|
4624
|
-
}
|
|
4625
|
-
const performRemove = () => {
|
|
4626
|
-
hostRemove(el);
|
|
4627
|
-
if (transition && !transition.persisted && transition.afterLeave) {
|
|
4628
|
-
transition.afterLeave();
|
|
4629
|
-
}
|
|
4630
|
-
};
|
|
4631
|
-
if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
4632
|
-
const { leave, delayLeave } = transition;
|
|
4633
|
-
const performLeave = () => leave(el, performRemove);
|
|
4634
|
-
if (delayLeave) {
|
|
4635
|
-
delayLeave(vnode.el, performRemove, performLeave);
|
|
4636
|
-
} else {
|
|
4637
|
-
performLeave();
|
|
4638
|
-
}
|
|
4639
|
-
} else {
|
|
4640
|
-
performRemove();
|
|
4641
|
-
}
|
|
4642
|
-
};
|
|
4643
|
-
const removeFragment = (cur, end) => {
|
|
4644
|
-
let next;
|
|
4645
|
-
while (cur !== end) {
|
|
4646
|
-
next = hostNextSibling(cur);
|
|
4647
|
-
hostRemove(cur);
|
|
4648
|
-
cur = next;
|
|
4649
|
-
}
|
|
4650
|
-
hostRemove(end);
|
|
4651
|
-
};
|
|
4652
|
-
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
4653
|
-
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
4654
|
-
invalidateMount(m);
|
|
4655
|
-
invalidateMount(a);
|
|
4656
|
-
if (bum) {
|
|
4657
|
-
shared.invokeArrayFns(bum);
|
|
4658
|
-
}
|
|
4659
|
-
scope.stop();
|
|
4660
|
-
if (job) {
|
|
4661
|
-
job.flags |= 8;
|
|
4662
|
-
unmount(subTree, instance, parentSuspense, doRemove);
|
|
4663
|
-
}
|
|
4664
|
-
if (um) {
|
|
4665
|
-
queuePostRenderEffect(um, parentSuspense);
|
|
4666
|
-
}
|
|
4667
|
-
queuePostRenderEffect(() => {
|
|
4668
|
-
instance.isUnmounted = true;
|
|
4669
|
-
}, parentSuspense);
|
|
4670
|
-
};
|
|
4671
|
-
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
4672
|
-
for (let i = start; i < children.length; i++) {
|
|
4673
|
-
unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
|
|
4674
|
-
}
|
|
4675
|
-
};
|
|
4676
|
-
const getNextHostNode = (vnode) => {
|
|
4677
|
-
if (vnode.shapeFlag & 6) {
|
|
4678
|
-
return getNextHostNode(vnode.component.subTree);
|
|
4679
|
-
}
|
|
4680
|
-
if (vnode.shapeFlag & 128) {
|
|
4681
|
-
return vnode.suspense.next();
|
|
4682
|
-
}
|
|
4683
|
-
const el = hostNextSibling(vnode.anchor || vnode.el);
|
|
4684
|
-
const teleportEnd = el && el[TeleportEndKey];
|
|
4685
|
-
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
4686
|
-
};
|
|
4687
|
-
let isFlushing = false;
|
|
4688
|
-
const render = (vnode, container, namespace) => {
|
|
4689
|
-
if (vnode == null) {
|
|
4690
|
-
if (container._vnode) {
|
|
4691
|
-
unmount(container._vnode, null, null, true);
|
|
4692
|
-
}
|
|
4693
|
-
} else {
|
|
4694
|
-
patch(
|
|
4695
|
-
container._vnode || null,
|
|
4696
|
-
vnode,
|
|
4697
|
-
container,
|
|
4698
|
-
null,
|
|
4699
|
-
null,
|
|
4700
|
-
null,
|
|
4701
|
-
namespace
|
|
4702
|
-
);
|
|
4703
|
-
}
|
|
4704
|
-
container._vnode = vnode;
|
|
4705
|
-
if (!isFlushing) {
|
|
4706
|
-
isFlushing = true;
|
|
4707
|
-
flushPreFlushCbs();
|
|
4708
|
-
flushPostFlushCbs();
|
|
4709
|
-
isFlushing = false;
|
|
4710
|
-
}
|
|
4711
|
-
};
|
|
4712
|
-
const internals = {
|
|
4713
|
-
p: patch,
|
|
4714
|
-
um: unmount,
|
|
4715
|
-
m: move,
|
|
4716
|
-
r: remove,
|
|
4717
|
-
mt: mountComponent,
|
|
4718
|
-
mc: mountChildren,
|
|
4719
|
-
pc: patchChildren,
|
|
4720
|
-
pbc: patchBlockChildren,
|
|
4721
|
-
n: getNextHostNode,
|
|
4722
|
-
o: options
|
|
4723
|
-
};
|
|
4724
|
-
let hydrate;
|
|
4725
|
-
let hydrateNode;
|
|
4726
|
-
if (createHydrationFns) {
|
|
4727
|
-
[hydrate, hydrateNode] = createHydrationFns(
|
|
4728
|
-
internals
|
|
4729
|
-
);
|
|
4730
|
-
}
|
|
4731
|
-
return {
|
|
4732
|
-
render,
|
|
4733
|
-
hydrate,
|
|
4734
|
-
createApp: createAppAPI(render, hydrate)
|
|
4735
|
-
};
|
|
4736
|
-
}
|
|
4737
|
-
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
4738
|
-
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
4739
|
-
}
|
|
4740
|
-
function toggleRecurse({ effect, job }, allowed) {
|
|
4741
|
-
if (allowed) {
|
|
4742
|
-
effect.flags |= 32;
|
|
4743
|
-
job.flags |= 4;
|
|
4744
|
-
} else {
|
|
4745
|
-
effect.flags &= -33;
|
|
4746
|
-
job.flags &= -5;
|
|
4747
|
-
}
|
|
4748
|
-
}
|
|
4749
|
-
function needTransition(parentSuspense, transition) {
|
|
4750
|
-
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
4751
|
-
}
|
|
4752
|
-
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
4753
|
-
const ch1 = n1.children;
|
|
4754
|
-
const ch2 = n2.children;
|
|
4755
|
-
if (shared.isArray(ch1) && shared.isArray(ch2)) {
|
|
4756
|
-
for (let i = 0; i < ch1.length; i++) {
|
|
4757
|
-
const c1 = ch1[i];
|
|
4758
|
-
let c2 = ch2[i];
|
|
4759
|
-
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
4760
|
-
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
4761
|
-
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
4762
|
-
c2.el = c1.el;
|
|
4763
|
-
}
|
|
4764
|
-
if (!shallow && c2.patchFlag !== -2)
|
|
4765
|
-
traverseStaticChildren(c1, c2);
|
|
4766
|
-
}
|
|
4767
|
-
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
4768
|
-
c2.patchFlag !== -1) {
|
|
4769
|
-
c2.el = c1.el;
|
|
4770
|
-
}
|
|
4771
|
-
if (c2.type === Comment && !c2.el) {
|
|
4772
|
-
c2.el = c1.el;
|
|
4773
|
-
}
|
|
4774
|
-
}
|
|
4775
|
-
}
|
|
4776
|
-
}
|
|
4777
|
-
function getSequence(arr) {
|
|
4778
|
-
const p = arr.slice();
|
|
4779
|
-
const result = [0];
|
|
4780
|
-
let i, j, u, v, c;
|
|
4781
|
-
const len = arr.length;
|
|
4782
|
-
for (i = 0; i < len; i++) {
|
|
4783
|
-
const arrI = arr[i];
|
|
4784
|
-
if (arrI !== 0) {
|
|
4785
|
-
j = result[result.length - 1];
|
|
4786
|
-
if (arr[j] < arrI) {
|
|
4787
|
-
p[i] = j;
|
|
4788
|
-
result.push(i);
|
|
4789
|
-
continue;
|
|
5058
|
+
move(children[i], container, anchor, moveType);
|
|
4790
5059
|
}
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
5060
|
+
hostInsert(vnode.anchor, container, anchor);
|
|
5061
|
+
return;
|
|
5062
|
+
}
|
|
5063
|
+
if (type === Static) {
|
|
5064
|
+
moveStaticNode(vnode, container, anchor);
|
|
5065
|
+
return;
|
|
5066
|
+
}
|
|
5067
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
5068
|
+
if (needTransition2) {
|
|
5069
|
+
if (moveType === 0) {
|
|
5070
|
+
transition.beforeEnter(el);
|
|
5071
|
+
hostInsert(el, container, anchor);
|
|
5072
|
+
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
5073
|
+
} else {
|
|
5074
|
+
const { leave, delayLeave, afterLeave } = transition;
|
|
5075
|
+
const remove2 = () => {
|
|
5076
|
+
if (vnode.ctx.isUnmounted) {
|
|
5077
|
+
hostRemove(el);
|
|
5078
|
+
} else {
|
|
5079
|
+
hostInsert(el, container, anchor);
|
|
5080
|
+
}
|
|
5081
|
+
};
|
|
5082
|
+
const performLeave = () => {
|
|
5083
|
+
if (el._isLeaving) {
|
|
5084
|
+
el[leaveCbKey](
|
|
5085
|
+
true
|
|
5086
|
+
/* cancelled */
|
|
5087
|
+
);
|
|
5088
|
+
}
|
|
5089
|
+
leave(el, () => {
|
|
5090
|
+
remove2();
|
|
5091
|
+
afterLeave && afterLeave();
|
|
5092
|
+
});
|
|
5093
|
+
};
|
|
5094
|
+
if (delayLeave) {
|
|
5095
|
+
delayLeave(el, remove2, performLeave);
|
|
4797
5096
|
} else {
|
|
4798
|
-
|
|
4799
|
-
}
|
|
4800
|
-
}
|
|
4801
|
-
if (arrI < arr[result[u]]) {
|
|
4802
|
-
if (u > 0) {
|
|
4803
|
-
p[i] = result[u - 1];
|
|
5097
|
+
performLeave();
|
|
4804
5098
|
}
|
|
4805
|
-
result[u] = i;
|
|
4806
5099
|
}
|
|
4807
|
-
}
|
|
4808
|
-
}
|
|
4809
|
-
u = result.length;
|
|
4810
|
-
v = result[u - 1];
|
|
4811
|
-
while (u-- > 0) {
|
|
4812
|
-
result[u] = v;
|
|
4813
|
-
v = p[v];
|
|
4814
|
-
}
|
|
4815
|
-
return result;
|
|
4816
|
-
}
|
|
4817
|
-
function locateNonHydratedAsyncRoot(instance) {
|
|
4818
|
-
const subComponent = instance.subTree.component;
|
|
4819
|
-
if (subComponent) {
|
|
4820
|
-
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
4821
|
-
return subComponent;
|
|
4822
5100
|
} else {
|
|
4823
|
-
|
|
5101
|
+
hostInsert(el, container, anchor);
|
|
4824
5102
|
}
|
|
4825
|
-
}
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
function watchEffect(effect, options) {
|
|
4843
|
-
return doWatch(effect, null, options);
|
|
4844
|
-
}
|
|
4845
|
-
function watchPostEffect(effect, options) {
|
|
4846
|
-
return doWatch(
|
|
4847
|
-
effect,
|
|
4848
|
-
null,
|
|
4849
|
-
{ flush: "post" }
|
|
4850
|
-
);
|
|
4851
|
-
}
|
|
4852
|
-
function watchSyncEffect(effect, options) {
|
|
4853
|
-
return doWatch(
|
|
4854
|
-
effect,
|
|
4855
|
-
null,
|
|
4856
|
-
{ flush: "sync" }
|
|
4857
|
-
);
|
|
4858
|
-
}
|
|
4859
|
-
function watch(source, cb, options) {
|
|
4860
|
-
return doWatch(source, cb, options);
|
|
4861
|
-
}
|
|
4862
|
-
function doWatch(source, cb, options = shared.EMPTY_OBJ) {
|
|
4863
|
-
const { immediate, deep, flush, once } = options;
|
|
4864
|
-
const baseWatchOptions = shared.extend({}, options);
|
|
4865
|
-
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
4866
|
-
let ssrCleanup;
|
|
4867
|
-
if (isInSSRComponentSetup) {
|
|
4868
|
-
if (flush === "sync") {
|
|
4869
|
-
const ctx = useSSRContext();
|
|
4870
|
-
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
4871
|
-
} else if (!runsImmediately) {
|
|
4872
|
-
const watchStopHandle = () => {
|
|
4873
|
-
};
|
|
4874
|
-
watchStopHandle.stop = shared.NOOP;
|
|
4875
|
-
watchStopHandle.resume = shared.NOOP;
|
|
4876
|
-
watchStopHandle.pause = shared.NOOP;
|
|
4877
|
-
return watchStopHandle;
|
|
5103
|
+
};
|
|
5104
|
+
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
5105
|
+
const {
|
|
5106
|
+
type,
|
|
5107
|
+
props,
|
|
5108
|
+
ref,
|
|
5109
|
+
children,
|
|
5110
|
+
dynamicChildren,
|
|
5111
|
+
shapeFlag,
|
|
5112
|
+
patchFlag,
|
|
5113
|
+
dirs,
|
|
5114
|
+
cacheIndex,
|
|
5115
|
+
memo
|
|
5116
|
+
} = vnode;
|
|
5117
|
+
if (patchFlag === -2) {
|
|
5118
|
+
optimized = false;
|
|
4878
5119
|
}
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
if (flush === "post") {
|
|
4884
|
-
baseWatchOptions.scheduler = (job) => {
|
|
4885
|
-
queuePostRenderEffect(job, instance && instance.suspense);
|
|
4886
|
-
};
|
|
4887
|
-
} else if (flush !== "sync") {
|
|
4888
|
-
isPre = true;
|
|
4889
|
-
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
4890
|
-
if (isFirstRun) {
|
|
4891
|
-
job();
|
|
4892
|
-
} else {
|
|
4893
|
-
queueJob(job);
|
|
4894
|
-
}
|
|
4895
|
-
};
|
|
4896
|
-
}
|
|
4897
|
-
baseWatchOptions.augmentJob = (job) => {
|
|
4898
|
-
if (cb) {
|
|
4899
|
-
job.flags |= 4;
|
|
5120
|
+
if (ref != null) {
|
|
5121
|
+
reactivity.pauseTracking();
|
|
5122
|
+
setRef(ref, null, parentSuspense, vnode, true);
|
|
5123
|
+
reactivity.resetTracking();
|
|
4900
5124
|
}
|
|
4901
|
-
if (
|
|
4902
|
-
|
|
4903
|
-
if (instance) {
|
|
4904
|
-
job.id = instance.uid;
|
|
4905
|
-
job.i = instance;
|
|
4906
|
-
}
|
|
5125
|
+
if (cacheIndex != null) {
|
|
5126
|
+
parentComponent.renderCache[cacheIndex] = void 0;
|
|
4907
5127
|
}
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
if (ssrCleanup) {
|
|
4912
|
-
ssrCleanup.push(watchHandle);
|
|
4913
|
-
} else if (runsImmediately) {
|
|
4914
|
-
watchHandle();
|
|
5128
|
+
if (shapeFlag & 256) {
|
|
5129
|
+
parentComponent.ctx.deactivate(vnode);
|
|
5130
|
+
return;
|
|
4915
5131
|
}
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
4922
|
-
let cb;
|
|
4923
|
-
if (shared.isFunction(value)) {
|
|
4924
|
-
cb = value;
|
|
4925
|
-
} else {
|
|
4926
|
-
cb = value.handler;
|
|
4927
|
-
options = value;
|
|
4928
|
-
}
|
|
4929
|
-
const reset = setCurrentInstance(this);
|
|
4930
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4931
|
-
reset();
|
|
4932
|
-
return res;
|
|
4933
|
-
}
|
|
4934
|
-
function createPathGetter(ctx, path) {
|
|
4935
|
-
const segments = path.split(".");
|
|
4936
|
-
return () => {
|
|
4937
|
-
let cur = ctx;
|
|
4938
|
-
for (let i = 0; i < segments.length && cur; i++) {
|
|
4939
|
-
cur = cur[segments[i]];
|
|
5132
|
+
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
5133
|
+
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
5134
|
+
let vnodeHook;
|
|
5135
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
5136
|
+
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4940
5137
|
}
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
}
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
5138
|
+
if (shapeFlag & 6) {
|
|
5139
|
+
unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
5140
|
+
} else {
|
|
5141
|
+
if (shapeFlag & 128) {
|
|
5142
|
+
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
5143
|
+
return;
|
|
5144
|
+
}
|
|
5145
|
+
if (shouldInvokeDirs) {
|
|
5146
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
5147
|
+
}
|
|
5148
|
+
if (shapeFlag & 64) {
|
|
5149
|
+
vnode.type.remove(
|
|
5150
|
+
vnode,
|
|
5151
|
+
parentComponent,
|
|
5152
|
+
parentSuspense,
|
|
5153
|
+
internals,
|
|
5154
|
+
doRemove
|
|
5155
|
+
);
|
|
5156
|
+
} else if (dynamicChildren && // #5154
|
|
5157
|
+
// when v-once is used inside a block, setBlockTracking(-1) marks the
|
|
5158
|
+
// parent block with hasOnce: true
|
|
5159
|
+
// so that it doesn't take the fast path during unmount - otherwise
|
|
5160
|
+
// components nested in v-once are never unmounted.
|
|
5161
|
+
!dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
5162
|
+
(type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
|
|
5163
|
+
unmountChildren(
|
|
5164
|
+
dynamicChildren,
|
|
5165
|
+
parentComponent,
|
|
5166
|
+
parentSuspense,
|
|
5167
|
+
false,
|
|
5168
|
+
true
|
|
5169
|
+
);
|
|
5170
|
+
} else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
|
|
5171
|
+
unmountChildren(children, parentComponent, parentSuspense);
|
|
4959
5172
|
}
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
get() {
|
|
4963
|
-
track();
|
|
4964
|
-
return options.get ? options.get(localValue) : localValue;
|
|
4965
|
-
},
|
|
4966
|
-
set(value) {
|
|
4967
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
4968
|
-
if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) {
|
|
4969
|
-
return;
|
|
4970
|
-
}
|
|
4971
|
-
const rawProps = i.vnode.props;
|
|
4972
|
-
if (!(rawProps && // check if parent has passed v-model
|
|
4973
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
|
|
4974
|
-
localValue = value;
|
|
4975
|
-
trigger();
|
|
4976
|
-
}
|
|
4977
|
-
i.emit(`update:${name}`, emittedValue);
|
|
4978
|
-
if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {
|
|
4979
|
-
trigger();
|
|
4980
|
-
}
|
|
4981
|
-
prevSetValue = value;
|
|
4982
|
-
prevEmittedValue = emittedValue;
|
|
5173
|
+
if (doRemove) {
|
|
5174
|
+
remove(vnode);
|
|
4983
5175
|
}
|
|
4984
|
-
}
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
if (
|
|
4991
|
-
|
|
4992
|
-
} else {
|
|
4993
|
-
return { done: true };
|
|
5176
|
+
}
|
|
5177
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
5178
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
5179
|
+
queuePostRenderEffect(() => {
|
|
5180
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
5181
|
+
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
5182
|
+
if (shouldInvalidateMemo) {
|
|
5183
|
+
vnode.el = null;
|
|
4994
5184
|
}
|
|
4995
|
-
}
|
|
4996
|
-
};
|
|
4997
|
-
};
|
|
4998
|
-
return res;
|
|
4999
|
-
}
|
|
5000
|
-
const getModelModifiers = (props, modelName) => {
|
|
5001
|
-
return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${shared.camelize(modelName)}Modifiers`] || props[`${shared.hyphenate(modelName)}Modifiers`];
|
|
5002
|
-
};
|
|
5003
|
-
|
|
5004
|
-
function emit(instance, event, ...rawArgs) {
|
|
5005
|
-
if (instance.isUnmounted) return;
|
|
5006
|
-
const props = instance.vnode.props || shared.EMPTY_OBJ;
|
|
5007
|
-
let args = rawArgs;
|
|
5008
|
-
const isModelListener = event.startsWith("update:");
|
|
5009
|
-
const modifiers = isModelListener && getModelModifiers(props, event.slice(7));
|
|
5010
|
-
if (modifiers) {
|
|
5011
|
-
if (modifiers.trim) {
|
|
5012
|
-
args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a);
|
|
5185
|
+
}, parentSuspense);
|
|
5013
5186
|
}
|
|
5014
|
-
|
|
5015
|
-
|
|
5187
|
+
};
|
|
5188
|
+
const remove = (vnode) => {
|
|
5189
|
+
const { type, el, anchor, transition } = vnode;
|
|
5190
|
+
if (type === Fragment) {
|
|
5191
|
+
{
|
|
5192
|
+
removeFragment(el, anchor);
|
|
5193
|
+
}
|
|
5194
|
+
return;
|
|
5016
5195
|
}
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249)
|
|
5020
|
-
props[handlerName = shared.toHandlerKey(shared.camelize(event))];
|
|
5021
|
-
if (!handler && isModelListener) {
|
|
5022
|
-
handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))];
|
|
5023
|
-
}
|
|
5024
|
-
if (handler) {
|
|
5025
|
-
callWithAsyncErrorHandling(
|
|
5026
|
-
handler,
|
|
5027
|
-
instance,
|
|
5028
|
-
6,
|
|
5029
|
-
args
|
|
5030
|
-
);
|
|
5031
|
-
}
|
|
5032
|
-
const onceHandler = props[handlerName + `Once`];
|
|
5033
|
-
if (onceHandler) {
|
|
5034
|
-
if (!instance.emitted) {
|
|
5035
|
-
instance.emitted = {};
|
|
5036
|
-
} else if (instance.emitted[handlerName]) {
|
|
5196
|
+
if (type === Static) {
|
|
5197
|
+
removeStaticNode(vnode);
|
|
5037
5198
|
return;
|
|
5038
5199
|
}
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
6,
|
|
5044
|
-
args
|
|
5045
|
-
);
|
|
5046
|
-
}
|
|
5047
|
-
}
|
|
5048
|
-
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
5049
|
-
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
5050
|
-
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
5051
|
-
const cached = cache.get(comp);
|
|
5052
|
-
if (cached !== void 0) {
|
|
5053
|
-
return cached;
|
|
5054
|
-
}
|
|
5055
|
-
const raw = comp.emits;
|
|
5056
|
-
let normalized = {};
|
|
5057
|
-
let hasExtends = false;
|
|
5058
|
-
if (!shared.isFunction(comp)) {
|
|
5059
|
-
const extendEmits = (raw2) => {
|
|
5060
|
-
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
5061
|
-
if (normalizedFromExtend) {
|
|
5062
|
-
hasExtends = true;
|
|
5063
|
-
shared.extend(normalized, normalizedFromExtend);
|
|
5200
|
+
const performRemove = () => {
|
|
5201
|
+
hostRemove(el);
|
|
5202
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
5203
|
+
transition.afterLeave();
|
|
5064
5204
|
}
|
|
5065
5205
|
};
|
|
5066
|
-
if (
|
|
5067
|
-
|
|
5206
|
+
if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
5207
|
+
const { leave, delayLeave } = transition;
|
|
5208
|
+
const performLeave = () => leave(el, performRemove);
|
|
5209
|
+
if (delayLeave) {
|
|
5210
|
+
delayLeave(vnode.el, performRemove, performLeave);
|
|
5211
|
+
} else {
|
|
5212
|
+
performLeave();
|
|
5213
|
+
}
|
|
5214
|
+
} else {
|
|
5215
|
+
performRemove();
|
|
5068
5216
|
}
|
|
5069
|
-
|
|
5070
|
-
|
|
5217
|
+
};
|
|
5218
|
+
const removeFragment = (cur, end) => {
|
|
5219
|
+
let next;
|
|
5220
|
+
while (cur !== end) {
|
|
5221
|
+
next = hostNextSibling(cur);
|
|
5222
|
+
hostRemove(cur);
|
|
5223
|
+
cur = next;
|
|
5071
5224
|
}
|
|
5072
|
-
|
|
5073
|
-
|
|
5225
|
+
hostRemove(end);
|
|
5226
|
+
};
|
|
5227
|
+
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
5228
|
+
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
5229
|
+
invalidateMount(m);
|
|
5230
|
+
invalidateMount(a);
|
|
5231
|
+
if (bum) {
|
|
5232
|
+
shared.invokeArrayFns(bum);
|
|
5074
5233
|
}
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5234
|
+
scope.stop();
|
|
5235
|
+
if (job) {
|
|
5236
|
+
job.flags |= 8;
|
|
5237
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
5079
5238
|
}
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
}
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
}
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
}
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
emit,
|
|
5112
|
-
render,
|
|
5113
|
-
renderCache,
|
|
5114
|
-
props,
|
|
5115
|
-
data,
|
|
5116
|
-
setupState,
|
|
5117
|
-
ctx,
|
|
5118
|
-
inheritAttrs
|
|
5119
|
-
} = instance;
|
|
5120
|
-
const prev = setCurrentRenderingInstance(instance);
|
|
5121
|
-
let result;
|
|
5122
|
-
let fallthroughAttrs;
|
|
5123
|
-
try {
|
|
5124
|
-
if (vnode.shapeFlag & 4) {
|
|
5125
|
-
const proxyToUse = withProxy || proxy;
|
|
5126
|
-
const thisProxy = false ? new Proxy(proxyToUse, {
|
|
5127
|
-
get(target, key, receiver) {
|
|
5128
|
-
warn(
|
|
5129
|
-
`Property '${String(
|
|
5130
|
-
key
|
|
5131
|
-
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
5132
|
-
);
|
|
5133
|
-
return Reflect.get(target, key, receiver);
|
|
5134
|
-
}
|
|
5135
|
-
}) : proxyToUse;
|
|
5136
|
-
result = normalizeVNode(
|
|
5137
|
-
render.call(
|
|
5138
|
-
thisProxy,
|
|
5139
|
-
proxyToUse,
|
|
5140
|
-
renderCache,
|
|
5141
|
-
false ? shallowReadonly(props) : props,
|
|
5142
|
-
setupState,
|
|
5143
|
-
data,
|
|
5144
|
-
ctx
|
|
5145
|
-
)
|
|
5146
|
-
);
|
|
5147
|
-
fallthroughAttrs = attrs;
|
|
5239
|
+
if (um) {
|
|
5240
|
+
queuePostRenderEffect(um, parentSuspense);
|
|
5241
|
+
}
|
|
5242
|
+
queuePostRenderEffect(() => {
|
|
5243
|
+
instance.isUnmounted = true;
|
|
5244
|
+
}, parentSuspense);
|
|
5245
|
+
};
|
|
5246
|
+
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
5247
|
+
for (let i = start; i < children.length; i++) {
|
|
5248
|
+
unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
|
|
5249
|
+
}
|
|
5250
|
+
};
|
|
5251
|
+
const getNextHostNode = (vnode) => {
|
|
5252
|
+
if (vnode.shapeFlag & 6) {
|
|
5253
|
+
return getNextHostNode(vnode.component.subTree);
|
|
5254
|
+
}
|
|
5255
|
+
if (vnode.shapeFlag & 128) {
|
|
5256
|
+
return vnode.suspense.next();
|
|
5257
|
+
}
|
|
5258
|
+
const el = hostNextSibling(vnode.anchor || vnode.el);
|
|
5259
|
+
const teleportEnd = el && el[TeleportEndKey];
|
|
5260
|
+
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
5261
|
+
};
|
|
5262
|
+
let isFlushing = false;
|
|
5263
|
+
const render = (vnode, container, namespace) => {
|
|
5264
|
+
let instance;
|
|
5265
|
+
if (vnode == null) {
|
|
5266
|
+
if (container._vnode) {
|
|
5267
|
+
unmount(container._vnode, null, null, true);
|
|
5268
|
+
instance = container._vnode.component;
|
|
5269
|
+
}
|
|
5148
5270
|
} else {
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
return shallowReadonly(attrs);
|
|
5158
|
-
},
|
|
5159
|
-
slots,
|
|
5160
|
-
emit
|
|
5161
|
-
} : { attrs, slots, emit }
|
|
5162
|
-
) : render2(
|
|
5163
|
-
false ? shallowReadonly(props) : props,
|
|
5164
|
-
null
|
|
5165
|
-
)
|
|
5271
|
+
patch(
|
|
5272
|
+
container._vnode || null,
|
|
5273
|
+
vnode,
|
|
5274
|
+
container,
|
|
5275
|
+
null,
|
|
5276
|
+
null,
|
|
5277
|
+
null,
|
|
5278
|
+
namespace
|
|
5166
5279
|
);
|
|
5167
|
-
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
5168
5280
|
}
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
5176
|
-
const keys = Object.keys(fallthroughAttrs);
|
|
5177
|
-
const { shapeFlag } = root;
|
|
5178
|
-
if (keys.length) {
|
|
5179
|
-
if (shapeFlag & (1 | 6)) {
|
|
5180
|
-
if (propsOptions && keys.some(shared.isModelListener)) {
|
|
5181
|
-
fallthroughAttrs = filterModelListeners(
|
|
5182
|
-
fallthroughAttrs,
|
|
5183
|
-
propsOptions
|
|
5184
|
-
);
|
|
5185
|
-
}
|
|
5186
|
-
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
5187
|
-
}
|
|
5281
|
+
container._vnode = vnode;
|
|
5282
|
+
if (!isFlushing) {
|
|
5283
|
+
isFlushing = true;
|
|
5284
|
+
flushPreFlushCbs(instance);
|
|
5285
|
+
flushPostFlushCbs();
|
|
5286
|
+
isFlushing = false;
|
|
5188
5287
|
}
|
|
5288
|
+
};
|
|
5289
|
+
const internals = {
|
|
5290
|
+
p: patch,
|
|
5291
|
+
um: unmount,
|
|
5292
|
+
m: move,
|
|
5293
|
+
r: remove,
|
|
5294
|
+
mt: mountComponent,
|
|
5295
|
+
mc: mountChildren,
|
|
5296
|
+
pc: patchChildren,
|
|
5297
|
+
pbc: patchBlockChildren,
|
|
5298
|
+
n: getNextHostNode,
|
|
5299
|
+
o: options
|
|
5300
|
+
};
|
|
5301
|
+
let hydrate;
|
|
5302
|
+
let hydrateNode;
|
|
5303
|
+
if (createHydrationFns) {
|
|
5304
|
+
[hydrate, hydrateNode] = createHydrationFns(
|
|
5305
|
+
internals
|
|
5306
|
+
);
|
|
5189
5307
|
}
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5308
|
+
return {
|
|
5309
|
+
render,
|
|
5310
|
+
hydrate,
|
|
5311
|
+
createApp: createAppAPI(render, hydrate)
|
|
5312
|
+
};
|
|
5313
|
+
}
|
|
5314
|
+
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
5315
|
+
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
5316
|
+
}
|
|
5317
|
+
function toggleRecurse({ effect, job }, allowed) {
|
|
5318
|
+
if (allowed) {
|
|
5319
|
+
effect.flags |= 32;
|
|
5320
|
+
job.flags |= 4;
|
|
5321
|
+
} else {
|
|
5322
|
+
effect.flags &= -33;
|
|
5323
|
+
job.flags &= -5;
|
|
5199
5324
|
}
|
|
5200
|
-
setCurrentRenderingInstance(prev);
|
|
5201
|
-
return result;
|
|
5202
5325
|
}
|
|
5203
|
-
function
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5326
|
+
function needTransition(parentSuspense, transition) {
|
|
5327
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
5328
|
+
}
|
|
5329
|
+
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
5330
|
+
const ch1 = n1.children;
|
|
5331
|
+
const ch2 = n2.children;
|
|
5332
|
+
if (shared.isArray(ch1) && shared.isArray(ch2)) {
|
|
5333
|
+
for (let i = 0; i < ch1.length; i++) {
|
|
5334
|
+
const c1 = ch1[i];
|
|
5335
|
+
let c2 = ch2[i];
|
|
5336
|
+
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
5337
|
+
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
5338
|
+
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
5339
|
+
c2.el = c1.el;
|
|
5213
5340
|
}
|
|
5341
|
+
if (!shallow && c2.patchFlag !== -2)
|
|
5342
|
+
traverseStaticChildren(c1, c2);
|
|
5343
|
+
}
|
|
5344
|
+
if (c2.type === Text) {
|
|
5345
|
+
if (c2.patchFlag === -1) {
|
|
5346
|
+
c2 = ch2[i] = cloneIfMounted(c2);
|
|
5347
|
+
}
|
|
5348
|
+
c2.el = c1.el;
|
|
5349
|
+
}
|
|
5350
|
+
if (c2.type === Comment && !c2.el) {
|
|
5351
|
+
c2.el = c1.el;
|
|
5214
5352
|
}
|
|
5215
|
-
} else {
|
|
5216
|
-
return;
|
|
5217
5353
|
}
|
|
5218
5354
|
}
|
|
5219
|
-
return singleRoot;
|
|
5220
5355
|
}
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
res[key] = attrs[key];
|
|
5235
|
-
}
|
|
5236
|
-
}
|
|
5237
|
-
return res;
|
|
5238
|
-
};
|
|
5239
|
-
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
5240
|
-
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
5241
|
-
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
5242
|
-
const emits = component.emitsOptions;
|
|
5243
|
-
if (nextVNode.dirs || nextVNode.transition) {
|
|
5244
|
-
return true;
|
|
5245
|
-
}
|
|
5246
|
-
if (optimized && patchFlag >= 0) {
|
|
5247
|
-
if (patchFlag & 1024) {
|
|
5248
|
-
return true;
|
|
5249
|
-
}
|
|
5250
|
-
if (patchFlag & 16) {
|
|
5251
|
-
if (!prevProps) {
|
|
5252
|
-
return !!nextProps;
|
|
5356
|
+
function getSequence(arr) {
|
|
5357
|
+
const p = arr.slice();
|
|
5358
|
+
const result = [0];
|
|
5359
|
+
let i, j, u, v, c;
|
|
5360
|
+
const len = arr.length;
|
|
5361
|
+
for (i = 0; i < len; i++) {
|
|
5362
|
+
const arrI = arr[i];
|
|
5363
|
+
if (arrI !== 0) {
|
|
5364
|
+
j = result[result.length - 1];
|
|
5365
|
+
if (arr[j] < arrI) {
|
|
5366
|
+
p[i] = j;
|
|
5367
|
+
result.push(i);
|
|
5368
|
+
continue;
|
|
5253
5369
|
}
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5370
|
+
u = 0;
|
|
5371
|
+
v = result.length - 1;
|
|
5372
|
+
while (u < v) {
|
|
5373
|
+
c = u + v >> 1;
|
|
5374
|
+
if (arr[result[c]] < arrI) {
|
|
5375
|
+
u = c + 1;
|
|
5376
|
+
} else {
|
|
5377
|
+
v = c;
|
|
5261
5378
|
}
|
|
5262
5379
|
}
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5380
|
+
if (arrI < arr[result[u]]) {
|
|
5381
|
+
if (u > 0) {
|
|
5382
|
+
p[i] = result[u - 1];
|
|
5383
|
+
}
|
|
5384
|
+
result[u] = i;
|
|
5268
5385
|
}
|
|
5269
5386
|
}
|
|
5270
|
-
if (prevProps === nextProps) {
|
|
5271
|
-
return false;
|
|
5272
|
-
}
|
|
5273
|
-
if (!prevProps) {
|
|
5274
|
-
return !!nextProps;
|
|
5275
|
-
}
|
|
5276
|
-
if (!nextProps) {
|
|
5277
|
-
return true;
|
|
5278
|
-
}
|
|
5279
|
-
return hasPropsChanged(prevProps, nextProps, emits);
|
|
5280
|
-
}
|
|
5281
|
-
return false;
|
|
5282
|
-
}
|
|
5283
|
-
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
5284
|
-
const nextKeys = Object.keys(nextProps);
|
|
5285
|
-
if (nextKeys.length !== Object.keys(prevProps).length) {
|
|
5286
|
-
return true;
|
|
5287
5387
|
}
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5388
|
+
u = result.length;
|
|
5389
|
+
v = result[u - 1];
|
|
5390
|
+
while (u-- > 0) {
|
|
5391
|
+
result[u] = v;
|
|
5392
|
+
v = p[v];
|
|
5293
5393
|
}
|
|
5294
|
-
return
|
|
5394
|
+
return result;
|
|
5295
5395
|
}
|
|
5296
|
-
function
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
if (
|
|
5300
|
-
|
|
5301
|
-
}
|
|
5302
|
-
if (root === vnode) {
|
|
5303
|
-
(vnode = parent.vnode).el = el;
|
|
5304
|
-
parent = parent.parent;
|
|
5396
|
+
function locateNonHydratedAsyncRoot(instance) {
|
|
5397
|
+
const subComponent = instance.subTree.component;
|
|
5398
|
+
if (subComponent) {
|
|
5399
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
5400
|
+
return subComponent;
|
|
5305
5401
|
} else {
|
|
5306
|
-
|
|
5402
|
+
return locateNonHydratedAsyncRoot(subComponent);
|
|
5307
5403
|
}
|
|
5308
5404
|
}
|
|
5309
5405
|
}
|
|
5406
|
+
function invalidateMount(hooks) {
|
|
5407
|
+
if (hooks) {
|
|
5408
|
+
for (let i = 0; i < hooks.length; i++)
|
|
5409
|
+
hooks[i].flags |= 8;
|
|
5410
|
+
}
|
|
5411
|
+
}
|
|
5412
|
+
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
5413
|
+
if (anchorVnode.placeholder) {
|
|
5414
|
+
return anchorVnode.placeholder;
|
|
5415
|
+
}
|
|
5416
|
+
const instance = anchorVnode.component;
|
|
5417
|
+
if (instance) {
|
|
5418
|
+
return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
5419
|
+
}
|
|
5420
|
+
return null;
|
|
5421
|
+
}
|
|
5310
5422
|
|
|
5311
5423
|
const isSuspense = (type) => type.__isSuspense;
|
|
5312
5424
|
let suspenseId = 0;
|
|
@@ -5596,6 +5708,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5596
5708
|
pendingId: suspenseId++,
|
|
5597
5709
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
5598
5710
|
activeBranch: null,
|
|
5711
|
+
isFallbackMountPending: false,
|
|
5599
5712
|
pendingBranch: null,
|
|
5600
5713
|
isInFallback: !isHydrating,
|
|
5601
5714
|
isHydrating,
|
|
@@ -5609,7 +5722,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5609
5722
|
pendingId,
|
|
5610
5723
|
effects,
|
|
5611
5724
|
parentComponent: parentComponent2,
|
|
5612
|
-
container: container2
|
|
5725
|
+
container: container2,
|
|
5726
|
+
isInFallback
|
|
5613
5727
|
} = suspense;
|
|
5614
5728
|
let delayEnter = false;
|
|
5615
5729
|
if (suspense.isHydrating) {
|
|
@@ -5626,19 +5740,26 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5626
5740
|
0
|
|
5627
5741
|
);
|
|
5628
5742
|
queuePostFlushCb(effects);
|
|
5743
|
+
if (isInFallback && vnode2.ssFallback) {
|
|
5744
|
+
vnode2.ssFallback.el = null;
|
|
5745
|
+
}
|
|
5629
5746
|
}
|
|
5630
5747
|
};
|
|
5631
5748
|
}
|
|
5632
|
-
if (activeBranch) {
|
|
5749
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
5633
5750
|
if (parentNode(activeBranch.el) === container2) {
|
|
5634
5751
|
anchor = next(activeBranch);
|
|
5635
5752
|
}
|
|
5636
5753
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
5754
|
+
if (!delayEnter && isInFallback && vnode2.ssFallback) {
|
|
5755
|
+
queuePostRenderEffect(() => vnode2.ssFallback.el = null, suspense);
|
|
5756
|
+
}
|
|
5637
5757
|
}
|
|
5638
5758
|
if (!delayEnter) {
|
|
5639
5759
|
move(pendingBranch, container2, anchor, 0);
|
|
5640
5760
|
}
|
|
5641
5761
|
}
|
|
5762
|
+
suspense.isFallbackMountPending = false;
|
|
5642
5763
|
setActiveBranch(suspense, pendingBranch);
|
|
5643
5764
|
suspense.pendingBranch = null;
|
|
5644
5765
|
suspense.isInFallback = false;
|
|
@@ -5674,6 +5795,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5674
5795
|
triggerEvent(vnode2, "onFallback");
|
|
5675
5796
|
const anchor2 = next(activeBranch);
|
|
5676
5797
|
const mountFallback = () => {
|
|
5798
|
+
suspense.isFallbackMountPending = false;
|
|
5677
5799
|
if (!suspense.isInFallback) {
|
|
5678
5800
|
return;
|
|
5679
5801
|
}
|
|
@@ -5693,6 +5815,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5693
5815
|
};
|
|
5694
5816
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
5695
5817
|
if (delayEnter) {
|
|
5818
|
+
suspense.isFallbackMountPending = true;
|
|
5696
5819
|
activeBranch.transition.afterLeave = mountFallback;
|
|
5697
5820
|
}
|
|
5698
5821
|
suspense.isInFallback = true;
|
|
@@ -5727,6 +5850,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5727
5850
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
5728
5851
|
return;
|
|
5729
5852
|
}
|
|
5853
|
+
unsetCurrentInstance();
|
|
5730
5854
|
instance.asyncResolved = true;
|
|
5731
5855
|
const { vnode: vnode2 } = instance;
|
|
5732
5856
|
handleSetupResult(instance, asyncSetupResult, false);
|
|
@@ -5749,6 +5873,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5749
5873
|
optimized2
|
|
5750
5874
|
);
|
|
5751
5875
|
if (placeholder) {
|
|
5876
|
+
vnode2.placeholder = null;
|
|
5752
5877
|
remove(placeholder);
|
|
5753
5878
|
}
|
|
5754
5879
|
updateHOCHostEl(instance, vnode2.el);
|
|
@@ -5870,10 +5995,10 @@ function isVNodeSuspensible(vnode) {
|
|
|
5870
5995
|
return suspensible != null && suspensible !== false;
|
|
5871
5996
|
}
|
|
5872
5997
|
|
|
5873
|
-
const Fragment = Symbol.for("v-fgt");
|
|
5874
|
-
const Text = Symbol.for("v-txt");
|
|
5875
|
-
const Comment = Symbol.for("v-cmt");
|
|
5876
|
-
const Static = Symbol.for("v-stc");
|
|
5998
|
+
const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
|
|
5999
|
+
const Text = /* @__PURE__ */ Symbol.for("v-txt");
|
|
6000
|
+
const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
|
|
6001
|
+
const Static = /* @__PURE__ */ Symbol.for("v-stc");
|
|
5877
6002
|
const blockStack = [];
|
|
5878
6003
|
let currentBlock = null;
|
|
5879
6004
|
function openBlock(disableTracking = false) {
|
|
@@ -6196,6 +6321,10 @@ function mergeProps(...args) {
|
|
|
6196
6321
|
const incoming = toMerge[key];
|
|
6197
6322
|
if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) {
|
|
6198
6323
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
6324
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
6325
|
+
// the model listener.
|
|
6326
|
+
!shared.isModelListener(key)) {
|
|
6327
|
+
ret[key] = incoming;
|
|
6199
6328
|
}
|
|
6200
6329
|
} else if (key !== "") {
|
|
6201
6330
|
ret[key] = toMerge[key];
|
|
@@ -6562,7 +6691,7 @@ function isMemoSame(cached, memo) {
|
|
|
6562
6691
|
return true;
|
|
6563
6692
|
}
|
|
6564
6693
|
|
|
6565
|
-
const version = "3.5.
|
|
6694
|
+
const version = "3.5.33";
|
|
6566
6695
|
const warn$1 = shared.NOOP;
|
|
6567
6696
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6568
6697
|
const devtools = void 0;
|