cognova 0.2.20 → 0.2.21

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 (170) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{CCeM5lW2.js → -O86rjFZ.js} +1 -1
  3. package/.output/public/_nuxt/{BXxZokD_.js → -Q9J9PRu.js} +1 -1
  4. package/.output/public/_nuxt/{Hh9mv0Ek.js → 0DkCurh5.js} +1 -1
  5. package/.output/public/_nuxt/{CjJPkhbc.js → 49whOfsW.js} +1 -1
  6. package/.output/public/_nuxt/{DqR9SdeU.js → 4Vi9hKJC.js} +1 -1
  7. package/.output/public/_nuxt/{BoCU3mWu.js → 66GNa6MU.js} +1 -1
  8. package/.output/public/_nuxt/9dGxQN-2.js +1 -0
  9. package/.output/public/_nuxt/{DhlIWT8K.js → 9wWq016N.js} +1 -1
  10. package/.output/public/_nuxt/{BD5rPkc2.js → B04GYyxD.js} +1 -1
  11. package/.output/public/_nuxt/{DwrmFEZN.js → B0KPvVav.js} +1 -1
  12. package/.output/public/_nuxt/{Cywo6tZI.js → B1meh0Ci.js} +1 -1
  13. package/.output/public/_nuxt/{C5Cu9Fx6.js → B53zbEPa.js} +1 -1
  14. package/.output/public/_nuxt/{B20jNAhm.js → B6-aFDg7.js} +1 -1
  15. package/.output/public/_nuxt/{kkAMoB43.js → B6lgiDn1.js} +1 -1
  16. package/.output/public/_nuxt/{BgavRUl_.js → B7uuK82m.js} +1 -1
  17. package/.output/public/_nuxt/{BWqJInD3.js → B9OPrqTh.js} +1 -1
  18. package/.output/public/_nuxt/{DLHnP6tw.js → BA646MN4.js} +1 -1
  19. package/.output/public/_nuxt/{mzM4BGtv.js → BDhTzPPo.js} +1 -1
  20. package/.output/public/_nuxt/{CZNOaqeX.js → BDzVzzBM.js} +1 -1
  21. package/.output/public/_nuxt/{DTlSLSo1.js → BEkFNtxw.js} +3 -3
  22. package/.output/public/_nuxt/{B_hNqC64.js → BI7-RNYV.js} +1 -1
  23. package/.output/public/_nuxt/{rIgg2Arf.js → BN8XazaH.js} +3 -3
  24. package/.output/public/_nuxt/{TSYrPbLR.js → BNP0kT7B.js} +1 -1
  25. package/.output/public/_nuxt/{BhhMUror.js → BPfVf7kt.js} +1 -1
  26. package/.output/public/_nuxt/{BxsQlbgl.js → BQGDi8tM.js} +1 -1
  27. package/.output/public/_nuxt/{Br6epbzY.js → BUXewbUG.js} +1 -1
  28. package/.output/public/_nuxt/{Y59XKprr.js → BW0FZi7D.js} +1 -1
  29. package/.output/public/_nuxt/{Br81Sr2R.js → BXmijQzM.js} +1 -1
  30. package/.output/public/_nuxt/{C-78dDNd.js → BZFf3mr_.js} +1 -1
  31. package/.output/public/_nuxt/{C7hFztZL.js → BZx0xqxG.js} +1 -1
  32. package/.output/public/_nuxt/{DjsqyRqt.js → BbElT9yG.js} +1 -1
  33. package/.output/public/_nuxt/{BHUy5EAj.js → BjyHtuwq.js} +1 -1
  34. package/.output/public/_nuxt/{C4sG6rdW.js → BnfOmQBX.js} +1 -1
  35. package/.output/public/_nuxt/BoqEl-F1.js +1 -0
  36. package/.output/public/_nuxt/{C_A_NkeC.js → Bq2pktu_.js} +2 -2
  37. package/.output/public/_nuxt/{C2Gh3qqr.js → Br712gOY.js} +1 -1
  38. package/.output/public/_nuxt/{PamJNol9.js → Bs4sk8vv.js} +1 -1
  39. package/.output/public/_nuxt/{DL4EpgqQ.js → Bt87rSlM.js} +1 -1
  40. package/.output/public/_nuxt/{DFTEBTzZ.js → BtOA13zl.js} +1 -1
  41. package/.output/public/_nuxt/{TNpdJOlc.js → Bti4Nb4c.js} +1 -1
  42. package/.output/public/_nuxt/{BZ7DAtPi.js → Bu0HhyZq.js} +1 -1
  43. package/.output/public/_nuxt/{D867g6Ds.js → Bv25Wgb9.js} +1 -1
  44. package/.output/public/_nuxt/{CqS0zXYQ.js → BwMPB_Mu.js} +1 -1
  45. package/.output/public/_nuxt/{CS8SdmH2.js → BzkqPhn-.js} +1 -1
  46. package/.output/public/_nuxt/{BZm9w7en.js → C35LJkds.js} +1 -1
  47. package/.output/public/_nuxt/{DcJ0GstJ.js → C4VW2EjN.js} +1 -1
  48. package/.output/public/_nuxt/{C2-_hcwB.js → C6FzuEFH.js} +1 -1
  49. package/.output/public/_nuxt/{X0o5GcBb.js → C866FgGj.js} +1 -1
  50. package/.output/public/_nuxt/{BOCn_SGf.js → CBqC92gC.js} +3 -3
  51. package/.output/public/_nuxt/{D49P2RhG.js → CD2Wt775.js} +1 -1
  52. package/.output/public/_nuxt/{BzrhNhdT.js → CE491BHV.js} +1 -1
  53. package/.output/public/_nuxt/{BAY3_Hrq.js → CF8ziKf1.js} +1 -1
  54. package/.output/public/_nuxt/{B3OpTH_e.js → CFE6wnRK.js} +1 -1
  55. package/.output/public/_nuxt/{BVYYP4eQ.js → CFjVdIUR.js} +1 -1
  56. package/.output/public/_nuxt/{Dsuag_iW.js → CGPn0bIO.js} +1 -1
  57. package/.output/public/_nuxt/{BtrNCc2S.js → CKSWEIag.js} +1 -1
  58. package/.output/public/_nuxt/{BgIS9_ti.js → CL9cB3YW.js} +1 -1
  59. package/.output/public/_nuxt/{BWQ7zE01.js → CLUsxCN7.js} +1 -1
  60. package/.output/public/_nuxt/{CVVtVzXC.js → CM5aLXsq.js} +1 -1
  61. package/.output/public/_nuxt/{DZikIgHK.js → CN_jZBEh.js} +1 -1
  62. package/.output/public/_nuxt/{B-yW4SD3.js → CNgf0D2d.js} +1 -1
  63. package/.output/public/_nuxt/{CHbHVtCy.js → CPYFvNZ2.js} +1 -1
  64. package/.output/public/_nuxt/{PY5EGujn.js → CQTD64un.js} +1 -1
  65. package/.output/public/_nuxt/{DpSM97eH.js → CRLO8tx3.js} +1 -1
  66. package/.output/public/_nuxt/{DxE8r3r4.js → CTIUqf4N.js} +1 -1
  67. package/.output/public/_nuxt/{CLNcmNQS.js → CUDpi0L3.js} +1 -1
  68. package/.output/public/_nuxt/{C_doutX-.js → CY4SEsrB.js} +1 -1
  69. package/.output/public/_nuxt/{LR0kCjbe.js → CYAPNNGW.js} +1 -1
  70. package/.output/public/_nuxt/{CHnVFnBW.js → CZV2u8Xx.js} +1 -1
  71. package/.output/public/_nuxt/{CAVUAxNU.js → C_TYqFbT.js} +1 -1
  72. package/.output/public/_nuxt/{D3cEeQh7.js → CdIGoC9r.js} +1 -1
  73. package/.output/public/_nuxt/{U-eBrbR4.js → CiPQXVBy.js} +1 -1
  74. package/.output/public/_nuxt/{DEFWIjWl.js → Cif20myG.js} +1 -1
  75. package/.output/public/_nuxt/{DNAMjHbb.js → Ck1KJ2HV.js} +1 -1
  76. package/.output/public/_nuxt/{Cet4T_yO.js → CkSyHzm-.js} +1 -1
  77. package/.output/public/_nuxt/{CuvkTsqs.js → ClKTC8bU.js} +1 -1
  78. package/.output/public/_nuxt/CltqyXO5.js +1 -0
  79. package/.output/public/_nuxt/{BS1t375R.js → CmuSeGko.js} +1 -1
  80. package/.output/public/_nuxt/{CkrW8sGL.js → Cn_NBSuo.js} +1 -1
  81. package/.output/public/_nuxt/{C2OHaW6l.js → CvUov1Ey.js} +1 -1
  82. package/.output/public/_nuxt/{BQi8LIrn.js → CwY5tLRb.js} +1 -1
  83. package/.output/public/_nuxt/{C3xzleKP.js → CwoQ23uO.js} +1 -1
  84. package/.output/public/_nuxt/{1wCoXZ14.js → Cwoe6TAi.js} +1 -1
  85. package/.output/public/_nuxt/{CbDLhrNA.js → CxTuME0Z.js} +2 -2
  86. package/.output/public/_nuxt/{BGYoW3kO.js → Cyjm1APH.js} +1 -1
  87. package/.output/public/_nuxt/{C6Eoiclo.js → Cyo4VJ6S.js} +1 -1
  88. package/.output/public/_nuxt/{Be47YE2L.js → D-WxGaym.js} +1 -1
  89. package/.output/public/_nuxt/{0GqCtQ9S.js → D0SYimTY.js} +1 -1
  90. package/.output/public/_nuxt/{G_CsVlOR.js → D82AhPdI.js} +1 -1
  91. package/.output/public/_nuxt/{DVdnhfXT.js → D9dLxr1_.js} +1 -1
  92. package/.output/public/_nuxt/{C3szZmvA.js → D9jU4ocP.js} +1 -1
  93. package/.output/public/_nuxt/{C1oaoi1p.js → DAQeLqQw.js} +1 -1
  94. package/.output/public/_nuxt/{DM20WaLq.js → DDg2H-HK.js} +1 -1
  95. package/.output/public/_nuxt/{Co0UxVsx.js → DESvLlSI.js} +1 -1
  96. package/.output/public/_nuxt/{B9_vmatf.js → DFSB3QxC.js} +1 -1
  97. package/.output/public/_nuxt/{RlvwEbHv.js → DFqzAgzP.js} +1 -1
  98. package/.output/public/_nuxt/{Bj5e7QPz.js → DJuYHeIc.js} +1 -1
  99. package/.output/public/_nuxt/{D1reIfpX.js → DK0AJoGL.js} +1 -1
  100. package/.output/public/_nuxt/{XQNzmQy9.js → DQdWxVax.js} +1 -1
  101. package/.output/public/_nuxt/{z-MP0bB7.js → DRF-DnQg.js} +1 -1
  102. package/.output/public/_nuxt/{hCeWb_38.js → DUf0f355.js} +1 -1
  103. package/.output/public/_nuxt/{jTT1R-Vz.js → DWnLv2oh.js} +1 -1
  104. package/.output/public/_nuxt/{vCFAHwdt.js → DXkvGTEB.js} +1 -1
  105. package/.output/public/_nuxt/{CePKCqSb.js → DZncVjYt.js} +1 -1
  106. package/.output/public/_nuxt/{jC4pIK1p.js → DaAG12aj.js} +1 -1
  107. package/.output/public/_nuxt/{D2edadpd.js → Db66Rsfj.js} +1 -1
  108. package/.output/public/_nuxt/{B9Y3_B5G.js → DbLjznUU.js} +1 -1
  109. package/.output/public/_nuxt/{CxMuZEwX.js → Dfzca1IN.js} +1 -1
  110. package/.output/public/_nuxt/{MYeLvJGV.js → DhvuBruY.js} +1 -1
  111. package/.output/public/_nuxt/{Daf2MbWG.js → Dj9yr6QC.js} +1 -1
  112. package/.output/public/_nuxt/{_-TGPiLQ.js → DjJn4g73.js} +1 -1
  113. package/.output/public/_nuxt/{2J1KxdHv.js → DkAUrkyD.js} +1 -1
  114. package/.output/public/_nuxt/{DhN3_DYH.js → DkybthvX.js} +1 -1
  115. package/.output/public/_nuxt/{CkZT4LGq.js → DlNwSYeM.js} +1 -1
  116. package/.output/public/_nuxt/{pwJTkIQ4.js → Dm5HyQgM.js} +1 -1
  117. package/.output/public/_nuxt/{t8B72leH.js → Dn7zgQZh.js} +1 -1
  118. package/.output/public/_nuxt/{D41A2mE2.js → DoIqoxBH.js} +1 -1
  119. package/.output/public/_nuxt/{Bnn59-FS.js → Dqx39Omg.js} +1 -1
  120. package/.output/public/_nuxt/{8WMJQbWG.js → DrQVjmDX.js} +1 -1
  121. package/.output/public/_nuxt/{6VDUZECX.js → DuYzdzqK.js} +1 -1
  122. package/.output/public/_nuxt/{BLdMRpJD.js → DvZW6QuM.js} +1 -1
  123. package/.output/public/_nuxt/{CTGm_mc8.js → DxztGg8Y.js} +1 -1
  124. package/.output/public/_nuxt/{BTGeP1bA.js → EPFrlLUV.js} +1 -1
  125. package/.output/public/_nuxt/{hrPTRWjM.js → JsQhjNzl.js} +1 -1
  126. package/.output/public/_nuxt/{D_YGqvw_.js → NApXVVQD.js} +1 -1
  127. package/.output/public/_nuxt/{9Rw88G6h.js → OwiFxd0L.js} +1 -1
  128. package/.output/public/_nuxt/{BXdQ9ASJ.js → QAfF68DH.js} +1 -1
  129. package/.output/public/_nuxt/{CPwCTHun.js → QDt0Bhze.js} +1 -1
  130. package/.output/public/_nuxt/{DhSvBSt3.js → RF9kzKHY.js} +1 -1
  131. package/.output/public/_nuxt/{Dtr_0IbE.js → RzJhlhBq.js} +1 -1
  132. package/.output/public/_nuxt/{NKs0EGrh.js → SHHFgixe.js} +1 -1
  133. package/.output/public/_nuxt/V5ro_Ide.js +1 -0
  134. package/.output/public/_nuxt/{YZQjZgsH.js → Zge3ScOQ.js} +1 -1
  135. package/.output/public/_nuxt/{Bh0yGTzr.js → Zj8SE5Ja.js} +1 -1
  136. package/.output/public/_nuxt/{DHRexj9X.js → ZjXNlFkb.js} +1 -1
  137. package/.output/public/_nuxt/{DcYKh6QA.js → _5GQc09B.js} +1 -1
  138. package/.output/public/_nuxt/{CDcQ31Eh.js → aK4BeJQk.js} +1 -1
  139. package/.output/public/_nuxt/builds/latest.json +1 -1
  140. package/.output/public/_nuxt/builds/meta/36770554-14f7-4f3a-add8-2f51436e3d25.json +1 -0
  141. package/.output/public/_nuxt/{C5gfF7J1.js → cQU5gXxh.js} +1 -1
  142. package/.output/public/_nuxt/{CxSijT71.js → cq8AG_FV.js} +1 -1
  143. package/.output/public/_nuxt/{o-s8JBm2.js → d2FXPfMj.js} +1 -1
  144. package/.output/public/_nuxt/{UuqXScSw.js → dD3g22lS.js} +1 -1
  145. package/.output/public/_nuxt/{subdxgSQ.js → f35n4CdE.js} +1 -1
  146. package/.output/public/_nuxt/{HStC1ZyE.js → gWMUdeHB.js} +1 -1
  147. package/.output/public/_nuxt/{CTQFGHjS.js → i2HesToX.js} +1 -1
  148. package/.output/public/_nuxt/{V04-MrLN.js → iIxC-lNx.js} +1 -1
  149. package/.output/public/_nuxt/{D1uV2uir.js → nRp8uM7H.js} +1 -1
  150. package/.output/public/_nuxt/{DP8t9VWs.js → oBlsjU0k.js} +1 -1
  151. package/.output/public/_nuxt/{-mGU8_Hv.js → rH7JJqZQ.js} +1 -1
  152. package/.output/public/_nuxt/{D_k1YwXm.js → tak9pMy9.js} +1 -1
  153. package/.output/public/_nuxt/{BrkEOLHu.js → vebhRA6y.js} +1 -1
  154. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  155. package/.output/server/chunks/build/{integrations-D5JWURiJ.mjs → integrations-Hf4O1jkW.mjs} +24 -77
  156. package/.output/server/chunks/build/integrations-Hf4O1jkW.mjs.map +1 -0
  157. package/.output/server/chunks/build/server.mjs +1 -1
  158. package/.output/server/chunks/build/styles.mjs +4 -4
  159. package/.output/server/chunks/nitro/nitro.mjs +903 -996
  160. package/.output/server/package.json +1 -1
  161. package/app/pages/settings/integrations.vue +2 -23
  162. package/package.json +1 -1
  163. package/server/bridge/adapters/imessage.ts +12 -138
  164. package/shared/types/index.ts +0 -2
  165. package/.output/public/_nuxt/B9o6sFST.js +0 -1
  166. package/.output/public/_nuxt/CskGv_Km.js +0 -1
  167. package/.output/public/_nuxt/DTR31rjp.js +0 -1
  168. package/.output/public/_nuxt/Gyw_2f6x.js +0 -1
  169. package/.output/public/_nuxt/builds/meta/d528449f-50ac-4f95-b7da-122a1fdd6e85.json +0 -1
  170. package/.output/server/chunks/build/integrations-D5JWURiJ.mjs.map +0 -1
@@ -1 +1 @@
1
- import{r as f}from"./Bh0yGTzr.js";import{W as v,i as u,M as _,o,c as a,aa as s,w as m,ac as y,m as p,aC as g,$ as c,_ as b,a as h,ap as x}from"./BOCn_SGf.js";import"./iik6CYzq.js";const k={slots:{base:["group relative block px-4 py-3 rounded-md text-sm/6 my-5 last:mb-0 [&_code]:text-xs/5 [&_code]:bg-default [&_pre]:bg-default [&>div]:my-2.5 [&_ul]:my-2.5 [&_ol]:my-2.5 [&>*]:last:!mb-0 [&_ul]:ps-4.5 [&_ol]:ps-4.5 [&_li]:my-0","transition-colors"],icon:["size-4 shrink-0 align-sub me-1.5 inline-block","transition-colors"],externalIcon:["size-4 align-top absolute right-2 top-2 pointer-events-none","transition-colors"]},variants:{color:{primary:{base:"border border-primary/25 bg-primary/10 text-primary-600 dark:text-primary-300 [&_a]:text-primary [&_a]:hover:border-primary [&_a]:focus-visible:outline-primary [&_code]:text-primary-600 dark:[&_code]:text-primary-300 [&_code]:border-primary/25 [&_a]:hover:[&>code]:border-primary [&_a]:hover:[&>code]:text-primary [&_a]:focus-visible:[&>code]:border-primary [&_a]:focus-visible:[&>code]:text-primary [&>ul]:marker:text-primary/50",icon:"text-primary",externalIcon:"text-primary-600 dark:text-primary-300"},secondary:{base:"border border-secondary/25 bg-secondary/10 text-secondary-600 dark:text-secondary-300 [&_a]:text-secondary [&_a]:hover:border-secondary [&_a]:focus-visible:outline-secondary [&_code]:text-secondary-600 dark:[&_code]:text-secondary-300 [&_code]:border-secondary/25 [&_a]:hover:[&>code]:border-secondary [&_a]:hover:[&>code]:text-secondary [&_a]:focus-visible:[&>code]:border-secondary [&_a]:focus-visible:[&>code]:text-secondary [&>ul]:marker:text-secondary/50",icon:"text-secondary",externalIcon:"text-secondary-600 dark:text-secondary-300"},success:{base:"border border-success/25 bg-success/10 text-success-600 dark:text-success-300 [&_a]:text-success [&_a]:hover:border-success [&_a]:focus-visible:outline-success [&_code]:text-success-600 dark:[&_code]:text-success-300 [&_code]:border-success/25 [&_a]:hover:[&>code]:border-success [&_a]:hover:[&>code]:text-success [&_a]:focus-visible:[&>code]:border-success [&_a]:focus-visible:[&>code]:text-success [&>ul]:marker:text-success/50",icon:"text-success",externalIcon:"text-success-600 dark:text-success-300"},info:{base:"border border-info/25 bg-info/10 text-info-600 dark:text-info-300 [&_a]:text-info [&_a]:hover:border-info [&_a]:focus-visible:outline-info [&_code]:text-info-600 dark:[&_code]:text-info-300 [&_code]:border-info/25 [&_a]:hover:[&>code]:border-info [&_a]:hover:[&>code]:text-info [&_a]:focus-visible:[&>code]:border-info [&_a]:focus-visible:[&>code]:text-info [&>ul]:marker:text-info/50",icon:"text-info",externalIcon:"text-info-600 dark:text-info-300"},warning:{base:"border border-warning/25 bg-warning/10 text-warning-600 dark:text-warning-300 [&_a]:text-warning [&_a]:hover:border-warning [&_a]:focus-visible:outline-warning [&_code]:text-warning-600 dark:[&_code]:text-warning-300 [&_code]:border-warning/25 [&_a]:hover:[&>code]:border-warning [&_a]:hover:[&>code]:text-warning [&_a]:focus-visible:[&>code]:border-warning [&_a]:focus-visible:[&>code]:text-warning [&>ul]:marker:text-warning/50",icon:"text-warning",externalIcon:"text-warning-600 dark:text-warning-300"},error:{base:"border border-error/25 bg-error/10 text-error-600 dark:text-error-300 [&_a]:text-error [&_a]:hover:border-error [&_a]:focus-visible:outline-error [&_code]:text-error-600 dark:[&_code]:text-error-300 [&_code]:border-error/25 [&_a]:hover:[&>code]:border-error [&_a]:hover:[&>code]:text-error [&_a]:focus-visible:[&>code]:border-error [&_a]:focus-visible:[&>code]:text-error [&>ul]:marker:text-error/50",icon:"text-error",externalIcon:"text-error-600 dark:text-error-300"},neutral:{base:"border border-muted bg-muted text-default",icon:"text-highlighted",externalIcon:"text-dimmed"}},to:{true:"border-dashed"}},compoundVariants:[{color:"primary",to:!0,class:{base:"hover:border-primary has-focus-visible:border-primary",externalIcon:"group-hover:text-primary"}},{color:"secondary",to:!0,class:{base:"hover:border-secondary has-focus-visible:border-secondary",externalIcon:"group-hover:text-secondary"}},{color:"success",to:!0,class:{base:"hover:border-success has-focus-visible:border-success",externalIcon:"group-hover:text-success"}},{color:"info",to:!0,class:{base:"hover:border-info has-focus-visible:border-info",externalIcon:"group-hover:text-info"}},{color:"warning",to:!0,class:{base:"hover:border-warning has-focus-visible:border-warning",externalIcon:"group-hover:text-warning"}},{color:"error",to:!0,class:{base:"hover:border-error has-focus-visible:border-error",externalIcon:"group-hover:text-error"}},{color:"neutral",to:!0,class:{base:"hover:border-inverted has-focus-visible:border-inverted",externalIcon:"group-hover:text-highlighted"}}],defaultVariants:{color:"neutral"}},q=Object.assign({inheritAttrs:!1},{__name:"ProseCallout",props:{to:{type:null,required:!1},target:{type:[String,Object,null],required:!1},icon:{type:null,required:!1},color:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(r){const e=r,n=v(),t=u(()=>x({extend:x(k),...n.ui?.prose?.callout||{}})({color:e.color,to:!!e.to})),i=u(()=>e.target||(e.to&&typeof e.to=="string"&&e.to.startsWith("http")?"_blank":void 0));return(d,l)=>(o(),_("div",{class:c(t.value.base({class:e.class}))},[r.to?(o(),a(g,p({key:0},{to:r.to,target:i.value,...d.$attrs},{class:"focus:outline-none",raw:""}),{default:m(()=>[...l[0]||(l[0]=[y("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1)])]),_:1},16)):s("",!0),r.icon?(o(),a(b,{key:1,name:r.icon,class:c(t.value.icon({class:e.ui?.icon}))},null,8,["name","class"])):s("",!0),r.to&&i.value==="_blank"?(o(),a(b,{key:2,name:h(n).ui.icons.external,class:c(t.value.externalIcon({class:e.ui?.externalIcon}))},null,8,["name","class"])):s("",!0),f(d.$slots,"default",{mdcUnwrap:"p"})],2))}});export{q as default};
1
+ import{r as f}from"./Zj8SE5Ja.js";import{W as v,i as u,M as _,o,c as a,aa as s,w as m,ac as y,m as p,aC as g,$ as c,_ as b,a as h,ap as x}from"./CBqC92gC.js";import"./iik6CYzq.js";const k={slots:{base:["group relative block px-4 py-3 rounded-md text-sm/6 my-5 last:mb-0 [&_code]:text-xs/5 [&_code]:bg-default [&_pre]:bg-default [&>div]:my-2.5 [&_ul]:my-2.5 [&_ol]:my-2.5 [&>*]:last:!mb-0 [&_ul]:ps-4.5 [&_ol]:ps-4.5 [&_li]:my-0","transition-colors"],icon:["size-4 shrink-0 align-sub me-1.5 inline-block","transition-colors"],externalIcon:["size-4 align-top absolute right-2 top-2 pointer-events-none","transition-colors"]},variants:{color:{primary:{base:"border border-primary/25 bg-primary/10 text-primary-600 dark:text-primary-300 [&_a]:text-primary [&_a]:hover:border-primary [&_a]:focus-visible:outline-primary [&_code]:text-primary-600 dark:[&_code]:text-primary-300 [&_code]:border-primary/25 [&_a]:hover:[&>code]:border-primary [&_a]:hover:[&>code]:text-primary [&_a]:focus-visible:[&>code]:border-primary [&_a]:focus-visible:[&>code]:text-primary [&>ul]:marker:text-primary/50",icon:"text-primary",externalIcon:"text-primary-600 dark:text-primary-300"},secondary:{base:"border border-secondary/25 bg-secondary/10 text-secondary-600 dark:text-secondary-300 [&_a]:text-secondary [&_a]:hover:border-secondary [&_a]:focus-visible:outline-secondary [&_code]:text-secondary-600 dark:[&_code]:text-secondary-300 [&_code]:border-secondary/25 [&_a]:hover:[&>code]:border-secondary [&_a]:hover:[&>code]:text-secondary [&_a]:focus-visible:[&>code]:border-secondary [&_a]:focus-visible:[&>code]:text-secondary [&>ul]:marker:text-secondary/50",icon:"text-secondary",externalIcon:"text-secondary-600 dark:text-secondary-300"},success:{base:"border border-success/25 bg-success/10 text-success-600 dark:text-success-300 [&_a]:text-success [&_a]:hover:border-success [&_a]:focus-visible:outline-success [&_code]:text-success-600 dark:[&_code]:text-success-300 [&_code]:border-success/25 [&_a]:hover:[&>code]:border-success [&_a]:hover:[&>code]:text-success [&_a]:focus-visible:[&>code]:border-success [&_a]:focus-visible:[&>code]:text-success [&>ul]:marker:text-success/50",icon:"text-success",externalIcon:"text-success-600 dark:text-success-300"},info:{base:"border border-info/25 bg-info/10 text-info-600 dark:text-info-300 [&_a]:text-info [&_a]:hover:border-info [&_a]:focus-visible:outline-info [&_code]:text-info-600 dark:[&_code]:text-info-300 [&_code]:border-info/25 [&_a]:hover:[&>code]:border-info [&_a]:hover:[&>code]:text-info [&_a]:focus-visible:[&>code]:border-info [&_a]:focus-visible:[&>code]:text-info [&>ul]:marker:text-info/50",icon:"text-info",externalIcon:"text-info-600 dark:text-info-300"},warning:{base:"border border-warning/25 bg-warning/10 text-warning-600 dark:text-warning-300 [&_a]:text-warning [&_a]:hover:border-warning [&_a]:focus-visible:outline-warning [&_code]:text-warning-600 dark:[&_code]:text-warning-300 [&_code]:border-warning/25 [&_a]:hover:[&>code]:border-warning [&_a]:hover:[&>code]:text-warning [&_a]:focus-visible:[&>code]:border-warning [&_a]:focus-visible:[&>code]:text-warning [&>ul]:marker:text-warning/50",icon:"text-warning",externalIcon:"text-warning-600 dark:text-warning-300"},error:{base:"border border-error/25 bg-error/10 text-error-600 dark:text-error-300 [&_a]:text-error [&_a]:hover:border-error [&_a]:focus-visible:outline-error [&_code]:text-error-600 dark:[&_code]:text-error-300 [&_code]:border-error/25 [&_a]:hover:[&>code]:border-error [&_a]:hover:[&>code]:text-error [&_a]:focus-visible:[&>code]:border-error [&_a]:focus-visible:[&>code]:text-error [&>ul]:marker:text-error/50",icon:"text-error",externalIcon:"text-error-600 dark:text-error-300"},neutral:{base:"border border-muted bg-muted text-default",icon:"text-highlighted",externalIcon:"text-dimmed"}},to:{true:"border-dashed"}},compoundVariants:[{color:"primary",to:!0,class:{base:"hover:border-primary has-focus-visible:border-primary",externalIcon:"group-hover:text-primary"}},{color:"secondary",to:!0,class:{base:"hover:border-secondary has-focus-visible:border-secondary",externalIcon:"group-hover:text-secondary"}},{color:"success",to:!0,class:{base:"hover:border-success has-focus-visible:border-success",externalIcon:"group-hover:text-success"}},{color:"info",to:!0,class:{base:"hover:border-info has-focus-visible:border-info",externalIcon:"group-hover:text-info"}},{color:"warning",to:!0,class:{base:"hover:border-warning has-focus-visible:border-warning",externalIcon:"group-hover:text-warning"}},{color:"error",to:!0,class:{base:"hover:border-error has-focus-visible:border-error",externalIcon:"group-hover:text-error"}},{color:"neutral",to:!0,class:{base:"hover:border-inverted has-focus-visible:border-inverted",externalIcon:"group-hover:text-highlighted"}}],defaultVariants:{color:"neutral"}},q=Object.assign({inheritAttrs:!1},{__name:"ProseCallout",props:{to:{type:null,required:!1},target:{type:[String,Object,null],required:!1},icon:{type:null,required:!1},color:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(r){const e=r,n=v(),t=u(()=>x({extend:x(k),...n.ui?.prose?.callout||{}})({color:e.color,to:!!e.to})),i=u(()=>e.target||(e.to&&typeof e.to=="string"&&e.to.startsWith("http")?"_blank":void 0));return(d,l)=>(o(),_("div",{class:c(t.value.base({class:e.class}))},[r.to?(o(),a(g,p({key:0},{to:r.to,target:i.value,...d.$attrs},{class:"focus:outline-none",raw:""}),{default:m(()=>[...l[0]||(l[0]=[y("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1)])]),_:1},16)):s("",!0),r.icon?(o(),a(b,{key:1,name:r.icon,class:c(t.value.icon({class:e.ui?.icon}))},null,8,["name","class"])):s("",!0),r.to&&i.value==="_blank"?(o(),a(b,{key:2,name:h(n).ui.icons.external,class:c(t.value.externalIcon({class:e.ui?.externalIcon}))},null,8,["name","class"])):s("",!0),f(d.$slots,"default",{mdcUnwrap:"p"})],2))}});export{q as default};
@@ -1 +1 @@
1
- import{ax as u,W as p,i as v,M as t,o as d,ac as m,aa as f,r as c,$ as o,ap as l}from"./BOCn_SGf.js";const w={slots:{root:"my-5",preview:"flex justify-center border border-muted relative p-4 rounded-md",code:"[&>div>pre]:rounded-t-none [&>div]:my-0"},variants:{code:{true:{preview:"border-b-0 rounded-b-none"}}}},C={__name:"ProseCodePreview",props:{class:{type:null,required:!1},ui:{type:null,required:!1}},setup(n){const e=n,r=u(),i=p(),s=v(()=>l({extend:l(w),...i.ui?.prose?.codePreview||{}})({code:!!r.code}));return(a,y)=>(d(),t("div",{class:o(s.value.root({class:[e.ui?.root,e.class]}))},[m("div",{class:o(s.value.preview({class:[e.ui?.preview]}))},[c(a.$slots,"default")],2),r.code?(d(),t("div",{key:0,class:o(s.value.code({class:[e.ui?.code]}))},[c(a.$slots,"code")],2)):f("",!0)],2))}};export{C as default};
1
+ import{ax as u,W as p,i as v,M as t,o as d,ac as m,aa as f,r as c,$ as o,ap as l}from"./CBqC92gC.js";const w={slots:{root:"my-5",preview:"flex justify-center border border-muted relative p-4 rounded-md",code:"[&>div>pre]:rounded-t-none [&>div]:my-0"},variants:{code:{true:{preview:"border-b-0 rounded-b-none"}}}},C={__name:"ProseCodePreview",props:{class:{type:null,required:!1},ui:{type:null,required:!1}},setup(n){const e=n,r=u(),i=p(),s=v(()=>l({extend:l(w),...i.ui?.prose?.codePreview||{}})({code:!!r.code}));return(a,y)=>(d(),t("div",{class:o(s.value.root({class:[e.ui?.root,e.class]}))},[m("div",{class:o(s.value.preview({class:[e.ui?.preview]}))},[c(a.$slots,"default")],2),r.code?(d(),t("div",{key:0,class:o(s.value.code({class:[e.ui?.code]}))},[c(a.$slots,"code")],2)):f("",!0)],2))}};export{C as default};
@@ -1 +1 @@
1
- import{ax as $,W as T,aG as _,aH as C,i as P,ap as p,e as F,c as o,o as s,w as d,Z as y,M as v,aa as g,a as r,$ as c,r as u,al as x,am as m,_ as H,aF as K,m as f,a1 as z,ab as k,af as w}from"./BOCn_SGf.js";import{T as M,a as N,b as E,c as L,d as O}from"./DhSvBSt3.js";import{_ as R}from"./BhhMUror.js";const j={slots:{root:"flex items-center gap-2",list:"relative flex p-1 group",indicator:"absolute transition-[translate,width] duration-200",trigger:["group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",label:"truncate",trailingBadge:"shrink-0",trailingBadgeSize:"sm",content:"focus:outline-none w-full"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{pill:{list:"bg-elevated rounded-lg",trigger:"grow",indicator:"rounded-md shadow-xs"},link:{list:"border-default",indicator:"rounded-full",trigger:"focus:outline-none"}},orientation:{horizontal:{root:"flex-col",list:"w-full",indicator:"left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",trigger:"justify-center"},vertical:{list:"flex-col",indicator:"top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"}},size:{xs:{trigger:"px-2 py-1 text-xs gap-1",leadingIcon:"size-4",leadingAvatarSize:"3xs"},sm:{trigger:"px-2.5 py-1.5 text-xs gap-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs"},md:{trigger:"px-3 py-1.5 text-sm gap-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs"},lg:{trigger:"px-3 py-2 text-sm gap-2",leadingIcon:"size-5",leadingAvatarSize:"2xs"},xl:{trigger:"px-3 py-2 text-base gap-2",leadingIcon:"size-6",leadingAvatarSize:"xs"}}},compoundVariants:[{orientation:"horizontal",variant:"pill",class:{indicator:"inset-y-1"}},{orientation:"horizontal",variant:"link",class:{list:"border-b -mb-px",indicator:"-bottom-px h-px"}},{orientation:"vertical",variant:"pill",class:{indicator:"inset-x-1",list:"items-center"}},{orientation:"vertical",variant:"link",class:{list:"border-s -ms-px",indicator:"-start-px w-px"}},{color:"primary",variant:"pill",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"}},{color:"secondary",variant:"pill",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"}},{color:"success",variant:"pill",class:{indicator:"bg-success",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success"}},{color:"info",variant:"pill",class:{indicator:"bg-info",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"}},{color:"warning",variant:"pill",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"}},{color:"error",variant:"pill",class:{indicator:"bg-error",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-error"}},{color:"neutral",variant:"pill",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"}},{color:"primary",variant:"link",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-primary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"}},{color:"secondary",variant:"link",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-secondary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"}},{color:"success",variant:"link",class:{indicator:"bg-success",trigger:"data-[state=active]:text-success focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"}},{color:"info",variant:"link",class:{indicator:"bg-info",trigger:"data-[state=active]:text-info focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"}},{color:"warning",variant:"link",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-warning focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"}},{color:"error",variant:"link",class:{indicator:"bg-error",trigger:"data-[state=active]:text-error focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"}},{color:"neutral",variant:"link",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-highlighted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"}}],defaultVariants:{color:"primary",variant:"pill",size:"md"}},Z={__name:"UTabs",props:{as:{type:null,required:!1},items:{type:Array,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},content:{type:Boolean,required:!1,default:!0},labelKey:{type:null,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:null,required:!1},defaultValue:{type:null,required:!1,default:"0"},modelValue:{type:null,required:!1},activationMode:{type:String,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:["update:modelValue"],setup(l,{expose:S,emit:h}){const a=l,A=h,q=$(),B=T(),I=_(C(a,"as","unmountOnHide"),A),i=P(()=>p({extend:p(j),...B.ui?.tabs||{}})({color:a.color,variant:a.variant,size:a.size,orientation:a.orientation})),b=F([]);return S({triggersRef:b}),(n,D)=>(s(),o(r(O),f(r(I),{"model-value":l.modelValue,"default-value":l.defaultValue,orientation:l.orientation,"activation-mode":l.activationMode,"data-slot":"root",class:i.value.root({class:[a.ui?.root,a.class]})}),{default:d(()=>[y(r(M),{"data-slot":"list",class:c(i.value.list({class:a.ui?.list}))},{default:d(()=>[y(r(N),{"data-slot":"indicator",class:c(i.value.indicator({class:a.ui?.indicator}))},null,8,["class"]),u(n.$slots,"list-leading"),(s(!0),v(x,null,m(l.items,(e,t)=>(s(),o(r(E),{key:t,ref_for:!0,ref:V=>b.value[t]=V,value:e.value??String(t),disabled:e.disabled,"data-slot":"trigger",class:c(i.value.trigger({class:[a.ui?.trigger,e.ui?.trigger]}))},{default:d(()=>[u(n.$slots,"leading",{item:e,index:t,ui:i.value},()=>[e.icon?(s(),o(H,{key:0,name:e.icon,"data-slot":"leadingIcon",class:c(i.value.leadingIcon({class:[a.ui?.leadingIcon,e.ui?.leadingIcon]}))},null,8,["name","class"])):e.avatar?(s(),o(K,f({key:1,size:e.ui?.leadingAvatarSize||a.ui?.leadingAvatarSize||i.value.leadingAvatarSize()},{ref_for:!0},e.avatar,{"data-slot":"leadingAvatar",class:i.value.leadingAvatar({class:[a.ui?.leadingAvatar,e.ui?.leadingAvatar]})}),null,16,["size","class"])):g("",!0)]),r(z)(e,a.labelKey)||q.default?(s(),v("span",{key:0,"data-slot":"label",class:c(i.value.label({class:[a.ui?.label,e.ui?.label]}))},[u(n.$slots,"default",{item:e,index:t},()=>[k(w(r(z)(e,a.labelKey)),1)])],2)):g("",!0),u(n.$slots,"trailing",{item:e,index:t,ui:i.value},()=>[e.badge||e.badge===0?(s(),o(R,f({key:0,color:"neutral",variant:"outline",size:e.ui?.trailingBadgeSize||a.ui?.trailingBadgeSize||i.value.trailingBadgeSize()},{ref_for:!0},typeof e.badge=="string"||typeof e.badge=="number"?{label:e.badge}:e.badge,{"data-slot":"trailingBadge",class:i.value.trailingBadge({class:[a.ui?.trailingBadge,e.ui?.trailingBadge]})}),null,16,["size","class"])):g("",!0)])]),_:2},1032,["value","disabled","class"]))),128)),u(n.$slots,"list-trailing")]),_:3},8,["class"]),l.content?(s(!0),v(x,{key:0},m(l.items,(e,t)=>(s(),o(r(L),{key:t,value:e.value??String(t),"data-slot":"content",class:c(i.value.content({class:[a.ui?.content,e.ui?.content,e.class]}))},{default:d(()=>[u(n.$slots,e.slot||"content",{item:e,index:t,ui:i.value},()=>[k(w(e.content),1)])]),_:2},1032,["value","class"]))),128)):g("",!0)]),_:3},16,["model-value","default-value","orientation","activation-mode","class"]))}};export{Z as _};
1
+ import{ax as $,W as T,aG as _,aH as C,i as P,ap as p,e as F,c as o,o as s,w as d,Z as y,M as v,aa as g,a as r,$ as c,r as u,al as x,am as m,_ as H,aF as K,m as f,a1 as z,ab as k,af as w}from"./CBqC92gC.js";import{T as M,a as N,b as E,c as L,d as O}from"./RF9kzKHY.js";import{_ as R}from"./BPfVf7kt.js";const j={slots:{root:"flex items-center gap-2",list:"relative flex p-1 group",indicator:"absolute transition-[translate,width] duration-200",trigger:["group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",label:"truncate",trailingBadge:"shrink-0",trailingBadgeSize:"sm",content:"focus:outline-none w-full"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{pill:{list:"bg-elevated rounded-lg",trigger:"grow",indicator:"rounded-md shadow-xs"},link:{list:"border-default",indicator:"rounded-full",trigger:"focus:outline-none"}},orientation:{horizontal:{root:"flex-col",list:"w-full",indicator:"left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",trigger:"justify-center"},vertical:{list:"flex-col",indicator:"top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"}},size:{xs:{trigger:"px-2 py-1 text-xs gap-1",leadingIcon:"size-4",leadingAvatarSize:"3xs"},sm:{trigger:"px-2.5 py-1.5 text-xs gap-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs"},md:{trigger:"px-3 py-1.5 text-sm gap-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs"},lg:{trigger:"px-3 py-2 text-sm gap-2",leadingIcon:"size-5",leadingAvatarSize:"2xs"},xl:{trigger:"px-3 py-2 text-base gap-2",leadingIcon:"size-6",leadingAvatarSize:"xs"}}},compoundVariants:[{orientation:"horizontal",variant:"pill",class:{indicator:"inset-y-1"}},{orientation:"horizontal",variant:"link",class:{list:"border-b -mb-px",indicator:"-bottom-px h-px"}},{orientation:"vertical",variant:"pill",class:{indicator:"inset-x-1",list:"items-center"}},{orientation:"vertical",variant:"link",class:{list:"border-s -ms-px",indicator:"-start-px w-px"}},{color:"primary",variant:"pill",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"}},{color:"secondary",variant:"pill",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"}},{color:"success",variant:"pill",class:{indicator:"bg-success",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success"}},{color:"info",variant:"pill",class:{indicator:"bg-info",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"}},{color:"warning",variant:"pill",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"}},{color:"error",variant:"pill",class:{indicator:"bg-error",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-error"}},{color:"neutral",variant:"pill",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"}},{color:"primary",variant:"link",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-primary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"}},{color:"secondary",variant:"link",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-secondary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"}},{color:"success",variant:"link",class:{indicator:"bg-success",trigger:"data-[state=active]:text-success focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"}},{color:"info",variant:"link",class:{indicator:"bg-info",trigger:"data-[state=active]:text-info focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"}},{color:"warning",variant:"link",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-warning focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"}},{color:"error",variant:"link",class:{indicator:"bg-error",trigger:"data-[state=active]:text-error focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"}},{color:"neutral",variant:"link",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-highlighted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"}}],defaultVariants:{color:"primary",variant:"pill",size:"md"}},Z={__name:"UTabs",props:{as:{type:null,required:!1},items:{type:Array,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},content:{type:Boolean,required:!1,default:!0},labelKey:{type:null,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:null,required:!1},defaultValue:{type:null,required:!1,default:"0"},modelValue:{type:null,required:!1},activationMode:{type:String,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:["update:modelValue"],setup(l,{expose:S,emit:h}){const a=l,A=h,q=$(),B=T(),I=_(C(a,"as","unmountOnHide"),A),i=P(()=>p({extend:p(j),...B.ui?.tabs||{}})({color:a.color,variant:a.variant,size:a.size,orientation:a.orientation})),b=F([]);return S({triggersRef:b}),(n,D)=>(s(),o(r(O),f(r(I),{"model-value":l.modelValue,"default-value":l.defaultValue,orientation:l.orientation,"activation-mode":l.activationMode,"data-slot":"root",class:i.value.root({class:[a.ui?.root,a.class]})}),{default:d(()=>[y(r(M),{"data-slot":"list",class:c(i.value.list({class:a.ui?.list}))},{default:d(()=>[y(r(N),{"data-slot":"indicator",class:c(i.value.indicator({class:a.ui?.indicator}))},null,8,["class"]),u(n.$slots,"list-leading"),(s(!0),v(x,null,m(l.items,(e,t)=>(s(),o(r(E),{key:t,ref_for:!0,ref:V=>b.value[t]=V,value:e.value??String(t),disabled:e.disabled,"data-slot":"trigger",class:c(i.value.trigger({class:[a.ui?.trigger,e.ui?.trigger]}))},{default:d(()=>[u(n.$slots,"leading",{item:e,index:t,ui:i.value},()=>[e.icon?(s(),o(H,{key:0,name:e.icon,"data-slot":"leadingIcon",class:c(i.value.leadingIcon({class:[a.ui?.leadingIcon,e.ui?.leadingIcon]}))},null,8,["name","class"])):e.avatar?(s(),o(K,f({key:1,size:e.ui?.leadingAvatarSize||a.ui?.leadingAvatarSize||i.value.leadingAvatarSize()},{ref_for:!0},e.avatar,{"data-slot":"leadingAvatar",class:i.value.leadingAvatar({class:[a.ui?.leadingAvatar,e.ui?.leadingAvatar]})}),null,16,["size","class"])):g("",!0)]),r(z)(e,a.labelKey)||q.default?(s(),v("span",{key:0,"data-slot":"label",class:c(i.value.label({class:[a.ui?.label,e.ui?.label]}))},[u(n.$slots,"default",{item:e,index:t},()=>[k(w(r(z)(e,a.labelKey)),1)])],2)):g("",!0),u(n.$slots,"trailing",{item:e,index:t,ui:i.value},()=>[e.badge||e.badge===0?(s(),o(R,f({key:0,color:"neutral",variant:"outline",size:e.ui?.trailingBadgeSize||a.ui?.trailingBadgeSize||i.value.trailingBadgeSize()},{ref_for:!0},typeof e.badge=="string"||typeof e.badge=="number"?{label:e.badge}:e.badge,{"data-slot":"trailingBadge",class:i.value.trailingBadge({class:[a.ui?.trailingBadge,e.ui?.trailingBadge]})}),null,16,["size","class"])):g("",!0)])]),_:2},1032,["value","disabled","class"]))),128)),u(n.$slots,"list-trailing")]),_:3},8,["class"]),l.content?(s(!0),v(x,{key:0},m(l.items,(e,t)=>(s(),o(r(L),{key:t,value:e.value??String(t),"data-slot":"content",class:c(i.value.content({class:[a.ui?.content,e.ui?.content,e.class]}))},{default:d(()=>[u(n.$slots,e.slot||"content",{item:e,index:t,ui:i.value},()=>[k(w(e.content),1)])]),_:2},1032,["value","class"]))),128)):g("",!0)]),_:3},16,["model-value","default-value","orientation","activation-mode","class"]))}};export{Z as _};
@@ -1 +1 @@
1
- import{d as y,u as m,c as p,o as f,w as d,r as v,m as g,a as e,P as O,C as P,T as B,Z as E,bF as $,bG as q,e as F,bg as A,aa as M}from"./BOCn_SGf.js";import{i as D}from"./BLdMRpJD.js";import{F as k,u as h,a as R}from"./C6Eoiclo.js";import{u as w}from"./DTR31rjp.js";import{g as K}from"./DZikIgHK.js";var T=y({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const l=i;m();const a=D();return(t,s)=>(f(),p(e(O),g(l,{type:t.as==="button"?"button":void 0,onClick:s[0]||(s[0]=c=>e(a).onOpenChange(!1))}),{default:d(()=>[v(t.$slots,"default")]),_:3},16,["type"]))}}),te=T,N=y({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:l}){const a=i,t=l,s=D(),{forwardRef:c,currentElement:_}=m();return s.titleId||=w(void 0,"reka-dialog-title"),s.descriptionId||=w(void 0,"reka-dialog-description"),P(()=>{s.contentElement=_,B()!==document.body&&(s.triggerElement.value=B())}),(n,r)=>(f(),p(e(k),{"as-child":"",loop:"",trapped:a.trapFocus,onMountAutoFocus:r[5]||(r[5]=o=>t("openAutoFocus",o)),onUnmountAutoFocus:r[6]||(r[6]=o=>t("closeAutoFocus",o))},{default:d(()=>[E(e($),g({id:e(s).contentId,ref:e(c),as:n.as,"as-child":n.asChild,"disable-outside-pointer-events":n.disableOutsidePointerEvents,role:"dialog","aria-describedby":e(s).descriptionId,"aria-labelledby":e(s).titleId,"data-state":e(K)(e(s).open.value)},n.$attrs,{onDismiss:r[0]||(r[0]=o=>e(s).onOpenChange(!1)),onEscapeKeyDown:r[1]||(r[1]=o=>t("escapeKeyDown",o)),onFocusOutside:r[2]||(r[2]=o=>t("focusOutside",o)),onInteractOutside:r[3]||(r[3]=o=>t("interactOutside",o)),onPointerDownOutside:r[4]||(r[4]=o=>t("pointerDownOutside",o))}),{default:d(()=>[v(n.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),I=N,S=y({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:l}){const a=i,t=l,s=D(),c=q(t),{forwardRef:_,currentElement:n}=m();return h(n),(r,o)=>(f(),p(I,g({...a,...e(c)},{ref:e(_),"trap-focus":e(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:o[0]||(o[0]=u=>{u.defaultPrevented||(u.preventDefault(),e(s).triggerElement.value?.focus())}),onPointerDownOutside:o[1]||(o[1]=u=>{const C=u.detail.originalEvent,b=C.button===0&&C.ctrlKey===!0;(C.button===2||b)&&u.preventDefault()}),onFocusOutside:o[2]||(o[2]=u=>{u.preventDefault()})}),{default:d(()=>[v(r.$slots,"default")]),_:3},16,["trap-focus"]))}}),L=S,V=y({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:l}){const a=i,s=q(l);m();const c=D(),_=F(!1),n=F(!1);return(r,o)=>(f(),p(I,g({...a,...e(s)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:o[0]||(o[0]=u=>{u.defaultPrevented||(_.value||e(c).triggerElement.value?.focus(),u.preventDefault()),_.value=!1,n.value=!1}),onInteractOutside:o[1]||(o[1]=u=>{u.defaultPrevented||(_.value=!0,u.detail.originalEvent.type==="pointerdown"&&(n.value=!0));const C=u.target;e(c).triggerElement.value?.contains(C)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&n.value&&u.preventDefault()})}),{default:d(()=>[v(r.$slots,"default")]),_:3},16))}}),j=V,G=y({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:l}){const a=i,t=l,s=D(),c=q(t),{forwardRef:_}=m();return(n,r)=>(f(),p(e(A),{present:n.forceMount||e(s).open.value},{default:d(()=>[e(s).modal.value?(f(),p(L,g({key:0,ref:e(_)},{...a,...e(c),...n.$attrs}),{default:d(()=>[v(n.$slots,"default")]),_:3},16)):(f(),p(j,g({key:1,ref:e(_)},{...a,...e(c),...n.$attrs}),{default:d(()=>[v(n.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),oe=G,H=y({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(i){const l=i;m();const a=D();return(t,s)=>(f(),p(e(O),g(l,{id:e(a).descriptionId}),{default:d(()=>[v(t.$slots,"default")]),_:3},16,["id"]))}}),se=H,U=y({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const l=D();return R(!0),m(),(a,t)=>(f(),p(e(O),{as:a.as,"as-child":a.asChild,"data-state":e(l).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:d(()=>[v(a.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Z=U,z=y({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const l=D(),{forwardRef:a}=m();return(t,s)=>e(l)?.modal.value?(f(),p(e(A),{key:0,present:t.forceMount||e(l).open.value},{default:d(()=>[E(Z,g(t.$attrs,{ref:e(a),as:t.as,"as-child":t.asChild}),{default:d(()=>[v(t.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):M("v-if",!0)}}),ae=z,J=y({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(i){const l=i,a=D();return m(),(t,s)=>(f(),p(e(O),g(l,{id:e(a).titleId}),{default:d(()=>[v(t.$slots,"default")]),_:3},16,["id"]))}}),re=J;export{oe as D,re as a,se as b,te as c,ae as d};
1
+ import{d as y,u as m,c as p,o as f,w as d,r as v,m as g,a as e,P as O,C as P,T as B,Z as E,bF as $,bG as q,e as F,bg as A,aa as M}from"./CBqC92gC.js";import{i as D}from"./DvZW6QuM.js";import{F as k,u as h,a as R}from"./Cyo4VJ6S.js";import{u as w}from"./BoqEl-F1.js";import{g as K}from"./CN_jZBEh.js";var T=y({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const l=i;m();const a=D();return(t,s)=>(f(),p(e(O),g(l,{type:t.as==="button"?"button":void 0,onClick:s[0]||(s[0]=c=>e(a).onOpenChange(!1))}),{default:d(()=>[v(t.$slots,"default")]),_:3},16,["type"]))}}),te=T,N=y({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:l}){const a=i,t=l,s=D(),{forwardRef:c,currentElement:_}=m();return s.titleId||=w(void 0,"reka-dialog-title"),s.descriptionId||=w(void 0,"reka-dialog-description"),P(()=>{s.contentElement=_,B()!==document.body&&(s.triggerElement.value=B())}),(n,r)=>(f(),p(e(k),{"as-child":"",loop:"",trapped:a.trapFocus,onMountAutoFocus:r[5]||(r[5]=o=>t("openAutoFocus",o)),onUnmountAutoFocus:r[6]||(r[6]=o=>t("closeAutoFocus",o))},{default:d(()=>[E(e($),g({id:e(s).contentId,ref:e(c),as:n.as,"as-child":n.asChild,"disable-outside-pointer-events":n.disableOutsidePointerEvents,role:"dialog","aria-describedby":e(s).descriptionId,"aria-labelledby":e(s).titleId,"data-state":e(K)(e(s).open.value)},n.$attrs,{onDismiss:r[0]||(r[0]=o=>e(s).onOpenChange(!1)),onEscapeKeyDown:r[1]||(r[1]=o=>t("escapeKeyDown",o)),onFocusOutside:r[2]||(r[2]=o=>t("focusOutside",o)),onInteractOutside:r[3]||(r[3]=o=>t("interactOutside",o)),onPointerDownOutside:r[4]||(r[4]=o=>t("pointerDownOutside",o))}),{default:d(()=>[v(n.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),I=N,S=y({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:l}){const a=i,t=l,s=D(),c=q(t),{forwardRef:_,currentElement:n}=m();return h(n),(r,o)=>(f(),p(I,g({...a,...e(c)},{ref:e(_),"trap-focus":e(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:o[0]||(o[0]=u=>{u.defaultPrevented||(u.preventDefault(),e(s).triggerElement.value?.focus())}),onPointerDownOutside:o[1]||(o[1]=u=>{const C=u.detail.originalEvent,b=C.button===0&&C.ctrlKey===!0;(C.button===2||b)&&u.preventDefault()}),onFocusOutside:o[2]||(o[2]=u=>{u.preventDefault()})}),{default:d(()=>[v(r.$slots,"default")]),_:3},16,["trap-focus"]))}}),L=S,V=y({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:l}){const a=i,s=q(l);m();const c=D(),_=F(!1),n=F(!1);return(r,o)=>(f(),p(I,g({...a,...e(s)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:o[0]||(o[0]=u=>{u.defaultPrevented||(_.value||e(c).triggerElement.value?.focus(),u.preventDefault()),_.value=!1,n.value=!1}),onInteractOutside:o[1]||(o[1]=u=>{u.defaultPrevented||(_.value=!0,u.detail.originalEvent.type==="pointerdown"&&(n.value=!0));const C=u.target;e(c).triggerElement.value?.contains(C)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&n.value&&u.preventDefault()})}),{default:d(()=>[v(r.$slots,"default")]),_:3},16))}}),j=V,G=y({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:l}){const a=i,t=l,s=D(),c=q(t),{forwardRef:_}=m();return(n,r)=>(f(),p(e(A),{present:n.forceMount||e(s).open.value},{default:d(()=>[e(s).modal.value?(f(),p(L,g({key:0,ref:e(_)},{...a,...e(c),...n.$attrs}),{default:d(()=>[v(n.$slots,"default")]),_:3},16)):(f(),p(j,g({key:1,ref:e(_)},{...a,...e(c),...n.$attrs}),{default:d(()=>[v(n.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),oe=G,H=y({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(i){const l=i;m();const a=D();return(t,s)=>(f(),p(e(O),g(l,{id:e(a).descriptionId}),{default:d(()=>[v(t.$slots,"default")]),_:3},16,["id"]))}}),se=H,U=y({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const l=D();return R(!0),m(),(a,t)=>(f(),p(e(O),{as:a.as,"as-child":a.asChild,"data-state":e(l).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:d(()=>[v(a.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Z=U,z=y({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const l=D(),{forwardRef:a}=m();return(t,s)=>e(l)?.modal.value?(f(),p(e(A),{key:0,present:t.forceMount||e(l).open.value},{default:d(()=>[E(Z,g(t.$attrs,{ref:e(a),as:t.as,"as-child":t.asChild}),{default:d(()=>[v(t.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):M("v-if",!0)}}),ae=z,J=y({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(i){const l=i,a=D();return m(),(t,s)=>(f(),p(e(O),g(l,{id:e(a).titleId}),{default:d(()=>[v(t.$slots,"default")]),_:3},16,["id"]))}}),re=J;export{oe as D,re as a,se as b,te as c,ae as d};
@@ -1 +1 @@
1
- import{d as le,aQ as ua,c as F,o as N,a as w,e as S,i as j,F as ge,w as z,r as H,ao as da,a$ as ca,M as me,ac as He,aG as Le,m as We,ax as ze,aR as va,g as fa,h as ee,C as je,b7 as pa,a5 as ma,B as Ue,W as ha,aH as ya,aI as ga,au as Pe,ap as ke,aa as M,Z as Re,$ as Y,aL as Ee,aM as Ce,aJ as wa,aK as ba,ab as ce,af as ve,aY as $a}from"./BOCn_SGf.js";import{d as Sa,D as xa,a as Ne,b as Ae}from"./V04-MrLN.js";import{b as Ba,D as Da,a as Ta}from"./BLdMRpJD.js";(function(){var e;try{if(typeof document<"u"){var t=document.createElement("style");t.nonce=(e=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:e.content,t.appendChild(document.createTextNode('[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}')),document.head.appendChild(t)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();const Oa=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Pa=e=>typeof e<"u";function ka(e){return JSON.parse(JSON.stringify(e))}function Ie(e,t,n,s={}){var a,h,d;const{clone:c=!1,passive:$=!1,eventName:D,deep:y=!1,defaultValue:o,shouldEmit:l}=s,g=fa(),m=n||g?.emit||((a=g?.$emit)==null?void 0:a.bind(g))||((d=(h=g?.proxy)==null?void 0:h.$emit)==null?void 0:d.bind(g?.proxy));let v=D;t||(t="modelValue"),v=v||`update:${t.toString()}`;const L=r=>c?typeof c=="function"?c(r):ka(r):r,I=()=>Pa(e[t])?L(e[t]):o,p=r=>{l?l(r)&&m(v,r):m(v,r)};if($){const r=I(),u=S(r);let f=!1;return ee(()=>e[t],x=>{f||(f=!0,u.value=L(x),Ue(()=>f=!1))}),ee(u,x=>{!f&&(x!==e[t]||y)&&p(x)},{deep:y}),u}else return j({get(){return I()},set(r){p(r)}})}const[oe,Ra]=ua("DrawerRoot"),Me=new WeakMap;function E(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;const s={};Object.entries(t).forEach(([a,h])=>{if(a.startsWith("--")){e.style.setProperty(a,h);return}s[a]=e.style[a],e.style[a]=h}),!n&&Me.set(e,s)}function Ea(e,t){if(!e||!(e instanceof HTMLElement))return;const n=Me.get(e);n&&Object.entries(n).forEach(([s,a])=>{e.style[s]=a})}function fe(e,t){const n=window.getComputedStyle(e),s=n.transform||n.webkitTransform||n.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?Number.parseFloat(a[1].split(", ")[k(t)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?Number.parseFloat(a[1].split(", ")[k(t)?5:4]):null)}function Ca(e){return 8*(Math.log(e+1)-2)}function k(e){switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}}function ye(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Na(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const O={DURATION:.5,EASE:[.32,.72,0,1]},Ve=.4,Aa=.25,Ia=100,Ye=8,pe=16,Xe=26,qe="vaul-dragging";function qa({activeSnapPoint:e,snapPoints:t,drawerRef:n,overlayRef:s,fadeFromIndex:a,onSnapPointChange:h,direction:d}){const c=S(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function $(){c.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}je(()=>{typeof window<"u"&&window.addEventListener("resize",$)}),pa(()=>{typeof window<"u"&&window.removeEventListener("resize",$)});const D=j(()=>(t.value&&e.value===t.value[t.value.length-1])??null),y=j(()=>t.value&&t.value.length>0&&(a?.value||a?.value===0)&&!Number.isNaN(a?.value)&&t.value[a?.value??-1]===e.value||!t.value),o=j(()=>{var p;return((p=t.value)==null?void 0:p.findIndex(r=>r===e.value))??null}),l=j(()=>{var p;return((p=t.value)==null?void 0:p.map(r=>{const u=typeof r=="string";let f=0;if(u&&(f=Number.parseInt(r,10)),k(d.value)){const B=u?f:c.value?r*c.value.innerHeight:0;return c.value?d.value==="bottom"?c.value.innerHeight-B:-c.value.innerHeight+B:B}const x=u?f:c.value?r*c.value.innerWidth:0;return c.value?d.value==="right"?c.value.innerWidth-x:-c.value.innerWidth+x:x}))??[]}),g=j(()=>{var p;return o.value!==null?(p=l.value)==null?void 0:p[o.value]:null}),m=p=>{var r,u,f,x;const B=((r=l.value)==null?void 0:r.findIndex(W=>W===p))??null;Ue(()=>{var W;h(B,l.value),E((W=n.value)==null?void 0:W.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:k(d.value)?`translate3d(0, ${p}px, 0)`:`translate3d(${p}px, 0, 0)`})}),l.value&&B!==l.value.length-1&&B!==a?.value?E((u=s.value)==null?void 0:u.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"0"}):E((f=s.value)==null?void 0:f.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"1"}),e.value=B!==null?((x=t.value)==null?void 0:x[B])??null:null};ee([e,l,t],()=>{var p;if(e.value){const r=((p=t.value)==null?void 0:p.findIndex(u=>u===e.value))??-1;l.value&&r!==-1&&typeof l.value[r]=="number"&&m(l.value[r])}},{immediate:!0});function v({draggedDistance:p,closeDrawer:r,velocity:u,dismissible:f}){var x,B,W;if(a.value===void 0)return;const G=d.value==="bottom"||d.value==="right"?(g.value??0)-p:(g.value??0)+p,re=o.value===a.value-1,_=o.value===0,X=p>0;if(re&&E((x=s.value)==null?void 0:x.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`}),u>2&&!X){f?r():m(l.value[0]);return}if(u>2&&X&&l&&t.value){m(l.value[t.value.length-1]);return}const ae=(B=l.value)==null?void 0:B.reduce((V,b)=>typeof V!="number"||typeof b!="number"?V:Math.abs(b-G)<Math.abs(V-G)?b:V),J=k(d.value)?window.innerHeight:window.innerWidth;if(u>Ve&&Math.abs(p)<J*.4){const V=X?1:-1;if(V>0&&D){m(l.value[(((W=t.value)==null?void 0:W.length)??0)-1]);return}if(_&&V<0&&f&&r(),o.value===null)return;m(l.value[o.value+V]);return}m(ae)}function L({draggedDistance:p}){var r;if(g.value===null)return;const u=d.value==="bottom"||d.value==="right"?g.value-p:g.value+p;(d.value==="bottom"||d.value==="right")&&u<l.value[l.value.length-1]||(d.value==="top"||d.value==="left")&&u>l.value[l.value.length-1]||E((r=n.value)==null?void 0:r.$el,{transform:k(d.value)?`translate3d(0, ${u}px, 0)`:`translate3d(${u}px, 0, 0)`})}function I(p,r){if(!t.value||typeof o.value!="number"||!l.value||a.value===void 0)return null;const u=o.value===a.value-1;if(o.value>=a.value&&r)return 0;if(u&&!r)return 1;if(!y.value&&!u)return null;const f=u?o.value+1:o.value-1,x=u?l.value[f]-l.value[f-1]:l.value[f+1]-l.value[f],B=p/Math.abs(x);return u?1-B:B}return{isLastSnapPoint:D,shouldFade:y,getPercentageDragged:I,activeSnapPointIndex:o,onRelease:v,onDrag:L,snapPointsOffset:l}}function Fe(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let ne=null;function Fa(e){const{isOpen:t,modal:n,nested:s,hasBeenOpened:a,preventScrollRestoration:h,noBodyStyles:d}=e,c=S(typeof window<"u"?window.location.href:""),$=S(0);function D(){if(Fe()&&ne===null&&t.value&&!d.value){ne={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:o,innerHeight:l}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-$.value}px`,left:`${-o}px`,right:"0px",height:"auto"}),setTimeout(()=>{requestAnimationFrame(()=>{const g=l-window.innerHeight;g&&$.value>=l&&(document.body.style.top=`-${$.value+g}px`)})},300)}}function y(){if(Fe()&&ne!==null&&!d.value){const o=-Number.parseInt(document.body.style.top,10),l=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,ne),window.requestAnimationFrame(()=>{if(h.value&&c.value!==window.location.href){c.value=window.location.href;return}window.scrollTo(l,o)}),ne=null}}return je(()=>{function o(){$.value=window.scrollY}o(),window.addEventListener("scroll",o),ma(()=>{window.removeEventListener("scroll",o)})}),ee([t,a,c],()=>{s.value||!a.value||(t.value?(window.matchMedia("(display-mode: standalone)").matches||D(),n.value||setTimeout(()=>{y()},500)):y())}),{restorePositionSetting:y}}function Ha(e,t){return e&&e.value?e:t}function La(e){const{emitDrag:t,emitRelease:n,emitClose:s,emitOpenChange:a,open:h,dismissible:d,nested:c,modal:$,shouldScaleBackground:D,setBackgroundColorOnScale:y,scrollLockTimeout:o,closeThreshold:l,activeSnapPoint:g,fadeFromIndex:m,direction:v,noBodyStyles:L,handleOnly:I,preventScrollRestoration:p}=e,r=S(h.value??!1),u=S(!1),f=S(!1),x=S(!1),B=S(null),W=S(null),G=S(null),re=S(null),_=S(null),X=S(!1),ae=S(null),J=S(0),V=S(!1);S(0);const b=S(null);S(0);const we=j(()=>{var i;return((i=b.value)==null?void 0:i.$el.getBoundingClientRect().height)||0}),q=Ha(e.snapPoints,S(void 0)),Ze=j(()=>{var i;return q&&(((i=q.value)==null?void 0:i.length)??0)>0}),Ke=S(null),{activeSnapPointIndex:be,onRelease:_e,snapPointsOffset:Je,onDrag:Qe,shouldFade:$e,getPercentageDragged:ea}=qa({snapPoints:q,activeSnapPoint:g,drawerRef:b,fadeFromIndex:m,overlayRef:B,onSnapPointChange:aa,direction:v});function aa(i,P){q.value&&i===P.length-1&&(W.value=new Date)}Fa({isOpen:r,modal:$,nested:c,hasBeenOpened:u,noBodyStyles:L,preventScrollRestoration:p});function ie(){return(window.innerWidth-Xe)/window.innerWidth}function Se(i,P){var R;if(!i)return!1;let T=i;const C=(R=window.getSelection())==null?void 0:R.toString(),A=b.value?fe(b.value.$el,v.value):null,U=new Date;if(T.hasAttribute("data-vaul-no-drag")||T.closest("[data-vaul-no-drag]"))return!1;if(v.value==="right"||v.value==="left")return!0;if(W.value&&U.getTime()-W.value.getTime()<500)return!1;if(A!==null&&(v.value==="bottom"?A>0:A<0))return!0;if(C&&C.length>0)return!1;if(_.value&&U.getTime()-_.value.getTime()<o.value&&A===0||P)return _.value=U,!1;for(;T;){if(T.scrollHeight>T.clientHeight){if(T.scrollTop!==0)return _.value=new Date,!1;if(T.getAttribute("role")==="dialog")return!0}T=T.parentNode}return!0}function ta(i){!d.value&&!q.value||b.value&&!b.value.$el.contains(i.target)||(f.value=!0,G.value=new Date,i.target.setPointerCapture(i.pointerId),J.value=k(v.value)?i.clientY:i.clientX)}function na(i){var P,R,T,C,A,U;if(b.value&&f.value){const Q=v.value==="bottom"||v.value==="right"?1:-1,se=(J.value-(k(v.value)?i.clientY:i.clientX))*Q,ue=se>0,Be=q.value&&!d.value&&!ue;if(Be&&be.value===0)return;const he=Math.abs(se),De=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let Z=he/we.value;const Te=ea(he,ue);if(Te!==null&&(Z=Te),Be&&Z>=1||!X.value&&!Se(i.target,ue))return;if((P=b?.value)==null||P.$el.classList.add(qe),X.value=!0,E((R=b.value)==null?void 0:R.$el,{transition:"none"}),E((T=B.value)==null?void 0:T.$el,{transition:"none"}),q.value&&Qe({draggedDistance:se}),ue&&!q.value){const K=Ca(se),de=Math.min(K*-1,0)*Q;E((C=b.value)==null?void 0:C.$el,{transform:k(v.value)?`translate3d(0, ${de}px, 0)`:`translate3d(${de}px, 0, 0)`});return}const sa=1-Z;if(($e.value||m.value&&be.value===m.value-1)&&(t(Z),E((A=B.value)==null?void 0:A.$el,{opacity:`${sa}`,transition:"none"},!0)),De&&B.value&&D.value){const K=Math.min(ie()+Z*(1-ie()),1),de=8-Z*8,Oe=Math.max(0,14-Z*14);E(De,{borderRadius:`${de}px`,transform:k(v.value)?`scale(${K}) translate3d(0, ${Oe}px, 0)`:`scale(${K}) translate3d(${Oe}px, 0, 0)`,transition:"none"},!0)}if(!q.value){const K=he*Q;E((U=b.value)==null?void 0:U.$el,{transform:k(v.value)?`translate3d(0, ${K}px, 0)`:`translate3d(${K}px, 0, 0)`})}}}function xe(){var i;if(!b.value)return;const P=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]"),R=fe(b.value.$el,v.value);E(b.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`}),E((i=B.value)==null?void 0:i.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"1"}),D.value&&R&&R>0&&r.value&&E(P,{borderRadius:`${Ye}px`,overflow:"hidden",...k(v.value)?{transform:`scale(${ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(",")})`},!0)}function te(i){b.value&&(s(),i||(r.value=!1),window.setTimeout(()=>{q.value&&(g.value=q.value[0])},O.DURATION*1e3))}ge(()=>{if(!r.value&&D.value&&Oa){const i=setTimeout(()=>{Ea(document.body)},200);return()=>clearTimeout(i)}}),ee(h,()=>{r.value=h.value,h.value||te()});function la(i){if(!f.value||!b.value)return;b.value.$el.classList.remove(qe),X.value=!1,f.value=!1,re.value=new Date;const P=fe(b.value.$el,v.value);if(!Se(i.target,!1)||!P||Number.isNaN(P)||G.value===null)return;const R=re.value.getTime()-G.value.getTime(),T=J.value-(k(v.value)?i.clientY:i.clientX),C=Math.abs(T)/R;if(C>.05&&(x.value=!0,window.setTimeout(()=>{x.value=!1},200)),q.value){const U=v.value==="bottom"||v.value==="right"?1:-1;_e({draggedDistance:T*U,closeDrawer:te,velocity:C,dismissible:d.value}),n(!0);return}if(v.value==="bottom"||v.value==="right"?T>0:T<0){xe(),n(!0);return}if(C>Ve){te(),n(!1);return}const A=Math.min(b.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(P>=A*l.value){te(),n(!1);return}n(!0),xe()}ee(r,i=>{i&&(W.value=new Date),a(i)},{immediate:!0});function oa(i){var P,R;const T=i?(window.innerWidth-pe)/window.innerWidth:1,C=i?-16:0;ae.value&&window.clearTimeout(ae.value),E((P=b.value)==null?void 0:P.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:`scale(${T}) translate3d(0, ${C}px, 0)`}),!i&&(R=b.value)!=null&&R.$el&&(ae.value=window.setTimeout(()=>{var A,U;const Q=fe((A=b.value)==null?void 0:A.$el,v.value);E((U=b.value)==null?void 0:U.$el,{transition:"none",transform:k(v.value)?`translate3d(0, ${Q}px, 0)`:`translate3d(${Q}px, 0, 0)`})},500))}function ra(i){var P;if(i<0)return;const R=k(v.value)?window.innerHeight:window.innerWidth,T=(R-pe)/R,C=T+i*(1-T),A=-16+i*pe;E((P=b.value)==null?void 0:P.$el,{transform:k(v.value)?`scale(${C}) translate3d(0, ${A}px, 0)`:`scale(${C}) translate3d(${A}px, 0, 0)`,transition:"none"})}function ia(i){var P;const R=k(v.value)?window.innerHeight:window.innerWidth,T=i?(R-pe)/R:1,C=i?-16:0;i&&E((P=b.value)==null?void 0:P.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:k(v.value)?`scale(${T}) translate3d(0, ${C}px, 0)`:`scale(${T}) translate3d(${C}px, 0, 0)`})}return{open:h,isOpen:r,modal:$,keyboardIsOpen:V,hasBeenOpened:u,drawerRef:b,drawerHeightRef:we,overlayRef:B,handleRef:Ke,isDragging:f,dragStartTime:G,isAllowedToDrag:X,snapPoints:q,activeSnapPoint:g,hasSnapPoints:Ze,pointerStart:J,dismissible:d,snapPointsOffset:Je,direction:v,shouldFade:$e,fadeFromIndex:m,shouldScaleBackground:D,setBackgroundColorOnScale:y,onPress:ta,onDrag:na,onRelease:la,closeDrawer:te,onNestedDrag:ra,onNestedRelease:ia,onNestedOpenChange:oa,emitClose:s,emitDrag:t,emitRelease:n,emitOpenChange:a,nested:c,handleOnly:I,noBodyStyles:L}}const Ge=le({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:Aa},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:Ia},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{expose:t,emit:n}){const s=e,a=n;ze();const h=j(()=>s.fadeFromIndex??(s.snapPoints&&s.snapPoints.length-1)),d=Ie(s,"open",a,{defaultValue:s.defaultOpen,passive:s.open===void 0}),c=Ie(s,"activeSnapPoint",a,{passive:s.activeSnapPoint===void 0}),$={emitDrag:m=>a("drag",m),emitRelease:m=>a("release",m),emitClose:()=>a("close"),emitOpenChange:m=>{a("update:open",m),setTimeout(()=>{a("animationEnd",m)},O.DURATION*1e3)}},{closeDrawer:D,hasBeenOpened:y,modal:o,isOpen:l}=Ra(La({...$,...va(s),activeSnapPoint:c,fadeFromIndex:h,open:d}));function g(m){if(d.value!==void 0){$.emitOpenChange(m);return}l.value=m,m?y.value=!0:D()}return t({open:l}),(m,v)=>(N(),F(w(Ba),{open:w(l),modal:w(o),"onUpdate:open":g},{default:z(()=>[H(m.$slots,"default",{open:w(l)})]),_:3},8,["open","modal"]))}}),Wa=le({__name:"DrawerRootNested",props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const n=e,s=t,{onNestedDrag:a,onNestedOpenChange:h,onNestedRelease:d}=oe();function c(){h(!1)}function $(o){a(o)}function D(o){o&&h(o),s("update:open",o)}const y=Le(n,s);return(o,l)=>(N(),F(Ge,We(w(y),{nested:"",onClose:c,onDrag:$,onRelease:w(d),"onUpdate:open":D}),{default:z(()=>[H(o.$slots,"default")]),_:3},16,["onRelease"]))}}),za=le({__name:"DrawerOverlay",setup(e){const{overlayRef:t,hasSnapPoints:n,isOpen:s,shouldFade:a}=oe();return(h,d)=>(N(),F(w(Sa),{ref_key:"overlayRef",ref:t,"data-vaul-overlay":"","data-vaul-snap-points":w(s)&&w(n)?"true":"false","data-vaul-snap-points-overlay":w(s)&&w(a)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),ja=()=>()=>{};function Ua(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:s,noBodyStyles:a}=oe(),h=S(null),d=S(document.body.style.backgroundColor);function c(){return(window.innerWidth-Xe)/window.innerWidth}ge($=>{if(t.value&&n.value){h.value&&clearTimeout(h.value);const D=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!D)return;Na(s.value&&!a.value?ye(document.body,{background:"black"}):ja,ye(D,{transformOrigin:k(e.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(",")})`}));const y=ye(D,{borderRadius:`${Ye}px`,overflow:"hidden",...k(e.value)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});$(()=>{y(),h.value=window.setTimeout(()=>{d.value?document.body.style.background=d.value:document.body.style.removeProperty("background")},O.DURATION*1e3)})}},{flush:"pre"})}const Ma=le({__name:"DrawerContent",setup(e){const{open:t,isOpen:n,snapPointsOffset:s,hasSnapPoints:a,drawerRef:h,onPress:d,onDrag:c,onRelease:$,modal:D,emitOpenChange:y,dismissible:o,keyboardIsOpen:l,closeDrawer:g,direction:m,handleOnly:v}=oe();Ua();const L=S(!1),I=j(()=>s.value&&s.value.length>0?`${s.value[0]}px`:"0");function p(f){if(!D.value||f.defaultPrevented){f.preventDefault();return}l.value&&(l.value=!1),o.value?y(!1):f.preventDefault()}function r(f){v.value||d(f)}function u(f){v.value||c(f)}return ge(()=>{a.value&&window.requestAnimationFrame(()=>{L.value=!0})}),(f,x)=>(N(),F(w(xa),{ref_key:"drawerRef",ref:h,"data-vaul-drawer":"","data-vaul-drawer-direction":w(m),"data-vaul-delayed-snap-points":L.value?"true":"false","data-vaul-snap-points":w(n)&&w(a)?"true":"false",style:ca({"--snap-point-height":I.value}),onPointerdown:r,onPointermove:u,onPointerup:w($),onPointerDownOutside:p,onOpenAutoFocus:x[0]||(x[0]=da(()=>{},["prevent"])),onEscapeKeyDown:x[1]||(x[1]=B=>{w(o)||B.preventDefault()})},{default:z(()=>[H(f.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),Va=["data-vaul-drawer-visible"],Ya={"data-vaul-handle-hitarea":"","aria-hidden":"true"},Xa=250,Ga=120,Za=le({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(e){const t=e,{onPress:n,onDrag:s,handleRef:a,handleOnly:h,isOpen:d,snapPoints:c,activeSnapPoint:$,isDragging:D,dismissible:y,closeDrawer:o}=oe(),l=S(null),g=S(!1);function m(){if(g.value){I();return}window.setTimeout(()=>{v()},Ga)}function v(){if(D.value||t.preventCycle||g.value){I();return}if(I(),!c.value||c.value.length===0){y.value||o();return}const u=$.value===c.value[c.value.length-1];if(u&&y.value){o();return}const f=c.value.findIndex(B=>B===$.value);if(f===-1)return;const x=u?0:f+1;$.value=c.value[x]}function L(){l.value=window.setTimeout(()=>{g.value=!0},Xa)}function I(){l.value&&window.clearTimeout(l.value),g.value=!1}function p(u){h.value&&n(u),L()}function r(u){h.value&&s(u)}return(u,f)=>(N(),me("div",{ref_key:"handleRef",ref:a,"data-vaul-drawer-visible":w(d)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:m,onPointercancel:I,onPointerdown:p,onPointermove:r},[He("span",Ya,[H(u.$slots,"default")])],40,Va))}}),Ka={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default ring ring-default flex focus:outline-none",handle:["shrink-0 !bg-accented","transition-opacity"],container:"w-full flex flex-col gap-4 p-4 overflow-y-auto",header:"",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"flex-1",footer:"flex flex-col gap-1.5"},variants:{direction:{top:{content:"mb-24 flex-col-reverse",handle:"mb-4"},right:{content:"flex-row",handle:"!ml-4"},bottom:{content:"mt-24 flex-col",handle:"mt-4"},left:{content:"flex-row-reverse",handle:"!mr-4"}},inset:{true:{content:"rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"}},snapPoints:{true:""}},compoundVariants:[{direction:["top","bottom"],class:{content:"h-auto max-h-[96%]",handle:"!w-12 !h-1.5 mx-auto"}},{direction:["top","bottom"],snapPoints:!0,class:{content:"h-full"}},{direction:["right","left"],class:{content:"w-auto max-w-[calc(100%-2rem)]",handle:"!h-12 !w-1.5 mt-auto mb-auto"}},{direction:["right","left"],snapPoints:!0,class:{content:"w-full"}},{direction:"top",inset:!0,class:{content:"inset-x-4 top-4"}},{direction:"top",inset:!1,class:{content:"inset-x-0 top-0 rounded-b-lg"}},{direction:"bottom",inset:!0,class:{content:"inset-x-4 bottom-4"}},{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-lg"}},{direction:"left",inset:!0,class:{content:"inset-y-4 left-4"}},{direction:"left",inset:!1,class:{content:"inset-y-0 left-0 rounded-r-lg"}},{direction:"right",inset:!0,class:{content:"inset-y-4 right-4"}},{direction:"right",inset:!1,class:{content:"inset-y-0 right-0 rounded-l-lg"}}]},et={__name:"UDrawer",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},inset:{type:Boolean,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},handle:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},nested:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},activeSnapPoint:{type:[Number,String,null],required:!1},closeThreshold:{type:Number,required:!1},shouldScaleBackground:{type:Boolean,required:!1},setBackgroundColorOnScale:{type:Boolean,required:!1},scrollLockTimeout:{type:Number,required:!1},fixed:{type:Boolean,required:!1},dismissible:{type:Boolean,required:!1,default:!0},modal:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},direction:{type:String,required:!1,default:"bottom"},noBodyStyles:{type:Boolean,required:!1},handleOnly:{type:Boolean,required:!1},preventScrollRestoration:{type:Boolean,required:!1},snapPoints:{type:Array,required:!1}},emits:["close:prevent","drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const n=e,s=t,a=ze(),h=ha(),d=Le(ya(n,"activeSnapPoint","closeThreshold","shouldScaleBackground","setBackgroundColorOnScale","scrollLockTimeout","fixed","dismissible","modal","open","defaultOpen","nested","direction","noBodyStyles","handleOnly","preventScrollRestoration","snapPoints"),s),c=ga(Pe(()=>n.portal)),$=Pe(()=>n.content),D=j(()=>n.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((l,g)=>(l[g]=m=>{m.preventDefault(),s("close:prevent")},l),{})),y=j(()=>ke({extend:ke(Ka),...h.ui?.drawer||{}})({direction:n.direction,inset:n.inset,snapPoints:n.snapPoints&&n.snapPoints.length>0}));return(o,l)=>(N(),F($a(e.nested?w(Wa):w(Ge)),Ee(Ce(w(d))),{default:z(()=>[a.default?(N(),F(w(Da),{key:0,"as-child":"",class:Y(n.class)},{default:z(()=>[H(o.$slots,"default")]),_:3},8,["class"])):M("",!0),Re(w(Ta),Ee(Ce(w(c))),{default:z(()=>[e.overlay?(N(),F(w(za),{key:0,"data-slot":"overlay",class:Y(y.value.overlay({class:n.ui?.overlay}))},null,8,["class"])):M("",!0),Re(w(Ma),We({"data-slot":"content",class:y.value.content({class:[!a.default&&n.class,n.ui?.content]})},$.value,wa(D.value)),{default:z(()=>[e.handle?(N(),F(w(Za),{key:0,"data-slot":"handle",class:Y(y.value.handle({class:n.ui?.handle}))},null,8,["class"])):M("",!0),a.content&&(e.title||a.title||e.description||a.description)?(N(),F(w(ba),{key:1},{default:z(()=>[e.title||a.title?(N(),F(w(Ne),{key:0},{default:z(()=>[H(o.$slots,"title",{},()=>[ce(ve(e.title),1)])]),_:3})):M("",!0),e.description||a.description?(N(),F(w(Ae),{key:1},{default:z(()=>[H(o.$slots,"description",{},()=>[ce(ve(e.description),1)])]),_:3})):M("",!0)]),_:3})):M("",!0),H(o.$slots,"content",{},()=>[He("div",{"data-slot":"container",class:Y(y.value.container({class:n.ui?.container}))},[a.header||e.title||a.title||e.description||a.description?(N(),me("div",{key:0,"data-slot":"header",class:Y(y.value.header({class:n.ui?.header}))},[H(o.$slots,"header",{},()=>[e.title||a.title?(N(),F(w(Ne),{key:0,"data-slot":"title",class:Y(y.value.title({class:n.ui?.title}))},{default:z(()=>[H(o.$slots,"title",{},()=>[ce(ve(e.title),1)])]),_:3},8,["class"])):M("",!0),e.description||a.description?(N(),F(w(Ae),{key:1,"data-slot":"description",class:Y(y.value.description({class:n.ui?.description}))},{default:z(()=>[H(o.$slots,"description",{},()=>[ce(ve(e.description),1)])]),_:3},8,["class"])):M("",!0)])],2)):M("",!0),a.body?(N(),me("div",{key:1,"data-slot":"body",class:Y(y.value.body({class:n.ui?.body}))},[H(o.$slots,"body")],2)):M("",!0),a.footer?(N(),me("div",{key:2,"data-slot":"footer",class:Y(y.value.footer({class:n.ui?.footer}))},[H(o.$slots,"footer")],2)):M("",!0)],2)])]),_:3},16,["class"])]),_:3},16)]),_:3},16))}};export{et as _};
1
+ import{d as le,aQ as ua,c as F,o as N,a as w,e as S,i as j,F as ge,w as z,r as H,ao as da,a$ as ca,M as me,ac as He,aG as Le,m as We,ax as ze,aR as va,g as fa,h as ee,C as je,b7 as pa,a5 as ma,B as Ue,W as ha,aH as ya,aI as ga,au as Pe,ap as ke,aa as M,Z as Re,$ as Y,aL as Ee,aM as Ce,aJ as wa,aK as ba,ab as ce,af as ve,aY as $a}from"./CBqC92gC.js";import{d as Sa,D as xa,a as Ne,b as Ae}from"./iIxC-lNx.js";import{b as Ba,D as Da,a as Ta}from"./DvZW6QuM.js";(function(){var e;try{if(typeof document<"u"){var t=document.createElement("style");t.nonce=(e=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:e.content,t.appendChild(document.createTextNode('[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}')),document.head.appendChild(t)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();const Oa=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Pa=e=>typeof e<"u";function ka(e){return JSON.parse(JSON.stringify(e))}function Ie(e,t,n,s={}){var a,h,d;const{clone:c=!1,passive:$=!1,eventName:D,deep:y=!1,defaultValue:o,shouldEmit:l}=s,g=fa(),m=n||g?.emit||((a=g?.$emit)==null?void 0:a.bind(g))||((d=(h=g?.proxy)==null?void 0:h.$emit)==null?void 0:d.bind(g?.proxy));let v=D;t||(t="modelValue"),v=v||`update:${t.toString()}`;const L=r=>c?typeof c=="function"?c(r):ka(r):r,I=()=>Pa(e[t])?L(e[t]):o,p=r=>{l?l(r)&&m(v,r):m(v,r)};if($){const r=I(),u=S(r);let f=!1;return ee(()=>e[t],x=>{f||(f=!0,u.value=L(x),Ue(()=>f=!1))}),ee(u,x=>{!f&&(x!==e[t]||y)&&p(x)},{deep:y}),u}else return j({get(){return I()},set(r){p(r)}})}const[oe,Ra]=ua("DrawerRoot"),Me=new WeakMap;function E(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;const s={};Object.entries(t).forEach(([a,h])=>{if(a.startsWith("--")){e.style.setProperty(a,h);return}s[a]=e.style[a],e.style[a]=h}),!n&&Me.set(e,s)}function Ea(e,t){if(!e||!(e instanceof HTMLElement))return;const n=Me.get(e);n&&Object.entries(n).forEach(([s,a])=>{e.style[s]=a})}function fe(e,t){const n=window.getComputedStyle(e),s=n.transform||n.webkitTransform||n.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?Number.parseFloat(a[1].split(", ")[k(t)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?Number.parseFloat(a[1].split(", ")[k(t)?5:4]):null)}function Ca(e){return 8*(Math.log(e+1)-2)}function k(e){switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}}function ye(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Na(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const O={DURATION:.5,EASE:[.32,.72,0,1]},Ve=.4,Aa=.25,Ia=100,Ye=8,pe=16,Xe=26,qe="vaul-dragging";function qa({activeSnapPoint:e,snapPoints:t,drawerRef:n,overlayRef:s,fadeFromIndex:a,onSnapPointChange:h,direction:d}){const c=S(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function $(){c.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}je(()=>{typeof window<"u"&&window.addEventListener("resize",$)}),pa(()=>{typeof window<"u"&&window.removeEventListener("resize",$)});const D=j(()=>(t.value&&e.value===t.value[t.value.length-1])??null),y=j(()=>t.value&&t.value.length>0&&(a?.value||a?.value===0)&&!Number.isNaN(a?.value)&&t.value[a?.value??-1]===e.value||!t.value),o=j(()=>{var p;return((p=t.value)==null?void 0:p.findIndex(r=>r===e.value))??null}),l=j(()=>{var p;return((p=t.value)==null?void 0:p.map(r=>{const u=typeof r=="string";let f=0;if(u&&(f=Number.parseInt(r,10)),k(d.value)){const B=u?f:c.value?r*c.value.innerHeight:0;return c.value?d.value==="bottom"?c.value.innerHeight-B:-c.value.innerHeight+B:B}const x=u?f:c.value?r*c.value.innerWidth:0;return c.value?d.value==="right"?c.value.innerWidth-x:-c.value.innerWidth+x:x}))??[]}),g=j(()=>{var p;return o.value!==null?(p=l.value)==null?void 0:p[o.value]:null}),m=p=>{var r,u,f,x;const B=((r=l.value)==null?void 0:r.findIndex(W=>W===p))??null;Ue(()=>{var W;h(B,l.value),E((W=n.value)==null?void 0:W.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:k(d.value)?`translate3d(0, ${p}px, 0)`:`translate3d(${p}px, 0, 0)`})}),l.value&&B!==l.value.length-1&&B!==a?.value?E((u=s.value)==null?void 0:u.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"0"}):E((f=s.value)==null?void 0:f.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"1"}),e.value=B!==null?((x=t.value)==null?void 0:x[B])??null:null};ee([e,l,t],()=>{var p;if(e.value){const r=((p=t.value)==null?void 0:p.findIndex(u=>u===e.value))??-1;l.value&&r!==-1&&typeof l.value[r]=="number"&&m(l.value[r])}},{immediate:!0});function v({draggedDistance:p,closeDrawer:r,velocity:u,dismissible:f}){var x,B,W;if(a.value===void 0)return;const G=d.value==="bottom"||d.value==="right"?(g.value??0)-p:(g.value??0)+p,re=o.value===a.value-1,_=o.value===0,X=p>0;if(re&&E((x=s.value)==null?void 0:x.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`}),u>2&&!X){f?r():m(l.value[0]);return}if(u>2&&X&&l&&t.value){m(l.value[t.value.length-1]);return}const ae=(B=l.value)==null?void 0:B.reduce((V,b)=>typeof V!="number"||typeof b!="number"?V:Math.abs(b-G)<Math.abs(V-G)?b:V),J=k(d.value)?window.innerHeight:window.innerWidth;if(u>Ve&&Math.abs(p)<J*.4){const V=X?1:-1;if(V>0&&D){m(l.value[(((W=t.value)==null?void 0:W.length)??0)-1]);return}if(_&&V<0&&f&&r(),o.value===null)return;m(l.value[o.value+V]);return}m(ae)}function L({draggedDistance:p}){var r;if(g.value===null)return;const u=d.value==="bottom"||d.value==="right"?g.value-p:g.value+p;(d.value==="bottom"||d.value==="right")&&u<l.value[l.value.length-1]||(d.value==="top"||d.value==="left")&&u>l.value[l.value.length-1]||E((r=n.value)==null?void 0:r.$el,{transform:k(d.value)?`translate3d(0, ${u}px, 0)`:`translate3d(${u}px, 0, 0)`})}function I(p,r){if(!t.value||typeof o.value!="number"||!l.value||a.value===void 0)return null;const u=o.value===a.value-1;if(o.value>=a.value&&r)return 0;if(u&&!r)return 1;if(!y.value&&!u)return null;const f=u?o.value+1:o.value-1,x=u?l.value[f]-l.value[f-1]:l.value[f+1]-l.value[f],B=p/Math.abs(x);return u?1-B:B}return{isLastSnapPoint:D,shouldFade:y,getPercentageDragged:I,activeSnapPointIndex:o,onRelease:v,onDrag:L,snapPointsOffset:l}}function Fe(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let ne=null;function Fa(e){const{isOpen:t,modal:n,nested:s,hasBeenOpened:a,preventScrollRestoration:h,noBodyStyles:d}=e,c=S(typeof window<"u"?window.location.href:""),$=S(0);function D(){if(Fe()&&ne===null&&t.value&&!d.value){ne={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:o,innerHeight:l}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-$.value}px`,left:`${-o}px`,right:"0px",height:"auto"}),setTimeout(()=>{requestAnimationFrame(()=>{const g=l-window.innerHeight;g&&$.value>=l&&(document.body.style.top=`-${$.value+g}px`)})},300)}}function y(){if(Fe()&&ne!==null&&!d.value){const o=-Number.parseInt(document.body.style.top,10),l=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,ne),window.requestAnimationFrame(()=>{if(h.value&&c.value!==window.location.href){c.value=window.location.href;return}window.scrollTo(l,o)}),ne=null}}return je(()=>{function o(){$.value=window.scrollY}o(),window.addEventListener("scroll",o),ma(()=>{window.removeEventListener("scroll",o)})}),ee([t,a,c],()=>{s.value||!a.value||(t.value?(window.matchMedia("(display-mode: standalone)").matches||D(),n.value||setTimeout(()=>{y()},500)):y())}),{restorePositionSetting:y}}function Ha(e,t){return e&&e.value?e:t}function La(e){const{emitDrag:t,emitRelease:n,emitClose:s,emitOpenChange:a,open:h,dismissible:d,nested:c,modal:$,shouldScaleBackground:D,setBackgroundColorOnScale:y,scrollLockTimeout:o,closeThreshold:l,activeSnapPoint:g,fadeFromIndex:m,direction:v,noBodyStyles:L,handleOnly:I,preventScrollRestoration:p}=e,r=S(h.value??!1),u=S(!1),f=S(!1),x=S(!1),B=S(null),W=S(null),G=S(null),re=S(null),_=S(null),X=S(!1),ae=S(null),J=S(0),V=S(!1);S(0);const b=S(null);S(0);const we=j(()=>{var i;return((i=b.value)==null?void 0:i.$el.getBoundingClientRect().height)||0}),q=Ha(e.snapPoints,S(void 0)),Ze=j(()=>{var i;return q&&(((i=q.value)==null?void 0:i.length)??0)>0}),Ke=S(null),{activeSnapPointIndex:be,onRelease:_e,snapPointsOffset:Je,onDrag:Qe,shouldFade:$e,getPercentageDragged:ea}=qa({snapPoints:q,activeSnapPoint:g,drawerRef:b,fadeFromIndex:m,overlayRef:B,onSnapPointChange:aa,direction:v});function aa(i,P){q.value&&i===P.length-1&&(W.value=new Date)}Fa({isOpen:r,modal:$,nested:c,hasBeenOpened:u,noBodyStyles:L,preventScrollRestoration:p});function ie(){return(window.innerWidth-Xe)/window.innerWidth}function Se(i,P){var R;if(!i)return!1;let T=i;const C=(R=window.getSelection())==null?void 0:R.toString(),A=b.value?fe(b.value.$el,v.value):null,U=new Date;if(T.hasAttribute("data-vaul-no-drag")||T.closest("[data-vaul-no-drag]"))return!1;if(v.value==="right"||v.value==="left")return!0;if(W.value&&U.getTime()-W.value.getTime()<500)return!1;if(A!==null&&(v.value==="bottom"?A>0:A<0))return!0;if(C&&C.length>0)return!1;if(_.value&&U.getTime()-_.value.getTime()<o.value&&A===0||P)return _.value=U,!1;for(;T;){if(T.scrollHeight>T.clientHeight){if(T.scrollTop!==0)return _.value=new Date,!1;if(T.getAttribute("role")==="dialog")return!0}T=T.parentNode}return!0}function ta(i){!d.value&&!q.value||b.value&&!b.value.$el.contains(i.target)||(f.value=!0,G.value=new Date,i.target.setPointerCapture(i.pointerId),J.value=k(v.value)?i.clientY:i.clientX)}function na(i){var P,R,T,C,A,U;if(b.value&&f.value){const Q=v.value==="bottom"||v.value==="right"?1:-1,se=(J.value-(k(v.value)?i.clientY:i.clientX))*Q,ue=se>0,Be=q.value&&!d.value&&!ue;if(Be&&be.value===0)return;const he=Math.abs(se),De=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let Z=he/we.value;const Te=ea(he,ue);if(Te!==null&&(Z=Te),Be&&Z>=1||!X.value&&!Se(i.target,ue))return;if((P=b?.value)==null||P.$el.classList.add(qe),X.value=!0,E((R=b.value)==null?void 0:R.$el,{transition:"none"}),E((T=B.value)==null?void 0:T.$el,{transition:"none"}),q.value&&Qe({draggedDistance:se}),ue&&!q.value){const K=Ca(se),de=Math.min(K*-1,0)*Q;E((C=b.value)==null?void 0:C.$el,{transform:k(v.value)?`translate3d(0, ${de}px, 0)`:`translate3d(${de}px, 0, 0)`});return}const sa=1-Z;if(($e.value||m.value&&be.value===m.value-1)&&(t(Z),E((A=B.value)==null?void 0:A.$el,{opacity:`${sa}`,transition:"none"},!0)),De&&B.value&&D.value){const K=Math.min(ie()+Z*(1-ie()),1),de=8-Z*8,Oe=Math.max(0,14-Z*14);E(De,{borderRadius:`${de}px`,transform:k(v.value)?`scale(${K}) translate3d(0, ${Oe}px, 0)`:`scale(${K}) translate3d(${Oe}px, 0, 0)`,transition:"none"},!0)}if(!q.value){const K=he*Q;E((U=b.value)==null?void 0:U.$el,{transform:k(v.value)?`translate3d(0, ${K}px, 0)`:`translate3d(${K}px, 0, 0)`})}}}function xe(){var i;if(!b.value)return;const P=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]"),R=fe(b.value.$el,v.value);E(b.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`}),E((i=B.value)==null?void 0:i.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"1"}),D.value&&R&&R>0&&r.value&&E(P,{borderRadius:`${Ye}px`,overflow:"hidden",...k(v.value)?{transform:`scale(${ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(",")})`},!0)}function te(i){b.value&&(s(),i||(r.value=!1),window.setTimeout(()=>{q.value&&(g.value=q.value[0])},O.DURATION*1e3))}ge(()=>{if(!r.value&&D.value&&Oa){const i=setTimeout(()=>{Ea(document.body)},200);return()=>clearTimeout(i)}}),ee(h,()=>{r.value=h.value,h.value||te()});function la(i){if(!f.value||!b.value)return;b.value.$el.classList.remove(qe),X.value=!1,f.value=!1,re.value=new Date;const P=fe(b.value.$el,v.value);if(!Se(i.target,!1)||!P||Number.isNaN(P)||G.value===null)return;const R=re.value.getTime()-G.value.getTime(),T=J.value-(k(v.value)?i.clientY:i.clientX),C=Math.abs(T)/R;if(C>.05&&(x.value=!0,window.setTimeout(()=>{x.value=!1},200)),q.value){const U=v.value==="bottom"||v.value==="right"?1:-1;_e({draggedDistance:T*U,closeDrawer:te,velocity:C,dismissible:d.value}),n(!0);return}if(v.value==="bottom"||v.value==="right"?T>0:T<0){xe(),n(!0);return}if(C>Ve){te(),n(!1);return}const A=Math.min(b.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(P>=A*l.value){te(),n(!1);return}n(!0),xe()}ee(r,i=>{i&&(W.value=new Date),a(i)},{immediate:!0});function oa(i){var P,R;const T=i?(window.innerWidth-pe)/window.innerWidth:1,C=i?-16:0;ae.value&&window.clearTimeout(ae.value),E((P=b.value)==null?void 0:P.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:`scale(${T}) translate3d(0, ${C}px, 0)`}),!i&&(R=b.value)!=null&&R.$el&&(ae.value=window.setTimeout(()=>{var A,U;const Q=fe((A=b.value)==null?void 0:A.$el,v.value);E((U=b.value)==null?void 0:U.$el,{transition:"none",transform:k(v.value)?`translate3d(0, ${Q}px, 0)`:`translate3d(${Q}px, 0, 0)`})},500))}function ra(i){var P;if(i<0)return;const R=k(v.value)?window.innerHeight:window.innerWidth,T=(R-pe)/R,C=T+i*(1-T),A=-16+i*pe;E((P=b.value)==null?void 0:P.$el,{transform:k(v.value)?`scale(${C}) translate3d(0, ${A}px, 0)`:`scale(${C}) translate3d(${A}px, 0, 0)`,transition:"none"})}function ia(i){var P;const R=k(v.value)?window.innerHeight:window.innerWidth,T=i?(R-pe)/R:1,C=i?-16:0;i&&E((P=b.value)==null?void 0:P.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:k(v.value)?`scale(${T}) translate3d(0, ${C}px, 0)`:`scale(${T}) translate3d(${C}px, 0, 0)`})}return{open:h,isOpen:r,modal:$,keyboardIsOpen:V,hasBeenOpened:u,drawerRef:b,drawerHeightRef:we,overlayRef:B,handleRef:Ke,isDragging:f,dragStartTime:G,isAllowedToDrag:X,snapPoints:q,activeSnapPoint:g,hasSnapPoints:Ze,pointerStart:J,dismissible:d,snapPointsOffset:Je,direction:v,shouldFade:$e,fadeFromIndex:m,shouldScaleBackground:D,setBackgroundColorOnScale:y,onPress:ta,onDrag:na,onRelease:la,closeDrawer:te,onNestedDrag:ra,onNestedRelease:ia,onNestedOpenChange:oa,emitClose:s,emitDrag:t,emitRelease:n,emitOpenChange:a,nested:c,handleOnly:I,noBodyStyles:L}}const Ge=le({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:Aa},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:Ia},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{expose:t,emit:n}){const s=e,a=n;ze();const h=j(()=>s.fadeFromIndex??(s.snapPoints&&s.snapPoints.length-1)),d=Ie(s,"open",a,{defaultValue:s.defaultOpen,passive:s.open===void 0}),c=Ie(s,"activeSnapPoint",a,{passive:s.activeSnapPoint===void 0}),$={emitDrag:m=>a("drag",m),emitRelease:m=>a("release",m),emitClose:()=>a("close"),emitOpenChange:m=>{a("update:open",m),setTimeout(()=>{a("animationEnd",m)},O.DURATION*1e3)}},{closeDrawer:D,hasBeenOpened:y,modal:o,isOpen:l}=Ra(La({...$,...va(s),activeSnapPoint:c,fadeFromIndex:h,open:d}));function g(m){if(d.value!==void 0){$.emitOpenChange(m);return}l.value=m,m?y.value=!0:D()}return t({open:l}),(m,v)=>(N(),F(w(Ba),{open:w(l),modal:w(o),"onUpdate:open":g},{default:z(()=>[H(m.$slots,"default",{open:w(l)})]),_:3},8,["open","modal"]))}}),Wa=le({__name:"DrawerRootNested",props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const n=e,s=t,{onNestedDrag:a,onNestedOpenChange:h,onNestedRelease:d}=oe();function c(){h(!1)}function $(o){a(o)}function D(o){o&&h(o),s("update:open",o)}const y=Le(n,s);return(o,l)=>(N(),F(Ge,We(w(y),{nested:"",onClose:c,onDrag:$,onRelease:w(d),"onUpdate:open":D}),{default:z(()=>[H(o.$slots,"default")]),_:3},16,["onRelease"]))}}),za=le({__name:"DrawerOverlay",setup(e){const{overlayRef:t,hasSnapPoints:n,isOpen:s,shouldFade:a}=oe();return(h,d)=>(N(),F(w(Sa),{ref_key:"overlayRef",ref:t,"data-vaul-overlay":"","data-vaul-snap-points":w(s)&&w(n)?"true":"false","data-vaul-snap-points-overlay":w(s)&&w(a)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),ja=()=>()=>{};function Ua(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:s,noBodyStyles:a}=oe(),h=S(null),d=S(document.body.style.backgroundColor);function c(){return(window.innerWidth-Xe)/window.innerWidth}ge($=>{if(t.value&&n.value){h.value&&clearTimeout(h.value);const D=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!D)return;Na(s.value&&!a.value?ye(document.body,{background:"black"}):ja,ye(D,{transformOrigin:k(e.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(",")})`}));const y=ye(D,{borderRadius:`${Ye}px`,overflow:"hidden",...k(e.value)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});$(()=>{y(),h.value=window.setTimeout(()=>{d.value?document.body.style.background=d.value:document.body.style.removeProperty("background")},O.DURATION*1e3)})}},{flush:"pre"})}const Ma=le({__name:"DrawerContent",setup(e){const{open:t,isOpen:n,snapPointsOffset:s,hasSnapPoints:a,drawerRef:h,onPress:d,onDrag:c,onRelease:$,modal:D,emitOpenChange:y,dismissible:o,keyboardIsOpen:l,closeDrawer:g,direction:m,handleOnly:v}=oe();Ua();const L=S(!1),I=j(()=>s.value&&s.value.length>0?`${s.value[0]}px`:"0");function p(f){if(!D.value||f.defaultPrevented){f.preventDefault();return}l.value&&(l.value=!1),o.value?y(!1):f.preventDefault()}function r(f){v.value||d(f)}function u(f){v.value||c(f)}return ge(()=>{a.value&&window.requestAnimationFrame(()=>{L.value=!0})}),(f,x)=>(N(),F(w(xa),{ref_key:"drawerRef",ref:h,"data-vaul-drawer":"","data-vaul-drawer-direction":w(m),"data-vaul-delayed-snap-points":L.value?"true":"false","data-vaul-snap-points":w(n)&&w(a)?"true":"false",style:ca({"--snap-point-height":I.value}),onPointerdown:r,onPointermove:u,onPointerup:w($),onPointerDownOutside:p,onOpenAutoFocus:x[0]||(x[0]=da(()=>{},["prevent"])),onEscapeKeyDown:x[1]||(x[1]=B=>{w(o)||B.preventDefault()})},{default:z(()=>[H(f.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),Va=["data-vaul-drawer-visible"],Ya={"data-vaul-handle-hitarea":"","aria-hidden":"true"},Xa=250,Ga=120,Za=le({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(e){const t=e,{onPress:n,onDrag:s,handleRef:a,handleOnly:h,isOpen:d,snapPoints:c,activeSnapPoint:$,isDragging:D,dismissible:y,closeDrawer:o}=oe(),l=S(null),g=S(!1);function m(){if(g.value){I();return}window.setTimeout(()=>{v()},Ga)}function v(){if(D.value||t.preventCycle||g.value){I();return}if(I(),!c.value||c.value.length===0){y.value||o();return}const u=$.value===c.value[c.value.length-1];if(u&&y.value){o();return}const f=c.value.findIndex(B=>B===$.value);if(f===-1)return;const x=u?0:f+1;$.value=c.value[x]}function L(){l.value=window.setTimeout(()=>{g.value=!0},Xa)}function I(){l.value&&window.clearTimeout(l.value),g.value=!1}function p(u){h.value&&n(u),L()}function r(u){h.value&&s(u)}return(u,f)=>(N(),me("div",{ref_key:"handleRef",ref:a,"data-vaul-drawer-visible":w(d)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:m,onPointercancel:I,onPointerdown:p,onPointermove:r},[He("span",Ya,[H(u.$slots,"default")])],40,Va))}}),Ka={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default ring ring-default flex focus:outline-none",handle:["shrink-0 !bg-accented","transition-opacity"],container:"w-full flex flex-col gap-4 p-4 overflow-y-auto",header:"",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"flex-1",footer:"flex flex-col gap-1.5"},variants:{direction:{top:{content:"mb-24 flex-col-reverse",handle:"mb-4"},right:{content:"flex-row",handle:"!ml-4"},bottom:{content:"mt-24 flex-col",handle:"mt-4"},left:{content:"flex-row-reverse",handle:"!mr-4"}},inset:{true:{content:"rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"}},snapPoints:{true:""}},compoundVariants:[{direction:["top","bottom"],class:{content:"h-auto max-h-[96%]",handle:"!w-12 !h-1.5 mx-auto"}},{direction:["top","bottom"],snapPoints:!0,class:{content:"h-full"}},{direction:["right","left"],class:{content:"w-auto max-w-[calc(100%-2rem)]",handle:"!h-12 !w-1.5 mt-auto mb-auto"}},{direction:["right","left"],snapPoints:!0,class:{content:"w-full"}},{direction:"top",inset:!0,class:{content:"inset-x-4 top-4"}},{direction:"top",inset:!1,class:{content:"inset-x-0 top-0 rounded-b-lg"}},{direction:"bottom",inset:!0,class:{content:"inset-x-4 bottom-4"}},{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-lg"}},{direction:"left",inset:!0,class:{content:"inset-y-4 left-4"}},{direction:"left",inset:!1,class:{content:"inset-y-0 left-0 rounded-r-lg"}},{direction:"right",inset:!0,class:{content:"inset-y-4 right-4"}},{direction:"right",inset:!1,class:{content:"inset-y-0 right-0 rounded-l-lg"}}]},et={__name:"UDrawer",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},inset:{type:Boolean,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},handle:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},nested:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},activeSnapPoint:{type:[Number,String,null],required:!1},closeThreshold:{type:Number,required:!1},shouldScaleBackground:{type:Boolean,required:!1},setBackgroundColorOnScale:{type:Boolean,required:!1},scrollLockTimeout:{type:Number,required:!1},fixed:{type:Boolean,required:!1},dismissible:{type:Boolean,required:!1,default:!0},modal:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},direction:{type:String,required:!1,default:"bottom"},noBodyStyles:{type:Boolean,required:!1},handleOnly:{type:Boolean,required:!1},preventScrollRestoration:{type:Boolean,required:!1},snapPoints:{type:Array,required:!1}},emits:["close:prevent","drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const n=e,s=t,a=ze(),h=ha(),d=Le(ya(n,"activeSnapPoint","closeThreshold","shouldScaleBackground","setBackgroundColorOnScale","scrollLockTimeout","fixed","dismissible","modal","open","defaultOpen","nested","direction","noBodyStyles","handleOnly","preventScrollRestoration","snapPoints"),s),c=ga(Pe(()=>n.portal)),$=Pe(()=>n.content),D=j(()=>n.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((l,g)=>(l[g]=m=>{m.preventDefault(),s("close:prevent")},l),{})),y=j(()=>ke({extend:ke(Ka),...h.ui?.drawer||{}})({direction:n.direction,inset:n.inset,snapPoints:n.snapPoints&&n.snapPoints.length>0}));return(o,l)=>(N(),F($a(e.nested?w(Wa):w(Ge)),Ee(Ce(w(d))),{default:z(()=>[a.default?(N(),F(w(Da),{key:0,"as-child":"",class:Y(n.class)},{default:z(()=>[H(o.$slots,"default")]),_:3},8,["class"])):M("",!0),Re(w(Ta),Ee(Ce(w(c))),{default:z(()=>[e.overlay?(N(),F(w(za),{key:0,"data-slot":"overlay",class:Y(y.value.overlay({class:n.ui?.overlay}))},null,8,["class"])):M("",!0),Re(w(Ma),We({"data-slot":"content",class:y.value.content({class:[!a.default&&n.class,n.ui?.content]})},$.value,wa(D.value)),{default:z(()=>[e.handle?(N(),F(w(Za),{key:0,"data-slot":"handle",class:Y(y.value.handle({class:n.ui?.handle}))},null,8,["class"])):M("",!0),a.content&&(e.title||a.title||e.description||a.description)?(N(),F(w(ba),{key:1},{default:z(()=>[e.title||a.title?(N(),F(w(Ne),{key:0},{default:z(()=>[H(o.$slots,"title",{},()=>[ce(ve(e.title),1)])]),_:3})):M("",!0),e.description||a.description?(N(),F(w(Ae),{key:1},{default:z(()=>[H(o.$slots,"description",{},()=>[ce(ve(e.description),1)])]),_:3})):M("",!0)]),_:3})):M("",!0),H(o.$slots,"content",{},()=>[He("div",{"data-slot":"container",class:Y(y.value.container({class:n.ui?.container}))},[a.header||e.title||a.title||e.description||a.description?(N(),me("div",{key:0,"data-slot":"header",class:Y(y.value.header({class:n.ui?.header}))},[H(o.$slots,"header",{},()=>[e.title||a.title?(N(),F(w(Ne),{key:0,"data-slot":"title",class:Y(y.value.title({class:n.ui?.title}))},{default:z(()=>[H(o.$slots,"title",{},()=>[ce(ve(e.title),1)])]),_:3},8,["class"])):M("",!0),e.description||a.description?(N(),F(w(Ae),{key:1,"data-slot":"description",class:Y(y.value.description({class:n.ui?.description}))},{default:z(()=>[H(o.$slots,"description",{},()=>[ce(ve(e.description),1)])]),_:3},8,["class"])):M("",!0)])],2)):M("",!0),a.body?(N(),me("div",{key:1,"data-slot":"body",class:Y(y.value.body({class:n.ui?.body}))},[H(o.$slots,"body")],2)):M("",!0),a.footer?(N(),me("div",{key:2,"data-slot":"footer",class:Y(y.value.footer({class:n.ui?.footer}))},[H(o.$slots,"footer")],2)):M("",!0)],2)])]),_:3},16,["class"])]),_:3},16)]),_:3},16))}};export{et as _};
@@ -1,4 +1,4 @@
1
- import{d as Hi,e as Fi,C as Vi,b7 as hs,L as ji,B as Pa,W as La,as as Jd,i as he,X as za,Y as $a,aZ as We,ap as xr,b8 as Kn,c as st,o as ve,w as jt,Z as ur,a as ze,P as ii,$ as kn,M as dr,al as hr,am as Jo,ac as Gd,aa as Ba,r as _a,m as nt,a0 as Jn,bU as Xd,ba as Yd,s as Qd,F as Zd,c8 as eh,b5 as th,g as nh,c9 as rh,h as sh,R as ih}from"./BOCn_SGf.js";import{S as oh}from"./DxE8r3r4.js";import{f as Ha,s as Fa,o as Va,d as ja,e as qa,g as Ua,h as Wa,i as Ka,j as Ja}from"./jTT1R-Vz.js";import{_ as lh}from"./D2edadpd.js";import{_ as Go}from"./DL4EpgqQ.js";import{k as ah,b as ch}from"./Vcq4gwWv.js";function ie(n){this.content=n}ie.prototype={constructor:ie,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ie(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ie(t)},addToStart:function(n,e){return new ie([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ie(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ie(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ie.from(n),n.size?new ie(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ie.from(n),n.size?new ie(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ie.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ie.from=function(n){if(n instanceof ie)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ie(e)};function Ga(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ga(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Xa(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Xa(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class w{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new w(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new w(r,s)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new w(s,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ga(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Xa(this,e,t,r)}findIndex(e){if(e==0)return Gn(0,e);if(e==this.size)return Gn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Gn(t+1,i):Gn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new w(t||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const Is={index:0,offset:0};function Gn(n,e){return Is.index=n,Is.offset=e,Is}function wr(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!wr(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!wr(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class oi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&wr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oi.none;if(e instanceof oi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};_.none=[];class vr extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Qa(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Ya(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(w.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(w.empty,0,0);function Ya(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Ya(i.content,e-s-1,t-s-1)))}function Qa(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Qa(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function uh(n,e,t){if(t.openStart>n.depth)throw new vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new vr("Inconsistent open depths");return Za(n,e,t,0)}function Za(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Za(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Mt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dh(t,n);return Mt(i,tc(n,o,l,e,r))}else return Mt(i,Sr(n,e,r))}function ec(n,e){if(!e.type.compatibleContent(n.type))throw new vr("Cannot join "+e.type.name+" onto "+n.type.name)}function li(n,e,t){let r=n.node(t);return ec(r,e.node(t)),r}function Tt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function bn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Tt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)Tt(s.child(l),r);e&&e.depth==t&&e.textOffset&&Tt(e.nodeBefore,r)}function Mt(n,e){return n.type.checkContent(e),n.copy(e)}function tc(n,e,t,r,s){let i=n.depth>s&&li(n,e,s+1),o=r.depth>s&&li(t,r,s+1),l=[];return bn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(ec(i,o),Tt(Mt(i,tc(n,e,t,r,s+1)),l)):(i&&Tt(Mt(i,Sr(n,e,s+1)),l),bn(e,t,s,l),o&&Tt(Mt(o,Sr(t,r,s+1)),l)),bn(r,null,s,l),new w(l)}function Sr(n,e,t){let r=[];if(bn(null,n,t,r),n.depth>t){let s=li(n,e,t+1);Tt(Mt(s,Sr(n,e,t+1)),r)}return bn(e,null,t,r),new w(r)}function dh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(w.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Nn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Cr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Nn(t,r,i)}static resolveCached(e,t){let r=Xo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Xo.set(e,r=new hh);let s=r.elts[r.i]=Nn.resolve(e,t);return r.i=(r.i+1)%fh,s}}class hh{constructor(){this.elts=[],this.i=0}}const fh=12,Xo=new WeakMap;class Cr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const ph=Object.create(null);class Me{constructor(e,t,r,s=_.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||w.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&wr(this.attrs,t||e.defaultAttrs||ph)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Me(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Me(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return uh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Nn.resolveCached(this,e)}resolveNoCache(e){return Nn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),nc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=w.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Me.prototype.text=void 0;class Tr extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function nc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Nt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mh(e,t);if(r.next==null)return Nt.empty;let s=rc(r);r.next&&r.err("Unexpected trailing text");let i=vh(wh(s));return Sh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return w.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=i(d,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
1
+ import{d as Hi,e as Fi,C as Vi,b7 as hs,L as ji,B as Pa,W as La,as as Jd,i as he,X as za,Y as $a,aZ as We,ap as xr,b8 as Kn,c as st,o as ve,w as jt,Z as ur,a as ze,P as ii,$ as kn,M as dr,al as hr,am as Jo,ac as Gd,aa as Ba,r as _a,m as nt,a0 as Jn,bU as Xd,ba as Yd,s as Qd,F as Zd,c8 as eh,b5 as th,g as nh,c9 as rh,h as sh,R as ih}from"./CBqC92gC.js";import{S as oh}from"./CTIUqf4N.js";import{f as Ha,s as Fa,o as Va,d as ja,e as qa,g as Ua,h as Wa,i as Ka,j as Ja}from"./DWnLv2oh.js";import{_ as lh}from"./Db66Rsfj.js";import{_ as Go}from"./Bt87rSlM.js";import{k as ah,b as ch}from"./Vcq4gwWv.js";function ie(n){this.content=n}ie.prototype={constructor:ie,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ie(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ie(t)},addToStart:function(n,e){return new ie([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ie(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ie(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ie.from(n),n.size?new ie(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ie.from(n),n.size?new ie(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ie.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ie.from=function(n){if(n instanceof ie)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ie(e)};function Ga(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ga(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Xa(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Xa(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class w{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new w(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new w(r,s)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new w(s,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ga(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Xa(this,e,t,r)}findIndex(e){if(e==0)return Gn(0,e);if(e==this.size)return Gn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Gn(t+1,i):Gn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new w(t||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const Is={index:0,offset:0};function Gn(n,e){return Is.index=n,Is.offset=e,Is}function wr(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!wr(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!wr(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class oi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&wr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oi.none;if(e instanceof oi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};_.none=[];class vr extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Qa(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Ya(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(w.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(w.empty,0,0);function Ya(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Ya(i.content,e-s-1,t-s-1)))}function Qa(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Qa(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function uh(n,e,t){if(t.openStart>n.depth)throw new vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new vr("Inconsistent open depths");return Za(n,e,t,0)}function Za(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Za(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Mt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dh(t,n);return Mt(i,tc(n,o,l,e,r))}else return Mt(i,Sr(n,e,r))}function ec(n,e){if(!e.type.compatibleContent(n.type))throw new vr("Cannot join "+e.type.name+" onto "+n.type.name)}function li(n,e,t){let r=n.node(t);return ec(r,e.node(t)),r}function Tt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function bn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Tt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)Tt(s.child(l),r);e&&e.depth==t&&e.textOffset&&Tt(e.nodeBefore,r)}function Mt(n,e){return n.type.checkContent(e),n.copy(e)}function tc(n,e,t,r,s){let i=n.depth>s&&li(n,e,s+1),o=r.depth>s&&li(t,r,s+1),l=[];return bn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(ec(i,o),Tt(Mt(i,tc(n,e,t,r,s+1)),l)):(i&&Tt(Mt(i,Sr(n,e,s+1)),l),bn(e,t,s,l),o&&Tt(Mt(o,Sr(t,r,s+1)),l)),bn(r,null,s,l),new w(l)}function Sr(n,e,t){let r=[];if(bn(null,n,t,r),n.depth>t){let s=li(n,e,t+1);Tt(Mt(s,Sr(n,e,t+1)),r)}return bn(e,null,t,r),new w(r)}function dh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(w.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Nn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Cr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Nn(t,r,i)}static resolveCached(e,t){let r=Xo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Xo.set(e,r=new hh);let s=r.elts[r.i]=Nn.resolve(e,t);return r.i=(r.i+1)%fh,s}}class hh{constructor(){this.elts=[],this.i=0}}const fh=12,Xo=new WeakMap;class Cr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const ph=Object.create(null);class Me{constructor(e,t,r,s=_.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||w.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&wr(this.attrs,t||e.defaultAttrs||ph)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Me(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Me(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return uh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Nn.resolveCached(this,e)}resolveNoCache(e){return Nn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),nc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=w.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Me.prototype.text=void 0;class Tr extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function nc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Nt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mh(e,t);if(r.next==null)return Nt.empty;let s=rc(r);r.next&&r.err("Unexpected trailing text");let i=vh(wh(s));return Sh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return w.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=i(d,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
2
2
  `)}}Nt.empty=new Nt(!0);class mh{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function rc(n){let e=[];do e.push(gh(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function gh(n){let e=[];do e.push(yh(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function yh(n){let e=xh(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=kh(n,e);else break;return e}function Yo(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function kh(n,e){let t=Yo(n),r=t;return n.eat(",")&&(n.next!="}"?r=Yo(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function bh(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function xh(n){if(n.eat("(")){let e=rc(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=bh(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function wh(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function sc(n,e){return e-n}function Qo(n,e){let t=[];return r(e),t.sort(sc);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function vh(n){let e=Object.create(null);return t(Qo(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);Qo(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Nt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(sc);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Sh(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ic(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function oc(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function lc(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function ac(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Th(n,r,e[r]);return t}let Zo=class cc{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ac(e,r.attrs),this.defaultAttrs=ic(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Nt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:oc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Me(this,this.computeAttrs(e),w.from(t),_.setFrom(r))}createChecked(e=null,t,r){return t=w.from(t),this.checkContent(t),new Me(this,this.computeAttrs(e),t,_.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=w.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(w.empty,!0);return i?new Me(this,e,t.append(i),_.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){lc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:_.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new cc(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ch(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Th{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ch(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class fs{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=ac(e,s.attrs),this.excluded=null;let i=ic(this.attrs);this.instance=i?new _(this,i):null}create(e=null){return!e&&this.instance?this.instance:new _(this,oc(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new fs(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){lc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class uc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=ie.from(e.nodes),t.marks=ie.from(e.marks||{}),this.nodes=Zo.compile(this.spec.nodes,this),this.marks=fs.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Nt.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?el(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:el(this,o.split(" "))}this.nodeFromJSON=s=>Me.fromJSON(this,s),this.markFromJSON=s=>_.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Zo){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new Tr(r,r.defaultAttrs,e,_.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function el(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Mh(n){return n.tag!=null}function Eh(n){return n.style!=null}class Qe{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Mh(s))this.tags.push(s);else if(Eh(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new nl(this,t,!1);return r.addAll(e,_.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new nl(this,t,!0);return r.addAll(e,_.none,t.from,t.to),M.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Nh(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=rl(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=rl(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Qe(e,Qe.schemaRules(e)))}}const dc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ah={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hc={ol:!0,ul:!0},Rn=1,ai=2,xn=4;function tl(n,e,t){return e!=null?(e?Rn:0)|(e==="full"?ai:0):n&&n.whitespace=="pre"?Rn|ai:t&~xn}class Xn{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=_.none,this.match=i||(o&xn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(w.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Rn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=w.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(w.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!dc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class nl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=tl(null,t.preserveWhitespace,0)|(r?xn:0);s?i=new Xn(s.type,s.attrs,_.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Xn(null,null,_.none,!0,null,o):i=new Xn(e.schema.topNodeType,null,_.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&ai?"full":this.localPreserveWS||(s.options&Rn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;hc.hasOwnProperty(o)&&this.parser.normalizeLists&&Oh(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Ah.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(dc.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=_.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):sl(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=tl(e,i,o.options);o.options&xn&&o.content.length==0&&(l|=xn);let a=_.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):sl(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Xn(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Rn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Oh(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&hc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Nh(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function rl(n){let e={};for(let t in n)e[t]=n[t];return e}function sl(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class zt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ds(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=fr(Ds(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&fr(Ds(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return fr(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new zt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=il(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return il(e.marks)}}function il(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ds(n){return n.document||window.document}const ol=new WeakMap;function Rh(n){let e=ol.get(n);return e===void 0&&ol.set(n,e=Ih(n)),e}function Ih(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function fr(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Rh(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?a.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:f,contentDOM:p}=fr(n,h,t,r);if(a.appendChild(f),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const fc=65535,pc=Math.pow(2,16);function Dh(n,e){return n+e*pc}function ll(n){return n&fc}function Ph(n){return(n-(n&fc))/pc}const mc=1,gc=2,pr=4,yc=8;class ci{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&yc)>0}get deletedBefore(){return(this.delInfo&(mc|pr))>0}get deletedAfter(){return(this.delInfo&(gc|pr))>0}get deletedAcross(){return(this.delInfo&pr)>0}}class be{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&be.empty)return be.empty}recover(e){let t=0,r=ll(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Ph(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let h=c?e==a?-1:e==d?1:t:t,f=a+s+(h<0?0:u);if(r)return f;let p=e==(t<0?a:d)?null:Dh(l/3,e-a),g=e==a?gc:e==d?mc:pr;return(t<0?e!=a:e!=d)&&(g|=yc),new ci(f,g,p)}s+=u-c}return r?e+s:new ci(e+s,0,null)}touches(e,t){let r=0,s=ll(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new be(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?be.empty:new be(e<0?[0,-e,0]:[0,0,e])}}be.empty=new be([]);class In{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new In(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new In;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new ci(e,s,null)}}const Ps=Object.create(null);class ue{getMap(){return be.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ps[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Ps)throw new RangeError("Duplicate use of step JSON ID "+e);return Ps[e]=t,t.prototype.jsonID=e,t}}class X{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new X(e,null)}static fail(e){return new X(null,e)}static fromReplace(e,t,r,s){try{return X.ok(e.replace(t,r,s))}catch(i){if(i instanceof vr)return X.fail(i.message);throw i}}}function qi(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(qi(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return w.fromArray(r)}class dt extends ue{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new M(qi(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return X.fromReplace(e,this.from,this.to,i)}invert(){return new Re(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new dt(t.pos,r.pos,this.mark)}merge(e){return e instanceof dt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new dt(t.from,t.to,e.markFromJSON(t.mark))}}ue.jsonID("addMark",dt);class Re extends ue{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new M(qi(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return X.fromReplace(e,this.from,this.to,r)}invert(){return new dt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Re(t.pos,r.pos,this.mark)}merge(e){return e instanceof Re&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Re(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Re(t.from,t.to,e.markFromJSON(t.mark))}}ue.jsonID("removeMark",Re);class ht extends ue{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return X.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return X.fromReplace(e,this.pos,this.pos+1,new M(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new ht(this.pos,t.marks[s]);return new ht(this.pos,this.mark)}}return new Rt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ht(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ht(t.pos,e.markFromJSON(t.mark))}}ue.jsonID("addNodeMark",ht);class Rt extends ue{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return X.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return X.fromReplace(e,this.pos,this.pos+1,new M(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ht(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Rt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Rt(t.pos,e.markFromJSON(t.mark))}}ue.jsonID("removeNodeMark",Rt);class te extends ue{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&ui(e,this.from,this.to)?X.fail("Structure replace would overwrite content"):X.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new be([this.from,this.to-this.from,this.slice.size])}invert(e){return new te(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new te(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof te)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new te(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new te(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new te(t.from,t.to,M.fromJSON(e,t.slice),!!t.structure)}}ue.jsonID("replace",te);class re extends ue{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(ui(e,this.from,this.gapFrom)||ui(e,this.gapTo,this.to)))return X.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return X.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?X.fromReplace(e,this.from,this.to,r):X.fail("Content does not fit in gap")}getMap(){return new be([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new re(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new re(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new re(t.from,t.to,t.gapFrom,t.gapTo,M.fromJSON(e,t.slice),t.insert,!!t.structure)}}ue.jsonID("replaceAround",re);function ui(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Lh(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),f=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==h&&o.mark.eq(d[g])?o.to=f:s.push(o=new Re(h,f,d[g])));l&&l.to==h?l.to=f:i.push(l=new dt(h,f,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function zh(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof fs){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],h;for(let f=0;f<s.length;f++){let p=s[f];p.step==i-1&&d.eq(s[f].style)&&(h=p)}h?(h.to=c,h.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Re(o.from,o.to,o.style)))}function Ui(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new te(l,u,M.empty));else{r=d;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new Re(l,u,c.marks[h]));if(s&&c.isText&&t.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new M(w.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new te(l+h.index,l+h.index+h[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(w.empty,!0);n.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function $h(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function sn(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!$h(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Bh(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=w.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=w.from(r.node(p).copy(u)),d++):a--;let h=w.empty,f=0;for(let p=i,g=!1;p>t;p--)g||s.after(p+1)<s.end(p)?(g=!0,h=w.from(s.node(p).copy(h)),f++):c++;n.step(new re(a,c,o,l,new M(u.append(h),d,f),u.size-d,!0))}function Wi(n,e,t=null,r=n){let s=_h(n,e),i=s&&Hh(r,e);return i?s.map(al).concat({type:e,attrs:t}).concat(i.map(al)):null}function al(n){return{type:n,attrs:null}}function _h(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Hh(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function Fh(n,e,t){let r=w.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=w.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new re(s,i,s,i,new M(r,0,0),t.length,!0))}function Vh(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&jh(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&bc(n,o,l,i),Ui(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),h=u.map(l+o.nodeSize,1);return n.step(new re(d,h,d+1,h-1,new M(w.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&kc(n,o,l,i),!1}})}function kc(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function bc(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`