nuxt-intlayer 7.0.0-canary.3 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/cjs/_virtual/rolldown_runtime.cjs +0 -15
  2. package/dist/cjs/runtime/intlayer-plugin.cjs +4 -3
  3. package/dist/cjs/runtime/intlayer-plugin.cjs.map +1 -1
  4. package/dist/esm/runtime/intlayer-plugin.mjs +3 -3
  5. package/dist/esm/runtime/intlayer-plugin.mjs.map +1 -1
  6. package/package.json +16 -14
  7. package/dist/cjs/node_modules/.bun/@babel_parser@7.28.4/node_modules/@babel/parser/lib/index.cjs +0 -12494
  8. package/dist/cjs/node_modules/.bun/@babel_parser@7.28.4/node_modules/@babel/parser/lib/index.cjs.map +0 -1
  9. package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.cjs +0 -2353
  10. package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.cjs.map +0 -1
  11. package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.cjs +0 -4751
  12. package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.cjs.map +0 -1
  13. package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/index.cjs +0 -18
  14. package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/index.cjs.map +0 -1
  15. package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.cjs +0 -660
  16. package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.cjs.map +0 -1
  17. package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.cjs +0 -442
  18. package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.cjs.map +0 -1
  19. package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/index.cjs +0 -18
  20. package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/index.cjs.map +0 -1
  21. package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.cjs +0 -22
  22. package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.cjs.map +0 -1
  23. package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.cjs +0 -1457
  24. package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.cjs.map +0 -1
  25. package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.cjs +0 -18
  26. package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.cjs.map +0 -1
  27. package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.cjs +0 -870
  28. package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.cjs.map +0 -1
  29. package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.cjs +0 -4204
  30. package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.cjs.map +0 -1
  31. package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.cjs +0 -18
  32. package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.cjs.map +0 -1
  33. package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.cjs +0 -1373
  34. package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.cjs.map +0 -1
  35. package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.cjs +0 -1270
  36. package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.cjs.map +0 -1
  37. package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/index.cjs +0 -18
  38. package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/index.cjs.map +0 -1
  39. package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.cjs +0 -44
  40. package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.cjs.map +0 -1
  41. package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.prod.cjs +0 -491
  42. package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.prod.cjs.map +0 -1
  43. package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/index.cjs +0 -18
  44. package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/index.cjs.map +0 -1
  45. package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode.cjs +0 -474
  46. package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode.cjs.map +0 -1
  47. package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode_codepoint.cjs +0 -82
  48. package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode_codepoint.cjs.map +0 -1
  49. package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.cjs +0 -18
  50. package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.cjs.map +0 -1
  51. package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.cjs +0 -18
  52. package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.cjs.map +0 -1
  53. package/dist/cjs/node_modules/.bun/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.cjs +0 -255
  54. package/dist/cjs/node_modules/.bun/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.cjs.map +0 -1
  55. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.cjs +0 -103
  56. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.cjs.map +0 -1
  57. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.cjs +0 -76
  58. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.cjs.map +0 -1
  59. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.cjs +0 -44
  60. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.cjs.map +0 -1
  61. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.cjs +0 -71
  62. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.cjs.map +0 -1
  63. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.cjs +0 -80
  64. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.cjs.map +0 -1
  65. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.cjs +0 -92
  66. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.cjs.map +0 -1
  67. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.cjs +0 -791
  68. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.cjs.map +0 -1
  69. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.cjs +0 -298
  70. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.cjs.map +0 -1
  71. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.cjs +0 -296
  72. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.cjs.map +0 -1
  73. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.cjs +0 -355
  74. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.cjs.map +0 -1
  75. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.cjs +0 -20
  76. package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.cjs.map +0 -1
  77. package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/native.cjs +0 -10
  78. package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/native.cjs.map +0 -1
  79. package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/rng.cjs +0 -18
  80. package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/rng.cjs.map +0 -1
  81. package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/stringify.cjs +0 -11
  82. package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/stringify.cjs.map +0 -1
  83. package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/v4.cjs +0 -28
  84. package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/v4.cjs.map +0 -1
  85. package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.cjs +0 -65
  86. package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.cjs.map +0 -1
  87. package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.prod.cjs +0 -55
  88. package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.prod.cjs.map +0 -1
  89. package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index.cjs +0 -18
  90. package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index.cjs.map +0 -1
  91. package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index2.cjs +0 -15
  92. package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index2.cjs.map +0 -1
  93. package/dist/esm/node_modules/.bun/@babel_parser@7.28.4/node_modules/@babel/parser/lib/index.mjs +0 -12491
  94. package/dist/esm/node_modules/.bun/@babel_parser@7.28.4/node_modules/@babel/parser/lib/index.mjs.map +0 -1
  95. package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs +0 -2350
  96. package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs.map +0 -1
  97. package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.mjs +0 -4748
  98. package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.mjs.map +0 -1
  99. package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/index.mjs +0 -15
  100. package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/index.mjs.map +0 -1
  101. package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs +0 -657
  102. package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs.map +0 -1
  103. package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.mjs +0 -439
  104. package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.mjs.map +0 -1
  105. package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/index.mjs +0 -15
  106. package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/index.mjs.map +0 -1
  107. package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs +0 -19
  108. package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs.map +0 -1
  109. package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.mjs +0 -1454
  110. package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.mjs.map +0 -1
  111. package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs +0 -1312
  112. package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs.map +0 -1
  113. package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.mjs +0 -15
  114. package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.mjs.map +0 -1
  115. package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs +0 -867
  116. package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs.map +0 -1
  117. package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.mjs +0 -4201
  118. package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.mjs.map +0 -1
  119. package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs +0 -995
  120. package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs.map +0 -1
  121. package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.mjs +0 -15
  122. package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.mjs.map +0 -1
  123. package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs +0 -1370
  124. package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs.map +0 -1
  125. package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.mjs +0 -1267
  126. package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.mjs.map +0 -1
  127. package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/index.mjs +0 -15
  128. package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/index.mjs.map +0 -1
  129. package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.mjs +0 -41
  130. package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.mjs.map +0 -1
  131. package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.prod.mjs +0 -488
  132. package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.prod.mjs.map +0 -1
  133. package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +0 -77
  134. package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.esm-bundler.mjs.map +0 -1
  135. package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/index.mjs +0 -15
  136. package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/index.mjs.map +0 -1
  137. package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode.mjs +0 -471
  138. package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode.mjs.map +0 -1
  139. package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode_codepoint.mjs +0 -79
  140. package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode_codepoint.mjs.map +0 -1
  141. package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.mjs +0 -15
  142. package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.mjs.map +0 -1
  143. package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.mjs +0 -15
  144. package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.mjs.map +0 -1
  145. package/dist/esm/node_modules/.bun/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs +0 -252
  146. package/dist/esm/node_modules/.bun/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs.map +0 -1
  147. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs +0 -100
  148. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs.map +0 -1
  149. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs +0 -73
  150. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs.map +0 -1
  151. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs +0 -41
  152. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs.map +0 -1
  153. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs +0 -68
  154. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs.map +0 -1
  155. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs +0 -77
  156. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs.map +0 -1
  157. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs +0 -89
  158. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs.map +0 -1
  159. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs +0 -788
  160. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs.map +0 -1
  161. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs +0 -295
  162. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs.map +0 -1
  163. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs +0 -293
  164. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs.map +0 -1
  165. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs +0 -352
  166. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs.map +0 -1
  167. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs +0 -17
  168. package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs.map +0 -1
  169. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/native.mjs +0 -7
  170. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/native.mjs.map +0 -1
  171. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/rng.mjs +0 -14
  172. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/rng.mjs.map +0 -1
  173. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/stringify.mjs +0 -10
  174. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/stringify.mjs.map +0 -1
  175. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/v4.mjs +0 -28
  176. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/v4.mjs.map +0 -1
  177. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/native.mjs +0 -8
  178. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/native.mjs.map +0 -1
  179. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/rng.mjs +0 -16
  180. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/rng.mjs.map +0 -1
  181. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/stringify.mjs +0 -10
  182. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/stringify.mjs.map +0 -1
  183. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/v4.mjs +0 -28
  184. package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/v4.mjs.map +0 -1
  185. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.mjs +0 -62
  186. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.mjs.map +0 -1
  187. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.prod.mjs +0 -52
  188. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.prod.mjs.map +0 -1
  189. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.runtime.esm-bundler.mjs +0 -12
  190. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.runtime.esm-bundler.mjs.map +0 -1
  191. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index.mjs +0 -15
  192. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index.mjs.map +0 -1
  193. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index2.mjs +0 -10
  194. package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index2.mjs.map +0 -1
@@ -1,4204 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_index = require('../../../../../@vue_shared@3.5.22/node_modules/@vue/shared/index.cjs');
3
- const require_index$1 = require('../../../../../@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.cjs');
4
-
5
- //#region ../../node_modules/.bun/@vue+runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js
6
- var require_runtime_core_cjs_prod = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.bun/@vue+runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js": ((exports) => {
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- var reactivity = require_index$1.require_reactivity();
9
- var shared = require_index.require_shared();
10
- function pushWarningContext(vnode) {}
11
- function popWarningContext() {}
12
- function assertNumber(val, type) {}
13
- const ErrorCodes = {
14
- "SETUP_FUNCTION": 0,
15
- "0": "SETUP_FUNCTION",
16
- "RENDER_FUNCTION": 1,
17
- "1": "RENDER_FUNCTION",
18
- "NATIVE_EVENT_HANDLER": 5,
19
- "5": "NATIVE_EVENT_HANDLER",
20
- "COMPONENT_EVENT_HANDLER": 6,
21
- "6": "COMPONENT_EVENT_HANDLER",
22
- "VNODE_HOOK": 7,
23
- "7": "VNODE_HOOK",
24
- "DIRECTIVE_HOOK": 8,
25
- "8": "DIRECTIVE_HOOK",
26
- "TRANSITION_HOOK": 9,
27
- "9": "TRANSITION_HOOK",
28
- "APP_ERROR_HANDLER": 10,
29
- "10": "APP_ERROR_HANDLER",
30
- "APP_WARN_HANDLER": 11,
31
- "11": "APP_WARN_HANDLER",
32
- "FUNCTION_REF": 12,
33
- "12": "FUNCTION_REF",
34
- "ASYNC_COMPONENT_LOADER": 13,
35
- "13": "ASYNC_COMPONENT_LOADER",
36
- "SCHEDULER": 14,
37
- "14": "SCHEDULER",
38
- "COMPONENT_UPDATE": 15,
39
- "15": "COMPONENT_UPDATE",
40
- "APP_UNMOUNT_CLEANUP": 16,
41
- "16": "APP_UNMOUNT_CLEANUP"
42
- };
43
- const ErrorTypeStrings$1 = {
44
- ["sp"]: "serverPrefetch hook",
45
- ["bc"]: "beforeCreate hook",
46
- ["c"]: "created hook",
47
- ["bm"]: "beforeMount hook",
48
- ["m"]: "mounted hook",
49
- ["bu"]: "beforeUpdate hook",
50
- ["u"]: "updated",
51
- ["bum"]: "beforeUnmount hook",
52
- ["um"]: "unmounted hook",
53
- ["a"]: "activated hook",
54
- ["da"]: "deactivated hook",
55
- ["ec"]: "errorCaptured hook",
56
- ["rtc"]: "renderTracked hook",
57
- ["rtg"]: "renderTriggered hook",
58
- [0]: "setup function",
59
- [1]: "render function",
60
- [2]: "watcher getter",
61
- [3]: "watcher callback",
62
- [4]: "watcher cleanup function",
63
- [5]: "native event handler",
64
- [6]: "component event handler",
65
- [7]: "vnode hook",
66
- [8]: "directive hook",
67
- [9]: "transition hook",
68
- [10]: "app errorHandler",
69
- [11]: "app warnHandler",
70
- [12]: "ref function",
71
- [13]: "async component loader",
72
- [14]: "scheduler flush",
73
- [15]: "component update",
74
- [16]: "app unmount cleanup function"
75
- };
76
- function callWithErrorHandling(fn, instance, type, args) {
77
- try {
78
- return args ? fn(...args) : fn();
79
- } catch (err) {
80
- handleError(err, instance, type);
81
- }
82
- }
83
- function callWithAsyncErrorHandling(fn, instance, type, args) {
84
- if (shared.isFunction(fn)) {
85
- const res = callWithErrorHandling(fn, instance, type, args);
86
- if (res && shared.isPromise(res)) res.catch((err) => {
87
- handleError(err, instance, type);
88
- });
89
- return res;
90
- }
91
- if (shared.isArray(fn)) {
92
- const values = [];
93
- for (let i = 0; i < fn.length; i++) values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
94
- return values;
95
- }
96
- }
97
- function handleError(err, instance, type, throwInDev = true) {
98
- const contextVNode = instance ? instance.vnode : null;
99
- const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || shared.EMPTY_OBJ;
100
- if (instance) {
101
- let cur = instance.parent;
102
- const exposedInstance = instance.proxy;
103
- const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
104
- while (cur) {
105
- const errorCapturedHooks = cur.ec;
106
- if (errorCapturedHooks) {
107
- for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
108
- }
109
- cur = cur.parent;
110
- }
111
- if (errorHandler) {
112
- reactivity.pauseTracking();
113
- callWithErrorHandling(errorHandler, null, 10, [
114
- err,
115
- exposedInstance,
116
- errorInfo
117
- ]);
118
- reactivity.resetTracking();
119
- return;
120
- }
121
- }
122
- logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
123
- }
124
- function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
125
- if (throwInProd) throw err;
126
- else console.error(err);
127
- }
128
- const queue = [];
129
- let flushIndex = -1;
130
- const pendingPostFlushCbs = [];
131
- let activePostFlushCbs = null;
132
- let postFlushIndex = 0;
133
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
134
- let currentFlushPromise = null;
135
- function nextTick(fn) {
136
- const p = currentFlushPromise || resolvedPromise;
137
- return fn ? p.then(this ? fn.bind(this) : fn) : p;
138
- }
139
- function findInsertionIndex(id) {
140
- let start = flushIndex + 1;
141
- let end = queue.length;
142
- while (start < end) {
143
- const middle = start + end >>> 1;
144
- const middleJob = queue[middle];
145
- const middleJobId = getId(middleJob);
146
- if (middleJobId < id || middleJobId === id && middleJob.flags & 2) start = middle + 1;
147
- else end = middle;
148
- }
149
- return start;
150
- }
151
- function queueJob(job) {
152
- if (!(job.flags & 1)) {
153
- const jobId = getId(job);
154
- const lastJob = queue[queue.length - 1];
155
- if (!lastJob || !(job.flags & 2) && jobId >= getId(lastJob)) queue.push(job);
156
- else queue.splice(findInsertionIndex(jobId), 0, job);
157
- job.flags |= 1;
158
- queueFlush();
159
- }
160
- }
161
- function queueFlush() {
162
- if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(flushJobs);
163
- }
164
- function queuePostFlushCb(cb) {
165
- if (!shared.isArray(cb)) {
166
- if (activePostFlushCbs && cb.id === -1) activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
167
- else if (!(cb.flags & 1)) {
168
- pendingPostFlushCbs.push(cb);
169
- cb.flags |= 1;
170
- }
171
- } else pendingPostFlushCbs.push(...cb);
172
- queueFlush();
173
- }
174
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
175
- for (; i < queue.length; i++) {
176
- const cb = queue[i];
177
- if (cb && cb.flags & 2) {
178
- if (instance && cb.id !== instance.uid) continue;
179
- queue.splice(i, 1);
180
- i--;
181
- if (cb.flags & 4) cb.flags &= -2;
182
- cb();
183
- if (!(cb.flags & 4)) cb.flags &= -2;
184
- }
185
- }
186
- }
187
- function flushPostFlushCbs(seen) {
188
- if (pendingPostFlushCbs.length) {
189
- const deduped = [...new Set(pendingPostFlushCbs)].sort((a, b) => getId(a) - getId(b));
190
- pendingPostFlushCbs.length = 0;
191
- if (activePostFlushCbs) {
192
- activePostFlushCbs.push(...deduped);
193
- return;
194
- }
195
- activePostFlushCbs = deduped;
196
- for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
197
- const cb = activePostFlushCbs[postFlushIndex];
198
- if (cb.flags & 4) cb.flags &= -2;
199
- if (!(cb.flags & 8)) cb();
200
- cb.flags &= -2;
201
- }
202
- activePostFlushCbs = null;
203
- postFlushIndex = 0;
204
- }
205
- }
206
- const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
207
- function flushJobs(seen) {
208
- try {
209
- for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
210
- const job = queue[flushIndex];
211
- if (job && !(job.flags & 8)) {
212
- if (job.flags & 4) job.flags &= -2;
213
- callWithErrorHandling(job, job.i, job.i ? 15 : 14);
214
- if (!(job.flags & 4)) job.flags &= -2;
215
- }
216
- }
217
- } finally {
218
- for (; flushIndex < queue.length; flushIndex++) {
219
- const job = queue[flushIndex];
220
- if (job) job.flags &= -2;
221
- }
222
- flushIndex = -1;
223
- queue.length = 0;
224
- flushPostFlushCbs();
225
- currentFlushPromise = null;
226
- if (queue.length || pendingPostFlushCbs.length) flushJobs();
227
- }
228
- }
229
- let currentRenderingInstance = null;
230
- let currentScopeId = null;
231
- function setCurrentRenderingInstance(instance) {
232
- const prev = currentRenderingInstance;
233
- currentRenderingInstance = instance;
234
- currentScopeId = instance && instance.type.__scopeId || null;
235
- return prev;
236
- }
237
- function pushScopeId(id) {
238
- currentScopeId = id;
239
- }
240
- function popScopeId() {
241
- currentScopeId = null;
242
- }
243
- const withScopeId = (_id) => withCtx;
244
- function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
245
- if (!ctx) return fn;
246
- if (fn._n) return fn;
247
- const renderFnWithContext = (...args) => {
248
- if (renderFnWithContext._d) setBlockTracking(-1);
249
- const prevInstance = setCurrentRenderingInstance(ctx);
250
- let res;
251
- try {
252
- res = fn(...args);
253
- } finally {
254
- setCurrentRenderingInstance(prevInstance);
255
- if (renderFnWithContext._d) setBlockTracking(1);
256
- }
257
- return res;
258
- };
259
- renderFnWithContext._n = true;
260
- renderFnWithContext._c = true;
261
- renderFnWithContext._d = true;
262
- return renderFnWithContext;
263
- }
264
- function withDirectives(vnode, directives) {
265
- if (currentRenderingInstance === null) return vnode;
266
- const instance = getComponentPublicInstance(currentRenderingInstance);
267
- const bindings = vnode.dirs || (vnode.dirs = []);
268
- for (let i = 0; i < directives.length; i++) {
269
- let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i];
270
- if (dir) {
271
- if (shared.isFunction(dir)) dir = {
272
- mounted: dir,
273
- updated: dir
274
- };
275
- if (dir.deep) reactivity.traverse(value);
276
- bindings.push({
277
- dir,
278
- instance,
279
- value,
280
- oldValue: void 0,
281
- arg,
282
- modifiers
283
- });
284
- }
285
- }
286
- return vnode;
287
- }
288
- function invokeDirectiveHook(vnode, prevVNode, instance, name) {
289
- const bindings = vnode.dirs;
290
- const oldBindings = prevVNode && prevVNode.dirs;
291
- for (let i = 0; i < bindings.length; i++) {
292
- const binding = bindings[i];
293
- if (oldBindings) binding.oldValue = oldBindings[i].value;
294
- let hook = binding.dir[name];
295
- if (hook) {
296
- reactivity.pauseTracking();
297
- callWithAsyncErrorHandling(hook, instance, 8, [
298
- vnode.el,
299
- binding,
300
- vnode,
301
- prevVNode
302
- ]);
303
- reactivity.resetTracking();
304
- }
305
- }
306
- }
307
- const TeleportEndKey = Symbol("_vte");
308
- const isTeleport = (type) => type.__isTeleport;
309
- const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
310
- const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
311
- const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
312
- const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
313
- const resolveTarget = (props, select) => {
314
- const targetSelector = props && props.to;
315
- if (shared.isString(targetSelector)) if (!select) return null;
316
- else return select(targetSelector);
317
- else return targetSelector;
318
- };
319
- const TeleportImpl = {
320
- name: "Teleport",
321
- __isTeleport: true,
322
- process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
323
- const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
324
- const disabled = isTeleportDisabled(n2.props);
325
- let { shapeFlag, children, dynamicChildren } = n2;
326
- if (n1 == null) {
327
- const placeholder = n2.el = createText("");
328
- const mainAnchor = n2.anchor = createText("");
329
- insert(placeholder, container, anchor);
330
- insert(mainAnchor, container, anchor);
331
- const mount = (container2, anchor2) => {
332
- if (shapeFlag & 16) mountChildren(children, container2, anchor2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
333
- };
334
- const mountToTarget = () => {
335
- const target = n2.target = resolveTarget(n2.props, querySelector);
336
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
337
- if (target) {
338
- if (namespace !== "svg" && isTargetSVG(target)) namespace = "svg";
339
- else if (namespace !== "mathml" && isTargetMathML(target)) namespace = "mathml";
340
- if (parentComponent && parentComponent.isCE) (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
341
- if (!disabled) {
342
- mount(target, targetAnchor);
343
- updateCssVars(n2, false);
344
- }
345
- }
346
- };
347
- if (disabled) {
348
- mount(container, mainAnchor);
349
- updateCssVars(n2, true);
350
- }
351
- if (isTeleportDeferred(n2.props)) {
352
- n2.el.__isMounted = false;
353
- queuePostRenderEffect(() => {
354
- mountToTarget();
355
- delete n2.el.__isMounted;
356
- }, parentSuspense);
357
- } else mountToTarget();
358
- } else {
359
- if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
360
- queuePostRenderEffect(() => {
361
- TeleportImpl.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
362
- }, parentSuspense);
363
- return;
364
- }
365
- n2.el = n1.el;
366
- n2.targetStart = n1.targetStart;
367
- const mainAnchor = n2.anchor = n1.anchor;
368
- const target = n2.target = n1.target;
369
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
370
- const wasDisabled = isTeleportDisabled(n1.props);
371
- const currentContainer = wasDisabled ? container : target;
372
- const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
373
- if (namespace === "svg" || isTargetSVG(target)) namespace = "svg";
374
- else if (namespace === "mathml" || isTargetMathML(target)) namespace = "mathml";
375
- if (dynamicChildren) {
376
- patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, namespace, slotScopeIds);
377
- traverseStaticChildren(n1, n2, true);
378
- } else if (!optimized) patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, false);
379
- if (disabled) {
380
- if (!wasDisabled) moveTeleport(n2, container, mainAnchor, internals, 1);
381
- else if (n2.props && n1.props && n2.props.to !== n1.props.to) n2.props.to = n1.props.to;
382
- } else if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
383
- const nextTarget = n2.target = resolveTarget(n2.props, querySelector);
384
- if (nextTarget) moveTeleport(n2, nextTarget, null, internals, 0);
385
- } else if (wasDisabled) moveTeleport(n2, target, targetAnchor, internals, 1);
386
- updateCssVars(n2, disabled);
387
- }
388
- },
389
- remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
390
- const { shapeFlag, children, anchor, targetStart, targetAnchor, target, props } = vnode;
391
- if (target) {
392
- hostRemove(targetStart);
393
- hostRemove(targetAnchor);
394
- }
395
- doRemove && hostRemove(anchor);
396
- if (shapeFlag & 16) {
397
- const shouldRemove = doRemove || !isTeleportDisabled(props);
398
- for (let i = 0; i < children.length; i++) {
399
- const child = children[i];
400
- unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
401
- }
402
- }
403
- },
404
- move: moveTeleport,
405
- hydrate: hydrateTeleport
406
- };
407
- function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
408
- if (moveType === 0) insert(vnode.targetAnchor, container, parentAnchor);
409
- const { el, anchor, shapeFlag, children, props } = vnode;
410
- const isReorder = moveType === 2;
411
- if (isReorder) insert(el, container, parentAnchor);
412
- if (!isReorder || isTeleportDisabled(props)) {
413
- if (shapeFlag & 16) for (let i = 0; i < children.length; i++) move(children[i], container, parentAnchor, 2);
414
- }
415
- if (isReorder) insert(anchor, container, parentAnchor);
416
- }
417
- function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector, insert, createText } }, hydrateChildren) {
418
- function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
419
- vnode2.anchor = hydrateChildren(nextSibling(node2), vnode2, parentNode(node2), parentComponent, parentSuspense, slotScopeIds, optimized);
420
- vnode2.targetStart = targetStart;
421
- vnode2.targetAnchor = targetAnchor;
422
- }
423
- const target = vnode.target = resolveTarget(vnode.props, querySelector);
424
- const disabled = isTeleportDisabled(vnode.props);
425
- if (target) {
426
- const targetNode = target._lpa || target.firstChild;
427
- if (vnode.shapeFlag & 16) if (disabled) hydrateDisabledTeleport(node, vnode, targetNode, targetNode && nextSibling(targetNode));
428
- else {
429
- vnode.anchor = nextSibling(node);
430
- let targetAnchor = targetNode;
431
- while (targetAnchor) {
432
- if (targetAnchor && targetAnchor.nodeType === 8) {
433
- if (targetAnchor.data === "teleport start anchor") vnode.targetStart = targetAnchor;
434
- else if (targetAnchor.data === "teleport anchor") {
435
- vnode.targetAnchor = targetAnchor;
436
- target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
437
- break;
438
- }
439
- }
440
- targetAnchor = nextSibling(targetAnchor);
441
- }
442
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
443
- hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
444
- }
445
- updateCssVars(vnode, disabled);
446
- } else if (disabled) {
447
- if (vnode.shapeFlag & 16) hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
448
- }
449
- return vnode.anchor && nextSibling(vnode.anchor);
450
- }
451
- const Teleport = TeleportImpl;
452
- function updateCssVars(vnode, isDisabled) {
453
- const ctx = vnode.ctx;
454
- if (ctx && ctx.ut) {
455
- let node, anchor;
456
- if (isDisabled) {
457
- node = vnode.el;
458
- anchor = vnode.anchor;
459
- } else {
460
- node = vnode.targetStart;
461
- anchor = vnode.targetAnchor;
462
- }
463
- while (node && node !== anchor) {
464
- if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
465
- node = node.nextSibling;
466
- }
467
- ctx.ut();
468
- }
469
- }
470
- function prepareAnchor(target, vnode, createText, insert) {
471
- const targetStart = vnode.targetStart = createText("");
472
- const targetAnchor = vnode.targetAnchor = createText("");
473
- targetStart[TeleportEndKey] = targetAnchor;
474
- if (target) {
475
- insert(targetStart, target);
476
- insert(targetAnchor, target);
477
- }
478
- return targetAnchor;
479
- }
480
- const leaveCbKey = Symbol("_leaveCb");
481
- const enterCbKey = Symbol("_enterCb");
482
- function useTransitionState() {
483
- const state = {
484
- isMounted: false,
485
- isLeaving: false,
486
- isUnmounting: false,
487
- leavingVNodes: /* @__PURE__ */ new Map()
488
- };
489
- onMounted(() => {
490
- state.isMounted = true;
491
- });
492
- onBeforeUnmount(() => {
493
- state.isUnmounting = true;
494
- });
495
- return state;
496
- }
497
- const TransitionHookValidator = [Function, Array];
498
- const BaseTransitionPropsValidators = {
499
- mode: String,
500
- appear: Boolean,
501
- persisted: Boolean,
502
- onBeforeEnter: TransitionHookValidator,
503
- onEnter: TransitionHookValidator,
504
- onAfterEnter: TransitionHookValidator,
505
- onEnterCancelled: TransitionHookValidator,
506
- onBeforeLeave: TransitionHookValidator,
507
- onLeave: TransitionHookValidator,
508
- onAfterLeave: TransitionHookValidator,
509
- onLeaveCancelled: TransitionHookValidator,
510
- onBeforeAppear: TransitionHookValidator,
511
- onAppear: TransitionHookValidator,
512
- onAfterAppear: TransitionHookValidator,
513
- onAppearCancelled: TransitionHookValidator
514
- };
515
- const recursiveGetSubtree = (instance) => {
516
- const subTree = instance.subTree;
517
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
518
- };
519
- const BaseTransitionImpl = {
520
- name: `BaseTransition`,
521
- props: BaseTransitionPropsValidators,
522
- setup(props, { slots }) {
523
- const instance = getCurrentInstance();
524
- const state = useTransitionState();
525
- return () => {
526
- const children = slots.default && getTransitionRawChildren(slots.default(), true);
527
- if (!children || !children.length) return;
528
- const child = findNonCommentChild(children);
529
- const rawProps = reactivity.toRaw(props);
530
- const { mode } = rawProps;
531
- if (state.isLeaving) return emptyPlaceholder(child);
532
- const innerChild = getInnerChild$1(child);
533
- if (!innerChild) return emptyPlaceholder(child);
534
- let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
535
- if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
536
- let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
537
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
538
- let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
539
- setTransitionHooks(oldInnerChild, leavingHooks);
540
- if (mode === "out-in" && innerChild.type !== Comment) {
541
- state.isLeaving = true;
542
- leavingHooks.afterLeave = () => {
543
- state.isLeaving = false;
544
- if (!(instance.job.flags & 8)) instance.update();
545
- delete leavingHooks.afterLeave;
546
- oldInnerChild = void 0;
547
- };
548
- return emptyPlaceholder(child);
549
- } else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
550
- const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
551
- leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
552
- el[leaveCbKey] = () => {
553
- earlyRemove();
554
- el[leaveCbKey] = void 0;
555
- delete enterHooks.delayedLeave;
556
- oldInnerChild = void 0;
557
- };
558
- enterHooks.delayedLeave = () => {
559
- delayedLeave();
560
- delete enterHooks.delayedLeave;
561
- oldInnerChild = void 0;
562
- };
563
- };
564
- else oldInnerChild = void 0;
565
- } else if (oldInnerChild) oldInnerChild = void 0;
566
- return child;
567
- };
568
- }
569
- };
570
- function findNonCommentChild(children) {
571
- let child = children[0];
572
- if (children.length > 1) {
573
- for (const c of children) if (c.type !== Comment) {
574
- child = c;
575
- break;
576
- }
577
- }
578
- return child;
579
- }
580
- const BaseTransition = BaseTransitionImpl;
581
- function getLeavingNodesForType(state, vnode) {
582
- const { leavingVNodes } = state;
583
- let leavingVNodesCache = leavingVNodes.get(vnode.type);
584
- if (!leavingVNodesCache) {
585
- leavingVNodesCache = /* @__PURE__ */ Object.create(null);
586
- leavingVNodes.set(vnode.type, leavingVNodesCache);
587
- }
588
- return leavingVNodesCache;
589
- }
590
- function resolveTransitionHooks(vnode, props, state, instance, postClone) {
591
- const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
592
- const key = String(vnode.key);
593
- const leavingVNodesCache = getLeavingNodesForType(state, vnode);
594
- const callHook$1 = (hook, args) => {
595
- hook && callWithAsyncErrorHandling(hook, instance, 9, args);
596
- };
597
- const callAsyncHook = (hook, args) => {
598
- const done = args[1];
599
- callHook$1(hook, args);
600
- if (shared.isArray(hook)) {
601
- if (hook.every((hook2) => hook2.length <= 1)) done();
602
- } else if (hook.length <= 1) done();
603
- };
604
- const hooks = {
605
- mode,
606
- persisted,
607
- beforeEnter(el) {
608
- let hook = onBeforeEnter;
609
- if (!state.isMounted) if (appear) hook = onBeforeAppear || onBeforeEnter;
610
- else return;
611
- if (el[leaveCbKey]) el[leaveCbKey](true);
612
- const leavingVNode = leavingVNodesCache[key];
613
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) leavingVNode.el[leaveCbKey]();
614
- callHook$1(hook, [el]);
615
- },
616
- enter(el) {
617
- let hook = onEnter;
618
- let afterHook = onAfterEnter;
619
- let cancelHook = onEnterCancelled;
620
- if (!state.isMounted) if (appear) {
621
- hook = onAppear || onEnter;
622
- afterHook = onAfterAppear || onAfterEnter;
623
- cancelHook = onAppearCancelled || onEnterCancelled;
624
- } else return;
625
- let called = false;
626
- const done = el[enterCbKey] = (cancelled) => {
627
- if (called) return;
628
- called = true;
629
- if (cancelled) callHook$1(cancelHook, [el]);
630
- else callHook$1(afterHook, [el]);
631
- if (hooks.delayedLeave) hooks.delayedLeave();
632
- el[enterCbKey] = void 0;
633
- };
634
- if (hook) callAsyncHook(hook, [el, done]);
635
- else done();
636
- },
637
- leave(el, remove) {
638
- const key2 = String(vnode.key);
639
- if (el[enterCbKey]) el[enterCbKey](true);
640
- if (state.isUnmounting) return remove();
641
- callHook$1(onBeforeLeave, [el]);
642
- let called = false;
643
- const done = el[leaveCbKey] = (cancelled) => {
644
- if (called) return;
645
- called = true;
646
- remove();
647
- if (cancelled) callHook$1(onLeaveCancelled, [el]);
648
- else callHook$1(onAfterLeave, [el]);
649
- el[leaveCbKey] = void 0;
650
- if (leavingVNodesCache[key2] === vnode) delete leavingVNodesCache[key2];
651
- };
652
- leavingVNodesCache[key2] = vnode;
653
- if (onLeave) callAsyncHook(onLeave, [el, done]);
654
- else done();
655
- },
656
- clone(vnode2) {
657
- const hooks2 = resolveTransitionHooks(vnode2, props, state, instance, postClone);
658
- if (postClone) postClone(hooks2);
659
- return hooks2;
660
- }
661
- };
662
- return hooks;
663
- }
664
- function emptyPlaceholder(vnode) {
665
- if (isKeepAlive(vnode)) {
666
- vnode = cloneVNode(vnode);
667
- vnode.children = null;
668
- return vnode;
669
- }
670
- }
671
- function getInnerChild$1(vnode) {
672
- if (!isKeepAlive(vnode)) {
673
- if (isTeleport(vnode.type) && vnode.children) return findNonCommentChild(vnode.children);
674
- return vnode;
675
- }
676
- if (vnode.component) return vnode.component.subTree;
677
- const { shapeFlag, children } = vnode;
678
- if (children) {
679
- if (shapeFlag & 16) return children[0];
680
- if (shapeFlag & 32 && shared.isFunction(children.default)) return children.default();
681
- }
682
- }
683
- function setTransitionHooks(vnode, hooks) {
684
- if (vnode.shapeFlag & 6 && vnode.component) {
685
- vnode.transition = hooks;
686
- setTransitionHooks(vnode.component.subTree, hooks);
687
- } else if (vnode.shapeFlag & 128) {
688
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
689
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
690
- } else vnode.transition = hooks;
691
- }
692
- function getTransitionRawChildren(children, keepComment = false, parentKey) {
693
- let ret = [];
694
- let keyedFragmentCount = 0;
695
- for (let i = 0; i < children.length; i++) {
696
- let child = children[i];
697
- const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
698
- if (child.type === Fragment) {
699
- if (child.patchFlag & 128) keyedFragmentCount++;
700
- ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
701
- } else if (keepComment || child.type !== Comment) ret.push(key != null ? cloneVNode(child, { key }) : child);
702
- }
703
- if (keyedFragmentCount > 1) for (let i = 0; i < ret.length; i++) ret[i].patchFlag = -2;
704
- return ret;
705
- }
706
- /* @__NO_SIDE_EFFECTS__ */
707
- function defineComponent(options, extraOptions) {
708
- return shared.isFunction(options) ? /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))() : options;
709
- }
710
- function useId() {
711
- const i = getCurrentInstance();
712
- if (i) return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
713
- return "";
714
- }
715
- function markAsyncBoundary(instance) {
716
- instance.ids = [
717
- instance.ids[0] + instance.ids[2]++ + "-",
718
- 0,
719
- 0
720
- ];
721
- }
722
- function useTemplateRef(key) {
723
- const i = getCurrentInstance();
724
- const r = reactivity.shallowRef(null);
725
- if (i) {
726
- const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs;
727
- Object.defineProperty(refs, key, {
728
- enumerable: true,
729
- get: () => r.value,
730
- set: (val) => r.value = val
731
- });
732
- }
733
- return r;
734
- }
735
- const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
736
- function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
737
- if (shared.isArray(rawRef)) {
738
- rawRef.forEach((r, i) => setRef(r, oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
739
- return;
740
- }
741
- if (isAsyncWrapper(vnode) && !isUnmount) {
742
- if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
743
- return;
744
- }
745
- const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
746
- const value = isUnmount ? null : refValue;
747
- const { i: owner, r: ref } = rawRef;
748
- const oldRef = oldRawRef && oldRawRef.r;
749
- const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs;
750
- const setupState = owner.setupState;
751
- const rawSetupState = reactivity.toRaw(setupState);
752
- const canSetSetupRef = setupState === shared.EMPTY_OBJ ? shared.NO : (key) => {
753
- return shared.hasOwn(rawSetupState, key);
754
- };
755
- if (oldRef != null && oldRef !== ref) {
756
- invalidatePendingSetRef(oldRawRef);
757
- if (shared.isString(oldRef)) {
758
- refs[oldRef] = null;
759
- if (canSetSetupRef(oldRef)) setupState[oldRef] = null;
760
- } else if (reactivity.isRef(oldRef)) {
761
- oldRef.value = null;
762
- const oldRawRefAtom = oldRawRef;
763
- if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
764
- }
765
- }
766
- if (shared.isFunction(ref)) callWithErrorHandling(ref, owner, 12, [value, refs]);
767
- else {
768
- const _isString = shared.isString(ref);
769
- const _isRef = reactivity.isRef(ref);
770
- if (_isString || _isRef) {
771
- const doSet = () => {
772
- if (rawRef.f) {
773
- const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
774
- if (isUnmount) shared.isArray(existing) && shared.remove(existing, refValue);
775
- else if (!shared.isArray(existing)) if (_isString) {
776
- refs[ref] = [refValue];
777
- if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
778
- } else {
779
- const newVal = [refValue];
780
- ref.value = newVal;
781
- if (rawRef.k) refs[rawRef.k] = newVal;
782
- }
783
- else if (!existing.includes(refValue)) existing.push(refValue);
784
- } else if (_isString) {
785
- refs[ref] = value;
786
- if (canSetSetupRef(ref)) setupState[ref] = value;
787
- } else if (_isRef) {
788
- ref.value = value;
789
- if (rawRef.k) refs[rawRef.k] = value;
790
- }
791
- };
792
- if (value) {
793
- const job = () => {
794
- doSet();
795
- pendingSetRefMap.delete(rawRef);
796
- };
797
- job.id = -1;
798
- pendingSetRefMap.set(rawRef, job);
799
- queuePostRenderEffect(job, parentSuspense);
800
- } else {
801
- invalidatePendingSetRef(rawRef);
802
- doSet();
803
- }
804
- }
805
- }
806
- }
807
- function invalidatePendingSetRef(rawRef) {
808
- const pendingSetRef = pendingSetRefMap.get(rawRef);
809
- if (pendingSetRef) {
810
- pendingSetRef.flags |= 8;
811
- pendingSetRefMap.delete(rawRef);
812
- }
813
- }
814
- let hasLoggedMismatchError = false;
815
- const logMismatchError = () => {
816
- if (hasLoggedMismatchError) return;
817
- console.error("Hydration completed but contains mismatches.");
818
- hasLoggedMismatchError = true;
819
- };
820
- const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
821
- const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
822
- const getContainerType = (container) => {
823
- if (container.nodeType !== 1) return void 0;
824
- if (isSVGContainer(container)) return "svg";
825
- if (isMathMLContainer(container)) return "mathml";
826
- };
827
- const isComment = (node) => node.nodeType === 8;
828
- function createHydrationFunctions(rendererInternals) {
829
- const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
830
- const hydrate = (vnode, container) => {
831
- if (!container.hasChildNodes()) {
832
- patch(null, vnode, container);
833
- flushPostFlushCbs();
834
- container._vnode = vnode;
835
- return;
836
- }
837
- hydrateNode(container.firstChild, vnode, null, null, null);
838
- flushPostFlushCbs();
839
- container._vnode = vnode;
840
- };
841
- const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
842
- optimized = optimized || !!vnode.dynamicChildren;
843
- const isFragmentStart = isComment(node) && node.data === "[";
844
- const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
845
- const { type, ref, shapeFlag, patchFlag } = vnode;
846
- let domType = node.nodeType;
847
- vnode.el = node;
848
- if (patchFlag === -2) {
849
- optimized = false;
850
- vnode.dynamicChildren = null;
851
- }
852
- let nextNode = null;
853
- switch (type) {
854
- case Text:
855
- if (domType !== 3) if (vnode.children === "") {
856
- insert(vnode.el = createText(""), parentNode(node), node);
857
- nextNode = node;
858
- } else nextNode = onMismatch();
859
- else {
860
- if (node.data !== vnode.children) {
861
- logMismatchError();
862
- node.data = vnode.children;
863
- }
864
- nextNode = nextSibling(node);
865
- }
866
- break;
867
- case Comment:
868
- if (isTemplateNode(node)) {
869
- nextNode = nextSibling(node);
870
- replaceNode(vnode.el = node.content.firstChild, node, parentComponent);
871
- } else if (domType !== 8 || isFragmentStart) nextNode = onMismatch();
872
- else nextNode = nextSibling(node);
873
- break;
874
- case Static:
875
- if (isFragmentStart) {
876
- node = nextSibling(node);
877
- domType = node.nodeType;
878
- }
879
- if (domType === 1 || domType === 3) {
880
- nextNode = node;
881
- const needToAdoptContent = !vnode.children.length;
882
- for (let i = 0; i < vnode.staticCount; i++) {
883
- if (needToAdoptContent) vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;
884
- if (i === vnode.staticCount - 1) vnode.anchor = nextNode;
885
- nextNode = nextSibling(nextNode);
886
- }
887
- return isFragmentStart ? nextSibling(nextNode) : nextNode;
888
- } else onMismatch();
889
- break;
890
- case Fragment:
891
- if (!isFragmentStart) nextNode = onMismatch();
892
- else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
893
- break;
894
- default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
895
- else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
896
- else if (shapeFlag & 6) {
897
- vnode.slotScopeIds = slotScopeIds;
898
- const container = parentNode(node);
899
- if (isFragmentStart) nextNode = locateClosingAnchor(node);
900
- else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
901
- else nextNode = nextSibling(node);
902
- mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
903
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
904
- let subTree;
905
- if (isFragmentStart) {
906
- subTree = createVNode(Fragment);
907
- subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
908
- } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
909
- subTree.el = node;
910
- vnode.component.subTree = subTree;
911
- }
912
- } else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
913
- else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
914
- else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
915
- }
916
- if (ref != null) setRef(ref, null, parentSuspense, vnode);
917
- return nextNode;
918
- };
919
- const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
920
- optimized = optimized || !!vnode.dynamicChildren;
921
- const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
922
- const forcePatch = type === "input" || type === "option";
923
- if (forcePatch || patchFlag !== -1) {
924
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "created");
925
- let needCallTransitionHooks = false;
926
- if (isTemplateNode(el)) {
927
- needCallTransitionHooks = needTransition(null, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
928
- const content = el.content.firstChild;
929
- if (needCallTransitionHooks) {
930
- const cls = content.getAttribute("class");
931
- if (cls) content.$cls = cls;
932
- transition.beforeEnter(content);
933
- }
934
- replaceNode(content, el, parentComponent);
935
- vnode.el = el = content;
936
- }
937
- if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
938
- let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
939
- while (next) {
940
- if (!isMismatchAllowed(el, 1)) logMismatchError();
941
- const cur = next;
942
- next = next.nextSibling;
943
- remove(cur);
944
- }
945
- } else if (shapeFlag & 8) {
946
- let clientText = vnode.children;
947
- if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) clientText = clientText.slice(1);
948
- if (el.textContent !== clientText) {
949
- if (!isMismatchAllowed(el, 0)) logMismatchError();
950
- el.textContent = vnode.children;
951
- }
952
- }
953
- if (props) {
954
- if (forcePatch || !optimized || patchFlag & 48) {
955
- const isCustomElement = el.tagName.includes("-");
956
- for (const key in props) if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || key[0] === "." || isCustomElement) patchProp(el, key, null, props[key], void 0, parentComponent);
957
- } else if (props.onClick) patchProp(el, "onClick", null, props.onClick, void 0, parentComponent);
958
- else if (patchFlag & 4 && reactivity.isReactive(props.style)) for (const key in props.style) props.style[key];
959
- }
960
- let vnodeHooks;
961
- if (vnodeHooks = props && props.onVnodeBeforeMount) invokeVNodeHook(vnodeHooks, parentComponent, vnode);
962
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
963
- if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) queueEffectWithSuspense(() => {
964
- vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
965
- needCallTransitionHooks && transition.enter(el);
966
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
967
- }, parentSuspense);
968
- }
969
- return el.nextSibling;
970
- };
971
- const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
972
- optimized = optimized || !!parentVNode.dynamicChildren;
973
- const children = parentVNode.children;
974
- const l = children.length;
975
- for (let i = 0; i < l; i++) {
976
- const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
977
- const isText = vnode.type === Text;
978
- if (node) {
979
- if (isText && !optimized) {
980
- if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
981
- insert(createText(node.data.slice(vnode.children.length)), container, nextSibling(node));
982
- node.data = vnode.children;
983
- }
984
- }
985
- node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
986
- } else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
987
- else {
988
- if (!isMismatchAllowed(container, 1)) logMismatchError();
989
- patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
990
- }
991
- }
992
- return node;
993
- };
994
- const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
995
- const { slotScopeIds: fragmentSlotScopeIds } = vnode;
996
- if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
997
- const container = parentNode(node);
998
- const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
999
- if (next && isComment(next) && next.data === "]") return nextSibling(vnode.anchor = next);
1000
- else {
1001
- logMismatchError();
1002
- insert(vnode.anchor = createComment(`]`), container, next);
1003
- return next;
1004
- }
1005
- };
1006
- const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
1007
- if (!isMismatchAllowed(node.parentElement, 1)) logMismatchError();
1008
- vnode.el = null;
1009
- if (isFragment) {
1010
- const end = locateClosingAnchor(node);
1011
- while (true) {
1012
- const next2 = nextSibling(node);
1013
- if (next2 && next2 !== end) remove(next2);
1014
- else break;
1015
- }
1016
- }
1017
- const next = nextSibling(node);
1018
- const container = parentNode(node);
1019
- remove(node);
1020
- patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
1021
- if (parentComponent) {
1022
- parentComponent.vnode.el = vnode.el;
1023
- updateHOCHostEl(parentComponent, vnode.el);
1024
- }
1025
- return next;
1026
- };
1027
- const locateClosingAnchor = (node, open = "[", close = "]") => {
1028
- let match = 0;
1029
- while (node) {
1030
- node = nextSibling(node);
1031
- if (node && isComment(node)) {
1032
- if (node.data === open) match++;
1033
- if (node.data === close) if (match === 0) return nextSibling(node);
1034
- else match--;
1035
- }
1036
- }
1037
- return node;
1038
- };
1039
- const replaceNode = (newNode, oldNode, parentComponent) => {
1040
- const parentNode2 = oldNode.parentNode;
1041
- if (parentNode2) parentNode2.replaceChild(newNode, oldNode);
1042
- let parent = parentComponent;
1043
- while (parent) {
1044
- if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
1045
- parent = parent.parent;
1046
- }
1047
- };
1048
- const isTemplateNode = (node) => {
1049
- return node.nodeType === 1 && node.tagName === "TEMPLATE";
1050
- };
1051
- return [hydrate, hydrateNode];
1052
- }
1053
- const allowMismatchAttr = "data-allow-mismatch";
1054
- const MismatchTypeString = {
1055
- [0]: "text",
1056
- [1]: "children",
1057
- [2]: "class",
1058
- [3]: "style",
1059
- [4]: "attribute"
1060
- };
1061
- function isMismatchAllowed(el, allowedType) {
1062
- if (allowedType === 0 || allowedType === 1) while (el && !el.hasAttribute(allowMismatchAttr)) el = el.parentElement;
1063
- const allowedAttr = el && el.getAttribute(allowMismatchAttr);
1064
- if (allowedAttr == null) return false;
1065
- else if (allowedAttr === "") return true;
1066
- else {
1067
- const list = allowedAttr.split(",");
1068
- if (allowedType === 0 && list.includes("children")) return true;
1069
- return list.includes(MismatchTypeString[allowedType]);
1070
- }
1071
- }
1072
- const requestIdleCallback = shared.getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
1073
- const cancelIdleCallback = shared.getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
1074
- const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
1075
- const id = requestIdleCallback(hydrate, { timeout });
1076
- return () => cancelIdleCallback(id);
1077
- };
1078
- function elementIsVisibleInViewport(el) {
1079
- const { top, left, bottom, right } = el.getBoundingClientRect();
1080
- const { innerHeight, innerWidth } = window;
1081
- return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
1082
- }
1083
- const hydrateOnVisible = (opts) => (hydrate, forEach) => {
1084
- const ob = new IntersectionObserver((entries) => {
1085
- for (const e of entries) {
1086
- if (!e.isIntersecting) continue;
1087
- ob.disconnect();
1088
- hydrate();
1089
- break;
1090
- }
1091
- }, opts);
1092
- forEach((el) => {
1093
- if (!(el instanceof Element)) return;
1094
- if (elementIsVisibleInViewport(el)) {
1095
- hydrate();
1096
- ob.disconnect();
1097
- return false;
1098
- }
1099
- ob.observe(el);
1100
- });
1101
- return () => ob.disconnect();
1102
- };
1103
- const hydrateOnMediaQuery = (query) => (hydrate) => {
1104
- if (query) {
1105
- const mql = matchMedia(query);
1106
- if (mql.matches) hydrate();
1107
- else {
1108
- mql.addEventListener("change", hydrate, { once: true });
1109
- return () => mql.removeEventListener("change", hydrate);
1110
- }
1111
- }
1112
- };
1113
- const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
1114
- if (shared.isString(interactions)) interactions = [interactions];
1115
- let hasHydrated = false;
1116
- const doHydrate = (e) => {
1117
- if (!hasHydrated) {
1118
- hasHydrated = true;
1119
- teardown();
1120
- hydrate();
1121
- e.target.dispatchEvent(new e.constructor(e.type, e));
1122
- }
1123
- };
1124
- const teardown = () => {
1125
- forEach((el) => {
1126
- for (const i of interactions) el.removeEventListener(i, doHydrate);
1127
- });
1128
- };
1129
- forEach((el) => {
1130
- for (const i of interactions) el.addEventListener(i, doHydrate, { once: true });
1131
- });
1132
- return teardown;
1133
- };
1134
- function forEachElement(node, cb) {
1135
- if (isComment(node) && node.data === "[") {
1136
- let depth = 1;
1137
- let next = node.nextSibling;
1138
- while (next) {
1139
- if (next.nodeType === 1) {
1140
- if (cb(next) === false) break;
1141
- } else if (isComment(next)) {
1142
- if (next.data === "]") {
1143
- if (--depth === 0) break;
1144
- } else if (next.data === "[") depth++;
1145
- }
1146
- next = next.nextSibling;
1147
- }
1148
- } else cb(node);
1149
- }
1150
- const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
1151
- /* @__NO_SIDE_EFFECTS__ */
1152
- function defineAsyncComponent(source) {
1153
- if (shared.isFunction(source)) source = { loader: source };
1154
- const { loader, loadingComponent, errorComponent, delay = 200, hydrate: hydrateStrategy, timeout, suspensible = true, onError: userOnError } = source;
1155
- let pendingRequest = null;
1156
- let resolvedComp;
1157
- let retries = 0;
1158
- const retry = () => {
1159
- retries++;
1160
- pendingRequest = null;
1161
- return load();
1162
- };
1163
- const load = () => {
1164
- let thisRequest;
1165
- return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
1166
- err = err instanceof Error ? err : new Error(String(err));
1167
- if (userOnError) return new Promise((resolve$1, reject) => {
1168
- const userRetry = () => resolve$1(retry());
1169
- const userFail = () => reject(err);
1170
- userOnError(err, userRetry, userFail, retries + 1);
1171
- });
1172
- else throw err;
1173
- }).then((comp) => {
1174
- if (thisRequest !== pendingRequest && pendingRequest) return pendingRequest;
1175
- if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) comp = comp.default;
1176
- resolvedComp = comp;
1177
- return comp;
1178
- }));
1179
- };
1180
- return /* @__PURE__ */ defineComponent({
1181
- name: "AsyncComponentWrapper",
1182
- __asyncLoader: load,
1183
- __asyncHydrate(el, instance, hydrate) {
1184
- let patched = false;
1185
- (instance.bu || (instance.bu = [])).push(() => patched = true);
1186
- const performHydrate = () => {
1187
- if (patched) return;
1188
- hydrate();
1189
- };
1190
- const doHydrate = hydrateStrategy ? () => {
1191
- const teardown = hydrateStrategy(performHydrate, (cb) => forEachElement(el, cb));
1192
- if (teardown) (instance.bum || (instance.bum = [])).push(teardown);
1193
- } : performHydrate;
1194
- if (resolvedComp) doHydrate();
1195
- else load().then(() => !instance.isUnmounted && doHydrate());
1196
- },
1197
- get __asyncResolved() {
1198
- return resolvedComp;
1199
- },
1200
- setup() {
1201
- const instance = currentInstance;
1202
- markAsyncBoundary(instance);
1203
- if (resolvedComp) return () => createInnerComp(resolvedComp, instance);
1204
- const onError = (err) => {
1205
- pendingRequest = null;
1206
- handleError(err, instance, 13, !errorComponent);
1207
- };
1208
- if (suspensible && instance.suspense || isInSSRComponentSetup) return load().then((comp) => {
1209
- return () => createInnerComp(comp, instance);
1210
- }).catch((err) => {
1211
- onError(err);
1212
- return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
1213
- });
1214
- const loaded = reactivity.ref(false);
1215
- const error = reactivity.ref();
1216
- const delayed = reactivity.ref(!!delay);
1217
- if (delay) setTimeout(() => {
1218
- delayed.value = false;
1219
- }, delay);
1220
- if (timeout != null) setTimeout(() => {
1221
- if (!loaded.value && !error.value) {
1222
- const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
1223
- onError(err);
1224
- error.value = err;
1225
- }
1226
- }, timeout);
1227
- load().then(() => {
1228
- loaded.value = true;
1229
- if (instance.parent && isKeepAlive(instance.parent.vnode)) instance.parent.update();
1230
- }).catch((err) => {
1231
- onError(err);
1232
- error.value = err;
1233
- });
1234
- return () => {
1235
- if (loaded.value && resolvedComp) return createInnerComp(resolvedComp, instance);
1236
- else if (error.value && errorComponent) return createVNode(errorComponent, { error: error.value });
1237
- else if (loadingComponent && !delayed.value) return createVNode(loadingComponent);
1238
- };
1239
- }
1240
- });
1241
- }
1242
- function createInnerComp(comp, parent) {
1243
- const { ref: ref2, props, children, ce } = parent.vnode;
1244
- const vnode = createVNode(comp, props, children);
1245
- vnode.ref = ref2;
1246
- vnode.ce = ce;
1247
- delete parent.vnode.ce;
1248
- return vnode;
1249
- }
1250
- const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
1251
- const KeepAlive = {
1252
- name: `KeepAlive`,
1253
- __isKeepAlive: true,
1254
- props: {
1255
- include: [
1256
- String,
1257
- RegExp,
1258
- Array
1259
- ],
1260
- exclude: [
1261
- String,
1262
- RegExp,
1263
- Array
1264
- ],
1265
- max: [String, Number]
1266
- },
1267
- setup(props, { slots }) {
1268
- const instance = getCurrentInstance();
1269
- const sharedContext = instance.ctx;
1270
- if (!sharedContext.renderer) return () => {
1271
- const children = slots.default && slots.default();
1272
- return children && children.length === 1 ? children[0] : children;
1273
- };
1274
- const cache = /* @__PURE__ */ new Map();
1275
- const keys = /* @__PURE__ */ new Set();
1276
- let current = null;
1277
- const parentSuspense = instance.suspense;
1278
- const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext;
1279
- const storageContainer = createElement("div");
1280
- sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
1281
- const instance2 = vnode.component;
1282
- move(vnode, container, anchor, 0, parentSuspense);
1283
- patch(instance2.vnode, vnode, container, anchor, instance2, parentSuspense, namespace, vnode.slotScopeIds, optimized);
1284
- queuePostRenderEffect(() => {
1285
- instance2.isDeactivated = false;
1286
- if (instance2.a) shared.invokeArrayFns(instance2.a);
1287
- const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
1288
- if (vnodeHook) invokeVNodeHook(vnodeHook, instance2.parent, vnode);
1289
- }, parentSuspense);
1290
- };
1291
- sharedContext.deactivate = (vnode) => {
1292
- const instance2 = vnode.component;
1293
- invalidateMount(instance2.m);
1294
- invalidateMount(instance2.a);
1295
- move(vnode, storageContainer, null, 1, parentSuspense);
1296
- queuePostRenderEffect(() => {
1297
- if (instance2.da) shared.invokeArrayFns(instance2.da);
1298
- const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
1299
- if (vnodeHook) invokeVNodeHook(vnodeHook, instance2.parent, vnode);
1300
- instance2.isDeactivated = true;
1301
- }, parentSuspense);
1302
- };
1303
- function unmount(vnode) {
1304
- resetShapeFlag(vnode);
1305
- _unmount(vnode, instance, parentSuspense, true);
1306
- }
1307
- function pruneCache(filter) {
1308
- cache.forEach((vnode, key) => {
1309
- const name = getComponentName(vnode.type);
1310
- if (name && !filter(name)) pruneCacheEntry(key);
1311
- });
1312
- }
1313
- function pruneCacheEntry(key) {
1314
- const cached = cache.get(key);
1315
- if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
1316
- else if (current) resetShapeFlag(current);
1317
- cache.delete(key);
1318
- keys.delete(key);
1319
- }
1320
- watch(() => [props.include, props.exclude], ([include, exclude]) => {
1321
- include && pruneCache((name) => matches(include, name));
1322
- exclude && pruneCache((name) => !matches(exclude, name));
1323
- }, {
1324
- flush: "post",
1325
- deep: true
1326
- });
1327
- let pendingCacheKey = null;
1328
- const cacheSubtree = () => {
1329
- if (pendingCacheKey != null) if (isSuspense(instance.subTree.type)) queuePostRenderEffect(() => {
1330
- cache.set(pendingCacheKey, getInnerChild(instance.subTree));
1331
- }, instance.subTree.suspense);
1332
- else cache.set(pendingCacheKey, getInnerChild(instance.subTree));
1333
- };
1334
- onMounted(cacheSubtree);
1335
- onUpdated(cacheSubtree);
1336
- onBeforeUnmount(() => {
1337
- cache.forEach((cached) => {
1338
- const { subTree, suspense } = instance;
1339
- const vnode = getInnerChild(subTree);
1340
- if (cached.type === vnode.type && cached.key === vnode.key) {
1341
- resetShapeFlag(vnode);
1342
- const da = vnode.component.da;
1343
- da && queuePostRenderEffect(da, suspense);
1344
- return;
1345
- }
1346
- unmount(cached);
1347
- });
1348
- });
1349
- return () => {
1350
- pendingCacheKey = null;
1351
- if (!slots.default) return current = null;
1352
- const children = slots.default();
1353
- const rawVNode = children[0];
1354
- if (children.length > 1) {
1355
- current = null;
1356
- return children;
1357
- } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
1358
- current = null;
1359
- return rawVNode;
1360
- }
1361
- let vnode = getInnerChild(rawVNode);
1362
- if (vnode.type === Comment) {
1363
- current = null;
1364
- return vnode;
1365
- }
1366
- const comp = vnode.type;
1367
- const name = getComponentName(isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp);
1368
- const { include, exclude, max } = props;
1369
- if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
1370
- vnode.shapeFlag &= -257;
1371
- current = vnode;
1372
- return rawVNode;
1373
- }
1374
- const key = vnode.key == null ? comp : vnode.key;
1375
- const cachedVNode = cache.get(key);
1376
- if (vnode.el) {
1377
- vnode = cloneVNode(vnode);
1378
- if (rawVNode.shapeFlag & 128) rawVNode.ssContent = vnode;
1379
- }
1380
- pendingCacheKey = key;
1381
- if (cachedVNode) {
1382
- vnode.el = cachedVNode.el;
1383
- vnode.component = cachedVNode.component;
1384
- if (vnode.transition) setTransitionHooks(vnode, vnode.transition);
1385
- vnode.shapeFlag |= 512;
1386
- keys.delete(key);
1387
- keys.add(key);
1388
- } else {
1389
- keys.add(key);
1390
- if (max && keys.size > parseInt(max, 10)) pruneCacheEntry(keys.values().next().value);
1391
- }
1392
- vnode.shapeFlag |= 256;
1393
- current = vnode;
1394
- return isSuspense(rawVNode.type) ? rawVNode : vnode;
1395
- };
1396
- }
1397
- };
1398
- function matches(pattern, name) {
1399
- if (shared.isArray(pattern)) return pattern.some((p) => matches(p, name));
1400
- else if (shared.isString(pattern)) return pattern.split(",").includes(name);
1401
- else if (shared.isRegExp(pattern)) {
1402
- pattern.lastIndex = 0;
1403
- return pattern.test(name);
1404
- }
1405
- return false;
1406
- }
1407
- function onActivated(hook, target) {
1408
- registerKeepAliveHook(hook, "a", target);
1409
- }
1410
- function onDeactivated(hook, target) {
1411
- registerKeepAliveHook(hook, "da", target);
1412
- }
1413
- function registerKeepAliveHook(hook, type, target = currentInstance) {
1414
- const wrappedHook = hook.__wdc || (hook.__wdc = () => {
1415
- let current = target;
1416
- while (current) {
1417
- if (current.isDeactivated) return;
1418
- current = current.parent;
1419
- }
1420
- return hook();
1421
- });
1422
- injectHook(type, wrappedHook, target);
1423
- if (target) {
1424
- let current = target.parent;
1425
- while (current && current.parent) {
1426
- if (isKeepAlive(current.parent.vnode)) injectToKeepAliveRoot(wrappedHook, type, target, current);
1427
- current = current.parent;
1428
- }
1429
- }
1430
- }
1431
- function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
1432
- const injected = injectHook(type, hook, keepAliveRoot, true);
1433
- onUnmounted(() => {
1434
- shared.remove(keepAliveRoot[type], injected);
1435
- }, target);
1436
- }
1437
- function resetShapeFlag(vnode) {
1438
- vnode.shapeFlag &= -257;
1439
- vnode.shapeFlag &= -513;
1440
- }
1441
- function getInnerChild(vnode) {
1442
- return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
1443
- }
1444
- function injectHook(type, hook, target = currentInstance, prepend = false) {
1445
- if (target) {
1446
- const hooks = target[type] || (target[type] = []);
1447
- const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
1448
- reactivity.pauseTracking();
1449
- const reset = setCurrentInstance(target);
1450
- const res = callWithAsyncErrorHandling(hook, target, type, args);
1451
- reset();
1452
- reactivity.resetTracking();
1453
- return res;
1454
- });
1455
- if (prepend) hooks.unshift(wrappedHook);
1456
- else hooks.push(wrappedHook);
1457
- return wrappedHook;
1458
- }
1459
- }
1460
- const createHook = (lifecycle) => (hook, target = currentInstance) => {
1461
- if (!isInSSRComponentSetup || lifecycle === "sp") injectHook(lifecycle, (...args) => hook(...args), target);
1462
- };
1463
- const onBeforeMount = createHook("bm");
1464
- const onMounted = createHook("m");
1465
- const onBeforeUpdate = createHook("bu");
1466
- const onUpdated = createHook("u");
1467
- const onBeforeUnmount = createHook("bum");
1468
- const onUnmounted = createHook("um");
1469
- const onServerPrefetch = createHook("sp");
1470
- const onRenderTriggered = createHook("rtg");
1471
- const onRenderTracked = createHook("rtc");
1472
- function onErrorCaptured(hook, target = currentInstance) {
1473
- injectHook("ec", hook, target);
1474
- }
1475
- const COMPONENTS = "components";
1476
- const DIRECTIVES = "directives";
1477
- function resolveComponent(name, maybeSelfReference) {
1478
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
1479
- }
1480
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
1481
- function resolveDynamicComponent(component) {
1482
- if (shared.isString(component)) return resolveAsset(COMPONENTS, component, false) || component;
1483
- else return component || NULL_DYNAMIC_COMPONENT;
1484
- }
1485
- function resolveDirective(name) {
1486
- return resolveAsset(DIRECTIVES, name);
1487
- }
1488
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
1489
- const instance = currentRenderingInstance || currentInstance;
1490
- if (instance) {
1491
- const Component = instance.type;
1492
- if (type === COMPONENTS) {
1493
- const selfName = getComponentName(Component, false);
1494
- if (selfName && (selfName === name || selfName === shared.camelize(name) || selfName === shared.capitalize(shared.camelize(name)))) return Component;
1495
- }
1496
- const res = resolve(instance[type] || Component[type], name) || resolve(instance.appContext[type], name);
1497
- if (!res && maybeSelfReference) return Component;
1498
- return res;
1499
- }
1500
- }
1501
- function resolve(registry, name) {
1502
- return registry && (registry[name] || registry[shared.camelize(name)] || registry[shared.capitalize(shared.camelize(name))]);
1503
- }
1504
- function renderList(source, renderItem, cache, index) {
1505
- let ret;
1506
- const cached = cache && cache[index];
1507
- const sourceIsArray = shared.isArray(source);
1508
- if (sourceIsArray || shared.isString(source)) {
1509
- const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
1510
- let needsWrap = false;
1511
- let isReadonlySource = false;
1512
- if (sourceIsReactiveArray) {
1513
- needsWrap = !reactivity.isShallow(source);
1514
- isReadonlySource = reactivity.isReadonly(source);
1515
- source = reactivity.shallowReadArray(source);
1516
- }
1517
- ret = new Array(source.length);
1518
- for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? reactivity.toReadonly(reactivity.toReactive(source[i])) : reactivity.toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
1519
- } else if (typeof source === "number") {
1520
- ret = new Array(source);
1521
- for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
1522
- } else if (shared.isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
1523
- else {
1524
- const keys = Object.keys(source);
1525
- ret = new Array(keys.length);
1526
- for (let i = 0, l = keys.length; i < l; i++) {
1527
- const key = keys[i];
1528
- ret[i] = renderItem(source[key], key, i, cached && cached[i]);
1529
- }
1530
- }
1531
- else ret = [];
1532
- if (cache) cache[index] = ret;
1533
- return ret;
1534
- }
1535
- function createSlots(slots, dynamicSlots) {
1536
- for (let i = 0; i < dynamicSlots.length; i++) {
1537
- const slot = dynamicSlots[i];
1538
- if (shared.isArray(slot)) for (let j = 0; j < slot.length; j++) slots[slot[j].name] = slot[j].fn;
1539
- else if (slot) slots[slot.name] = slot.key ? (...args) => {
1540
- const res = slot.fn(...args);
1541
- if (res) res.key = slot.key;
1542
- return res;
1543
- } : slot.fn;
1544
- }
1545
- return slots;
1546
- }
1547
- function renderSlot(slots, name, props = {}, fallback, noSlotted) {
1548
- if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
1549
- const hasProps = Object.keys(props).length > 0;
1550
- if (name !== "default") props.name = name;
1551
- return openBlock(), createBlock(Fragment, null, [createVNode("slot", props, fallback && fallback())], hasProps ? -2 : 64);
1552
- }
1553
- let slot = slots[name];
1554
- if (slot && slot._c) slot._d = false;
1555
- openBlock();
1556
- const validSlotContent = slot && ensureValidVNode(slot(props));
1557
- const slotKey = props.key || validSlotContent && validSlotContent.key;
1558
- const rendered = createBlock(Fragment, { key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
1559
- if (!noSlotted && rendered.scopeId) rendered.slotScopeIds = [rendered.scopeId + "-s"];
1560
- if (slot && slot._c) slot._d = true;
1561
- return rendered;
1562
- }
1563
- function ensureValidVNode(vnodes) {
1564
- return vnodes.some((child) => {
1565
- if (!isVNode(child)) return true;
1566
- if (child.type === Comment) return false;
1567
- if (child.type === Fragment && !ensureValidVNode(child.children)) return false;
1568
- return true;
1569
- }) ? vnodes : null;
1570
- }
1571
- function toHandlers(obj, preserveCaseIfNecessary) {
1572
- const ret = {};
1573
- for (const key in obj) ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : shared.toHandlerKey(key)] = obj[key];
1574
- return ret;
1575
- }
1576
- const getPublicInstance = (i) => {
1577
- if (!i) return null;
1578
- if (isStatefulComponent(i)) return getComponentPublicInstance(i);
1579
- return getPublicInstance(i.parent);
1580
- };
1581
- const publicPropertiesMap = /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), {
1582
- $: (i) => i,
1583
- $el: (i) => i.vnode.el,
1584
- $data: (i) => i.data,
1585
- $props: (i) => i.props,
1586
- $attrs: (i) => i.attrs,
1587
- $slots: (i) => i.slots,
1588
- $refs: (i) => i.refs,
1589
- $parent: (i) => getPublicInstance(i.parent),
1590
- $root: (i) => getPublicInstance(i.root),
1591
- $host: (i) => i.ce,
1592
- $emit: (i) => i.emit,
1593
- $options: (i) => resolveMergedOptions(i),
1594
- $forceUpdate: (i) => i.f || (i.f = () => {
1595
- queueJob(i.update);
1596
- }),
1597
- $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
1598
- $watch: (i) => instanceWatch.bind(i)
1599
- });
1600
- const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key);
1601
- const PublicInstanceProxyHandlers = {
1602
- get({ _: instance }, key) {
1603
- if (key === "__v_skip") return true;
1604
- const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
1605
- let normalizedProps;
1606
- if (key[0] !== "$") {
1607
- const n = accessCache[key];
1608
- if (n !== void 0) switch (n) {
1609
- case 1: return setupState[key];
1610
- case 2: return data[key];
1611
- case 4: return ctx[key];
1612
- case 3: return props[key];
1613
- }
1614
- else if (hasSetupBinding(setupState, key)) {
1615
- accessCache[key] = 1;
1616
- return setupState[key];
1617
- } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
1618
- accessCache[key] = 2;
1619
- return data[key];
1620
- } else if ((normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key)) {
1621
- accessCache[key] = 3;
1622
- return props[key];
1623
- } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
1624
- accessCache[key] = 4;
1625
- return ctx[key];
1626
- } else if (shouldCacheAccess) accessCache[key] = 0;
1627
- }
1628
- const publicGetter = publicPropertiesMap[key];
1629
- let cssModule, globalProperties;
1630
- if (publicGetter) {
1631
- if (key === "$attrs") reactivity.track(instance.attrs, "get", "");
1632
- return publicGetter(instance);
1633
- } else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) return cssModule;
1634
- else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
1635
- accessCache[key] = 4;
1636
- return ctx[key];
1637
- } else if (globalProperties = appContext.config.globalProperties, shared.hasOwn(globalProperties, key)) return globalProperties[key];
1638
- },
1639
- set({ _: instance }, key, value) {
1640
- const { data, setupState, ctx } = instance;
1641
- if (hasSetupBinding(setupState, key)) {
1642
- setupState[key] = value;
1643
- return true;
1644
- } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
1645
- data[key] = value;
1646
- return true;
1647
- } else if (shared.hasOwn(instance.props, key)) return false;
1648
- if (key[0] === "$" && key.slice(1) in instance) return false;
1649
- else ctx[key] = value;
1650
- return true;
1651
- },
1652
- has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions, type } }, key) {
1653
- let normalizedProps, cssModules;
1654
- return !!(accessCache[key] || data !== shared.EMPTY_OBJ && key[0] !== "$" && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
1655
- },
1656
- defineProperty(target, key, descriptor) {
1657
- if (descriptor.get != null) target._.accessCache[key] = 0;
1658
- else if (shared.hasOwn(descriptor, "value")) this.set(target, key, descriptor.value, null);
1659
- return Reflect.defineProperty(target, key, descriptor);
1660
- }
1661
- };
1662
- const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend({}, PublicInstanceProxyHandlers, {
1663
- get(target, key) {
1664
- if (key === Symbol.unscopables) return;
1665
- return PublicInstanceProxyHandlers.get(target, key, target);
1666
- },
1667
- has(_, key) {
1668
- return key[0] !== "_" && !shared.isGloballyAllowed(key);
1669
- }
1670
- });
1671
- function defineProps() {
1672
- return null;
1673
- }
1674
- function defineEmits() {
1675
- return null;
1676
- }
1677
- function defineExpose(exposed) {}
1678
- function defineOptions(options) {}
1679
- function defineSlots() {
1680
- return null;
1681
- }
1682
- function defineModel() {}
1683
- function withDefaults(props, defaults) {
1684
- return null;
1685
- }
1686
- function useSlots() {
1687
- return getContext().slots;
1688
- }
1689
- function useAttrs() {
1690
- return getContext().attrs;
1691
- }
1692
- function getContext(calledFunctionName) {
1693
- const i = getCurrentInstance();
1694
- return i.setupContext || (i.setupContext = createSetupContext(i));
1695
- }
1696
- function normalizePropsOrEmits(props) {
1697
- return shared.isArray(props) ? props.reduce((normalized, p) => (normalized[p] = null, normalized), {}) : props;
1698
- }
1699
- function mergeDefaults(raw, defaults) {
1700
- const props = normalizePropsOrEmits(raw);
1701
- for (const key in defaults) {
1702
- if (key.startsWith("__skip")) continue;
1703
- let opt = props[key];
1704
- if (opt) if (shared.isArray(opt) || shared.isFunction(opt)) opt = props[key] = {
1705
- type: opt,
1706
- default: defaults[key]
1707
- };
1708
- else opt.default = defaults[key];
1709
- else if (opt === null) opt = props[key] = { default: defaults[key] };
1710
- if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
1711
- }
1712
- return props;
1713
- }
1714
- function mergeModels(a, b) {
1715
- if (!a || !b) return a || b;
1716
- if (shared.isArray(a) && shared.isArray(b)) return a.concat(b);
1717
- return shared.extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
1718
- }
1719
- function createPropsRestProxy(props, excludedKeys) {
1720
- const ret = {};
1721
- for (const key in props) if (!excludedKeys.includes(key)) Object.defineProperty(ret, key, {
1722
- enumerable: true,
1723
- get: () => props[key]
1724
- });
1725
- return ret;
1726
- }
1727
- function withAsyncContext(getAwaitable) {
1728
- const ctx = getCurrentInstance();
1729
- let awaitable = getAwaitable();
1730
- unsetCurrentInstance();
1731
- if (shared.isPromise(awaitable)) awaitable = awaitable.catch((e) => {
1732
- setCurrentInstance(ctx);
1733
- throw e;
1734
- });
1735
- return [awaitable, () => setCurrentInstance(ctx)];
1736
- }
1737
- let shouldCacheAccess = true;
1738
- function applyOptions(instance) {
1739
- const options = resolveMergedOptions(instance);
1740
- const publicThis = instance.proxy;
1741
- const ctx = instance.ctx;
1742
- shouldCacheAccess = false;
1743
- if (options.beforeCreate) callHook(options.beforeCreate, instance, "bc");
1744
- const { data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, expose, inheritAttrs, components, directives, filters } = options;
1745
- const checkDuplicateProperties = null;
1746
- if (injectOptions) resolveInjections(injectOptions, ctx, checkDuplicateProperties);
1747
- if (methods) for (const key in methods) {
1748
- const methodHandler = methods[key];
1749
- if (shared.isFunction(methodHandler)) ctx[key] = methodHandler.bind(publicThis);
1750
- }
1751
- if (dataOptions) {
1752
- const data = dataOptions.call(publicThis, publicThis);
1753
- if (!shared.isObject(data));
1754
- else instance.data = reactivity.reactive(data);
1755
- }
1756
- shouldCacheAccess = true;
1757
- if (computedOptions) for (const key in computedOptions) {
1758
- const opt = computedOptions[key];
1759
- const c = computed({
1760
- get: shared.isFunction(opt) ? opt.bind(publicThis, publicThis) : shared.isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : shared.NOOP,
1761
- set: !shared.isFunction(opt) && shared.isFunction(opt.set) ? opt.set.bind(publicThis) : shared.NOOP
1762
- });
1763
- Object.defineProperty(ctx, key, {
1764
- enumerable: true,
1765
- configurable: true,
1766
- get: () => c.value,
1767
- set: (v) => c.value = v
1768
- });
1769
- }
1770
- if (watchOptions) for (const key in watchOptions) createWatcher(watchOptions[key], ctx, publicThis, key);
1771
- if (provideOptions) {
1772
- const provides = shared.isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
1773
- Reflect.ownKeys(provides).forEach((key) => {
1774
- provide(key, provides[key]);
1775
- });
1776
- }
1777
- if (created) callHook(created, instance, "c");
1778
- function registerLifecycleHook(register, hook) {
1779
- if (shared.isArray(hook)) hook.forEach((_hook) => register(_hook.bind(publicThis)));
1780
- else if (hook) register(hook.bind(publicThis));
1781
- }
1782
- registerLifecycleHook(onBeforeMount, beforeMount);
1783
- registerLifecycleHook(onMounted, mounted);
1784
- registerLifecycleHook(onBeforeUpdate, beforeUpdate);
1785
- registerLifecycleHook(onUpdated, updated);
1786
- registerLifecycleHook(onActivated, activated);
1787
- registerLifecycleHook(onDeactivated, deactivated);
1788
- registerLifecycleHook(onErrorCaptured, errorCaptured);
1789
- registerLifecycleHook(onRenderTracked, renderTracked);
1790
- registerLifecycleHook(onRenderTriggered, renderTriggered);
1791
- registerLifecycleHook(onBeforeUnmount, beforeUnmount);
1792
- registerLifecycleHook(onUnmounted, unmounted);
1793
- registerLifecycleHook(onServerPrefetch, serverPrefetch);
1794
- if (shared.isArray(expose)) {
1795
- if (expose.length) {
1796
- const exposed = instance.exposed || (instance.exposed = {});
1797
- expose.forEach((key) => {
1798
- Object.defineProperty(exposed, key, {
1799
- get: () => publicThis[key],
1800
- set: (val) => publicThis[key] = val,
1801
- enumerable: true
1802
- });
1803
- });
1804
- } else if (!instance.exposed) instance.exposed = {};
1805
- }
1806
- if (render && instance.render === shared.NOOP) instance.render = render;
1807
- if (inheritAttrs != null) instance.inheritAttrs = inheritAttrs;
1808
- if (components) instance.components = components;
1809
- if (directives) instance.directives = directives;
1810
- if (serverPrefetch) markAsyncBoundary(instance);
1811
- }
1812
- function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP) {
1813
- if (shared.isArray(injectOptions)) injectOptions = normalizeInject(injectOptions);
1814
- for (const key in injectOptions) {
1815
- const opt = injectOptions[key];
1816
- let injected;
1817
- if (shared.isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
1818
- else injected = inject(opt.from || key);
1819
- else injected = inject(opt);
1820
- if (reactivity.isRef(injected)) Object.defineProperty(ctx, key, {
1821
- enumerable: true,
1822
- configurable: true,
1823
- get: () => injected.value,
1824
- set: (v) => injected.value = v
1825
- });
1826
- else ctx[key] = injected;
1827
- }
1828
- }
1829
- function callHook(hook, instance, type) {
1830
- callWithAsyncErrorHandling(shared.isArray(hook) ? hook.map((h$1) => h$1.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type);
1831
- }
1832
- function createWatcher(raw, ctx, publicThis, key) {
1833
- let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
1834
- if (shared.isString(raw)) {
1835
- const handler = ctx[raw];
1836
- if (shared.isFunction(handler)) watch(getter, handler);
1837
- } else if (shared.isFunction(raw)) watch(getter, raw.bind(publicThis));
1838
- else if (shared.isObject(raw)) if (shared.isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
1839
- else {
1840
- const handler = shared.isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
1841
- if (shared.isFunction(handler)) watch(getter, handler, raw);
1842
- }
1843
- }
1844
- function resolveMergedOptions(instance) {
1845
- const base = instance.type;
1846
- const { mixins, extends: extendsOptions } = base;
1847
- const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
1848
- const cached = cache.get(base);
1849
- let resolved;
1850
- if (cached) resolved = cached;
1851
- else if (!globalMixins.length && !mixins && !extendsOptions) resolved = base;
1852
- else {
1853
- resolved = {};
1854
- if (globalMixins.length) globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
1855
- mergeOptions(resolved, base, optionMergeStrategies);
1856
- }
1857
- if (shared.isObject(base)) cache.set(base, resolved);
1858
- return resolved;
1859
- }
1860
- function mergeOptions(to, from, strats, asMixin = false) {
1861
- const { mixins, extends: extendsOptions } = from;
1862
- if (extendsOptions) mergeOptions(to, extendsOptions, strats, true);
1863
- if (mixins) mixins.forEach((m) => mergeOptions(to, m, strats, true));
1864
- for (const key in from) if (asMixin && key === "expose");
1865
- else {
1866
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
1867
- to[key] = strat ? strat(to[key], from[key]) : from[key];
1868
- }
1869
- return to;
1870
- }
1871
- const internalOptionMergeStrats = {
1872
- data: mergeDataFn,
1873
- props: mergeEmitsOrPropsOptions,
1874
- emits: mergeEmitsOrPropsOptions,
1875
- methods: mergeObjectOptions,
1876
- computed: mergeObjectOptions,
1877
- beforeCreate: mergeAsArray,
1878
- created: mergeAsArray,
1879
- beforeMount: mergeAsArray,
1880
- mounted: mergeAsArray,
1881
- beforeUpdate: mergeAsArray,
1882
- updated: mergeAsArray,
1883
- beforeDestroy: mergeAsArray,
1884
- beforeUnmount: mergeAsArray,
1885
- destroyed: mergeAsArray,
1886
- unmounted: mergeAsArray,
1887
- activated: mergeAsArray,
1888
- deactivated: mergeAsArray,
1889
- errorCaptured: mergeAsArray,
1890
- serverPrefetch: mergeAsArray,
1891
- components: mergeObjectOptions,
1892
- directives: mergeObjectOptions,
1893
- watch: mergeWatchOptions,
1894
- provide: mergeDataFn,
1895
- inject: mergeInject
1896
- };
1897
- function mergeDataFn(to, from) {
1898
- if (!from) return to;
1899
- if (!to) return from;
1900
- return function mergedDataFn() {
1901
- return shared.extend(shared.isFunction(to) ? to.call(this, this) : to, shared.isFunction(from) ? from.call(this, this) : from);
1902
- };
1903
- }
1904
- function mergeInject(to, from) {
1905
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
1906
- }
1907
- function normalizeInject(raw) {
1908
- if (shared.isArray(raw)) {
1909
- const res = {};
1910
- for (let i = 0; i < raw.length; i++) res[raw[i]] = raw[i];
1911
- return res;
1912
- }
1913
- return raw;
1914
- }
1915
- function mergeAsArray(to, from) {
1916
- return to ? [...new Set([].concat(to, from))] : from;
1917
- }
1918
- function mergeObjectOptions(to, from) {
1919
- return to ? shared.extend(/* @__PURE__ */ Object.create(null), to, from) : from;
1920
- }
1921
- function mergeEmitsOrPropsOptions(to, from) {
1922
- if (to) {
1923
- if (shared.isArray(to) && shared.isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
1924
- return shared.extend(/* @__PURE__ */ Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from != null ? from : {}));
1925
- } else return from;
1926
- }
1927
- function mergeWatchOptions(to, from) {
1928
- if (!to) return from;
1929
- if (!from) return to;
1930
- const merged = shared.extend(/* @__PURE__ */ Object.create(null), to);
1931
- for (const key in from) merged[key] = mergeAsArray(to[key], from[key]);
1932
- return merged;
1933
- }
1934
- function createAppContext() {
1935
- return {
1936
- app: null,
1937
- config: {
1938
- isNativeTag: shared.NO,
1939
- performance: false,
1940
- globalProperties: {},
1941
- optionMergeStrategies: {},
1942
- errorHandler: void 0,
1943
- warnHandler: void 0,
1944
- compilerOptions: {}
1945
- },
1946
- mixins: [],
1947
- components: {},
1948
- directives: {},
1949
- provides: /* @__PURE__ */ Object.create(null),
1950
- optionsCache: /* @__PURE__ */ new WeakMap(),
1951
- propsCache: /* @__PURE__ */ new WeakMap(),
1952
- emitsCache: /* @__PURE__ */ new WeakMap()
1953
- };
1954
- }
1955
- let uid$1 = 0;
1956
- function createAppAPI(render, hydrate) {
1957
- return function createApp(rootComponent, rootProps = null) {
1958
- if (!shared.isFunction(rootComponent)) rootComponent = shared.extend({}, rootComponent);
1959
- if (rootProps != null && !shared.isObject(rootProps)) rootProps = null;
1960
- const context = createAppContext();
1961
- const installedPlugins = /* @__PURE__ */ new WeakSet();
1962
- const pluginCleanupFns = [];
1963
- let isMounted = false;
1964
- const app = context.app = {
1965
- _uid: uid$1++,
1966
- _component: rootComponent,
1967
- _props: rootProps,
1968
- _container: null,
1969
- _context: context,
1970
- _instance: null,
1971
- version,
1972
- get config() {
1973
- return context.config;
1974
- },
1975
- set config(v) {},
1976
- use(plugin, ...options) {
1977
- if (installedPlugins.has(plugin));
1978
- else if (plugin && shared.isFunction(plugin.install)) {
1979
- installedPlugins.add(plugin);
1980
- plugin.install(app, ...options);
1981
- } else if (shared.isFunction(plugin)) {
1982
- installedPlugins.add(plugin);
1983
- plugin(app, ...options);
1984
- }
1985
- return app;
1986
- },
1987
- mixin(mixin) {
1988
- if (!context.mixins.includes(mixin)) context.mixins.push(mixin);
1989
- return app;
1990
- },
1991
- component(name, component) {
1992
- if (!component) return context.components[name];
1993
- context.components[name] = component;
1994
- return app;
1995
- },
1996
- directive(name, directive) {
1997
- if (!directive) return context.directives[name];
1998
- context.directives[name] = directive;
1999
- return app;
2000
- },
2001
- mount(rootContainer, isHydrate, namespace) {
2002
- if (!isMounted) {
2003
- const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
2004
- vnode.appContext = context;
2005
- if (namespace === true) namespace = "svg";
2006
- else if (namespace === false) namespace = void 0;
2007
- if (isHydrate && hydrate) hydrate(vnode, rootContainer);
2008
- else render(vnode, rootContainer, namespace);
2009
- isMounted = true;
2010
- app._container = rootContainer;
2011
- rootContainer.__vue_app__ = app;
2012
- return getComponentPublicInstance(vnode.component);
2013
- }
2014
- },
2015
- onUnmount(cleanupFn) {
2016
- pluginCleanupFns.push(cleanupFn);
2017
- },
2018
- unmount() {
2019
- if (isMounted) {
2020
- callWithAsyncErrorHandling(pluginCleanupFns, app._instance, 16);
2021
- render(null, app._container);
2022
- delete app._container.__vue_app__;
2023
- }
2024
- },
2025
- provide(key, value) {
2026
- context.provides[key] = value;
2027
- return app;
2028
- },
2029
- runWithContext(fn) {
2030
- const lastApp = currentApp;
2031
- currentApp = app;
2032
- try {
2033
- return fn();
2034
- } finally {
2035
- currentApp = lastApp;
2036
- }
2037
- }
2038
- };
2039
- return app;
2040
- };
2041
- }
2042
- let currentApp = null;
2043
- function provide(key, value) {
2044
- if (!currentInstance);
2045
- else {
2046
- let provides = currentInstance.provides;
2047
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
2048
- if (parentProvides === provides) provides = currentInstance.provides = Object.create(parentProvides);
2049
- provides[key] = value;
2050
- }
2051
- }
2052
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
2053
- const instance = getCurrentInstance();
2054
- if (instance || currentApp) {
2055
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
2056
- if (provides && key in provides) return provides[key];
2057
- else if (arguments.length > 1) return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
2058
- }
2059
- }
2060
- function hasInjectionContext() {
2061
- return !!(getCurrentInstance() || currentApp);
2062
- }
2063
- const internalObjectProto = {};
2064
- const createInternalObject = () => Object.create(internalObjectProto);
2065
- const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
2066
- function initProps(instance, rawProps, isStateful, isSSR = false) {
2067
- const props = {};
2068
- const attrs = createInternalObject();
2069
- instance.propsDefaults = /* @__PURE__ */ Object.create(null);
2070
- setFullProps(instance, rawProps, props, attrs);
2071
- for (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;
2072
- if (isStateful) instance.props = isSSR ? props : reactivity.shallowReactive(props);
2073
- else if (!instance.type.props) instance.props = attrs;
2074
- else instance.props = props;
2075
- instance.attrs = attrs;
2076
- }
2077
- function updateProps(instance, rawProps, rawPrevProps, optimized) {
2078
- const { props, attrs, vnode: { patchFlag } } = instance;
2079
- const rawCurrentProps = reactivity.toRaw(props);
2080
- const [options] = instance.propsOptions;
2081
- let hasAttrsChanged = false;
2082
- if ((optimized || patchFlag > 0) && !(patchFlag & 16)) {
2083
- if (patchFlag & 8) {
2084
- const propsToUpdate = instance.vnode.dynamicProps;
2085
- for (let i = 0; i < propsToUpdate.length; i++) {
2086
- let key = propsToUpdate[i];
2087
- if (isEmitListener(instance.emitsOptions, key)) continue;
2088
- const value = rawProps[key];
2089
- if (options) if (shared.hasOwn(attrs, key)) {
2090
- if (value !== attrs[key]) {
2091
- attrs[key] = value;
2092
- hasAttrsChanged = true;
2093
- }
2094
- } else {
2095
- const camelizedKey = shared.camelize(key);
2096
- props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);
2097
- }
2098
- else if (value !== attrs[key]) {
2099
- attrs[key] = value;
2100
- hasAttrsChanged = true;
2101
- }
2102
- }
2103
- }
2104
- } else {
2105
- if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
2106
- let kebabKey;
2107
- for (const key in rawCurrentProps) if (!rawProps || !shared.hasOwn(rawProps, key) && ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) if (options) {
2108
- if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);
2109
- } else delete props[key];
2110
- if (attrs !== rawCurrentProps) {
2111
- for (const key in attrs) if (!rawProps || !shared.hasOwn(rawProps, key) && true) {
2112
- delete attrs[key];
2113
- hasAttrsChanged = true;
2114
- }
2115
- }
2116
- }
2117
- if (hasAttrsChanged) reactivity.trigger(instance.attrs, "set", "");
2118
- }
2119
- function setFullProps(instance, rawProps, props, attrs) {
2120
- const [options, needCastKeys] = instance.propsOptions;
2121
- let hasAttrsChanged = false;
2122
- let rawCastValues;
2123
- if (rawProps) for (let key in rawProps) {
2124
- if (shared.isReservedProp(key)) continue;
2125
- const value = rawProps[key];
2126
- let camelKey;
2127
- if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
2128
- else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
2129
- else if (!isEmitListener(instance.emitsOptions, key)) {
2130
- if (!(key in attrs) || value !== attrs[key]) {
2131
- attrs[key] = value;
2132
- hasAttrsChanged = true;
2133
- }
2134
- }
2135
- }
2136
- if (needCastKeys) {
2137
- const rawCurrentProps = reactivity.toRaw(props);
2138
- const castValues = rawCastValues || shared.EMPTY_OBJ;
2139
- for (let i = 0; i < needCastKeys.length; i++) {
2140
- const key = needCastKeys[i];
2141
- props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !shared.hasOwn(castValues, key));
2142
- }
2143
- }
2144
- return hasAttrsChanged;
2145
- }
2146
- function resolvePropValue(options, props, key, value, instance, isAbsent) {
2147
- const opt = options[key];
2148
- if (opt != null) {
2149
- const hasDefault = shared.hasOwn(opt, "default");
2150
- if (hasDefault && value === void 0) {
2151
- const defaultValue = opt.default;
2152
- if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) {
2153
- const { propsDefaults } = instance;
2154
- if (key in propsDefaults) value = propsDefaults[key];
2155
- else {
2156
- const reset = setCurrentInstance(instance);
2157
- value = propsDefaults[key] = defaultValue.call(null, props);
2158
- reset();
2159
- }
2160
- } else value = defaultValue;
2161
- if (instance.ce) instance.ce._setProp(key, value);
2162
- }
2163
- if (opt[0]) {
2164
- if (isAbsent && !hasDefault) value = false;
2165
- else if (opt[1] && (value === "" || value === shared.hyphenate(key))) value = true;
2166
- }
2167
- }
2168
- return value;
2169
- }
2170
- const mixinPropsCache = /* @__PURE__ */ new WeakMap();
2171
- function normalizePropsOptions(comp, appContext, asMixin = false) {
2172
- const cache = asMixin ? mixinPropsCache : appContext.propsCache;
2173
- const cached = cache.get(comp);
2174
- if (cached) return cached;
2175
- const raw = comp.props;
2176
- const normalized = {};
2177
- const needCastKeys = [];
2178
- let hasExtends = false;
2179
- if (!shared.isFunction(comp)) {
2180
- const extendProps = (raw2) => {
2181
- hasExtends = true;
2182
- const [props, keys] = normalizePropsOptions(raw2, appContext, true);
2183
- shared.extend(normalized, props);
2184
- if (keys) needCastKeys.push(...keys);
2185
- };
2186
- if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendProps);
2187
- if (comp.extends) extendProps(comp.extends);
2188
- if (comp.mixins) comp.mixins.forEach(extendProps);
2189
- }
2190
- if (!raw && !hasExtends) {
2191
- if (shared.isObject(comp)) cache.set(comp, shared.EMPTY_ARR);
2192
- return shared.EMPTY_ARR;
2193
- }
2194
- if (shared.isArray(raw)) for (let i = 0; i < raw.length; i++) {
2195
- const normalizedKey = shared.camelize(raw[i]);
2196
- if (validatePropName(normalizedKey)) normalized[normalizedKey] = shared.EMPTY_OBJ;
2197
- }
2198
- else if (raw) for (const key in raw) {
2199
- const normalizedKey = shared.camelize(key);
2200
- if (validatePropName(normalizedKey)) {
2201
- const opt = raw[key];
2202
- const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
2203
- const propType = prop.type;
2204
- let shouldCast = false;
2205
- let shouldCastTrue = true;
2206
- if (shared.isArray(propType)) for (let index = 0; index < propType.length; ++index) {
2207
- const type = propType[index];
2208
- const typeName = shared.isFunction(type) && type.name;
2209
- if (typeName === "Boolean") {
2210
- shouldCast = true;
2211
- break;
2212
- } else if (typeName === "String") shouldCastTrue = false;
2213
- }
2214
- else shouldCast = shared.isFunction(propType) && propType.name === "Boolean";
2215
- prop[0] = shouldCast;
2216
- prop[1] = shouldCastTrue;
2217
- if (shouldCast || shared.hasOwn(prop, "default")) needCastKeys.push(normalizedKey);
2218
- }
2219
- }
2220
- const res = [normalized, needCastKeys];
2221
- if (shared.isObject(comp)) cache.set(comp, res);
2222
- return res;
2223
- }
2224
- function validatePropName(key) {
2225
- if (key[0] !== "$" && !shared.isReservedProp(key)) return true;
2226
- return false;
2227
- }
2228
- const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
2229
- const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
2230
- const normalizeSlot = (key, rawSlot, ctx) => {
2231
- if (rawSlot._n) return rawSlot;
2232
- const normalized = withCtx((...args) => {
2233
- return normalizeSlotValue(rawSlot(...args));
2234
- }, ctx);
2235
- normalized._c = false;
2236
- return normalized;
2237
- };
2238
- const normalizeObjectSlots = (rawSlots, slots, instance) => {
2239
- const ctx = rawSlots._ctx;
2240
- for (const key in rawSlots) {
2241
- if (isInternalKey(key)) continue;
2242
- const value = rawSlots[key];
2243
- if (shared.isFunction(value)) slots[key] = normalizeSlot(key, value, ctx);
2244
- else if (value != null) {
2245
- const normalized = normalizeSlotValue(value);
2246
- slots[key] = () => normalized;
2247
- }
2248
- }
2249
- };
2250
- const normalizeVNodeSlots = (instance, children) => {
2251
- const normalized = normalizeSlotValue(children);
2252
- instance.slots.default = () => normalized;
2253
- };
2254
- const assignSlots = (slots, children, optimized) => {
2255
- for (const key in children) if (optimized || !isInternalKey(key)) slots[key] = children[key];
2256
- };
2257
- const initSlots = (instance, children, optimized) => {
2258
- const slots = instance.slots = createInternalObject();
2259
- if (instance.vnode.shapeFlag & 32) {
2260
- const type = children._;
2261
- if (type) {
2262
- assignSlots(slots, children, optimized);
2263
- if (optimized) shared.def(slots, "_", type, true);
2264
- } else normalizeObjectSlots(children, slots);
2265
- } else if (children) normalizeVNodeSlots(instance, children);
2266
- };
2267
- const updateSlots = (instance, children, optimized) => {
2268
- const { vnode, slots } = instance;
2269
- let needDeletionCheck = true;
2270
- let deletionComparisonTarget = shared.EMPTY_OBJ;
2271
- if (vnode.shapeFlag & 32) {
2272
- const type = children._;
2273
- if (type) if (optimized && type === 1) needDeletionCheck = false;
2274
- else assignSlots(slots, children, optimized);
2275
- else {
2276
- needDeletionCheck = !children.$stable;
2277
- normalizeObjectSlots(children, slots);
2278
- }
2279
- deletionComparisonTarget = children;
2280
- } else if (children) {
2281
- normalizeVNodeSlots(instance, children);
2282
- deletionComparisonTarget = { default: 1 };
2283
- }
2284
- if (needDeletionCheck) {
2285
- for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
2286
- }
2287
- };
2288
- const queuePostRenderEffect = queueEffectWithSuspense;
2289
- function createRenderer(options) {
2290
- return baseCreateRenderer(options);
2291
- }
2292
- function createHydrationRenderer(options) {
2293
- return baseCreateRenderer(options, createHydrationFunctions);
2294
- }
2295
- function baseCreateRenderer(options, createHydrationFns) {
2296
- const target = shared.getGlobalThis();
2297
- target.__VUE__ = true;
2298
- const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = shared.NOOP, insertStaticContent: hostInsertStaticContent } = options;
2299
- const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {
2300
- if (n1 === n2) return;
2301
- if (n1 && !isSameVNodeType(n1, n2)) {
2302
- anchor = getNextHostNode(n1);
2303
- unmount(n1, parentComponent, parentSuspense, true);
2304
- n1 = null;
2305
- }
2306
- if (n2.patchFlag === -2) {
2307
- optimized = false;
2308
- n2.dynamicChildren = null;
2309
- }
2310
- const { type, ref, shapeFlag } = n2;
2311
- switch (type) {
2312
- case Text:
2313
- processText(n1, n2, container, anchor);
2314
- break;
2315
- case Comment:
2316
- processCommentNode(n1, n2, container, anchor);
2317
- break;
2318
- case Static:
2319
- if (n1 == null) mountStaticNode(n2, container, anchor, namespace);
2320
- break;
2321
- case Fragment:
2322
- processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2323
- break;
2324
- default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2325
- else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2326
- else if (shapeFlag & 64) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
2327
- else if (shapeFlag & 128) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
2328
- }
2329
- if (ref != null && parentComponent) setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
2330
- else if (ref == null && n1 && n1.ref != null) setRef(n1.ref, null, parentSuspense, n1, true);
2331
- };
2332
- const processText = (n1, n2, container, anchor) => {
2333
- if (n1 == null) hostInsert(n2.el = hostCreateText(n2.children), container, anchor);
2334
- else {
2335
- const el = n2.el = n1.el;
2336
- if (n2.children !== n1.children) hostSetText(el, n2.children);
2337
- }
2338
- };
2339
- const processCommentNode = (n1, n2, container, anchor) => {
2340
- if (n1 == null) hostInsert(n2.el = hostCreateComment(n2.children || ""), container, anchor);
2341
- else n2.el = n1.el;
2342
- };
2343
- const mountStaticNode = (n2, container, anchor, namespace) => {
2344
- [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, namespace, n2.el, n2.anchor);
2345
- };
2346
- const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
2347
- let next;
2348
- while (el && el !== anchor) {
2349
- next = hostNextSibling(el);
2350
- hostInsert(el, container, nextSibling);
2351
- el = next;
2352
- }
2353
- hostInsert(anchor, container, nextSibling);
2354
- };
2355
- const removeStaticNode = ({ el, anchor }) => {
2356
- let next;
2357
- while (el && el !== anchor) {
2358
- next = hostNextSibling(el);
2359
- hostRemove(el);
2360
- el = next;
2361
- }
2362
- hostRemove(anchor);
2363
- };
2364
- const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
2365
- if (n2.type === "svg") namespace = "svg";
2366
- else if (n2.type === "math") namespace = "mathml";
2367
- if (n1 == null) mountElement(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2368
- else patchElement(n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2369
- };
2370
- const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
2371
- let el;
2372
- let vnodeHook;
2373
- const { props, shapeFlag, transition, dirs } = vnode;
2374
- el = vnode.el = hostCreateElement(vnode.type, namespace, props && props.is, props);
2375
- if (shapeFlag & 8) hostSetElementText(el, vnode.children);
2376
- else if (shapeFlag & 16) mountChildren(vnode.children, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(vnode, namespace), slotScopeIds, optimized);
2377
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "created");
2378
- setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
2379
- if (props) {
2380
- for (const key in props) if (key !== "value" && !shared.isReservedProp(key)) hostPatchProp(el, key, null, props[key], namespace, parentComponent);
2381
- if ("value" in props) hostPatchProp(el, "value", null, props.value, namespace);
2382
- if (vnodeHook = props.onVnodeBeforeMount) invokeVNodeHook(vnodeHook, parentComponent, vnode);
2383
- }
2384
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
2385
- const needCallTransitionHooks = needTransition(parentSuspense, transition);
2386
- if (needCallTransitionHooks) transition.beforeEnter(el);
2387
- hostInsert(el, container, anchor);
2388
- if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) queuePostRenderEffect(() => {
2389
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
2390
- needCallTransitionHooks && transition.enter(el);
2391
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
2392
- }, parentSuspense);
2393
- };
2394
- const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
2395
- if (scopeId) hostSetScopeId(el, scopeId);
2396
- if (slotScopeIds) for (let i = 0; i < slotScopeIds.length; i++) hostSetScopeId(el, slotScopeIds[i]);
2397
- if (parentComponent) {
2398
- let subTree = parentComponent.subTree;
2399
- if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
2400
- const parentVNode = parentComponent.vnode;
2401
- setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent);
2402
- }
2403
- }
2404
- };
2405
- const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
2406
- for (let i = start; i < children.length; i++) patch(null, children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2407
- };
2408
- const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
2409
- const el = n2.el = n1.el;
2410
- let { patchFlag, dynamicChildren, dirs } = n2;
2411
- patchFlag |= n1.patchFlag & 16;
2412
- const oldProps = n1.props || shared.EMPTY_OBJ;
2413
- const newProps = n2.props || shared.EMPTY_OBJ;
2414
- let vnodeHook;
2415
- parentComponent && toggleRecurse(parentComponent, false);
2416
- if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
2417
- if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
2418
- parentComponent && toggleRecurse(parentComponent, true);
2419
- if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) hostSetElementText(el, "");
2420
- if (dynamicChildren) patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds);
2421
- else if (!optimized) patchChildren(n1, n2, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds, false);
2422
- if (patchFlag > 0) {
2423
- if (patchFlag & 16) patchProps(el, oldProps, newProps, parentComponent, namespace);
2424
- else {
2425
- if (patchFlag & 2) {
2426
- if (oldProps.class !== newProps.class) hostPatchProp(el, "class", null, newProps.class, namespace);
2427
- }
2428
- if (patchFlag & 4) hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
2429
- if (patchFlag & 8) {
2430
- const propsToUpdate = n2.dynamicProps;
2431
- for (let i = 0; i < propsToUpdate.length; i++) {
2432
- const key = propsToUpdate[i];
2433
- const prev = oldProps[key];
2434
- const next = newProps[key];
2435
- if (next !== prev || key === "value") hostPatchProp(el, key, prev, next, namespace, parentComponent);
2436
- }
2437
- }
2438
- }
2439
- if (patchFlag & 1) {
2440
- if (n1.children !== n2.children) hostSetElementText(el, n2.children);
2441
- }
2442
- } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
2443
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
2444
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
2445
- dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
2446
- }, parentSuspense);
2447
- };
2448
- const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
2449
- for (let i = 0; i < newChildren.length; i++) {
2450
- const oldVNode = oldChildren[i];
2451
- const newVNode = newChildren[i];
2452
- patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
2453
- }
2454
- };
2455
- const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
2456
- if (oldProps !== newProps) {
2457
- if (oldProps !== shared.EMPTY_OBJ) {
2458
- for (const key in oldProps) if (!shared.isReservedProp(key) && !(key in newProps)) hostPatchProp(el, key, oldProps[key], null, namespace, parentComponent);
2459
- }
2460
- for (const key in newProps) {
2461
- if (shared.isReservedProp(key)) continue;
2462
- const next = newProps[key];
2463
- const prev = oldProps[key];
2464
- if (next !== prev && key !== "value") hostPatchProp(el, key, prev, next, namespace, parentComponent);
2465
- }
2466
- if ("value" in newProps) hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
2467
- }
2468
- };
2469
- const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
2470
- const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
2471
- const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
2472
- let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
2473
- if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
2474
- if (n1 == null) {
2475
- hostInsert(fragmentStartAnchor, container, anchor);
2476
- hostInsert(fragmentEndAnchor, container, anchor);
2477
- mountChildren(n2.children || [], container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2478
- } else if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && n1.dynamicChildren) {
2479
- patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, namespace, slotScopeIds);
2480
- if (n2.key != null || parentComponent && n2 === parentComponent.subTree) traverseStaticChildren(n1, n2, true);
2481
- } else patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2482
- };
2483
- const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
2484
- n2.slotScopeIds = slotScopeIds;
2485
- if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
2486
- else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
2487
- else updateComponent(n1, n2, optimized);
2488
- };
2489
- const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
2490
- const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
2491
- if (isKeepAlive(initialVNode)) instance.ctx.renderer = internals;
2492
- setupComponent(instance, false, optimized);
2493
- if (instance.asyncDep) {
2494
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
2495
- if (!initialVNode.el) {
2496
- const placeholder = instance.subTree = createVNode(Comment);
2497
- processCommentNode(null, placeholder, container, anchor);
2498
- initialVNode.placeholder = placeholder.el;
2499
- }
2500
- } else setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, namespace, optimized);
2501
- };
2502
- const updateComponent = (n1, n2, optimized) => {
2503
- const instance = n2.component = n1.component;
2504
- if (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {
2505
- updateComponentPreRender(instance, n2, optimized);
2506
- return;
2507
- } else {
2508
- instance.next = n2;
2509
- instance.update();
2510
- }
2511
- else {
2512
- n2.el = n1.el;
2513
- instance.vnode = n2;
2514
- }
2515
- };
2516
- const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
2517
- const componentUpdateFn = () => {
2518
- if (!instance.isMounted) {
2519
- let vnodeHook;
2520
- const { el, props } = initialVNode;
2521
- const { bm, m, parent, root, type } = instance;
2522
- const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
2523
- toggleRecurse(instance, false);
2524
- if (bm) shared.invokeArrayFns(bm);
2525
- if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) invokeVNodeHook(vnodeHook, parent, initialVNode);
2526
- toggleRecurse(instance, true);
2527
- if (el && hydrateNode) {
2528
- const hydrateSubTree = () => {
2529
- instance.subTree = renderComponentRoot(instance);
2530
- hydrateNode(el, instance.subTree, instance, parentSuspense, null);
2531
- };
2532
- if (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);
2533
- else hydrateSubTree();
2534
- } else {
2535
- if (root.ce && root.ce._def.shadowRoot !== false) root.ce._injectChildStyle(type);
2536
- const subTree = instance.subTree = renderComponentRoot(instance);
2537
- patch(null, subTree, container, anchor, instance, parentSuspense, namespace);
2538
- initialVNode.el = subTree.el;
2539
- }
2540
- if (m) queuePostRenderEffect(m, parentSuspense);
2541
- if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
2542
- const scopedInitialVNode = initialVNode;
2543
- queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
2544
- }
2545
- if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) instance.a && queuePostRenderEffect(instance.a, parentSuspense);
2546
- instance.isMounted = true;
2547
- initialVNode = container = anchor = null;
2548
- } else {
2549
- let { next, bu, u, parent, vnode } = instance;
2550
- {
2551
- const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
2552
- if (nonHydratedAsyncRoot) {
2553
- if (next) {
2554
- next.el = vnode.el;
2555
- updateComponentPreRender(instance, next, optimized);
2556
- }
2557
- nonHydratedAsyncRoot.asyncDep.then(() => {
2558
- if (!instance.isUnmounted) componentUpdateFn();
2559
- });
2560
- return;
2561
- }
2562
- }
2563
- let originNext = next;
2564
- let vnodeHook;
2565
- toggleRecurse(instance, false);
2566
- if (next) {
2567
- next.el = vnode.el;
2568
- updateComponentPreRender(instance, next, optimized);
2569
- } else next = vnode;
2570
- if (bu) shared.invokeArrayFns(bu);
2571
- if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
2572
- toggleRecurse(instance, true);
2573
- const nextTree = renderComponentRoot(instance);
2574
- const prevTree = instance.subTree;
2575
- instance.subTree = nextTree;
2576
- patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);
2577
- next.el = nextTree.el;
2578
- if (originNext === null) updateHOCHostEl(instance, nextTree.el);
2579
- if (u) queuePostRenderEffect(u, parentSuspense);
2580
- if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
2581
- }
2582
- };
2583
- instance.scope.on();
2584
- const effect = instance.effect = new reactivity.ReactiveEffect(componentUpdateFn);
2585
- instance.scope.off();
2586
- const update = instance.update = effect.run.bind(effect);
2587
- const job = instance.job = effect.runIfDirty.bind(effect);
2588
- job.i = instance;
2589
- job.id = instance.uid;
2590
- effect.scheduler = () => queueJob(job);
2591
- toggleRecurse(instance, true);
2592
- update();
2593
- };
2594
- const updateComponentPreRender = (instance, nextVNode, optimized) => {
2595
- nextVNode.component = instance;
2596
- const prevProps = instance.vnode.props;
2597
- instance.vnode = nextVNode;
2598
- instance.next = null;
2599
- updateProps(instance, nextVNode.props, prevProps, optimized);
2600
- updateSlots(instance, nextVNode.children, optimized);
2601
- reactivity.pauseTracking();
2602
- flushPreFlushCbs(instance);
2603
- reactivity.resetTracking();
2604
- };
2605
- const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
2606
- const c1 = n1 && n1.children;
2607
- const prevShapeFlag = n1 ? n1.shapeFlag : 0;
2608
- const c2 = n2.children;
2609
- const { patchFlag, shapeFlag } = n2;
2610
- if (patchFlag > 0) {
2611
- if (patchFlag & 128) {
2612
- patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2613
- return;
2614
- } else if (patchFlag & 256) {
2615
- patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2616
- return;
2617
- }
2618
- }
2619
- if (shapeFlag & 8) {
2620
- if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
2621
- if (c2 !== c1) hostSetElementText(container, c2);
2622
- } else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2623
- else unmountChildren(c1, parentComponent, parentSuspense, true);
2624
- else {
2625
- if (prevShapeFlag & 8) hostSetElementText(container, "");
2626
- if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2627
- }
2628
- };
2629
- const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
2630
- c1 = c1 || shared.EMPTY_ARR;
2631
- c2 = c2 || shared.EMPTY_ARR;
2632
- const oldLength = c1.length;
2633
- const newLength = c2.length;
2634
- const commonLength = Math.min(oldLength, newLength);
2635
- let i;
2636
- for (i = 0; i < commonLength; i++) {
2637
- const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
2638
- patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2639
- }
2640
- if (oldLength > newLength) unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);
2641
- else mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, commonLength);
2642
- };
2643
- const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
2644
- let i = 0;
2645
- const l2 = c2.length;
2646
- let e1 = c1.length - 1;
2647
- let e2 = l2 - 1;
2648
- while (i <= e1 && i <= e2) {
2649
- const n1 = c1[i];
2650
- const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
2651
- if (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2652
- else break;
2653
- i++;
2654
- }
2655
- while (i <= e1 && i <= e2) {
2656
- const n1 = c1[e1];
2657
- const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
2658
- if (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2659
- else break;
2660
- e1--;
2661
- e2--;
2662
- }
2663
- if (i > e1) {
2664
- if (i <= e2) {
2665
- const nextPos = e2 + 1;
2666
- const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
2667
- while (i <= e2) {
2668
- patch(null, c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2669
- i++;
2670
- }
2671
- }
2672
- } else if (i > e2) while (i <= e1) {
2673
- unmount(c1[i], parentComponent, parentSuspense, true);
2674
- i++;
2675
- }
2676
- else {
2677
- const s1 = i;
2678
- const s2 = i;
2679
- const keyToNewIndexMap = /* @__PURE__ */ new Map();
2680
- for (i = s2; i <= e2; i++) {
2681
- const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
2682
- if (nextChild.key != null) keyToNewIndexMap.set(nextChild.key, i);
2683
- }
2684
- let j;
2685
- let patched = 0;
2686
- const toBePatched = e2 - s2 + 1;
2687
- let moved = false;
2688
- let maxNewIndexSoFar = 0;
2689
- const newIndexToOldIndexMap = new Array(toBePatched);
2690
- for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
2691
- for (i = s1; i <= e1; i++) {
2692
- const prevChild = c1[i];
2693
- if (patched >= toBePatched) {
2694
- unmount(prevChild, parentComponent, parentSuspense, true);
2695
- continue;
2696
- }
2697
- let newIndex;
2698
- if (prevChild.key != null) newIndex = keyToNewIndexMap.get(prevChild.key);
2699
- else for (j = s2; j <= e2; j++) if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
2700
- newIndex = j;
2701
- break;
2702
- }
2703
- if (newIndex === void 0) unmount(prevChild, parentComponent, parentSuspense, true);
2704
- else {
2705
- newIndexToOldIndexMap[newIndex - s2] = i + 1;
2706
- if (newIndex >= maxNewIndexSoFar) maxNewIndexSoFar = newIndex;
2707
- else moved = true;
2708
- patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2709
- patched++;
2710
- }
2711
- }
2712
- const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : shared.EMPTY_ARR;
2713
- j = increasingNewIndexSequence.length - 1;
2714
- for (i = toBePatched - 1; i >= 0; i--) {
2715
- const nextIndex = s2 + i;
2716
- const nextChild = c2[nextIndex];
2717
- const anchorVNode = c2[nextIndex + 1];
2718
- const anchor = nextIndex + 1 < l2 ? anchorVNode.el || anchorVNode.placeholder : parentAnchor;
2719
- if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
2720
- else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2);
2721
- else j--;
2722
- }
2723
- }
2724
- };
2725
- const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
2726
- const { el, type, transition, children, shapeFlag } = vnode;
2727
- if (shapeFlag & 6) {
2728
- move(vnode.component.subTree, container, anchor, moveType);
2729
- return;
2730
- }
2731
- if (shapeFlag & 128) {
2732
- vnode.suspense.move(container, anchor, moveType);
2733
- return;
2734
- }
2735
- if (shapeFlag & 64) {
2736
- type.move(vnode, container, anchor, internals);
2737
- return;
2738
- }
2739
- if (type === Fragment) {
2740
- hostInsert(el, container, anchor);
2741
- for (let i = 0; i < children.length; i++) move(children[i], container, anchor, moveType);
2742
- hostInsert(vnode.anchor, container, anchor);
2743
- return;
2744
- }
2745
- if (type === Static) {
2746
- moveStaticNode(vnode, container, anchor);
2747
- return;
2748
- }
2749
- if (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) {
2750
- transition.beforeEnter(el);
2751
- hostInsert(el, container, anchor);
2752
- queuePostRenderEffect(() => transition.enter(el), parentSuspense);
2753
- } else {
2754
- const { leave, delayLeave, afterLeave } = transition;
2755
- const remove2 = () => {
2756
- if (vnode.ctx.isUnmounted) hostRemove(el);
2757
- else hostInsert(el, container, anchor);
2758
- };
2759
- const performLeave = () => {
2760
- if (el._isLeaving) el[leaveCbKey](true);
2761
- leave(el, () => {
2762
- remove2();
2763
- afterLeave && afterLeave();
2764
- });
2765
- };
2766
- if (delayLeave) delayLeave(el, remove2, performLeave);
2767
- else performLeave();
2768
- }
2769
- else hostInsert(el, container, anchor);
2770
- };
2771
- const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
2772
- const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex } = vnode;
2773
- if (patchFlag === -2) optimized = false;
2774
- if (ref != null) {
2775
- reactivity.pauseTracking();
2776
- setRef(ref, null, parentSuspense, vnode, true);
2777
- reactivity.resetTracking();
2778
- }
2779
- if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
2780
- if (shapeFlag & 256) {
2781
- parentComponent.ctx.deactivate(vnode);
2782
- return;
2783
- }
2784
- const shouldInvokeDirs = shapeFlag & 1 && dirs;
2785
- const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
2786
- let vnodeHook;
2787
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
2788
- if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
2789
- else {
2790
- if (shapeFlag & 128) {
2791
- vnode.suspense.unmount(parentSuspense, doRemove);
2792
- return;
2793
- }
2794
- if (shouldInvokeDirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
2795
- if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
2796
- else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
2797
- else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
2798
- if (doRemove) remove(vnode);
2799
- }
2800
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) queuePostRenderEffect(() => {
2801
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
2802
- shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
2803
- }, parentSuspense);
2804
- };
2805
- const remove = (vnode) => {
2806
- const { type, el, anchor, transition } = vnode;
2807
- if (type === Fragment) {
2808
- removeFragment(el, anchor);
2809
- return;
2810
- }
2811
- if (type === Static) {
2812
- removeStaticNode(vnode);
2813
- return;
2814
- }
2815
- const performRemove = () => {
2816
- hostRemove(el);
2817
- if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
2818
- };
2819
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
2820
- const { leave, delayLeave } = transition;
2821
- const performLeave = () => leave(el, performRemove);
2822
- if (delayLeave) delayLeave(vnode.el, performRemove, performLeave);
2823
- else performLeave();
2824
- } else performRemove();
2825
- };
2826
- const removeFragment = (cur, end) => {
2827
- let next;
2828
- while (cur !== end) {
2829
- next = hostNextSibling(cur);
2830
- hostRemove(cur);
2831
- cur = next;
2832
- }
2833
- hostRemove(end);
2834
- };
2835
- const unmountComponent = (instance, parentSuspense, doRemove) => {
2836
- const { bum, scope, job, subTree, um, m, a } = instance;
2837
- invalidateMount(m);
2838
- invalidateMount(a);
2839
- if (bum) shared.invokeArrayFns(bum);
2840
- scope.stop();
2841
- if (job) {
2842
- job.flags |= 8;
2843
- unmount(subTree, instance, parentSuspense, doRemove);
2844
- }
2845
- if (um) queuePostRenderEffect(um, parentSuspense);
2846
- queuePostRenderEffect(() => {
2847
- instance.isUnmounted = true;
2848
- }, parentSuspense);
2849
- };
2850
- const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
2851
- for (let i = start; i < children.length; i++) unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
2852
- };
2853
- const getNextHostNode = (vnode) => {
2854
- if (vnode.shapeFlag & 6) return getNextHostNode(vnode.component.subTree);
2855
- if (vnode.shapeFlag & 128) return vnode.suspense.next();
2856
- const el = hostNextSibling(vnode.anchor || vnode.el);
2857
- const teleportEnd = el && el[TeleportEndKey];
2858
- return teleportEnd ? hostNextSibling(teleportEnd) : el;
2859
- };
2860
- let isFlushing = false;
2861
- const render = (vnode, container, namespace) => {
2862
- if (vnode == null) {
2863
- if (container._vnode) unmount(container._vnode, null, null, true);
2864
- } else patch(container._vnode || null, vnode, container, null, null, null, namespace);
2865
- container._vnode = vnode;
2866
- if (!isFlushing) {
2867
- isFlushing = true;
2868
- flushPreFlushCbs();
2869
- flushPostFlushCbs();
2870
- isFlushing = false;
2871
- }
2872
- };
2873
- const internals = {
2874
- p: patch,
2875
- um: unmount,
2876
- m: move,
2877
- r: remove,
2878
- mt: mountComponent,
2879
- mc: mountChildren,
2880
- pc: patchChildren,
2881
- pbc: patchBlockChildren,
2882
- n: getNextHostNode,
2883
- o: options
2884
- };
2885
- let hydrate;
2886
- let hydrateNode;
2887
- if (createHydrationFns) [hydrate, hydrateNode] = createHydrationFns(internals);
2888
- return {
2889
- render,
2890
- hydrate,
2891
- createApp: createAppAPI(render, hydrate)
2892
- };
2893
- }
2894
- function resolveChildrenNamespace({ type, props }, currentNamespace) {
2895
- return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
2896
- }
2897
- function toggleRecurse({ effect, job }, allowed) {
2898
- if (allowed) {
2899
- effect.flags |= 32;
2900
- job.flags |= 4;
2901
- } else {
2902
- effect.flags &= -33;
2903
- job.flags &= -5;
2904
- }
2905
- }
2906
- function needTransition(parentSuspense, transition) {
2907
- return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
2908
- }
2909
- function traverseStaticChildren(n1, n2, shallow = false) {
2910
- const ch1 = n1.children;
2911
- const ch2 = n2.children;
2912
- if (shared.isArray(ch1) && shared.isArray(ch2)) for (let i = 0; i < ch1.length; i++) {
2913
- const c1 = ch1[i];
2914
- let c2 = ch2[i];
2915
- if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
2916
- if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
2917
- c2 = ch2[i] = cloneIfMounted(ch2[i]);
2918
- c2.el = c1.el;
2919
- }
2920
- if (!shallow && c2.patchFlag !== -2) traverseStaticChildren(c1, c2);
2921
- }
2922
- if (c2.type === Text && c2.patchFlag !== -1) c2.el = c1.el;
2923
- if (c2.type === Comment && !c2.el) c2.el = c1.el;
2924
- }
2925
- }
2926
- function getSequence(arr) {
2927
- const p = arr.slice();
2928
- const result = [0];
2929
- let i, j, u, v, c;
2930
- const len = arr.length;
2931
- for (i = 0; i < len; i++) {
2932
- const arrI = arr[i];
2933
- if (arrI !== 0) {
2934
- j = result[result.length - 1];
2935
- if (arr[j] < arrI) {
2936
- p[i] = j;
2937
- result.push(i);
2938
- continue;
2939
- }
2940
- u = 0;
2941
- v = result.length - 1;
2942
- while (u < v) {
2943
- c = u + v >> 1;
2944
- if (arr[result[c]] < arrI) u = c + 1;
2945
- else v = c;
2946
- }
2947
- if (arrI < arr[result[u]]) {
2948
- if (u > 0) p[i] = result[u - 1];
2949
- result[u] = i;
2950
- }
2951
- }
2952
- }
2953
- u = result.length;
2954
- v = result[u - 1];
2955
- while (u-- > 0) {
2956
- result[u] = v;
2957
- v = p[v];
2958
- }
2959
- return result;
2960
- }
2961
- function locateNonHydratedAsyncRoot(instance) {
2962
- const subComponent = instance.subTree.component;
2963
- if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
2964
- else return locateNonHydratedAsyncRoot(subComponent);
2965
- }
2966
- function invalidateMount(hooks) {
2967
- if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;
2968
- }
2969
- const ssrContextKey = Symbol.for("v-scx");
2970
- const useSSRContext = () => {
2971
- return inject(ssrContextKey);
2972
- };
2973
- function watchEffect(effect, options) {
2974
- return doWatch(effect, null, options);
2975
- }
2976
- function watchPostEffect(effect, options) {
2977
- return doWatch(effect, null, { flush: "post" });
2978
- }
2979
- function watchSyncEffect(effect, options) {
2980
- return doWatch(effect, null, { flush: "sync" });
2981
- }
2982
- function watch(source, cb, options) {
2983
- return doWatch(source, cb, options);
2984
- }
2985
- function doWatch(source, cb, options = shared.EMPTY_OBJ) {
2986
- const { immediate, deep, flush, once } = options;
2987
- const baseWatchOptions = shared.extend({}, options);
2988
- const runsImmediately = cb && immediate || !cb && flush !== "post";
2989
- let ssrCleanup;
2990
- if (isInSSRComponentSetup) {
2991
- if (flush === "sync") {
2992
- const ctx = useSSRContext();
2993
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
2994
- } else if (!runsImmediately) {
2995
- const watchStopHandle = () => {};
2996
- watchStopHandle.stop = shared.NOOP;
2997
- watchStopHandle.resume = shared.NOOP;
2998
- watchStopHandle.pause = shared.NOOP;
2999
- return watchStopHandle;
3000
- }
3001
- }
3002
- const instance = currentInstance;
3003
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3004
- let isPre = false;
3005
- if (flush === "post") baseWatchOptions.scheduler = (job) => {
3006
- queuePostRenderEffect(job, instance && instance.suspense);
3007
- };
3008
- else if (flush !== "sync") {
3009
- isPre = true;
3010
- baseWatchOptions.scheduler = (job, isFirstRun) => {
3011
- if (isFirstRun) job();
3012
- else queueJob(job);
3013
- };
3014
- }
3015
- baseWatchOptions.augmentJob = (job) => {
3016
- if (cb) job.flags |= 4;
3017
- if (isPre) {
3018
- job.flags |= 2;
3019
- if (instance) {
3020
- job.id = instance.uid;
3021
- job.i = instance;
3022
- }
3023
- }
3024
- };
3025
- const watchHandle = reactivity.watch(source, cb, baseWatchOptions);
3026
- if (isInSSRComponentSetup) {
3027
- if (ssrCleanup) ssrCleanup.push(watchHandle);
3028
- else if (runsImmediately) watchHandle();
3029
- }
3030
- return watchHandle;
3031
- }
3032
- function instanceWatch(source, value, options) {
3033
- const publicThis = this.proxy;
3034
- const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3035
- let cb;
3036
- if (shared.isFunction(value)) cb = value;
3037
- else {
3038
- cb = value.handler;
3039
- options = value;
3040
- }
3041
- const reset = setCurrentInstance(this);
3042
- const res = doWatch(getter, cb.bind(publicThis), options);
3043
- reset();
3044
- return res;
3045
- }
3046
- function createPathGetter(ctx, path) {
3047
- const segments = path.split(".");
3048
- return () => {
3049
- let cur = ctx;
3050
- for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
3051
- return cur;
3052
- };
3053
- }
3054
- function useModel(props, name, options = shared.EMPTY_OBJ) {
3055
- const i = getCurrentInstance();
3056
- const camelizedName = shared.camelize(name);
3057
- const hyphenatedName = shared.hyphenate(name);
3058
- const modifiers = getModelModifiers(props, camelizedName);
3059
- const res = reactivity.customRef((track, trigger) => {
3060
- let localValue;
3061
- let prevSetValue = shared.EMPTY_OBJ;
3062
- let prevEmittedValue;
3063
- watchSyncEffect(() => {
3064
- const propValue = props[camelizedName];
3065
- if (shared.hasChanged(localValue, propValue)) {
3066
- localValue = propValue;
3067
- trigger();
3068
- }
3069
- });
3070
- return {
3071
- get() {
3072
- track();
3073
- return options.get ? options.get(localValue) : localValue;
3074
- },
3075
- set(value) {
3076
- const emittedValue = options.set ? options.set(value) : value;
3077
- if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) return;
3078
- const rawProps = i.vnode.props;
3079
- if (!(rawProps && (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
3080
- localValue = value;
3081
- trigger();
3082
- }
3083
- i.emit(`update:${name}`, emittedValue);
3084
- if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) trigger();
3085
- prevSetValue = value;
3086
- prevEmittedValue = emittedValue;
3087
- }
3088
- };
3089
- });
3090
- res[Symbol.iterator] = () => {
3091
- let i2 = 0;
3092
- return { next() {
3093
- if (i2 < 2) return {
3094
- value: i2++ ? modifiers || shared.EMPTY_OBJ : res,
3095
- done: false
3096
- };
3097
- else return { done: true };
3098
- } };
3099
- };
3100
- return res;
3101
- }
3102
- const getModelModifiers = (props, modelName) => {
3103
- return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${shared.camelize(modelName)}Modifiers`] || props[`${shared.hyphenate(modelName)}Modifiers`];
3104
- };
3105
- function emit(instance, event, ...rawArgs) {
3106
- if (instance.isUnmounted) return;
3107
- const props = instance.vnode.props || shared.EMPTY_OBJ;
3108
- let args = rawArgs;
3109
- const isModelListener = event.startsWith("update:");
3110
- const modifiers = isModelListener && getModelModifiers(props, event.slice(7));
3111
- if (modifiers) {
3112
- if (modifiers.trim) args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a);
3113
- if (modifiers.number) args = rawArgs.map(shared.looseToNumber);
3114
- }
3115
- let handlerName;
3116
- let handler = props[handlerName = shared.toHandlerKey(event)] || props[handlerName = shared.toHandlerKey(shared.camelize(event))];
3117
- if (!handler && isModelListener) handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))];
3118
- if (handler) callWithAsyncErrorHandling(handler, instance, 6, args);
3119
- const onceHandler = props[handlerName + `Once`];
3120
- if (onceHandler) {
3121
- if (!instance.emitted) instance.emitted = {};
3122
- else if (instance.emitted[handlerName]) return;
3123
- instance.emitted[handlerName] = true;
3124
- callWithAsyncErrorHandling(onceHandler, instance, 6, args);
3125
- }
3126
- }
3127
- const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
3128
- function normalizeEmitsOptions(comp, appContext, asMixin = false) {
3129
- const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
3130
- const cached = cache.get(comp);
3131
- if (cached !== void 0) return cached;
3132
- const raw = comp.emits;
3133
- let normalized = {};
3134
- let hasExtends = false;
3135
- if (!shared.isFunction(comp)) {
3136
- const extendEmits = (raw2) => {
3137
- const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
3138
- if (normalizedFromExtend) {
3139
- hasExtends = true;
3140
- shared.extend(normalized, normalizedFromExtend);
3141
- }
3142
- };
3143
- if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendEmits);
3144
- if (comp.extends) extendEmits(comp.extends);
3145
- if (comp.mixins) comp.mixins.forEach(extendEmits);
3146
- }
3147
- if (!raw && !hasExtends) {
3148
- if (shared.isObject(comp)) cache.set(comp, null);
3149
- return null;
3150
- }
3151
- if (shared.isArray(raw)) raw.forEach((key) => normalized[key] = null);
3152
- else shared.extend(normalized, raw);
3153
- if (shared.isObject(comp)) cache.set(comp, normalized);
3154
- return normalized;
3155
- }
3156
- function isEmitListener(options, key) {
3157
- if (!options || !shared.isOn(key)) return false;
3158
- key = key.slice(2).replace(/Once$/, "");
3159
- return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key);
3160
- }
3161
- function renderComponentRoot(instance) {
3162
- const { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit: emit$1, render, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;
3163
- const prev = setCurrentRenderingInstance(instance);
3164
- let result;
3165
- let fallthroughAttrs;
3166
- try {
3167
- if (vnode.shapeFlag & 4) {
3168
- const proxyToUse = withProxy || proxy;
3169
- const thisProxy = proxyToUse;
3170
- result = normalizeVNode(render.call(thisProxy, proxyToUse, renderCache, props, setupState, data, ctx));
3171
- fallthroughAttrs = attrs;
3172
- } else {
3173
- const render2 = Component;
3174
- result = normalizeVNode(render2.length > 1 ? render2(props, {
3175
- attrs,
3176
- slots,
3177
- emit: emit$1
3178
- }) : render2(props, null));
3179
- fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
3180
- }
3181
- } catch (err) {
3182
- blockStack.length = 0;
3183
- handleError(err, instance, 1);
3184
- result = createVNode(Comment);
3185
- }
3186
- let root = result;
3187
- if (fallthroughAttrs && inheritAttrs !== false) {
3188
- const keys = Object.keys(fallthroughAttrs);
3189
- const { shapeFlag } = root;
3190
- if (keys.length) {
3191
- if (shapeFlag & 7) {
3192
- if (propsOptions && keys.some(shared.isModelListener)) fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
3193
- root = cloneVNode(root, fallthroughAttrs, false, true);
3194
- }
3195
- }
3196
- }
3197
- if (vnode.dirs) {
3198
- root = cloneVNode(root, null, false, true);
3199
- root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
3200
- }
3201
- if (vnode.transition) setTransitionHooks(root, vnode.transition);
3202
- result = root;
3203
- setCurrentRenderingInstance(prev);
3204
- return result;
3205
- }
3206
- function filterSingleRoot(children, recurse = true) {
3207
- let singleRoot;
3208
- for (let i = 0; i < children.length; i++) {
3209
- const child = children[i];
3210
- if (isVNode(child)) {
3211
- if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
3212
- else singleRoot = child;
3213
- } else return;
3214
- }
3215
- return singleRoot;
3216
- }
3217
- const getFunctionalFallthrough = (attrs) => {
3218
- let res;
3219
- for (const key in attrs) if (key === "class" || key === "style" || shared.isOn(key)) (res || (res = {}))[key] = attrs[key];
3220
- return res;
3221
- };
3222
- const filterModelListeners = (attrs, props) => {
3223
- const res = {};
3224
- for (const key in attrs) if (!shared.isModelListener(key) || !(key.slice(9) in props)) res[key] = attrs[key];
3225
- return res;
3226
- };
3227
- function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
3228
- const { props: prevProps, children: prevChildren, component } = prevVNode;
3229
- const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
3230
- const emits = component.emitsOptions;
3231
- if (nextVNode.dirs || nextVNode.transition) return true;
3232
- if (optimized && patchFlag >= 0) {
3233
- if (patchFlag & 1024) return true;
3234
- if (patchFlag & 16) {
3235
- if (!prevProps) return !!nextProps;
3236
- return hasPropsChanged(prevProps, nextProps, emits);
3237
- } else if (patchFlag & 8) {
3238
- const dynamicProps = nextVNode.dynamicProps;
3239
- for (let i = 0; i < dynamicProps.length; i++) {
3240
- const key = dynamicProps[i];
3241
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) return true;
3242
- }
3243
- }
3244
- } else {
3245
- if (prevChildren || nextChildren) {
3246
- if (!nextChildren || !nextChildren.$stable) return true;
3247
- }
3248
- if (prevProps === nextProps) return false;
3249
- if (!prevProps) return !!nextProps;
3250
- if (!nextProps) return true;
3251
- return hasPropsChanged(prevProps, nextProps, emits);
3252
- }
3253
- return false;
3254
- }
3255
- function hasPropsChanged(prevProps, nextProps, emitsOptions) {
3256
- const nextKeys = Object.keys(nextProps);
3257
- if (nextKeys.length !== Object.keys(prevProps).length) return true;
3258
- for (let i = 0; i < nextKeys.length; i++) {
3259
- const key = nextKeys[i];
3260
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) return true;
3261
- }
3262
- return false;
3263
- }
3264
- function updateHOCHostEl({ vnode, parent }, el) {
3265
- while (parent) {
3266
- const root = parent.subTree;
3267
- if (root.suspense && root.suspense.activeBranch === vnode) root.el = vnode.el;
3268
- if (root === vnode) {
3269
- (vnode = parent.vnode).el = el;
3270
- parent = parent.parent;
3271
- } else break;
3272
- }
3273
- }
3274
- const isSuspense = (type) => type.__isSuspense;
3275
- let suspenseId = 0;
3276
- const Suspense = {
3277
- name: "Suspense",
3278
- __isSuspense: true,
3279
- process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
3280
- if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
3281
- else {
3282
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
3283
- n2.suspense = n1.suspense;
3284
- n2.suspense.vnode = n2;
3285
- n2.el = n1.el;
3286
- return;
3287
- }
3288
- patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, rendererInternals);
3289
- }
3290
- },
3291
- hydrate: hydrateSuspense,
3292
- normalize: normalizeSuspenseChildren
3293
- };
3294
- function triggerEvent(vnode, name) {
3295
- const eventListener = vnode.props && vnode.props[name];
3296
- if (shared.isFunction(eventListener)) eventListener();
3297
- }
3298
- function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
3299
- const { p: patch, o: { createElement } } = rendererInternals;
3300
- const hiddenContainer = createElement("div");
3301
- const suspense = vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals);
3302
- patch(null, suspense.pendingBranch = vnode.ssContent, hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds);
3303
- if (suspense.deps > 0) {
3304
- triggerEvent(vnode, "onPending");
3305
- triggerEvent(vnode, "onFallback");
3306
- patch(null, vnode.ssFallback, container, anchor, parentComponent, null, namespace, slotScopeIds);
3307
- setActiveBranch(suspense, vnode.ssFallback);
3308
- } else suspense.resolve(false, true);
3309
- }
3310
- function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
3311
- const suspense = n2.suspense = n1.suspense;
3312
- suspense.vnode = n2;
3313
- n2.el = n1.el;
3314
- const newBranch = n2.ssContent;
3315
- const newFallback = n2.ssFallback;
3316
- const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
3317
- if (pendingBranch) {
3318
- suspense.pendingBranch = newBranch;
3319
- if (isSameVNodeType(pendingBranch, newBranch)) {
3320
- patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
3321
- if (suspense.deps <= 0) suspense.resolve();
3322
- else if (isInFallback) {
3323
- if (!isHydrating) {
3324
- patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
3325
- setActiveBranch(suspense, newFallback);
3326
- }
3327
- }
3328
- } else {
3329
- suspense.pendingId = suspenseId++;
3330
- if (isHydrating) {
3331
- suspense.isHydrating = false;
3332
- suspense.activeBranch = pendingBranch;
3333
- } else unmount(pendingBranch, parentComponent, suspense);
3334
- suspense.deps = 0;
3335
- suspense.effects.length = 0;
3336
- suspense.hiddenContainer = createElement("div");
3337
- if (isInFallback) {
3338
- patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
3339
- if (suspense.deps <= 0) suspense.resolve();
3340
- else {
3341
- patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
3342
- setActiveBranch(suspense, newFallback);
3343
- }
3344
- } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
3345
- patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, namespace, slotScopeIds, optimized);
3346
- suspense.resolve(true);
3347
- } else {
3348
- patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
3349
- if (suspense.deps <= 0) suspense.resolve();
3350
- }
3351
- }
3352
- } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
3353
- patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, namespace, slotScopeIds, optimized);
3354
- setActiveBranch(suspense, newBranch);
3355
- } else {
3356
- triggerEvent(n2, "onPending");
3357
- suspense.pendingBranch = newBranch;
3358
- if (newBranch.shapeFlag & 512) suspense.pendingId = newBranch.component.suspenseId;
3359
- else suspense.pendingId = suspenseId++;
3360
- patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
3361
- if (suspense.deps <= 0) suspense.resolve();
3362
- else {
3363
- const { timeout, pendingId } = suspense;
3364
- if (timeout > 0) setTimeout(() => {
3365
- if (suspense.pendingId === pendingId) suspense.fallback(newFallback);
3366
- }, timeout);
3367
- else if (timeout === 0) suspense.fallback(newFallback);
3368
- }
3369
- }
3370
- }
3371
- function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3372
- const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
3373
- let parentSuspenseId;
3374
- const isSuspensible = isVNodeSuspensible(vnode);
3375
- if (isSuspensible) {
3376
- if (parentSuspense && parentSuspense.pendingBranch) {
3377
- parentSuspenseId = parentSuspense.pendingId;
3378
- parentSuspense.deps++;
3379
- }
3380
- }
3381
- const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0;
3382
- const initialAnchor = anchor;
3383
- const suspense = {
3384
- vnode,
3385
- parent: parentSuspense,
3386
- parentComponent,
3387
- namespace,
3388
- container,
3389
- hiddenContainer,
3390
- deps: 0,
3391
- pendingId: suspenseId++,
3392
- timeout: typeof timeout === "number" ? timeout : -1,
3393
- activeBranch: null,
3394
- pendingBranch: null,
3395
- isInFallback: !isHydrating,
3396
- isHydrating,
3397
- isUnmounted: false,
3398
- effects: [],
3399
- resolve(resume = false, sync = false) {
3400
- const { vnode: vnode2, activeBranch, pendingBranch, pendingId, effects, parentComponent: parentComponent2, container: container2 } = suspense;
3401
- let delayEnter = false;
3402
- if (suspense.isHydrating) suspense.isHydrating = false;
3403
- else if (!resume) {
3404
- delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
3405
- if (delayEnter) activeBranch.transition.afterLeave = () => {
3406
- if (pendingId === suspense.pendingId) {
3407
- move(pendingBranch, container2, anchor === initialAnchor ? next(activeBranch) : anchor, 0);
3408
- queuePostFlushCb(effects);
3409
- }
3410
- };
3411
- if (activeBranch) {
3412
- if (parentNode(activeBranch.el) === container2) anchor = next(activeBranch);
3413
- unmount(activeBranch, parentComponent2, suspense, true);
3414
- }
3415
- if (!delayEnter) move(pendingBranch, container2, anchor, 0);
3416
- }
3417
- setActiveBranch(suspense, pendingBranch);
3418
- suspense.pendingBranch = null;
3419
- suspense.isInFallback = false;
3420
- let parent = suspense.parent;
3421
- let hasUnresolvedAncestor = false;
3422
- while (parent) {
3423
- if (parent.pendingBranch) {
3424
- parent.effects.push(...effects);
3425
- hasUnresolvedAncestor = true;
3426
- break;
3427
- }
3428
- parent = parent.parent;
3429
- }
3430
- if (!hasUnresolvedAncestor && !delayEnter) queuePostFlushCb(effects);
3431
- suspense.effects = [];
3432
- if (isSuspensible) {
3433
- if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
3434
- parentSuspense.deps--;
3435
- if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
3436
- }
3437
- }
3438
- triggerEvent(vnode2, "onResolve");
3439
- },
3440
- fallback(fallbackVNode) {
3441
- if (!suspense.pendingBranch) return;
3442
- const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
3443
- triggerEvent(vnode2, "onFallback");
3444
- const anchor2 = next(activeBranch);
3445
- const mountFallback = () => {
3446
- if (!suspense.isInFallback) return;
3447
- patch(null, fallbackVNode, container2, anchor2, parentComponent2, null, namespace2, slotScopeIds, optimized);
3448
- setActiveBranch(suspense, fallbackVNode);
3449
- };
3450
- const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
3451
- if (delayEnter) activeBranch.transition.afterLeave = mountFallback;
3452
- suspense.isInFallback = true;
3453
- unmount(activeBranch, parentComponent2, null, true);
3454
- if (!delayEnter) mountFallback();
3455
- },
3456
- move(container2, anchor2, type) {
3457
- suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
3458
- suspense.container = container2;
3459
- },
3460
- next() {
3461
- return suspense.activeBranch && next(suspense.activeBranch);
3462
- },
3463
- registerDep(instance, setupRenderEffect, optimized2) {
3464
- const isInPendingSuspense = !!suspense.pendingBranch;
3465
- if (isInPendingSuspense) suspense.deps++;
3466
- const hydratedEl = instance.vnode.el;
3467
- instance.asyncDep.catch((err) => {
3468
- handleError(err, instance, 0);
3469
- }).then((asyncSetupResult) => {
3470
- if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
3471
- instance.asyncResolved = true;
3472
- const { vnode: vnode2 } = instance;
3473
- handleSetupResult(instance, asyncSetupResult, false);
3474
- if (hydratedEl) vnode2.el = hydratedEl;
3475
- const placeholder = !hydratedEl && instance.subTree.el;
3476
- setupRenderEffect(instance, vnode2, parentNode(hydratedEl || instance.subTree.el), hydratedEl ? null : next(instance.subTree), suspense, namespace, optimized2);
3477
- if (placeholder) remove(placeholder);
3478
- updateHOCHostEl(instance, vnode2.el);
3479
- if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
3480
- });
3481
- },
3482
- unmount(parentSuspense2, doRemove) {
3483
- suspense.isUnmounted = true;
3484
- if (suspense.activeBranch) unmount(suspense.activeBranch, parentComponent, parentSuspense2, doRemove);
3485
- if (suspense.pendingBranch) unmount(suspense.pendingBranch, parentComponent, parentSuspense2, doRemove);
3486
- }
3487
- };
3488
- return suspense;
3489
- }
3490
- function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
3491
- const suspense = vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement("div"), null, namespace, slotScopeIds, optimized, rendererInternals, true);
3492
- const result = hydrateNode(node, suspense.pendingBranch = vnode.ssContent, parentComponent, suspense, slotScopeIds, optimized);
3493
- if (suspense.deps === 0) suspense.resolve(false, true);
3494
- return result;
3495
- }
3496
- function normalizeSuspenseChildren(vnode) {
3497
- const { shapeFlag, children } = vnode;
3498
- const isSlotChildren = shapeFlag & 32;
3499
- vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
3500
- vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
3501
- }
3502
- function normalizeSuspenseSlot(s) {
3503
- let block;
3504
- if (shared.isFunction(s)) {
3505
- const trackBlock = isBlockTreeEnabled && s._c;
3506
- if (trackBlock) {
3507
- s._d = false;
3508
- openBlock();
3509
- }
3510
- s = s();
3511
- if (trackBlock) {
3512
- s._d = true;
3513
- block = currentBlock;
3514
- closeBlock();
3515
- }
3516
- }
3517
- if (shared.isArray(s)) s = filterSingleRoot(s);
3518
- s = normalizeVNode(s);
3519
- if (block && !s.dynamicChildren) s.dynamicChildren = block.filter((c) => c !== s);
3520
- return s;
3521
- }
3522
- function queueEffectWithSuspense(fn, suspense) {
3523
- if (suspense && suspense.pendingBranch) if (shared.isArray(fn)) suspense.effects.push(...fn);
3524
- else suspense.effects.push(fn);
3525
- else queuePostFlushCb(fn);
3526
- }
3527
- function setActiveBranch(suspense, branch) {
3528
- suspense.activeBranch = branch;
3529
- const { vnode, parentComponent } = suspense;
3530
- let el = branch.el;
3531
- while (!el && branch.component) {
3532
- branch = branch.component.subTree;
3533
- el = branch.el;
3534
- }
3535
- vnode.el = el;
3536
- if (parentComponent && parentComponent.subTree === vnode) {
3537
- parentComponent.vnode.el = el;
3538
- updateHOCHostEl(parentComponent, el);
3539
- }
3540
- }
3541
- function isVNodeSuspensible(vnode) {
3542
- const suspensible = vnode.props && vnode.props.suspensible;
3543
- return suspensible != null && suspensible !== false;
3544
- }
3545
- const Fragment = Symbol.for("v-fgt");
3546
- const Text = Symbol.for("v-txt");
3547
- const Comment = Symbol.for("v-cmt");
3548
- const Static = Symbol.for("v-stc");
3549
- const blockStack = [];
3550
- let currentBlock = null;
3551
- function openBlock(disableTracking = false) {
3552
- blockStack.push(currentBlock = disableTracking ? null : []);
3553
- }
3554
- function closeBlock() {
3555
- blockStack.pop();
3556
- currentBlock = blockStack[blockStack.length - 1] || null;
3557
- }
3558
- let isBlockTreeEnabled = 1;
3559
- function setBlockTracking(value, inVOnce = false) {
3560
- isBlockTreeEnabled += value;
3561
- if (value < 0 && currentBlock && inVOnce) currentBlock.hasOnce = true;
3562
- }
3563
- function setupBlock(vnode) {
3564
- vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null;
3565
- closeBlock();
3566
- if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(vnode);
3567
- return vnode;
3568
- }
3569
- function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
3570
- return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true));
3571
- }
3572
- function createBlock(type, props, children, patchFlag, dynamicProps) {
3573
- return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true));
3574
- }
3575
- function isVNode(value) {
3576
- return value ? value.__v_isVNode === true : false;
3577
- }
3578
- function isSameVNodeType(n1, n2) {
3579
- return n1.type === n2.type && n1.key === n2.key;
3580
- }
3581
- function transformVNodeArgs(transformer) {}
3582
- const normalizeKey = ({ key }) => key != null ? key : null;
3583
- const normalizeRef = ({ ref, ref_key, ref_for }) => {
3584
- if (typeof ref === "number") ref = "" + ref;
3585
- return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? {
3586
- i: currentRenderingInstance,
3587
- r: ref,
3588
- k: ref_key,
3589
- f: !!ref_for
3590
- } : ref : null;
3591
- };
3592
- function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
3593
- const vnode = {
3594
- __v_isVNode: true,
3595
- __v_skip: true,
3596
- type,
3597
- props,
3598
- key: props && normalizeKey(props),
3599
- ref: props && normalizeRef(props),
3600
- scopeId: currentScopeId,
3601
- slotScopeIds: null,
3602
- children,
3603
- component: null,
3604
- suspense: null,
3605
- ssContent: null,
3606
- ssFallback: null,
3607
- dirs: null,
3608
- transition: null,
3609
- el: null,
3610
- anchor: null,
3611
- target: null,
3612
- targetStart: null,
3613
- targetAnchor: null,
3614
- staticCount: 0,
3615
- shapeFlag,
3616
- patchFlag,
3617
- dynamicProps,
3618
- dynamicChildren: null,
3619
- appContext: null,
3620
- ctx: currentRenderingInstance
3621
- };
3622
- if (needFullChildrenNormalization) {
3623
- normalizeChildren(vnode, children);
3624
- if (shapeFlag & 128) type.normalize(vnode);
3625
- } else if (children) vnode.shapeFlag |= shared.isString(children) ? 8 : 16;
3626
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
3627
- return vnode;
3628
- }
3629
- const createVNode = _createVNode;
3630
- function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
3631
- if (!type || type === NULL_DYNAMIC_COMPONENT) type = Comment;
3632
- if (isVNode(type)) {
3633
- const cloned = cloneVNode(type, props, true);
3634
- if (children) normalizeChildren(cloned, children);
3635
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
3636
- else currentBlock.push(cloned);
3637
- cloned.patchFlag = -2;
3638
- return cloned;
3639
- }
3640
- if (isClassComponent(type)) type = type.__vccOpts;
3641
- if (props) {
3642
- props = guardReactiveProps(props);
3643
- let { class: klass, style } = props;
3644
- if (klass && !shared.isString(klass)) props.class = shared.normalizeClass(klass);
3645
- if (shared.isObject(style)) {
3646
- if (reactivity.isProxy(style) && !shared.isArray(style)) style = shared.extend({}, style);
3647
- props.style = shared.normalizeStyle(style);
3648
- }
3649
- }
3650
- const shapeFlag = shared.isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : shared.isObject(type) ? 4 : shared.isFunction(type) ? 2 : 0;
3651
- return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);
3652
- }
3653
- function guardReactiveProps(props) {
3654
- if (!props) return null;
3655
- return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props;
3656
- }
3657
- function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
3658
- const { props, ref, patchFlag, children, transition } = vnode;
3659
- const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
3660
- const cloned = {
3661
- __v_isVNode: true,
3662
- __v_skip: true,
3663
- type: vnode.type,
3664
- props: mergedProps,
3665
- key: mergedProps && normalizeKey(mergedProps),
3666
- ref: extraProps && extraProps.ref ? mergeRef && ref ? shared.isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref,
3667
- scopeId: vnode.scopeId,
3668
- slotScopeIds: vnode.slotScopeIds,
3669
- children,
3670
- target: vnode.target,
3671
- targetStart: vnode.targetStart,
3672
- targetAnchor: vnode.targetAnchor,
3673
- staticCount: vnode.staticCount,
3674
- shapeFlag: vnode.shapeFlag,
3675
- patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
3676
- dynamicProps: vnode.dynamicProps,
3677
- dynamicChildren: vnode.dynamicChildren,
3678
- appContext: vnode.appContext,
3679
- dirs: vnode.dirs,
3680
- transition,
3681
- component: vnode.component,
3682
- suspense: vnode.suspense,
3683
- ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
3684
- ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
3685
- placeholder: vnode.placeholder,
3686
- el: vnode.el,
3687
- anchor: vnode.anchor,
3688
- ctx: vnode.ctx,
3689
- ce: vnode.ce
3690
- };
3691
- if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
3692
- return cloned;
3693
- }
3694
- function createTextVNode(text = " ", flag = 0) {
3695
- return createVNode(Text, null, text, flag);
3696
- }
3697
- function createStaticVNode(content, numberOfNodes) {
3698
- const vnode = createVNode(Static, null, content);
3699
- vnode.staticCount = numberOfNodes;
3700
- return vnode;
3701
- }
3702
- function createCommentVNode(text = "", asBlock = false) {
3703
- return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
3704
- }
3705
- function normalizeVNode(child) {
3706
- if (child == null || typeof child === "boolean") return createVNode(Comment);
3707
- else if (shared.isArray(child)) return createVNode(Fragment, null, child.slice());
3708
- else if (isVNode(child)) return cloneIfMounted(child);
3709
- else return createVNode(Text, null, String(child));
3710
- }
3711
- function cloneIfMounted(child) {
3712
- return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
3713
- }
3714
- function normalizeChildren(vnode, children) {
3715
- let type = 0;
3716
- const { shapeFlag } = vnode;
3717
- if (children == null) children = null;
3718
- else if (shared.isArray(children)) type = 16;
3719
- else if (typeof children === "object") if (shapeFlag & 65) {
3720
- const slot = children.default;
3721
- if (slot) {
3722
- slot._c && (slot._d = false);
3723
- normalizeChildren(vnode, slot());
3724
- slot._c && (slot._d = true);
3725
- }
3726
- return;
3727
- } else {
3728
- type = 32;
3729
- const slotFlag = children._;
3730
- if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
3731
- else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
3732
- else {
3733
- children._ = 2;
3734
- vnode.patchFlag |= 1024;
3735
- }
3736
- }
3737
- else if (shared.isFunction(children)) {
3738
- children = {
3739
- default: children,
3740
- _ctx: currentRenderingInstance
3741
- };
3742
- type = 32;
3743
- } else {
3744
- children = String(children);
3745
- if (shapeFlag & 64) {
3746
- type = 16;
3747
- children = [createTextVNode(children)];
3748
- } else type = 8;
3749
- }
3750
- vnode.children = children;
3751
- vnode.shapeFlag |= type;
3752
- }
3753
- function mergeProps(...args) {
3754
- const ret = {};
3755
- for (let i = 0; i < args.length; i++) {
3756
- const toMerge = args[i];
3757
- for (const key in toMerge) if (key === "class") {
3758
- if (ret.class !== toMerge.class) ret.class = shared.normalizeClass([ret.class, toMerge.class]);
3759
- } else if (key === "style") ret.style = shared.normalizeStyle([ret.style, toMerge.style]);
3760
- else if (shared.isOn(key)) {
3761
- const existing = ret[key];
3762
- const incoming = toMerge[key];
3763
- if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;
3764
- } else if (key !== "") ret[key] = toMerge[key];
3765
- }
3766
- return ret;
3767
- }
3768
- function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
3769
- callWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);
3770
- }
3771
- const emptyAppContext = createAppContext();
3772
- let uid = 0;
3773
- function createComponentInstance(vnode, parent, suspense) {
3774
- const type = vnode.type;
3775
- const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
3776
- const instance = {
3777
- uid: uid++,
3778
- vnode,
3779
- type,
3780
- parent,
3781
- appContext,
3782
- root: null,
3783
- next: null,
3784
- subTree: null,
3785
- effect: null,
3786
- update: null,
3787
- job: null,
3788
- scope: new reactivity.EffectScope(true),
3789
- render: null,
3790
- proxy: null,
3791
- exposed: null,
3792
- exposeProxy: null,
3793
- withProxy: null,
3794
- provides: parent ? parent.provides : Object.create(appContext.provides),
3795
- ids: parent ? parent.ids : [
3796
- "",
3797
- 0,
3798
- 0
3799
- ],
3800
- accessCache: null,
3801
- renderCache: [],
3802
- components: null,
3803
- directives: null,
3804
- propsOptions: normalizePropsOptions(type, appContext),
3805
- emitsOptions: normalizeEmitsOptions(type, appContext),
3806
- emit: null,
3807
- emitted: null,
3808
- propsDefaults: shared.EMPTY_OBJ,
3809
- inheritAttrs: type.inheritAttrs,
3810
- ctx: shared.EMPTY_OBJ,
3811
- data: shared.EMPTY_OBJ,
3812
- props: shared.EMPTY_OBJ,
3813
- attrs: shared.EMPTY_OBJ,
3814
- slots: shared.EMPTY_OBJ,
3815
- refs: shared.EMPTY_OBJ,
3816
- setupState: shared.EMPTY_OBJ,
3817
- setupContext: null,
3818
- suspense,
3819
- suspenseId: suspense ? suspense.pendingId : 0,
3820
- asyncDep: null,
3821
- asyncResolved: false,
3822
- isMounted: false,
3823
- isUnmounted: false,
3824
- isDeactivated: false,
3825
- bc: null,
3826
- c: null,
3827
- bm: null,
3828
- m: null,
3829
- bu: null,
3830
- u: null,
3831
- um: null,
3832
- bum: null,
3833
- da: null,
3834
- a: null,
3835
- rtg: null,
3836
- rtc: null,
3837
- ec: null,
3838
- sp: null
3839
- };
3840
- instance.ctx = { _: instance };
3841
- instance.root = parent ? parent.root : instance;
3842
- instance.emit = emit.bind(null, instance);
3843
- if (vnode.ce) vnode.ce(instance);
3844
- return instance;
3845
- }
3846
- let currentInstance = null;
3847
- const getCurrentInstance = () => currentInstance || currentRenderingInstance;
3848
- let internalSetCurrentInstance;
3849
- let setInSSRSetupState;
3850
- {
3851
- const g = shared.getGlobalThis();
3852
- const registerGlobalSetter = (key, setter) => {
3853
- let setters;
3854
- if (!(setters = g[key])) setters = g[key] = [];
3855
- setters.push(setter);
3856
- return (v) => {
3857
- if (setters.length > 1) setters.forEach((set) => set(v));
3858
- else setters[0](v);
3859
- };
3860
- };
3861
- internalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v) => currentInstance = v);
3862
- setInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v) => isInSSRComponentSetup = v);
3863
- }
3864
- const setCurrentInstance = (instance) => {
3865
- const prev = currentInstance;
3866
- internalSetCurrentInstance(instance);
3867
- instance.scope.on();
3868
- return () => {
3869
- instance.scope.off();
3870
- internalSetCurrentInstance(prev);
3871
- };
3872
- };
3873
- const unsetCurrentInstance = () => {
3874
- currentInstance && currentInstance.scope.off();
3875
- internalSetCurrentInstance(null);
3876
- };
3877
- function isStatefulComponent(instance) {
3878
- return instance.vnode.shapeFlag & 4;
3879
- }
3880
- let isInSSRComponentSetup = false;
3881
- function setupComponent(instance, isSSR = false, optimized = false) {
3882
- isSSR && setInSSRSetupState(isSSR);
3883
- const { props, children } = instance.vnode;
3884
- const isStateful = isStatefulComponent(instance);
3885
- initProps(instance, props, isStateful, isSSR);
3886
- initSlots(instance, children, optimized || isSSR);
3887
- const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
3888
- isSSR && setInSSRSetupState(false);
3889
- return setupResult;
3890
- }
3891
- function setupStatefulComponent(instance, isSSR) {
3892
- const Component = instance.type;
3893
- instance.accessCache = /* @__PURE__ */ Object.create(null);
3894
- instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
3895
- const { setup } = Component;
3896
- if (setup) {
3897
- reactivity.pauseTracking();
3898
- const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
3899
- const reset = setCurrentInstance(instance);
3900
- const setupResult = callWithErrorHandling(setup, instance, 0, [instance.props, setupContext]);
3901
- const isAsyncSetup = shared.isPromise(setupResult);
3902
- reactivity.resetTracking();
3903
- reset();
3904
- if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
3905
- if (isAsyncSetup) {
3906
- setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
3907
- if (isSSR) return setupResult.then((resolvedResult) => {
3908
- handleSetupResult(instance, resolvedResult, isSSR);
3909
- }).catch((e) => {
3910
- handleError(e, instance, 0);
3911
- });
3912
- else instance.asyncDep = setupResult;
3913
- } else handleSetupResult(instance, setupResult, isSSR);
3914
- } else finishComponentSetup(instance, isSSR);
3915
- }
3916
- function handleSetupResult(instance, setupResult, isSSR) {
3917
- if (shared.isFunction(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
3918
- else instance.render = setupResult;
3919
- else if (shared.isObject(setupResult)) instance.setupState = reactivity.proxyRefs(setupResult);
3920
- finishComponentSetup(instance, isSSR);
3921
- }
3922
- let compile;
3923
- let installWithProxy;
3924
- function registerRuntimeCompiler(_compile) {
3925
- compile = _compile;
3926
- installWithProxy = (i) => {
3927
- if (i.render._rc) i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
3928
- };
3929
- }
3930
- const isRuntimeOnly = () => !compile;
3931
- function finishComponentSetup(instance, isSSR, skipOptions) {
3932
- const Component = instance.type;
3933
- if (!instance.render) {
3934
- if (!isSSR && compile && !Component.render) {
3935
- const template = Component.template || resolveMergedOptions(instance).template;
3936
- if (template) {
3937
- const { isCustomElement, compilerOptions } = instance.appContext.config;
3938
- const { delimiters, compilerOptions: componentCompilerOptions } = Component;
3939
- const finalCompilerOptions = shared.extend(shared.extend({
3940
- isCustomElement,
3941
- delimiters
3942
- }, compilerOptions), componentCompilerOptions);
3943
- Component.render = compile(template, finalCompilerOptions);
3944
- }
3945
- }
3946
- instance.render = Component.render || shared.NOOP;
3947
- if (installWithProxy) installWithProxy(instance);
3948
- }
3949
- {
3950
- const reset = setCurrentInstance(instance);
3951
- reactivity.pauseTracking();
3952
- try {
3953
- applyOptions(instance);
3954
- } finally {
3955
- reactivity.resetTracking();
3956
- reset();
3957
- }
3958
- }
3959
- }
3960
- const attrsProxyHandlers = { get(target, key) {
3961
- reactivity.track(target, "get", "");
3962
- return target[key];
3963
- } };
3964
- function createSetupContext(instance) {
3965
- const expose = (exposed) => {
3966
- instance.exposed = exposed || {};
3967
- };
3968
- return {
3969
- attrs: new Proxy(instance.attrs, attrsProxyHandlers),
3970
- slots: instance.slots,
3971
- emit: instance.emit,
3972
- expose
3973
- };
3974
- }
3975
- function getComponentPublicInstance(instance) {
3976
- if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), {
3977
- get(target, key) {
3978
- if (key in target) return target[key];
3979
- else if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
3980
- },
3981
- has(target, key) {
3982
- return key in target || key in publicPropertiesMap;
3983
- }
3984
- }));
3985
- else return instance.proxy;
3986
- }
3987
- function getComponentName(Component, includeInferred = true) {
3988
- return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
3989
- }
3990
- function isClassComponent(value) {
3991
- return shared.isFunction(value) && "__vccOpts" in value;
3992
- }
3993
- const computed = (getterOrOptions, debugOptions) => {
3994
- return reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
3995
- };
3996
- function h(type, propsOrChildren, children) {
3997
- try {
3998
- setBlockTracking(-1);
3999
- const l = arguments.length;
4000
- if (l === 2) if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) {
4001
- if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
4002
- return createVNode(type, propsOrChildren);
4003
- } else return createVNode(type, null, propsOrChildren);
4004
- else {
4005
- if (l > 3) children = Array.prototype.slice.call(arguments, 2);
4006
- else if (l === 3 && isVNode(children)) children = [children];
4007
- return createVNode(type, propsOrChildren, children);
4008
- }
4009
- } finally {
4010
- setBlockTracking(1);
4011
- }
4012
- }
4013
- function initCustomFormatter() {}
4014
- function withMemo(memo, render, cache, index) {
4015
- const cached = cache[index];
4016
- if (cached && isMemoSame(cached, memo)) return cached;
4017
- const ret = render();
4018
- ret.memo = memo.slice();
4019
- ret.cacheIndex = index;
4020
- return cache[index] = ret;
4021
- }
4022
- function isMemoSame(cached, memo) {
4023
- const prev = cached.memo;
4024
- if (prev.length != memo.length) return false;
4025
- for (let i = 0; i < prev.length; i++) if (shared.hasChanged(prev[i], memo[i])) return false;
4026
- if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(cached);
4027
- return true;
4028
- }
4029
- const version = "3.5.22";
4030
- const warn$1 = shared.NOOP;
4031
- const ErrorTypeStrings = ErrorTypeStrings$1;
4032
- const devtools = void 0;
4033
- const setDevtoolsHook = shared.NOOP;
4034
- const ssrUtils = {
4035
- createComponentInstance,
4036
- setupComponent,
4037
- renderComponentRoot,
4038
- setCurrentRenderingInstance,
4039
- isVNode,
4040
- normalizeVNode,
4041
- getComponentPublicInstance,
4042
- ensureValidVNode,
4043
- pushWarningContext,
4044
- popWarningContext
4045
- };
4046
- const resolveFilter = null;
4047
- const compatUtils = null;
4048
- const DeprecationTypes = null;
4049
- exports.EffectScope = reactivity.EffectScope;
4050
- exports.ReactiveEffect = reactivity.ReactiveEffect;
4051
- exports.TrackOpTypes = reactivity.TrackOpTypes;
4052
- exports.TriggerOpTypes = reactivity.TriggerOpTypes;
4053
- exports.customRef = reactivity.customRef;
4054
- exports.effect = reactivity.effect;
4055
- exports.effectScope = reactivity.effectScope;
4056
- exports.getCurrentScope = reactivity.getCurrentScope;
4057
- exports.getCurrentWatcher = reactivity.getCurrentWatcher;
4058
- exports.isProxy = reactivity.isProxy;
4059
- exports.isReactive = reactivity.isReactive;
4060
- exports.isReadonly = reactivity.isReadonly;
4061
- exports.isRef = reactivity.isRef;
4062
- exports.isShallow = reactivity.isShallow;
4063
- exports.markRaw = reactivity.markRaw;
4064
- exports.onScopeDispose = reactivity.onScopeDispose;
4065
- exports.onWatcherCleanup = reactivity.onWatcherCleanup;
4066
- exports.proxyRefs = reactivity.proxyRefs;
4067
- exports.reactive = reactivity.reactive;
4068
- exports.readonly = reactivity.readonly;
4069
- exports.ref = reactivity.ref;
4070
- exports.shallowReactive = reactivity.shallowReactive;
4071
- exports.shallowReadonly = reactivity.shallowReadonly;
4072
- exports.shallowRef = reactivity.shallowRef;
4073
- exports.stop = reactivity.stop;
4074
- exports.toRaw = reactivity.toRaw;
4075
- exports.toRef = reactivity.toRef;
4076
- exports.toRefs = reactivity.toRefs;
4077
- exports.toValue = reactivity.toValue;
4078
- exports.triggerRef = reactivity.triggerRef;
4079
- exports.unref = reactivity.unref;
4080
- exports.camelize = shared.camelize;
4081
- exports.capitalize = shared.capitalize;
4082
- exports.normalizeClass = shared.normalizeClass;
4083
- exports.normalizeProps = shared.normalizeProps;
4084
- exports.normalizeStyle = shared.normalizeStyle;
4085
- exports.toDisplayString = shared.toDisplayString;
4086
- exports.toHandlerKey = shared.toHandlerKey;
4087
- exports.BaseTransition = BaseTransition;
4088
- exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators;
4089
- exports.Comment = Comment;
4090
- exports.DeprecationTypes = DeprecationTypes;
4091
- exports.ErrorCodes = ErrorCodes;
4092
- exports.ErrorTypeStrings = ErrorTypeStrings;
4093
- exports.Fragment = Fragment;
4094
- exports.KeepAlive = KeepAlive;
4095
- exports.Static = Static;
4096
- exports.Suspense = Suspense;
4097
- exports.Teleport = Teleport;
4098
- exports.Text = Text;
4099
- exports.assertNumber = assertNumber;
4100
- exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;
4101
- exports.callWithErrorHandling = callWithErrorHandling;
4102
- exports.cloneVNode = cloneVNode;
4103
- exports.compatUtils = compatUtils;
4104
- exports.computed = computed;
4105
- exports.createBlock = createBlock;
4106
- exports.createCommentVNode = createCommentVNode;
4107
- exports.createElementBlock = createElementBlock;
4108
- exports.createElementVNode = createBaseVNode;
4109
- exports.createHydrationRenderer = createHydrationRenderer;
4110
- exports.createPropsRestProxy = createPropsRestProxy;
4111
- exports.createRenderer = createRenderer;
4112
- exports.createSlots = createSlots;
4113
- exports.createStaticVNode = createStaticVNode;
4114
- exports.createTextVNode = createTextVNode;
4115
- exports.createVNode = createVNode;
4116
- exports.defineAsyncComponent = defineAsyncComponent;
4117
- exports.defineComponent = defineComponent;
4118
- exports.defineEmits = defineEmits;
4119
- exports.defineExpose = defineExpose;
4120
- exports.defineModel = defineModel;
4121
- exports.defineOptions = defineOptions;
4122
- exports.defineProps = defineProps;
4123
- exports.defineSlots = defineSlots;
4124
- exports.devtools = devtools;
4125
- exports.getCurrentInstance = getCurrentInstance;
4126
- exports.getTransitionRawChildren = getTransitionRawChildren;
4127
- exports.guardReactiveProps = guardReactiveProps;
4128
- exports.h = h;
4129
- exports.handleError = handleError;
4130
- exports.hasInjectionContext = hasInjectionContext;
4131
- exports.hydrateOnIdle = hydrateOnIdle;
4132
- exports.hydrateOnInteraction = hydrateOnInteraction;
4133
- exports.hydrateOnMediaQuery = hydrateOnMediaQuery;
4134
- exports.hydrateOnVisible = hydrateOnVisible;
4135
- exports.initCustomFormatter = initCustomFormatter;
4136
- exports.inject = inject;
4137
- exports.isMemoSame = isMemoSame;
4138
- exports.isRuntimeOnly = isRuntimeOnly;
4139
- exports.isVNode = isVNode;
4140
- exports.mergeDefaults = mergeDefaults;
4141
- exports.mergeModels = mergeModels;
4142
- exports.mergeProps = mergeProps;
4143
- exports.nextTick = nextTick;
4144
- exports.onActivated = onActivated;
4145
- exports.onBeforeMount = onBeforeMount;
4146
- exports.onBeforeUnmount = onBeforeUnmount;
4147
- exports.onBeforeUpdate = onBeforeUpdate;
4148
- exports.onDeactivated = onDeactivated;
4149
- exports.onErrorCaptured = onErrorCaptured;
4150
- exports.onMounted = onMounted;
4151
- exports.onRenderTracked = onRenderTracked;
4152
- exports.onRenderTriggered = onRenderTriggered;
4153
- exports.onServerPrefetch = onServerPrefetch;
4154
- exports.onUnmounted = onUnmounted;
4155
- exports.onUpdated = onUpdated;
4156
- exports.openBlock = openBlock;
4157
- exports.popScopeId = popScopeId;
4158
- exports.provide = provide;
4159
- exports.pushScopeId = pushScopeId;
4160
- exports.queuePostFlushCb = queuePostFlushCb;
4161
- exports.registerRuntimeCompiler = registerRuntimeCompiler;
4162
- exports.renderList = renderList;
4163
- exports.renderSlot = renderSlot;
4164
- exports.resolveComponent = resolveComponent;
4165
- exports.resolveDirective = resolveDirective;
4166
- exports.resolveDynamicComponent = resolveDynamicComponent;
4167
- exports.resolveFilter = resolveFilter;
4168
- exports.resolveTransitionHooks = resolveTransitionHooks;
4169
- exports.setBlockTracking = setBlockTracking;
4170
- exports.setDevtoolsHook = setDevtoolsHook;
4171
- exports.setTransitionHooks = setTransitionHooks;
4172
- exports.ssrContextKey = ssrContextKey;
4173
- exports.ssrUtils = ssrUtils;
4174
- exports.toHandlers = toHandlers;
4175
- exports.transformVNodeArgs = transformVNodeArgs;
4176
- exports.useAttrs = useAttrs;
4177
- exports.useId = useId;
4178
- exports.useModel = useModel;
4179
- exports.useSSRContext = useSSRContext;
4180
- exports.useSlots = useSlots;
4181
- exports.useTemplateRef = useTemplateRef;
4182
- exports.useTransitionState = useTransitionState;
4183
- exports.version = version;
4184
- exports.warn = warn$1;
4185
- exports.watch = watch;
4186
- exports.watchEffect = watchEffect;
4187
- exports.watchPostEffect = watchPostEffect;
4188
- exports.watchSyncEffect = watchSyncEffect;
4189
- exports.withAsyncContext = withAsyncContext;
4190
- exports.withCtx = withCtx;
4191
- exports.withDefaults = withDefaults;
4192
- exports.withDirectives = withDirectives;
4193
- exports.withMemo = withMemo;
4194
- exports.withScopeId = withScopeId;
4195
- }) });
4196
-
4197
- //#endregion
4198
- Object.defineProperty(exports, 'default', {
4199
- enumerable: true,
4200
- get: function () {
4201
- return require_runtime_core_cjs_prod();
4202
- }
4203
- });
4204
- //# sourceMappingURL=runtime-core.cjs.prod.cjs.map