@scalar/api-reference 1.23.0 → 1.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{Add-ngyZgYXx-CWPoroGU.cjs → Add-yNxGpRcH-LOS6C7pM.cjs} +1 -1
  3. package/dist/ArrowLeft-D7tW1xQo-BjB3hnI2.js +20 -0
  4. package/dist/ArrowLeft-D7tW1xQo-CyIsf2QR.cjs +1 -0
  5. package/dist/ArrowRight-DmO-sdb2-DDacgVg5.cjs +1 -0
  6. package/dist/ArrowRight-DmO-sdb2-H1bq-qXL.js +20 -0
  7. package/dist/Background-CU9VIbfN-hSED7pzA.cjs +1 -0
  8. package/dist/Background-CU9VIbfN-xKhyTRz6.js +17 -0
  9. package/dist/{Brackets-4I8OKomf-C2VxZ6iW.cjs → Brackets-CI207-BL-Cauv5rAc.cjs} +1 -1
  10. package/dist/CallToAction-XLYRSI1h-DKYrI3r6.cjs +1 -0
  11. package/dist/{CallToAction-EyQKkvbg-P3zHezrK.js → CallToAction-XLYRSI1h-Dk1vrnxq.js} +7 -8
  12. package/dist/{Checkmark-De7nq6cG-tp1nTP9w.cjs → Checkmark-DhbrPM0P-BALt5_hQ.cjs} +1 -1
  13. package/dist/Close-xHiYwS8Q-7fmTnaEC.cjs +1 -0
  14. package/dist/Close-xHiYwS8Q-DaTuBpAM.js +21 -0
  15. package/dist/{DarkMode-CBsV8Q_I-KODSbuOz.cjs → DarkMode-BMR457PH--Sj-ogZo.cjs} +1 -1
  16. package/dist/{DarkMode-CBsV8Q_I-C-P5vpQi.js → DarkMode-BMR457PH-CsW2G1Ro.js} +2 -4
  17. package/dist/DocsPage-Dwx7ZMU9-CfDSbvvO.cjs +1 -0
  18. package/dist/{DocsPage-rh2xwxKN-DGM8iLwe.js → DocsPage-Dwx7ZMU9-DKxfVlkW.js} +5 -6
  19. package/dist/Duplicate-DRWEv4R_-B49h9017.cjs +1 -0
  20. package/dist/Duplicate-DRWEv4R_-_bYPzpGJ.js +17 -0
  21. package/dist/Error-C5LiISnw-IKDSjs2b.js +16 -0
  22. package/dist/{Error-B_RGtWJI-kZYauS2f.cjs → Error-C5LiISnw-NBv6rBv1.cjs} +1 -1
  23. package/dist/FilterList-CS8Il7NE-BgVOPtsD.cjs +1 -0
  24. package/dist/{FilterList-CsAcE9em-BEVsn3KR.js → FilterList-CS8Il7NE-DP4JzPbN.js} +2 -2
  25. package/dist/{Folder-Cdcj4evh-JrdpqKfO.cjs → Folder-CTvnVSEo-ouH5odiT.cjs} +1 -1
  26. package/dist/{Folder-Cdcj4evh-BjFbVB1N.js → Folder-CTvnVSEo-tyPfoogp.js} +2 -4
  27. package/dist/Hide-BgcCtErz-CoFXGWU2.cjs +1 -0
  28. package/dist/Hide-BgcCtErz-YdhS0s7w.js +27 -0
  29. package/dist/LightDarkModeToggle-De3vO47x-BQRdUm4n.cjs +1 -0
  30. package/dist/LightDarkModeToggle-De3vO47x-D8h5xBww.js +16 -0
  31. package/dist/LightMode-BeoMphBY-Bbi5XCzQ.js +16 -0
  32. package/dist/{LightMode-Btz6vyT_-BTswDMO7.cjs → LightMode-BeoMphBY-_W1RBSYN.cjs} +1 -1
  33. package/dist/{Logo-mtzeKD8M-BPvZdgPX.cjs → Logo-DwEDtgj--C5AHDg9a.cjs} +1 -1
  34. package/dist/{LogoAPI-CaU5E6FK-H9aWX-Pj.cjs → LogoAPI-CohCfL3L-BkOy0M4B.cjs} +1 -1
  35. package/dist/LogoClient-Bq5O2QL2-BqHqCFAv.js +16 -0
  36. package/dist/{LogoClient-DdC-t_7P-CN0J-Vs6.cjs → LogoClient-Bq5O2QL2-S5itDPVb.cjs} +1 -1
  37. package/dist/Page-DA7CO5gc-D_LbSKiY.js +17 -0
  38. package/dist/Page-DA7CO5gc-DcduUMiC.cjs +1 -0
  39. package/dist/Play-Cd4-o7Ji-CBfi8CFf.cjs +1 -0
  40. package/dist/Play-Cd4-o7Ji-W8fYdYxD.js +16 -0
  41. package/dist/{Refresh-Be6vHEEi-jbqubK_U.js → Refresh-BHRzzQ8P-CAKdmF9h.js} +5 -6
  42. package/dist/Refresh-BHRzzQ8P-Il9DkP3P.cjs +1 -0
  43. package/dist/Response-DsTlT4S--C3Dp26r4.cjs +1 -0
  44. package/dist/Response-DsTlT4S--CiyBwPLY.js +20 -0
  45. package/dist/{Show-CMsTZAgT-CiyXRP8J.js → Show-CbiiMLUa-BCfT7JXE.js} +8 -11
  46. package/dist/Show-CbiiMLUa-dwb14rwM.cjs +1 -0
  47. package/dist/SideBarClosed-K53-CtXh-B185l2xR.cjs +1 -0
  48. package/dist/SideBarClosed-K53-CtXh-D5UXDtJk.js +17 -0
  49. package/dist/SideBarOpen-C7UgT82P-BGBt4u0H.cjs +1 -0
  50. package/dist/SideBarOpen-C7UgT82P-jT5NeYXy.js +21 -0
  51. package/dist/Sort-CaVMT7jM-KsvCed7U.js +16 -0
  52. package/dist/Sort-CaVMT7jM-ZDWW3rIv.cjs +1 -0
  53. package/dist/{Terminal-CKp--su5-DBOGXF1p.js → Terminal-DJ7x2McL-BTmQzliq.js} +9 -11
  54. package/dist/Terminal-DJ7x2McL-hJZC098M.cjs +1 -0
  55. package/dist/{Unlock-CY8UqJoE-xu6vPL1E.js → Unlock-HVYHMLxl-CsSSru63.js} +2 -4
  56. package/dist/{Unlock-CY8UqJoE-C46tGVrb.cjs → Unlock-HVYHMLxl-DmJa6-5V.cjs} +1 -1
  57. package/dist/{Upload-REIdL7RI-C6EgO_Ra.cjs → Upload-D_pwqBDY-BSr0Hcxs.cjs} +1 -1
  58. package/dist/{Upload-REIdL7RI-DTkPybxz.js → Upload-D_pwqBDY-DlTMOwHN.js} +2 -4
  59. package/dist/{User-Df5svMQ3-BviG15gd.js → User-BLGkPc5I-D-da3lPk.js} +2 -4
  60. package/dist/{User-Df5svMQ3-BzQcMZ_8.cjs → User-BLGkPc5I-rjkGtmo9.cjs} +1 -1
  61. package/dist/browser/standalone.js +3 -3
  62. package/dist/browser/webpack-stats.json +1 -1
  63. package/dist/helpers/parse.d.ts.map +1 -1
  64. package/dist/hooks/useNavState.d.ts.map +1 -1
  65. package/dist/{index-5LEUeUWq.cjs → index-2RHVMUuR.cjs} +3 -3
  66. package/dist/{index-C9hFgp4V.js → index-DZpcgWgX.js} +14 -14
  67. package/dist/{index-CG0fxk_6.cjs → index-RUiAJZIR.cjs} +67 -67
  68. package/dist/{index-6043OlDe.js → index-bduGFrkP.js} +998 -997
  69. package/dist/index.cjs +2 -2
  70. package/dist/index.js +2 -2
  71. package/dist/programming-framework-vuedotjs-Cim7D5tw-B-b4rAHl.cjs +1 -0
  72. package/dist/programming-framework-vuedotjs-Cim7D5tw-CxkKqgPk.js +17 -0
  73. package/dist/programming-language-clojure-uqYXn7U6-BhlaJXXC.js +16 -0
  74. package/dist/programming-language-clojure-uqYXn7U6-CPSSiHiG.cjs +1 -0
  75. package/dist/{programming-language-csharp-lqX1oWgb-D-Mz5PM1.js → programming-language-csharp-CGxYkVA6-BJwUA9TV.js} +7 -6
  76. package/dist/programming-language-csharp-CGxYkVA6-CGh_3iRh.cjs +1 -0
  77. package/dist/programming-language-go-CuKo8iD9-BAfNltt8.cjs +1 -0
  78. package/dist/{programming-language-go-DoJxWwT6-Bayz8oGO.js → programming-language-go-CuKo8iD9-BpDx-Uk5.js} +4 -3
  79. package/dist/programming-language-http-f3NXC-Ae-B7iG0CXa.cjs +1 -0
  80. package/dist/programming-language-http-f3NXC-Ae-CBKA8Rw2.js +16 -0
  81. package/dist/programming-language-java-BBodetdf-BsfrQqMF.cjs +1 -0
  82. package/dist/programming-language-java-BBodetdf-Do7Uo0sg.js +18 -0
  83. package/dist/programming-language-json-Dq_K-q5f-CD7uIR91.js +17 -0
  84. package/dist/programming-language-json-Dq_K-q5f-MbJWJ6qp.cjs +1 -0
  85. package/dist/programming-language-kotlin-eTASnmL3-DXA6cq0H.cjs +1 -0
  86. package/dist/{programming-language-shell-BsTa1xI7-Mbhl6UDK.js → programming-language-kotlin-eTASnmL3-OG0Z7YBS.js} +3 -3
  87. package/dist/programming-language-node-oucaVOgY-B29T_bjm.cjs +1 -0
  88. package/dist/programming-language-node-oucaVOgY-BvGMDoeB.js +17 -0
  89. package/dist/{programming-language-objc-BQXSOBsX-UyJQMZSh.js → programming-language-objc-CPgQxmNi-D44rlWUI.js} +2 -1
  90. package/dist/programming-language-objc-CPgQxmNi-OEqaI5Rl.cjs +1 -0
  91. package/dist/programming-language-ocaml-Q1-Jv5Q5-BUqWtkTy.cjs +1 -0
  92. package/dist/{programming-language-ocaml-BEz7gGv7-L9a3ID8U.js → programming-language-ocaml-Q1-Jv5Q5-QKB_Bc7i.js} +8 -7
  93. package/dist/programming-language-powershell-xLOxAYP_-Ck82ebOe.js +20 -0
  94. package/dist/programming-language-powershell-xLOxAYP_-fFTn4fJl.cjs +1 -0
  95. package/dist/{programming-language-r-BGoKwua9-BguWvgpu.js → programming-language-r-Ch3T1qiC-BO-CjZZM.js} +5 -4
  96. package/dist/programming-language-r-Ch3T1qiC-Df1j2gqW.cjs +1 -0
  97. package/dist/programming-language-shell-uj1zoCVW-BZSmYs-C.js +16 -0
  98. package/dist/programming-language-shell-uj1zoCVW-D8xaixWm.cjs +1 -0
  99. package/dist/programming-script-code-CUHv6qR8-DMwI7fYl.js +21 -0
  100. package/dist/programming-script-code-CUHv6qR8-DY9nCXfq.cjs +1 -0
  101. package/dist/{programming-tool-git-DDnQ1zGD-Bi0r1H3m.cjs → programming-tool-git-C-BMJCAo-BmrHT5RO.cjs} +1 -1
  102. package/dist/programming-tool-git-C-BMJCAo-DUuF7AA-.js +16 -0
  103. package/dist/style.css +1 -1
  104. package/package.json +5 -5
  105. package/dist/ArrowLeft-aY17W2aS-B48Wrva9.cjs +0 -1
  106. package/dist/ArrowLeft-aY17W2aS-Cn6xpEuC.js +0 -21
  107. package/dist/ArrowRight-DEMtdoE7-BVEqp3bA.cjs +0 -1
  108. package/dist/ArrowRight-DEMtdoE7-DTUgvJ5B.js +0 -21
  109. package/dist/Background-DcRhSHgf-7l5O3oYH.cjs +0 -1
  110. package/dist/Background-DcRhSHgf-D9bLWDd3.js +0 -18
  111. package/dist/CallToAction-EyQKkvbg-Eo_9FsiI.cjs +0 -1
  112. package/dist/Close-CW3z42qZ-C-nzSJmV.js +0 -20
  113. package/dist/Close-CW3z42qZ-CAmO5dZ5.cjs +0 -1
  114. package/dist/DocsPage-rh2xwxKN-EMPYZ-u6.cjs +0 -1
  115. package/dist/Duplicate-BPlzNpcf-Uk5uZ5gd.cjs +0 -1
  116. package/dist/Duplicate-BPlzNpcf-hfR5nT2J.js +0 -22
  117. package/dist/Error-B_RGtWJI-D-cqIU7Z.js +0 -18
  118. package/dist/FilterList-CsAcE9em-CSRdO8He.cjs +0 -1
  119. package/dist/Hide-DBLY4PPo-BcbT7C9e.js +0 -25
  120. package/dist/Hide-DBLY4PPo-Ch-56g-E.cjs +0 -1
  121. package/dist/LightDarkModeToggle-BkvMimDa-CCZGR9vi.js +0 -20
  122. package/dist/LightDarkModeToggle-BkvMimDa-D2TvUWMc.cjs +0 -1
  123. package/dist/LightMode-Btz6vyT_-D8lhPTNZ.js +0 -18
  124. package/dist/LogoClient-DdC-t_7P-BJVLusot.js +0 -18
  125. package/dist/Page-B7rVuhpl-BdUgg7Vj.js +0 -18
  126. package/dist/Page-B7rVuhpl-DfOGMkFM.cjs +0 -1
  127. package/dist/Play-BrVagRQA-DwHMdiTR.cjs +0 -1
  128. package/dist/Play-BrVagRQA-ibf1r6jV.js +0 -19
  129. package/dist/Refresh-Be6vHEEi-CbpDdpiC.cjs +0 -1
  130. package/dist/Response-Dq9pM-ZU-C6e6VGNi.cjs +0 -1
  131. package/dist/Response-Dq9pM-ZU-gbj_nXZc.js +0 -21
  132. package/dist/Show-CMsTZAgT-C7wHpN2M.cjs +0 -1
  133. package/dist/SideBarClosed-CYUNS2XM-BrkKCJbJ.cjs +0 -1
  134. package/dist/SideBarClosed-CYUNS2XM-CyV-4FlW.js +0 -18
  135. package/dist/SideBarOpen-BOxW49_U-1NTFL81x.cjs +0 -1
  136. package/dist/SideBarOpen-BOxW49_U-_LagsnZP.js +0 -18
  137. package/dist/Sort-oTjBhJFQ-ClKvQJ9G.cjs +0 -1
  138. package/dist/Sort-oTjBhJFQ-CxatimqM.js +0 -19
  139. package/dist/Terminal-CKp--su5-B0pjt_Yz.cjs +0 -1
  140. package/dist/programming-framework-vuedotjs-Cv46W2aB-5jp2dhVz.js +0 -18
  141. package/dist/programming-framework-vuedotjs-Cv46W2aB-CSjgwP_a.cjs +0 -1
  142. package/dist/programming-language-clojure-Cvmzky8x-BfidiK-3.js +0 -15
  143. package/dist/programming-language-clojure-Cvmzky8x-DNGq1StI.cjs +0 -1
  144. package/dist/programming-language-csharp-lqX1oWgb-CxB0WO6j.cjs +0 -1
  145. package/dist/programming-language-go-DoJxWwT6-Cglob461.cjs +0 -1
  146. package/dist/programming-language-http-wMYwFS1I-CibNNxob.cjs +0 -1
  147. package/dist/programming-language-http-wMYwFS1I-nvzm47LE.js +0 -20
  148. package/dist/programming-language-java-BCxG2T_w-01jrBctS.js +0 -26
  149. package/dist/programming-language-java-BCxG2T_w-CK_n5AN7.cjs +0 -1
  150. package/dist/programming-language-json-vEX_g7Zi-D-_9dDj_.js +0 -22
  151. package/dist/programming-language-json-vEX_g7Zi-DzQJGa14.cjs +0 -1
  152. package/dist/programming-language-kotlin-DKV8vP9h-C-cTXwXu.js +0 -15
  153. package/dist/programming-language-kotlin-DKV8vP9h-DlGiFCvD.cjs +0 -1
  154. package/dist/programming-language-node-Xsgx38lm-4rntKdSG.cjs +0 -1
  155. package/dist/programming-language-node-Xsgx38lm-Be410R9Y.js +0 -18
  156. package/dist/programming-language-objc-BQXSOBsX-ChHn3rog.cjs +0 -1
  157. package/dist/programming-language-ocaml-BEz7gGv7-pjGiVCW2.cjs +0 -1
  158. package/dist/programming-language-powershell-C9DkSp36-C7fZCJBW.js +0 -19
  159. package/dist/programming-language-powershell-C9DkSp36-RwdG5MCL.cjs +0 -1
  160. package/dist/programming-language-r-BGoKwua9-DynRqt7q.cjs +0 -1
  161. package/dist/programming-language-shell-BsTa1xI7-CEpfIQQF.cjs +0 -1
  162. package/dist/programming-script-code-DQN1veb2-CcjBWaNF.js +0 -22
  163. package/dist/programming-script-code-DQN1veb2-DWnN18iL.cjs +0 -1
  164. package/dist/programming-tool-git-DDnQ1zGD-CGHot6Y8.js +0 -18
  165. package/dist/{Add-ngyZgYXx-DoqFEwg6.js → Add-yNxGpRcH-i9lEuw9B.js} +1 -1
  166. package/dist/{Brackets-4I8OKomf-DWpQfvXD.js → Brackets-CI207-BL-BbcUG0IL.js} +1 -1
  167. package/dist/{Checkmark-De7nq6cG-I65LWhZ2.js → Checkmark-DhbrPM0P-CFDz_1Nm.js} +1 -1
  168. package/dist/{Logo-mtzeKD8M-_nfcd_3S.js → Logo-DwEDtgj--CRDrhASr.js} +1 -1
  169. package/dist/{LogoAPI-CaU5E6FK-BIDyFPeR.js → LogoAPI-CohCfL3L-DgS67ep-.js} +1 -1
@@ -1,38 +1,38 @@
1
1
  "use strict";var Pw=Object.defineProperty;var Iw=(r,e,t)=>e in r?Pw(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var fp=(r,e,t)=>(Iw(r,typeof e!="symbol"?e+"":e,t),t);const i=require("vue"),Le=require("@headlessui/vue"),Xe=require("@vueuse/core"),Mw=require("axios"),Bs=require("prismjs"),Dw=require("@vcarl/remark-headings"),Pi=require("github-slugger"),Qg=require("remark-parse"),Vw=require("remark-stringify"),Zg=require("unified"),pp=require("unhead"),e0=require("httpsnippet-lite"),Rw=require("rehype-external-links"),Lw=require("rehype-format"),jw=require("rehype-highlight"),Fw=require("rehype-raw"),la=require("rehype-sanitize"),qw=require("rehype-stringify"),zw=require("remark-gfm"),Hw=require("remark-rehype"),Uw=require("fuse.js"),Kw=":root{--scalar-text-decoration: underline;--scalar-text-decoration-hover: underline}.light-mode,.light-mode .dark-mode{--scalar-background-1: #f9f9f9;--scalar-background-2: #f1f1f1;--scalar-background-3: #e7e7e7;--scalar-background-card: #fff;--scalar-color-1: #2a2f45;--scalar-color-2: #757575;--scalar-color-3: #8e8e8e;--scalar-color-accent: var(--scalar-color-1);--scalar-background-accent: var(--scalar-background-3);--scalar-border-color: rgba(0, 0, 0, .1)}.dark-mode{--scalar-background-1: #131313;--scalar-background-2: #1d1d1d;--scalar-background-3: #272727;--scalar-background-card: #1d1d1d;--scalar-color-1: rgba(255, 255, 255, .9);--scalar-color-2: rgba(255, 255, 255, .62);--scalar-color-3: rgba(255, 255, 255, .44);--scalar-color-accent: var(--scalar-color-1);--scalar-background-accent: var(--scalar-background-3);--scalar-border-color: rgba(255, 255, 255, .1)}.light-mode .t-doc__sidebar,.dark-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-active-background: var(--scalar-background-accent);--scalar-sidebar-color-active: var(--scalar-color-accent);--scalar-sidebar-search-background: transparent;--scalar-sidebar-search-color: var(--scalar-color-3);--scalar-sidebar-search-border-color: var(--scalar-border-color);--scalar-sidebar-indent-border: var(--scalar-sidebar-border-color);--scalar-sidebar-indent-border-hover: var(--scalar-sidebar-border-color);--scalar-sidebar-indent-border-active: var(--scalar-sidebar-border-color)}.light-mode .dark-mode,.light-mode{--scalar-color-green: #069061;--scalar-color-red: #ef0006;--scalar-color-yellow: #edbe20;--scalar-color-blue: #0082d0;--scalar-color-orange: #fb892c;--scalar-color-purple: #5203d1;--scalar-button-1: rgba(0, 0, 0, 1);--scalar-button-1-hover: rgba(0, 0, 0, .8);--scalar-button-1-color: rgba(255, 255, 255, .9)}.dark-mode{--scalar-color-green: #00b648;--scalar-color-red: #dd2f2c;--scalar-color-yellow: #ffc90d;--scalar-color-blue: #4eb3ec;--scalar-color-orange: #ff8d4d;--scalar-color-purple: #b191f9;--scalar-button-1: rgba(255, 255, 255, 1);--scalar-button-1-hover: rgba(255, 255, 255, .9);--scalar-button-1-color: black}.scalar-api-client__item,.scalar-card,.dark-mode .dark-mode.scalar-card{--scalar-background-1: var(--scalar-background-card);--scalar-background-2: var(--scalar-background-1);--scalar-background-3: var(--scalar-background-1)}.dark-mode .dark-mode.scalar-card{--scalar-background-3: var(--scalar-background-3)}.t-doc__sidebar{--scalar-color-green: var(--scalar-color-1);--scalar-color-red: var(--scalar-color-1);--scalar-color-yellow: var(--scalar-color-1);--scalar-color-blue: var(--scalar-color-1);--scalar-color-orange: var(--scalar-color-1);--scalar-color-purple: var(--scalar-color-1)}",Ww=":root{--scalar-text-decoration: underline;--scalar-text-decoration-hover: underline}.light-mode{--scalar-background-1: #f0f2f5;--scalar-background-2: #eaecf0;--scalar-background-3: #e0e2e6;--scalar-border-color: rgb(228, 228, 231);--scalar-color-1: rgb(9, 9, 11);--scalar-color-2: rgb(113, 113, 122);--scalar-color-3: rgba(25, 25, 28, .5);--scalar-color-accent: var(--scalar-color-1);--scalar-background-accent: #8ab4f81f;--scalar-code-language-color-supersede: var(--scalar-color-1)}.light-mode .scalar-card.dark-mode,.dark-mode{--scalar-background-1: #000e23;--scalar-background-2: #01132e;--scalar-background-3: #03193b;--scalar-border-color: rgba(255, 255, 255, .12);--scalar-color-1: #fafafa;--scalar-color-2: rgb(161, 161, 170);--scalar-color-3: rgba(255, 255, 255, .533);--scalar-color-accent: var(--scalar-color-1);--scalar-background-accent: #8ab4f81f;--scalar-code-language-color-supersede: var(--scalar-color-1)}.light-mode .t-doc__sidebar,.dark-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-active-background: var(--scalar-background-3);--scalar-sidebar-color-active: var(--scalar-color-accent);--scalar-sidebar-search-background: rgba(255, 255, 255, .1);--scalar-sidebar-search-border-color: var(--scalar-border-color);--scalar-sidebar-search-color: var(--scalar-color-3);z-index:1}.light-mode .t-doc__sidebar{--scalar-sidebar-search-background: white}.light-mode{--scalar-color-green: #069061;--scalar-color-red: #ef0006;--scalar-color-yellow: #edbe20;--scalar-color-blue: #0082d0;--scalar-color-orange: #fb892c;--scalar-color-purple: #5203d1;--scalar-button-1: rgba(0, 0, 0, 1);--scalar-button-1-hover: rgba(0, 0, 0, .8);--scalar-button-1-color: rgba(255, 255, 255, .9)}.dark-mode{--scalar-color-green: rgba(69, 255, 165, .823);--scalar-color-red: #ff8589;--scalar-color-yellow: #ffcc4d;--scalar-color-blue: #6bc1fe;--scalar-color-orange: #f98943;--scalar-color-purple: #b191f9;--scalar-button-1: rgba(255, 255, 255, 1);--scalar-button-1-hover: rgba(255, 255, 255, .9);--scalar-button-1-color: black}@keyframes headerbackground{0%{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}to{background:var(--header-background-1);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}}.dark-mode h2.t-editor__heading,.dark-mode .t-editor__page-title h1,.dark-mode h1.section-header,.dark-mode .markdown h1,.dark-mode .markdown h2,.dark-mode .markdown h3,.dark-mode .markdown h4,.dark-mode .markdown h5,.dark-mode .markdown h6{-webkit-text-fill-color:transparent;background-image:linear-gradient(to right bottom,#fff 30%,#ffffff61);-webkit-background-clip:text;background-clip:text}.section-flare-item:nth-of-type(1){--c1: #ffffff;--c2: #babfd8;--c3: #2e8bb2;--c4: #1a8593;--c5: #0a143e;--c6: #0a0f52;--c7: #2341b8;--solid: var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6), var(--c7);--solid-wrap: var(--solid), var(--c1);--trans: var(--c1), transparent, var(--c2), transparent, var(--c3), transparent, var(--c4), transparent, var(--c5), transparent, var(--c6), transparent, var(--c7);--trans-wrap: var(--trans), transparent, var(--c1);background:radial-gradient(circle,var(--trans)),conic-gradient(from 180deg,var(--trans-wrap)),radial-gradient(circle,var(--trans)),conic-gradient(var(--solid-wrap));width:70vw;height:700px;border-radius:50%;filter:blur(100px);z-index:0;right:0;position:absolute;transform:rotate(-45deg);top:-300px;opacity:.3}.section-flare-item:nth-of-type(3){--star-color: #6b9acc;--star-color2: #446b8d;--star-color3: #3e5879;background-image:radial-gradient(2px 2px at 20px 30px,var(--star-color2),rgba(0,0,0,0)),radial-gradient(2px 2px at 40px 70px,var(--star-color),rgba(0,0,0,0)),radial-gradient(2px 2px at 50px 160px,var(--star-color3),rgba(0,0,0,0)),radial-gradient(2px 2px at 90px 40px,var(--star-color),rgba(0,0,0,0)),radial-gradient(2px 2px at 130px 80px,var(--star-color),rgba(0,0,0,0)),radial-gradient(2px 2px at 160px 120px,var(--star-color3),rgba(0,0,0,0));background-repeat:repeat;background-size:200px 200px;width:100%;height:100%;-webkit-mask-image:radial-gradient(ellipse at 100% 0%,black 40%,transparent 70%);mask-image:radial-gradient(ellipse at 100% 0%,black 40%,transparent 70%)}.section-flare{top:-150px!important;height:100vh;background:linear-gradient(#000,var(--scalar-background-1));width:100vw}.light-mode .section-flare{display:none}.light-mode .scalar-card{--scalar-background-1: #fff;--scalar-background-2: #fff;--scalar-background-3: #fff}",Gw=':root{--scalar-text-decoration: underline;--scalar-text-decoration-hover: underline}.light-mode{--scalar-color-1: rgb(9, 9, 11);--scalar-color-2: rgb(113, 113, 122);--scalar-color-3: rgba(25, 25, 28, .5);--scalar-color-accent: var(--scalar-color-1);--scalar-background-1: #fff;--scalar-background-2: #f4f4f5;--scalar-background-3: #e3e3e6;--scalar-background-accent: #8ab4f81f;--scalar-border-color: rgb(228, 228, 231);--scalar-code-language-color-supersede: var(--scalar-color-1)}.dark-mode{--scalar-color-1: #fafafa;--scalar-color-2: rgb(161, 161, 170);--scalar-color-3: rgba(255, 255, 255, .533);--scalar-color-accent: var(--scalar-color-1);--scalar-background-1: #09090b;--scalar-background-2: #18181b;--scalar-background-3: #2c2c30;--scalar-background-accent: #8ab4f81f;--scalar-border-color: rgba(255, 255, 255, .12);--scalar-code-language-color-supersede: var(--scalar-color-1)}.light-mode .t-doc__sidebar,.dark-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-active-background: var(--scalar-background-3);--scalar-sidebar-color-active: var(--scalar-color-accent);--scalar-sidebar-search-background: transparent;--scalar-sidebar-search-border-color: var(--scalar-border-color);--scalar-sidebar-search-color: var(--scalar-color-3)}.light-mode .t-doc__sidebar{--scalar-sidebar-item-active-background: var(--scalar-background-2)}.light-mode{--scalar-color-green: #069061;--scalar-color-red: #ef0006;--scalar-color-yellow: #edbe20;--scalar-color-blue: #0082d0;--scalar-color-orange: #fb892c;--scalar-color-purple: #5203d1;--scalar-button-1: rgba(0, 0, 0, 1);--scalar-button-1-hover: rgba(0, 0, 0, .8);--scalar-button-1-color: rgba(255, 255, 255, .9)}.dark-mode{--scalar-color-green: rgba(69, 255, 165, .823);--scalar-color-red: #ff8589;--scalar-color-yellow: #ffcc4d;--scalar-color-blue: #6bc1fe;--scalar-color-orange: #f98943;--scalar-color-purple: #b191f9;--scalar-button-1: rgba(255, 255, 255, 1);--scalar-button-1-hover: rgba(255, 255, 255, .9);--scalar-button-1-color: black}.dark-mode h2.t-editor__heading,.dark-mode .t-editor__page-title h1,.dark-mode h1.section-header,.dark-mode .markdown h1,.dark-mode .markdown h2,.dark-mode .markdown h3,.dark-mode .markdown h4,.dark-mode .markdown h5,.dark-mode .markdown h6{-webkit-text-fill-color:transparent;background-image:linear-gradient(to right bottom,#fff 30%,#ffffff61);-webkit-background-clip:text;background-clip:text}.examples .scalar-card-footer{--scalar-background-3: transparent;padding-top:0}.section-flare{width:100vw;height:550px;position:relative}.section-flare-item:nth-of-type(1){position:absolute;width:100vw;height:550px;--stripesDark: repeating-linear-gradient( 100deg, #000 0%, #000 7%, transparent 10%, transparent 12%, #000 16% );--rainbow: repeating-linear-gradient( 100deg, #fff 10%, #fff 16%, #fff 22%, #fff 30% );background-image:var(--stripesDark),var(--rainbow);background-size:300%,200%;background-position:50% 50%,50% 50%;filter:invert(100%);-webkit-mask-image:radial-gradient(ellipse at 100% 0%,black 40%,transparent 70%);mask-image:radial-gradient(ellipse at 100% 0%,black 40%,transparent 70%);pointer-events:none;opacity:.07}.dark-mode .section-flare-item:nth-of-type(1){background-image:var(--stripesDark),var(--rainbow);filter:opacity(50%) saturate(200%);opacity:.25;height:350px}.section-flare-item:nth-of-type(1):after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-image:var(--stripesDark),var(--rainbow);background-size:200%,100%;background-attachment:fixed;mix-blend-mode:difference}.dark-mode .section-flare:after{background-image:var(--stripesDark),var(--rainbow)}.section-flare-item:nth-of-type(2){--star-color: #fff;--star-color2: #fff;--star-color3: #fff;width:100%;height:100%;position:absolute;background-image:radial-gradient(2px 2px at 20px 30px,var(--star-color2),rgba(0,0,0,0)),radial-gradient(2px 2px at 40px 70px,var(--star-color),rgba(0,0,0,0)),radial-gradient(2px 2px at 50px 160px,var(--star-color3),rgba(0,0,0,0)),radial-gradient(2px 2px at 90px 40px,var(--star-color),rgba(0,0,0,0)),radial-gradient(2px 2px at 130px 80px,var(--star-color),rgba(0,0,0,0)),radial-gradient(2px 2px at 160px 120px,var(--star-color3),rgba(0,0,0,0));background-repeat:repeat;background-size:200px 200px;-webkit-mask-image:radial-gradient(ellipse at 100% 0%,black 40%,transparent 70%);mask-image:radial-gradient(ellipse at 100% 0%,black 40%,transparent 70%);opacity:.2}',t0=".light-mode{--scalar-background-1: #fff;--scalar-background-2: #f6f6f6;--scalar-background-3: #e7e7e7;--scalar-background-accent: #8ab4f81f;--scalar-color-1: #2a2f45;--scalar-color-2: #757575;--scalar-color-3: #8e8e8e;--scalar-color-accent: #0099ff;--scalar-border-color: rgba(0, 0, 0, .1)}.dark-mode{--scalar-background-1: #0f0f0f;--scalar-background-2: #1a1a1a;--scalar-background-3: #272727;--scalar-color-1: rgba(255, 255, 255, .9);--scalar-color-2: rgba(255, 255, 255, .62);--scalar-color-3: rgba(255, 255, 255, .44);--scalar-color-accent: #3ea6ff;--scalar-background-accent: #3ea6ff1f;--scalar-border-color: rgba(255, 255, 255, .1)}.light-mode .t-doc__sidebar,.dark-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-active-background: var(--scalar-background-2);--scalar-sidebar-color-active: var(--scalar-color-1);--scalar-sidebar-search-background: transparent;--scalar-sidebar-search-color: var(--scalar-color-3);--scalar-sidebar-search-border-color: var(--scalar-border-color)}.light-mode{--scalar-color-green: #069061;--scalar-color-red: #ef0006;--scalar-color-yellow: #edbe20;--scalar-color-blue: #0082d0;--scalar-color-orange: #fb892c;--scalar-color-purple: #5203d1;--scalar-button-1: rgba(0, 0, 0, 1);--scalar-button-1-hover: rgba(0, 0, 0, .8);--scalar-button-1-color: rgba(255, 255, 255, .9)}.dark-mode{--scalar-color-green: #00b648;--scalar-color-red: #dc1b19;--scalar-color-yellow: #ffc90d;--scalar-color-blue: #4eb3ec;--scalar-color-orange: #ff8d4d;--scalar-color-purple: #b191f9;--scalar-button-1: rgba(255, 255, 255, 1);--scalar-button-1-hover: rgba(255, 255, 255, .9);--scalar-button-1-color: black}",Jw=".light-mode{--scalar-color-1: #2a2f45;--scalar-color-2: #757575;--scalar-color-3: #8e8e8e;--scalar-color-accent: #7070ff;--scalar-background-1: #fff;--scalar-background-2: #f6f6f6;--scalar-background-3: #e7e7e7;--scalar-background-accent: #7070ff1f;--scalar-border-color: rgba(0, 0, 0, .1);--scalar-code-language-color-supersede: var(--scalar-color-3)}.dark-mode{--scalar-color-1: #f7f8f8;--scalar-color-2: rgb(180, 188, 208);--scalar-color-3: #b4bcd099;--scalar-color-accent: #828fff;--scalar-background-1: #000212;--scalar-background-2: rgba(255, 255, 255, .05);--scalar-background-3: rgba(255, 255, 255, .09);--scalar-background-accent: #8ab4f81f;--scalar-border-color: #242537;--scalar-code-language-color-supersede: var(--scalar-color-3)}.light-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-active-background: var(--scalar-background-accent);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-color-active: var(--scalar-color-accent);--scalar-sidebar-search-background: rgba(0, 0, 0, .05);--scalar-sidebar-search-border-color: 1px solid rgba(0, 0, 0, .05);--scalar-sidebar-search-color: var(--scalar-color-3);--scalar-background-2: rgba(0, 0, 0, .03)}.dark-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-active-background: rgba(255, 255, 255, .1);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-color-active: var(--scalar-color-accent);--scalar-sidebar-search-background: rgba(255, 255, 255, .1);--scalar-sidebar-search-border-color: 1px solid rgba(255, 255, 255, .05);--scalar-sidebar-search-color: var(--scalar-color-3)}.light-mode{--scalar-color-green: #069061;--scalar-color-red: #ef0006;--scalar-color-yellow: #edbe20;--scalar-color-blue: #0082d0;--scalar-color-orange: #fb892c;--scalar-color-purple: #5203d1;--scalar-button-1: rgba(0, 0, 0, 1);--scalar-button-1-hover: rgba(0, 0, 0, .8);--scalar-button-1-color: rgba(255, 255, 255, .9)}.dark-mode{--scalar-color-green: #00b648;--scalar-color-red: #dc1b19;--scalar-color-yellow: #ffc90d;--scalar-color-blue: #4eb3ec;--scalar-color-orange: #ff8d4d;--scalar-color-purple: #b191f9;--scalar-button-1: rgba(255, 255, 255, 1);--scalar-button-1-hover: rgba(255, 255, 255, .9);--scalar-button-1-color: black}.dark-mode h2.t-editor__heading,.dark-mode .t-editor__page-title h1,.dark-mode h1.section-header,.dark-mode .markdown h1,.dark-mode .markdown h2,.dark-mode .markdown h3,.dark-mode .markdown h4,.dark-mode .markdown h5,.dark-mode .markdown h6{-webkit-text-fill-color:transparent;background-image:linear-gradient(to right bottom,#fff 30%,#ffffff61);-webkit-background-clip:text;background-clip:text}.sidebar-search{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}@keyframes headerbackground{0%{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}to{background:var(--header-background-1);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}}.dark-mode .scalar-card{background:#ffffff0d!important}.dark-mode .scalar-card *{--scalar-background-2: transparent !important;--scalar-background-1: transparent !important}.light-mode .dark-mode.scalar-card *,.light-mode .dark-mode.scalar-card{--scalar-background-1: #0d0f1e !important;--scalar-background-2: #0d0f1e !important;--scalar-background-3: #191b29 !important}.light-mode .dark-mode.scalar-card{background:#191b29!important}.badge{box-shadow:0 0 0 1px var(--scalar-border-color);margin-right:6px}.table-row.required-parameter .table-row-item:nth-of-type(2):after{background:transparent;box-shadow:none}.section-flare{width:100vw;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(120,119,198,.3),transparent);height:100vh}",Yw=":root{--scalar-text-decoration: underline;--scalar-text-decoration-hover: underline}.light-mode{--scalar-background-1: #f9f6f0;--scalar-background-2: #f2efe8;--scalar-background-3: #e9e7e2;--scalar-border-color: rgba(203, 165, 156, .6);--scalar-color-1: #c75549;--scalar-color-2: #c75549;--scalar-color-3: #c75549;--scalar-color-accent: #c75549;--scalar-background-accent: #dcbfa81f;--scalar-code-language-color-supersede: var(--scalar-color-1)}.dark-mode{--scalar-background-1: #140507;--scalar-background-2: #20090c;--scalar-background-3: #321116;--scalar-border-color: rgba(255, 255, 255, .1);--scalar-color-1: rgba(255, 255, 255, .9);--scalar-color-2: rgba(255, 255, 255, .62);--scalar-color-3: rgba(255, 255, 255, .44);--scalar-color-accent: rgba(255, 255, 255, .9);--scalar-background-accent: #441313;--scalar-code-language-color-supersede: var(--scalar-color-1)}.light-mode .t-doc__sidebar,.dark-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-active-background: var(--scalar-background-3);--scalar-sidebar-color-active: var(--scalar-color-accent);--scalar-sidebar-search-background: rgba(255, 255, 255, .1);--scalar-sidebar-search-color: var(--scalar-color-3);--scalar-sidebar-search-border-color: var(--scalar-border-color);z-index:1}.light-mode{--scalar-color-green: #09533a;--scalar-color-red: #aa181d;--scalar-color-yellow: #ab8d2b;--scalar-color-blue: #19689a;--scalar-color-orange: #b26c34;--scalar-color-purple: #4c2191;--scalar-button-1: rgba(0, 0, 0, 1);--scalar-button-1-hover: rgba(0, 0, 0, .8);--scalar-button-1-color: rgba(255, 255, 255, .9)}.dark-mode{--scalar-color-green: rgba(69, 255, 165, .823);--scalar-color-red: #ff8589;--scalar-color-yellow: #ffcc4d;--scalar-color-blue: #6bc1fe;--scalar-color-orange: #f98943;--scalar-color-purple: #b191f9;--scalar-button-1: rgba(255, 255, 255, 1);--scalar-button-1-hover: rgba(255, 255, 255, .9);--scalar-button-1-color: black}.dark-mode h2.t-editor__heading,.dark-mode .t-editor__page-title h1,.dark-mode h1.section-header,.dark-mode .markdown h1,.dark-mode .markdown h2,.dark-mode .markdown h3,.dark-mode .markdown h4,.dark-mode .markdown h5,.dark-mode .markdown h6{-webkit-text-fill-color:transparent;background-image:linear-gradient(to right bottom,#fff 30%,#ffffff61);-webkit-background-clip:text;background-clip:text}.light-mode .t-doc__sidebar{--scalar-sidebar-search-background: white}.examples .scalar-card-footer{--scalar-background-3: transparent;padding-top:0}.section-flare-item:nth-of-type(1){background:#d25019;width:80vw;height:500px;margin-top:-150px;border-radius:50%;filter:blur(100px);z-index:0}.light-mode .section-flare{display:none}.section-flare{top:-150px!important;height:100vh;right:-400px!important;left:initial}",Xw=".light-mode{color-scheme:light;--scalar-color-1: #000000;--scalar-color-2: #000000;--scalar-color-3: #000000;--scalar-color-accent: #645b0f;--scalar-background-1: #ccc9b3;--scalar-background-2: #c2bfaa;--scalar-background-3: #b8b5a1;--scalar-background-accent: #000000;--scalar-border-color: rgba(0, 0, 0, .2);--scalar-scrollbar-color: rgba(0, 0, 0, .18);--scalar-scrollbar-color-active: rgba(0, 0, 0, .36);--scalar-lifted-brightness: 1;--scalar-backdrop-brightness: 1;--scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, .11);--scalar-shadow-2: rgba(0, 0, 0, .08) 0px 13px 20px 0px, rgba(0, 0, 0, .08) 0px 3px 8px 0px, var(--scalar-border-color) 0px 0 0 1px;--scalar-button-1: rgb(49 53 56);--scalar-button-1-color: #fff;--scalar-button-1-hover: rgb(28 31 33);--scalar-color-red: #b91c1c;--scalar-color-orange: #a16207;--scalar-color-green: #047857;--scalar-color-blue: #1d4ed8;--scalar-color-orange: #c2410c;--scalar-color-purple: #6d28d9}.dark-mode{color-scheme:dark;--scalar-color-1: #fffef3;--scalar-color-2: #fffef3;--scalar-color-3: #fffef3;--scalar-color-accent: #c3b531;--scalar-background-1: #313332;--scalar-background-2: #393b3a;--scalar-background-3: #414342;--scalar-background-accent: #fffef3;--scalar-border-color: rgba(255, 255, 255, .1);--scalar-scrollbar-color: rgba(255, 255, 255, .24);--scalar-scrollbar-color-active: rgba(255, 255, 255, .48);--scalar-lifted-brightness: 1.45;--scalar-backdrop-brightness: .5;--scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, .11);--scalar-shadow-2: rgba(15, 15, 15, .2) 0px 3px 6px, rgba(15, 15, 15, .4) 0px 9px 24px, 0 0 0 1px rgba(255, 255, 255, .1);--scalar-button-1: #f6f6f6;--scalar-button-1-color: #000;--scalar-button-1-hover: #e7e7e7;--scalar-color-green: #00b648;--scalar-color-red: #dc1b19;--scalar-color-yellow: #ffc90d;--scalar-color-blue: #4eb3ec;--scalar-color-orange: #ff8d4d;--scalar-color-purple: #b191f9}.light-mode .t-doc__sidebar,.dark-mode .sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-active-background: var(--scalar-background-accent);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-color-active: var(--scalar-sidebar-background-1);--scalar-sidebar-search-background: var(--scalar-background-3);--scalar-sidebar-search-border-color: var(--scalar-sidebar-search-background);--scalar-sidebar-search--color: var(--scalar-color-3)}",Qw=".light-mode{--scalar-background-1: #fff;--scalar-background-2: #f5f6f8;--scalar-background-3: #eceef1;--scalar-color-1: #2a2f45;--scalar-color-2: #757575;--scalar-color-3: #8e8e8e;--scalar-color-accent: #5469d4;--scalar-background-accent: #5469d41f;--scalar-border-color: rgba(215, 215, 206, .5)}.dark-mode{--scalar-background-1: #15171c;--scalar-background-2: #1c1e24;--scalar-background-3: #22252b;--scalar-color-1: #fafafa;--scalar-color-2: #c9ced8;--scalar-color-3: #8c99ad;--scalar-color-accent: #5469d4;--scalar-background-accent: #5469d41f;--scalar-border-color: rgba(255, 255, 255, .12)}.light-mode .t-doc__sidebar,.dark-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-hover-background: var(--scalar-background-3);--scalar-sidebar-item-active-background: var(--scalar-background-accent);--scalar-sidebar-color-active: var(--scalar-color-accent);--scalar-sidebar-search-background: var(--scalar-background-1);--scalar-sidebar-search-color: var(--scalar-color-3);--scalar-sidebar-search-border-color: var(--scalar-border-color)}.light-mode{--scalar-color-green: #17803d;--scalar-color-red: #e10909;--scalar-color-yellow: #edbe20;--scalar-color-blue: #1763a6;--scalar-color-orange: #e25b09;--scalar-color-purple: #5c3993;--scalar-button-1: rgba(0, 0, 0, 1);--scalar-button-1-hover: rgba(0, 0, 0, .8);--scalar-button-1-color: rgba(255, 255, 255, .9)}.dark-mode{--scalar-color-green: #30a159;--scalar-color-red: #dc1b19;--scalar-color-yellow: #eec644;--scalar-color-blue: #2b7abf;--scalar-color-orange: #f07528;--scalar-color-purple: #7a59b1;--scalar-button-1: rgba(255, 255, 255, 1);--scalar-button-1-hover: rgba(255, 255, 255, .9);--scalar-button-1-color: black}",Zw=".light-mode{--scalar-background-1: #f3f3ee;--scalar-background-2: #e8e8e3;--scalar-background-3: #e4e4df;--scalar-border-color: rgba(215, 215, 206, .5);--scalar-color-1: #2a2f45;--scalar-color-2: #757575;--scalar-color-3: #8e8e8e;--scalar-color-accent: #1763a6;--scalar-background-accent: #1f648e1f}.dark-mode{--scalar-background-1: #09090b;--scalar-background-2: #18181b;--scalar-background-3: #2c2c30;--scalar-border-color: rgba(255, 255, 255, .12);--scalar-color-1: #fafafa;--scalar-color-2: rgb(161, 161, 170);--scalar-color-3: rgba(255, 255, 255, .533);--scalar-color-accent: #4eb3ec;--scalar-background-accent: #8ab4f81f}.light-mode .t-doc__sidebar,.dark-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-active-background: var(--scalar-background-3);--scalar-sidebar-color-active: var(--scalar-color-1);--scalar-sidebar-search-background: var(--scalar-background-1);--scalar-sidebar-search-border-color: var(--scalar-border-color);--scalar-sidebar-search-color: var(--scalar-color-3)}.light-mode{--scalar-color-green: #17803d;--scalar-color-red: #e10909;--scalar-color-yellow: #edbe20;--scalar-color-blue: #1763a6;--scalar-color-orange: #e25b09;--scalar-color-purple: #5c3993;--scalar-button-1: rgba(0, 0, 0, 1);--scalar-button-1-hover: rgba(0, 0, 0, .8);--scalar-button-1-color: rgba(255, 255, 255, .9)}.dark-mode{--scalar-color-green: #30a159;--scalar-color-red: #dc1b19;--scalar-color-yellow: #eec644;--scalar-color-blue: #2b7abf;--scalar-color-orange: #f07528;--scalar-color-purple: #7a59b1;--scalar-button-1: rgba(255, 255, 255, 1);--scalar-button-1-hover: rgba(255, 255, 255, .9);--scalar-button-1-color: black}.dark-mode h2.t-editor__heading,.dark-mode .t-editor__page-title h1,.dark-mode h1.section-header,.dark-mode .markdown h1,.dark-mode .markdown h2,.dark-mode .markdown h3,.dark-mode .markdown h4,.dark-mode .markdown h5,.dark-mode .markdown h6{-webkit-text-fill-color:transparent;background-image:linear-gradient(to right bottom,#fff 30%,#ffffff61);-webkit-background-clip:text;background-clip:text}",ek=".light-mode{color-scheme:light;--scalar-color-1: #584c27;--scalar-color-2: #616161;--scalar-color-3: #a89f84;--scalar-color-accent: #b58900;--scalar-background-1: #fdf6e3;--scalar-background-2: #eee8d5;--scalar-background-3: #ddd6c1;--scalar-background-accent: #b589001f;--scalar-border-color: #ded8c8;--scalar-scrollbar-color: rgba(0, 0, 0, .18);--scalar-scrollbar-color-active: rgba(0, 0, 0, .36);--scalar-lifted-brightness: 1;--scalar-backdrop-brightness: 1;--scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, .11);--scalar-shadow-2: rgba(0, 0, 0, .08) 0px 13px 20px 0px, rgba(0, 0, 0, .08) 0px 3px 8px 0px, #eeeeed 0px 0 0 1px;--scalar-button-1: rgb(49 53 56);--scalar-button-1-color: #fff;--scalar-button-1-hover: rgb(28 31 33);--scalar-color-red: #b91c1c;--scalar-color-orange: #a16207;--scalar-color-green: #047857;--scalar-color-blue: #1d4ed8;--scalar-color-orange: #c2410c;--scalar-color-purple: #6d28d9}.dark-mode{color-scheme:dark;--scalar-color-1: #fff;--scalar-color-2: #cccccc;--scalar-color-3: #6d8890;--scalar-color-accent: #007acc;--scalar-background-1: #00212b;--scalar-background-2: #012b36;--scalar-background-3: #004052;--scalar-background-accent: #015a6f;--scalar-border-color: rgba(255, 255, 255, .1);--scalar-scrollbar-color: rgba(255, 255, 255, .24);--scalar-scrollbar-color-active: rgba(255, 255, 255, .48);--scalar-lifted-brightness: 1.45;--scalar-backdrop-brightness: .5;--scalar-shadow-1: 0 1px 3px 0 rgb(0, 0, 0, .1);--scalar-shadow-2: rgba(15, 15, 15, .2) 0px 3px 6px, rgba(15, 15, 15, .4) 0px 9px 24px, 0 0 0 1px rgba(255, 255, 255, .1);--scalar-button-1: #f6f6f6;--scalar-button-1-color: #000;--scalar-button-1-hover: #e7e7e7;--scalar-color-green: #00b648;--scalar-color-red: #dc1b19;--scalar-color-yellow: #ffc90d;--scalar-color-blue: #4eb3ec;--scalar-color-orange: #ff8d4d;--scalar-color-purple: #b191f9}.light-mode .t-doc__sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-active-background: var(--scalar-background-accent);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-color-active: var(--scalar-color-accent);--scalar-sidebar-search-background: var(--scalar-background-2);--scalar-sidebar-search-border-color: var(--scalar-sidebar-search-background);--scalar-sidebar-search--color: var(--scalar-color-3)}.dark-mode .sidebar{--scalar-sidebar-background-1: var(--scalar-background-1);--scalar-sidebar-item-hover-color: currentColor;--scalar-sidebar-item-hover-background: var(--scalar-background-2);--scalar-sidebar-item-active-background: var(--scalar-background-accent);--scalar-sidebar-border-color: var(--scalar-border-color);--scalar-sidebar-color-1: var(--scalar-color-1);--scalar-sidebar-color-2: var(--scalar-color-2);--scalar-sidebar-color-active: var(--scalar-sidebar-color-1);--scalar-sidebar-search-background: var(--scalar-background-2);--scalar-sidebar-search-border-color: var(--scalar-sidebar-search-background);--scalar-sidebar-search--color: var(--scalar-color-3)}",tk='@import"https://fonts.googleapis.com/css2?family=Inter:wght@100..900";@import"https://fonts.googleapis.com/css?family=JetBrains%20Mono";',rk=i.defineComponent({__name:"DefaultFonts",setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent("style"),{innerHTML:i.unref(tk)},null,8,["innerHTML"]))}}),r0=i.defineComponent({__name:"ThemeStyles",props:{id:{},withDefaultFonts:{type:Boolean,default:!0}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[e.withDefaultFonts?(i.openBlock(),i.createBlock(rk,{key:0})):i.createCommentVNode("",!0),e.id!=="none"?(i.openBlock(),i.createBlock(i.resolveDynamicComponent("style"),{key:1},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(mk)(e.id,{layer:"scalar-theme"})),1)]),_:1})):i.createCommentVNode("",!0)],64))}});function n0(r,e){i.onMounted(()=>{if(!document.body)return;const t=document.querySelector(r);t==null||t.classList.add(e)})}const nk=i.defineComponent({__name:"ResetStyles",setup(r){const{reset:e}=i.useCssModule();return n0("#headlessui-portal-root",e),(t,n)=>i.renderSlot(t.$slots,"default",{styles:i.unref(e)})}}),ok="_reset_1w0av_3",sk={reset:ok},U=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},ik={$style:sk},o0=U(nk,[["__cssModules",ik]]),ak=i.defineComponent({__name:"ScrollbarStyles",setup(r){const{scrollbars:e}=i.useCssModule();return n0("#headlessui-portal-root",e),(t,n)=>i.renderSlot(t.$slots,"default",{styles:i.unref(e)})}}),lk="_scrollbars_3tunk_3",ck={scrollbars:lk},dk={$style:ck},uk=U(ak,[["__cssModules",dk]]),s0=[["--theme-","--scalar-"],["--sidebar-","--scalar-sidebar-"]],hk=s0.map(([r])=>r);function fk(r){return hk.some(t=>r.includes(t))?(console.warn("DEPRECATION WARNING: It looks like you're using legacy CSS variables in your custom CSS string. Please migrate them to use the updated prefixes. See https://github.com/scalar/scalar#theme-prefix-changes"),s0.reduce((t,[n,o])=>t.replaceAll(n,o),r)):r}const mp={default:"Default",alternate:"Alternate",moon:"Moon",purple:"Purple",solarized:"Solarized",bluePlanet:"Blue Planet",saturn:"Saturn",kepler:"Kepler-11e",mars:"Mars",deepSpace:"Deep Space",none:""},pk={alternate:Kw,default:t0,moon:Xw,purple:Qw,solarized:ek,bluePlanet:Ww,deepSpace:Gw,saturn:Zw,kepler:Jw,mars:Yw},mk=(r,e)=>{if(r==="none")return"";const t=pk[r||"default"]??t0;return e!=null&&e.layer?`@layer ${e.layer} {
2
- ${t}}`:t};function gk(){return{showApiClient:!1,activeApiClientEndpointId:"",activeItem:{},snippetType:"javascript"}}const nn=i.reactive(gk());function yk(r,e=!1){e?nn.showApiClient=!0:nn.showApiClient=!nn.showApiClient,r&&(nn.activeItem=r)}function vk(){nn.showApiClient=!1}function bk(r){nn.activeApiClientEndpointId=r}function wk(r){nn.snippetType=r}const jl=()=>({state:i.readonly(nn),toggleApiClient:yk,setActiveApiClientEndpointId:bk,setSnippetType:wk,hideApiClient:vk}),Wu=r=>{let e=0,t=0,n=0;if(!(r!=null&&r.length))return t;for(n=0;n<r.length;n++)e=r.charCodeAt(n),t=(t<<5)-t+e,t|=0;return t},$d=()=>({}),ts=typeof window<"u"?window.__SCALAR__??$d():$d(),Gu=Symbol.for("yaml.alias"),kk=Symbol.for("yaml.document"),zn=Symbol.for("yaml.map"),i0=Symbol.for("yaml.pair"),Ju=Symbol.for("yaml.scalar"),Ii=Symbol.for("yaml.seq"),Sr=Symbol.for("yaml.node.type"),rs=r=>!!r&&typeof r=="object"&&r[Sr]===Gu,Fl=r=>!!r&&typeof r=="object"&&r[Sr]===kk,a0=r=>!!r&&typeof r=="object"&&r[Sr]===zn,nt=r=>!!r&&typeof r=="object"&&r[Sr]===i0,Ge=r=>!!r&&typeof r=="object"&&r[Sr]===Ju,Yu=r=>!!r&&typeof r=="object"&&r[Sr]===Ii;function xt(r){if(r&&typeof r=="object")switch(r[Sr]){case zn:case Ii:return!0}return!1}function bt(r){if(r&&typeof r=="object")switch(r[Sr]){case Gu:case zn:case Ju:case Ii:return!0}return!1}const Sk=r=>(Ge(r)||xt(r))&&!!r.anchor,Nn=Symbol("break visit"),xk=Symbol("skip children"),Zs=Symbol("remove node");function ui(r,e){const t=Ck(e);Fl(r)?Co(null,r.contents,t,Object.freeze([r]))===Zs&&(r.contents=null):Co(null,r,t,Object.freeze([]))}ui.BREAK=Nn;ui.SKIP=xk;ui.REMOVE=Zs;function Co(r,e,t,n){const o=Ek(r,e,t,n);if(bt(o)||nt(o))return $k(r,n,o),Co(r,o,t,n);if(typeof o!="symbol"){if(xt(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=Co(s,e.items[s],t,n);if(typeof a=="number")s=a-1;else{if(a===Nn)return Nn;a===Zs&&(e.items.splice(s,1),s-=1)}}}else if(nt(e)){n=Object.freeze(n.concat(e));const s=Co("key",e.key,t,n);if(s===Nn)return Nn;s===Zs&&(e.key=null);const a=Co("value",e.value,t,n);if(a===Nn)return Nn;a===Zs&&(e.value=null)}}return o}function Ck(r){return typeof r=="object"&&(r.Collection||r.Node||r.Value)?Object.assign({Alias:r.Node,Map:r.Node,Scalar:r.Node,Seq:r.Node},r.Value&&{Map:r.Value,Scalar:r.Value,Seq:r.Value},r.Collection&&{Map:r.Collection,Seq:r.Collection},r):r}function Ek(r,e,t,n){var o,s,a,l,c;if(typeof t=="function")return t(r,e,n);if(a0(e))return(o=t.Map)==null?void 0:o.call(t,r,e,n);if(Yu(e))return(s=t.Seq)==null?void 0:s.call(t,r,e,n);if(nt(e))return(a=t.Pair)==null?void 0:a.call(t,r,e,n);if(Ge(e))return(l=t.Scalar)==null?void 0:l.call(t,r,e,n);if(rs(e))return(c=t.Alias)==null?void 0:c.call(t,r,e,n)}function $k(r,e,t){const n=e[e.length-1];if(xt(n))n.items[r]=t;else if(nt(n))r==="key"?n.key=t:n.value=t;else if(Fl(n))n.contents=t;else{const o=rs(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}function l0(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(t)}return!0}function Hs(r,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let o=0,s=n.length;o<s;++o){const a=n[o],l=Hs(r,n,String(o),a);l===void 0?delete n[o]:l!==a&&(n[o]=l)}else if(n instanceof Map)for(const o of Array.from(n.keys())){const s=n.get(o),a=Hs(r,n,o,s);a===void 0?n.delete(o):a!==s&&n.set(o,a)}else if(n instanceof Set)for(const o of Array.from(n)){const s=Hs(r,n,o,o);s===void 0?n.delete(o):s!==o&&(n.delete(o),n.add(s))}else for(const[o,s]of Object.entries(n)){const a=Hs(r,n,o,s);a===void 0?delete n[o]:a!==s&&(n[o]=a)}return r.call(e,t,n)}function Yt(r,e,t){if(Array.isArray(r))return r.map((n,o)=>Yt(n,String(o),t));if(r&&typeof r.toJSON=="function"){if(!t||!Sk(r))return r.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(r,n),t.onCreate=s=>{n.res=s,delete t.onCreate};const o=r.toJSON(e,t);return t.onCreate&&t.onCreate(o),o}return typeof r=="bigint"&&!(t!=null&&t.keep)?Number(r):r}class Xu{constructor(e){Object.defineProperty(this,Sr,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:o,reviver:s}={}){if(!Fl(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Yt(this,"",a);if(typeof o=="function")for(const{count:c,res:d}of a.anchors.values())o(d,c);return typeof s=="function"?Hs(s,{"":l},"",l):l}}class _k extends Xu{constructor(e){super(Gu),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return ui(e,{Node:(n,o)=>{if(o===this)return ui.BREAK;o.anchor===this.source&&(t=o)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:o,maxAliasCount:s}=t,a=this.resolve(o);if(!a){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let l=n.get(a);if(l||(Yt(a,null,t),l=n.get(a)),!l||l.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Fa(o,a,n)),l.count*l.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return l.res}toString(e,t,n){const o=`*${this.source}`;if(e){if(l0(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${o} `}return o}}function Fa(r,e,t){if(rs(e)){const n=e.resolve(r),o=t&&n&&t.get(n);return o?o.count*o.aliasCount:0}else if(xt(e)){let n=0;for(const o of e.items){const s=Fa(r,o,t);s>n&&(n=s)}return n}else if(nt(e)){const n=Fa(r,e.key,t),o=Fa(r,e.value,t);return Math.max(n,o)}return 1}const c0=r=>!r||typeof r!="function"&&typeof r!="object";class ze extends Xu{constructor(e){super(Ju),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Yt(this.value,e,t)}toString(){return String(this.value)}}ze.BLOCK_FOLDED="BLOCK_FOLDED";ze.BLOCK_LITERAL="BLOCK_LITERAL";ze.PLAIN="PLAIN";ze.QUOTE_DOUBLE="QUOTE_DOUBLE";ze.QUOTE_SINGLE="QUOTE_SINGLE";const Nk="tag:yaml.org,2002:";function Ak(r,e,t){if(e){const n=t.filter(s=>s.tag===e),o=n.find(s=>!s.format)??n[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return t.find(n=>{var o;return((o=n.identify)==null?void 0:o.call(n,r))&&!n.format})}function ll(r,e,t){var h,f,p;if(Fl(r)&&(r=r.contents),bt(r))return r;if(nt(r)){const y=(f=(h=t.schema[zn]).createNode)==null?void 0:f.call(h,t.schema,null,t);return y.items.push(r),y}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt<"u"&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:n,onAnchor:o,onTagObj:s,schema:a,sourceObjects:l}=t;let c;if(n&&r&&typeof r=="object"){if(c=l.get(r),c)return c.anchor||(c.anchor=o(r)),new _k(c.anchor);c={anchor:null,node:null},l.set(r,c)}e!=null&&e.startsWith("!!")&&(e=Nk+e.slice(2));let d=Ak(r,e,a.tags);if(!d){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){const y=new ze(r);return c&&(c.node=y),y}d=r instanceof Map?a[zn]:Symbol.iterator in Object(r)?a[Ii]:a[zn]}s&&(s(d),delete t.onTagObj);const u=d!=null&&d.createNode?d.createNode(t.schema,r,t):typeof((p=d==null?void 0:d.nodeClass)==null?void 0:p.from)=="function"?d.nodeClass.from(t.schema,r,t):new ze(r);return e?u.tag=e:d.default||(u.tag=d.tag),c&&(c.node=u),u}function gp(r,e,t){let n=t;for(let o=e.length-1;o>=0;--o){const s=e[o];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=n,n=a}else n=new Map([[s,n]])}return ll(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}const Ok=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done;class Qu extends Xu{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>bt(n)||nt(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ok(e))this.add(t);else{const[n,...o]=e,s=this.get(n,!0);if(xt(s))s.addIn(o,t);else if(s===void 0&&this.schema)this.set(n,gp(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const o=this.get(t,!0);if(xt(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...o]=e,s=this.get(n,!0);return o.length===0?!t&&Ge(s)?s.value:s:xt(s)?s.getIn(o,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!nt(t))return!1;const n=t.value;return n==null||e&&Ge(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const o=this.get(t,!0);return xt(o)?o.hasIn(n):!1}setIn(e,t){const[n,...o]=e;if(o.length===0)this.set(n,t);else{const s=this.get(n,!0);if(xt(s))s.setIn(o,t);else if(s===void 0&&this.schema)this.set(n,gp(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}}Qu.maxFlowStringSingleLineLength=60;const Tk=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function hi(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}const Eo=(r,e,t)=>r.endsWith(`
2
+ ${t}}`:t};function gk(){return{showApiClient:!1,activeApiClientEndpointId:"",activeItem:{},snippetType:"javascript"}}const nn=i.reactive(gk());function yk(r,e=!1){e?nn.showApiClient=!0:nn.showApiClient=!nn.showApiClient,r&&(nn.activeItem=r)}function vk(){nn.showApiClient=!1}function bk(r){nn.activeApiClientEndpointId=r}function wk(r){nn.snippetType=r}const Fl=()=>({state:i.readonly(nn),toggleApiClient:yk,setActiveApiClientEndpointId:bk,setSnippetType:wk,hideApiClient:vk}),Gu=r=>{let e=0,t=0,n=0;if(!(r!=null&&r.length))return t;for(n=0;n<r.length;n++)e=r.charCodeAt(n),t=(t<<5)-t+e,t|=0;return t},_d=()=>({}),ts=typeof window<"u"?window.__SCALAR__??_d():_d(),Ju=Symbol.for("yaml.alias"),kk=Symbol.for("yaml.document"),zn=Symbol.for("yaml.map"),i0=Symbol.for("yaml.pair"),Yu=Symbol.for("yaml.scalar"),Ii=Symbol.for("yaml.seq"),Sr=Symbol.for("yaml.node.type"),rs=r=>!!r&&typeof r=="object"&&r[Sr]===Ju,ql=r=>!!r&&typeof r=="object"&&r[Sr]===kk,a0=r=>!!r&&typeof r=="object"&&r[Sr]===zn,nt=r=>!!r&&typeof r=="object"&&r[Sr]===i0,Ge=r=>!!r&&typeof r=="object"&&r[Sr]===Yu,Xu=r=>!!r&&typeof r=="object"&&r[Sr]===Ii;function xt(r){if(r&&typeof r=="object")switch(r[Sr]){case zn:case Ii:return!0}return!1}function bt(r){if(r&&typeof r=="object")switch(r[Sr]){case Ju:case zn:case Yu:case Ii:return!0}return!1}const Sk=r=>(Ge(r)||xt(r))&&!!r.anchor,Nn=Symbol("break visit"),xk=Symbol("skip children"),Zs=Symbol("remove node");function ui(r,e){const t=Ck(e);ql(r)?Co(null,r.contents,t,Object.freeze([r]))===Zs&&(r.contents=null):Co(null,r,t,Object.freeze([]))}ui.BREAK=Nn;ui.SKIP=xk;ui.REMOVE=Zs;function Co(r,e,t,n){const o=Ek(r,e,t,n);if(bt(o)||nt(o))return $k(r,n,o),Co(r,o,t,n);if(typeof o!="symbol"){if(xt(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=Co(s,e.items[s],t,n);if(typeof a=="number")s=a-1;else{if(a===Nn)return Nn;a===Zs&&(e.items.splice(s,1),s-=1)}}}else if(nt(e)){n=Object.freeze(n.concat(e));const s=Co("key",e.key,t,n);if(s===Nn)return Nn;s===Zs&&(e.key=null);const a=Co("value",e.value,t,n);if(a===Nn)return Nn;a===Zs&&(e.value=null)}}return o}function Ck(r){return typeof r=="object"&&(r.Collection||r.Node||r.Value)?Object.assign({Alias:r.Node,Map:r.Node,Scalar:r.Node,Seq:r.Node},r.Value&&{Map:r.Value,Scalar:r.Value,Seq:r.Value},r.Collection&&{Map:r.Collection,Seq:r.Collection},r):r}function Ek(r,e,t,n){var o,s,a,l,c;if(typeof t=="function")return t(r,e,n);if(a0(e))return(o=t.Map)==null?void 0:o.call(t,r,e,n);if(Xu(e))return(s=t.Seq)==null?void 0:s.call(t,r,e,n);if(nt(e))return(a=t.Pair)==null?void 0:a.call(t,r,e,n);if(Ge(e))return(l=t.Scalar)==null?void 0:l.call(t,r,e,n);if(rs(e))return(c=t.Alias)==null?void 0:c.call(t,r,e,n)}function $k(r,e,t){const n=e[e.length-1];if(xt(n))n.items[r]=t;else if(nt(n))r==="key"?n.key=t:n.value=t;else if(ql(n))n.contents=t;else{const o=rs(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}function l0(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(t)}return!0}function Hs(r,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let o=0,s=n.length;o<s;++o){const a=n[o],l=Hs(r,n,String(o),a);l===void 0?delete n[o]:l!==a&&(n[o]=l)}else if(n instanceof Map)for(const o of Array.from(n.keys())){const s=n.get(o),a=Hs(r,n,o,s);a===void 0?n.delete(o):a!==s&&n.set(o,a)}else if(n instanceof Set)for(const o of Array.from(n)){const s=Hs(r,n,o,o);s===void 0?n.delete(o):s!==o&&(n.delete(o),n.add(s))}else for(const[o,s]of Object.entries(n)){const a=Hs(r,n,o,s);a===void 0?delete n[o]:a!==s&&(n[o]=a)}return r.call(e,t,n)}function Yt(r,e,t){if(Array.isArray(r))return r.map((n,o)=>Yt(n,String(o),t));if(r&&typeof r.toJSON=="function"){if(!t||!Sk(r))return r.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(r,n),t.onCreate=s=>{n.res=s,delete t.onCreate};const o=r.toJSON(e,t);return t.onCreate&&t.onCreate(o),o}return typeof r=="bigint"&&!(t!=null&&t.keep)?Number(r):r}class Qu{constructor(e){Object.defineProperty(this,Sr,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:o,reviver:s}={}){if(!ql(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Yt(this,"",a);if(typeof o=="function")for(const{count:c,res:d}of a.anchors.values())o(d,c);return typeof s=="function"?Hs(s,{"":l},"",l):l}}class _k extends Qu{constructor(e){super(Ju),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return ui(e,{Node:(n,o)=>{if(o===this)return ui.BREAK;o.anchor===this.source&&(t=o)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:o,maxAliasCount:s}=t,a=this.resolve(o);if(!a){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let l=n.get(a);if(l||(Yt(a,null,t),l=n.get(a)),!l||l.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Fa(o,a,n)),l.count*l.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return l.res}toString(e,t,n){const o=`*${this.source}`;if(e){if(l0(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${o} `}return o}}function Fa(r,e,t){if(rs(e)){const n=e.resolve(r),o=t&&n&&t.get(n);return o?o.count*o.aliasCount:0}else if(xt(e)){let n=0;for(const o of e.items){const s=Fa(r,o,t);s>n&&(n=s)}return n}else if(nt(e)){const n=Fa(r,e.key,t),o=Fa(r,e.value,t);return Math.max(n,o)}return 1}const c0=r=>!r||typeof r!="function"&&typeof r!="object";class ze extends Qu{constructor(e){super(Yu),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Yt(this.value,e,t)}toString(){return String(this.value)}}ze.BLOCK_FOLDED="BLOCK_FOLDED";ze.BLOCK_LITERAL="BLOCK_LITERAL";ze.PLAIN="PLAIN";ze.QUOTE_DOUBLE="QUOTE_DOUBLE";ze.QUOTE_SINGLE="QUOTE_SINGLE";const Nk="tag:yaml.org,2002:";function Ak(r,e,t){if(e){const n=t.filter(s=>s.tag===e),o=n.find(s=>!s.format)??n[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return t.find(n=>{var o;return((o=n.identify)==null?void 0:o.call(n,r))&&!n.format})}function ll(r,e,t){var h,f,p;if(ql(r)&&(r=r.contents),bt(r))return r;if(nt(r)){const y=(f=(h=t.schema[zn]).createNode)==null?void 0:f.call(h,t.schema,null,t);return y.items.push(r),y}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt<"u"&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:n,onAnchor:o,onTagObj:s,schema:a,sourceObjects:l}=t;let c;if(n&&r&&typeof r=="object"){if(c=l.get(r),c)return c.anchor||(c.anchor=o(r)),new _k(c.anchor);c={anchor:null,node:null},l.set(r,c)}e!=null&&e.startsWith("!!")&&(e=Nk+e.slice(2));let d=Ak(r,e,a.tags);if(!d){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){const y=new ze(r);return c&&(c.node=y),y}d=r instanceof Map?a[zn]:Symbol.iterator in Object(r)?a[Ii]:a[zn]}s&&(s(d),delete t.onTagObj);const u=d!=null&&d.createNode?d.createNode(t.schema,r,t):typeof((p=d==null?void 0:d.nodeClass)==null?void 0:p.from)=="function"?d.nodeClass.from(t.schema,r,t):new ze(r);return e?u.tag=e:d.default||(u.tag=d.tag),c&&(c.node=u),u}function gp(r,e,t){let n=t;for(let o=e.length-1;o>=0;--o){const s=e[o];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=n,n=a}else n=new Map([[s,n]])}return ll(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}const Ok=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done;class Zu extends Qu{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>bt(n)||nt(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ok(e))this.add(t);else{const[n,...o]=e,s=this.get(n,!0);if(xt(s))s.addIn(o,t);else if(s===void 0&&this.schema)this.set(n,gp(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const o=this.get(t,!0);if(xt(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...o]=e,s=this.get(n,!0);return o.length===0?!t&&Ge(s)?s.value:s:xt(s)?s.getIn(o,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!nt(t))return!1;const n=t.value;return n==null||e&&Ge(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const o=this.get(t,!0);return xt(o)?o.hasIn(n):!1}setIn(e,t){const[n,...o]=e;if(o.length===0)this.set(n,t);else{const s=this.get(n,!0);if(xt(s))s.setIn(o,t);else if(s===void 0&&this.schema)this.set(n,gp(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}}Zu.maxFlowStringSingleLineLength=60;const Tk=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function hi(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}const Eo=(r,e,t)=>r.endsWith(`
3
3
  `)?hi(t,e):t.includes(`
4
4
  `)?`
5
- `+hi(t,e):(r.endsWith(" ")?"":" ")+t,d0="flow",_d="block",qa="quoted";function ql(r,e,t="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:s=20,onFold:a,onOverflow:l}={}){if(!o||o<0)return r;const c=Math.max(1+s,1+o-e.length);if(r.length<=c)return r;const d=[],u={};let h=o-e.length;typeof n=="number"&&(n>o-Math.max(2,s)?d.push(0):h=o-n);let f,p,y=!1,g=-1,m=-1,v=-1;t===_d&&(g=yp(r,g,e.length),g!==-1&&(h=g+c));for(let w;w=r[g+=1];){if(t===qa&&w==="\\"){switch(m=g,r[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(w===`
6
- `)t===_d&&(g=yp(r,g,e.length)),h=g+e.length+c,f=void 0;else{if(w===" "&&p&&p!==" "&&p!==`
5
+ `+hi(t,e):(r.endsWith(" ")?"":" ")+t,d0="flow",Nd="block",qa="quoted";function zl(r,e,t="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:s=20,onFold:a,onOverflow:l}={}){if(!o||o<0)return r;const c=Math.max(1+s,1+o-e.length);if(r.length<=c)return r;const d=[],u={};let h=o-e.length;typeof n=="number"&&(n>o-Math.max(2,s)?d.push(0):h=o-n);let f,p,y=!1,g=-1,m=-1,v=-1;t===Nd&&(g=yp(r,g,e.length),g!==-1&&(h=g+c));for(let w;w=r[g+=1];){if(t===qa&&w==="\\"){switch(m=g,r[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(w===`
6
+ `)t===Nd&&(g=yp(r,g,e.length)),h=g+e.length+c,f=void 0;else{if(w===" "&&p&&p!==" "&&p!==`
7
7
  `&&p!==" "){const S=r[g+1];S&&S!==" "&&S!==`
8
8
  `&&S!==" "&&(f=g)}if(g>=h)if(f)d.push(f),h=f+c,f=void 0;else if(t===qa){for(;p===" "||p===" ";)p=w,w=r[g+=1],y=!0;const S=g>v+1?g-2:m-1;if(u[S])return r;d.push(S),u[S]=!0,h=S+c,f=void 0}else y=!0}p=w}if(y&&l&&l(),d.length===0)return r;a&&a();let b=r.slice(0,d[0]);for(let w=0;w<d.length;++w){const S=d[w],x=d[w+1]||r.length;S===0?b=`
9
9
  ${e}${r.slice(0,x)}`:(t===qa&&u[S]&&(b+=`${r[S]}\\`),b+=`
10
10
  ${e}${r.slice(S+1,x)}`)}return b}function yp(r,e,t){let n=e,o=e+1,s=r[o];for(;s===" "||s===" ";)if(e<o+t)s=r[++e];else{do s=r[++e];while(s&&s!==`
11
- `);n=e,o=e+1,s=r[o]}return n}const zl=(r,e)=>({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),Hl=r=>/^(%|---|\.\.\.)/m.test(r);function Bk(r,e,t){if(!e||e<0)return!1;const n=e-t,o=r.length;if(o<=n)return!1;for(let s=0,a=0;s<o;++s)if(r[s]===`
12
- `){if(s-a>n)return!0;if(a=s+1,o-a<=n)return!1}return!0}function ei(r,e){const t=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,o=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Hl(r)?" ":"");let a="",l=0;for(let c=0,d=t[c];d;d=t[++c])if(d===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(a+=t.slice(l,c)+"\\ ",c+=1,l=c,d="\\"),d==="\\")switch(t[c+1]){case"u":{a+=t.slice(l,c);const u=t.substr(c+2,4);switch(u){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:u.substr(0,2)==="00"?a+="\\x"+u.substr(2):a+=t.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<o)c+=1;else{for(a+=t.slice(l,c)+`
11
+ `);n=e,o=e+1,s=r[o]}return n}const Hl=(r,e)=>({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),Ul=r=>/^(%|---|\.\.\.)/m.test(r);function Bk(r,e,t){if(!e||e<0)return!1;const n=e-t,o=r.length;if(o<=n)return!1;for(let s=0,a=0;s<o;++s)if(r[s]===`
12
+ `){if(s-a>n)return!0;if(a=s+1,o-a<=n)return!1}return!0}function ei(r,e){const t=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,o=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Ul(r)?" ":"");let a="",l=0;for(let c=0,d=t[c];d;d=t[++c])if(d===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(a+=t.slice(l,c)+"\\ ",c+=1,l=c,d="\\"),d==="\\")switch(t[c+1]){case"u":{a+=t.slice(l,c);const u=t.substr(c+2,4);switch(u){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:u.substr(0,2)==="00"?a+="\\x"+u.substr(2):a+=t.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<o)c+=1;else{for(a+=t.slice(l,c)+`
13
13
 
14
14
  `;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)a+=`
15
- `,c+=2;a+=s,t[c+2]===" "&&(a+="\\"),c+=1,l=c+1}break;default:c+=1}return a=l?a+t.slice(l):t,n?a:ql(a,s,qa,zl(e,!1))}function Nd(r,e){if(e.options.singleQuote===!1||e.implicitKey&&r.includes(`
16
- `)||/[ \t]\n|\n[ \t]/.test(r))return ei(r,e);const t=e.indent||(Hl(r)?" ":""),n="'"+r.replace(/'/g,"''").replace(/\n+/g,`$&
17
- ${t}`)+"'";return e.implicitKey?n:ql(n,t,d0,zl(e,!1))}function $o(r,e){const{singleQuote:t}=e.options;let n;if(t===!1)n=ei;else{const o=r.includes('"'),s=r.includes("'");o&&!s?n=Nd:s&&!o?n=ei:n=t?Nd:ei}return n(r,e)}let Ad;try{Ad=new RegExp(`(^|(?<!
15
+ `,c+=2;a+=s,t[c+2]===" "&&(a+="\\"),c+=1,l=c+1}break;default:c+=1}return a=l?a+t.slice(l):t,n?a:zl(a,s,qa,Hl(e,!1))}function Ad(r,e){if(e.options.singleQuote===!1||e.implicitKey&&r.includes(`
16
+ `)||/[ \t]\n|\n[ \t]/.test(r))return ei(r,e);const t=e.indent||(Ul(r)?" ":""),n="'"+r.replace(/'/g,"''").replace(/\n+/g,`$&
17
+ ${t}`)+"'";return e.implicitKey?n:zl(n,t,d0,Hl(e,!1))}function $o(r,e){const{singleQuote:t}=e.options;let n;if(t===!1)n=ei;else{const o=r.includes('"'),s=r.includes("'");o&&!s?n=Ad:s&&!o?n=ei:n=t?Ad:ei}return n(r,e)}let Od;try{Od=new RegExp(`(^|(?<!
18
18
  ))
19
19
  +(?!
20
- |$)`,"g")}catch{Ad=/\n+(?!\n|$)/g}function za({comment:r,type:e,value:t},n,o,s){const{blockQuote:a,commentString:l,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return $o(t,n);const d=n.indent||(n.forceBlockIndent||Hl(t)?" ":""),u=a==="literal"?!0:a==="folded"||e===ze.BLOCK_FOLDED?!1:e===ze.BLOCK_LITERAL?!0:!Bk(t,c,d.length);if(!t)return u?`|
20
+ |$)`,"g")}catch{Od=/\n+(?!\n|$)/g}function za({comment:r,type:e,value:t},n,o,s){const{blockQuote:a,commentString:l,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return $o(t,n);const d=n.indent||(n.forceBlockIndent||Ul(t)?" ":""),u=a==="literal"?!0:a==="folded"||e===ze.BLOCK_FOLDED?!1:e===ze.BLOCK_LITERAL?!0:!Bk(t,c,d.length);if(!t)return u?`|
21
21
  `:`>
22
22
  `;let h,f;for(f=t.length;f>0;--f){const k=t[f-1];if(k!==`
23
23
  `&&k!==" "&&k!==" ")break}let p=t.substring(f);const y=p.indexOf(`
24
24
  `);y===-1?h="-":t===p||y!==p.length-1?(h="+",s&&s()):h="",p&&(t=t.slice(0,-p.length),p[p.length-1]===`
25
- `&&(p=p.slice(0,-1)),p=p.replace(Ad,`$&${d}`));let g=!1,m,v=-1;for(m=0;m<t.length;++m){const k=t[m];if(k===" ")g=!0;else if(k===`
25
+ `&&(p=p.slice(0,-1)),p=p.replace(Od,`$&${d}`));let g=!1,m,v=-1;for(m=0;m<t.length;++m){const k=t[m];if(k===" ")g=!0;else if(k===`
26
26
  `)v=m;else break}let b=t.substring(0,v<m?v+1:m);b&&(t=t.substring(b.length),b=b.replace(/\n+/g,`$&${d}`));let S=(u?"|":">")+(g?d?"2":"1":"")+h;if(r&&(S+=" "+l(r.replace(/ ?[\r\n]+/g," ")),o&&o()),u)return t=t.replace(/\n+/g,`$&${d}`),`${S}
27
27
  ${d}${b}${t}${p}`;t=t.replace(/\n+/g,`
28
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);const x=ql(`${b}${t}${p}`,d,_d,zl(n,!0));return`${S}
28
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);const x=zl(`${b}${t}${p}`,d,Nd,Hl(n,!0));return`${S}
29
29
  ${d}${x}`}function Pk(r,e,t,n){const{type:o,value:s}=r,{actualString:a,implicitKey:l,indent:c,indentStep:d,inFlow:u}=e;if(l&&s.includes(`
30
30
  `)||u&&/[[\]{},]/.test(s))return $o(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||u||!s.includes(`
31
31
  `)?$o(s,e):za(r,e,t,n);if(!l&&!u&&o!==ze.PLAIN&&s.includes(`
32
- `))return za(r,e,t,n);if(Hl(s)){if(c==="")return e.forceBlockIndent=!0,za(r,e,t,n);if(l&&c===d)return $o(s,e)}const h=s.replace(/\n+/g,`$&
33
- ${c}`);if(a){const f=g=>{var m;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((m=g.test)==null?void 0:m.test(h))},{compat:p,tags:y}=e.doc.schema;if(y.some(f)||p!=null&&p.some(f))return $o(s,e)}return l?h:ql(h,c,d0,zl(e,!1))}function Ik(r,e,t,n){const{implicitKey:o,inFlow:s}=e,a=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)});let{type:l}=r;l!==ze.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=ze.QUOTE_DOUBLE);const c=u=>{switch(u){case ze.BLOCK_FOLDED:case ze.BLOCK_LITERAL:return o||s?$o(a.value,e):za(a,e,t,n);case ze.QUOTE_DOUBLE:return ei(a.value,e);case ze.QUOTE_SINGLE:return Nd(a.value,e);case ze.PLAIN:return Pk(a,e,t,n);default:return null}};let d=c(l);if(d===null){const{defaultKeyType:u,defaultStringType:h}=e.options,f=o&&u||h;if(d=c(f),d===null)throw new Error(`Unsupported default string type ${f}`)}return d}function Mk(r,e){const t=Object.assign({blockQuote:!0,commentString:Tk,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},r.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:r,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Dk(r,e){var o;if(e.tag){const s=r.filter(a=>a.tag===e.tag);if(s.length>0)return s.find(a=>a.format===e.format)??s[0]}let t,n;if(Ge(e)){n=e.value;const s=r.filter(a=>{var l;return(l=a.identify)==null?void 0:l.call(a,n)});t=s.find(a=>a.format===e.format)??s.find(a=>!a.format)}else n=e,t=r.find(s=>s.nodeClass&&n instanceof s.nodeClass);if(!t){const s=((o=n==null?void 0:n.constructor)==null?void 0:o.name)??typeof n;throw new Error(`Tag not resolved for ${s} value`)}return t}function Vk(r,e,{anchors:t,doc:n}){if(!n.directives)return"";const o=[],s=(Ge(r)||xt(r))&&r.anchor;s&&l0(s)&&(t.add(s),o.push(`&${s}`));const a=r.tag?r.tag:e.default?null:e.tag;return a&&o.push(n.directives.tagString(a)),o.join(" ")}function cl(r,e,t,n){var c;if(nt(r))return r.toString(e,t,n);if(rs(r)){if(e.doc.directives)return r.toString(e);if((c=e.resolvedAliases)!=null&&c.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let o;const s=bt(r)?r:e.doc.createNode(r,{onTagObj:d=>o=d});o||(o=Dk(e.doc.schema.tags,s));const a=Vk(s,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);const l=typeof o.stringify=="function"?o.stringify(s,e,t,n):Ge(s)?Ik(s,e,t,n):s.toString(e,t,n);return a?Ge(s)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a}
32
+ `))return za(r,e,t,n);if(Ul(s)){if(c==="")return e.forceBlockIndent=!0,za(r,e,t,n);if(l&&c===d)return $o(s,e)}const h=s.replace(/\n+/g,`$&
33
+ ${c}`);if(a){const f=g=>{var m;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((m=g.test)==null?void 0:m.test(h))},{compat:p,tags:y}=e.doc.schema;if(y.some(f)||p!=null&&p.some(f))return $o(s,e)}return l?h:zl(h,c,d0,Hl(e,!1))}function Ik(r,e,t,n){const{implicitKey:o,inFlow:s}=e,a=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)});let{type:l}=r;l!==ze.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=ze.QUOTE_DOUBLE);const c=u=>{switch(u){case ze.BLOCK_FOLDED:case ze.BLOCK_LITERAL:return o||s?$o(a.value,e):za(a,e,t,n);case ze.QUOTE_DOUBLE:return ei(a.value,e);case ze.QUOTE_SINGLE:return Ad(a.value,e);case ze.PLAIN:return Pk(a,e,t,n);default:return null}};let d=c(l);if(d===null){const{defaultKeyType:u,defaultStringType:h}=e.options,f=o&&u||h;if(d=c(f),d===null)throw new Error(`Unsupported default string type ${f}`)}return d}function Mk(r,e){const t=Object.assign({blockQuote:!0,commentString:Tk,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},r.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:r,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Dk(r,e){var o;if(e.tag){const s=r.filter(a=>a.tag===e.tag);if(s.length>0)return s.find(a=>a.format===e.format)??s[0]}let t,n;if(Ge(e)){n=e.value;const s=r.filter(a=>{var l;return(l=a.identify)==null?void 0:l.call(a,n)});t=s.find(a=>a.format===e.format)??s.find(a=>!a.format)}else n=e,t=r.find(s=>s.nodeClass&&n instanceof s.nodeClass);if(!t){const s=((o=n==null?void 0:n.constructor)==null?void 0:o.name)??typeof n;throw new Error(`Tag not resolved for ${s} value`)}return t}function Vk(r,e,{anchors:t,doc:n}){if(!n.directives)return"";const o=[],s=(Ge(r)||xt(r))&&r.anchor;s&&l0(s)&&(t.add(s),o.push(`&${s}`));const a=r.tag?r.tag:e.default?null:e.tag;return a&&o.push(n.directives.tagString(a)),o.join(" ")}function cl(r,e,t,n){var c;if(nt(r))return r.toString(e,t,n);if(rs(r)){if(e.doc.directives)return r.toString(e);if((c=e.resolvedAliases)!=null&&c.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let o;const s=bt(r)?r:e.doc.createNode(r,{onTagObj:d=>o=d});o||(o=Dk(e.doc.schema.tags,s));const a=Vk(s,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);const l=typeof o.stringify=="function"?o.stringify(s,e,t,n):Ge(s)?Ik(s,e,t,n):s.toString(e,t,n);return a?Ge(s)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a}
34
34
  ${e.indent}${l}`:l}function Rk({key:r,value:e},t,n,o){const{allNullValues:s,doc:a,indent:l,indentStep:c,options:{commentString:d,indentSeq:u,simpleKeys:h}}=t;let f=bt(r)&&r.comment||null;if(h){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(xt(r)){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!h&&(!r||f&&e==null&&!t.inFlow||xt(r)||(Ge(r)?r.type===ze.BLOCK_FOLDED||r.type===ze.BLOCK_LITERAL:typeof r=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(h||!s),indent:l+c});let y=!1,g=!1,m=cl(r,t,()=>y=!0,()=>g=!0);if(!p&&!t.inFlow&&m.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(s||e==null)return y&&n&&n(),m===""?"?":p?`? ${m}`:m}else if(s&&!h||e==null&&p)return m=`? ${m}`,f&&!y?m+=Eo(m,t.indent,d(f)):g&&o&&o(),m;y&&(f=null),p?(f&&(m+=Eo(m,t.indent,d(f))),m=`? ${m}
35
- ${l}:`):(m=`${m}:`,f&&(m+=Eo(m,t.indent,d(f))));let v,b,w;bt(e)?(v=!!e.spaceBefore,b=e.commentBefore,w=e.comment):(v=!1,b=null,w=null,e&&typeof e=="object"&&(e=a.createNode(e))),t.implicitKey=!1,!p&&!f&&Ge(e)&&(t.indentAtStart=m.length+1),g=!1,!u&&c.length>=2&&!t.inFlow&&!p&&Yu(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1;const x=cl(e,t,()=>S=!0,()=>g=!0);let k=" ";if(f||v||b){if(k=v?`
35
+ ${l}:`):(m=`${m}:`,f&&(m+=Eo(m,t.indent,d(f))));let v,b,w;bt(e)?(v=!!e.spaceBefore,b=e.commentBefore,w=e.comment):(v=!1,b=null,w=null,e&&typeof e=="object"&&(e=a.createNode(e))),t.implicitKey=!1,!p&&!f&&Ge(e)&&(t.indentAtStart=m.length+1),g=!1,!u&&c.length>=2&&!t.inFlow&&!p&&Xu(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1;const x=cl(e,t,()=>S=!0,()=>g=!0);let k=" ";if(f||v||b){if(k=v?`
36
36
  `:"",b){const C=d(b);k+=`
37
37
  ${hi(C,t.indent)}`}x===""&&!t.inFlow?k===`
38
38
  `&&(k=`
@@ -41,64 +41,64 @@ ${hi(C,t.indent)}`}x===""&&!t.inFlow?k===`
41
41
  ${t.indent}`}else if(!p&&xt(e)){const C=x[0],N=x.indexOf(`
42
42
  `),P=N!==-1,M=t.inFlow??e.flow??e.items.length===0;if(P||!M){let j=!1;if(P&&(C==="&"||C==="!")){let I=x.indexOf(" ");C==="&"&&I!==-1&&I<N&&x[I+1]==="!"&&(I=x.indexOf(" ",I+1)),(I===-1||N<I)&&(j=!0)}j||(k=`
43
43
  ${t.indent}`)}}else(x===""||x[0]===`
44
- `)&&(k="");return m+=k+x,t.inFlow?S&&n&&n():w&&!S?m+=Eo(m,t.indent,d(w)):g&&o&&o(),m}function Lk(r,e){(r==="debug"||r==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const vp="<<";function u0(r,e,{key:t,value:n}){if(r!=null&&r.doc.schema.merge&&jk(t))if(n=rs(n)?n.resolve(r.doc):n,Yu(n))for(const o of n.items)jc(r,e,o);else if(Array.isArray(n))for(const o of n)jc(r,e,o);else jc(r,e,n);else{const o=Yt(t,"",r);if(e instanceof Map)e.set(o,Yt(n,o,r));else if(e instanceof Set)e.add(o);else{const s=Fk(t,o,r),a=Yt(n,s,r);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}const jk=r=>r===vp||Ge(r)&&r.value===vp&&(!r.type||r.type===ze.PLAIN);function jc(r,e,t){const n=r&&rs(t)?t.resolve(r.doc):t;if(!a0(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,r,Map);for(const[s,a]of o)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function Fk(r,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(bt(r)&&(t!=null&&t.doc)){const n=Mk(t.doc,{});n.anchors=new Set;for(const s of t.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;const o=r.toString(n);if(!t.mapKeyWarned){let s=JSON.stringify(o);s.length>40&&(s=s.substring(0,36)+'..."'),Lk(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return o}return JSON.stringify(e)}function Zu(r,e,t){const n=ll(r,void 0,t),o=ll(e,void 0,t);return new Or(n,o)}class Or{constructor(e,t=null){Object.defineProperty(this,Sr,{value:i0}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return bt(t)&&(t=t.clone(e)),bt(n)&&(n=n.clone(e)),new Or(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return u0(t,n,this)}toString(e,t,n){return e!=null&&e.doc?Rk(this,e,t,n):JSON.stringify(this)}}function h0(r,e,t){return(e.inFlow??r.flow?zk:qk)(r,e,t)}function qk({comment:r,items:e},t,{blockItemPrefix:n,flowChars:o,itemIndent:s,onChompKeep:a,onComment:l}){const{indent:c,options:{commentString:d}}=t,u=Object.assign({},t,{indent:s,type:null});let h=!1;const f=[];for(let y=0;y<e.length;++y){const g=e[y];let m=null;if(bt(g))!h&&g.spaceBefore&&f.push(""),dl(t,f,g.commentBefore,h),g.comment&&(m=g.comment);else if(nt(g)){const b=bt(g.key)?g.key:null;b&&(!h&&b.spaceBefore&&f.push(""),dl(t,f,b.commentBefore,h))}h=!1;let v=cl(g,u,()=>m=null,()=>h=!0);m&&(v+=Eo(v,s,d(m))),h&&m&&(h=!1),f.push(n+v)}let p;if(f.length===0)p=o.start+o.end;else{p=f[0];for(let y=1;y<f.length;++y){const g=f[y];p+=g?`
44
+ `)&&(k="");return m+=k+x,t.inFlow?S&&n&&n():w&&!S?m+=Eo(m,t.indent,d(w)):g&&o&&o(),m}function Lk(r,e){(r==="debug"||r==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const vp="<<";function u0(r,e,{key:t,value:n}){if(r!=null&&r.doc.schema.merge&&jk(t))if(n=rs(n)?n.resolve(r.doc):n,Xu(n))for(const o of n.items)Fc(r,e,o);else if(Array.isArray(n))for(const o of n)Fc(r,e,o);else Fc(r,e,n);else{const o=Yt(t,"",r);if(e instanceof Map)e.set(o,Yt(n,o,r));else if(e instanceof Set)e.add(o);else{const s=Fk(t,o,r),a=Yt(n,s,r);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}const jk=r=>r===vp||Ge(r)&&r.value===vp&&(!r.type||r.type===ze.PLAIN);function Fc(r,e,t){const n=r&&rs(t)?t.resolve(r.doc):t;if(!a0(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,r,Map);for(const[s,a]of o)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function Fk(r,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(bt(r)&&(t!=null&&t.doc)){const n=Mk(t.doc,{});n.anchors=new Set;for(const s of t.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;const o=r.toString(n);if(!t.mapKeyWarned){let s=JSON.stringify(o);s.length>40&&(s=s.substring(0,36)+'..."'),Lk(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return o}return JSON.stringify(e)}function eh(r,e,t){const n=ll(r,void 0,t),o=ll(e,void 0,t);return new Or(n,o)}class Or{constructor(e,t=null){Object.defineProperty(this,Sr,{value:i0}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return bt(t)&&(t=t.clone(e)),bt(n)&&(n=n.clone(e)),new Or(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return u0(t,n,this)}toString(e,t,n){return e!=null&&e.doc?Rk(this,e,t,n):JSON.stringify(this)}}function h0(r,e,t){return(e.inFlow??r.flow?zk:qk)(r,e,t)}function qk({comment:r,items:e},t,{blockItemPrefix:n,flowChars:o,itemIndent:s,onChompKeep:a,onComment:l}){const{indent:c,options:{commentString:d}}=t,u=Object.assign({},t,{indent:s,type:null});let h=!1;const f=[];for(let y=0;y<e.length;++y){const g=e[y];let m=null;if(bt(g))!h&&g.spaceBefore&&f.push(""),dl(t,f,g.commentBefore,h),g.comment&&(m=g.comment);else if(nt(g)){const b=bt(g.key)?g.key:null;b&&(!h&&b.spaceBefore&&f.push(""),dl(t,f,b.commentBefore,h))}h=!1;let v=cl(g,u,()=>m=null,()=>h=!0);m&&(v+=Eo(v,s,d(m))),h&&m&&(h=!1),f.push(n+v)}let p;if(f.length===0)p=o.start+o.end;else{p=f[0];for(let y=1;y<f.length;++y){const g=f[y];p+=g?`
45
45
  ${c}${g}`:`
46
46
  `}}return r?(p+=`
47
47
  `+hi(d(r),c),l&&l()):h&&a&&a(),p}function zk({items:r},e,{flowChars:t,itemIndent:n}){const{indent:o,indentStep:s,flowCollectionPadding:a,options:{commentString:l}}=e;n+=s;const c=Object.assign({},e,{indent:n,inFlow:!0,type:null});let d=!1,u=0;const h=[];for(let y=0;y<r.length;++y){const g=r[y];let m=null;if(bt(g))g.spaceBefore&&h.push(""),dl(e,h,g.commentBefore,!1),g.comment&&(m=g.comment);else if(nt(g)){const b=bt(g.key)?g.key:null;b&&(b.spaceBefore&&h.push(""),dl(e,h,b.commentBefore,!1),b.comment&&(d=!0));const w=bt(g.value)?g.value:null;w?(w.comment&&(m=w.comment),w.commentBefore&&(d=!0)):g.value==null&&(b!=null&&b.comment)&&(m=b.comment)}m&&(d=!0);let v=cl(g,c,()=>m=null);y<r.length-1&&(v+=","),m&&(v+=Eo(v,n,l(m))),!d&&(h.length>u||v.includes(`
48
48
  `))&&(d=!0),h.push(v),u=h.length}const{start:f,end:p}=t;if(h.length===0)return f+p;if(!d){const y=h.reduce((g,m)=>g+m.length+2,2);d=e.options.lineWidth>0&&y>e.options.lineWidth}if(d){let y=f;for(const g of h)y+=g?`
49
49
  ${s}${o}${g}`:`
50
50
  `;return`${y}
51
- ${o}${p}`}else return`${f}${a}${h.join(" ")}${a}${p}`}function dl({indent:r,options:{commentString:e}},t,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const s=hi(e(n),r);t.push(s.trimStart())}}function In(r,e){const t=Ge(e)?e.value:e;for(const n of r)if(nt(n)&&(n.key===e||n.key===t||Ge(n.key)&&n.key.value===t))return n}class So extends Qu{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(zn,e),this.items=[]}static from(e,t,n){const{keepUndefined:o,replacer:s}=n,a=new this(e),l=(c,d)=>{if(typeof s=="function")d=s.call(t,c,d);else if(Array.isArray(s)&&!s.includes(c))return;(d!==void 0||o)&&a.items.push(Zu(c,d,n))};if(t instanceof Map)for(const[c,d]of t)l(c,d);else if(t&&typeof t=="object")for(const c of Object.keys(t))l(c,t[c]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,t){var a;let n;nt(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Or(e,e==null?void 0:e.value):n=new Or(e.key,e.value);const o=In(this.items,n.key),s=(a=this.schema)==null?void 0:a.sortMapEntries;if(o){if(!t)throw new Error(`Key ${n.key} already set`);Ge(o.value)&&c0(n.value)?o.value.value=n.value:o.value=n.value}else if(s){const l=this.items.findIndex(c=>s(n,c)<0);l===-1?this.items.push(n):this.items.splice(l,0,n)}else this.items.push(n)}delete(e){const t=In(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=In(this.items,e),o=n==null?void 0:n.value;return(!t&&Ge(o)?o.value:o)??void 0}has(e){return!!In(this.items,e)}set(e,t){this.add(new Or(e,t),!0)}toJSON(e,t,n){const o=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(o);for(const s of this.items)u0(t,o,s);return o}toString(e,t,n){if(!e)return JSON.stringify(this);for(const o of this.items)if(!nt(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),h0(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}class f0 extends Qu{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ii,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=ca(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=ca(e);if(typeof n!="number")return;const o=this.items[n];return!t&&Ge(o)?o.value:o}has(e){const t=ca(e);return typeof t=="number"&&t<this.items.length}set(e,t){const n=ca(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];Ge(o)&&c0(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t!=null&&t.onCreate&&t.onCreate(n);let o=0;for(const s of this.items)n.push(Yt(s,String(o++),t));return n}toString(e,t,n){return e?h0(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:o}=n,s=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let l of t){if(typeof o=="function"){const c=t instanceof Set?l:String(a++);l=o.call(t,c,l)}s.items.push(ll(l,void 0,n))}}return s}}function ca(r){let e=Ge(r)?r.value:r;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function Hk(r,e,t){const{replacer:n}=t,o=new f0(r);o.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(s++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const d=Object.keys(a);if(d.length===1)l=d[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else l=a;o.items.push(Zu(l,c,t))}return o}class eh extends f0{constructor(){super(),this.add=So.prototype.add.bind(this),this.delete=So.prototype.delete.bind(this),this.get=So.prototype.get.bind(this),this.has=So.prototype.has.bind(this),this.set=So.prototype.set.bind(this),this.tag=eh.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const o of this.items){let s,a;if(nt(o)?(s=Yt(o.key,"",t),a=Yt(o.value,s,t)):s=Yt(o,"",t),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}return n}static from(e,t,n){const o=Hk(e,t,n),s=new this;return s.items=o.items,s}}eh.tag="tag:yaml.org,2002:omap";class th extends So{constructor(e){super(e),this.tag=th.tag}add(e){let t;nt(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Or(e.key,null):t=new Or(e,null),In(this.items,t.key)||this.items.push(t)}get(e,t){const n=In(this.items,e);return!t&&nt(n)?Ge(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=In(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Or(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:o}=n,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof o=="function"&&(a=o.call(t,a,a)),s.items.push(Zu(a,null,n));return s}}th.tag="tag:yaml.org,2002:set";const p0={parse:r=>{const e=JSON.parse(r);if(typeof e!="object")throw Error("Invalid JSON object");return e},parseSafe(r,e){try{return p0.parse(r)}catch(t){return typeof e=="function"?e(t):e}},stringify:r=>JSON.stringify(r)},m0=r=>typeof r!="string"?!1:!!p0.parseSafe(r,!1);function Uk(r){if(r.trim()[0]!=="{")return r;try{return JSON.stringify(JSON.parse(r),null,2)}catch{return r}}const Kk="https://api.scalar.com/request-proxy",Wk="https://proxy.scalar.com";function Gk(r,e){return`${r}?scalar_url=${encodeURI(e)}`}async function bp(r,e){e===Kk&&(e=Wk);const t=await fetch(e?Gk(e,r):r);return t.status!==200&&(console.error(`[fetchSpecFromUrl] Failed to fetch the specification at ${r} (Status: ${t.status})`),e||console.warn(`[fetchSpecFromUrl] Tried to fetch the specification (url: ${r}) without a proxy. Are the CORS headers configured to allow cross-domain requests? https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS`)),Uk(await t.text())}function Jk(r,e=""){return{"date-time":new Date().toISOString(),date:new Date().toISOString().split("T")[0],email:"hello@example.com",hostname:"example.com","idn-email":"jane.doe@example.com","idn-hostname":"example.com",ipv4:"127.0.0.1",ipv6:"51d4:7fab:bfbf:b7d7:b2cb:d4b4:3dad:d998","iri-reference":"/entitiy/1",iri:"https://example.com/entity/123","json-pointer":"/nested/objects",password:"super-secret",regex:"/[a-z]/","relative-json-pointer":"1/nested/objects",time:new Date().toISOString().split("T")[1].split(".")[0],"uri-reference":"../folder","uri-template":"https://example.com/{id}",uri:"https://example.com",uuid:"123e4567-e89b-12d3-a456-426614174000"}[r.format]??e}const Ue=(r,e,t=0)=>{var s,a,l,c,d;if(t>5)return null;const n=!!(e!=null&&e.emptyString);if((e==null?void 0:e.mode)==="write"&&r.readOnly||(e==null?void 0:e.mode)==="read"&&r.writeOnly)return;if(r["x-variable"]){const u=(s=e==null?void 0:e.variables)==null?void 0:s[r["x-variable"]];if(u!==void 0)return r.type==="number"||r.type==="integer"?parseInt(u,10):u}if(Array.isArray(r.examples)&&r.examples.length>0)return r.examples[0];if(r.example!==void 0)return r.example;if(r.default!==void 0)return r.default;if(r.enum!==void 0)return r.enum[0];if(r.type==="object"||r.properties!==void 0){const u={};if(r.properties!==void 0&&Object.keys(r.properties).forEach(h=>{var y;const f=r.properties[h],p=e!=null&&e.xml?(y=f.xml)==null?void 0:y.name:void 0;u[p??h]=Ue(f,e,t+1)}),r.anyOf!==void 0?Object.assign(u,Ue(r.anyOf[0]),e,t+1):r.oneOf!==void 0?Object.assign(u,Ue(r.oneOf[0]),e,t+1):r.allOf!==void 0&&Object.assign(u,...r.allOf.map(h=>Ue(h,e,t+1))),r.additionalProperties!==void 0&&r.additionalProperties!==!1){const h=Ue(r.additionalProperties,e,t+1);return h&&typeof h=="object"&&!Array.isArray(h)?{...u,...Ue(r.additionalProperties,e,t+1)}:h===null?null:{...u,someKey:Ue(r.additionalProperties,e,t+1)}}return u}if(r.type==="array"||r.items!==void 0){const u=(l=(a=r==null?void 0:r.items)==null?void 0:a.xml)==null?void 0:l.name,h=!!(e!=null&&e.xml&&((c=r.xml)!=null&&c.wrapped)&&u);if(r.example!==void 0)return h?{[u]:r.example}:r.example;if(r.items){const f=["anyOf","oneOf","allOf"];for(const p of f){if(!r.items[p])continue;const g=(["anyOf","oneOf"].includes(p)?r.items[p].slice(0,1):r.items[p]).map(m=>Ue(m,e,t+1));return h?[{[u]:g}]:g}}if((d=r.items)!=null&&d.type){const f=Ue(r.items,e,t+1);return h?[{[u]:f}]:[f]}return[]}const o={string:n?Jk(r,e==null?void 0:e.emptyString):"",boolean:!0,integer:r.min??1,number:r.min??1,array:[]};if(r.type!==void 0&&o[r.type]!==void 0)return o[r.type];if(Array.isArray(r.oneOf)&&r.oneOf.length>0){const u=r.oneOf[0];return Ue(u,e,t+1)}if(Array.isArray(r.allOf)){let u=null;return r.allOf.forEach(h=>{const f=Ue(h,e,t+1);u=typeof f=="object"&&typeof u=="object"?{...u??{},...f}:Array.isArray(f)&&Array.isArray(u)?[...u??{},...f]:f}),u}if(Array.isArray(r.type)){if(r.type.includes("null"))return null;const u=o[r.type[0]];if(u!==void 0)return u}return console.warn(`[getExampleFromSchema] Unknown property type "${r.type}".`),null},g0=(...r)=>{let e={httpVersion:"1.1",method:"GET",url:"",path:"",headers:[],headersSize:-1,queryString:[],cookies:[],bodySize:-1};r.forEach(a=>{e={...e,...a,headers:[...e.headers,...a.headers??[]],queryString:[...e.queryString,...a.queryString??[]],cookies:[...e.cookies,...a.cookies??[]]}});const t=e.headers.reduce((a,{name:l,value:c})=>(a[l]=c,a),{}),n=Mw.AxiosHeaders.from(t).normalize(!0);e.headers=Object.entries(n).map(([a,l])=>({name:a,value:l}));const{path:o,...s}=e;return o?{...s,url:`${e.url}${o}`}:s};function Po(r,e,t=!0){var s;return[...r.pathParameters||[],...((s=r.information)==null?void 0:s.parameters)||[]].filter(a=>a.in===e).filter(a=>t&&a.required||!t).map(a=>({name:a.name,description:a.description??null,value:a.example?a.example:a.schema?Ue(a.schema,{mode:"write"}):"",required:a.required??!1,enabled:a.required??!1})).sort((a,l)=>a.required&&!l.required?-1:!a.required&&l.required?1:0)}function Yk(r,e){const t=function(o,s,a){let l="";if(o instanceof Array)for(let c=0,d=o.length;c<d;c++)l+=a+t(o[c],s,a+" ")+`
51
+ ${o}${p}`}else return`${f}${a}${h.join(" ")}${a}${p}`}function dl({indent:r,options:{commentString:e}},t,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const s=hi(e(n),r);t.push(s.trimStart())}}function In(r,e){const t=Ge(e)?e.value:e;for(const n of r)if(nt(n)&&(n.key===e||n.key===t||Ge(n.key)&&n.key.value===t))return n}class So extends Zu{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(zn,e),this.items=[]}static from(e,t,n){const{keepUndefined:o,replacer:s}=n,a=new this(e),l=(c,d)=>{if(typeof s=="function")d=s.call(t,c,d);else if(Array.isArray(s)&&!s.includes(c))return;(d!==void 0||o)&&a.items.push(eh(c,d,n))};if(t instanceof Map)for(const[c,d]of t)l(c,d);else if(t&&typeof t=="object")for(const c of Object.keys(t))l(c,t[c]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,t){var a;let n;nt(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Or(e,e==null?void 0:e.value):n=new Or(e.key,e.value);const o=In(this.items,n.key),s=(a=this.schema)==null?void 0:a.sortMapEntries;if(o){if(!t)throw new Error(`Key ${n.key} already set`);Ge(o.value)&&c0(n.value)?o.value.value=n.value:o.value=n.value}else if(s){const l=this.items.findIndex(c=>s(n,c)<0);l===-1?this.items.push(n):this.items.splice(l,0,n)}else this.items.push(n)}delete(e){const t=In(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=In(this.items,e),o=n==null?void 0:n.value;return(!t&&Ge(o)?o.value:o)??void 0}has(e){return!!In(this.items,e)}set(e,t){this.add(new Or(e,t),!0)}toJSON(e,t,n){const o=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(o);for(const s of this.items)u0(t,o,s);return o}toString(e,t,n){if(!e)return JSON.stringify(this);for(const o of this.items)if(!nt(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),h0(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}class f0 extends Zu{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ii,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=ca(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=ca(e);if(typeof n!="number")return;const o=this.items[n];return!t&&Ge(o)?o.value:o}has(e){const t=ca(e);return typeof t=="number"&&t<this.items.length}set(e,t){const n=ca(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];Ge(o)&&c0(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t!=null&&t.onCreate&&t.onCreate(n);let o=0;for(const s of this.items)n.push(Yt(s,String(o++),t));return n}toString(e,t,n){return e?h0(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:o}=n,s=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let l of t){if(typeof o=="function"){const c=t instanceof Set?l:String(a++);l=o.call(t,c,l)}s.items.push(ll(l,void 0,n))}}return s}}function ca(r){let e=Ge(r)?r.value:r;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function Hk(r,e,t){const{replacer:n}=t,o=new f0(r);o.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(s++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const d=Object.keys(a);if(d.length===1)l=d[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else l=a;o.items.push(eh(l,c,t))}return o}class th extends f0{constructor(){super(),this.add=So.prototype.add.bind(this),this.delete=So.prototype.delete.bind(this),this.get=So.prototype.get.bind(this),this.has=So.prototype.has.bind(this),this.set=So.prototype.set.bind(this),this.tag=th.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const o of this.items){let s,a;if(nt(o)?(s=Yt(o.key,"",t),a=Yt(o.value,s,t)):s=Yt(o,"",t),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}return n}static from(e,t,n){const o=Hk(e,t,n),s=new this;return s.items=o.items,s}}th.tag="tag:yaml.org,2002:omap";class rh extends So{constructor(e){super(e),this.tag=rh.tag}add(e){let t;nt(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Or(e.key,null):t=new Or(e,null),In(this.items,t.key)||this.items.push(t)}get(e,t){const n=In(this.items,e);return!t&&nt(n)?Ge(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=In(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Or(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:o}=n,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof o=="function"&&(a=o.call(t,a,a)),s.items.push(eh(a,null,n));return s}}rh.tag="tag:yaml.org,2002:set";const p0={parse:r=>{const e=JSON.parse(r);if(typeof e!="object")throw Error("Invalid JSON object");return e},parseSafe(r,e){try{return p0.parse(r)}catch(t){return typeof e=="function"?e(t):e}},stringify:r=>JSON.stringify(r)},m0=r=>typeof r!="string"?!1:!!p0.parseSafe(r,!1);function Uk(r){if(r.trim()[0]!=="{")return r;try{return JSON.stringify(JSON.parse(r),null,2)}catch{return r}}const Kk="https://api.scalar.com/request-proxy",Wk="https://proxy.scalar.com";function Gk(r,e){return`${r}?scalar_url=${encodeURI(e)}`}async function bp(r,e){e===Kk&&(e=Wk);const t=await fetch(e?Gk(e,r):r);return t.status!==200&&(console.error(`[fetchSpecFromUrl] Failed to fetch the specification at ${r} (Status: ${t.status})`),e||console.warn(`[fetchSpecFromUrl] Tried to fetch the specification (url: ${r}) without a proxy. Are the CORS headers configured to allow cross-domain requests? https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS`)),Uk(await t.text())}function Jk(r,e=""){return{"date-time":new Date().toISOString(),date:new Date().toISOString().split("T")[0],email:"hello@example.com",hostname:"example.com","idn-email":"jane.doe@example.com","idn-hostname":"example.com",ipv4:"127.0.0.1",ipv6:"51d4:7fab:bfbf:b7d7:b2cb:d4b4:3dad:d998","iri-reference":"/entitiy/1",iri:"https://example.com/entity/123","json-pointer":"/nested/objects",password:"super-secret",regex:"/[a-z]/","relative-json-pointer":"1/nested/objects",time:new Date().toISOString().split("T")[1].split(".")[0],"uri-reference":"../folder","uri-template":"https://example.com/{id}",uri:"https://example.com",uuid:"123e4567-e89b-12d3-a456-426614174000"}[r.format]??e}const Ue=(r,e,t=0)=>{var s,a,l,c,d;if(t>5)return null;const n=!!(e!=null&&e.emptyString);if((e==null?void 0:e.mode)==="write"&&r.readOnly||(e==null?void 0:e.mode)==="read"&&r.writeOnly)return;if(r["x-variable"]){const u=(s=e==null?void 0:e.variables)==null?void 0:s[r["x-variable"]];if(u!==void 0)return r.type==="number"||r.type==="integer"?parseInt(u,10):u}if(Array.isArray(r.examples)&&r.examples.length>0)return r.examples[0];if(r.example!==void 0)return r.example;if(r.default!==void 0)return r.default;if(r.enum!==void 0)return r.enum[0];if(r.type==="object"||r.properties!==void 0){const u={};if(r.properties!==void 0&&Object.keys(r.properties).forEach(h=>{var y;const f=r.properties[h],p=e!=null&&e.xml?(y=f.xml)==null?void 0:y.name:void 0;u[p??h]=Ue(f,e,t+1)}),r.anyOf!==void 0?Object.assign(u,Ue(r.anyOf[0]),e,t+1):r.oneOf!==void 0?Object.assign(u,Ue(r.oneOf[0]),e,t+1):r.allOf!==void 0&&Object.assign(u,...r.allOf.map(h=>Ue(h,e,t+1))),r.additionalProperties!==void 0&&r.additionalProperties!==!1){const h=Ue(r.additionalProperties,e,t+1);return h&&typeof h=="object"&&!Array.isArray(h)?{...u,...Ue(r.additionalProperties,e,t+1)}:h===null?null:{...u,someKey:Ue(r.additionalProperties,e,t+1)}}return u}if(r.type==="array"||r.items!==void 0){const u=(l=(a=r==null?void 0:r.items)==null?void 0:a.xml)==null?void 0:l.name,h=!!(e!=null&&e.xml&&((c=r.xml)!=null&&c.wrapped)&&u);if(r.example!==void 0)return h?{[u]:r.example}:r.example;if(r.items){const f=["anyOf","oneOf","allOf"];for(const p of f){if(!r.items[p])continue;const g=(["anyOf","oneOf"].includes(p)?r.items[p].slice(0,1):r.items[p]).map(m=>Ue(m,e,t+1));return h?[{[u]:g}]:g}}if((d=r.items)!=null&&d.type){const f=Ue(r.items,e,t+1);return h?[{[u]:f}]:[f]}return[]}const o={string:n?Jk(r,e==null?void 0:e.emptyString):"",boolean:!0,integer:r.min??1,number:r.min??1,array:[]};if(r.type!==void 0&&o[r.type]!==void 0)return o[r.type];if(Array.isArray(r.oneOf)&&r.oneOf.length>0){const u=r.oneOf[0];return Ue(u,e,t+1)}if(Array.isArray(r.allOf)){let u=null;return r.allOf.forEach(h=>{const f=Ue(h,e,t+1);u=typeof f=="object"&&typeof u=="object"?{...u??{},...f}:Array.isArray(f)&&Array.isArray(u)?[...u??{},...f]:f}),u}if(Array.isArray(r.type)){if(r.type.includes("null"))return null;const u=o[r.type[0]];if(u!==void 0)return u}return console.warn(`[getExampleFromSchema] Unknown property type "${r.type}".`),null},g0=(...r)=>{let e={httpVersion:"1.1",method:"GET",url:"",path:"",headers:[],headersSize:-1,queryString:[],cookies:[],bodySize:-1};r.forEach(a=>{e={...e,...a,headers:[...e.headers,...a.headers??[]],queryString:[...e.queryString,...a.queryString??[]],cookies:[...e.cookies,...a.cookies??[]]}});const t=e.headers.reduce((a,{name:l,value:c})=>(a[l]=c,a),{}),n=Mw.AxiosHeaders.from(t).normalize(!0);e.headers=Object.entries(n).map(([a,l])=>({name:a,value:l}));const{path:o,...s}=e;return o?{...s,url:`${e.url}${o}`}:s};function Po(r,e,t=!0){var s;return[...r.pathParameters||[],...((s=r.information)==null?void 0:s.parameters)||[]].filter(a=>a.in===e).filter(a=>t&&a.required||!t).map(a=>({name:a.name,description:a.description??null,value:a.example?a.example:a.schema?Ue(a.schema,{mode:"write"}):"",required:a.required??!1,enabled:a.required??!1})).sort((a,l)=>a.required&&!l.required?-1:!a.required&&l.required?1:0)}function Yk(r,e){const t=function(o,s,a){let l="";if(o instanceof Array)for(let c=0,d=o.length;c<d;c++)l+=a+t(o[c],s,a+" ")+`
52
52
  `;else if(typeof o=="object"){let c=!1;l+=a+"<"+s;for(const d in o)d.charAt(0)=="@"?l+=" "+d.substr(1)+'="'+o[d].toString()+'"':c=!0;if(l+=c?">":"/>",c){for(const d in o)d=="#text"?l+=o[d]:d=="#cdata"?l+="<![CDATA["+o[d]+"]]>":d.charAt(0)!="@"&&(l+=t(o[d],d,a+" "));l+=(l.charAt(l.length-1)==`
53
- `?a:"")+"</"+s+">"}}else l+=a+"<"+s+">"+o.toString()+"</"+s+">";return l};let n="";for(const o in r)n+=t(r[o],o,"");return e?n.replace(/\t/g,e):n.replace(/\t|\n/g,"")}function y0(r){if(typeof r=="string")return r.replace(/;.*$/,"").replace(/\/.+\+/,"/").trim()}function v0(r){if(!r)return r;const e={...r};return Object.keys(e).forEach(t=>{const n=y0(t);n!==void 0&&(e[n]=e[t],t!==n&&delete e[t])}),e}const fi=r=>{try{return JSON.stringify(typeof r=="string"?JSON.parse(r):r,null,2)}catch{return console.log("[prettyPrintJson] Error parsing JSON",r),r}};function Xk(r,e){var p,y,g,m;const t=["application/json","application/octet-stream","application/x-www-form-urlencoded","application/xml","multipart/form-data","text/plain"],n=(y=(p=r.information)==null?void 0:p.requestBody)==null?void 0:y.content,o=v0(n),s=t.find(v=>!!(o!=null&&o[v])),a=(g=o==null?void 0:o["application/json"])==null?void 0:g.examples,l=(m=a??{})==null?void 0:m[e??Object.keys(a??{})[0]];if(l)return{postData:{mimeType:"application/json",text:fi(l==null?void 0:l.value)}};const c=Po(r,"body",!1);if(c.length>0)return{postData:{mimeType:"application/json",text:fi(c[0].value)}};const d=Po(r,"formData",!1);if(d.length>0)return{postData:{mimeType:"application/x-www-form-urlencoded",params:d.map(v=>({name:v.name,value:v.value}))}};if(!s)return{postData:void 0};const u=o==null?void 0:o[s],h=[{name:"Content-Type",value:s}],f=u!=null&&u.example?u==null?void 0:u.example:void 0;if(s==="application/json"){const v=u!=null&&u.schema?Ue(u==null?void 0:u.schema,{mode:"write"}):null,b=f??v;return{headers:h,postData:{mimeType:s,text:typeof b=="string"?b:JSON.stringify(b,null,2)}}}if(s==="application/xml"){const v=u!=null&&u.schema?Ue(u==null?void 0:u.schema,{xml:!0,mode:"write"}):null;return{headers:h,postData:{mimeType:s,text:f??Yk(v," ")}}}if(s==="application/octet-stream")return{headers:h,postData:{mimeType:s,text:"BINARY"}};if(s==="text/plain"){const v=u!=null&&u.schema?Ue(u==null?void 0:u.schema,{xml:!0,mode:"write"}):null;return{headers:h,postData:{mimeType:s,text:f??v??""}}}if(s==="application/x-www-form-urlencoded")return{headers:h,postData:{mimeType:s}};if(s==="multipart/form-data")return{headers:h,postData:{mimeType:s}}}const Od=(r,e,t)=>{let n=r.path;if((e==null?void 0:e.replaceVariables)===!0){const s=n.match(/{(.*?)}/g);s&&s.forEach(a=>{const l=a.replace(/{|}/g,"");n=n.replace(a,`__${l.toUpperCase()}__`)})}const o=Xk(r,t);return{method:r.httpVerb.toUpperCase(),path:n,headers:[...Po(r,"header",e==null?void 0:e.requiredOnly),...(o==null?void 0:o.headers)??[]],postData:o==null?void 0:o.postData,queryString:Po(r,"query",e==null?void 0:e.requiredOnly),cookies:Po(r,"cookie",e==null?void 0:e.requiredOnly)}},b0=()=>({preferredSecurityScheme:null,customSecurity:!1,http:{basic:{username:"",password:""},bearer:{token:""}},apiKey:{token:""},oAuth2:{username:"",password:"",clientId:"",scopes:[],accessToken:"",state:""}}),w0=i.reactive(ts["useGlobalStore-authentication"]??b0()),Qk=r=>Object.assign(w0,r),ns=()=>({authentication:w0,setAuthentication:Qk}),k0=()=>({operation:{},globalSecurity:[]}),pi=i.reactive(k0()),Zk=r=>{Object.assign(pi,{...pi,operation:r})},eS=r=>{Object.assign(pi,{...pi,globalSecurity:r})},rh=()=>({openApi:pi,setOperation:Zk,setGlobalSecurity:eS}),S0=()=>({name:"",url:"",type:"GET",path:"",variables:[],headers:[],query:[],body:"",formData:[]}),Ul=i.reactive({}),x0=i.ref([]),Ho=i.ref(""),nh=i.reactive(S0()),tS=r=>{Ul[r.responseId]=r,Ho.value=r.responseId,x0.value.unshift(r.responseId)},rS=r=>{Ho.value=r;const{request:e}=Ul[r],t=JSON.parse(JSON.stringify(e));t.body=JSON.stringify(e.body,null,2),Object.assign(nh,t)},nS=i.computed(()=>Ho.value?Ul[Ho.value].response:null),oS=r=>{Object.assign(nh,r)},sS=()=>{Ho.value=""},iS=i.ref(!0),C0=()=>({readOnly:iS,activeRequest:nh,activeResponse:nS,requestHistory:Ul,requestHistoryOrder:x0,activeRequestId:Ho,setActiveResponse:rS,resetActiveResponse:sS,addRequestToHistory:tS,setActiveRequest:oS}),E0=()=>({selectedServer:null,servers:[],variables:[]}),Td=i.reactive(E0()),aS=r=>{Object.assign(Td,{...Td,...r})},no=()=>({server:Td,setServer:aS}),oh=["GET","POST","PUT","HEAD","DELETE","PATCH","OPTIONS","CONNECT","TRACE"];function Bd(r){return oh.includes(r)}const $0={POST:"var(--scalar-color-green)",DELETE:"var(--scalar-color-red)",PATCH:"var(--scalar-color-yellow)",GET:"var(--scalar-color-blue)",PUT:"var(--scalar-color-orange)",OPTIONS:"var(--scalar-color-purple)",HEAD:"var(--scalar-color-2)",CONNECT:"var(--scalar-color-2)",TRACE:"var(--scalar-color-2)"},_0={POST:"POST",DELETE:"DEL",PATCH:"PATCH",GET:"GET",PUT:"PUT",OPTIONS:"OPTS",HEAD:"HEAD",CONNECT:"CONN",TRACE:"TRACE"},oo=i.defineComponent({__name:"HttpMethod",props:{as:{},property:{},short:{type:Boolean},method:{}},setup(r){const e=r,t=i.computed(()=>e.method.trim().toUpperCase()),n=i.computed(()=>Bd(t.value)?_0[t.value]:t.value.slice(0,4)),o=i.computed(()=>Bd(t.value)?$0[t.value]:"var(--scalar-color-ghost)");return(s,a)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s.as??"span"),{style:i.normalizeStyle({[s.property||"color"]:o.value})},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",i.normalizeProps(i.guardReactiveProps({normalized:t.value,abbreviated:n.value,color:o.value})),()=>[i.createTextVNode(i.toDisplayString(s.short?n.value:t.value),1)])]),_:3},8,["style"]))}});class we{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Uo(this,e,t);let o=[];return this.decompose(0,e,o,2),n.length&&n.decompose(0,n.length,o,3),this.decompose(t,this.length,o,1),ur.from(o,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Uo(this,e,t);let n=[];return this.decompose(e,t,n,0),ur.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),o=new ti(this),s=new ti(e);for(let a=t,l=t;;){if(o.next(a),s.next(a),a=0,o.lineBreak!=s.lineBreak||o.done!=s.done||o.value!=s.value)return!1;if(l+=o.value.length,o.done||l>=n)return!0}}iter(e=1){return new ti(this,e)}iterRange(e,t=this.length){return new N0(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let o=this.line(e).from;n=this.iterRange(o,Math.max(o,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new A0(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?we.empty:e.length<=32?new Re(e):ur.from(Re.split(e,[]))}}class Re extends we{constructor(e,t=lS(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,o){for(let s=0;;s++){let a=this.text[s],l=o+a.length;if((t?n:l)>=e)return new cS(o,l,n,a);o=l+1,n++}}decompose(e,t,n,o){let s=e<=0&&t>=this.length?this:new Re(wp(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(o&1){let a=n.pop(),l=Ha(s.text,a.text.slice(),0,s.length);if(l.length<=32)n.push(new Re(l,a.length+s.length));else{let c=l.length>>1;n.push(new Re(l.slice(0,c)),new Re(l.slice(c)))}}else n.push(s)}replace(e,t,n){if(!(n instanceof Re))return super.replace(e,t,n);[e,t]=Uo(this,e,t);let o=Ha(this.text,Ha(n.text,wp(this.text,0,e)),t),s=this.length+n.length-(t-e);return o.length<=32?new Re(o,s):ur.from(Re.split(o,[]),s)}sliceString(e,t=this.length,n=`
53
+ `?a:"")+"</"+s+">"}}else l+=a+"<"+s+">"+o.toString()+"</"+s+">";return l};let n="";for(const o in r)n+=t(r[o],o,"");return e?n.replace(/\t/g,e):n.replace(/\t|\n/g,"")}function y0(r){if(typeof r=="string")return r.replace(/;.*$/,"").replace(/\/.+\+/,"/").trim()}function v0(r){if(!r)return r;const e={...r};return Object.keys(e).forEach(t=>{const n=y0(t);n!==void 0&&(e[n]=e[t],t!==n&&delete e[t])}),e}const fi=r=>{try{return JSON.stringify(typeof r=="string"?JSON.parse(r):r,null,2)}catch{return console.log("[prettyPrintJson] Error parsing JSON",r),r}};function Xk(r,e){var p,y,g,m;const t=["application/json","application/octet-stream","application/x-www-form-urlencoded","application/xml","multipart/form-data","text/plain"],n=(y=(p=r.information)==null?void 0:p.requestBody)==null?void 0:y.content,o=v0(n),s=t.find(v=>!!(o!=null&&o[v])),a=(g=o==null?void 0:o["application/json"])==null?void 0:g.examples,l=(m=a??{})==null?void 0:m[e??Object.keys(a??{})[0]];if(l)return{postData:{mimeType:"application/json",text:fi(l==null?void 0:l.value)}};const c=Po(r,"body",!1);if(c.length>0)return{postData:{mimeType:"application/json",text:fi(c[0].value)}};const d=Po(r,"formData",!1);if(d.length>0)return{postData:{mimeType:"application/x-www-form-urlencoded",params:d.map(v=>({name:v.name,value:v.value}))}};if(!s)return{postData:void 0};const u=o==null?void 0:o[s],h=[{name:"Content-Type",value:s}],f=u!=null&&u.example?u==null?void 0:u.example:void 0;if(s==="application/json"){const v=u!=null&&u.schema?Ue(u==null?void 0:u.schema,{mode:"write"}):null,b=f??v;return{headers:h,postData:{mimeType:s,text:typeof b=="string"?b:JSON.stringify(b,null,2)}}}if(s==="application/xml"){const v=u!=null&&u.schema?Ue(u==null?void 0:u.schema,{xml:!0,mode:"write"}):null;return{headers:h,postData:{mimeType:s,text:f??Yk(v," ")}}}if(s==="application/octet-stream")return{headers:h,postData:{mimeType:s,text:"BINARY"}};if(s==="text/plain"){const v=u!=null&&u.schema?Ue(u==null?void 0:u.schema,{xml:!0,mode:"write"}):null;return{headers:h,postData:{mimeType:s,text:f??v??""}}}if(s==="application/x-www-form-urlencoded")return{headers:h,postData:{mimeType:s}};if(s==="multipart/form-data")return{headers:h,postData:{mimeType:s}}}const Td=(r,e,t)=>{let n=r.path;if((e==null?void 0:e.replaceVariables)===!0){const s=n.match(/{(.*?)}/g);s&&s.forEach(a=>{const l=a.replace(/{|}/g,"");n=n.replace(a,`__${l.toUpperCase()}__`)})}const o=Xk(r,t);return{method:r.httpVerb.toUpperCase(),path:n,headers:[...Po(r,"header",e==null?void 0:e.requiredOnly),...(o==null?void 0:o.headers)??[]],postData:o==null?void 0:o.postData,queryString:Po(r,"query",e==null?void 0:e.requiredOnly),cookies:Po(r,"cookie",e==null?void 0:e.requiredOnly)}},b0=()=>({preferredSecurityScheme:null,customSecurity:!1,http:{basic:{username:"",password:""},bearer:{token:""}},apiKey:{token:""},oAuth2:{username:"",password:"",clientId:"",scopes:[],accessToken:"",state:""}}),w0=i.reactive(ts["useGlobalStore-authentication"]??b0()),Qk=r=>Object.assign(w0,r),ns=()=>({authentication:w0,setAuthentication:Qk}),k0=()=>({operation:{},globalSecurity:[]}),pi=i.reactive(k0()),Zk=r=>{Object.assign(pi,{...pi,operation:r})},eS=r=>{Object.assign(pi,{...pi,globalSecurity:r})},nh=()=>({openApi:pi,setOperation:Zk,setGlobalSecurity:eS}),S0=()=>({name:"",url:"",type:"GET",path:"",variables:[],headers:[],query:[],body:"",formData:[]}),Kl=i.reactive({}),x0=i.ref([]),Ho=i.ref(""),oh=i.reactive(S0()),tS=r=>{Kl[r.responseId]=r,Ho.value=r.responseId,x0.value.unshift(r.responseId)},rS=r=>{Ho.value=r;const{request:e}=Kl[r],t=JSON.parse(JSON.stringify(e));t.body=JSON.stringify(e.body,null,2),Object.assign(oh,t)},nS=i.computed(()=>Ho.value?Kl[Ho.value].response:null),oS=r=>{Object.assign(oh,r)},sS=()=>{Ho.value=""},iS=i.ref(!0),C0=()=>({readOnly:iS,activeRequest:oh,activeResponse:nS,requestHistory:Kl,requestHistoryOrder:x0,activeRequestId:Ho,setActiveResponse:rS,resetActiveResponse:sS,addRequestToHistory:tS,setActiveRequest:oS}),E0=()=>({selectedServer:null,servers:[],variables:[]}),Bd=i.reactive(E0()),aS=r=>{Object.assign(Bd,{...Bd,...r})},no=()=>({server:Bd,setServer:aS}),sh=["GET","POST","PUT","HEAD","DELETE","PATCH","OPTIONS","CONNECT","TRACE"];function Pd(r){return sh.includes(r)}const $0={POST:"var(--scalar-color-green)",DELETE:"var(--scalar-color-red)",PATCH:"var(--scalar-color-yellow)",GET:"var(--scalar-color-blue)",PUT:"var(--scalar-color-orange)",OPTIONS:"var(--scalar-color-purple)",HEAD:"var(--scalar-color-2)",CONNECT:"var(--scalar-color-2)",TRACE:"var(--scalar-color-2)"},_0={POST:"POST",DELETE:"DEL",PATCH:"PATCH",GET:"GET",PUT:"PUT",OPTIONS:"OPTS",HEAD:"HEAD",CONNECT:"CONN",TRACE:"TRACE"},oo=i.defineComponent({__name:"HttpMethod",props:{as:{},property:{},short:{type:Boolean},method:{}},setup(r){const e=r,t=i.computed(()=>e.method.trim().toUpperCase()),n=i.computed(()=>Pd(t.value)?_0[t.value]:t.value.slice(0,4)),o=i.computed(()=>Pd(t.value)?$0[t.value]:"var(--scalar-color-ghost)");return(s,a)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s.as??"span"),{style:i.normalizeStyle({[s.property||"color"]:o.value})},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",i.normalizeProps(i.guardReactiveProps({normalized:t.value,abbreviated:n.value,color:o.value})),()=>[i.createTextVNode(i.toDisplayString(s.short?n.value:t.value),1)])]),_:3},8,["style"]))}});class we{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Uo(this,e,t);let o=[];return this.decompose(0,e,o,2),n.length&&n.decompose(0,n.length,o,3),this.decompose(t,this.length,o,1),ur.from(o,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Uo(this,e,t);let n=[];return this.decompose(e,t,n,0),ur.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),o=new ti(this),s=new ti(e);for(let a=t,l=t;;){if(o.next(a),s.next(a),a=0,o.lineBreak!=s.lineBreak||o.done!=s.done||o.value!=s.value)return!1;if(l+=o.value.length,o.done||l>=n)return!0}}iter(e=1){return new ti(this,e)}iterRange(e,t=this.length){return new N0(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let o=this.line(e).from;n=this.iterRange(o,Math.max(o,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new A0(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?we.empty:e.length<=32?new Re(e):ur.from(Re.split(e,[]))}}class Re extends we{constructor(e,t=lS(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,o){for(let s=0;;s++){let a=this.text[s],l=o+a.length;if((t?n:l)>=e)return new cS(o,l,n,a);o=l+1,n++}}decompose(e,t,n,o){let s=e<=0&&t>=this.length?this:new Re(wp(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(o&1){let a=n.pop(),l=Ha(s.text,a.text.slice(),0,s.length);if(l.length<=32)n.push(new Re(l,a.length+s.length));else{let c=l.length>>1;n.push(new Re(l.slice(0,c)),new Re(l.slice(c)))}}else n.push(s)}replace(e,t,n){if(!(n instanceof Re))return super.replace(e,t,n);[e,t]=Uo(this,e,t);let o=Ha(this.text,Ha(n.text,wp(this.text,0,e)),t),s=this.length+n.length-(t-e);return o.length<=32?new Re(o,s):ur.from(Re.split(o,[]),s)}sliceString(e,t=this.length,n=`
54
54
  `){[e,t]=Uo(this,e,t);let o="";for(let s=0,a=0;s<=t&&a<this.text.length;a++){let l=this.text[a],c=s+l.length;s>e&&a&&(o+=n),e<c&&t>s&&(o+=l.slice(Math.max(0,e-s),t-s)),s=c+1}return o}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],o=-1;for(let s of e)n.push(s),o+=s.length+1,n.length==32&&(t.push(new Re(n,o)),n=[],o=-1);return o>-1&&t.push(new Re(n,o)),t}}class ur extends we{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,o){for(let s=0;;s++){let a=this.children[s],l=o+a.length,c=n+a.lines-1;if((t?c:l)>=e)return a.lineInner(e,t,n,o);o=l+1,n=c+1}}decompose(e,t,n,o){for(let s=0,a=0;a<=t&&s<this.children.length;s++){let l=this.children[s],c=a+l.length;if(e<=c&&t>=a){let d=o&((a<=e?1:0)|(c>=t?2:0));a>=e&&c<=t&&!d?n.push(l):l.decompose(e-a,t-a,n,d)}a=c+1}}replace(e,t,n){if([e,t]=Uo(this,e,t),n.lines<this.lines)for(let o=0,s=0;o<this.children.length;o++){let a=this.children[o],l=s+a.length;if(e>=s&&t<=l){let c=a.replace(e-s,t-s,n),d=this.lines-a.lines+c.lines;if(c.lines<d>>4&&c.lines>d>>6){let u=this.children.slice();return u[o]=c,new ur(u,this.length-(t-e)+n.length)}return super.replace(s,l,c)}s=l+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
55
55
  `){[e,t]=Uo(this,e,t);let o="";for(let s=0,a=0;s<this.children.length&&a<=t;s++){let l=this.children[s],c=a+l.length;a>e&&s&&(o+=n),e<c&&t>a&&(o+=l.sliceString(e-a,t-a,n)),a=c+1}return o}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ur))return 0;let n=0,[o,s,a,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;o+=t,s+=t){if(o==a||s==l)return n;let c=this.children[o],d=e.children[s];if(c!=d)return n+c.scanIdentical(d,t);n+=c.length+1}}static from(e,t=e.reduce((n,o)=>n+o.length+1,-1)){let n=0;for(let p of e)n+=p.lines;if(n<32){let p=[];for(let y of e)y.flatten(p);return new Re(p,t)}let o=Math.max(32,n>>5),s=o<<1,a=o>>1,l=[],c=0,d=-1,u=[];function h(p){let y;if(p.lines>s&&p instanceof ur)for(let g of p.children)h(g);else p.lines>a&&(c>a||!c)?(f(),l.push(p)):p instanceof Re&&c&&(y=u[u.length-1])instanceof Re&&p.lines+y.lines<=32?(c+=p.lines,d+=p.length+1,u[u.length-1]=new Re(y.text.concat(p.text),y.length+1+p.length)):(c+p.lines>o&&f(),c+=p.lines,d+=p.length+1,u.push(p))}function f(){c!=0&&(l.push(u.length==1?u[0]:ur.from(u,d)),d=-1,c=u.length=0)}for(let p of e)h(p);return f(),l.length==1?l[0]:new ur(l,t)}}we.empty=new Re([""],0);function lS(r){let e=-1;for(let t of r)e+=t.length+1;return e}function Ha(r,e,t=0,n=1e9){for(let o=0,s=0,a=!0;s<r.length&&o<=n;s++){let l=r[s],c=o+l.length;c>=t&&(c>n&&(l=l.slice(0,n-o)),o<t&&(l=l.slice(t-o)),a?(e[e.length-1]+=l,a=!1):e.push(l)),o=c+1}return e}function wp(r,e,t){return Ha(r,[""],e,t)}class ti{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Re?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,o=this.nodes[n],s=this.offsets[n],a=s>>1,l=o instanceof Re?o.text.length:o.children.length;if(a==(t>0?l:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
56
- `,this;e--}else if(o instanceof Re){let c=o.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=o.children[a+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof Re?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class N0{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new ti(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:o}=this.cursor.next(e);return this.pos+=(o.length+e)*t,this.value=o.length<=n?o:t<0?o.slice(o.length-n):o.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class A0{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:o}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(we.prototype[Symbol.iterator]=function(){return this.iter()},ti.prototype[Symbol.iterator]=N0.prototype[Symbol.iterator]=A0.prototype[Symbol.iterator]=function(){return this});class cS{constructor(e,t,n,o){this.from=e,this.to=t,this.number=n,this.text=o}get length(){return this.to-this.from}}function Uo(r,e,t){return e=Math.max(0,Math.min(r.length,e)),[e,Math.max(e,Math.min(r.length,t))]}let Io="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(r=>r?parseInt(r,36):1);for(let r=1;r<Io.length;r++)Io[r]+=Io[r-1];function dS(r){for(let e=1;e<Io.length;e+=2)if(Io[e]>r)return Io[e-1]<=r;return!1}function kp(r){return r>=127462&&r<=127487}const Sp=8205;function pr(r,e,t=!0,n=!0){return(t?O0:uS)(r,e,n)}function O0(r,e,t){if(e==r.length)return e;e&&T0(r.charCodeAt(e))&&B0(r.charCodeAt(e-1))&&e--;let n=Mo(r,e);for(e+=ul(n);e<r.length;){let o=Mo(r,e);if(n==Sp||o==Sp||t&&dS(o))e+=ul(o),n=o;else if(kp(o)){let s=0,a=e-2;for(;a>=0&&kp(Mo(r,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function uS(r,e,t){for(;e>0;){let n=O0(r,e-2,t);if(n<e)return n;e--}return 0}function T0(r){return r>=56320&&r<57344}function B0(r){return r>=55296&&r<56320}function Mo(r,e){let t=r.charCodeAt(e);if(!B0(t)||e+1==r.length)return t;let n=r.charCodeAt(e+1);return T0(n)?(t-55296<<10)+(n-56320)+65536:t}function hS(r){return r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode((r>>10)+55296,(r&1023)+56320))}function ul(r){return r<65536?1:2}const Pd=/\r\n?|\n/;exports.MapMode=function(r){return r[r.Simple=0]="Simple",r[r.TrackDel=1]="TrackDel",r[r.TrackBefore=2]="TrackBefore",r[r.TrackAfter=3]="TrackAfter",r}(exports.MapMode||(exports.MapMode={}));class Tr{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,o=0;t<this.sections.length;){let s=this.sections[t++],a=this.sections[t++];a<0?(e(n,o,s),o+=s):o+=a,n+=s}}iterChangedRanges(e,t=!1){Id(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],o=this.sections[t++];o<0?e.push(n,o):e.push(o,n)}return new Tr(e)}composeDesc(e){return this.empty?e:e.empty?this:P0(this,e)}mapDesc(e,t=!1){return e.empty?this:Md(this,e,t)}mapPos(e,t=-1,n=exports.MapMode.Simple){let o=0,s=0;for(let a=0;a<this.sections.length;){let l=this.sections[a++],c=this.sections[a++],d=o+l;if(c<0){if(d>e)return s+(e-o);s+=l}else{if(n!=exports.MapMode.Simple&&d>=e&&(n==exports.MapMode.TrackDel&&o<e&&d>e||n==exports.MapMode.TrackBefore&&o<e||n==exports.MapMode.TrackAfter&&d>e))return null;if(d>e||d==e&&t<0&&!l)return e==o||t<0?s:s+c;s+=c}o=d}if(e>o)throw new RangeError(`Position ${e} is out of range for changeset of length ${o}`);return s}touchesRange(e,t=e){for(let n=0,o=0;n<this.sections.length&&o<=t;){let s=this.sections[n++],a=this.sections[n++],l=o+s;if(a>=0&&o<=t&&l>=e)return o<e&&l>t?"cover":!0;o=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],o=this.sections[t++];e+=(e?" ":"")+n+(o>=0?":"+o:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Tr(e)}static create(e){return new Tr(e)}}class Ye extends Tr{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Id(this,(t,n,o,s,a)=>e=e.replace(o,o+(n-t),a),!1),e}mapDesc(e,t=!1){return Md(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let o=0,s=0;o<t.length;o+=2){let a=t[o],l=t[o+1];if(l>=0){t[o]=l,t[o+1]=a;let c=o>>1;for(;n.length<c;)n.push(we.empty);n.push(a?e.slice(s,s+a):we.empty)}s+=a}return new Ye(t,n)}compose(e){return this.empty?e:e.empty?this:P0(this,e,!0)}map(e,t=!1){return e.empty?this:Md(this,e,t,!0)}iterChanges(e,t=!1){Id(this,e,t)}get desc(){return Tr.create(this.sections)}filter(e){let t=[],n=[],o=[],s=new mi(this);e:for(let a=0,l=0;;){let c=a==e.length?1e9:e[a++];for(;l<c||l==c&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,c-l);st(o,u,-1);let h=s.ins==-1?-1:s.off==0?s.ins:0;st(t,u,h),h>0&&on(n,t,s.text),s.forward(u),l+=u}let d=e[a++];for(;l<d;){if(s.done)break e;let u=Math.min(s.len,d-l);st(t,u,-1),st(o,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),l+=u}}return{changes:new Ye(t,n),filtered:Tr.create(o)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],o=this.sections[t+1];o<0?e.push(n):o==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let o=[],s=[],a=0,l=null;function c(u=!1){if(!u&&!o.length)return;a<t&&st(o,t-a,-1);let h=new Ye(o,s);l=l?l.compose(h.map(l)):h,o=[],s=[],a=0}function d(u){if(Array.isArray(u))for(let h of u)d(h);else if(u instanceof Ye){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);c(),l=l?l.compose(u.map(l)):u}else{let{from:h,to:f=h,insert:p}=u;if(h>f||h<0||f>t)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${t})`);let y=p?typeof p=="string"?we.of(p.split(n||Pd)):p:we.empty,g=y.length;if(h==f&&g==0)return;h<a&&c(),h>a&&st(o,h-a,-1),st(o,f-h,g),on(s,o,y),a=f}}return d(e),c(!l),l}static empty(e){return new Ye(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let o=0;o<e.length;o++){let s=e[o];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((a,l)=>l&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;n.length<o;)n.push(we.empty);n[o]=we.of(s.slice(1)),t.push(s[0],n[o].length)}}}return new Ye(t,n)}static createSet(e,t){return new Ye(e,t)}}function st(r,e,t,n=!1){if(e==0&&t<=0)return;let o=r.length-2;o>=0&&t<=0&&t==r[o+1]?r[o]+=e:e==0&&r[o]==0?r[o+1]+=t:n?(r[o]+=e,r[o+1]+=t):r.push(e,t)}function on(r,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<r.length)r[r.length-1]=r[r.length-1].append(t);else{for(;r.length<n;)r.push(we.empty);r.push(t)}}function Id(r,e,t){let n=r.inserted;for(let o=0,s=0,a=0;a<r.sections.length;){let l=r.sections[a++],c=r.sections[a++];if(c<0)o+=l,s+=l;else{let d=o,u=s,h=we.empty;for(;d+=l,u+=c,c&&n&&(h=h.append(n[a-2>>1])),!(t||a==r.sections.length||r.sections[a+1]<0);)l=r.sections[a++],c=r.sections[a++];e(o,d,s,u,h),o=d,s=u}}}function Md(r,e,t,n=!1){let o=[],s=n?[]:null,a=new mi(r),l=new mi(e);for(let c=-1;;)if(a.ins==-1&&l.ins==-1){let d=Math.min(a.len,l.len);st(o,d,-1),a.forward(d),l.forward(d)}else if(l.ins>=0&&(a.ins<0||c==a.i||a.off==0&&(l.len<a.len||l.len==a.len&&!t))){let d=l.len;for(st(o,l.ins,-1);d;){let u=Math.min(a.len,d);a.ins>=0&&c<a.i&&a.len<=u&&(st(o,0,a.ins),s&&on(s,o,a.text),c=a.i),a.forward(u),d-=u}l.next()}else if(a.ins>=0){let d=0,u=a.len;for(;u;)if(l.ins==-1){let h=Math.min(u,l.len);d+=h,u-=h,l.forward(h)}else if(l.ins==0&&l.len<u)u-=l.len,l.next();else break;st(o,d,c<a.i?a.ins:0),s&&c<a.i&&on(s,o,a.text),c=a.i,a.forward(a.len-u)}else{if(a.done&&l.done)return s?Ye.createSet(o,s):Tr.create(o);throw new Error("Mismatched change set lengths")}}function P0(r,e,t=!1){let n=[],o=t?[]:null,s=new mi(r),a=new mi(e);for(let l=!1;;){if(s.done&&a.done)return o?Ye.createSet(n,o):Tr.create(n);if(s.ins==0)st(n,s.len,0,l),s.next();else if(a.len==0&&!a.done)st(n,0,a.ins,l),o&&on(o,n,a.text),a.next();else{if(s.done||a.done)throw new Error("Mismatched change set lengths");{let c=Math.min(s.len2,a.len),d=n.length;if(s.ins==-1){let u=a.ins==-1?-1:a.off?0:a.ins;st(n,c,u,l),o&&u&&on(o,n,a.text)}else a.ins==-1?(st(n,s.off?0:s.len,c,l),o&&on(o,n,s.textBit(c))):(st(n,s.off?0:s.len,a.off?0:a.ins,l),o&&!a.off&&on(o,n,a.text));l=(s.ins>c||a.ins>=0&&a.len>c)&&(l||n.length>d),s.forward2(c),a.forward(c)}}}}class mi{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?we.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?we.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Mn{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,o;return this.empty?n=o=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),o=e.mapPos(this.to,-1)),n==this.from&&o==this.to?this:new Mn(n,o,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Y.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Y.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Y.range(e.anchor,e.head)}static create(e,t,n){return new Mn(e,t,n)}}class Y{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Y.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Y([this.main],0)}addRange(e,t=!0){return Y.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,Y.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Y(e.ranges.map(t=>Mn.fromJSON(t)),e.main)}static single(e,t=e){return new Y([Y.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,o=0;o<e.length;o++){let s=e[o];if(s.empty?s.from<=n:s.from<n)return Y.normalized(e.slice(),t);n=s.to}return new Y(e,t)}static cursor(e,t=0,n,o){return Mn.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(o??16777215)<<6)}static range(e,t,n,o){let s=(n??16777215)<<6|(o==null?7:Math.min(6,o));return t<e?Mn.create(t,e,48|s):Mn.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let n=e[t];e.sort((o,s)=>o.from-s.from),t=e.indexOf(n);for(let o=1;o<e.length;o++){let s=e[o],a=e[o-1];if(s.empty?s.from<=a.to:s.from<a.to){let l=a.from,c=Math.max(s.to,a.to);o<=t&&t--,e.splice(--o,2,s.anchor>s.head?Y.range(c,l):Y.range(l,c))}}return new Y(e,t)}}function I0(r,e){for(let t of r.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let sh=0;class Z{constructor(e,t,n,o,s){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=o,this.id=sh++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Z(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:ih),!!e.static,e.enables)}of(e){return new Ua([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ua(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ua(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function ih(r,e){return r==e||r.length==e.length&&r.every((t,n)=>t===e[n])}class Ua{constructor(e,t,n,o){this.dependencies=e,this.facet=t,this.type=n,this.value=o,this.id=sh++}dynamicSlot(e){var t;let n=this.value,o=this.facet.compareInput,s=this.id,a=e[s]>>1,l=this.type==2,c=!1,d=!1,u=[];for(let h of this.dependencies)h=="doc"?c=!0:h=="selection"?d=!0:((t=e[h.id])!==null&&t!==void 0?t:1)&1||u.push(e[h.id]);return{create(h){return h.values[a]=n(h),1},update(h,f){if(c&&f.docChanged||d&&(f.docChanged||f.selection)||Dd(h,u)){let p=n(h);if(l?!xp(p,h.values[a],o):!o(p,h.values[a]))return h.values[a]=p,1}return 0},reconfigure:(h,f)=>{let p,y=f.config.address[s];if(y!=null){let g=fl(f,y);if(this.dependencies.every(m=>m instanceof Z?f.facet(m)===h.facet(m):m instanceof qr?f.field(m,!1)==h.field(m,!1):!0)||(l?xp(p=n(h),g,o):o(p=n(h),g)))return h.values[a]=g,0}else p=n(h);return h.values[a]=p,1}}}}function xp(r,e,t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!t(r[n],e[n]))return!1;return!0}function Dd(r,e){let t=!1;for(let n of e)ri(r,n)&1&&(t=!0);return t}function fS(r,e,t){let n=t.map(c=>r[c.id]),o=t.map(c=>c.type),s=n.filter(c=>!(c&1)),a=r[e.id]>>1;function l(c){let d=[];for(let u=0;u<n.length;u++){let h=fl(c,n[u]);if(o[u]==2)for(let f of h)d.push(f);else d.push(h)}return e.combine(d)}return{create(c){for(let d of n)ri(c,d);return c.values[a]=l(c),1},update(c,d){if(!Dd(c,s))return 0;let u=l(c);return e.compare(u,c.values[a])?0:(c.values[a]=u,1)},reconfigure(c,d){let u=Dd(c,n),h=d.config.facets[e.id],f=d.facet(e);if(h&&!u&&ih(t,h))return c.values[a]=f,0;let p=l(c);return e.compare(p,f)?(c.values[a]=f,0):(c.values[a]=p,1)}}}const Cp=Z.define({static:!0});class qr{constructor(e,t,n,o,s){this.id=e,this.createF=t,this.updateF=n,this.compareF=o,this.spec=s,this.provides=void 0}static define(e){let t=new qr(sh++,e.create,e.update,e.compare||((n,o)=>n===o),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Cp).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,o)=>{let s=n.values[t],a=this.updateF(s,o);return this.compareF(s,a)?0:(n.values[t]=a,1)},reconfigure:(n,o)=>o.config.address[this.id]!=null?(n.values[t]=o.field(this),0):(n.values[t]=this.create(n),1)}}init(e){return[this,Cp.of({field:this,create:e})]}get extension(){return this}}const An={lowest:4,low:3,default:2,high:1,highest:0};function Ps(r){return e=>new M0(e,r)}const Kl={highest:Ps(An.highest),high:Ps(An.high),default:Ps(An.default),low:Ps(An.low),lowest:Ps(An.lowest)};class M0{constructor(e,t){this.inner=e,this.prec=t}}class Wl{of(e){return new Vd(this,e)}reconfigure(e){return Wl.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Vd{constructor(e,t){this.compartment=e,this.inner=t}}class hl{constructor(e,t,n,o,s,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=o,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let o=[],s=Object.create(null),a=new Map;for(let f of pS(e,t,a))f instanceof qr?o.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let l=Object.create(null),c=[],d=[];for(let f of o)l[f.id]=d.length<<1,d.push(p=>f.slot(p));let u=n==null?void 0:n.config.facets;for(let f in s){let p=s[f],y=p[0].facet,g=u&&u[f]||[];if(p.every(m=>m.type==0))if(l[y.id]=c.length<<1|1,ih(g,p))c.push(n.facet(y));else{let m=y.combine(p.map(v=>v.value));c.push(n&&y.compare(m,n.facet(y))?n.facet(y):m)}else{for(let m of p)m.type==0?(l[m.id]=c.length<<1|1,c.push(m.value)):(l[m.id]=d.length<<1,d.push(v=>m.dynamicSlot(v)));l[y.id]=d.length<<1,d.push(m=>fS(m,y,p))}}let h=d.map(f=>f(l));return new hl(e,a,h,l,c,s)}}function pS(r,e,t){let n=[[],[],[],[],[]],o=new Map;function s(a,l){let c=o.get(a);if(c!=null){if(c<=l)return;let d=n[c].indexOf(a);d>-1&&n[c].splice(d,1),a instanceof Vd&&t.delete(a.compartment)}if(o.set(a,l),Array.isArray(a))for(let d of a)s(d,l);else if(a instanceof Vd){if(t.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let d=e.get(a.compartment)||a.inner;t.set(a.compartment,d),s(d,l)}else if(a instanceof M0)s(a.inner,a.prec);else if(a instanceof qr)n[l].push(a),a.provides&&s(a.provides,l);else if(a instanceof Ua)n[l].push(a),a.facet.extensions&&s(a.facet.extensions,An.default);else{let d=a.extension;if(!d)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(d,l)}}return s(r,An.default),n.reduce((a,l)=>a.concat(l))}function ri(r,e){if(e&1)return 2;let t=e>>1,n=r.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;r.status[t]=4;let o=r.computeSlot(r,r.config.dynamicSlots[t]);return r.status[t]=2|o}function fl(r,e){return e&1?r.config.staticValues[e>>1]:r.values[e>>1]}const D0=Z.define(),Rd=Z.define({combine:r=>r.some(e=>e),static:!0}),V0=Z.define({combine:r=>r.length?r[0]:void 0,static:!0}),R0=Z.define(),L0=Z.define(),j0=Z.define(),F0=Z.define({combine:r=>r.length?r[0]:!1});class so{constructor(e,t){this.type=e,this.value=t}static define(){return new mS}}class mS{of(e){return new so(this,e)}}class gS{constructor(e){this.map=e}of(e){return new We(this,e)}}class We{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new We(this.type,t)}is(e){return this.type==e}static define(e={}){return new gS(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let o of e){let s=o.map(t);s&&n.push(s)}return n}}We.reconfigure=We.define();We.appendConfig=We.define();class rt{constructor(e,t,n,o,s,a){this.startState=e,this.changes=t,this.selection=n,this.effects=o,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,n&&I0(n,t.newLength),s.some(l=>l.type==rt.time)||(this.annotations=s.concat(rt.time.of(Date.now())))}static create(e,t,n,o,s,a){return new rt(e,t,n,o,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(rt.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}rt.time=so.define();rt.userEvent=so.define();rt.addToHistory=so.define();rt.remote=so.define();function yS(r,e){let t=[];for(let n=0,o=0;;){let s,a;if(n<r.length&&(o==e.length||e[o]>=r[n]))s=r[n++],a=r[n++];else if(o<e.length)s=e[o++],a=e[o++];else return t;!t.length||t[t.length-1]<s?t.push(s,a):t[t.length-1]<a&&(t[t.length-1]=a)}}function q0(r,e,t){var n;let o,s,a;return t?(o=e.changes,s=Ye.empty(e.changes.length),a=r.changes.compose(e.changes)):(o=e.changes.map(r.changes),s=r.changes.mapDesc(e.changes,!0),a=r.changes.compose(o)),{changes:a,selection:e.selection?e.selection.map(s):(n=r.selection)===null||n===void 0?void 0:n.map(o),effects:We.mapEffects(r.effects,o).concat(We.mapEffects(e.effects,s)),annotations:r.annotations.length?r.annotations.concat(e.annotations):e.annotations,scrollIntoView:r.scrollIntoView||e.scrollIntoView}}function Ld(r,e,t){let n=e.selection,o=Do(e.annotations);return e.userEvent&&(o=o.concat(rt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Ye?e.changes:Ye.of(e.changes||[],t,r.facet(V0)),selection:n&&(n instanceof Y?n:Y.single(n.anchor,n.head)),effects:Do(e.effects),annotations:o,scrollIntoView:!!e.scrollIntoView}}function z0(r,e,t){let n=Ld(r,e.length?e[0]:{},r.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let a=!!e[s].sequential;n=q0(n,Ld(r,e[s],a?n.changes.newLength:r.doc.length),a)}let o=rt.create(r,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return bS(t?vS(o):o)}function vS(r){let e=r.startState,t=!0;for(let o of e.facet(R0)){let s=o(r);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:yS(t,s))}if(t!==!0){let o,s;if(t===!1)s=r.changes.invertedDesc,o=Ye.empty(e.doc.length);else{let a=r.changes.filter(t);o=a.changes,s=a.filtered.mapDesc(a.changes).invertedDesc}r=rt.create(e,o,r.selection&&r.selection.map(s),We.mapEffects(r.effects,s),r.annotations,r.scrollIntoView)}let n=e.facet(L0);for(let o=n.length-1;o>=0;o--){let s=n[o](r);s instanceof rt?r=s:Array.isArray(s)&&s.length==1&&s[0]instanceof rt?r=s[0]:r=z0(e,Do(s),!1)}return r}function bS(r){let e=r.startState,t=e.facet(j0),n=r;for(let o=t.length-1;o>=0;o--){let s=t[o](r);s&&Object.keys(s).length&&(n=q0(n,Ld(e,s,r.changes.newLength),!0))}return n==r?r:rt.create(e,r.changes,r.selection,n.effects,n.annotations,n.scrollIntoView)}const wS=[];function Do(r){return r==null?wS:Array.isArray(r)?r:[r]}exports.CharCategory=function(r){return r[r.Word=0]="Word",r[r.Space=1]="Space",r[r.Other=2]="Other",r}(exports.CharCategory||(exports.CharCategory={}));const kS=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let jd;try{jd=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function SS(r){if(jd)return jd.test(r);for(let e=0;e<r.length;e++){let t=r[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||kS.test(t)))return!0}return!1}function xS(r){return e=>{if(!/\S/.test(e))return exports.CharCategory.Space;if(SS(e))return exports.CharCategory.Word;for(let t=0;t<r.length;t++)if(e.indexOf(r[t])>-1)return exports.CharCategory.Word;return exports.CharCategory.Other}}class ve{constructor(e,t,n,o,s,a){this.config=e,this.doc=t,this.selection=n,this.values=o,this.status=e.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)ri(this,l<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return ri(this,n),fl(this,n)}update(...e){return z0(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:o}=t;for(let l of e.effects)l.is(Wl.reconfigure)?(t&&(o=new Map,t.compartments.forEach((c,d)=>o.set(d,c)),t=null),o.set(l.value.compartment,l.value.extension)):l.is(We.reconfigure)?(t=null,n=l.value):l.is(We.appendConfig)&&(t=null,n=Do(n).concat(l.value));let s;t?s=e.startState.values.slice():(t=hl.resolve(n,o,this),s=new ve(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,d)=>d.reconfigure(c,this),null).values);let a=e.startState.facet(Rd)?e.newSelection:e.newSelection.asSingle();new ve(t,e.newDoc,a,s,(l,c)=>c.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Y.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),o=this.changes(n.changes),s=[n.range],a=Do(n.effects);for(let l=1;l<t.ranges.length;l++){let c=e(t.ranges[l]),d=this.changes(c.changes),u=d.map(o);for(let f=0;f<l;f++)s[f]=s[f].map(u);let h=o.mapDesc(d,!0);s.push(c.range.map(h)),o=o.compose(u),a=We.mapEffects(a,u).concat(We.mapEffects(Do(c.effects),h))}return{changes:o,selection:Y.create(s,t.mainIndex),effects:a}}changes(e=[]){return e instanceof Ye?e:Ye.of(e,this.doc.length,this.facet(ve.lineSeparator))}toText(e){return we.of(e.split(this.facet(ve.lineSeparator)||Pd))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(ri(this,t),fl(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let o=e[n];o instanceof qr&&this.config.address[o.id]!=null&&(t[n]=o.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let o=[];if(n){for(let s in n)if(Object.prototype.hasOwnProperty.call(e,s)){let a=n[s],l=e[s];o.push(a.init(c=>a.spec.fromJSON(l,c)))}}return ve.create({doc:e.doc,selection:Y.fromJSON(e.selection),extensions:t.extensions?o.concat([t.extensions]):o})}static create(e={}){let t=hl.resolve(e.extensions||[],new Map),n=e.doc instanceof we?e.doc:we.of((e.doc||"").split(t.staticFacet(ve.lineSeparator)||Pd)),o=e.selection?e.selection instanceof Y?e.selection:Y.single(e.selection.anchor,e.selection.head):Y.single(0);return I0(o,n.length),t.staticFacet(Rd)||(o=o.asSingle()),new ve(t,n,o,t.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(ve.tabSize)}get lineBreak(){return this.facet(ve.lineSeparator)||`
57
- `}get readOnly(){return this.facet(F0)}phrase(e,...t){for(let n of this.facet(ve.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,o)=>{if(o=="$")return"$";let s=+(o||1);return!s||s>t.length?n:t[s-1]})),e}languageDataAt(e,t,n=-1){let o=[];for(let s of this.facet(D0))for(let a of s(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&o.push(a[e]);return o}charCategorizer(e){return xS(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:o}=this.doc.lineAt(e),s=this.charCategorizer(e),a=e-n,l=e-n;for(;a>0;){let c=pr(t,a,!1);if(s(t.slice(c,a))!=exports.CharCategory.Word)break;a=c}for(;l<o;){let c=pr(t,l);if(s(t.slice(l,c))!=exports.CharCategory.Word)break;l=c}return a==l?null:Y.range(a+n,l+n)}}ve.allowMultipleSelections=Rd;ve.tabSize=Z.define({combine:r=>r.length?r[0]:4});ve.lineSeparator=V0;ve.readOnly=F0;ve.phrases=Z.define({compare(r,e){let t=Object.keys(r),n=Object.keys(e);return t.length==n.length&&t.every(o=>r[o]==e[o])}});ve.languageData=D0;ve.changeFilter=R0;ve.transactionFilter=L0;ve.transactionExtender=j0;Wl.reconfigure=We.define();function Gl(r,e,t={}){let n={};for(let o of r)for(let s of Object.keys(o)){let a=o[s],l=n[s];if(l===void 0)n[s]=a;else if(!(l===a||a===void 0))if(Object.hasOwnProperty.call(t,s))n[s]=t[s](l,a);else throw new Error("Config merge conflict for field "+s)}for(let o in e)n[o]===void 0&&(n[o]=e[o]);return n}class Wn{eq(e){return this==e}range(e,t=e){return Fd.create(e,t,this)}}Wn.prototype.startSide=Wn.prototype.endSide=0;Wn.prototype.point=!1;Wn.prototype.mapMode=exports.MapMode.TrackDel;let Fd=class H0{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new H0(e,t,n)}};function qd(r,e){return r.from-e.from||r.value.startSide-e.value.startSide}class ah{constructor(e,t,n,o){this.from=e,this.to=t,this.value=n,this.maxPoint=o}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,o=0){let s=n?this.to:this.from;for(let a=o,l=s.length;;){if(a==l)return a;let c=a+l>>1,d=s[c]-e||(n?this.value[c].endSide:this.value[c].startSide)-t;if(c==a)return d>=0?a:l;d>=0?l=c:a=c+1}}between(e,t,n,o){for(let s=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,s);s<a;s++)if(o(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let n=[],o=[],s=[],a=-1,l=-1;for(let c=0;c<this.value.length;c++){let d=this.value[c],u=this.from[c]+e,h=this.to[c]+e,f,p;if(u==h){let y=t.mapPos(u,d.startSide,d.mapMode);if(y==null||(f=p=y,d.startSide!=d.endSide&&(p=t.mapPos(u,d.endSide),p<f)))continue}else if(f=t.mapPos(u,d.startSide),p=t.mapPos(h,d.endSide),f>p||f==p&&d.startSide>0&&d.endSide<=0)continue;(p-f||d.endSide-d.startSide)<0||(a<0&&(a=f),d.point&&(l=Math.max(l,p-f)),n.push(d),o.push(f-a),s.push(p-a))}return{mapped:n.length?new ah(o,s,n,l):null,pos:a}}}class be{constructor(e,t,n,o){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=o}static create(e,t,n,o){return new be(e,t,n,o)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:o=0,filterTo:s=this.length}=e,a=e.filter;if(t.length==0&&!a)return this;if(n&&(t=t.slice().sort(qd)),this.isEmpty)return t.length?be.of(t):this;let l=new U0(this,null,-1).goto(0),c=0,d=[],u=new Ko;for(;l.value||c<t.length;)if(c<t.length&&(l.from-t[c].from||l.startSide-t[c].value.startSide)>=0){let h=t[c++];u.addInner(h.from,h.to,h.value)||d.push(h)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(l.chunkIndex)<t[c].from)&&(!a||o>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&u.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!a||o>l.to||s<l.from||a(l.from,l.to,l.value))&&(u.addInner(l.from,l.to,l.value)||d.push(Fd.create(l.from,l.to,l.value))),l.next());return u.finishInner(this.nextLayer.isEmpty&&!d.length?be.empty:this.nextLayer.update({add:d,filter:a,filterFrom:o,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],o=-1;for(let a=0;a<this.chunk.length;a++){let l=this.chunkPos[a],c=this.chunk[a],d=e.touchesRange(l,l+c.length);if(d===!1)o=Math.max(o,c.maxPoint),t.push(c),n.push(e.mapPos(l));else if(d===!0){let{mapped:u,pos:h}=c.map(l,e);u&&(o=Math.max(o,u.maxPoint),t.push(u),n.push(h))}}let s=this.nextLayer.map(e);return t.length==0?s:new be(n,t,s||be.empty,o)}between(e,t,n){if(!this.isEmpty){for(let o=0;o<this.chunk.length;o++){let s=this.chunkPos[o],a=this.chunk[o];if(t>=s&&e<=s+a.length&&a.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return gi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return gi.from(e).goto(t)}static compare(e,t,n,o,s=-1){let a=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),l=t.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),c=Ep(a,l,n),d=new Is(a,c,s),u=new Is(l,c,s);n.iterGaps((h,f,p)=>$p(d,h,u,f,p,o)),n.empty&&n.length==0&&$p(d,0,u,0,0,o)}static eq(e,t,n=0,o){o==null&&(o=999999999);let s=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),a=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let l=Ep(s,a),c=new Is(s,l,0).goto(n),d=new Is(a,l,0).goto(n);for(;;){if(c.to!=d.to||!zd(c.active,d.active)||c.point&&(!d.point||!c.point.eq(d.point)))return!1;if(c.to>o)return!0;c.next(),d.next()}}static spans(e,t,n,o,s=-1){let a=new Is(e,null,s).goto(t),l=t,c=a.openStart;for(;;){let d=Math.min(a.to,n);if(a.point){let u=a.activeForPoint(a.to),h=a.pointFrom<t?u.length+1:a.point.startSide<0?u.length:Math.min(u.length,c);o.point(l,d,a.point,u,h,a.pointRank),c=Math.min(a.openEnd(d),u.length)}else d>l&&(o.span(l,d,a.active,c),c=a.openEnd(d));if(a.to>n)return c+(a.point&&a.to>n?1:0);l=a.to,a.next()}}static of(e,t=!1){let n=new Ko;for(let o of e instanceof Fd?[e]:t?CS(e):e)n.add(o.from,o.to,o.value);return n.finish()}static join(e){if(!e.length)return be.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let o=e[n];o!=be.empty;o=o.nextLayer)t=new be(o.chunkPos,o.chunk,t,Math.max(o.maxPoint,t.maxPoint));return t}}be.empty=new be([],[],null,-1);function CS(r){if(r.length>1)for(let e=r[0],t=1;t<r.length;t++){let n=r[t];if(qd(e,n)>0)return r.slice().sort(qd);e=n}return r}be.empty.nextLayer=be.empty;class Ko{finishChunk(e){this.chunks.push(new ah(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Ko)).add(e,t,n)}addInner(e,t,n){let o=e-this.lastTo||n.startSide-this.last.endSide;if(o<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return o<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(be.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=be.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Ep(r,e,t){let n=new Map;for(let s of r)for(let a=0;a<s.chunk.length;a++)s.chunk[a].maxPoint<=0&&n.set(s.chunk[a],s.chunkPos[a]);let o=new Set;for(let s of e)for(let a=0;a<s.chunk.length;a++){let l=n.get(s.chunk[a]);l!=null&&(t?t.mapPos(l):l)==s.chunkPos[a]&&!(t!=null&&t.touchesRange(l,l+s.chunk[a].length))&&o.add(s.chunk[a])}return o}class U0{constructor(e,t,n,o=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=o}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let o=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(o)||this.layer.chunkEnd(this.chunkIndex)<e||o.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let o=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<o)&&this.setRangeIndex(o)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class gi{constructor(e){this.heap=e}static from(e,t=null,n=-1){let o=[];for(let s=0;s<e.length;s++)for(let a=e[s];!a.isEmpty;a=a.nextLayer)a.maxPoint>=n&&o.push(new U0(a,t,n,s));return o.length==1?o[0]:new gi(o)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)Fc(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)Fc(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Fc(this.heap,0)}}}function Fc(r,e){for(let t=r[e];;){let n=(e<<1)+1;if(n>=r.length)break;let o=r[n];if(n+1<r.length&&o.compare(r[n+1])>=0&&(o=r[n+1],n++),t.compare(o)<0)break;r[n]=t,r[e]=o,e=n}}class Is{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=gi.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){da(this.active,e),da(this.activeTo,e),da(this.activeRank,e),this.minActive=_p(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:o,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||o-this.activeTo[t])>0;)t++;ua(this.active,t,n),ua(this.activeTo,t,o),ua(this.activeRank,t,s),e&&ua(e,t,this.cursor.from),this.minActive=_p(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let o=this.minActive;if(o>-1&&(this.activeTo[o]-this.cursor.from||this.active[o].endSide-this.cursor.startSide)<0){if(this.activeTo[o]>e){this.to=this.activeTo[o],this.endSide=this.active[o].endSide;break}this.removeActive(o),n&&da(n,o)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let o=n.length-1;o>=0&&n[o]<e;o--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function $p(r,e,t,n,o,s){r.goto(e),t.goto(n);let a=n+o,l=n,c=n-e;for(;;){let d=r.to+c-t.to||r.endSide-t.endSide,u=d<0?r.to+c:t.to,h=Math.min(u,a);if(r.point||t.point?r.point&&t.point&&(r.point==t.point||r.point.eq(t.point))&&zd(r.activeForPoint(r.to),t.activeForPoint(t.to))||s.comparePoint(l,h,r.point,t.point):h>l&&!zd(r.active,t.active)&&s.compareRange(l,h,r.active,t.active),u>a)break;l=u,d<=0&&r.next(),d>=0&&t.next()}}function zd(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!=e[t]&&!r[t].eq(e[t]))return!1;return!0}function da(r,e){for(let t=e,n=r.length-1;t<n;t++)r[t]=r[t+1];r.pop()}function ua(r,e,t){for(let n=r.length-1;n>=e;n--)r[n+1]=r[n];r[e]=t}function _p(r,e){let t=-1,n=1e9;for(let o=0;o<e.length;o++)(e[o]-n||r[o].endSide-r[t].endSide)<0&&(t=o,n=e[o]);return t}function lh(r,e,t=r.length){let n=0;for(let o=0;o<t;)r.charCodeAt(o)==9?(n+=e-n%e,o++):(n++,o=pr(r,o));return n}function ES(r,e,t,n){for(let o=0,s=0;;){if(s>=e)return o;if(o==r.length)break;s+=r.charCodeAt(o)==9?t-s%t:1,o=pr(r,o)}return n===!0?-1:r.length}const Hd="ͼ",Np=typeof Symbol>"u"?"__"+Hd:Symbol.for(Hd),Ud=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Ap=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class un{constructor(e,t){this.rules=[];let{finish:n}=t||{};function o(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,l,c,d){let u=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&h[1]=="keyframes";if(h&&l==null)return c.push(a[0]+";");for(let p in l){let y=l[p];if(/&/.test(p))s(p.split(/,\s*/).map(g=>a.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),y,c);else if(y&&typeof y=="object"){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(o(p),y,u,f)}else y!=null&&u.push(p.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+y+";")}(u.length||f)&&c.push((n&&!h&&!d?a.map(n):a).join(", ")+" {"+u.join(" ")+"}")}for(let a in e)s(o(a),e[a],this.rules)}getRules(){return this.rules.join(`
58
- `)}static newName(){let e=Ap[Np]||1;return Ap[Np]=e+1,Hd+e.toString(36)}static mount(e,t,n){let o=e[Ud],s=n&&n.nonce;o?s&&o.setNonce(s):o=new $S(e,s),o.mount(Array.isArray(t)?t:[t])}}let Op=new Map;class $S{constructor(e,t){this.root=e;let n=e.ownerDocument||e,o=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&o.CSSStyleSheet){let s=Op.get(n);if(s)return e[Ud]=s;this.sheet=new o.CSSStyleSheet,Op.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Ud]=this}mount(e){let t=this.sheet,n=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],l=this.modules.indexOf(a);if(l<o&&l>-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,a),t)for(let c=0;c<a.rules.length;c++)t.insertRule(a.rules[c],n++)}else{for(;o<l;)n+=this.modules[o++].rules.length;n+=a.rules.length,o++}}if(t)this.root.adoptedStyleSheets.indexOf(this.sheet)<0&&(this.root.adoptedStyleSheets=[this.sheet,...this.root.adoptedStyleSheets]);else{let s="";for(let l=0;l<this.modules.length;l++)s+=this.modules[l].getRules()+`
59
- `;this.styleTag.textContent=s;let a=this.root.head||this.root;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var hn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},yi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_S=typeof navigator<"u"&&/Mac/.test(navigator.platform),NS=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var et=0;et<10;et++)hn[48+et]=hn[96+et]=String(et);for(var et=1;et<=24;et++)hn[et+111]="F"+et;for(var et=65;et<=90;et++)hn[et]=String.fromCharCode(et+32),yi[et]=String.fromCharCode(et);for(var qc in hn)yi.hasOwnProperty(qc)||(yi[qc]=hn[qc]);function AS(r){var e=_S&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||NS&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?yi:hn)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function pl(r){let e;return r.nodeType==11?e=r.getSelection?r:r.ownerDocument:e=r,e.getSelection()}function Kd(r,e){return e?r==e||r.contains(e.nodeType!=1?e.parentNode:e):!1}function OS(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ka(r,e){if(!e.anchorNode)return!1;try{return Kd(r,e.anchorNode)}catch{return!1}}function vi(r){return r.nodeType==3?Gn(r,0,r.nodeValue.length).getClientRects():r.nodeType==1?r.getClientRects():[]}function ni(r,e,t,n){return t?Tp(r,e,t,n,-1)||Tp(r,e,t,n,1):!1}function bi(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e}function Tp(r,e,t,n,o){for(;;){if(r==t&&e==n)return!0;if(e==(o<0?0:Dr(r))){if(r.nodeName=="DIV")return!1;let s=r.parentNode;if(!s||s.nodeType!=1)return!1;e=bi(r)+(o<0?0:1),r=s}else if(r.nodeType==1){if(r=r.childNodes[e+(o<0?-1:0)],r.nodeType==1&&r.contentEditable=="false")return!1;e=o<0?Dr(r):0}else return!1}}function Dr(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function ch(r,e){let t=e?r.left:r.right;return{left:t,right:t,top:r.top,bottom:r.bottom}}function TS(r){return{left:0,right:r.innerWidth,top:0,bottom:r.innerHeight}}function K0(r,e){let t=e.width/r.offsetWidth,n=e.height/r.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-r.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-r.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function BS(r,e,t,n,o,s,a,l){let c=r.ownerDocument,d=c.defaultView||window;for(let u=r,h=!1;u&&!h;)if(u.nodeType==1){let f,p=u==c.body,y=1,g=1;if(p)f=TS(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:y,scaleY:g}=K0(u,b)),f={left:b.left,right:b.left+u.clientWidth*y,top:b.top,bottom:b.top+u.clientHeight*g}}let m=0,v=0;if(o=="nearest")e.top<f.top?(v=-(f.top-e.top+a),t>0&&e.bottom>f.bottom+v&&(v=e.bottom-f.bottom+v+a)):e.bottom>f.bottom&&(v=e.bottom-f.bottom+a,t<0&&e.top-v<f.top&&(v=-(f.top+v-e.top+a)));else{let b=e.bottom-e.top,w=f.bottom-f.top;v=(o=="center"&&b<=w?e.top+b/2-w/2:o=="start"||o=="center"&&t<0?e.top-a:e.bottom-w+a)-f.top}if(n=="nearest"?e.left<f.left?(m=-(f.left-e.left+s),t>0&&e.right>f.right+m&&(m=e.right-f.right+m+s)):e.right>f.right&&(m=e.right-f.right+s,t<0&&e.left<f.left+m&&(m=-(f.left+m-e.left+s))):m=(n=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:n=="start"==l?e.left-s:e.right-(f.right-f.left)+s)-f.left,m||v)if(p)d.scrollBy(m,v);else{let b=0,w=0;if(v){let S=u.scrollTop;u.scrollTop+=v/g,w=(u.scrollTop-S)*g}if(m){let S=u.scrollLeft;u.scrollLeft+=m/y,b=(u.scrollLeft-S)*y}e={left:e.left-b,top:e.top-w,right:e.right-b,bottom:e.bottom-w},b&&Math.abs(b-m)<1&&(n="nearest"),w&&Math.abs(w-v)<1&&(o="nearest")}if(p)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function PS(r){let e=r.ownerDocument;for(let t=r.parentNode;t&&t!=e.body;)if(t.nodeType==1){if(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class IS{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Dr(t):0),n,Math.min(e.focusOffset,n?Dr(n):0))}set(e,t,n,o){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=o}}let yo=null;function W0(r){if(r.setActive)return r.setActive();if(yo)return r.focus(yo);let e=[];for(let t=r;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(r.focus(yo==null?{get preventScroll(){return yo={preventScroll:!0},!0}}:void 0),!yo){yo=!1;for(let t=0;t<e.length;){let n=e[t++],o=e[t++],s=e[t++];n.scrollTop!=o&&(n.scrollTop=o),n.scrollLeft!=s&&(n.scrollLeft=s)}}}let Bp;function Gn(r,e,t=e){let n=Bp||(Bp=document.createRange());return n.setEnd(r,t),n.setStart(r,e),n}function Vo(r,e,t){let n={key:e,code:e,keyCode:t,which:t,cancelable:!0},o=new KeyboardEvent("keydown",n);o.synthetic=!0,r.dispatchEvent(o);let s=new KeyboardEvent("keyup",n);return s.synthetic=!0,r.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function MS(r){for(;r;){if(r&&(r.nodeType==9||r.nodeType==11&&r.host))return r;r=r.assignedSlot||r.parentNode}return null}function G0(r){for(;r.attributes.length;)r.removeAttributeNode(r.attributes[0])}function DS(r,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,Dr(t));;)if(n){if(t.nodeType!=1)return!1;let o=t.childNodes[n-1];o.contentEditable=="false"?n--:(t=o,n=Dr(t))}else{if(t==r)return!0;n=bi(t),t=t.parentNode}}function J0(r){return r.scrollTop>Math.max(1,r.scrollHeight-r.clientHeight-4)}class it{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new it(e.parentNode,bi(e),t)}static after(e,t){return new it(e.parentNode,bi(e)+1,t)}}const dh=[];class Te{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let n=this.dom,o=null,s;for(let a of this.children){if(a.flags&7){if(!a.dom&&(s=o?o.nextSibling:n.firstChild)){let l=Te.get(s);(!l||!l.parent&&l.canReuseDOM(a))&&a.reuseDOM(s)}a.sync(e,t),a.flags&=-8}if(s=o?o.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&s!=a.dom&&(t.written=!0),a.dom.parentNode==n)for(;s&&s!=a.dom;)s=Pp(s);else n.insertBefore(a.dom,s);o=a.dom}for(s=o?o.nextSibling:n.firstChild,s&&t&&t.node==n&&(t.written=!0);s;)s=Pp(s)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let o=Dr(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;o==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?o=-1:o=1),e=s}o<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Te.get(n);)n=n.nextSibling;if(!n)return this.length;for(let o=0,s=0;;o++){let a=this.children[o];if(a.dom==n)return s;s+=a.length+a.breakAfter}}domBoundsAround(e,t,n=0){let o=-1,s=-1,a=-1,l=-1;for(let c=0,d=n,u=n;c<this.children.length;c++){let h=this.children[c],f=d+h.length;if(d<e&&f>t)return h.domBoundsAround(e,t,d);if(f>=e&&o==-1&&(o=c,s=d),d>t&&h.dom.parentNode==this.dom){a=c,l=u;break}u=f,d=f+h.breakAfter}return{from:s,to:l<0?n+this.length:l,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=dh){this.markDirty();for(let o=e;o<t;o++){let s=this.children[o];s.parent==this&&n.indexOf(s)<0&&s.destroy()}this.children.splice(e,t-e,...n);for(let o=0;o<n.length;o++)n[o].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Y0(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,o,s,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Te.prototype.breakAfter=0;function Pp(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}class Y0{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function X0(r,e,t,n,o,s,a,l,c){let{children:d}=r,u=d.length?d[e]:null,h=s.length?s[s.length-1]:null,f=h?h.breakAfter:a;if(!(e==n&&u&&!a&&!f&&s.length<2&&u.merge(t,o,s.length?h:null,t==0,l,c))){if(n<d.length){let p=d[n];p&&(o<p.length||p.breakAfter&&(h!=null&&h.breakAfter))?(e==n&&(p=p.split(o),o=0),!f&&h&&p.merge(0,o,h,!0,0,c)?s[s.length-1]=p:((o||p.children.length&&!p.children[0].length)&&p.merge(0,o,null,!1,0,c),s.push(p))):p!=null&&p.breakAfter&&(h?h.breakAfter=1:a=1),n++}for(u&&(u.breakAfter=a,t>0&&(!a&&s.length&&u.merge(t,u.length,s[0],!1,l,0)?u.breakAfter=s.shift().breakAfter:(t<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(t,u.length,null,!1,l,0),e++));e<n&&s.length;)if(d[n-1].become(s[s.length-1]))n--,s.pop(),c=s.length?0:l;else if(d[e].become(s[0]))e++,s.shift(),l=s.length?0:c;else break;!s.length&&e&&n<d.length&&!d[e-1].breakAfter&&d[n].merge(0,0,d[e-1],!1,l,c)&&e--,(e<n||s.length)&&r.replaceChildren(e,n,s)}}function Q0(r,e,t,n,o,s){let a=r.childCursor(),{i:l,off:c}=a.findPos(t,1),{i:d,off:u}=a.findPos(e,-1),h=e-t;for(let f of n)h+=f.length;r.length+=h,X0(r,d,u,l,c,n,0,o,s)}let Ct=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Wd=typeof document<"u"?document:{documentElement:{style:{}}};const Gd=/Edge\/(\d+)/.exec(Ct.userAgent),Z0=/MSIE \d/.test(Ct.userAgent),Jd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ct.userAgent),Jl=!!(Z0||Jd||Gd),Ip=!Jl&&/gecko\/(\d+)/i.test(Ct.userAgent),zc=!Jl&&/Chrome\/(\d+)/.exec(Ct.userAgent),Mp="webkitFontSmoothing"in Wd.documentElement.style,ey=!Jl&&/Apple Computer/.test(Ct.vendor),Dp=ey&&(/Mobile\/\w+/.test(Ct.userAgent)||Ct.maxTouchPoints>2);var G={mac:Dp||/Mac/.test(Ct.platform),windows:/Win/.test(Ct.platform),linux:/Linux|X11/.test(Ct.platform),ie:Jl,ie_version:Z0?Wd.documentMode||6:Jd?+Jd[1]:Gd?+Gd[1]:0,gecko:Ip,gecko_version:Ip?+(/Firefox\/(\d+)/.exec(Ct.userAgent)||[0,0])[1]:0,chrome:!!zc,chrome_version:zc?+zc[1]:0,ios:Dp,android:/Android\b/.test(Ct.userAgent),webkit:Mp,safari:ey,webkit_version:Mp?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Wd.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const VS=256;class Vr extends Te{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return this.flags&8||n&&(!(n instanceof Vr)||this.length-(t-e)+n.length>VS||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Vr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new it(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return RS(this.dom,e,t)}}class Rr extends Te{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let o of t)o.setParent(this)}setAttrs(e){if(G0(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,o,s,a){return n&&(!(n instanceof Rr&&n.mark.eq(this.mark))||e&&s<=0||t<this.length&&a<=0)?!1:(Q0(this,e,t,n?n.children.slice():[],s-1,a-1),this.markDirty(),!0)}split(e){let t=[],n=0,o=-1,s=0;for(let l of this.children){let c=n+l.length;c>e&&t.push(n<e?l.split(e-n):l),o<0&&n>=e&&(o=s),n=c,s++}let a=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new Rr(this.mark,t,a)}domAtPos(e){return ty(this,e)}coordsAt(e,t){return ny(this,e,t)}}function RS(r,e,t){let n=r.nodeValue.length;e>n&&(e=n);let o=e,s=e,a=0;e==0&&t<0||e==n&&t>=0?G.chrome||G.gecko||(e?(o--,a=1):s<n&&(s++,a=-1)):t<0?o--:s<n&&s++;let l=Gn(r,o,s).getClientRects();if(!l.length)return null;let c=l[(a?a<0:t>=0)?0:l.length-1];return G.safari&&!a&&c.width==0&&(c=Array.prototype.find.call(l,d=>d.width)||c),a?ch(c,a<0):c||null}class Dn extends Te{static create(e,t,n){return new Dn(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Dn.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,o,s,a){return n&&(!(n instanceof Dn)||!this.widget.compare(n.widget)||e>0&&s<=0||t<this.length&&a<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Dn&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return we.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,o=this.posAtStart;return n?n.slice(o,o+this.length):we.empty}domAtPos(e){return(this.length?e==0:this.side>0)?it.before(this.dom):it.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let o=this.dom.getClientRects(),s=null;if(!o.length)return null;let a=this.side?this.side<0:e>0;for(let l=a?o.length-1:0;s=o[l],!(e>0?l==0:l==o.length-1||s.top<s.bottom);l+=a?-1:1);return ch(s,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Wo extends Te{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Wo&&e.side==this.side}split(){return new Wo(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?it.before(this.dom):it.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return we.empty}get isHidden(){return!0}}Vr.prototype.children=Dn.prototype.children=Wo.prototype.children=dh;function ty(r,e){let t=r.dom,{children:n}=r,o=0;for(let s=0;o<n.length;o++){let a=n[o],l=s+a.length;if(!(l==s&&a.getSide()<=0)){if(e>s&&e<l&&a.dom.parentNode==t)return a.domAtPos(e-s);if(e<=s)break;s=l}}for(let s=o;s>0;s--){let a=n[s-1];if(a.dom.parentNode==t)return a.domAtPos(a.length)}for(let s=o;s<n.length;s++){let a=n[s];if(a.dom.parentNode==t)return a.domAtPos(0)}return new it(t,0)}function ry(r,e,t){let n,{children:o}=r;t>0&&e instanceof Rr&&o.length&&(n=o[o.length-1])instanceof Rr&&n.mark.eq(e.mark)?ry(n,e.children[0],t-1):(o.push(e),e.setParent(r)),r.length+=e.length}function ny(r,e,t){let n=null,o=-1,s=null,a=-1;function l(d,u){for(let h=0,f=0;h<d.children.length&&f<=u;h++){let p=d.children[h],y=f+p.length;y>=u&&(p.children.length?l(p,u-f):(!s||s.isHidden&&t>0)&&(y>u||f==y&&p.getSide()>0)?(s=p,a=u-f):(f<u||f==y&&p.getSide()<0&&!p.isHidden)&&(n=p,o=u-f)),f=y}}l(r,e);let c=(t<0?n:s)||n||s;return c?c.coordsAt(Math.max(0,c==n?o:a),t):LS(r)}function LS(r){let e=r.dom.lastChild;if(!e)return r.dom.getBoundingClientRect();let t=vi(e);return t[t.length-1]||null}function Yd(r,e){for(let t in r)t=="class"&&e.class?e.class+=" "+r.class:t=="style"&&e.style?e.style+=";"+r.style:e[t]=r[t];return e}const Vp=Object.create(null);function uh(r,e,t){if(r==e)return!0;r||(r=Vp),e||(e=Vp);let n=Object.keys(r),o=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=o.length-(t&&o.indexOf(t)>-1?1:0))return!1;for(let s of n)if(s!=t&&(o.indexOf(s)==-1||r[s]!==e[s]))return!1;return!0}function Xd(r,e,t){let n=!1;if(e)for(let o in e)t&&o in t||(n=!0,o=="style"?r.style.cssText="":r.removeAttribute(o));if(t)for(let o in t)e&&e[o]==t[o]||(n=!0,o=="style"?r.style.cssText=t[o]:r.setAttribute(o,t[o]));return n}function jS(r){let e=Object.create(null);for(let t=0;t<r.attributes.length;t++){let n=r.attributes[t];e[n.name]=n.value}return e}class Ke extends Te{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,o,s,a){if(n){if(!(n instanceof Ke))return!1;this.dom||n.transferDOM(this)}return o&&this.setDeco(n?n.attrs:null),Q0(this,e,t,n?n.children.slice():[],s,a),!0}split(e){let t=new Ke;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:o}=this.childPos(e);o&&(t.append(this.children[n].split(o),0),this.children[n].merge(o,this.children[n].length,null,!1,0,0),n++);for(let s=n;s<this.children.length;s++)t.append(this.children[s],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){uh(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){ry(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=Yd(t,this.attrs||{})),n&&(this.attrs=Yd({class:n},this.attrs||{}))}domAtPos(e){return ty(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(G0(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Xd(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let o=this.dom.lastChild;for(;o&&Te.get(o)instanceof Rr;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((n=Te.get(o))===null||n===void 0?void 0:n.isEditable)==!1&&(!G.ios||!this.children.some(s=>s instanceof Vr))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Vr)||/[^ -~]/.test(n.text))return null;let o=vi(n.dom);if(o.length!=1)return null;e+=o[0].width,t=o[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=ny(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:o}=this.parent.view.viewState,s=n.bottom-n.top;if(Math.abs(s-o.lineHeight)<2&&o.textHeight<s){let a=(s-o.textHeight)/2;return{top:n.top+a,bottom:n.bottom-a,left:n.left,right:n.left}}}return n}become(e){return!1}covers(){return!0}static find(e,t){for(let n=0,o=0;n<e.children.length;n++){let s=e.children[n],a=o+s.length;if(a>=t){if(s instanceof Ke)return s;if(a>t)break}o=a+s.breakAfter}return null}}class ln extends Te{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,o,s,a){return n&&(!(n instanceof ln)||!this.widget.compare(n.widget)||e>0&&s<=0||t<this.length&&a<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?it.before(this.dom):it.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new ln(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return dh}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):we.empty}domBoundsAround(){return null}become(e){return e instanceof ln&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t==n?!1:e<0?t<0:n>0}}class os{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Xt=function(r){return r[r.Text=0]="Text",r[r.WidgetBefore=1]="WidgetBefore",r[r.WidgetAfter=2]="WidgetAfter",r[r.WidgetRange=3]="WidgetRange",r}(Xt||(Xt={}));class Be extends Wn{constructor(e,t,n,o){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=o}get heightRelevant(){return!1}static mark(e){return new Mi(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new fn(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,o;if(e.isBlockGap)n=-5e8,o=4e8;else{let{start:s,end:a}=oy(e,t);n=(s?t?-3e8:-1:5e8)-1,o=(a?t?2e8:1:-6e8)+1}return new fn(e,n,o,t,e.widget||null,!0)}static line(e){return new Di(e)}static set(e,t=!1){return be.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Be.none=be.empty;class Mi extends Be{constructor(e){let{start:t,end:n}=oy(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof Mi&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&uh(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Mi.prototype.point=!1;class Di extends Be{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Di&&this.spec.class==e.spec.class&&uh(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Di.prototype.mapMode=exports.MapMode.TrackBefore;Di.prototype.point=!0;class fn extends Be{constructor(e,t,n,o,s,a){super(t,n,s,e),this.block=o,this.isReplace=a,this.mapMode=o?t<=0?exports.MapMode.TrackBefore:exports.MapMode.TrackAfter:exports.MapMode.TrackDel}get type(){return this.startSide!=this.endSide?Xt.WidgetRange:this.startSide<=0?Xt.WidgetBefore:Xt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof fn&&FS(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}fn.prototype.point=!0;function oy(r,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=r;return t==null&&(t=r.inclusive),n==null&&(n=r.inclusive),{start:t??e,end:n??e}}function FS(r,e){return r==e||!!(r&&e&&r.compare(e))}function Qd(r,e,t,n=0){let o=t.length-1;o>=0&&t[o]+n>=r?t[o]=Math.max(t[o],e):t.push(r,e)}class oi{constructor(e,t,n,o){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=o,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ln&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ke),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ha(new Wo(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ln)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:a,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let o=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(ha(new Vr(this.text.slice(this.textOff,this.textOff+o)),t),n),this.atCursorPos=!0,this.textOff+=o,e-=o,n=0}}span(e,t,n,o){this.buildText(t-e,n,o),this.pos=t,this.openStart<0&&(this.openStart=o)}point(e,t,n,o,s,a){if(this.disallowBlockEffectsFor[a]&&n instanceof fn){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(n instanceof fn)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ln(n.widget||new Rp("div"),l,n));else{let c=Dn.create(n.widget||new Rp("span"),l,l?0:n.startSide),d=this.atCursorPos&&!c.isEditable&&s<=o.length&&(e<t||n.startSide>0),u=!c.isEditable&&(e<t||s>o.length||n.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!d&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(o),d&&(h.append(ha(new Wo(1),o),s),s=o.length+Math.max(0,s-o.length)),h.append(ha(c,o),s),this.atCursorPos=u,this.pendingBuffer=u?e<t||s>o.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=o.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,n,o,s){let a=new oi(e,t,n,s);return a.openEnd=be.spans(o,t,n,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function ha(r,e){for(let t of e)r=new Rr(t,[r],r.length);return r}class Rp extends os{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}exports.Direction=function(r){return r[r.LTR=0]="LTR",r[r.RTL=1]="RTL",r}(exports.Direction||(exports.Direction={}));const Jn=exports.Direction.LTR,hh=exports.Direction.RTL;function sy(r){let e=[];for(let t=0;t<r.length;t++)e.push(1<<+r[t]);return e}const qS=sy("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),zS=sy("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Zd=Object.create(null),ir=[];for(let r of["()","[]","{}"]){let e=r.charCodeAt(0),t=r.charCodeAt(1);Zd[e]=t,Zd[t]=-e}function iy(r){return r<=247?qS[r]:1424<=r&&r<=1524?2:1536<=r&&r<=1785?zS[r-1536]:1774<=r&&r<=2220?4:8192<=r&&r<=8204?256:64336<=r&&r<=65023?4:1}const HS=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class sn{get dir(){return this.level%2?hh:Jn}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,o){let s=-1;for(let a=0;a<e.length;a++){let l=e[a];if(l.from<=t&&l.to>=t){if(l.level==n)return a;(s<0||(o!=0?o<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function ay(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++){let n=r[t],o=e[t];if(n.from!=o.from||n.to!=o.to||n.direction!=o.direction||!ay(n.inner,o.inner))return!1}return!0}const xe=[];function US(r,e,t,n,o){for(let s=0;s<=n.length;s++){let a=s?n[s-1].to:e,l=s<n.length?n[s].from:t,c=s?256:o;for(let d=a,u=c,h=c;d<l;d++){let f=iy(r.charCodeAt(d));f==512?f=u:f==8&&h==4&&(f=16),xe[d]=f==4?2:f,f&7&&(h=f),u=f}for(let d=a,u=c,h=c;d<l;d++){let f=xe[d];if(f==128)d<l-1&&u==xe[d+1]&&u&24?f=xe[d]=u:xe[d]=256;else if(f==64){let p=d+1;for(;p<l&&xe[p]==64;)p++;let y=d&&u==8||p<t&&xe[p]==8?h==1?1:8:256;for(let g=d;g<p;g++)xe[g]=y;d=p-1}else f==8&&h==1&&(xe[d]=1);u=f,f&7&&(h=f)}}}function KS(r,e,t,n,o){let s=o==1?2:1;for(let a=0,l=0,c=0;a<=n.length;a++){let d=a?n[a-1].to:e,u=a<n.length?n[a].from:t;for(let h=d,f,p,y;h<u;h++)if(p=Zd[f=r.charCodeAt(h)])if(p<0){for(let g=l-3;g>=0;g-=3)if(ir[g+1]==-p){let m=ir[g+2],v=m&2?o:m&4?m&1?s:o:0;v&&(xe[h]=xe[ir[g]]=v),l=g;break}}else{if(ir.length==189)break;ir[l++]=h,ir[l++]=f,ir[l++]=c}else if((y=xe[h])==2||y==1){let g=y==o;c=g?0:1;for(let m=l-3;m>=0;m-=3){let v=ir[m+2];if(v&2)break;if(g)ir[m+2]|=2;else{if(v&4)break;ir[m+2]|=4}}}}}function WS(r,e,t,n){for(let o=0,s=n;o<=t.length;o++){let a=o?t[o-1].to:r,l=o<t.length?t[o].from:e;for(let c=a;c<l;){let d=xe[c];if(d==256){let u=c+1;for(;;)if(u==l){if(o==t.length)break;u=t[o++].to,l=o<t.length?t[o].from:e}else if(xe[u]==256)u++;else break;let h=s==1,f=(u<e?xe[u]:n)==1,p=h==f?h?1:2:n;for(let y=u,g=o,m=g?t[g-1].to:r;y>c;)y==m&&(y=t[--g].from,m=g?t[g-1].to:r),xe[--y]=p;c=u}else s=d,c++}}}function eu(r,e,t,n,o,s,a){let l=n%2?2:1;if(n%2==o%2)for(let c=e,d=0;c<t;){let u=!0,h=!1;if(d==s.length||c<s[d].from){let g=xe[c];g!=l&&(u=!1,h=g==16)}let f=!u&&l==1?[]:null,p=u?n:n+1,y=c;e:for(;;)if(d<s.length&&y==s[d].from){if(h)break e;let g=s[d];if(!u)for(let m=g.to,v=d+1;;){if(m==t)break e;if(v<s.length&&s[v].from==m)m=s[v++].to;else{if(xe[m]==l)break e;break}}if(d++,f)f.push(g);else{g.from>c&&a.push(new sn(c,g.from,p));let m=g.direction==Jn!=!(p%2);tu(r,m?n+1:n,o,g.inner,g.from,g.to,a),c=g.to}y=g.to}else{if(y==t||(u?xe[y]!=l:xe[y]==l))break;y++}f?eu(r,c,y,n+1,o,f,a):c<y&&a.push(new sn(c,y,p)),c=y}else for(let c=t,d=s.length;c>e;){let u=!0,h=!1;if(!d||c>s[d-1].to){let g=xe[c-1];g!=l&&(u=!1,h=g==16)}let f=!u&&l==1?[]:null,p=u?n:n+1,y=c;e:for(;;)if(d&&y==s[d-1].to){if(h)break e;let g=s[--d];if(!u)for(let m=g.from,v=d;;){if(m==e)break e;if(v&&s[v-1].to==m)m=s[--v].from;else{if(xe[m-1]==l)break e;break}}if(f)f.push(g);else{g.to<c&&a.push(new sn(g.to,c,p));let m=g.direction==Jn!=!(p%2);tu(r,m?n+1:n,o,g.inner,g.from,g.to,a),c=g.from}y=g.from}else{if(y==e||(u?xe[y-1]!=l:xe[y-1]==l))break;y--}f?eu(r,y,c,n+1,o,f,a):y<c&&a.push(new sn(y,c,p)),c=y}}function tu(r,e,t,n,o,s,a){let l=e%2?2:1;US(r,o,s,n,l),KS(r,o,s,n,l),WS(o,s,n,l),eu(r,o,s,e,t,n,a)}function GS(r,e,t){if(!r)return[new sn(0,0,e==hh?1:0)];if(e==Jn&&!t.length&&!HS.test(r))return ly(r.length);if(t.length)for(;r.length>xe.length;)xe[xe.length]=256;let n=[],o=e==Jn?0:1;return tu(r,o,o,t,0,r.length,n),n}function ly(r){return[new sn(0,r,0)]}let cy="";function JS(r,e,t,n,o){var s;let a=n.head-r.from,l=sn.find(e,a,(s=n.bidiLevel)!==null&&s!==void 0?s:-1,n.assoc),c=e[l],d=c.side(o,t);if(a==d){let f=l+=o?1:-1;if(f<0||f>=e.length)return null;c=e[l=f],a=c.side(!o,t),d=c.side(o,t)}let u=pr(r.text,a,c.forward(o,t));(u<c.from||u>c.to)&&(u=d),cy=r.text.slice(Math.min(a,u),Math.max(a,u));let h=l==(o?e.length-1:0)?null:e[l+(o?1:-1)];return h&&u==d&&h.level+(o?0:1)<c.level?Y.cursor(h.side(!o,t)+r.from,h.forward(o,t)?1:-1,h.level):Y.cursor(u+r.from,c.forward(o,t)?-1:1,c.level)}function YS(r,e,t){for(let n=e;n<t;n++){let o=iy(r.charCodeAt(n));if(o==1)return Jn;if(o==2||o==4)return hh}return Jn}const dy=Z.define(),uy=Z.define(),hy=Z.define(),fy=Z.define(),ru=Z.define(),py=Z.define(),my=Z.define(),gy=Z.define({combine:r=>r.some(e=>e)}),XS=Z.define({combine:r=>r.some(e=>e)});class Ro{constructor(e,t="nearest",n="nearest",o=5,s=5,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=o,this.xMargin=s,this.isSnapshot=a}map(e){return e.empty?this:new Ro(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ro(Y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const fa=We.define({map:(r,e)=>r.map(e)});function Br(r,e,t){let n=r.facet(fy);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Yl=Z.define({combine:r=>r.length?r[0]:!0});let QS=0;const Us=Z.define();class Rt{constructor(e,t,n,o,s){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=o,this.extension=s(this)}static define(e,t){const{eventHandlers:n,eventObservers:o,provide:s,decorations:a}=t||{};return new Rt(QS++,e,n,o,l=>{let c=[Us.of(l)];return a&&c.push(wi.of(d=>{let u=d.plugin(l);return u?a(u):Be.none})),s&&c.push(s(l)),c})}static fromClass(e,t){return Rt.define(n=>new e(n),t)}}class Hc{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Br(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Br(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Br(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const yy=Z.define(),fh=Z.define(),wi=Z.define(),vy=Z.define(),ph=Z.define(),by=Z.define();function Lp(r,e){let t=r.state.facet(by);if(!t.length)return t;let n=t.map(s=>s instanceof Function?s(r):s),o=[];return be.spans(n,e.from,e.to,{point(){},span(s,a,l,c){let d=s-e.from,u=a-e.from,h=o;for(let f=l.length-1;f>=0;f--,c--){let p=l[f].spec.bidiIsolate,y;if(p==null&&(p=YS(e.text,d,u)),c>0&&h.length&&(y=h[h.length-1]).to==d&&y.direction==p)y.to=u,h=y.inner;else{let g={from:d,to:u,direction:p,inner:[]};h.push(g),h=g.inner}}}}),o}const wy=Z.define();function ky(r){let e=0,t=0,n=0,o=0;for(let s of r.state.facet(wy)){let a=s(r);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(t=Math.max(t,a.right)),a.top!=null&&(n=Math.max(n,a.top)),a.bottom!=null&&(o=Math.max(o,a.bottom)))}return{left:e,right:t,top:n,bottom:o}}const Ks=Z.define();class Mt{constructor(e,t,n,o){this.fromA=e,this.toA=t,this.fromB=n,this.toB=o}join(e){return new Mt(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let o=e[t-1];if(!(o.fromA>n.toA)){if(o.toA<n.fromA)break;n=n.join(o),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let o=0,s=0,a=0,l=0;;o++){let c=o==e.length?null:e[o],d=a-l,u=c?c.fromB:1e9;for(;s<t.length&&t[s]<u;){let h=t[s],f=t[s+1],p=Math.max(l,h),y=Math.min(u,f);if(p<=y&&new Mt(p+d,y+d,p,y).addToSet(n),f>u)break;s+=2}if(!c)return n;new Mt(c.fromA,c.toA,c.fromB,c.toB).addToSet(n),a=c.toA,l=c.toB}}}class ml{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Ye.empty(this.startState.doc.length);for(let s of n)this.changes=this.changes.compose(s.changes);let o=[];this.changes.iterChangedRanges((s,a,l,c)=>o.push(new Mt(s,a,l,c))),this.changedRanges=o}static create(e,t,n){return new ml(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class jp extends Te{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Ke],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Mt(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:d,toA:u})=>u<this.minWidthFrom||d>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let o=-1;this.view.inputState.composing>=0&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?o=this.domChanged.newSel.head:!sx(e.changes,this.hasComposition)&&!e.selectionSet&&(o=e.state.selection.main.head));let s=o>-1?ex(this.view,e.changes,o):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:d,to:u}=this.hasComposition;n=new Mt(d,u,e.changes.mapPos(d,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(G.ie||G.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,l=this.updateDeco(),c=nx(a,l,e.changes);return n=Mt.extendWithRanges(n,c),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=G.chrome||G.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||o.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof ln&&a.widget instanceof Fp&&s.push(a.dom);o.updateGaps(s)}updateChildren(e,t,n){let o=n?n.range.addToSet(e.slice()):e,s=this.childCursor(t);for(let a=o.length-1;;a--){let l=a>=0?o[a]:null;if(!l)break;let{fromA:c,toA:d,fromB:u,toB:h}=l,f,p,y,g;if(n&&n.range.fromB<h&&n.range.toB>u){let S=oi.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),x=oi.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);p=S.breakAtStart,y=S.openStart,g=x.openEnd;let k=this.compositionView(n);x.breakAtStart?k.breakAfter=1:x.content.length&&k.merge(k.length,k.length,x.content[0],!1,x.openStart,0)&&(k.breakAfter=x.content[0].breakAfter,x.content.shift()),S.content.length&&k.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat(k).concat(x.content)}else({content:f,breakAtStart:p,openStart:y,openEnd:g}=oi.build(this.view.state.doc,u,h,this.decorations,this.dynamicDecorationMap));let{i:m,off:v}=s.findPos(d,1),{i:b,off:w}=s.findPos(c,-1);X0(this,b,w,m,v,f,p,y,g)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new Vr(e.text.nodeValue);t.flags|=8;for(let{deco:o}of e.marks)t=new Rr(o,[t],t.length);let n=new Ke;return n.append(t,0),n}fixCompositionDOM(e){let t=(s,a)=>{a.flags|=8|(a.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(a);let l=Te.get(s);l&&l!=a&&(l.dom=null),a.setDOM(s)},n=this.childPos(e.range.fromB,1),o=this.children[n.i];t(e.line,o);for(let s=e.marks.length-1;s>=-1;s--)n=o.childPos(n.off,1),o=o.children[n.i],t(s>=0?e.marks[s].node:e.text,o)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,o=n==this.dom,s=!o&&Ka(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(o||t||s))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(l.anchor)),d=l.empty?c:this.moveToLine(this.domAtPos(l.head));if(G.gecko&&l.empty&&!this.hasComposition&&ZS(c)){let h=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(h,c.node.childNodes[c.offset]||null)),c=d=new it(h,0),a=!0}let u=this.view.observer.selectionRange;(a||!u.focusNode||(!ni(c.node,c.offset,u.anchorNode,u.anchorOffset)||!ni(d.node,d.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,l))&&(this.view.observer.ignore(()=>{G.android&&G.chrome&&this.dom.contains(u.focusNode)&&ox(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=pl(this.view.root);if(h)if(l.empty){if(G.gecko){let f=tx(c.node,c.offset);if(f&&f!=3){let p=xy(c.node,c.offset,f==1?1:-1);p&&(c=new it(p.node,p.offset))}}h.collapse(c.node,c.offset),l.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=l.bidiLevel)}else if(h.extend){h.collapse(c.node,c.offset);try{h.extend(d.node,d.offset)}catch{}}else{let f=document.createRange();l.anchor>l.head&&([c,d]=[d,c]),f.setEnd(d.node,d.offset),f.setStart(c.node,c.offset),h.removeAllRanges(),h.addRange(f)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(c,d)),this.impreciseAnchor=c.precise?null:new it(u.anchorNode,u.anchorOffset),this.impreciseHead=d.precise?null:new it(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&ni(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=pl(e.root),{anchorNode:o,anchorOffset:s}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=Ke.find(this,t.head);if(!a)return;let l=a.posAtStart;if(t.head==l||t.head==l+a.length)return;let c=this.coordsAt(t.head,-1),d=this.coordsAt(t.head,1);if(!c||!d||c.bottom>d.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=t.from&&n.collapse(o,s)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let o=e.offset;!n&&o<t.childNodes.length;o++){let s=Te.get(t.childNodes[o]);s instanceof Ke&&(n=s.domAtPos(0))}for(let o=e.offset-1;!n&&o>=0;o--){let s=Te.get(t.childNodes[o]);s instanceof Ke&&(n=s.domAtPos(s.length))}return n?new it(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=Te.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let o=this.children[t];if(n<o.length||o instanceof Ke)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,o=0;for(let s=this.length,a=this.children.length-1;a>=0;a--){let l=this.children[a],c=s-l.breakAfter,d=c-l.length;if(c<e)break;d<=e&&(d<e||l.covers(-1))&&(c>e||l.covers(1))&&(!n||l instanceof Ke&&!(n instanceof Ke&&t>=0))&&(n=l,o=d),s=d}return n?n.coordsAt(e-o,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),o=this.children[t];if(!(o instanceof Ke))return null;for(;o.children.length;){let{i:l,off:c}=o.childPos(n,1);for(;;l++){if(l==o.children.length)return null;if((o=o.children[l]).length)break}n=c}if(!(o instanceof Vr))return null;let s=pr(o.text,n);if(s==n)return null;let a=Gn(o.dom,n,s).getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(l==a.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:o}=e,s=this.view.contentDOM.clientWidth,a=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==exports.Direction.LTR;for(let d=0,u=0;u<this.children.length;u++){let h=this.children[u],f=d+h.length;if(f>o)break;if(d>=n){let p=h.dom.getBoundingClientRect();if(t.push(p.height),a){let y=h.dom.lastChild,g=y?vi(y):[];if(g.length){let m=g[g.length-1],v=c?m.right-p.left:p.right-m.left;v>l&&(l=v,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=f)}}}d=f+h.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?exports.Direction.RTL:exports.Direction.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ke){let a=s.measureTextSize();if(a)return a}let e=document.createElement("div"),t,n,o;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=vi(e.firstChild)[0];t=e.getBoundingClientRect().height,n=s?s.width/27:7,o=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:o}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Y0(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,o=0;;o++){let s=o==t.viewports.length?null:t.viewports[o],a=s?s.from-1:this.length;if(a>n){let l=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Be.replace({widget:new Fp(l),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!s)break;n=s.to+1}return Be.set(e)}updateDeco(){let e=this.view.state.facet(wi).map((o,s)=>(this.dynamicDecorationMap[s]=typeof o=="function")?o(this.view):o),t=!1,n=this.view.state.facet(vy).map((o,s)=>{let a=typeof o=="function";return a&&(t=!0),a?o(this.view):o});n.length&&(this.dynamicDecorationMap[e.length]=t,e.push(be.join(n)));for(let o=e.length;o<e.length+3;o++)this.dynamicDecorationMap[o]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),o;if(!n)return;!t.empty&&(o=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,o.left),top:Math.min(n.top,o.top),right:Math.max(n.right,o.right),bottom:Math.max(n.bottom,o.bottom)});let s=ky(this.view),a={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;BS(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==exports.Direction.LTR)}}function ZS(r){return r.node.nodeType==1&&r.node.firstChild&&(r.offset==0||r.node.childNodes[r.offset-1].contentEditable=="false")&&(r.offset==r.node.childNodes.length||r.node.childNodes[r.offset].contentEditable=="false")}class Fp extends os{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Sy(r,e){let t=r.observer.selectionRange,n=t.focusNode&&xy(t.focusNode,t.focusOffset,0);if(!n)return null;let o=e-n.offset;return{from:o,to:o+n.node.nodeValue.length,node:n.node}}function ex(r,e,t){let n=Sy(r,t);if(!n)return null;let{node:o,from:s,to:a}=n,l=o.nodeValue;if(/[\n\r]/.test(l)||r.state.doc.sliceString(n.from,n.to)!=l)return null;let c=e.invertedDesc,d=new Mt(c.mapPos(s),c.mapPos(a),s,a),u=[];for(let h=o.parentNode;;h=h.parentNode){let f=Te.get(h);if(f instanceof Rr)u.push({node:h,deco:f.mark});else{if(f instanceof Ke||h.nodeName=="DIV"&&h.parentNode==r.contentDOM)return{range:d,text:o,marks:u,line:h};if(h!=r.contentDOM)u.push({node:h,deco:new Mi({inclusive:!0,attributes:jS(h),tagName:h.tagName.toLowerCase()})});else return null}}}function xy(r,e,t){if(t<=0)for(let n=r,o=e;;){if(n.nodeType==3)return{node:n,offset:o};if(n.nodeType==1&&o>0)n=n.childNodes[o-1],o=Dr(n);else break}if(t>=0)for(let n=r,o=e;;){if(n.nodeType==3)return{node:n,offset:o};if(n.nodeType==1&&o<n.childNodes.length&&t>=0)n=n.childNodes[o],o=0;else break}return null}function tx(r,e){return r.nodeType!=1?0:(e&&r.childNodes[e-1].contentEditable=="false"?1:0)|(e<r.childNodes.length&&r.childNodes[e].contentEditable=="false"?2:0)}let rx=class{constructor(){this.changes=[]}compareRange(e,t){Qd(e,t,this.changes)}comparePoint(e,t){Qd(e,t,this.changes)}};function nx(r,e,t){let n=new rx;return be.compare(r,e,t,n),n.changes}function ox(r,e){for(let t=r;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function sx(r,e){let t=!1;return e&&r.iterChangedRanges((n,o)=>{n<e.to&&o>e.from&&(t=!0)}),t}function ix(r,e,t=1){let n=r.charCategorizer(e),o=r.doc.lineAt(e),s=e-o.from;if(o.length==0)return Y.cursor(e);s==0?t=1:s==o.length&&(t=-1);let a=s,l=s;t<0?a=pr(o.text,s,!1):l=pr(o.text,s);let c=n(o.text.slice(a,l));for(;a>0;){let d=pr(o.text,a,!1);if(n(o.text.slice(d,a))!=c)break;a=d}for(;l<o.length;){let d=pr(o.text,l);if(n(o.text.slice(l,d))!=c)break;l=d}return Y.range(a+o.from,l+o.from)}function ax(r,e){return e.left>r?e.left-r:Math.max(0,r-e.right)}function lx(r,e){return e.top>r?e.top-r:Math.max(0,r-e.bottom)}function Uc(r,e){return r.top<e.bottom-1&&r.bottom>e.top+1}function qp(r,e){return e<r.top?{top:e,left:r.left,right:r.right,bottom:r.bottom}:r}function zp(r,e){return e>r.bottom?{top:r.top,left:r.left,right:r.right,bottom:e}:r}function nu(r,e,t){let n,o,s,a,l=!1,c,d,u,h;for(let y=r.firstChild;y;y=y.nextSibling){let g=vi(y);for(let m=0;m<g.length;m++){let v=g[m];o&&Uc(o,v)&&(v=qp(zp(v,o.bottom),o.top));let b=ax(e,v),w=lx(t,v);if(b==0&&w==0)return y.nodeType==3?Hp(y,e,t):nu(y,e,t);if(!n||a>w||a==w&&s>b){n=y,o=v,s=b,a=w;let S=w?t<v.top?-1:1:b?e<v.left?-1:1:0;l=!S||(S>0?m<g.length-1:m>0)}b==0?t>v.bottom&&(!u||u.bottom<v.bottom)?(c=y,u=v):t<v.top&&(!h||h.top>v.top)&&(d=y,h=v):u&&Uc(u,v)?u=zp(u,v.bottom):h&&Uc(h,v)&&(h=qp(h,v.top))}}if(u&&u.bottom>=t?(n=c,o=u):h&&h.top<=t&&(n=d,o=h),!n)return{node:r,offset:0};let f=Math.max(o.left,Math.min(o.right,e));if(n.nodeType==3)return Hp(n,f,t);if(l&&n.contentEditable!="false")return nu(n,f,t);let p=Array.prototype.indexOf.call(r.childNodes,n)+(e>=(o.left+o.right)/2?1:0);return{node:r,offset:p}}function Hp(r,e,t){let n=r.nodeValue.length,o=-1,s=1e9,a=0;for(let l=0;l<n;l++){let c=Gn(r,l,l+1).getClientRects();for(let d=0;d<c.length;d++){let u=c[d];if(u.top==u.bottom)continue;a||(a=e-u.left);let h=(u.top>t?u.top-t:t-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&h<s){let f=e>=(u.left+u.right)/2,p=f;if((G.chrome||G.gecko)&&Gn(r,l).getBoundingClientRect().left==u.right&&(p=!f),h<=0)return{node:r,offset:l+(p?1:0)};o=l+(p?1:0),s=h}}}return{node:r,offset:o>-1?o:a>0?r.nodeValue.length:0}}function Cy(r,e,t,n=-1){var o,s;let a=r.contentDOM.getBoundingClientRect(),l=a.top+r.viewState.paddingTop,c,{docHeight:d}=r.viewState,{x:u,y:h}=e,f=h-l;if(f<0)return 0;if(f>d)return r.state.doc.length;for(let S=r.viewState.heightOracle.textHeight/2,x=!1;c=r.elementAtHeight(f),c.type!=Xt.Text;)for(;f=n>0?c.bottom+S:c.top-S,!(f>=0&&f<=d);){if(x)return t?null:0;x=!0,n=-n}h=l+f;let p=c.from;if(p<r.viewport.from)return r.viewport.from==0?0:t?null:Up(r,a,c,u,h);if(p>r.viewport.to)return r.viewport.to==r.state.doc.length?r.state.doc.length:t?null:Up(r,a,c,u,h);let y=r.dom.ownerDocument,g=r.root.elementFromPoint?r.root:y,m=g.elementFromPoint(u,h);m&&!r.contentDOM.contains(m)&&(m=null),m||(u=Math.max(a.left+1,Math.min(a.right-1,u)),m=g.elementFromPoint(u,h),m&&!r.contentDOM.contains(m)&&(m=null));let v,b=-1;if(m&&((o=r.docView.nearest(m))===null||o===void 0?void 0:o.isEditable)!=!1){if(y.caretPositionFromPoint){let S=y.caretPositionFromPoint(u,h);S&&({offsetNode:v,offset:b}=S)}else if(y.caretRangeFromPoint){let S=y.caretRangeFromPoint(u,h);S&&({startContainer:v,startOffset:b}=S,(!r.contentDOM.contains(v)||G.safari&&cx(v,b,u)||G.chrome&&dx(v,b,u))&&(v=void 0))}}if(!v||!r.docView.dom.contains(v)){let S=Ke.find(r.docView,p);if(!S)return f>c.top+c.height/2?c.to:c.from;({node:v,offset:b}=nu(S.dom,u,h))}let w=r.docView.nearest(v);if(!w)return null;if(w.isWidget&&((s=w.dom)===null||s===void 0?void 0:s.nodeType)==1){let S=w.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?w.posAtStart:w.posAtEnd}else return w.localPosFromDOM(v,b)+w.posAtStart}function Up(r,e,t,n,o){let s=Math.round((n-e.left)*r.defaultCharacterWidth);if(r.lineWrapping&&t.height>r.defaultLineHeight*1.5){let l=r.viewState.heightOracle.textHeight,c=Math.floor((o-t.top-(r.defaultLineHeight-l)*.5)/l);s+=c*r.viewState.heightOracle.lineLength}let a=r.state.sliceDoc(t.from,t.to);return t.from+ES(a,s,r.state.tabSize)}function cx(r,e,t){let n;if(r.nodeType!=3||e!=(n=r.nodeValue.length))return!1;for(let o=r.nextSibling;o;o=o.nextSibling)if(o.nodeType!=1||o.nodeName!="BR")return!1;return Gn(r,n-1,n).getBoundingClientRect().left>t}function dx(r,e,t){if(e!=0)return!1;for(let o=r;;){let s=o.parentNode;if(!s||s.nodeType!=1||s.firstChild!=o)return!1;if(s.classList.contains("cm-line"))break;o=s}let n=r.nodeType==1?r.getBoundingClientRect():Gn(r,0,Math.max(r.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function ux(r,e){let t=r.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==Xt.Text))return n}return t}function hx(r,e,t,n){let o=ux(r,e.head),s=!n||o.type!=Xt.Text||!(r.lineWrapping||o.widgetLineBreaks)?null:r.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head);if(s){let a=r.dom.getBoundingClientRect(),l=r.textDirectionAt(o.from),c=r.posAtCoords({x:t==(l==exports.Direction.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(c!=null)return Y.cursor(c,t?-1:1)}return Y.cursor(t?o.to:o.from,t?-1:1)}function Kp(r,e,t,n){let o=r.state.doc.lineAt(e.head),s=r.bidiSpans(o),a=r.textDirectionAt(o.from);for(let l=e,c=null;;){let d=JS(o,s,a,l,t),u=cy;if(!d){if(o.number==(t?r.state.doc.lines:1))return l;u=`
60
- `,o=r.state.doc.line(o.number+(t?1:-1)),s=r.bidiSpans(o),d=r.visualLineSide(o,!t)}if(c){if(!c(u))return l}else{if(!n)return d;c=n(u)}l=d}}function fx(r,e,t){let n=r.state.charCategorizer(e),o=n(t);return s=>{let a=n(s);return o==exports.CharCategory.Space&&(o=a),o==a}}function px(r,e,t,n){let o=e.head,s=t?1:-1;if(o==(t?r.state.doc.length:0))return Y.cursor(o,e.assoc);let a=e.goalColumn,l,c=r.contentDOM.getBoundingClientRect(),d=r.coordsAtPos(o,e.assoc||-1),u=r.documentTop;if(d)a==null&&(a=d.left-c.left),l=s<0?d.top:d.bottom;else{let p=r.viewState.lineBlockAt(o);a==null&&(a=Math.min(c.right-c.left,r.defaultCharacterWidth*(o-p.from))),l=(s<0?p.top:p.bottom)+u}let h=c.left+a,f=n??r.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let y=l+(f+p)*s,g=Cy(r,{x:h,y},!1,s);if(y<c.top||y>c.bottom||(s<0?g<o:g>o)){let m=r.docView.coordsForChar(g),v=!m||y<m.top?-1:1;return Y.cursor(g,v,void 0,a)}}}function Wa(r,e,t){for(;;){let n=0;for(let o of r)o.between(e-1,e+1,(s,a,l)=>{if(e>s&&e<a){let c=n||t||(e-s<a-e?-1:1);e=c<0?s:a,n=c}});if(!n)return e}}function Kc(r,e,t){let n=Wa(r.state.facet(ph).map(o=>o(r)),t.from,e.head>t.from?-1:1);return n==t.from?t:Y.cursor(n,n<t.from?1:-1)}class mx{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,G.safari&&e.contentDOM.addEventListener("input",()=>null),G.gecko&&Tx(e.contentDOM.ownerDocument)}handleEvent(e){!xx(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let o of n.observers)o(this.view,t);for(let o of n.handlers){if(t.defaultPrevented)break;if(o(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=gx(e),n=this.handlers,o=this.view.contentDOM;for(let s in t)if(s!="scroll"){let a=!t[s].handlers.length,l=n[s];l&&a!=!l.handlers.length&&(o.removeEventListener(s,this.handleEvent),l=null),l||o.addEventListener(s,this.handleEvent,{passive:a})}for(let s in n)s!="scroll"&&!t[s]&&o.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&$y.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),G.android&&G.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return G.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Ey.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||yx.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Vo(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:G.safari&&!G.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Wp(r,e){return(t,n)=>{try{return e.call(r,n,t)}catch(o){Br(t.state,o)}}}function gx(r){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of r){let o=n.spec;if(o&&o.domEventHandlers)for(let s in o.domEventHandlers){let a=o.domEventHandlers[s];a&&t(s).handlers.push(Wp(n.value,a))}if(o&&o.domEventObservers)for(let s in o.domEventObservers){let a=o.domEventObservers[s];a&&t(s).observers.push(Wp(n.value,a))}}for(let n in Qt)t(n).handlers.push(Qt[n]);for(let n in Zt)t(n).observers.push(Zt[n]);return e}const Ey=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],yx="dthko",$y=[16,17,18,20,91,92,224,225],pa=6;function ma(r){return Math.max(0,r)*.7+8}function vx(r,e){return Math.max(Math.abs(r.clientX-e.clientX),Math.abs(r.clientY-e.clientY))}class bx{constructor(e,t,n,o){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=PS(e.contentDOM),this.atoms=e.state.facet(ph).map(a=>a(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ve.allowMultipleSelections)&&wx(e,t),this.dragging=Sx(e,t)&&Oy(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&vx(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,o=0,s=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=ky(this.view);e.clientX-a.left<=s.left+pa?n=-ma(s.left-e.clientX):e.clientX+a.right>=s.right-pa&&(n=ma(e.clientX-s.right)),e.clientY-a.top<=s.top+pa?o=-ma(s.top-e.clientY):e.clientY+a.bottom>=s.bottom-pa&&(o=ma(e.clientY-s.bottom)),this.setScrollSpeed(n,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let o=e.ranges[n],s=null;if(o.empty){let a=Wa(this.atoms,o.from,0);a!=o.from&&(s=Y.cursor(a,-1))}else{let a=Wa(this.atoms,o.from,-1),l=Wa(this.atoms,o.to,1);(a!=o.from||l!=o.to)&&(s=Y.range(o.from==o.anchor?a:l,o.from==o.head?a:l))}s&&(t||(t=e.ranges.slice()),t[n]=s)}return t?Y.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function wx(r,e){let t=r.state.facet(dy);return t.length?t[0](e):G.mac?e.metaKey:e.ctrlKey}function kx(r,e){let t=r.state.facet(uy);return t.length?t[0](e):G.mac?!e.altKey:!e.ctrlKey}function Sx(r,e){let{main:t}=r.state.selection;if(t.empty)return!1;let n=pl(r.root);if(!n||n.rangeCount==0)return!0;let o=n.getRangeAt(0).getClientRects();for(let s=0;s<o.length;s++){let a=o[s];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function xx(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=r.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Te.get(t))&&n.ignoreEvent(e))return!1;return!0}const Qt=Object.create(null),Zt=Object.create(null),_y=G.ie&&G.ie_version<15||G.ios&&G.webkit_version<604;function Cx(r){let e=r.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{r.focus(),t.remove(),Ny(r,t.value)},50)}function Ny(r,e){let{state:t}=r,n,o=1,s=t.toText(e),a=s.lines==t.selection.ranges.length;if(ou!=null&&t.selection.ranges.every(c=>c.empty)&&ou==s.toString()){let c=-1;n=t.changeByRange(d=>{let u=t.doc.lineAt(d.from);if(u.from==c)return{range:d};c=u.from;let h=t.toText((a?s.line(o++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:h},range:Y.cursor(d.from+h.length)}})}else a?n=t.changeByRange(c=>{let d=s.line(o++);return{changes:{from:c.from,to:c.to,insert:d.text},range:Y.cursor(c.from+d.length)}}):n=t.replaceSelection(s);r.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Zt.scroll=r=>{r.inputState.lastScrollTop=r.scrollDOM.scrollTop,r.inputState.lastScrollLeft=r.scrollDOM.scrollLeft};Qt.keydown=(r,e)=>(r.inputState.setSelectionOrigin("select"),e.keyCode==27&&(r.inputState.lastEscPress=Date.now()),!1);Zt.touchstart=(r,e)=>{r.inputState.lastTouchTime=Date.now(),r.inputState.setSelectionOrigin("select.pointer")};Zt.touchmove=r=>{r.inputState.setSelectionOrigin("select.pointer")};Qt.mousedown=(r,e)=>{if(r.observer.flush(),r.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of r.state.facet(hy))if(t=n(r,e),t)break;if(!t&&e.button==0&&(t=_x(r,e)),t){let n=!r.hasFocus;r.inputState.startMouseSelection(new bx(r,e,t,n)),n&&r.observer.ignore(()=>W0(r.contentDOM));let o=r.inputState.mouseSelection;if(o)return o.start(e),o.dragging===!1}return!1};function Gp(r,e,t,n){if(n==1)return Y.cursor(e,t);if(n==2)return ix(r.state,e,t);{let o=Ke.find(r.docView,e),s=r.state.doc.lineAt(o?o.posAtEnd:e),a=o?o.posAtStart:s.from,l=o?o.posAtEnd:s.to;return l<r.state.doc.length&&l==s.to&&l++,Y.range(a,l)}}let Ay=(r,e)=>r>=e.top&&r<=e.bottom,Jp=(r,e,t)=>Ay(e,t)&&r>=t.left&&r<=t.right;function Ex(r,e,t,n){let o=Ke.find(r.docView,e);if(!o)return 1;let s=e-o.posAtStart;if(s==0)return 1;if(s==o.length)return-1;let a=o.coordsAt(s,-1);if(a&&Jp(t,n,a))return-1;let l=o.coordsAt(s,1);return l&&Jp(t,n,l)?1:a&&Ay(n,a)?-1:1}function Yp(r,e){let t=r.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:Ex(r,t,e.clientX,e.clientY)}}const $x=G.ie&&G.ie_version<=11;let Xp=null,Qp=0,Zp=0;function Oy(r){if(!$x)return r.detail;let e=Xp,t=Zp;return Xp=r,Zp=Date.now(),Qp=!e||t>Date.now()-400&&Math.abs(e.clientX-r.clientX)<2&&Math.abs(e.clientY-r.clientY)<2?(Qp+1)%3:1}function _x(r,e){let t=Yp(r,e),n=Oy(e),o=r.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),o=o.map(s.changes))},get(s,a,l){let c=Yp(r,s),d,u=Gp(r,c.pos,c.bias,n);if(t.pos!=c.pos&&!a){let h=Gp(r,t.pos,t.bias,n),f=Math.min(h.from,u.from),p=Math.max(h.to,u.to);u=f<u.from?Y.range(f,p):Y.range(p,f)}return a?o.replaceRange(o.main.extend(u.from,u.to)):l&&n==1&&o.ranges.length>1&&(d=Nx(o,c.pos))?d:l?o.addRange(u):Y.create([u])}}}function Nx(r,e){for(let t=0;t<r.ranges.length;t++){let{from:n,to:o}=r.ranges[t];if(n<=e&&o>=e)return Y.create(r.ranges.slice(0,t).concat(r.ranges.slice(t+1)),r.mainIndex==t?0:r.mainIndex-(r.mainIndex>t?1:0))}return null}Qt.dragstart=(r,e)=>{let{selection:{main:t}}=r.state;if(e.target.draggable){let o=r.docView.nearest(e.target);if(o&&o.isWidget){let s=o.posAtStart,a=s+o.length;(s>=t.to||a<=t.from)&&(t=Y.range(s,a))}}let{inputState:n}=r;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",r.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Qt.dragend=r=>(r.inputState.draggedContent=null,!1);function em(r,e,t,n){if(!t)return;let o=r.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=r.inputState,a=n&&s&&kx(r,e)?{from:s.from,to:s.to}:null,l={from:o,insert:t},c=r.state.changes(a?[a,l]:l);r.focus(),r.dispatch({changes:c,selection:{anchor:c.mapPos(o,-1),head:c.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),r.inputState.draggedContent=null}Qt.drop=(r,e)=>{if(!e.dataTransfer)return!1;if(r.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),o=0,s=()=>{++o==t.length&&em(r,e,n.filter(a=>a!=null).join(r.state.lineBreak),!1)};for(let a=0;a<t.length;a++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(n[a]=l.result),s()},l.readAsText(t[a])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return em(r,e,n,!0),!0}return!1};Qt.paste=(r,e)=>{if(r.state.readOnly)return!0;r.observer.flush();let t=_y?null:e.clipboardData;return t?(Ny(r,t.getData("text/plain")||t.getData("text/uri-text")),!0):(Cx(r),!1)};function Ax(r,e){let t=r.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),r.focus()},50)}function Ox(r){let e=[],t=[],n=!1;for(let o of r.selection.ranges)o.empty||(e.push(r.sliceDoc(o.from,o.to)),t.push(o));if(!e.length){let o=-1;for(let{from:s}of r.selection.ranges){let a=r.doc.lineAt(s);a.number>o&&(e.push(a.text),t.push({from:a.from,to:Math.min(r.doc.length,a.to+1)})),o=a.number}n=!0}return{text:e.join(r.lineBreak),ranges:t,linewise:n}}let ou=null;Qt.copy=Qt.cut=(r,e)=>{let{text:t,ranges:n,linewise:o}=Ox(r.state);if(!t&&!o)return!1;ou=o?t:null,e.type=="cut"&&!r.state.readOnly&&r.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let s=_y?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(Ax(r,t),!1)};const Ty=so.define();function By(r,e){let t=[];for(let n of r.facet(my)){let o=n(r,e);o&&t.push(o)}return t?r.update({effects:t,annotations:Ty.of(!0)}):null}function Py(r){setTimeout(()=>{let e=r.hasFocus;if(e!=r.inputState.notifiedFocused){let t=By(r.state,e);t?r.dispatch(t):r.update([])}},10)}Zt.focus=r=>{r.inputState.lastFocusTime=Date.now(),!r.scrollDOM.scrollTop&&(r.inputState.lastScrollTop||r.inputState.lastScrollLeft)&&(r.scrollDOM.scrollTop=r.inputState.lastScrollTop,r.scrollDOM.scrollLeft=r.inputState.lastScrollLeft),Py(r)};Zt.blur=r=>{r.observer.clearSelectionRange(),Py(r)};Zt.compositionstart=Zt.compositionupdate=r=>{r.inputState.compositionFirstChange==null&&(r.inputState.compositionFirstChange=!0),r.inputState.composing<0&&(r.inputState.composing=0)};Zt.compositionend=r=>{r.inputState.composing=-1,r.inputState.compositionEndedAt=Date.now(),r.inputState.compositionPendingKey=!0,r.inputState.compositionPendingChange=r.observer.pendingRecords().length>0,r.inputState.compositionFirstChange=null,G.chrome&&G.android?r.observer.flushSoon():r.inputState.compositionPendingChange?Promise.resolve().then(()=>r.observer.flush()):setTimeout(()=>{r.inputState.composing<0&&r.docView.hasComposition&&r.update([])},50)};Zt.contextmenu=r=>{r.inputState.lastContextMenu=Date.now()};Qt.beforeinput=(r,e)=>{var t;let n;if(G.chrome&&G.android&&(n=Ey.find(o=>o.inputType==e.inputType))&&(r.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let o=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>o+10&&r.hasFocus&&(r.contentDOM.blur(),r.focus())},100)}return!1};const tm=new Set;function Tx(r){tm.has(r)||(tm.add(r),r.addEventListener("copy",()=>{}),r.addEventListener("cut",()=>{}))}const rm=["pre-wrap","normal","pre-line","break-spaces"];class Bx{constructor(e){this.lineWrapping=e,this.doc=we.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return rm.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let o=e[n];o<0?n++:this.heightSamples[Math.floor(o*10)]||(t=!0,this.heightSamples[Math.floor(o*10)]=!0)}return t}refresh(e,t,n,o,s,a){let l=rm.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=n,this.textHeight=o,this.lineLength=s,c){this.heightSamples={};for(let d=0;d<a.length;d++){let u=a[d];u<0?d++:this.heightSamples[Math.floor(u*10)]=!0}}return c}}class Px{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class hr{constructor(e,t,n,o,s){this.from=e,this.length=t,this.top=n,this.height=o,this._content=s}get type(){return typeof this._content=="number"?Xt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof fn?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new hr(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ae=function(r){return r[r.ByPos=0]="ByPos",r[r.ByHeight=1]="ByHeight",r[r.ByPosNoHeight=2]="ByPosNoHeight",r}(Ae||(Ae={}));const Ga=.001;class pt{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Ga&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return pt.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,o){let s=this,a=n.doc;for(let l=o.length-1;l>=0;l--){let{fromA:c,toA:d,fromB:u,toB:h}=o[l],f=s.lineAt(c,Ae.ByPosNoHeight,n.setDoc(t),0,0),p=f.to>=d?f:s.lineAt(d,Ae.ByPosNoHeight,n,0,0);for(h+=p.to-d,d=p.to;l>0&&f.from<=o[l-1].toA;)c=o[l-1].fromA,u=o[l-1].fromB,l--,c<f.from&&(f=s.lineAt(c,Ae.ByPosNoHeight,n,0,0));u+=f.from-c,c=f.from;let y=mh.build(n.setDoc(a),e,u,h);s=s.replace(c,d,y)}return s.updateHeight(n,0)}static empty(){return new St(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,o=0,s=0;for(;;)if(t==n)if(o>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),n+=1+l.break,o-=l.size}else if(s>o*2){let l=e[n];l.break?e.splice(n,1,l.left,null,l.right):e.splice(n,1,l.left,l.right),n+=2+l.break,s-=l.size}else break;else if(o<s){let l=e[t++];l&&(o+=l.size)}else{let l=e[--n];l&&(s+=l.size)}let a=0;return e[t-1]==null?(a=1,t--):e[t]==null&&(a=1,n++),new Ix(pt.of(e.slice(0,t)),a,pt.of(e.slice(n)))}}pt.prototype.size=1;class Iy extends pt{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,o){return new hr(o,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,o,s){return this.blockAt(0,n,o,s)}forEachLine(e,t,n,o,s,a){e<=s+this.length&&t>=s&&a(this.blockAt(0,n,o,s))}updateHeight(e,t=0,n=!1,o){return o&&o.from<=t&&o.more&&this.setHeight(e,o.heights[o.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class St extends Iy{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,o){return new hr(o,this.length,n,this.height,this.breaks)}replace(e,t,n){let o=n[0];return n.length==1&&(o instanceof St||o instanceof Ze&&o.flags&4)&&Math.abs(this.length-o.length)<10?(o instanceof Ze?o=new St(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):pt.of(n)}updateHeight(e,t=0,n=!1,o){return o&&o.from<=t&&o.more?this.setHeight(e,o.heights[o.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ze extends pt{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,s=o-n+1,a,l=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*s);a=c/s,this.length>s+1&&(l=(this.height-c)/(this.length-s-1))}else a=this.height/s;return{firstLine:n,lastLine:o,perLine:a,perChar:l}}blockAt(e,t,n,o){let{firstLine:s,lastLine:a,perLine:l,perChar:c}=this.heightMetrics(t,o);if(t.lineWrapping){let d=o+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),u=t.doc.lineAt(d),h=l+u.length*c,f=Math.max(n,e-h/2);return new hr(u.from,u.length,f,h,0)}else{let d=Math.max(0,Math.min(a-s,Math.floor((e-n)/l))),{from:u,length:h}=t.doc.line(s+d);return new hr(u,h,n+l*d,l,0)}}lineAt(e,t,n,o,s){if(t==Ae.ByHeight)return this.blockAt(e,n,o,s);if(t==Ae.ByPosNoHeight){let{from:p,to:y}=n.doc.lineAt(e);return new hr(p,y-p,0,0,0)}let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(n,s),d=n.doc.lineAt(e),u=l+d.length*c,h=d.number-a,f=o+l*h+c*(d.from-s-h);return new hr(d.from,d.length,Math.max(o,Math.min(f,o+this.height-u)),u,0)}forEachLine(e,t,n,o,s,a){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:l,perLine:c,perChar:d}=this.heightMetrics(n,s);for(let u=e,h=o;u<=t;){let f=n.doc.lineAt(u);if(u==e){let y=f.number-l;h+=c*y+d*(e-s-y)}let p=c+d*f.length;a(new hr(f.from,f.length,h,p,0)),h+=p,u=f.to+1}}replace(e,t,n){let o=this.length-t;if(o>0){let s=n[n.length-1];s instanceof Ze?n[n.length-1]=new Ze(s.length+o):n.push(null,new Ze(o-1))}if(e>0){let s=n[0];s instanceof Ze?n[0]=new Ze(e+s.length):n.unshift(new Ze(e-1),null)}return pt.of(n)}decomposeLeft(e,t){t.push(new Ze(e-1),null)}decomposeRight(e,t){t.push(null,new Ze(this.length-e-1))}updateHeight(e,t=0,n=!1,o){let s=t+this.length;if(o&&o.from<=t+this.length&&o.more){let a=[],l=Math.max(t,o.from),c=-1;for(o.from>t&&a.push(new Ze(o.from-t-1).updateHeight(e,t));l<=s&&o.more;){let u=e.doc.lineAt(l).length;a.length&&a.push(null);let h=o.heights[o.index++];c==-1?c=h:Math.abs(h-c)>=Ga&&(c=-2);let f=new St(u,h);f.outdated=!1,a.push(f),l+=u+1}l<=s&&a.push(null,new Ze(s-l).updateHeight(e,l));let d=pt.of(a);return(c<0||Math.abs(d.height-this.height)>=Ga||Math.abs(c-this.heightMetrics(e,t).perLine)>=Ga)&&(e.heightChanged=!0),d}else(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Ix extends pt{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,o){let s=n+this.left.height;return e<s?this.left.blockAt(e,t,n,o):this.right.blockAt(e,t,s,o+this.left.length+this.break)}lineAt(e,t,n,o,s){let a=o+this.left.height,l=s+this.left.length+this.break,c=t==Ae.ByHeight?e<a:e<l,d=c?this.left.lineAt(e,t,n,o,s):this.right.lineAt(e,t,n,a,l);if(this.break||(c?d.to<l:d.from>l))return d;let u=t==Ae.ByPosNoHeight?Ae.ByPosNoHeight:Ae.ByPos;return c?d.join(this.right.lineAt(l,u,n,a,l)):this.left.lineAt(l,u,n,o,s).join(d)}forEachLine(e,t,n,o,s,a){let l=o+this.left.height,c=s+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,n,o,s,a),t>=c&&this.right.forEachLine(e,t,n,l,c,a);else{let d=this.lineAt(c,Ae.ByPos,n,o,s);e<d.from&&this.left.forEachLine(e,d.from-1,n,o,s,a),d.to>=e&&d.from<=t&&a(d),t>d.to&&this.right.forEachLine(d.to+1,t,n,l,c,a)}}replace(e,t,n){let o=this.left.length+this.break;if(t<o)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-o,t-o,n));let s=[];e>0&&this.decomposeLeft(e,s);let a=s.length;for(let l of n)s.push(l);if(e>0&&nm(s,a-1),t<this.length){let l=s.length;this.decomposeRight(t,s),nm(s,l)}return pt.of(s)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,o=n+this.break;if(e>=o)return this.right.decomposeRight(e-o,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<o&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?pt.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,o){let{left:s,right:a}=this,l=t+s.length+this.break,c=null;return o&&o.from<=t+s.length&&o.more?c=s=s.updateHeight(e,t,n,o):s.updateHeight(e,t,n),o&&o.from<=l+a.length&&o.more?c=a=a.updateHeight(e,l,n,o):a.updateHeight(e,l,n),c?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function nm(r,e){let t,n;r[e]==null&&(t=r[e-1])instanceof Ze&&(n=r[e+1])instanceof Ze&&r.splice(e-1,3,new Ze(t.length+1+n.length))}const Mx=5;class mh{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof St?o.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new St(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let o=n.widget?n.widget.estimatedHeight:0,s=n.widget?n.widget.lineBreaks:0;o<0&&(o=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new Iy(a,o,n)):(a||s||o>=Mx)&&this.addLineDeco(o,s,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new St(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new Ze(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof St)return e;let t=new St(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let o=this.ensureLine();o.length+=n,o.collapsed+=n,o.widgetHeight=Math.max(o.widgetHeight,e),o.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof St)&&!this.isCovered?this.nodes.push(new St(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let o of this.nodes)o instanceof St&&o.updateHeight(this.oracle,n),n+=o?o.length:1;return this.nodes}static build(e,t,n,o){let s=new mh(n,e);return be.spans(t,n,o,s,0),s.finish(n)}}function Dx(r,e,t){let n=new Vx;return be.compare(r,e,t,n,0),n.changes}class Vx{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,o){(e<t||n&&n.heightRelevant||o&&o.heightRelevant)&&Qd(e,t,this.changes,5)}}function Rx(r,e){let t=r.getBoundingClientRect(),n=r.ownerDocument,o=n.defaultView||window,s=Math.max(0,t.left),a=Math.min(o.innerWidth,t.right),l=Math.max(0,t.top),c=Math.min(o.innerHeight,t.bottom);for(let d=r.parentNode;d&&d!=n.body;)if(d.nodeType==1){let u=d,h=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&h.overflow!="visible"){let f=u.getBoundingClientRect();s=Math.max(s,f.left),a=Math.min(a,f.right),l=Math.max(l,f.top),c=d==r.parentNode?f.bottom:Math.min(c,f.bottom)}d=h.position=="absolute"||h.position=="fixed"?u.offsetParent:u.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:s-t.left,right:Math.max(s,a)-t.left,top:l-(t.top+e),bottom:Math.max(l,c)-(t.top+e)}}function Lx(r,e){let t=r.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Wc{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let o=e[n],s=t[n];if(o.from!=s.from||o.to!=s.to||o.size!=s.size)return!1}return!0}draw(e,t){return Be.replace({widget:new jx(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class jx extends os{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class om{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=sm,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=exports.Direction.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(fh).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new Bx(t),this.stateDeco=e.facet(wi).filter(n=>typeof n!="function"),this.heightMap=pt.empty().applyChanges(this.stateDeco,we.empty,this.heightOracle.setDoc(e.doc),[new Mt(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Be.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let o=n?t.head:t.anchor;if(!e.some(({from:s,to:a})=>o>=s&&o<=a)){let{from:s,to:a}=this.lineBlockAt(o);e.push(new ga(s,a))}}this.viewports=e.sort((n,o)=>n.from-o.from),this.scaler=this.heightMap.height<=7e6?sm:new zx(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Ws(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(wi).filter(u=>typeof u!="function");let o=e.changedRanges,s=Mt.extendWithRanges(o,Dx(n,this.stateDeco,e?e.changes:Ye.empty(this.state.doc.length))),a=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=a&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let c=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let d=!e.changes.empty||e.flags&2||c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,this.updateForViewport(),d&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(XS)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),o=this.heightOracle,s=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?exports.Direction.RTL:exports.Direction.LTR;let a=this.heightOracle.mustRefreshForWrapping(s),l=t.getBoundingClientRect(),c=a||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let d=0,u=0;if(l.width&&l.height){let{scaleX:S,scaleY:x}=K0(t,l);(this.scaleX!=S||this.scaleY!=x)&&(this.scaleX=S,this.scaleY=x,d|=8,a=c=!0)}let h=(parseInt(n.paddingTop)||0)*this.scaleY,f=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,d|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,d|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=J0(e.scrollDOM);let y=(this.printing?Lx:Rx)(t,this.paddingTop),g=y.top-this.pixelViewport.top,m=y.bottom-this.pixelViewport.bottom;this.pixelViewport=y;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(c=!0)),!this.inView&&!this.scrollTarget)return 0;let b=l.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,d|=8),c){let S=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(S)&&(a=!0),a||o.lineWrapping&&Math.abs(b-this.contentDOMWidth)>o.charWidth){let{lineHeight:x,charWidth:k,textHeight:C}=e.docView.measureTextSize();a=x>0&&o.refresh(s,x,k,C,b/k,S),a&&(e.docView.minWidth=0,d|=8)}g>0&&m>0?u=Math.max(g,m):g<0&&m<0&&(u=Math.min(g,m)),o.heightChanged=!1;for(let x of this.viewports){let k=x.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(x);this.heightMap=(a?pt.empty().applyChanges(this.stateDeco,we.empty,this.heightOracle,[new Mt(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,a,new Px(x.from,k))}o.heightChanged&&(d|=2)}let w=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(d&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),d|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),d}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),o=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:l}=this,c=new ga(o.lineAt(a-n*1e3,Ae.ByHeight,s,0,0).from,o.lineAt(l+(1-n)*1e3,Ae.ByHeight,s,0,0).to);if(t){let{head:d}=t.range;if(d<c.from||d>c.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=o.lineAt(d,Ae.ByPos,s,0,0),f;t.y=="center"?f=(h.top+h.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&d<c.from?f=h.top:f=h.bottom-u,c=new ga(o.lineAt(f-1e3/2,Ae.ByHeight,s,0,0).from,o.lineAt(f+u+1e3/2,Ae.ByHeight,s,0,0).to)}}return c}mapViewport(e,t){let n=t.mapPos(e.from,-1),o=t.mapPos(e.to,1);return new ga(this.heightMap.lineAt(n,Ae.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(o,Ae.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:o}=this.heightMap.lineAt(e,Ae.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,Ae.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:l}=this;return(e==0||o<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(n,250)))&&o>a-2*1e3&&s<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let o of e)t.touchesRange(o.from,o.to)||n.push(new Wc(t.mapPos(o.from),t.mapPos(o.to),o.size));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,o=n?1e4:2e3,s=o>>1,a=o<<1;if(this.defaultTextDirection!=exports.Direction.LTR&&!n)return[];let l=[],c=(d,u,h,f)=>{if(u-d<s)return;let p=this.state.selection.main,y=[p.from];p.empty||y.push(p.to);for(let m of y)if(m>d&&m<u){c(d,m-10,h,f),c(m+10,u,h,f);return}let g=qx(e,m=>m.from>=h.from&&m.to<=h.to&&Math.abs(m.from-d)<s&&Math.abs(m.to-u)<s&&!y.some(v=>m.from<v&&m.to>v));if(!g){if(u<h.to&&t&&n&&t.visibleRanges.some(m=>m.from<=u&&m.to>=u)){let m=t.moveToLineBoundary(Y.cursor(u),!1,!0).head;m>d&&(u=m)}g=new Wc(d,u,this.gapSize(h,d,u,f))}l.push(g)};for(let d of this.viewportLines){if(d.length<a)continue;let u=Fx(d.from,d.to,this.stateDeco);if(u.total<a)continue;let h=this.scrollTarget?this.scrollTarget.range.head:null,f,p;if(n){let y=o/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,m;if(h!=null){let v=va(u,h),b=((this.visibleBottom-this.visibleTop)/2+y)/d.height;g=v-b,m=v+b}else g=(this.visibleTop-d.top-y)/d.height,m=(this.visibleBottom-d.top+y)/d.height;f=ya(u,g),p=ya(u,m)}else{let y=u.total*this.heightOracle.charWidth,g=o*this.heightOracle.charWidth,m,v;if(h!=null){let b=va(u,h),w=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/y;m=b-w,v=b+w}else m=(this.pixelViewport.left-g)/y,v=(this.pixelViewport.right+g)/y;f=ya(u,m),p=ya(u,v)}f>d.from&&c(d.from,f,d,u),p<d.to&&c(p,d.to,d,u)}return l}gapSize(e,t,n,o){let s=va(o,n)-va(o,t);return this.heightOracle.lineWrapping?e.height*s:o.total*this.heightOracle.charWidth*s}updateLineGaps(e){Wc.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Be.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];be.spans(e,this.viewport.from,this.viewport.to,{span(o,s){t.push({from:o,to:s})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((o,s)=>o.from!=t[s].from||o.to!=t[s].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ws(this.heightMap.lineAt(e,Ae.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Ws(this.heightMap.lineAt(this.scaler.fromDOM(e),Ae.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Ws(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ga{constructor(e,t){this.from=e,this.to=t}}function Fx(r,e,t){let n=[],o=r,s=0;return be.spans(t,r,e,{span(){},point(a,l){a>o&&(n.push({from:o,to:a}),s+=a-o),o=l}},20),o<e&&(n.push({from:o,to:e}),s+=e-o),{total:s,ranges:n}}function ya({total:r,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(r*t);for(let o=0;;o++){let{from:s,to:a}=e[o],l=a-s;if(n<=l)return s+n;n-=l}}function va(r,e){let t=0;for(let{from:n,to:o}of r.ranges){if(e<=o){t+=e-n;break}t+=o-n}return t/r.total}function qx(r,e){for(let t of r)if(e(t))return t}const sm={toDOM(r){return r},fromDOM(r){return r},scale:1};class zx{constructor(e,t,n){let o=0,s=0,a=0;this.viewports=n.map(({from:l,to:c})=>{let d=t.lineAt(l,Ae.ByPos,e,0,0).top,u=t.lineAt(c,Ae.ByPos,e,0,0).bottom;return o+=u-d,{from:l,to:c,top:d,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-o)/(t.height-o);for(let l of this.viewports)l.domTop=a+(l.top-s)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,n=0,o=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return o+(e-n)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);n=s.bottom,o=s.domBottom}}fromDOM(e){for(let t=0,n=0,o=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return n+(e-o)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);n=s.bottom,o=s.domBottom}}}function Ws(r,e){if(e.scale==1)return r;let t=e.toDOM(r.top),n=e.toDOM(r.bottom);return new hr(r.from,r.length,t,n-t,Array.isArray(r._content)?r._content.map(o=>Ws(o,e)):r._content)}const ba=Z.define({combine:r=>r.join(" ")}),su=Z.define({combine:r=>r.indexOf(!0)>-1}),iu=un.newName(),My=un.newName(),Dy=un.newName(),Vy={"&light":"."+My,"&dark":"."+Dy};function au(r,e,t){return new un(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,o=>{if(o=="&")return r;if(!t||!t[o])throw new RangeError(`Unsupported selector: ${o}`);return t[o]}):r+" "+n}})}const Hx=au("."+iu,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Vy),Gs="￿";class Ux{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ve.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Gs}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let o=e;;){this.findPointBefore(n,o);let s=this.text.length;this.readNode(o);let a=o.nextSibling;if(a==t)break;let l=Te.get(o),c=Te.get(a);(l&&c?l.breakAfter:(l?l.breakAfter:im(o))||im(a)&&(o.nodeName!="BR"||o.cmIgnore)&&this.text.length>s)&&this.lineBreak(),o=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,o=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(l=o.exec(t))&&(s=l.index,a=l[0].length),this.append(t.slice(n,s<0?t.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=a-1);n=s+a}}readNode(e){if(e.cmIgnore)return;let t=Te.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let o=n.iter();!o.next().done;)o.lineBreak?this.lineBreak():this.append(o.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Kx(e,n.node,n.offset)?t:0))}}function Kx(r,e,t){for(;;){if(!e||t<Dr(e))return!1;if(e==r)return!0;t=bi(e)+1,e=e.parentNode}}function im(r){return r.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName)}class am{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Wx{constructor(e,t,n,o){this.typeOver=o,this.bounds=null,this.text="";let{impreciseHead:s,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let l=s||a?[]:Yx(e),c=new Ux(l,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=Xx(l,this.bounds.from)}else{let l=e.observer.selectionRange,c=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!Kd(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),d=a&&a.node==l.anchorNode&&a.offset==l.anchorOffset||!Kd(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),u=e.viewport;if((G.ios||G.chrome)&&e.state.selection.main.empty&&c!=d&&(u.from>0||u.to<e.state.doc.length)){let h=Math.min(c,d),f=Math.max(c,d),p=u.from-h,y=u.to-f;(p==0||p==1||h==0)&&(y==0||y==-1||f==e.state.doc.length)&&(c=0,d=e.state.doc.length)}this.newSel=Y.single(d,c)}}}function Ry(r,e){let t,{newSel:n}=e,o=r.state.selection.main,s=r.inputState.lastKeyTime>Date.now()-100?r.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:l}=e.bounds,c=o.from,d=null;(s===8||G.android&&e.text.length<l-a)&&(c=o.to,d="end");let u=Jx(r.state.doc.sliceString(a,l,Gs),e.text,c-a,d);u&&(G.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Gs+Gs&&u.toB--,t={from:a+u.from,to:a+u.toA,insert:we.of(e.text.slice(u.from,u.toB).split(Gs))})}else n&&(!r.hasFocus&&r.state.facet(Yl)||n.main.eq(o))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!o.empty&&n&&n.main.empty?t={from:o.from,to:o.to,insert:r.state.doc.slice(o.from,o.to)}:t&&t.from>=o.from&&t.to<=o.to&&(t.from!=o.from||t.to!=o.to)&&o.to-o.from-(t.to-t.from)<=4?t={from:o.from,to:o.to,insert:r.state.doc.slice(o.from,t.from).append(t.insert).append(r.state.doc.slice(t.to,o.to))}:(G.mac||G.android)&&t&&t.from==t.to&&t.from==o.head-1&&/^\. ?$/.test(t.insert.toString())&&r.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=Y.single(n.main.anchor-1,n.main.head-1)),t={from:o.from,to:o.to,insert:we.of([" "])}):G.chrome&&t&&t.from==t.to&&t.from==o.head&&t.insert.toString()==`
61
- `&&r.lineWrapping&&(n&&(n=Y.single(n.main.anchor-1,n.main.head-1)),t={from:o.from,to:o.to,insert:we.of([" "])}),t){if(G.ios&&r.inputState.flushIOSKey()||G.android&&(t.from==o.from&&t.to==o.to&&t.insert.length==1&&t.insert.lines==2&&Vo(r.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&t.insert.length==0||s==8&&t.insert.length<t.to-t.from&&t.to>o.head)&&Vo(r.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&t.insert.length==0&&Vo(r.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();r.inputState.composing>=0&&r.inputState.composing++;let l,c=()=>l||(l=Gx(r,t,n));return r.state.facet(py).some(d=>d(r,t.from,t.to,a,c))||r.dispatch(c()),!0}else if(n&&!n.main.eq(o)){let a=!1,l="select";return r.inputState.lastSelectionTime>Date.now()-50&&(r.inputState.lastSelectionOrigin=="select"&&(a=!0),l=r.inputState.lastSelectionOrigin),r.dispatch({selection:n,scrollIntoView:a,userEvent:l}),!0}else return!1}function Gx(r,e,t){let n,o=r.state,s=o.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&r.inputState.composing<0){let l=s.from<e.from?o.sliceDoc(s.from,e.from):"",c=s.to>e.to?o.sliceDoc(e.to,s.to):"";n=o.replaceSelection(r.state.toText(l+e.insert.sliceString(0,void 0,r.state.lineBreak)+c))}else{let l=o.changes(e),c=t&&t.main.to<=l.newLength?t.main:void 0;if(o.selection.ranges.length>1&&r.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let d=r.state.sliceDoc(e.from,e.to),u,h=t&&Sy(r,t.main.head);if(h){let y=e.insert.length-(e.to-e.from);u={from:h.from,to:h.to-y}}else u=r.state.doc.lineAt(s.head);let f=s.to-e.to,p=s.to-s.from;n=o.changeByRange(y=>{if(y.from==s.from&&y.to==s.to)return{changes:l,range:c||y.map(l)};let g=y.to-f,m=g-d.length;if(y.to-y.from!=p||r.state.sliceDoc(m,g)!=d||y.to>=u.from&&y.from<=u.to)return{range:y};let v=o.changes({from:m,to:g,insert:e.insert}),b=y.to-s.to;return{changes:v,range:c?Y.range(Math.max(0,c.anchor+b),Math.max(0,c.head+b)):y.map(v)}})}else n={changes:l,selection:c&&o.selection.replaceRange(c)}}let a="input.type";return(r.composing||r.inputState.compositionPendingChange&&r.inputState.compositionEndedAt>Date.now()-50)&&(r.inputState.compositionPendingChange=!1,a+=".compose",r.inputState.compositionFirstChange&&(a+=".start",r.inputState.compositionFirstChange=!1)),o.update(n,{userEvent:a,scrollIntoView:!0})}function Jx(r,e,t,n){let o=Math.min(r.length,e.length),s=0;for(;s<o&&r.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==o&&r.length==e.length)return null;let a=r.length,l=e.length;for(;a>0&&l>0&&r.charCodeAt(a-1)==e.charCodeAt(l-1);)a--,l--;if(n=="end"){let c=Math.max(0,s-Math.min(a,l));t-=a+c-s}if(a<s&&r.length<e.length){let c=t<=s&&t>=a?s-t:0;s-=c,l=s+(l-a),a=s}else if(l<s){let c=t<=s&&t>=l?s-t:0;s-=c,a=s+(a-l),l=s}return{from:s,toA:a,toB:l}}function Yx(r){let e=[];if(r.root.activeElement!=r.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:o,focusOffset:s}=r.observer.selectionRange;return t&&(e.push(new am(t,n)),(o!=t||s!=n)&&e.push(new am(o,s))),e}function Xx(r,e){if(r.length==0)return null;let t=r[0].pos,n=r.length==2?r[1].pos:t;return t>-1&&n>-1?Y.single(t+e,n+e):null}const Qx={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Gc=G.ie&&G.ie_version<=11;class Zx{constructor(e){this.view=e,this.active=!1,this.selectionRange=new IS,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(G.ie&&G.ie_version<=11||G.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),Gc&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,o=this.selectionRange;if(n.state.facet(Yl)?n.root.activeElement!=this.dom:!Ka(n.dom,o))return;let s=o.anchorNode&&n.docView.nearest(o.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(G.ie&&G.ie_version<=11||G.android&&G.chrome)&&!n.state.selection.main.empty&&o.focusNode&&ni(o.focusNode,o.focusOffset,o.anchorNode,o.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=G.safari&&e.root.nodeType==11&&OS(this.dom.ownerDocument)==this.dom&&e2(this.view)||pl(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=Ka(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&DS(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Qx),Gc&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Gc&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let o=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Vo(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(o)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,o=!1;for(let s of e){let a=this.readMutation(s);a&&(a.typeOver&&(o=!0),t==-1?{from:t,to:n}=a:(t=Math.min(a.from,t),n=Math.max(a.to,n)))}return{from:t,to:n,typeOver:o}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),o=this.selectionChanged&&Ka(this.dom,this.selectionRange);if(e<0&&!o)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Wx(this.view,e,t,n);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,o=Ry(this.view,t);return this.view.state==n&&this.view.update([]),o}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=lm(t,e.previousSibling||e.target.previousSibling,-1),o=lm(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:o?t.posBefore(o):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function lm(r,e,t){for(;e;){let n=Te.get(e);if(n&&n.parent==r)return n;let o=e.parentNode;e=o!=r.dom?o:t>0?e.nextSibling:e.previousSibling}return null}function e2(r){let e=null;function t(c){c.preventDefault(),c.stopImmediatePropagation(),e=c.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",t,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let n=e.startContainer,o=e.startOffset,s=e.endContainer,a=e.endOffset,l=r.docView.domAtPos(r.state.selection.main.anchor);return ni(l.node,l.offset,s,a)&&([n,o,s,a]=[s,a,n,o]),{anchorNode:n,anchorOffset:o,focusNode:s,focusOffset:a}}class ue{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(n=>n.forEach(o=>t(o,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||MS(e.parent)||document,this.viewState=new om(e.state||ve.create(e)),e.scrollTo&&e.scrollTo.is(fa)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Us).map(n=>new Hc(n));for(let n of this.plugins)n.update(this);this.observer=new Zx(this),this.inputState=new mx(this),this.inputState.ensureHandlers(this.plugins),this.docView=new jp(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let t=e.length==1&&e[0]instanceof rt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,o,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,l=0,c=null;e.some(f=>f.annotation(Ty))?(this.inputState.notifiedFocused=a,l=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,c=By(s,a),c||(l=1));let d=this.observer.delayedAndroidKey,u=null;if(d?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(ve.phrases)!=this.state.facet(ve.phrases))return this.setState(s);o=ml.create(this,s,e),o.flags|=l;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:p}=f.state.selection;h=new Ro(p.empty?p:Y.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of f.effects)p.is(fa)&&(h=p.value.clip(this.state))}this.viewState.update(o,h),this.bidiCache=gl.update(this.bidiCache,o.changes),o.empty||(this.updatePlugins(o),this.inputState.update(o)),t=this.docView.update(o),this.state.facet(Ks)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(o.startState.facet(ba)!=o.state.facet(ba)&&(this.viewState.mustMeasureContent=!0),(t||n||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!o.empty)for(let f of this.state.facet(ru))try{f(o)}catch(p){Br(this.state,p,"update listener")}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Ry(this,u)&&d.force&&Vo(this.contentDOM,d.key,d.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new om(e),this.plugins=e.facet(Us).map(n=>new Hc(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new jp(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Us),n=e.state.facet(Us);if(t!=n){let o=[];for(let s of n){let a=t.indexOf(s);if(a<0)o.push(new Hc(s));else{let l=this.plugins[a];l.mustUpdate=e,o.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=o,this.pluginMap.clear()}else for(let o of this.plugins)o.mustUpdate=e;for(let o=0;o<this.plugins.length;o++)this.plugins[o].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,o=n.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(o-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(a<0)if(J0(n))s=-1,a=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(o);s=p.from,a=p.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];c&4||([this.measureRequests,d]=[d,this.measureRequests]);let u=d.map(p=>{try{return p.read(this)}catch(y){return Br(this.state,y),cm}}),h=ml.create(this,this.state,[]),f=!1;h.flags|=c,t?t.flags|=c:t=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h));for(let p=0;p<d.length;p++)if(u[p]!=cm)try{let y=d[p];y.write&&y.write(u[p],this)}catch(y){Br(this.state,y)}if(f&&this.docView.updateSelection(!0),!h.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let y=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-a;if(y>1||y<-1){o=o+y,n.scrollTop=o/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(ru))l(t)}get themeClasses(){return iu+" "+(this.state.facet(su)?Dy:My)+" "+this.state.facet(ba)}updateAttrs(){let e=dm(this,yy,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Yl)?"true":"false",class:"cm-content",style:`${G.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),dm(this,fh,t);let n=this.observer.ignore(()=>{let o=Xd(this.contentDOM,this.contentAttrs,t),s=Xd(this.dom,this.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let o of n.effects)if(o.is(ue.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=o.value}}mountStyles(){this.styleModules=this.state.facet(Ks);let e=this.state.facet(ue.cspNonce);un.mount(this.root,this.styleModules.concat(Hx).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(n=>n.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Kc(this,e,Kp(this,e,t,n))}moveByGroup(e,t){return Kc(this,e,Kp(this,e,t,n=>fx(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),o=this.textDirectionAt(e.from),s=n[t?n.length-1:0];return Y.cursor(s.side(t,o)+e.from,s.forward(!t,o)?1:-1)}moveToLineBoundary(e,t,n=!0){return hx(this,e,t,n)}moveVertically(e,t,n){return Kc(this,e,px(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Cy(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let o=this.state.doc.lineAt(e),s=this.bidiSpans(o),a=s[sn.find(s,e-o.from,-1,t)];return ch(n,a.dir==exports.Direction.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(gy)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>t2)return ly(e.length);let t=this.textDirectionAt(e.from),n;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||ay(s.isolates,n=Lp(this,e))))return s.order;n||(n=Lp(this,e));let o=GS(e.text,t,n);return this.bidiCache.push(new gl(e.from,e.to,t,n,!0,o)),o}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||G.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{W0(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return fa.of(new Ro(typeof e=="number"?Y.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return fa.of(new Ro(Y.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return Rt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Rt.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=un.newName(),o=[ba.of(n),Ks.of(au(`.${n}`,e))];return t&&t.dark&&o.push(su.of(!0)),o}static baseTheme(e){return Kl.lowest(Ks.of(au("."+iu,e,Vy)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),o=n&&Te.get(n)||Te.get(e);return((t=o==null?void 0:o.rootView)===null||t===void 0?void 0:t.view)||null}}ue.styleModule=Ks;ue.inputHandler=py;ue.focusChangeEffect=my;ue.perLineTextDirection=gy;ue.exceptionSink=fy;ue.updateListener=ru;ue.editable=Yl;ue.mouseSelectionStyle=hy;ue.dragMovesSelection=uy;ue.clickAddsSelectionRange=dy;ue.decorations=wi;ue.outerDecorations=vy;ue.atomicRanges=ph;ue.bidiIsolatedRanges=by;ue.scrollMargins=wy;ue.darkTheme=su;ue.cspNonce=Z.define({combine:r=>r.length?r[0]:""});ue.contentAttributes=fh;ue.editorAttributes=yy;ue.lineWrapping=ue.contentAttributes.of({class:"cm-lineWrapping"});ue.announce=We.define();const t2=4096,cm={};class gl{constructor(e,t,n,o,s,a){this.from=e,this.to=t,this.dir=n,this.isolates=o,this.fresh=s,this.order=a}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let n=[],o=e.length?e[e.length-1].dir:exports.Direction.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let a=e[s];a.dir==o&&!t.touchesRange(a.from,a.to)&&n.push(new gl(t.mapPos(a.from,1),t.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return n}}function dm(r,e,t){for(let n=r.state.facet(e),o=n.length-1;o>=0;o--){let s=n[o],a=typeof s=="function"?s(r):s;a&&Yd(a,t)}return t}const r2=G.mac?"mac":G.windows?"win":G.linux?"linux":"key";function n2(r,e){const t=r.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let o,s,a,l;for(let c=0;c<t.length-1;++c){const d=t[c];if(/^(cmd|meta|m)$/i.test(d))l=!0;else if(/^a(lt)?$/i.test(d))o=!0;else if(/^(c|ctrl|control)$/i.test(d))s=!0;else if(/^s(hift)?$/i.test(d))a=!0;else if(/^mod$/i.test(d))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+d)}return o&&(n="Alt-"+n),s&&(n="Ctrl-"+n),l&&(n="Meta-"+n),a&&(n="Shift-"+n),n}function wa(r,e,t){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t!==!1&&e.shiftKey&&(r="Shift-"+r),r}const o2=Kl.default(ue.domEventHandlers({keydown(r,e){return l2(s2(e.state),r,e,"editor")}})),Ly=Z.define({enables:o2}),um=new WeakMap;function s2(r){let e=r.facet(Ly),t=um.get(e);return t||um.set(e,t=a2(e.reduce((n,o)=>n.concat(o),[]))),t}let rn=null;const i2=4e3;function a2(r,e=r2){let t=Object.create(null),n=Object.create(null),o=(a,l)=>{let c=n[a];if(c==null)n[a]=l;else if(c!=l)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,l,c,d,u)=>{var h,f;let p=t[a]||(t[a]=Object.create(null)),y=l.split(/ (?!$)/).map(v=>n2(v,e));for(let v=1;v<y.length;v++){let b=y.slice(0,v).join(" ");o(b,!0),p[b]||(p[b]={preventDefault:!0,stopPropagation:!1,run:[w=>{let S=rn={view:w,prefix:b,scope:a};return setTimeout(()=>{rn==S&&(rn=null)},i2),!0}]})}let g=y.join(" ");o(g,!1);let m=p[g]||(p[g]={preventDefault:!1,stopPropagation:!1,run:((f=(h=p._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});c&&m.run.push(c),d&&(m.preventDefault=!0),u&&(m.stopPropagation=!0)};for(let a of r){let l=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let d of l){let u=t[d]||(t[d]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let h in u)u[h].run.push(a.any)}let c=a[e]||a.key;if(c)for(let d of l)s(d,c,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(d,"Shift-"+c,a.shift,a.preventDefault,a.stopPropagation)}return t}function l2(r,e,t,n){let o=AS(e),s=Mo(o,0),a=ul(s)==o.length&&o!=" ",l="",c=!1,d=!1,u=!1;rn&&rn.view==t&&rn.scope==n&&(l=rn.prefix+" ",$y.indexOf(e.keyCode)<0&&(d=!0,rn=null));let h=new Set,f=m=>{if(m){for(let v of m.run)if(!h.has(v)&&(h.add(v),v(t,e)))return m.stopPropagation&&(u=!0),!0;m.preventDefault&&(m.stopPropagation&&(u=!0),d=!0)}return!1},p=r[n],y,g;return p&&(f(p[l+wa(o,e,!a)])?c=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(G.windows&&e.ctrlKey&&e.altKey)&&(y=hn[e.keyCode])&&y!=o?(f(p[l+wa(y,e,!0)])||e.shiftKey&&(g=yi[e.keyCode])!=o&&g!=y&&f(p[l+wa(g,e,!1)]))&&(c=!0):a&&e.shiftKey&&f(p[l+wa(o,e,!0)])&&(c=!0),!c&&f(p._any)&&(c=!0)),d&&(c=!0),c&&u&&e.stopPropagation(),c}const c2=!G.ios,hm={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};c2&&(hm[".cm-line"].caretColor="transparent !important",hm[".cm-content"]={caretColor:"transparent !important"});function fm(r,e,t,n,o){e.lastIndex=0;for(let s=r.iterRange(t,n),a=t,l;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)o(a+l.index,l)}function d2(r,e){let t=r.visibleRanges;if(t.length==1&&t[0].from==r.viewport.from&&t[0].to==r.viewport.to)return t;let n=[];for(let{from:o,to:s}of t)o=Math.max(r.state.doc.lineAt(o).from,o-e),s=Math.min(r.state.doc.lineAt(s).to,s+e),n.length&&n[n.length-1].to>=o?n[n.length-1].to=s:n.push({from:o,to:s});return n}class jy{constructor(e){const{regexp:t,decoration:n,decorate:o,boundary:s,maxLength:a=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,o)this.addMatch=(l,c,d,u)=>o(u,d,d+l[0].length,l,c);else if(typeof n=="function")this.addMatch=(l,c,d,u)=>{let h=n(l,c,d);h&&u(d,d+l[0].length,h)};else if(n)this.addMatch=(l,c,d,u)=>u(d,d+l[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(e){let t=new Ko,n=t.add.bind(t);for(let{from:o,to:s}of d2(e,this.maxLength))fm(e.state.doc,this.regexp,o,s,(a,l)=>this.addMatch(l,e,a,n));return t.finish()}updateDeco(e,t){let n=1e9,o=-1;return e.docChanged&&e.changes.iterChanges((s,a,l,c)=>{c>e.view.viewport.from&&l<e.view.viewport.to&&(n=Math.min(l,n),o=Math.max(c,o))}),e.viewportChanged||o-n>1e3?this.createDeco(e.view):o>-1?this.updateRange(e.view,t.map(e.changes),n,o):t}updateRange(e,t,n,o){for(let s of e.visibleRanges){let a=Math.max(s.from,n),l=Math.min(s.to,o);if(l>a){let c=e.state.doc.lineAt(a),d=c.to<l?e.state.doc.lineAt(l):c,u=Math.max(s.from,c.from),h=Math.min(s.to,d.to);if(this.boundary){for(;a>c.from;a--)if(this.boundary.test(c.text[a-1-c.from])){u=a;break}for(;l<d.to;l++)if(this.boundary.test(d.text[l-d.from])){h=l;break}}let f=[],p,y=(g,m,v)=>f.push(v.range(g,m));if(c==d)for(this.regexp.lastIndex=u-c.from;(p=this.regexp.exec(c.text))&&p.index<h-c.from;)this.addMatch(p,e,p.index+c.from,y);else fm(e.state.doc,this.regexp,u,h,(g,m)=>this.addMatch(m,e,g,y));t=t.update({filterFrom:u,filterTo:h,filter:(g,m)=>g<u||m>h,add:f})}}return t}}const lu=/x/.unicode!=null?"gu":"g",u2=new RegExp(`[\0-\b
62
- --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,lu),h2={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Jc=null;function f2(){var r;if(Jc==null&&typeof document<"u"&&document.body){let e=document.body.style;Jc=((r=e.tabSize)!==null&&r!==void 0?r:e.MozTabSize)!=null}return Jc||!1}const Ja=Z.define({combine(r){let e=Gl(r,{render:null,specialChars:u2,addSpecialChars:null});return(e.replaceTabs=!f2())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,lu)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,lu)),e}});function p2(r={}){return[Ja.of(r),m2()]}let pm=null;function m2(){return pm||(pm=Rt.fromClass(class{constructor(r){this.view=r,this.decorations=Be.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(r.state.facet(Ja)),this.decorations=this.decorator.createDeco(r)}makeDecorator(r){return new jy({regexp:r.specialChars,decoration:(e,t,n)=>{let{doc:o}=t.state,s=Mo(e[0],0);if(s==9){let a=o.lineAt(n),l=t.state.tabSize,c=lh(a.text,l,n-a.from);return Be.replace({widget:new b2((l-c%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Be.replace({widget:new v2(r,s)}))},boundary:r.replaceTabs?void 0:/[^]/})}update(r){let e=r.state.facet(Ja);r.startState.facet(Ja)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(r.view)):this.decorations=this.decorator.updateDeco(r,this.decorations)}},{decorations:r=>r.decorations}))}const g2="•";function y2(r){return r>=32?g2:r==10?"␤":String.fromCharCode(9216+r)}class v2 extends os{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=y2(this.code),n=e.state.phrase("Control character")+" "+(h2[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,n,t);if(o)return o;let s=document.createElement("span");return s.textContent=t,s.title=n,s.setAttribute("aria-label",n),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class b2 extends os{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const Ms="-10000px";class w2{constructor(e,t,n,o){this.facet=t,this.createTooltipView=n,this.removeTooltipView=o,this.input=e.state.facet(t),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=n(a,s))}update(e,t){var n;let o=e.state.facet(this.facet),s=o.filter(c=>c);if(o===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let a=[],l=t?[]:null;for(let c=0;c<s.length;c++){let d=s[c],u=-1;if(d){for(let h=0;h<this.tooltips.length;h++){let f=this.tooltips[h];f&&f.create==d.create&&(u=h)}if(u<0)a[c]=this.createTooltipView(d,c?a[c-1]:null),l&&(l[c]=!!d.above);else{let h=a[c]=this.tooltipViews[u];l&&(l[c]=t[u]),h.update&&h.update(e)}}}for(let c of this.tooltipViews)a.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(l.forEach((c,d)=>t[d]=c),t.length=l.length),this.input=o,this.tooltips=s,this.tooltipViews=a,!0}}function k2(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Yc=Z.define({combine:r=>{var e,t,n;return{position:G.ios?"absolute":((e=r.find(o=>o.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(o=>o.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=r.find(o=>o.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||k2}}}),mm=new WeakMap,Fy=Rt.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet(Yc);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new w2(r,qy,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,n=r.state.facet(Yc);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r,e){let t=r.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),r.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let o=document.createElement("div");o.className="cm-tooltip-arrow",t.dom.insertBefore(o,n)}return t.dom.style.position=this.position,t.dom.style.top=Ms,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var r,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(r=n.destroy)===null||r===void 0||r.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=this.view.dom.getBoundingClientRect(),e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(G.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==Ms&&o.style.left=="0px"){let s=o.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(e=o.width/this.parent.offsetWidth,t=o.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:r,parent:this.parent?this.container.getBoundingClientRect():r,pos:this.manager.tooltips.map((o,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(Yc).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:n,scaleX:o,scaleY:s}=r,a=[];for(let l=0;l<this.manager.tooltips.length;l++){let c=this.manager.tooltips[l],d=this.manager.tooltipViews[l],{dom:u}=d,h=r.pos[l],f=r.size[l];if(!h||h.bottom<=Math.max(t.top,n.top)||h.top>=Math.min(t.bottom,n.bottom)||h.right<Math.max(t.left,n.left)-.1||h.left>Math.min(t.right,n.right)+.1){u.style.top=Ms;continue}let p=c.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,y=p?7:0,g=f.right-f.left,m=(e=mm.get(d))!==null&&e!==void 0?e:f.bottom-f.top,v=d.offset||x2,b=this.view.textDirection==exports.Direction.LTR,w=f.width>n.right-n.left?b?n.left:n.right-f.width:b?Math.min(h.left-(p?14:0)+v.x,n.right-g):Math.max(n.left,h.left-g+(p?14:0)-v.x),S=this.above[l];!c.strictSide&&(S?h.top-(f.bottom-f.top)-v.y<n.top:h.bottom+(f.bottom-f.top)+v.y>n.bottom)&&S==n.bottom-h.bottom>h.top-n.top&&(S=this.above[l]=!S);let x=(S?h.top-n.top:n.bottom-h.bottom)-y;if(x<m&&d.resize!==!1){if(x<this.view.defaultLineHeight){u.style.top=Ms;continue}mm.set(d,m),u.style.height=(m=x)/s+"px"}else u.style.height&&(u.style.height="");let k=S?h.top-m-y-v.y:h.bottom+y+v.y,C=w+g;if(d.overlap!==!0)for(let N of a)N.left<C&&N.right>w&&N.top<k+m&&N.bottom>k&&(k=S?N.top-m-2-y:N.bottom+y+2);if(this.position=="absolute"?(u.style.top=(k-r.parent.top)/s+"px",u.style.left=(w-r.parent.left)/o+"px"):(u.style.top=k/s+"px",u.style.left=w/o+"px"),p){let N=h.left+(b?v.x:-v.x)-(w+14-7);p.style.left=N/o+"px"}d.overlap!==!0&&a.push({left:w,top:k,right:C,bottom:k+m}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),d.positioned&&d.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=Ms}},{eventObservers:{scroll(){this.maybeMeasure()}}}),S2=ue.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),x2={x:0,y:0},qy=Z.define({enables:[Fy,S2]});function C2(r,e){let t=r.plugin(Fy);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}class Yn extends Wn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Yn.prototype.elementClass="";Yn.prototype.toDOM=void 0;Yn.prototype.mapMode=exports.MapMode.TrackBefore;Yn.prototype.startSide=Yn.prototype.endSide=-1;Yn.prototype.point=!0;const Xc=Z.define(),Ya=Z.define(),cu=Z.define({combine:r=>r.some(e=>e)});function E2(r){let e=[$2];return r&&r.fixed===!1&&e.push(cu.of(!0)),e}const $2=Rt.fromClass(class{constructor(r){this.view=r,this.prevViewport=r.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=r.state.facet(Ya).map(e=>new ym(r,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!r.state.facet(cu),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),r.scrollDOM.insertBefore(this.dom,r.contentDOM)}update(r){if(this.updateGutters(r)){let e=this.prevViewport,t=r.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}r.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(cu)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=r.view.viewport}syncGutters(r){let e=this.dom.nextSibling;r&&this.dom.remove();let t=be.iter(this.view.state.facet(Xc),this.view.viewport.from),n=[],o=this.gutters.map(s=>new _2(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(s.type)){let a=!0;for(let l of s.type)if(l.type==Xt.Text&&a){du(t,n,l.from);for(let c of o)c.line(this.view,l,n);a=!1}else if(l.widget)for(let c of o)c.widget(this.view,l)}else if(s.type==Xt.Text){du(t,n,s.from);for(let a of o)a.line(this.view,s,n)}else if(s.widget)for(let a of o)a.widget(this.view,s);for(let s of o)s.finish();r&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(r){let e=r.startState.facet(Ya),t=r.state.facet(Ya),n=r.docChanged||r.heightChanged||r.viewportChanged||!be.eq(r.startState.facet(Xc),r.state.facet(Xc),r.view.viewport.from,r.view.viewport.to);if(e==t)for(let o of this.gutters)o.update(r)&&(n=!0);else{n=!0;let o=[];for(let s of t){let a=e.indexOf(s);a<0?o.push(new ym(this.view,s)):(this.gutters[a].update(r),o.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),o.indexOf(s)<0&&s.destroy();for(let s of o)this.dom.appendChild(s.dom);this.gutters=o}return n}destroy(){for(let r of this.gutters)r.destroy();this.dom.remove()}},{provide:r=>ue.scrollMargins.of(e=>{let t=e.plugin(r);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==exports.Direction.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function gm(r){return Array.isArray(r)?r:[r]}function du(r,e,t){for(;r.value&&r.from<=t;)r.from==t&&e.push(r.value),r.next()}class _2{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=be.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:o}=this,s=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==o.elements.length){let l=new zy(e,a,s,n);o.elements.push(l),o.dom.appendChild(l.dom)}else o.elements[this.i].update(e,a,s,n);this.height=t.bottom,this.i++}line(e,t,n){let o=[];du(this.cursor,o,t.from),n.length&&(o=o.concat(n));let s=this.gutter.config.lineMarker(e,t,o);s&&o.unshift(s);let a=this.gutter;o.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,o)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class ym{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,o=>{let s=o.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();a=(c.top+c.bottom)/2}else a=o.clientY;let l=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,l,o)&&o.preventDefault()});this.markers=gm(t.markers(e)),t.initialSpacer&&(this.spacer=new zy(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=gm(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let o=this.config.updateSpacer(this.spacer.markers[0],e);o!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[o])}let n=e.view.viewport;return!be.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class zy{constructor(e,t,n,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,o)}update(e,t,n,o){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),N2(this.markers,o)||this.setMarkers(e,o)}setMarkers(e,t){let n="cm-gutterElement",o=this.dom.firstChild;for(let s=0,a=0;;){let l=a,c=s<t.length?t[s++]:null,d=!1;if(c){let u=c.elementClass;u&&(n+=" "+u);for(let h=a;h<this.markers.length;h++)if(this.markers[h].compare(c)){l=h,d=!0;break}}else l=this.markers.length;for(;a<l;){let u=this.markers[a++];if(u.toDOM){u.destroy(o);let h=o.nextSibling;o.remove(),o=h}}if(!c)break;c.toDOM&&(d?o=o.nextSibling:this.dom.insertBefore(c.toDOM(e),o)),d&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function N2(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].compare(e[t]))return!1;return!0}const A2=Z.define(),_o=Z.define({combine(r){return Gl(r,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let o in t){let s=n[o],a=t[o];n[o]=s?(l,c,d)=>s(l,c,d)||a(l,c,d):a}return n}})}});class Qc extends Yn{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Zc(r,e){return r.state.facet(_o).formatNumber(e,r.state)}const O2=Ya.compute([_o],r=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(A2)},lineMarker(e,t,n){return n.some(o=>o.toDOM)?null:new Qc(Zc(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(_o)!=e.state.facet(_o),initialSpacer(e){return new Qc(Zc(e,vm(e.state.doc.lines)))},updateSpacer(e,t){let n=Zc(t.view,vm(t.view.state.doc.lines));return n==e.number?e:new Qc(n)},domEventHandlers:r.facet(_o).domEventHandlers}));function T2(r={}){return[_o.of(r),E2(),O2]}function vm(r){let e=9;for(;e<r;)e=e*10+9;return e}const Hy=1024;let B2=0;class It{constructor(e,t){this.from=e,this.to=t}}class fe{constructor(e={}){this.id=B2++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=mt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}fe.closedBy=new fe({deserialize:r=>r.split(" ")});fe.openedBy=new fe({deserialize:r=>r.split(" ")});fe.group=new fe({deserialize:r=>r.split(" ")});fe.isolate=new fe({deserialize:r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"}});fe.contextHash=new fe({perNode:!0});fe.lookAhead=new fe({perNode:!0});fe.mounted=new fe({perNode:!0});class ki{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[fe.mounted.id]}}const P2=Object.create(null);class mt{constructor(e,t,n,o=0){this.name=e,this.props=t,this.id=n,this.flags=o}static define(e){let t=e.props&&e.props.length?Object.create(null):P2,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),o=new mt(e.name||"",t,e.id,n);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(o)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return o}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(fe.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let o of n.split(" "))t[o]=e[n];return n=>{for(let o=n.prop(fe.group),s=-1;s<(o?o.length:0);s++){let a=t[s<0?n.name:o[s]];if(a)return a}}}}mt.none=new mt("",Object.create(null),0,8);class gh{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let o=null;for(let s of e){let a=s(n);a&&(o||(o=Object.assign({},n.props)),o[a[0].id]=a[1])}t.push(o?new mt(n.name,o,n.id,n.flags):n)}return new gh(t)}}const ka=new WeakMap,bm=new WeakMap;exports.IterMode=void 0;(function(r){r[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays"})(exports.IterMode||(exports.IterMode={}));class He{constructor(e,t,n,o,s){if(this.type=e,this.children=t,this.positions=n,this.length=o,this.props=null,s&&s.length){this.props=Object.create(null);for(let[a,l]of s)this.props[typeof a=="number"?a:a.id]=l}}toString(){let e=ki.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let o=n.toString();o&&(t&&(t+=","),t+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new yl(this.topNode,e)}cursorAt(e,t=0,n=0){let o=ka.get(this)||this.topNode,s=new yl(o);return s.moveTo(e,t),ka.set(this,s._tree),s}get topNode(){return new at(this,0,0,null)}resolve(e,t=0){let n=Si(ka.get(this)||this.topNode,e,t,!1);return ka.set(this,n),n}resolveInner(e,t=0){let n=Si(bm.get(this)||this.topNode,e,t,!0);return bm.set(this,n),n}resolveStack(e,t=0){return D2(this,e,t)}iterate(e){let{enter:t,leave:n,from:o=0,to:s=this.length}=e,a=e.mode||0,l=(a&exports.IterMode.IncludeAnonymous)>0;for(let c=this.cursor(a|exports.IterMode.IncludeAnonymous);;){let d=!1;if(c.from<=s&&c.to>=o&&(!l&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;d=!0}for(;d&&n&&(l||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;d=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:bh(mt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,o)=>new He(this.type,t,n,o,this.propValues),e.makeTree||((t,n,o)=>new He(mt.none,t,n,o)))}static build(e){return V2(e)}}He.empty=new He(mt.none,[],[],0);class yh{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new yh(this.buffer,this.index)}}class pn{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return mt.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],o=this.set.types[t],s=o.name;if(/\W/.test(s)&&!o.isError&&(s=JSON.stringify(s)),e+=4,n==e)return s;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return s+"("+a.join(",")+")"}findChild(e,t,n,o,s){let{buffer:a}=this,l=-1;for(let c=e;c!=t&&!(Uy(s,o,a[c+1],a[c+2])&&(l=c,n>0));c=a[c+3]);return l}slice(e,t,n){let o=this.buffer,s=new Uint16Array(t-e),a=0;for(let l=e,c=0;l<t;){s[c++]=o[l++],s[c++]=o[l++]-n;let d=s[c++]=o[l++]-n;s[c++]=o[l++]-e,a=Math.max(a,d)}return new pn(s,a,this.set)}}function Uy(r,e,t,n){switch(r){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function Si(r,e,t,n){for(var o;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to<e);){let a=!n&&r instanceof at&&r.index<0?null:r.parent;if(!a)return r;r=a}let s=n?0:exports.IterMode.IgnoreOverlays;if(n)for(let a=r,l=a.parent;l;a=l,l=a.parent)a instanceof at&&a.index<0&&((o=l.enter(e,t,s))===null||o===void 0?void 0:o.from)!=a.from&&(r=l);for(;;){let a=r.enter(e,t,s);if(!a)return r;r=a}}class Ky{cursor(e=0){return new yl(this,e)}getChild(e,t=null,n=null){let o=wm(this,e,t,n);return o.length?o[0]:null}getChildren(e,t=null,n=null){return wm(this,e,t,n)}resolve(e,t=0){return Si(this,e,t,!1)}resolveInner(e,t=0){return Si(this,e,t,!0)}matchContext(e){return uu(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let o=t.lastChild;if(!o||o.to!=t.to)break;o.type.isError&&o.from==o.to?(n=t,t=o.prevSibling):t=o}return n}get node(){return this}get next(){return this.parent}}class at extends Ky{constructor(e,t,n,o){super(),this._tree=e,this.from=t,this.index=n,this._parent=o}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,o,s=0){for(let a=this;;){for(let{children:l,positions:c}=a._tree,d=t>0?l.length:-1;e!=d;e+=t){let u=l[e],h=c[e]+a.from;if(Uy(o,n,h,h+u.length)){if(u instanceof pn){if(s&exports.IterMode.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,t,n-h,o);if(f>-1)return new mr(new I2(a,u,e,h),null,f)}else if(s&exports.IterMode.IncludeAnonymous||!u.type.isAnonymous||vh(u)){let f;if(!(s&exports.IterMode.IgnoreMounts)&&(f=ki.get(u))&&!f.overlay)return new at(f.tree,h,e,a);let p=new at(u,h,e,a);return s&exports.IterMode.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?u.children.length-1:0,t,n,o)}}}if(s&exports.IterMode.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+t:e=t<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let o;if(!(n&exports.IterMode.IgnoreOverlays)&&(o=ki.get(this._tree))&&o.overlay){let s=e-this.from;for(let{from:a,to:l}of o.overlay)if((t>0?a<=s:a<s)&&(t<0?l>=s:l>s))return new at(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function wm(r,e,t,n){let o=r.cursor(),s=[];if(!o.firstChild())return s;if(t!=null){for(let a=!1;!a;)if(a=o.type.is(t),!o.nextSibling())return s}for(;;){if(n!=null&&o.type.is(n))return s;if(o.type.is(e)&&s.push(o.node),!o.nextSibling())return n==null?s:[]}}function uu(r,e,t=e.length-1){for(let n=r.parent;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class I2{constructor(e,t,n,o){this.parent=e,this.buffer=t,this.index=n,this.start=o}}class mr extends Ky{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:o}=this.context,s=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.context.start,n);return s<0?null:new mr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&exports.IterMode.ExcludeBuffers)return null;let{buffer:o}=this.context,s=o.findChild(this.index+4,o.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new mr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new mr(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new mr(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,o=this.index+4,s=n.buffer[this.index+3];if(s>o){let a=n.buffer[this.index+1];e.push(n.slice(o,s,a)),t.push(0)}return new He(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Wy(r){if(!r.length)return null;let e=0,t=r[0];for(let s=1;s<r.length;s++){let a=r[s];(a.from>t.from||a.to<t.to)&&(t=a,e=s)}let n=t instanceof at&&t.index<0?null:t.parent,o=r.slice();return n?o[e]=n:o.splice(e,1),new M2(o,t)}class M2{constructor(e,t){this.heads=e,this.node=t}get next(){return Wy(this.heads)}}function D2(r,e,t){let n=r.resolveInner(e,t),o=null;for(let s=n instanceof at?n:n.context.parent;s;s=s.parent)if(s.index<0){let a=s.parent;(o||(o=[n])).push(a.resolve(e,t)),s=a}else{let a=ki.get(s.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let l=new at(a.tree,a.overlay[0].from+s.from,-1,s);(o||(o=[n])).push(Si(l,e,t,!1))}}return o?Wy(o):n}class yl{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof at)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:o}=this.buffer;return this.type=t||o.set.types[o.buffer[e]],this.from=n+o.buffer[e+1],this.to=n+o.buffer[e+2],!0}yield(e){return e?e instanceof at?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:o}=this.buffer,s=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.buffer.start,n);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&exports.IterMode.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&exports.IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&exports.IterMode.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let o=n<0?0:this.stack[n]+4;if(this.index!=o)return this.yieldBuf(t.findChild(o,this.index,-1,0,4))}else{let o=t.buffer[this.index+3];if(o<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(o)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:o}=this;if(o){if(e>0){if(this.index<o.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(o.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:n}=o)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let s=t+e,a=e<0?-1:n._tree.children.length;s!=a;s+=e){let l=n._tree.children[s];if(this.mode&exports.IterMode.IncludeAnonymous||l instanceof pn||!l.type.isAnonymous||vh(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let o=this.index,s=this.stack.length;s>=0;){for(let a=e;a;a=a._parent)if(a.index==o){if(o==this.index)return a;t=a,n=s+1;break e}o=this.stack[--s]}for(let o=n;o<this.stack.length;o++)t=new mr(this.buffer,t,this.stack[o]);return this.bufferNode=new mr(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let o=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(o=!0)}for(;o&&t&&t(this),o=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,o=!0}}}matchContext(e){if(!this.buffer)return uu(this.node,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let o=e.length-1,s=this.stack.length-1;o>=0;s--){if(s<0)return uu(this.node,e,o);let a=n[t.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[o]&&e[o]!=a.name)return!1;o--}}return!0}}function vh(r){return r.children.some(e=>e instanceof pn||!e.type.isAnonymous||vh(e))}function V2(r){var e;let{buffer:t,nodeSet:n,maxBufferLength:o=Hy,reused:s=[],minRepeatType:a=n.types.length}=r,l=Array.isArray(t)?new yh(t,t.length):t,c=n.types,d=0,u=0;function h(x,k,C,N,P,M){let{id:j,start:I,end:X,size:W}=l,te=u;for(;W<0;)if(l.next(),W==-1){let q=s[j];C.push(q),N.push(I-x);return}else if(W==-3){d=j;return}else if(W==-4){u=j;return}else throw new RangeError(`Unrecognized record size: ${W}`);let me=c[j],ke,Se,se=I-x;if(X-I<=o&&(Se=m(l.pos-k,P))){let q=new Uint16Array(Se.size-Se.skip),T=l.pos-Se.size,V=q.length;for(;l.pos>T;)V=v(Se.start,q,V);ke=new pn(q,X-Se.start,n),se=Se.start-x}else{let q=l.pos-W;l.next();let T=[],V=[],D=j>=a?j:-1,E=0,A=X;for(;l.pos>q;)D>=0&&l.id==D&&l.size>=0?(l.end<=A-o&&(y(T,V,I,E,l.end,A,D,te),E=T.length,A=l.end),l.next()):M>2500?f(I,q,T,V):h(I,q,T,V,D,M+1);if(D>=0&&E>0&&E<T.length&&y(T,V,I,E,I,A,D,te),T.reverse(),V.reverse(),D>-1&&E>0){let B=p(me);ke=bh(me,T,V,0,T.length,0,X-I,B,B)}else ke=g(me,T,V,X-I,te-X)}C.push(ke),N.push(se)}function f(x,k,C,N){let P=[],M=0,j=-1;for(;l.pos>k;){let{id:I,start:X,end:W,size:te}=l;if(te>4)l.next();else{if(j>-1&&X<j)break;j<0&&(j=W-o),P.push(I,X,W),M++,l.next()}}if(M){let I=new Uint16Array(M*4),X=P[P.length-2];for(let W=P.length-3,te=0;W>=0;W-=3)I[te++]=P[W],I[te++]=P[W+1]-X,I[te++]=P[W+2]-X,I[te++]=te;C.push(new pn(I,P[2]-X,n)),N.push(X-x)}}function p(x){return(k,C,N)=>{let P=0,M=k.length-1,j,I;if(M>=0&&(j=k[M])instanceof He){if(!M&&j.type==x&&j.length==N)return j;(I=j.prop(fe.lookAhead))&&(P=C[M]+j.length+I)}return g(x,k,C,N,P)}}function y(x,k,C,N,P,M,j,I){let X=[],W=[];for(;x.length>N;)X.push(x.pop()),W.push(k.pop()+C-P);x.push(g(n.types[j],X,W,M-P,I-M)),k.push(P-C)}function g(x,k,C,N,P=0,M){if(d){let j=[fe.contextHash,d];M=M?[j].concat(M):[j]}if(P>25){let j=[fe.lookAhead,P];M=M?[j].concat(M):[j]}return new He(x,k,C,N,M)}function m(x,k){let C=l.fork(),N=0,P=0,M=0,j=C.end-o,I={size:0,start:0,skip:0};e:for(let X=C.pos-x;C.pos>X;){let W=C.size;if(C.id==k&&W>=0){I.size=N,I.start=P,I.skip=M,M+=4,N+=4,C.next();continue}let te=C.pos-W;if(W<0||te<X||C.start<j)break;let me=C.id>=a?4:0,ke=C.start;for(C.next();C.pos>te;){if(C.size<0)if(C.size==-3)me+=4;else break e;else C.id>=a&&(me+=4);C.next()}P=ke,N+=W,M+=me}return(k<0||N==x)&&(I.size=N,I.start=P,I.skip=M),I.size>4?I:void 0}function v(x,k,C){let{id:N,start:P,end:M,size:j}=l;if(l.next(),j>=0&&N<a){let I=C;if(j>4){let X=l.pos-(j-4);for(;l.pos>X;)C=v(x,k,C)}k[--C]=I,k[--C]=M-x,k[--C]=P-x,k[--C]=N}else j==-3?d=N:j==-4&&(u=N);return C}let b=[],w=[];for(;l.pos>0;)h(r.start||0,r.bufferStart||0,b,w,-1,0);let S=(e=r.length)!==null&&e!==void 0?e:b.length?w[0]+b[0].length:0;return new He(c[r.topID],b.reverse(),w.reverse(),S)}const km=new WeakMap;function Xa(r,e){if(!r.isAnonymous||e instanceof pn||e.type!=r)return 1;let t=km.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=r||!(n instanceof He)){t=1;break}t+=Xa(r,n)}km.set(e,t)}return t}function bh(r,e,t,n,o,s,a,l,c){let d=0;for(let y=n;y<o;y++)d+=Xa(r,e[y]);let u=Math.ceil(d*1.5/8),h=[],f=[];function p(y,g,m,v,b){for(let w=m;w<v;){let S=w,x=g[w],k=Xa(r,y[w]);for(w++;w<v;w++){let C=Xa(r,y[w]);if(k+C>=u)break;k+=C}if(w==S+1){if(k>u){let C=y[S];p(C.children,C.positions,0,C.children.length,g[S]+b);continue}h.push(y[S])}else{let C=g[w-1]+y[w-1].length-x;h.push(bh(r,y,g,S,w,x,C,null,c))}f.push(x+b-s)}}return p(e,t,n,o,0),(l||c)(h,f,a)}class R2{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let o=this.map.get(e);o||this.map.set(e,o=new Map),o.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof mr?this.setBuffer(e.context.buffer,e.index,t):e instanceof at&&this.map.set(e.tree,t)}get(e){return e instanceof mr?this.getBuffer(e.context.buffer,e.index):e instanceof at?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Pr{constructor(e,t,n,o,s=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=o,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let o=[new Pr(0,e.length,e,0,!1,n)];for(let s of t)s.to>e.length&&o.push(s);return o}static applyChanges(e,t,n=128){if(!t.length)return e;let o=[],s=1,a=e.length?e[0]:null;for(let l=0,c=0,d=0;;l++){let u=l<t.length?t[l]:null,h=u?u.fromA:1e9;if(h-c>=n)for(;a&&a.from<h;){let f=a;if(c>=f.from||h<=f.to||d){let p=Math.max(f.from,c)-d,y=Math.min(f.to,h)-d;f=p>=y?null:new Pr(p,y,f.tree,f.offset+d,l>0,!!u)}if(f&&o.push(f),a.to>h)break;a=s<e.length?e[s++]:null}if(!u)break;c=u.toA,d=u.toA-u.toB}return o}}class Gy{startParse(e,t,n){return typeof e=="string"&&(e=new L2(e)),n=n?n.length?n.map(o=>new It(o.from,o.to)):[new It(0,0)]:[new It(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let o=this.startParse(e,t,n);for(;;){let s=o.advance();if(s)return s}}}class L2{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function j2(r){return(e,t,n,o)=>new q2(e,r,t,n,o)}class Sm{constructor(e,t,n,o,s){this.parser=e,this.parse=t,this.overlay=n,this.target=o,this.from=s}}function xm(r){if(!r.length||r.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(r))}class F2{constructor(e,t,n,o,s,a,l){this.parser=e,this.predicate=t,this.mounts=n,this.index=o,this.start=s,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const hu=new fe({perNode:!0});class q2{constructor(e,t,n,o,s){this.nest=t,this.input=n,this.fragments=o,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let o of this.inner)o.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new He(n.type,n.children,n.positions,n.length,n.propValues.concat([[hu,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[fe.mounted.id]=new ki(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new U2(this.fragments),t=null,n=null,o=new yl(new at(this.baseTree,this.ranges[0].from,0,null),exports.IterMode.IncludeAnonymous|exports.IterMode.IgnoreMounts);e:for(let s,a;;){let l=!0,c;if(this.stoppedAt!=null&&o.from>=this.stoppedAt)l=!1;else if(e.hasNode(o)){if(t){let d=t.mounts.find(u=>u.frag.from<=o.from&&u.frag.to>=o.to&&u.mount.overlay);if(d)for(let u of d.mount.overlay){let h=u.from+d.pos,f=u.to+d.pos;h>=o.from&&f<=o.to&&!t.ranges.some(p=>p.from<f&&p.to>h)&&t.ranges.push({from:h,to:f})}}l=!1}else if(n&&(a=z2(n.ranges,o.from,o.to)))l=a!=2;else if(!o.type.isAnonymous&&(s=this.nest(o,this.input))&&(o.from<o.to||!s.overlay)){o.tree||H2(o);let d=e.findMounts(o.from,s.parser);if(typeof s.overlay=="function")t=new F2(s.parser,s.overlay,d,this.inner.length,o.from,o.tree,t);else{let u=$m(this.ranges,s.overlay||(o.from<o.to?[new It(o.from,o.to)]:[]));u.length&&xm(u),(u.length||!s.overlay)&&this.inner.push(new Sm(s.parser,u.length?s.parser.startParse(this.input,_m(d,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(h=>new It(h.from-o.from,h.to-o.from)):null,o.tree,u.length?u[0].from:o.from)),s.overlay?u.length&&(n={ranges:u,depth:0,prev:n}):l=!1}}else t&&(c=t.predicate(o))&&(c===!0&&(c=new It(o.from,o.to)),c.from<c.to&&t.ranges.push(c));if(l&&o.firstChild())t&&t.depth++,n&&n.depth++;else for(;!o.nextSibling();){if(!o.parent())break e;if(t&&!--t.depth){let d=$m(this.ranges,t.ranges);d.length&&(xm(d),this.inner.splice(t.index,0,new Sm(t.parser,t.parser.startParse(this.input,_m(t.mounts,d),d),t.ranges.map(u=>new It(u.from-t.start,u.to-t.start)),t.target,d[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function z2(r,e,t){for(let n of r){if(n.from>=t)break;if(n.to>e)return n.from<=e&&n.to>=t?2:1}return 0}function Cm(r,e,t,n,o,s){if(e<t){let a=r.buffer[e+1];n.push(r.slice(e,t,a)),o.push(a-s)}}function H2(r){let{node:e}=r,t=[],n=e.context.buffer;do t.push(r.index),r.parent();while(!r.tree);let o=r.tree,s=o.children.indexOf(n),a=o.children[s],l=a.buffer,c=[s];function d(u,h,f,p,y,g){let m=t[g],v=[],b=[];Cm(a,u,m,v,b,p);let w=l[m+1],S=l[m+2];c.push(v.length);let x=g?d(m+4,l[m+3],a.set.types[l[m]],w,S-w,g-1):e.toTree();return v.push(x),b.push(w-p),Cm(a,l[m+3],h,v,b,p),new He(f,v,b,y)}o.children[s]=d(0,l.length,mt.none,0,a.length,t.length-1);for(let u of c){let h=r.tree.children[u],f=r.tree.positions[u];r.yield(new at(h,f+r.from,u,r._tree))}}class Em{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(exports.IterMode.IncludeAnonymous|exports.IterMode.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,exports.IterMode.IgnoreOverlays|exports.IterMode.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof He)t=t.children[0];else break}return!1}}class U2{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(hu))!==null&&t!==void 0?t:n.to,this.inner=new Em(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(hu))!==null&&e!==void 0?e:t.to,this.inner=new Em(t.tree,-t.offset)}}findMounts(e,t){var n;let o=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(n=s.tree)===null||n===void 0?void 0:n.prop(fe.mounted);if(a&&a.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let c=this.fragments[l];if(c.from>=s.to)break;c.tree==this.curFrag.tree&&o.push({frag:c,pos:s.from-c.offset,mount:a})}}}return o}}function $m(r,e){let t=null,n=e;for(let o=1,s=0;o<r.length;o++){let a=r[o-1].to,l=r[o].from;for(;s<n.length;s++){let c=n[s];if(c.from>=l)break;c.to<=a||(t||(n=t=e.slice()),c.from<a?(t[s]=new It(c.from,a),c.to>l&&t.splice(s+1,0,new It(l,c.to))):c.to>l?t[s--]=new It(l,c.to):t.splice(s--,1))}}return n}function K2(r,e,t,n){let o=0,s=0,a=!1,l=!1,c=-1e9,d=[];for(;;){let u=o==r.length?1e9:a?r[o].to:r[o].from,h=s==e.length?1e9:l?e[s].to:e[s].from;if(a!=l){let f=Math.max(c,t),p=Math.min(u,h,n);f<p&&d.push(new It(f,p))}if(c=Math.min(u,h),c==1e9)break;u==c&&(a?(a=!1,o++):a=!0),h==c&&(l?(l=!1,s++):l=!0)}return d}function _m(r,e){let t=[];for(let{pos:n,mount:o,frag:s}of r){let a=n+(o.overlay?o.overlay[0].from:0),l=a+o.tree.length,c=Math.max(s.from,a),d=Math.min(s.to,l);if(o.overlay){let u=o.overlay.map(f=>new It(f.from+n,f.to+n)),h=K2(e,u,c,d);for(let f=0,p=c;;f++){let y=f==h.length,g=y?d:h[f].from;if(g>p&&t.push(new Pr(p,g,o.tree,-a,s.from>=p||s.openStart,s.to<=g||s.openEnd)),y)break;p=h[f].to}}else t.push(new Pr(c,d,o.tree,-a,s.from>=a||s.openStart,s.to<=l||s.openEnd))}return t}let W2=0,Qr=class Jy{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=W2++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new Jy([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new vl;return t=>t.modified.indexOf(e)>-1?t:vl.get(t.base||t,t.modified.concat(e).sort((n,o)=>n.id-o.id))}},G2=0;class vl{constructor(){this.instances=[],this.id=G2++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(l=>l.base==e&&J2(t,l.modified));if(n)return n;let o=[],s=new Qr(o,e,t);for(let l of t)l.instances.push(s);let a=Y2(t);for(let l of e.set)if(!l.modified.length)for(let c of a)o.push(vl.get(l,c));return s}}function J2(r,e){return r.length==e.length&&r.every((t,n)=>t==e[n])}function Y2(r){let e=[[]];for(let t=0;t<r.length;t++)for(let n=0,o=e.length;n<o;n++)e.push(e[n].concat(r[t]));return e.sort((t,n)=>n.length-t.length)}function Yy(r){let e=Object.create(null);for(let t in r){let n=r[t];Array.isArray(n)||(n=[n]);for(let o of t.split(" "))if(o){let s=[],a=2,l=o;for(let h=0;;){if(l=="..."&&h>0&&h+3==o.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+o);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==o.length)break;let p=o[h++];if(h==o.length&&p=="!"){a=0;break}if(p!="/")throw new RangeError("Invalid path: "+o);l=o.slice(h)}let c=s.length-1,d=s[c];if(!d)throw new RangeError("Invalid path: "+o);let u=new bl(n,a,c>0?s.slice(0,c):null);e[d]=u.sort(e[d])}}return Xy.add(e)}const Xy=new fe;class bl{constructor(e,t,n,o){this.tags=e,this.mode=t,this.context=n,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}bl.empty=new bl([],2,null);function Qy(r,e){let t=Object.create(null);for(let s of r)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let a of s.tag)t[a.id]=s.class;let{scope:n,all:o=null}=e||{};return{style:s=>{let a=o;for(let l of s)for(let c of l.set){let d=t[c.id];if(d){a=a?a+" "+d:d;break}}return a},scope:n}}function X2(r,e){let t=null;for(let n of r){let o=n.style(e);o&&(t=t?t+" "+o:o)}return t}function Q2(r,e,t,n=0,o=r.length){let s=new Z2(n,Array.isArray(e)?e:[e],t);s.highlightRange(r.cursor(),n,o,"",s.highlighters),s.flush(o)}class Z2{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,o,s){let{type:a,from:l,to:c}=e;if(l>=n||c<=t)return;a.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(a)));let d=o,u=eC(e)||bl.empty,h=X2(s,u.tags);if(h&&(d&&(d+=" "),d+=h,u.mode==1&&(o+=(o?" ":"")+h)),this.startSpan(Math.max(t,l),d),u.opaque)return;let f=e.tree&&e.tree.prop(fe.mounted);if(f&&f.overlay){let p=e.node.enter(f.overlay[0].from+l,1),y=this.highlighters.filter(m=>!m.scope||m.scope(f.tree.type)),g=e.firstChild();for(let m=0,v=l;;m++){let b=m<f.overlay.length?f.overlay[m]:null,w=b?b.from+l:c,S=Math.max(t,v),x=Math.min(n,w);if(S<x&&g)for(;e.from<x&&(this.highlightRange(e,S,x,o,s),this.startSpan(Math.min(x,e.to),d),!(e.to>=w||!e.nextSibling())););if(!b||w>n)break;v=b.to+l,v>t&&(this.highlightRange(p.cursor(),Math.max(t,b.from+l),Math.min(n,v),"",y),this.startSpan(Math.min(n,v),d))}g&&e.parent()}else if(e.firstChild()){f&&(o="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,o,s),this.startSpan(Math.min(n,e.to),d)}while(e.nextSibling());e.parent()}}}function eC(r){let e=r.type.prop(Xy);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}const K=Qr.define,Sa=K(),Zr=K(),Nm=K(Zr),Am=K(Zr),en=K(),xa=K(en),ed=K(en),cr=K(),$n=K(cr),ar=K(),lr=K(),fu=K(),Ds=K(fu),Ca=K(),F={comment:Sa,lineComment:K(Sa),blockComment:K(Sa),docComment:K(Sa),name:Zr,variableName:K(Zr),typeName:Nm,tagName:K(Nm),propertyName:Am,attributeName:K(Am),className:K(Zr),labelName:K(Zr),namespace:K(Zr),macroName:K(Zr),literal:en,string:xa,docString:K(xa),character:K(xa),attributeValue:K(xa),number:ed,integer:K(ed),float:K(ed),bool:K(en),regexp:K(en),escape:K(en),color:K(en),url:K(en),keyword:ar,self:K(ar),null:K(ar),atom:K(ar),unit:K(ar),modifier:K(ar),operatorKeyword:K(ar),controlKeyword:K(ar),definitionKeyword:K(ar),moduleKeyword:K(ar),operator:lr,derefOperator:K(lr),arithmeticOperator:K(lr),logicOperator:K(lr),bitwiseOperator:K(lr),compareOperator:K(lr),updateOperator:K(lr),definitionOperator:K(lr),typeOperator:K(lr),controlOperator:K(lr),punctuation:fu,separator:K(fu),bracket:Ds,angleBracket:K(Ds),squareBracket:K(Ds),paren:K(Ds),brace:K(Ds),content:cr,heading:$n,heading1:K($n),heading2:K($n),heading3:K($n),heading4:K($n),heading5:K($n),heading6:K($n),contentSeparator:K(cr),list:K(cr),quote:K(cr),emphasis:K(cr),strong:K(cr),link:K(cr),monospace:K(cr),strikethrough:K(cr),inserted:K(),deleted:K(),changed:K(),invalid:K(),meta:Ca,documentMeta:K(Ca),annotation:K(Ca),processingInstruction:K(Ca),definition:Qr.defineModifier(),constant:Qr.defineModifier(),function:Qr.defineModifier(),standard:Qr.defineModifier(),local:Qr.defineModifier(),special:Qr.defineModifier()};Qy([{tag:F.link,class:"tok-link"},{tag:F.heading,class:"tok-heading"},{tag:F.emphasis,class:"tok-emphasis"},{tag:F.strong,class:"tok-strong"},{tag:F.keyword,class:"tok-keyword"},{tag:F.atom,class:"tok-atom"},{tag:F.bool,class:"tok-bool"},{tag:F.url,class:"tok-url"},{tag:F.labelName,class:"tok-labelName"},{tag:F.inserted,class:"tok-inserted"},{tag:F.deleted,class:"tok-deleted"},{tag:F.literal,class:"tok-literal"},{tag:F.string,class:"tok-string"},{tag:F.number,class:"tok-number"},{tag:[F.regexp,F.escape,F.special(F.string)],class:"tok-string2"},{tag:F.variableName,class:"tok-variableName"},{tag:F.local(F.variableName),class:"tok-variableName tok-local"},{tag:F.definition(F.variableName),class:"tok-variableName tok-definition"},{tag:F.special(F.variableName),class:"tok-variableName2"},{tag:F.definition(F.propertyName),class:"tok-propertyName tok-definition"},{tag:F.typeName,class:"tok-typeName"},{tag:F.namespace,class:"tok-namespace"},{tag:F.className,class:"tok-className"},{tag:F.macroName,class:"tok-macroName"},{tag:F.propertyName,class:"tok-propertyName"},{tag:F.operator,class:"tok-operator"},{tag:F.comment,class:"tok-comment"},{tag:F.meta,class:"tok-meta"},{tag:F.invalid,class:"tok-invalid"},{tag:F.punctuation,class:"tok-punctuation"}]);var td;const No=new fe;function Zy(r){return Z.define({combine:r?e=>e.concat(r):void 0})}const ev=new fe;class Gt{constructor(e,t,n=[],o=""){this.data=e,this.name=o,ve.prototype.hasOwnProperty("tree")||Object.defineProperty(ve.prototype,"tree",{get(){return mn(this)}}),this.parser=t,this.extension=[Jo.of(this),ve.languageData.of((s,a,l)=>{let c=Om(s,a,l),d=c.type.prop(No);if(!d)return[];let u=s.facet(d),h=c.type.prop(ev);if(h){let f=c.resolve(a-c.from,l);for(let p of h)if(p.test(f,s)){let y=s.facet(p.facet);return p.type=="replace"?y:y.concat(u)}}return u})].concat(n)}isActiveAt(e,t,n=-1){return Om(e,t,n).type.prop(No)==this.data}findRegions(e){let t=e.facet(Jo);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],o=(s,a)=>{if(s.prop(No)==this.data){n.push({from:a,to:a+s.length});return}let l=s.prop(fe.mounted);if(l){if(l.tree.prop(No)==this.data){if(l.overlay)for(let c of l.overlay)n.push({from:c.from+a,to:c.to+a});else n.push({from:a,to:a+s.length});return}else if(l.overlay){let c=n.length;if(o(l.tree,l.overlay[0].from+a),n.length>c)return}}for(let c=0;c<s.children.length;c++){let d=s.children[c];d instanceof He&&o(d,s.positions[c]+a)}};return o(mn(e),0),n}get allowsNesting(){return!0}}Gt.setState=We.define();function Om(r,e,t){let n=r.facet(Jo),o=mn(r).topNode;if(!n||n.allowsNesting)for(let s=o;s;s=s.enter(e,t,exports.IterMode.ExcludeBuffers))s.type.isTop&&(o=s);return o}class wl extends Gt{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=Zy(e.languageData);return new wl(t,e.parser.configure({props:[No.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new wl(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function mn(r){let e=r.field(Gt.state,!1);return e?e.tree:He.empty}class tC{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let Vs=null;class kl{constructor(e,t,n=[],o,s,a,l,c){this.parser=e,this.state=t,this.fragments=n,this.tree=o,this.treeLen=s,this.viewport=a,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new kl(e,t,[],He.empty,0,n,[],null)}startParse(){return this.parser.startParse(new tC(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=He.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let o=Date.now()+e;e=()=>Date.now()>o}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let o=this.parse.advance();if(o)if(this.fragments=this.withoutTempSkipped(Pr.addTree(o,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=o,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Pr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Vs;Vs=this;try{return e()}finally{Vs=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Tm(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:o,treeLen:s,viewport:a,skipped:l}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((d,u,h,f)=>c.push({fromA:d,toA:u,fromB:h,toB:f})),n=Pr.applyChanges(n,c),o=He.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){l=[];for(let d of this.skipped){let u=e.mapPos(d.from,1),h=e.mapPos(d.to,-1);u<h&&l.push({from:u,to:h})}}}return new kl(this.parser,t,n,o,s,a,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:o,to:s}=this.skipped[n];o<e.to&&s>e.from&&(this.fragments=Tm(this.fragments,o,s),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Gy{createParse(t,n,o){let s=o[0].from,a=o[o.length-1].to;return{parsedPos:s,advance(){let c=Vs;if(c){for(let d of o)c.tempSkipped.push(d);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=a,new He(mt.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Vs}}function Tm(r,e,t){return Pr.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}class Go{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new Go(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=kl.create(e.facet(Jo).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Go(n)}}Gt.state=qr.define({create:Go.init,update(r,e){for(let t of e.effects)if(t.is(Gt.setState))return t.value;return e.startState.facet(Jo)!=e.state.facet(Jo)?Go.init(e.state):r.apply(e)}});let tv=r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(tv=r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const rd=typeof navigator<"u"&&(!((td=navigator.scheduling)===null||td===void 0)&&td.isInputPending)?()=>navigator.scheduling.isInputPending():null,rC=Rt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Gt.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Gt.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=tv(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:o}}=this.view,s=n.field(Gt.state);if(s.tree==s.context.tree&&s.context.isDone(o+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!rd?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<o&&n.doc.length>o+1e3,c=s.context.work(()=>rd&&rd()||Date.now()>a,o+(l?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Gt.setState.of(new Go(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Br(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Jo=Z.define({combine(r){return r.length?r[0]:null},enables:r=>[Gt.state,rC,ue.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})]});class nC{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const oC=Z.define(),wh=Z.define({combine:r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e}});function rv(r){let e=r.facet(wh);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}function nv(r,e){let t="",n=r.tabSize,o=r.facet(wh)[0];if(o==" "){for(;e>=n;)t+=" ",e-=n;o=" "}for(let s=0;s<e;s++)t+=o;return t}function sC(r,e){r instanceof ve&&(r=new ov(r));for(let n of r.state.facet(oC)){let o=n(r,e);if(o!==void 0)return o}let t=mn(r.state);return t.length>=e?iC(r,t,e):null}class ov{constructor(e,t={}){this.state=e,this.options=t,this.unit=rv(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:s}=this.options;return o!=null&&o>=n.from&&o<=n.to?s&&o==e?{text:"",from:e}:(t<0?o<e:o<=e)?{text:n.text.slice(o-n.from),from:o}:{text:n.text.slice(0,o-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:o}=this.lineAt(e,t);return n.slice(e-o,Math.min(n.length,e+100-o))}column(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.countColumn(n,e-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(n,n.search(/\S|$/))),s}countColumn(e,t=e.length){return lh(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let a=s(o);if(a>-1)return a}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const sv=new fe;function iC(r,e,t){let n=e.resolveStack(t),o=n.node.enterUnfinishedNodesBefore(t);if(o!=n.node){let s=[];for(let a=o;a!=n.node;a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)n={node:s[a],next:n}}return iv(n,r,t)}function iv(r,e,t){for(let n=r;n;n=n.next){let o=lC(n.node);if(o)return o(kh.create(e,t,n))}return 0}function aC(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function lC(r){let e=r.type.prop(sv);if(e)return e;let t=r.firstChild,n;if(t&&(n=t.type.prop(fe.closedBy))){let o=r.lastChild,s=o&&n.indexOf(o.name)>-1;return a=>av(a,!0,1,void 0,s&&!aC(a)?o.from:void 0)}return r.parent==null?cC:null}function cC(){return 0}class kh extends ov{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new kh(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(dC(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return iv(this.context.next,this.base,this.pos)}}function dC(r,e){for(let t=e;t;t=t.parent)if(r==t)return!0;return!1}function uC(r){let e=r.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let o=r.options.simulateBreak,s=r.state.doc.lineAt(t.from),a=o==null||o<=s.from?s.to:Math.min(s.to,o);for(let l=t.to;;){let c=e.childAfter(l);if(!c||c==n)return null;if(!c.type.isSkipped)return c.from<a?t:null;l=c.to}}function hC({closing:r,align:e=!0,units:t=1}){return n=>av(n,e,t,r)}function av(r,e,t,n,o){let s=r.textAfter,a=s.match(/^\s*/)[0].length,l=n&&s.slice(a,a+n.length)==n||o==r.pos+a,c=e?uC(r):null;return c?l?r.column(c.from):r.column(c.to):r.baseIndent+(l?0:r.unit*t)}const fC=r=>r.baseIndent;function pC({except:r,units:e=1}={}){return t=>{let n=r&&r.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const mC=200;function gC(){return ve.transactionFilter.of(r=>{if(!r.docChanged||!r.isUserEvent("input.type")&&!r.isUserEvent("input.complete"))return r;let e=r.startState.languageDataAt("indentOnInput",r.startState.selection.main.head);if(!e.length)return r;let t=r.newDoc,{head:n}=r.newSelection.main,o=t.lineAt(n);if(n>o.from+mC)return r;let s=t.sliceString(o.from,n);if(!e.some(d=>d.test(s)))return r;let{state:a}=r,l=-1,c=[];for(let{head:d}of a.selection.ranges){let u=a.doc.lineAt(d);if(u.from==l)continue;l=u.from;let h=sC(a,u.from);if(h==null)continue;let f=/^\s*/.exec(u.text)[0],p=nv(a,h);f!=p&&c.push({from:u.from,to:u.from+f.length,insert:p})}return c.length?[r,{changes:c,sequential:!0}]:r})}const yC=new fe;function vC(r){let e=r.firstChild,t=r.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?r.to:t.from}:null}class Vi{constructor(e,t){this.specs=e;let n;function o(l){let c=un.newName();return(n||(n=Object.create(null)))["."+c]=l,c}const s=typeof t.all=="string"?t.all:t.all?o(t.all):void 0,a=t.scope;this.scope=a instanceof Gt?l=>l.prop(No)==a.data:a?l=>l==a:void 0,this.style=Qy(e.map(l=>({tag:l.tag,class:l.class||o(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=n?new un(n):null,this.themeType=t.themeType}static define(e,t){return new Vi(e,t||{})}}const pu=Z.define(),lv=Z.define({combine(r){return r.length?[r[0]]:null}});function nd(r){let e=r.facet(pu);return e.length?e:r.facet(lv)}function cv(r,e){let t=[wC],n;return r instanceof Vi&&(r.module&&t.push(ue.styleModule.of(r.module)),n=r.themeType),e!=null&&e.fallback?t.push(lv.of(r)):n?t.push(pu.computeN([ue.darkTheme],o=>o.facet(ue.darkTheme)==(n=="dark")?[r]:[])):t.push(pu.of(r)),t}class bC{constructor(e){this.markCache=Object.create(null),this.tree=mn(e.state),this.decorations=this.buildDeco(e,nd(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=mn(e.state),n=nd(e.state),o=n!=nd(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!o&&t.type==this.tree.type&&a>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Be.none;let n=new Ko;for(let{from:o,to:s}of e.visibleRanges)Q2(this.tree,t,(a,l,c)=>{n.add(a,l,this.markCache[c]||(this.markCache[c]=Be.mark({class:c})))},o,s);return n.finish()}}const wC=Kl.high(Rt.fromClass(bC,{decorations:r=>r.decorations})),kC=Vi.define([{tag:F.meta,color:"#404740"},{tag:F.link,textDecoration:"underline"},{tag:F.heading,textDecoration:"underline",fontWeight:"bold"},{tag:F.emphasis,fontStyle:"italic"},{tag:F.strong,fontWeight:"bold"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.keyword,color:"#708"},{tag:[F.atom,F.bool,F.url,F.contentSeparator,F.labelName],color:"#219"},{tag:[F.literal,F.inserted],color:"#164"},{tag:[F.string,F.deleted],color:"#a11"},{tag:[F.regexp,F.escape,F.special(F.string)],color:"#e40"},{tag:F.definition(F.variableName),color:"#00f"},{tag:F.local(F.variableName),color:"#30a"},{tag:[F.typeName,F.namespace],color:"#085"},{tag:F.className,color:"#167"},{tag:[F.special(F.variableName),F.macroName],color:"#256"},{tag:F.definition(F.propertyName),color:"#00c"},{tag:F.comment,color:"#940"},{tag:F.invalid,color:"#f00"}]),SC=ue.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),dv=1e4,uv="()[]{}",hv=Z.define({combine(r){return Gl(r,{afterCursor:!0,brackets:uv,maxScanDistance:dv,renderMatch:EC})}}),xC=Be.mark({class:"cm-matchingBracket"}),CC=Be.mark({class:"cm-nonmatchingBracket"});function EC(r){let e=[],t=r.matched?xC:CC;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}const $C=qr.define({create(){return Be.none},update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],n=e.state.facet(hv);for(let o of e.state.selection.ranges){if(!o.empty)continue;let s=Ea(e.state,o.head,-1,n)||o.head>0&&Ea(e.state,o.head-1,1,n)||n.afterCursor&&(Ea(e.state,o.head,1,n)||o.head<e.state.doc.length&&Ea(e.state,o.head+1,-1,n));s&&(t=t.concat(n.renderMatch(s,e.state)))}return Be.set(t,!0)},provide:r=>ue.decorations.from(r)}),_C=[$C,SC];function NC(r={}){return[hv.of(r),_C]}const fv=new fe;function mu(r,e,t){let n=r.prop(e<0?fe.openedBy:fe.closedBy);if(n)return n;if(r.name.length==1){let o=t.indexOf(r.name);if(o>-1&&o%2==(e<0?1:0))return[t[o+e]]}return null}function gu(r){let e=r.type.prop(fv);return e?e(r.node):r}function Ea(r,e,t,n={}){let o=n.maxScanDistance||dv,s=n.brackets||uv,a=mn(r),l=a.resolveInner(e,t);for(let c=l;c;c=c.parent){let d=mu(c.type,t,s);if(d&&c.from<c.to){let u=gu(c);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return AC(r,e,t,c,u,d,s)}}return OC(r,e,t,a,l.type,o,s)}function AC(r,e,t,n,o,s,a){let l=n.parent,c={from:o.from,to:o.to},d=0,u=l==null?void 0:l.cursor();if(u&&(t<0?u.childBefore(n.from):u.childAfter(n.to)))do if(t<0?u.to<=n.from:u.from>=n.to){if(d==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let h=gu(u);return{start:c,end:h?{from:h.from,to:h.to}:void 0,matched:!0}}else if(mu(u.type,t,a))d++;else if(mu(u.type,-t,a)){if(d==0){let h=gu(u);return{start:c,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}d--}}while(t<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function OC(r,e,t,n,o,s,a){let l=t<0?r.sliceDoc(e-1,e):r.sliceDoc(e,e+1),c=a.indexOf(l);if(c<0||c%2==0!=t>0)return null;let d={from:t<0?e-1:e,to:t>0?e+1:e},u=r.doc.iterRange(e,t>0?r.doc.length:0),h=0;for(let f=0;!u.next().done&&f<=s;){let p=u.value;t<0&&(f+=p.length);let y=e+f*t;for(let g=t>0?0:p.length-1,m=t>0?p.length:-1;g!=m;g+=t){let v=a.indexOf(p[g]);if(!(v<0||n.resolveInner(y+g,1).type!=o))if(v%2==0==t>0)h++;else{if(h==1)return{start:d,end:{from:y+g,to:y+g+1},matched:v>>1==c>>1};h--}}t>0&&(f+=p.length)}return u.done?{start:d,matched:!1}:null}const TC=Object.create(null),Bm=[mt.none],Pm=[],Im=Object.create(null),BC=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])BC[r]=PC(TC,e);function od(r,e){Pm.indexOf(r)>-1||(Pm.push(r),console.warn(e))}function PC(r,e){let t=[];for(let l of e.split(" ")){let c=[];for(let d of l.split(".")){let u=r[d]||F[d];u?typeof u=="function"?c.length?c=c.map(u):od(d,`Modifier ${d} used at start of tag`):c.length?od(d,`Tag ${d} used as modifier`):c=Array.isArray(u)?u:[u]:od(d,`Unknown highlighting tag ${d}`)}for(let d of c)t.push(d)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),o=n+" "+t.map(l=>l.id),s=Im[o];if(s)return s.id;let a=Im[o]=mt.define({id:Bm.length,name:n,props:[Yy({[n]:t})]});return Bm.push(a),a.id}exports.Direction.RTL,exports.Direction.LTR;var IC=r=>{var{theme:e,settings:t={},styles:n=[]}=r,o={".cm-gutters":{}},s={};t.background&&(s.backgroundColor=t.background),t.backgroundImage&&(s.backgroundImage=t.backgroundImage),t.foreground&&(s.color=t.foreground),(t.background||t.foreground)&&(o["&"]=s),t.fontFamily&&(o["&.cm-editor .cm-scroller"]={fontFamily:t.fontFamily}),t.gutterBackground&&(o[".cm-gutters"].backgroundColor=t.gutterBackground),t.gutterForeground&&(o[".cm-gutters"].color=t.gutterForeground),t.gutterBorder&&(o[".cm-gutters"].borderRightColor=t.gutterBorder),t.caret&&(o[".cm-content"]={caretColor:t.caret},o[".cm-cursor, .cm-dropCursor"]={borderLeftColor:t.caret});var a={};t.gutterActiveForeground&&(a.color=t.gutterActiveForeground),t.lineHighlight&&(o[".cm-activeLine"]={backgroundColor:t.lineHighlight},a.backgroundColor=t.lineHighlight),o[".cm-activeLineGutter"]=a,t.selection&&(o["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:t.selection+" !important"}),t.selectionMatch&&(o["& .cm-selectionMatch"]={backgroundColor:t.selectionMatch});var l=ue.theme(o,{dark:e==="dark"}),c=Vi.define(n),d=[l,cv(c)];return d};const MC=IC({theme:"light",settings:{background:"var(--scalar-background-2)",foreground:"var(--scalar-color-1)",caret:"var(--scalar-color-1)",selection:"rgba(151, 183, 205, 0.2)",selectionMatch:"#e3dcce",gutterBackground:"var(--scalar-background-2)",gutterForeground:"var(--scalar-color-3)",gutterBorder:"transparent",lineHighlight:"var(--scalar-background-3)",fontFamily:"var(--scalar-font-code)"},styles:[{tag:[F.standard(F.tagName),F.tagName],color:"var(--scalar-color-purple)"},{tag:[F.comment],color:"var(--scalar-color-3)"},{tag:[F.className],color:"var(--scalar-color-orange)"},{tag:[F.variableName,F.propertyName,F.attributeName],color:"var(--scalar-color-1)"},{tag:[F.operator],color:"var(--scalar-color-2)"},{tag:[F.keyword,F.typeName,F.typeOperator],color:"var(--scalar-color-green)"},{tag:[F.string],color:"var(--scalar-color-blue)"},{tag:[F.bracket,F.regexp,F.meta],color:"var(--scalar-color-3)"},{tag:[F.number],color:"var(--scalar-color-blue)"},{tag:[F.name,F.quote],color:"var(--scalar-color-3)"},{tag:[F.heading],color:"var(--scalar-color-3)",fontWeight:"bold"},{tag:[F.emphasis],color:"var(--scalar-color-3)",fontStyle:"italic"},{tag:[F.deleted],color:"var(--scalar-color-3)",backgroundColor:"transparent"},{tag:[F.atom,F.bool,F.special(F.variableName)],color:"var(--scalar-color-3)"},{tag:[F.url,F.escape,F.regexp,F.link],color:"var(--scalar-color-1)"},{tag:F.link,textDecoration:"underline"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.invalid,color:"var(--scalar-color-3)"}]}),Mm=new jy({regexp:/(\{[^}]+\})/g,decoration:()=>Be.mark({attributes:{class:"api-client-url-variable"}})}),DC=()=>Rt.fromClass(class{constructor(r){fp(this,"variables");this.variables=Mm.createDeco(r)}update(r){this.variables=Mm.updateDeco(r,this.variables)}},{decorations:r=>r.variables,provide:r=>ue.atomicRanges.of(e=>{var t;return((t=e.plugin(r))==null?void 0:t.variables)||Be.none})}),VC={class:"scalar-modal-layout modal-layout"},RC=i.defineComponent({__name:"FlowModal",props:{state:{},title:{},bodyClass:{},maxWidth:{},variant:{default:"normal"}},setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(Le.Dialog),{open:e.state.open,onClose:t[0]||(t[0]=n=>e.state.hide())},{default:i.withCtx(()=>[i.createElementVNode("div",VC,[i.createVNode(i.unref(Le.DialogPanel),{class:i.normalizeClass(["modal",{"modal-content-large":e.variant==="large","modal-content-normal":e.variant==="normal","modal-content-small":e.variant==="small","modal-content-search":e.variant==="search","modal-content-history":e.variant==="history"}]),style:i.normalizeStyle({maxWidth:e.maxWidth})},{default:i.withCtx(()=>[e.title?(i.openBlock(),i.createBlock(i.unref(Le.DialogTitle),{key:0,class:"modal-header"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.title),1)]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(Le.DialogDescription),{class:i.normalizeClass(["modal-body custom-scroll",[e.bodyClass]])},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"])]),_:3},8,["class","style"])])]),_:3},8,["open"]))}}),pv=U(RC,[["__scopeId","data-v-4aafbf68"]]),mv=()=>i.reactive({open:!1,show(){this.open=!0},hide(){this.open=!1}});function Qa(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}const gv=(r,e)=>{if(typeof e!="string"||!e.length)return r;const t=r.trim(),n=e.trim(),o=t.endsWith("/")?t:`${t}/`,s=n.startsWith("/")?n.slice(1):n;return[o,s].join("")};function yv(r){return typeof window>"u"?Buffer.from(r).toString("base64"):btoa(r)}const vv=r=>{const e=/(?:\{+)\s*(\w+)\s*(?:\}+)/g;return[...r.matchAll(e)].map(t=>t[1].trim())||[]};function LC(r){return!(!r||Array.isArray(r)&&!r.length||(r??[]).some(e=>!Object.keys(e).length))}function Sh(r,e){var c,d;const t=[],n=[],o=[];if(!r.customSecurity&&(!r.preferredSecurityScheme||!LC(e)))return{headers:t,queryString:n,cookies:o};const a=(e==null?void 0:e.some(u=>r.preferredSecurityScheme&&Object.keys(u).includes(r.preferredSecurityScheme)))||r.customSecurity?r.preferredSecurityScheme:Object.keys((e==null?void 0:e[0])??{}).pop(),l=(c=r.securitySchemes)==null?void 0:c[a??""];if(l){if("type"in l&&l.type==="apiKey"){if("in"in l&&l.in==="header"){const u=(d=r.apiKey.token)!=null&&d.length?r.apiKey.token:"YOUR_TOKEN";t.push({name:"name"in l?l.name:"",value:u})}else if("in"in l&&l.in==="cookie"){const u=r.apiKey.token.length?r.apiKey.token:"YOUR_TOKEN";o.push({name:l.name,value:u})}else if("in"in l&&l.in==="query"){const u=r.apiKey.token.length?r.apiKey.token:"YOUR_TOKEN";n.push({name:l.name,value:u})}}else if("type"in l&&(l.type==="http"||l.type==="basic")){if("type"in l&&(l.type==="basic"||l.type==="http"&&l.scheme==="basic")){const{username:u,password:h}=r.http.basic,f=xh(u,h);t.push({name:"Authorization",value:`Basic ${f}`.trim()})}else if("type"in l&&l.type==="http"&&l.scheme==="bearer"){const u=r.http.bearer.token.length?r.http.bearer.token:"YOUR_SECRET_TOKEN";t.push({name:"Authorization",value:`Bearer ${u}`})}}else if("type"in l&&l.type.toLowerCase()==="oauth2"){const u=r.oAuth2.accessToken||"YOUR_SECRET_TOKEN";t.push({name:"Authorization",value:`Bearer ${u}`})}}return{headers:t,queryString:n,cookies:o}}function xh(r,e){return r!=null&&r.length||e!=null&&e.length?yv(`${r}:${e}`):""}function bv(r){return[r.apiKey.token,r.http.bearer.token,r.oAuth2.accessToken,xh(r.http.basic.username,r.http.basic.password),r.http.basic.password].filter(Boolean)}function Ch(r,e){const t=/{{\s*([\w.-]+)\s*}}/g,n=/{\s*([\w.-]+)\s*}/g,o=(s,a)=>{var l;return typeof e=="function"?e(a):(l=e[a])==null?void 0:l.toString()};return r.replace(t,o).replace(n,o)}function xi(r){var o;const e=(o=r==null?void 0:r.servers)==null?void 0:o[r.selectedServer??0],t=r.variables.reduce((s,a)=>(s[a.name]=a.value,s),{});return typeof(e==null?void 0:e.url)=="string"?Ch(e==null?void 0:e.url,t):e==null?void 0:e.url}function wv(r,e){const t=new URL(e);return t.href=r,t.searchParams.append("scalar_url",e),t.toString()}const jC=Xe.useEventBus(Symbol());var FC=Object.defineProperty,qC=(r,e,t)=>e in r?FC(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,dt=(r,e,t)=>(qC(r,typeof e!="symbol"?e+"":e,t),t);function zC(r){if(!r||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}zC("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:20px;width:20px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;transition:opacity .4s,box-shadow .2s;z-index:100}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toast][data-theme=dark] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;opacity:0;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]{opacity:1}[data-sonner-toast]:focus [data-close-button]{opacity:1}[data-sonner-toast]:focus-within [data-close-button]{opacity:1}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:'';position:absolute;left:0;right:0;height:100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{display:none;transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}");let yu=1;class HC{constructor(){dt(this,"subscribers"),dt(this,"toasts"),dt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)})),dt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))}),dt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]}),dt(this,"create",e=>{var t;const{message:n,...o}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:yu++,a=this.toasts.findIndex(c=>c.id===s),l=e.dismissible===void 0?!0:e.dismissible;return a!==-1?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...e,id:s,title:n}),{...c,...e,id:s,dismissible:l,title:n}):c):this.addToast({title:n,...o,dismissible:l,id:s}),s}),dt(this,"dismiss",e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e)),dt(this,"message",(e,t)=>this.create({...t,message:e})),dt(this,"error",(e,t)=>this.create({...t,type:"error",message:e})),dt(this,"success",(e,t)=>this.create({...t,type:"success",message:e})),dt(this,"info",(e,t)=>this.create({...t,type:"info",message:e})),dt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e})),dt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e})),dt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading}));const o=e instanceof Promise?e:e();let s=n!==void 0;return o.then(a=>{if(t.success!==void 0){s=!1;const l=typeof t.success=="function"?t.success(a):t.success;this.create({id:n,type:"success",message:l})}}).catch(a=>{if(t.error!==void 0){s=!1;const l=typeof t.error=="function"?t.error(a):t.error;this.create({id:n,type:"error",message:l})}}).finally(()=>{var a;s&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),n}),dt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||yu++;return this.publish({...t,id:n,title:e}),n}),this.subscribers=[],this.toasts=[]}}const Ht=new HC,UC=(r,e)=>{const t=(e==null?void 0:e.id)||yu++;return Ht.publish({title:r,...e,id:t}),t},KC=UC,$a=Object.assign(KC,{success:Ht.success,info:Ht.info,warning:Ht.warning,error:Ht.error,custom:Ht.custom,message:Ht.message,promise:Ht.promise,dismiss:Ht.dismiss,loading:Ht.loading}),WC=["data-visible"],GC={className:"sonner-spinner"},JC=i.defineComponent({__name:"Loader",props:{visible:Boolean},setup(r){const e=Array(12).fill(0);return(t,n)=>(i.openBlock(),i.createElementBlock("div",{className:"sonner-loading-wrapper","data-visible":r.visible},[i.createElementVNode("div",GC,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(e),o=>(i.openBlock(),i.createElementBlock("div",{key:`spinner-bar-${o}`,className:"sonner-loading-bar"}))),128))])],8,WC))}}),Ri=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},YC={},XC={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},QC=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1),ZC=[QC];function eE(r,e){return i.openBlock(),i.createElementBlock("svg",XC,ZC)}const tE=Ri(YC,[["render",eE]]),rE={},nE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},oE=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1),sE=[oE];function iE(r,e){return i.openBlock(),i.createElementBlock("svg",nE,sE)}const aE=Ri(rE,[["render",iE]]),lE={},cE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},dE=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1),uE=[dE];function hE(r,e){return i.openBlock(),i.createElementBlock("svg",cE,uE)}const fE=Ri(lE,[["render",hE]]),pE={},mE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},gE=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1),yE=[gE];function vE(r,e){return i.openBlock(),i.createElementBlock("svg",mE,yE)}const bE=Ri(pE,[["render",vE]]),wE={},kE={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},SE=i.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),xE=i.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1),CE=[SE,xE];function EE(r,e){return i.openBlock(),i.createElementBlock("svg",kE,CE)}const $E=Ri(wE,[["render",EE]]),_E=["aria-live","data-styled","data-mounted","data-promise","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-type","data-invert","data-swipe-out","data-expanded"],NE=["data-disabled"],AE={key:1,"data-icon":""},OE={"data-content":""},TE={"data-title":""},BE=4e3,PE=14,IE=20,ME=200,DE=i.defineComponent({__name:"Toast",props:{toast:{},toasts:{},index:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},duration:{},descriptionClass:{}},emits:["update:heights","removeToast"],setup(r,{emit:e}){const t=B=>!!B.promise,n=e,o=r,s=i.ref(!1),a=i.ref(!1),l=i.ref(!1),c=i.ref(!1),d=i.ref(null),u=i.ref(0),h=i.ref(0),f=i.ref(null),p=i.ref(null),y=i.computed(()=>o.index===0),g=i.computed(()=>o.index+1<=o.visibleToasts),m=i.computed(()=>o.toast.type),v=i.computed(()=>o.toast.dismissible),b=o.toast.className||"",w=o.toast.descriptionClassName||"",S=o.toast.style||{},x=i.computed(()=>o.heights.findIndex(B=>B.toastId===o.toast.id)||0),k=i.computed(()=>o.toast.duration||o.duration||BE),C=i.ref(0),N=i.ref(0),P=i.ref(k.value),M=i.ref(0),j=i.ref(null),I=i.computed(()=>o.position.split("-")),X=i.computed(()=>I.value[0]),W=i.computed(()=>I.value[1]),te=i.computed(()=>o.heights.reduce((B,z,H)=>H>=x.value?B:B+z.height,0)),me=i.computed(()=>o.toast.invert||o.invert),ke=i.computed(()=>d.value==="loading"),Se=i.computed(()=>d.value??(o.toast.type||null)),se=i.computed(()=>!t(o.toast)&&typeof o.toast.title=="object"),q=i.computed(()=>{if(!t(o.toast))return null;switch(d.value){case"loading":return o.toast.loading;case"success":return typeof o.toast.success=="function"?f.value:o.toast.success;case"error":return typeof o.toast.error=="function"?f.value:o.toast.error;default:return null}});i.onMounted(()=>s.value=!0),i.watchEffect(()=>{N.value=x.value*PE+te.value});function T(){var B,z;(!ke.value||v.value)&&(V(),(z=(B=o.toast).onDismiss)==null||z.call(B,o.toast))}function V(){a.value=!0,u.value=N.value;const B=o.heights.filter(z=>z.toastId!==o.toast.id);n("update:heights",B),setTimeout(()=>{n("removeToast",o.toast)},ME)}const D=B=>{ke||(u.value=N.value,B.target.setPointerCapture(B.pointerId),B.target.tagName!=="BUTTON"&&(l.value=!0,j.value={x:B.clientX,y:B.clientY}))},E=B=>{var z,H,ie,oe;if(c.value)return;j.value=null;const ye=Number(((z=p.value)==null?void 0:z.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(ye)>=IE){u.value=N.value,(ie=(H=o.toast).onDismiss)==null||ie.call(H,o.toast),V(),c.value=!0;return}(oe=p.value)==null||oe.style.setProperty("--swipe-amount","0px"),l.value=!0},A=B=>{var z;if(!j.value)return;const H=B.clientY-j.value.y,ie=B.clientX-j.value.x,oe=(I.value[0]==="top"?Math.min:Math.max)(0,H),ye=B.pointerType==="touch"?10:2;Math.abs(oe)>ye?(z=p.value)==null||z.style.setProperty("--swipe-amount",`${H}px`):Math.abs(ie)>ye&&(j.value=null)};return i.watchEffect(B=>{if(o.toast.promise&&d.value==="loading"||o.toast.duration===1/0)return;let z;const H=()=>{if(M.value<C.value){const oe=new Date().getTime()-C.value;P.value=P.value-oe}M.value=new Date().getTime()},ie=()=>{C.value=new Date().getTime(),z=setTimeout(()=>{var oe,ye;(ye=(oe=o.toast).onAutoClose)==null||ye.call(oe,o.toast),V()},P.value)};o.expanded||o.interacting?H():ie(),B(()=>{clearTimeout(z)})}),i.onMounted(()=>{if(p.value){const B=p.value.getBoundingClientRect().height;h.value=B;const z=[{toastId:o.toast.id,height:B},...o.heights];n("update:heights",z)}}),i.onUnmounted(()=>{if(p.value){const B=o.heights.filter(z=>z.toastId!==o.toast.id);n("update:heights",B)}}),i.watchEffect(()=>{o.toast.delete&&V()}),(B,z)=>(i.openBlock(),i.createElementBlock("li",{"aria-live":B.toast.important?"assertive":"polite","aria-atomic":"",role:"status",tabindex:"0",ref_key:"toastRef",ref:p,"data-sonner-toast":"",class:i.normalizeClass(i.unref(b)),"data-styled":!se.value,"data-mounted":s.value,"data-promise":!!B.toast.promise,"data-removed":a.value,"data-visible":g.value,"data-y-position":X.value,"data-x-position":W.value,"data-index":o.index,"data-front":y.value,"data-swiping":l.value,"data-type":d.value!=="loading"&&d.value?d.value:m.value,"data-invert":me.value,"data-swipe-out":c.value,"data-expanded":!!(o.expanded||o.expandByDefault&&s.value),style:i.normalizeStyle({"--index":o.index,"--toasts-before":o.index,"--z-index":B.toasts.length-o.index,"--offset":`${a.value?u.value:N.value}px`,"--initial-height":o.expandByDefault?"auto":`${h.value}px`,...i.unref(S)}),onPointerdown:D,onPointerup:E,onPointermove:A},[o.closeButton&&!se.value?(i.openBlock(),i.createElementBlock("button",{key:0,"aria-label":"Close toast","data-close-button":"","data-disabled":ke.value,onClick:T},[i.createVNode($E)],8,NE)):i.createCommentVNode("",!0),m.value||B.toast.icon||B.toast.promise?(i.openBlock(),i.createElementBlock("div",AE,[typeof B.toast.promise=="function"||m.value==="loading"?(i.openBlock(),i.createBlock(JC,{key:0,visible:d.value==="loading"||m.value==="loading"},null,8,["visible"])):i.createCommentVNode("",!0),Se.value==="success"?(i.openBlock(),i.createBlock(tE,{key:1})):Se.value==="info"?(i.openBlock(),i.createBlock(aE,{key:2})):Se.value==="warning"?(i.openBlock(),i.createBlock(fE,{key:3})):Se.value==="error"?(i.openBlock(),i.createBlock(bE,{key:4})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",OE,[i.createElementVNode("div",TE,[typeof B.toast.title=="string"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(B.toast.title),1)],64)):B.toast.title===void 0||B.toast.title===null?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(q.value),1)],64)):se.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(B.toast.title),{key:2,onCloseToast:z[0]||(z[0]=()=>{var H;V(),(H=B.toast.cancel)!=null&&H.onClick&&B.toast.cancel.onClick()})},null,32)):i.createCommentVNode("",!0)]),B.toast.description?(i.openBlock(),i.createElementBlock("div",{key:0,"data-description":"",class:i.normalizeClass(B.descriptionClass+i.unref(w))},i.toDisplayString(B.toast.description),3)):i.createCommentVNode("",!0)]),B.toast.cancel?(i.openBlock(),i.createElementBlock("button",{key:2,"data-button":"","data-cancel":"",onClick:z[1]||(z[1]=()=>{var H;V(),(H=B.toast.cancel)!=null&&H.onClick&&B.toast.cancel.onClick()})},i.toDisplayString(B.toast.cancel.label),1)):i.createCommentVNode("",!0),B.toast.action?(i.openBlock(),i.createElementBlock("button",{key:3,"data-button":"",onClick:z[2]||(z[2]=()=>{var H;V(),(H=B.toast.action)==null||H.onClick()})},i.toDisplayString(B.toast.action.label),1)):i.createCommentVNode("",!0)],46,_E))}}),VE=["aria-label"],RE=["dir","data-theme","data-rich-colors","data-y-position","data-x-position"],LE=3,Dm="32px",jE=4e3,FE=356,Vm=14,qE=typeof window<"u"&&typeof document<"u",zE=i.defineComponent({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{default:jE},gap:{default:Vm},visibleToasts:{default:LE},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},className:{default:""},style:{default:()=>({})},offset:{default:Dm},dir:{default:"auto"}},setup(r){const e=r,t=i.useAttrs(),n=i.ref([]),o=i.ref([]),s=i.ref(!1),a=i.ref(!1),l=i.ref(e.theme!=="system"?e.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),c=i.computed(()=>e.position.split("-")),d=i.ref(null),u=e.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function h(p){n.value=n.value.filter(({id:y})=>y!==p.id)}function f(){if(typeof window>"u")return"ltr";const p=document.documentElement.getAttribute("dir");return p==="auto"||!p?window.getComputedStyle(document.documentElement).direction:p}return i.onMounted(()=>{const p=Ht.subscribe(y=>{if(y.dismiss){n.value=n.value.map(g=>g.id===y.id?{...g,delete:!0}:g);return}i.nextTick(()=>{const g=n.value.findIndex(m=>m.id===y.id);g!==-1?n.value.splice(g,1,y):n.value=[y,...n.value]})});i.onUnmounted(()=>{p()})}),i.watch(()=>e.theme,p=>{if(p!=="system"){l.value=p;return}p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?l.value="dark":l.value="light"),!(typeof window>"u")&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:y})=>{y?l.value="dark":l.value="light"})}),i.watchEffect(()=>{n.value.length<=1&&(s.value=!1)}),i.watchEffect(p=>{function y(g){var m,v;e.hotkey.every(b=>g[b]||g.code===b)&&(s.value=!0,(m=d.value)==null||m.focus()),g.code==="Escape"&&(document.activeElement===d.value||(v=d.value)!=null&&v.contains(document.activeElement))&&(s.value=!1)}qE&&(document.addEventListener("keydown",y),p(()=>{document.removeEventListener("keydown",y)}))}),(p,y)=>{var g;return i.openBlock(),i.createElementBlock("section",{"aria-label":`Notifications ${i.unref(u)}`,tabIndex:-1},[i.createElementVNode("ol",{ref_key:"listRef",ref:d,"data-sonner-toaster":"",dir:p.dir==="auto"?f():p.dir,tabIndex:-1,"data-theme":p.theme,"data-rich-colors":p.richColors,"data-y-position":c.value[0],"data-x-position":c.value[1],style:i.normalizeStyle({"--front-toast-height":`${(g=o.value[0])==null?void 0:g.height}px`,"--offset":typeof p.offset=="number"?`${p.offset}px`:p.offset||Dm,"--width":`${FE}px`,"--gap":`${Vm}px`,...i.unref(t).style}),onMouseenter:y[1]||(y[1]=m=>s.value=!0),onMousemove:y[2]||(y[2]=m=>s.value=!0),onMouseleave:y[3]||(y[3]=()=>{a.value||(s.value=!1)}),onPointerdown:y[4]||(y[4]=m=>a.value=!1),onPointerup:y[5]||(y[5]=m=>a.value=!1)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(m,v)=>{var b,w,S,x;return i.openBlock(),i.createBlock(DE,{key:m.id,index:v,toast:m,duration:((b=p.toastOptions)==null?void 0:b.duration)??p.duration,className:(w=p.toastOptions)==null?void 0:w.className,descriptionClassName:(S=p.toastOptions)==null?void 0:S.descriptionClassName,invert:p.invert,visibleToasts:p.visibleToasts,closeButton:p.closeButton,interacting:a.value,position:p.position,style:i.normalizeStyle((x=p.toastOptions)==null?void 0:x.style),toasts:n.value,expandByDefault:p.expand,gap:p.gap,expanded:s.value,heights:o.value,"onUpdate:heights":y[0]||(y[0]=k=>o.value=k),onRemoveToast:h},null,8,["index","toast","duration","className","descriptionClassName","invert","visibleToasts","closeButton","interacting","position","style","toasts","expandByDefault","gap","expanded","heights"])}),128))],44,RE)],8,VE)}}}),kv={toast:()=>null};function HE(r){kv.toast=r}function Eh(){return{initializeToasts:HE,toast:(r,e="info",t={timeout:3e3})=>{kv.toast(r,e,t)}}}const UE=i.defineComponent({__name:"ScalarToasts",setup(r){const e=i.ref(!1);i.onMounted(()=>e.value=!0);const t={success:$a.success,error:$a.error,warn:$a.warning,info:$a},{initializeToasts:n}=Eh();return n((o,s="info",a={})=>{(t[s]||t.info)(o,{duration:a.timeout||3e3,description:a.description})}),(o,s)=>e.value?(i.openBlock(),i.createBlock(i.unref(zE),{key:0,toastOptions:{className:"toaster"}})):i.createCommentVNode("",!0)}}),KE={},WE={class:"card-form"};function GE(r,e){return i.openBlock(),i.createElementBlock("form",WE,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const JE=U(KE,[["render",GE],["__scopeId","data-v-983db964"]]),YE=i.defineComponent({__name:"CardFormButton",setup(r,{expose:e}){const t=i.ref();return e({el:t}),(n,o)=>(i.openBlock(),i.createElementBlock("button",{ref_key:"el",ref:t,class:"card-form-button",type:"button"},[i.renderSlot(n.$slots,"default",{},void 0,!0)],512))}}),Sv=U(YE,[["__scopeId","data-v-d19add49"]]),XE={},QE={class:"card-form-group"};function ZE(r,e){return i.openBlock(),i.createElementBlock("div",QE,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Rs=U(XE,[["render",ZE],["__scopeId","data-v-c2b3e8ed"]]),e$={},t$={class:"card-form-rows"};function r$(r,e){return i.openBlock(),i.createElementBlock("div",t$,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Rm=U(e$,[["render",r$],["__scopeId","data-v-31dc20e9"]]);function xv(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(t=xv(r[e]))&&(n&&(n+=" "),n+=t);else for(e in r)r[e]&&(n&&(n+=" "),n+=e);return n}function sd(){for(var r,e,t=0,n="";t<arguments.length;)(r=arguments[t++])&&(e=xv(r))&&(n&&(n+=" "),n+=e);return n}const Lm=r=>typeof r=="boolean"?"".concat(r):r===0?"0":r,n$=r=>{const e=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l,c;return typeof(r==null||(l=r.hooks)===null||l===void 0?void 0:l["cx:done"])<"u"?r==null?void 0:r.hooks["cx:done"](sd(s)):typeof(r==null||(c=r.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?r==null?void 0:r.hooks.onComplete(sd(s)):sd(s)};return{compose:function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return l=>{const c=Object.fromEntries(Object.entries(l||{}).filter(d=>{let[u]=d;return!["class","className"].includes(u)}));return e(s.map(d=>d(c)),l==null?void 0:l.class,l==null?void 0:l.className)}},cva:o=>s=>{var a;if((o==null?void 0:o.variants)==null)return e(o==null?void 0:o.base,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:l,defaultVariants:c}=o,d=Object.keys(l).map(f=>{const p=s==null?void 0:s[f],y=c==null?void 0:c[f],g=Lm(p)||Lm(y);return l[f][g]}),u={...c,...s&&Object.entries(s).reduce((f,p)=>{let[y,g]=p;return typeof g>"u"?f:{...f,[y]:g}},{})},h=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((f,p)=>{let{class:y,className:g,...m}=p;return Object.entries(m).every(v=>{let[b,w]=v;const S=u[b];return Array.isArray(w)?w.includes(S):S===w})?[...f,y,g]:f},[]);return e(o==null?void 0:o.base,d,h,s==null?void 0:s.class,s==null?void 0:s.className)},cx:e}},$h="-";function o$(r){const e=i$(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;function o(a){const l=a.split($h);return l[0]===""&&l.length!==1&&l.shift(),Cv(l,e)||s$(a)}function s(a,l){const c=t[a]||[];return l&&n[a]?[...c,...n[a]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Cv(r,e){var a;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),o=n?Cv(r.slice(1),n):void 0;if(o)return o;if(e.validators.length===0)return;const s=r.join($h);return(a=e.validators.find(({validator:l})=>l(s)))==null?void 0:a.classGroupId}const jm=/^\[(.+)\]$/;function s$(r){if(jm.test(r)){const e=jm.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}}function i$(r){const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return l$(Object.entries(r.classGroups),t).forEach(([s,a])=>{vu(a,n,s,e)}),n}function vu(r,e,t,n){r.forEach(o=>{if(typeof o=="string"){const s=o===""?e:Fm(e,o);s.classGroupId=t;return}if(typeof o=="function"){if(a$(o)){vu(o(n),e,t,n);return}e.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,a])=>{vu(a,Fm(e,s),t,n)})})}function Fm(r,e){let t=r;return e.split($h).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t}function a$(r){return r.isThemeGetter}function l$(r,e){return e?r.map(([t,n])=>{const o=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,l])=>[e+a,l])):s);return[t,o]}):r}function c$(r){if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;function o(s,a){t.set(s,a),e++,e>r&&(e=0,n=t,t=new Map)}return{get(s){let a=t.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){t.has(s)?t.set(s,a):o(s,a)}}}const Ev="!";function d$(r){const e=r.separator,t=e.length===1,n=e[0],o=e.length;return function(a){const l=[];let c=0,d=0,u;for(let g=0;g<a.length;g++){let m=a[g];if(c===0){if(m===n&&(t||a.slice(g,g+o)===e)){l.push(a.slice(d,g)),d=g+o;continue}if(m==="/"){u=g;continue}}m==="["?c++:m==="]"&&c--}const h=l.length===0?a:a.substring(d),f=h.startsWith(Ev),p=f?h.substring(1):h,y=u&&u>d?u-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:y}}}function u$(r){if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e}function h$(r){return{cache:c$(r.cacheSize),splitModifiers:d$(r),...o$(r)}}const f$=/\s+/;function p$(r,e){const{splitModifiers:t,getClassGroupId:n,getConflictingClassGroupIds:o}=e,s=new Set;return r.trim().split(f$).map(a=>{const{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=t(a);let h=n(u?d.substring(0,u):d),f=!!u;if(!h){if(!u)return{isTailwindClass:!1,originalClassName:a};if(h=n(d),!h)return{isTailwindClass:!1,originalClassName:a};f=!1}const p=u$(l).join(":");return{isTailwindClass:!0,modifierId:c?p+Ev:p,classGroupId:h,originalClassName:a,hasPostfixModifier:f}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:l,classGroupId:c,hasPostfixModifier:d}=a,u=l+c;return s.has(u)?!1:(s.add(u),o(c,d).forEach(h=>s.add(l+h)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function m$(){let r=0,e,t,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=$v(e))&&(n&&(n+=" "),n+=t);return n}function $v(r){if(typeof r=="string")return r;let e,t="";for(let n=0;n<r.length;n++)r[n]&&(e=$v(r[n]))&&(t&&(t+=" "),t+=e);return t}function qm(r,...e){let t,n,o,s=a;function a(c){const d=e.reduce((u,h)=>h(u),r());return t=h$(d),n=t.cache.get,o=t.cache.set,s=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=p$(c,t);return o(c,u),u}return function(){return s(m$.apply(null,arguments))}}function Ne(r){const e=t=>t[r]||[];return e.isThemeGetter=!0,e}const _v=/^\[(?:([a-z-]+):)?(.+)\]$/i,g$=/^\d+\/\d+$/,y$=new Set(["px","full","screen"]),v$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,b$=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,w$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,k$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Er(r){return Vn(r)||y$.has(r)||g$.test(r)}function Hr(r){return ss(r,"length",O$)}function Vn(r){return!!r&&!Number.isNaN(Number(r))}function _a(r){return ss(r,"number",Vn)}function Ls(r){return!!r&&Number.isInteger(Number(r))}function x$(r){return r.endsWith("%")&&Vn(r.slice(0,-1))}function ce(r){return _v.test(r)}function Ur(r){return v$.test(r)}const C$=new Set(["length","size","percentage"]);function E$(r){return ss(r,C$,Nv)}function $$(r){return ss(r,"position",Nv)}const _$=new Set(["image","url"]);function N$(r){return ss(r,_$,B$)}function A$(r){return ss(r,"",T$)}function js(){return!0}function ss(r,e,t){const n=_v.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1}function O$(r){return b$.test(r)&&!w$.test(r)}function Nv(){return!1}function T$(r){return k$.test(r)}function B$(r){return S$.test(r)}function zm(){const r=Ne("colors"),e=Ne("spacing"),t=Ne("blur"),n=Ne("brightness"),o=Ne("borderColor"),s=Ne("borderRadius"),a=Ne("borderSpacing"),l=Ne("borderWidth"),c=Ne("contrast"),d=Ne("grayscale"),u=Ne("hueRotate"),h=Ne("invert"),f=Ne("gap"),p=Ne("gradientColorStops"),y=Ne("gradientColorStopPositions"),g=Ne("inset"),m=Ne("margin"),v=Ne("opacity"),b=Ne("padding"),w=Ne("saturate"),S=Ne("scale"),x=Ne("sepia"),k=Ne("skew"),C=Ne("space"),N=Ne("translate"),P=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ce,e],I=()=>[ce,e],X=()=>["",Er,Hr],W=()=>["auto",Vn,ce],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",ce],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[Vn,_a],V=()=>[Vn,ce];return{cacheSize:500,separator:":",theme:{colors:[js],spacing:[Er,Hr],blur:["none","",Ur,ce],brightness:T(),borderColor:[r],borderRadius:["none","","full",Ur,ce],borderSpacing:I(),borderWidth:X(),contrast:T(),grayscale:se(),hueRotate:V(),invert:se(),gap:I(),gradientColorStops:[r],gradientColorStopPositions:[x$,Hr],inset:j(),margin:j(),opacity:T(),padding:I(),saturate:T(),scale:T(),sepia:se(),skew:V(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ce]}],container:["container"],columns:[{columns:[Ur]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),ce]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ls,ce]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ce]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Ls,ce]}],"grid-cols":[{"grid-cols":[js]}],"col-start-end":[{col:["auto",{span:["full",Ls,ce]},ce]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[js]}],"row-start-end":[{row:["auto",{span:[Ls,ce]},ce]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ce]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Se()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Se(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Se(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ce,e]}],"min-w":[{"min-w":[ce,e,"min","max","fit"]}],"max-w":[{"max-w":[ce,e,"none","full","min","max","fit","prose",{screen:[Ur]},Ur]}],h:[{h:[ce,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ce,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ur,Hr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_a]}],"font-family":[{font:[js]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ce]}],"line-clamp":[{"line-clamp":["none",Vn,_a]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Er,ce]}],"list-image":[{"list-image":["none",ce]}],"list-style-type":[{list:["none","disc","decimal",ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Er,Hr]}],"underline-offset":[{"underline-offset":["auto",Er,ce]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),$$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",E$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},N$]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...me(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:me()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[Er,ce]}],"outline-w":[{outline:[Er,Hr]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Er,Hr]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",Ur,A$]}],"shadow-color":[{shadow:[js]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ke(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ke()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ur,ce]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ce]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ce]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Ls,ce]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ce]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[Er,Hr,_a]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function P$(r,{cacheSize:e,prefix:t,separator:n,extend:o={},override:s={}}){Za(r,"cacheSize",e),Za(r,"prefix",t),Za(r,"separator",n);for(const a in s)I$(r[a],s[a]);for(const a in o)M$(r[a],o[a]);return r}function Za(r,e,t){t!==void 0&&(r[e]=t)}function I$(r,e){if(e)for(const t in e)Za(r,t,e[t])}function M$(r,e){if(e)for(const t in e){const n=e[t];n!==void 0&&(r[t]=(r[t]||[]).concat(n))}}function D$(r,...e){return typeof r=="function"?qm(zm,r,...e):qm(()=>P$(zm(),r),...e)}const Sl=Math.min,Hn=Math.max,xl=Math.round,Na=Math.floor,gn=r=>({x:r,y:r}),V$={left:"right",right:"left",bottom:"top",top:"bottom"},R$={start:"end",end:"start"};function Hm(r,e,t){return Hn(r,Sl(e,t))}function Xl(r,e){return typeof r=="function"?r(e):r}function Xn(r){return r.split("-")[0]}function Ql(r){return r.split("-")[1]}function Av(r){return r==="x"?"y":"x"}function Ov(r){return r==="y"?"height":"width"}function Zl(r){return["top","bottom"].includes(Xn(r))?"y":"x"}function Tv(r){return Av(Zl(r))}function L$(r,e,t){t===void 0&&(t=!1);const n=Ql(r),o=Tv(r),s=Ov(o);let a=o==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Cl(a)),[a,Cl(a)]}function j$(r){const e=Cl(r);return[bu(r),e,bu(e)]}function bu(r){return r.replace(/start|end/g,e=>R$[e])}function F$(r,e,t){const n=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?o:n:e?n:o;case"left":case"right":return e?s:a;default:return[]}}function q$(r,e,t,n){const o=Ql(r);let s=F$(Xn(r),t==="start",n);return o&&(s=s.map(a=>a+"-"+o),e&&(s=s.concat(s.map(bu)))),s}function Cl(r){return r.replace(/left|right|bottom|top/g,e=>V$[e])}function z$(r){return{top:0,right:0,bottom:0,left:0,...r}}function H$(r){return typeof r!="number"?z$(r):{top:r,right:r,bottom:r,left:r}}function El(r){const{x:e,y:t,width:n,height:o}=r;return{width:n,height:o,top:t,left:e,right:e+n,bottom:t+o,x:e,y:t}}function Um(r,e,t){let{reference:n,floating:o}=r;const s=Zl(e),a=Tv(e),l=Ov(a),c=Xn(e),d=s==="y",u=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let p;switch(c){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-o.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Ql(e)){case"start":p[a]-=f*(t&&d?-1:1);break;case"end":p[a]+=f*(t&&d?-1:1);break}return p}const U$=async(r,e,t)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=t,l=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let d=await a.getElementRects({reference:r,floating:e,strategy:o}),{x:u,y:h}=Um(d,n,c),f=n,p={},y=0;for(let g=0;g<l.length;g++){const{name:m,fn:v}=l[g],{x:b,y:w,data:S,reset:x}=await v({x:u,y:h,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:d,platform:a,elements:{reference:r,floating:e}});u=b??u,h=w??h,p={...p,[m]:{...p[m],...S}},x&&y<=50&&(y++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(d=x.rects===!0?await a.getElementRects({reference:r,floating:e,strategy:o}):x.rects),{x:u,y:h}=Um(d,f,c)),g=-1)}return{x:u,y:h,placement:f,strategy:o,middlewareData:p}};async function Bv(r,e){var t;e===void 0&&(e={});const{x:n,y:o,platform:s,rects:a,elements:l,strategy:c}=r,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Xl(e,r),y=H$(p),m=l[f?h==="floating"?"reference":"floating":h],v=El(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(m)))==null||t?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),b=h==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},x=El(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:c}):b);return{top:(v.top-x.top+y.top)/S.y,bottom:(x.bottom-v.bottom+y.bottom)/S.y,left:(v.left-x.left+y.left)/S.x,right:(x.right-v.right+y.right)/S.x}}const K$=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:d}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...m}=Xl(r,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const v=Xn(o),b=Xn(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),S=f||(b||!g?[Cl(l)]:j$(l));!f&&y!=="none"&&S.push(...q$(l,g,y,w));const x=[l,...S],k=await Bv(e,m),C=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&C.push(k[v]),h){const I=L$(o,a,w);C.push(k[I[0]],k[I[1]])}if(N=[...N,{placement:o,overflows:C}],!C.every(I=>I<=0)){var P,M;const I=(((P=s.flip)==null?void 0:P.index)||0)+1,X=x[I];if(X)return{data:{index:I,overflows:N},reset:{placement:X}};let W=(M=N.filter(te=>te.overflows[0]<=0).sort((te,me)=>te.overflows[1]-me.overflows[1])[0])==null?void 0:M.placement;if(!W)switch(p){case"bestFit":{var j;const te=(j=N.map(me=>[me.placement,me.overflows.filter(ke=>ke>0).reduce((ke,Se)=>ke+Se,0)]).sort((me,ke)=>me[1]-ke[1])[0])==null?void 0:j[0];te&&(W=te);break}case"initialPlacement":W=l;break}if(o!==W)return{reset:{placement:W}}}return{}}}};async function W$(r,e){const{placement:t,platform:n,elements:o}=r,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Xn(t),l=Ql(t),c=Zl(t)==="y",d=["left","top"].includes(a)?-1:1,u=s&&c?-1:1,h=Xl(e,r);let{mainAxis:f,crossAxis:p,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof y=="number"&&(p=l==="end"?y*-1:y),c?{x:p*u,y:f*d}:{x:f*d,y:p*u}}const G$=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:o,y:s,placement:a,middlewareData:l}=e,c=await W$(e,r);return a===((t=l.offset)==null?void 0:t.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},J$=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:m=>{let{x:v,y:b}=m;return{x:v,y:b}}},...c}=Xl(r,e),d={x:t,y:n},u=await Bv(e,c),h=Zl(Xn(o)),f=Av(h);let p=d[f],y=d[h];if(s){const m=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[m],w=p-u[v];p=Hm(b,p,w)}if(a){const m=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=y+u[m],w=y-u[v];y=Hm(b,y,w)}const g=l.fn({...e,[f]:p,[h]:y});return{...g,data:{x:g.x-t,y:g.y-n}}}}};function Lr(r){return _h(r)?(r.nodeName||"").toLowerCase():"#document"}function $t(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function zr(r){var e;return(e=(_h(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function _h(r){return r instanceof Node||r instanceof $t(r).Node}function jr(r){return r instanceof Element||r instanceof $t(r).Element}function vr(r){return r instanceof HTMLElement||r instanceof $t(r).HTMLElement}function Km(r){return typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof $t(r).ShadowRoot}function Li(r){const{overflow:e,overflowX:t,overflowY:n,display:o}=Lt(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(o)}function Y$(r){return["table","td","th"].includes(Lr(r))}function Nh(r){const e=Ah(),t=Lt(r);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function X$(r){let e=Yo(r);for(;vr(e)&&!ec(e);){if(Nh(e))return e;e=Yo(e)}return null}function Ah(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ec(r){return["html","body","#document"].includes(Lr(r))}function Lt(r){return $t(r).getComputedStyle(r)}function tc(r){return jr(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function Yo(r){if(Lr(r)==="html")return r;const e=r.assignedSlot||r.parentNode||Km(r)&&r.host||zr(r);return Km(e)?e.host:e}function Pv(r){const e=Yo(r);return ec(e)?r.ownerDocument?r.ownerDocument.body:r.body:vr(e)&&Li(e)?e:Pv(e)}function Ci(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const o=Pv(r),s=o===((n=r.ownerDocument)==null?void 0:n.body),a=$t(o);return s?e.concat(a,a.visualViewport||[],Li(o)?o:[],a.frameElement&&t?Ci(a.frameElement):[]):e.concat(o,Ci(o,[],t))}function Iv(r){const e=Lt(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=vr(r),s=o?r.offsetWidth:t,a=o?r.offsetHeight:n,l=xl(t)!==s||xl(n)!==a;return l&&(t=s,n=a),{width:t,height:n,$:l}}function Oh(r){return jr(r)?r:r.contextElement}function Lo(r){const e=Oh(r);if(!vr(e))return gn(1);const t=e.getBoundingClientRect(),{width:n,height:o,$:s}=Iv(e);let a=(s?xl(t.width):t.width)/n,l=(s?xl(t.height):t.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Q$=gn(0);function Mv(r){const e=$t(r);return!Ah()||!e.visualViewport?Q$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Z$(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==$t(r)?!1:e}function Qn(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const o=r.getBoundingClientRect(),s=Oh(r);let a=gn(1);e&&(n?jr(n)&&(a=Lo(n)):a=Lo(r));const l=Z$(s,t,n)?Mv(s):gn(0);let c=(o.left+l.x)/a.x,d=(o.top+l.y)/a.y,u=o.width/a.x,h=o.height/a.y;if(s){const f=$t(s),p=n&&jr(n)?$t(n):n;let y=f,g=y.frameElement;for(;g&&n&&p!==y;){const m=Lo(g),v=g.getBoundingClientRect(),b=Lt(g),w=v.left+(g.clientLeft+parseFloat(b.paddingLeft))*m.x,S=v.top+(g.clientTop+parseFloat(b.paddingTop))*m.y;c*=m.x,d*=m.y,u*=m.x,h*=m.y,c+=w,d+=S,y=$t(g),g=y.frameElement}}return El({width:u,height:h,x:c,y:d})}const e_=[":popover-open",":modal"];function Dv(r){return e_.some(e=>{try{return r.matches(e)}catch{return!1}})}function t_(r){let{elements:e,rect:t,offsetParent:n,strategy:o}=r;const s=o==="fixed",a=zr(n),l=e?Dv(e.floating):!1;if(n===a||l&&s)return t;let c={scrollLeft:0,scrollTop:0},d=gn(1);const u=gn(0),h=vr(n);if((h||!h&&!s)&&((Lr(n)!=="body"||Li(a))&&(c=tc(n)),vr(n))){const f=Qn(n);d=Lo(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+u.x,y:t.y*d.y-c.scrollTop*d.y+u.y}}function r_(r){return Array.from(r.getClientRects())}function Vv(r){return Qn(zr(r)).left+tc(r).scrollLeft}function n_(r){const e=zr(r),t=tc(r),n=r.ownerDocument.body,o=Hn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Hn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Vv(r);const l=-t.scrollTop;return Lt(n).direction==="rtl"&&(a+=Hn(e.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:l}}function o_(r,e){const t=$t(r),n=zr(r),o=t.visualViewport;let s=n.clientWidth,a=n.clientHeight,l=0,c=0;if(o){s=o.width,a=o.height;const d=Ah();(!d||d&&e==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:l,y:c}}function s_(r,e){const t=Qn(r,!0,e==="fixed"),n=t.top+r.clientTop,o=t.left+r.clientLeft,s=vr(r)?Lo(r):gn(1),a=r.clientWidth*s.x,l=r.clientHeight*s.y,c=o*s.x,d=n*s.y;return{width:a,height:l,x:c,y:d}}function Wm(r,e,t){let n;if(e==="viewport")n=o_(r,t);else if(e==="document")n=n_(zr(r));else if(jr(e))n=s_(e,t);else{const o=Mv(r);n={...e,x:e.x-o.x,y:e.y-o.y}}return El(n)}function Rv(r,e){const t=Yo(r);return t===e||!jr(t)||ec(t)?!1:Lt(t).position==="fixed"||Rv(t,e)}function i_(r,e){const t=e.get(r);if(t)return t;let n=Ci(r,[],!1).filter(l=>jr(l)&&Lr(l)!=="body"),o=null;const s=Lt(r).position==="fixed";let a=s?Yo(r):r;for(;jr(a)&&!ec(a);){const l=Lt(a),c=Nh(a);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Li(a)&&!c&&Rv(r,a))?n=n.filter(u=>u!==a):o=l,a=Yo(a)}return e.set(r,n),n}function a_(r){let{element:e,boundary:t,rootBoundary:n,strategy:o}=r;const a=[...t==="clippingAncestors"?i_(e,this._c):[].concat(t),n],l=a[0],c=a.reduce((d,u)=>{const h=Wm(e,u,o);return d.top=Hn(h.top,d.top),d.right=Sl(h.right,d.right),d.bottom=Sl(h.bottom,d.bottom),d.left=Hn(h.left,d.left),d},Wm(e,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function l_(r){const{width:e,height:t}=Iv(r);return{width:e,height:t}}function c_(r,e,t){const n=vr(e),o=zr(e),s=t==="fixed",a=Qn(r,!0,s,e);let l={scrollLeft:0,scrollTop:0};const c=gn(0);if(n||!n&&!s)if((Lr(e)!=="body"||Li(o))&&(l=tc(e)),n){const h=Qn(e,!0,s,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}else o&&(c.x=Vv(o));const d=a.left+l.scrollLeft-c.x,u=a.top+l.scrollTop-c.y;return{x:d,y:u,width:a.width,height:a.height}}function Gm(r,e){return!vr(r)||Lt(r).position==="fixed"?null:e?e(r):r.offsetParent}function Lv(r,e){const t=$t(r);if(!vr(r)||Dv(r))return t;let n=Gm(r,e);for(;n&&Y$(n)&&Lt(n).position==="static";)n=Gm(n,e);return n&&(Lr(n)==="html"||Lr(n)==="body"&&Lt(n).position==="static"&&!Nh(n))?t:n||X$(r)||t}const d_=async function(r){const e=this.getOffsetParent||Lv,t=this.getDimensions;return{reference:c_(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,...await t(r.floating)}}};function u_(r){return Lt(r).direction==="rtl"}const h_={convertOffsetParentRelativeRectToViewportRelativeRect:t_,getDocumentElement:zr,getClippingRect:a_,getOffsetParent:Lv,getElementRects:d_,getClientRects:r_,getDimensions:l_,getScale:Lo,isElement:jr,isRTL:u_};function f_(r,e){let t=null,n;const o=zr(r);function s(){var l;clearTimeout(n),(l=t)==null||l.disconnect(),t=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:d,top:u,width:h,height:f}=r.getBoundingClientRect();if(l||e(),!h||!f)return;const p=Na(u),y=Na(o.clientWidth-(d+h)),g=Na(o.clientHeight-(u+f)),m=Na(d),b={rootMargin:-p+"px "+-y+"px "+-g+"px "+-m+"px",threshold:Hn(0,Sl(1,c))||1};let w=!0;function S(x){const k=x[0].intersectionRatio;if(k!==c){if(!w)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{t=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{t=new IntersectionObserver(S,b)}t.observe(r)}return a(!0),s}function p_(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Oh(r),u=o||s?[...d?Ci(d):[],...Ci(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",t,{passive:!0}),s&&v.addEventListener("resize",t)});const h=d&&l?f_(d,t):null;let f=-1,p=null;a&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===d&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),t()}),d&&!c&&p.observe(d),p.observe(e));let y,g=c?Qn(r):null;c&&m();function m(){const v=Qn(r);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&t(),g=v,y=requestAnimationFrame(m)}return t(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",t),s&&b.removeEventListener("resize",t)}),h==null||h(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(y)}}const m_=J$,g_=K$,y_=(r,e,t)=>{const n=new Map,o={platform:h_,...t},s={...o.platform,_c:n};return U$(r,e,{...o,platform:s})};function v_(r){return r!=null&&typeof r=="object"&&"$el"in r}function Jm(r){if(v_(r)){const e=r.$el;return _h(e)&&Lr(e)==="#comment"?null:e}return r}function jv(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Ym(r,e){const t=jv(r);return Math.round(e*t)/t}function b_(r,e,t){t===void 0&&(t={});const n=t.whileElementsMounted,o=i.computed(()=>{var C;return(C=i.unref(t.open))!=null?C:!0}),s=i.computed(()=>i.unref(t.middleware)),a=i.computed(()=>{var C;return(C=i.unref(t.placement))!=null?C:"bottom"}),l=i.computed(()=>{var C;return(C=i.unref(t.strategy))!=null?C:"absolute"}),c=i.computed(()=>{var C;return(C=i.unref(t.transform))!=null?C:!0}),d=i.computed(()=>Jm(r.value)),u=i.computed(()=>Jm(e.value)),h=i.ref(0),f=i.ref(0),p=i.ref(l.value),y=i.ref(a.value),g=i.shallowRef({}),m=i.ref(!1),v=i.computed(()=>{const C={position:p.value,left:"0",top:"0"};if(!u.value)return C;const N=Ym(u.value,h.value),P=Ym(u.value,f.value);return c.value?{...C,transform:"translate("+N+"px, "+P+"px)",...jv(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:N+"px",top:P+"px"}});let b;function w(){d.value==null||u.value==null||y_(d.value,u.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(C=>{h.value=C.x,f.value=C.y,p.value=C.strategy,y.value=C.placement,g.value=C.middlewareData,m.value=!0})}function S(){typeof b=="function"&&(b(),b=void 0)}function x(){if(S(),n===void 0){w();return}if(d.value!=null&&u.value!=null){b=n(d.value,u.value,w);return}}function k(){o.value||(m.value=!1)}return i.watch([s,a,l],w,{flush:"sync"}),i.watch([d,u],x,{flush:"sync"}),i.watch(o,k,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(S),{x:i.shallowReadonly(h),y:i.shallowReadonly(f),strategy:i.shallowReadonly(p),placement:i.shallowReadonly(y),middlewareData:i.shallowReadonly(g),isPositioned:i.shallowReadonly(m),floatingStyles:v,update:w}}const w_=D$({extend:{classGroups:{"font-size":["text-xxs"]}}}),{cva:Th,cx:io,compose:j4}=n$({hooks:{onComplete:r=>w_(r)}}),k_=i.createStaticVNode('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-47faceda></path>',5),S_={key:0,class:"circular-loader"},x_=i.defineComponent({__name:"ScalarLoading",props:{loadingState:{},size:{default:"24px"}},setup(r){return i.useCssVars(e=>({d6cae758:e.size})),(e,t)=>e.loadingState?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(io)("loader-wrapper"))},[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["svg-loader",{"icon-is-valid":e.loadingState.isValid,"icon-is-invalid":e.loadingState.isInvalid}]),viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[k_,e.loadingState.isLoading?(i.openBlock(),i.createElementBlock("g",S_,[i.createElementVNode("circle",{class:i.normalizeClass(["loader-path",{"loader-path-off":e.loadingState.isValid||e.loadingState.isInvalid}]),cx:"50",cy:"50",fill:"none",r:"20","stroke-width":"2"},null,2)])):i.createCommentVNode("",!0)],2))],2)):i.createCommentVNode("",!0)}}),C_=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},Fv=C_(x_,[["__scopeId","data-v-47faceda"]]),qv={solid:["scalar-button-solid","bg-back-btn-1 text-fore-btn-1 shadow-sm active:bg-back-btn-1 active:shadow-none hocus:bg-hover-btn-1"],outlined:["scalar-button-outlined","active:bg-btn-1 border border-solid border-border bg-transparent text-fore-1 hocus:bg-border"],ghost:["scalar-button-ghost","bg-transparent text-fore-3 transition-colors active:text-fore-1 hocus:text-fore-1"],danger:["scalar-button-danger","bg-error text-white active:brightness-90 hocus:brightness-90"]},E_=Th({base:"scalar-button row cursor-pointer items-center justify-center rounded font-medium",variants:{disabled:{true:"bg-background-2 text-color-3 cursor-not-allowed shadow-none"},fullWidth:{true:"w-full"},size:{sm:"px-2 py-1 text-xs",md:"h-10 px-6 text-sm"},variant:qv},compoundVariants:[{disabled:!0,variant:"ghost",class:"bg-transparent text-ghost"}]}),$_=["ariaDisabled","type"],__={key:0,class:"mr-2 h-4 w-4"},N_={key:1,class:"ml-2"},wu=i.defineComponent({inheritAttrs:!1,__name:"ScalarButton",props:{disabled:{type:Boolean},fullWidth:{type:Boolean,default:!1},loading:{},size:{default:"md"},variant:{default:"solid"},type:{default:"button"}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{class:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(e.value.rest,{ariaDisabled:t.disabled||void 0,class:i.unref(io)(i.unref(E_)({fullWidth:t.fullWidth,disabled:t.disabled,size:t.size,variant:t.variant}),{"pl-9 pr-3":t.loading},`${e.value.class}`),type:t.type}),[t.$slots.icon?(i.openBlock(),i.createElementBlock("div",__,[i.renderSlot(t.$slots,"icon")])):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default"),t.loading?(i.openBlock(),i.createElementBlock("div",N_,[i.createVNode(i.unref(Fv),{loadingState:t.loading,size:"20px"},null,8,["loadingState"])])):i.createCommentVNode("",!0)],16,$_))}});(function(r){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:t,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},t.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=n.variable[1].inside,a=0;a<o.length;a++)s[o[a]]=r.languages.bash[o[a]];r.languages.sh=r.languages.bash,r.languages.shell=r.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(){if(typeof Prism>"u"||typeof document>"u")return;var r="line-numbers",e=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(a,l){if(!(a.tagName!=="PRE"||!a.classList.contains(r))){var c=a.querySelector(".line-numbers-rows");if(c){var d=parseInt(a.getAttribute("data-start"),10)||1,u=d+(c.children.length-1);l<d&&(l=d),l>u&&(l=u);var h=l-d;return c.children[h]}}},resize:function(a){n([a])},assumeViewportIndependence:!0};function n(a){if(a=a.filter(function(c){var d=o(c),u=d["white-space"];return u==="pre-wrap"||u==="pre-line"}),a.length!=0){var l=a.map(function(c){var d=c.querySelector("code"),u=c.querySelector(".line-numbers-rows");if(!(!d||!u)){var h=c.querySelector(".line-numbers-sizer"),f=d.textContent.split(e);h||(h=document.createElement("span"),h.className="line-numbers-sizer",d.appendChild(h)),h.innerHTML="0",h.style.display="block";var p=h.getBoundingClientRect().height;return h.innerHTML="",{element:c,lines:f,lineHeights:[],oneLinerHeight:p,sizer:h}}}).filter(Boolean);l.forEach(function(c){var d=c.sizer,u=c.lines,h=c.lineHeights,f=c.oneLinerHeight;h[u.length-1]=void 0,u.forEach(function(p,y){if(p&&p.length>1){var g=d.appendChild(document.createElement("span"));g.style.display="block",g.textContent=p}else h[y]=f})}),l.forEach(function(c){for(var d=c.sizer,u=c.lineHeights,h=0,f=0;f<u.length;f++)u[f]===void 0&&(u[f]=d.children[h++].getBoundingClientRect().height)}),l.forEach(function(c){var d=c.sizer,u=c.element.querySelector(".line-numbers-rows");d.style.display="none",d.innerHTML="",c.lineHeights.forEach(function(h,f){u.children[f].style.height=h+"px"})})}}function o(a){return a?window.getComputedStyle?getComputedStyle(a):a.currentStyle||null:null}var s=void 0;window.addEventListener("resize",function(){t.assumeViewportIndependence&&s===window.innerWidth||(s=window.innerWidth,n(Array.prototype.slice.call(document.querySelectorAll("pre."+r))))}),Prism.hooks.add("complete",function(a){if(a.code){var l=a.element,c=l.parentNode;if(!(!c||!/pre/i.test(c.nodeName))&&!l.querySelector(".line-numbers-rows")&&Prism.util.isActive(l,r)){l.classList.remove(r),c.classList.add(r);var d=a.code.match(e),u=d?d.length+1:1,h,f=new Array(u+1).join("<span></span>");h=document.createElement("span"),h.setAttribute("aria-hidden","true"),h.className="line-numbers-rows",h.innerHTML=f,c.hasAttribute("data-start")&&(c.style.counterReset="linenumber "+(parseInt(c.getAttribute("data-start"),10)-1)),a.element.appendChild(h),n([c]),Prism.hooks.run("line-numbers",a)}}}),Prism.hooks.add("line-numbers",function(a){a.plugins=a.plugins||{},a.plugins.lineNumbers=!0})})();function A_(r){const e=new Set;return JSON.stringify(r,(t,n)=>{if(typeof n=="object"&&n!==null){if(e.has(n))return"[Circular]";e.add(n)}return n},2)}function Aa(r){if(typeof r=="string")return r;if(typeof r=="object")try{return JSON.stringify(r,null,2)}catch{return A_(r)}return r}const O_=["innerHTML"],Nr=i.defineComponent({__name:"ScalarCodeBlock",props:{content:{},lang:{default:"js"},lineNumbers:{type:Boolean,default:!1},hideCredentials:{}},setup(r){const e=r,t=Wu(Aa(e.content)),n=`components-scalar-code-block${t}`,{plugins:o,highlightElement:s}=Bs;e.hideCredentials&&Bs.hooks.add("wrap",function(h){if(!e.hideCredentials)return;let f=!1;typeof e.hideCredentials=="string"?h.content.includes(e.hideCredentials)&&(f=!0):Array.isArray(e.hideCredentials)&&(f=e.hideCredentials.some(p=>h.content.includes(p))),f&&(h.content=h.content.replace(/<span class="credentials">.*?<\/span>/g,p=>p.replace(/<span class="credentials">|<\/span>/g,"")),h.content=h.content.replace(new RegExp(typeof e.hideCredentials=="string"?e.hideCredentials:e.hideCredentials.join("|"),"g"),p=>`<span class="credentials">${p}</span>`))});const a=i.ref(null),l=i.ref(ts[n]??""),c=i.computed(()=>e.lang==="node"?"js":e.lang),d=e.lang;i.watch([()=>e.lang,()=>e.content,a],()=>{a.value&&e.content&&(!l.value||e.lang!==d)&&(l.value="",i.nextTick(()=>s(a.value)))},{immediate:!0});const u=/\n(?!$)/g;return i.onServerPrefetch(async()=>{let h="";e.lineNumbers&&Bs.hooks.add("after-tokenize",p=>{const y=p.code.match(u),g=y?y.length+1:1;h=`<span aria-hidden="true" class="line-numbers-rows">${new Array(g+1).join("<span></span>")}</span>`});const f=Bs.highlight(Aa(e.content),Bs.languages[c.value],c.value);if(l.value=f+h,t!==0){const p=i.useSSRContext();p.payload.data[n]=f+h}}),i.onMounted(async()=>{await Promise.resolve().then(()=>require("./prism-autoloader-Dlh8Vzlw--ejn04HW.cjs")),o.autoloader.languages_path="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/"}),(h,f)=>(i.openBlock(),i.createElementBlock("pre",{class:i.normalizeClass([`scalar-component scalar-codeblock-pre language-${c.value}`,{"line-numbers":h.lineNumbers}])},[l.value?(i.openBlock(),i.createElementBlock("code",{key:0,class:i.normalizeClass(`scalar-codeblock-code language-${c.value}`),innerHTML:i.unref(Aa)(l.value)},null,10,O_)):(i.openBlock(),i.createElementBlock("code",{key:1,ref_key:"el",ref:a,class:i.normalizeClass(`scalar-codeblock-code language-${c.value}`)},i.toDisplayString(i.unref(Aa)(h.content)),3))],2))}}),Xm=Object.assign({"./Add.svg":()=>Promise.resolve().then(()=>require("./Add-ngyZgYXx-CWPoroGU.cjs")),"./ArrowLeft.svg":()=>Promise.resolve().then(()=>require("./ArrowLeft-aY17W2aS-B48Wrva9.cjs")),"./ArrowRight.svg":()=>Promise.resolve().then(()=>require("./ArrowRight-DEMtdoE7-BVEqp3bA.cjs")),"./Background.svg":()=>Promise.resolve().then(()=>require("./Background-DcRhSHgf-7l5O3oYH.cjs")),"./Brackets.svg":()=>Promise.resolve().then(()=>require("./Brackets-4I8OKomf-C2VxZ6iW.cjs")),"./Branch.svg":()=>Promise.resolve().then(()=>require("./Branch-CXwj8YuG-xolS1YAY.cjs")),"./CallToAction.svg":()=>Promise.resolve().then(()=>require("./CallToAction-EyQKkvbg-Eo_9FsiI.cjs")),"./Checkmark.svg":()=>Promise.resolve().then(()=>require("./Checkmark-De7nq6cG-tp1nTP9w.cjs")),"./ChevronDown.svg":()=>Promise.resolve().then(()=>require("./ChevronDown-Co7EAKAv-BMVIms1W.cjs")),"./ChevronLeft.svg":()=>Promise.resolve().then(()=>require("./ChevronLeft-DYt0idAu-DgJ680do.cjs")),"./ChevronRight.svg":()=>Promise.resolve().then(()=>require("./ChevronRight-ylxToVWl-BVcmudpo.cjs")),"./ChevronUp.svg":()=>Promise.resolve().then(()=>require("./ChevronUp-xAnukIfj-BRXM2fAN.cjs")),"./Clipboard.svg":()=>Promise.resolve().then(()=>require("./Clipboard-CU_KxGEv-jXeM-Shn.cjs")),"./Close.svg":()=>Promise.resolve().then(()=>require("./Close-CW3z42qZ-CAmO5dZ5.cjs")),"./CodeFolder.svg":()=>Promise.resolve().then(()=>require("./CodeFolder-Cv_igzJE-Dl4HVTRL.cjs")),"./Cookie.svg":()=>Promise.resolve().then(()=>require("./Cookie-CEHvXpqB-BCUOR3DZ.cjs")),"./DarkMode.svg":()=>Promise.resolve().then(()=>require("./DarkMode-CBsV8Q_I-KODSbuOz.cjs")),"./Delete.svg":()=>Promise.resolve().then(()=>require("./Delete-BCZmxrDD-C-UeHTm2.cjs")),"./Discord.svg":()=>Promise.resolve().then(()=>require("./Discord-BHYOFBB2-BzF4Z2zQ.cjs")),"./DocsPage.svg":()=>Promise.resolve().then(()=>require("./DocsPage-rh2xwxKN-EMPYZ-u6.cjs")),"./Duplicate.svg":()=>Promise.resolve().then(()=>require("./Duplicate-BPlzNpcf-Uk5uZ5gd.cjs")),"./Edit.svg":()=>Promise.resolve().then(()=>require("./Edit-Br04RNYb-bn7B8ziL.cjs")),"./Ellipses.svg":()=>Promise.resolve().then(()=>require("./Ellipses-Bo_X36Hx-1Rf8jX_Q.cjs")),"./Error.svg":()=>Promise.resolve().then(()=>require("./Error-B_RGtWJI-kZYauS2f.cjs")),"./ExternalLink.svg":()=>Promise.resolve().then(()=>require("./ExternalLink-DK8L-EH7-BZtIWcdg.cjs")),"./FilterList.svg":()=>Promise.resolve().then(()=>require("./FilterList-CsAcE9em-CSRdO8He.cjs")),"./Folder.svg":()=>Promise.resolve().then(()=>require("./Folder-Cdcj4evh-JrdpqKfO.cjs")),"./GitHub.svg":()=>Promise.resolve().then(()=>require("./GitHub-NdE6Zs9k-CDcqenD_.cjs")),"./Hide.svg":()=>Promise.resolve().then(()=>require("./Hide-DBLY4PPo-Ch-56g-E.cjs")),"./History.svg":()=>Promise.resolve().then(()=>require("./History-D9nmhNIn-C8K3DZOi.cjs")),"./JsonObject.svg":()=>Promise.resolve().then(()=>require("./JsonObject-hGdHUQ4M-DEiEsxEM.cjs")),"./Key.svg":()=>Promise.resolve().then(()=>require("./Key-CWXJqX28-D85Imfdm.cjs")),"./Leave.svg":()=>Promise.resolve().then(()=>require("./Leave-K1J3uwoG-COzffJei.cjs")),"./LightDarkModeToggle.svg":()=>Promise.resolve().then(()=>require("./LightDarkModeToggle-BkvMimDa-D2TvUWMc.cjs")),"./LightMode.svg":()=>Promise.resolve().then(()=>require("./LightMode-Btz6vyT_-BTswDMO7.cjs")),"./Link.svg":()=>Promise.resolve().then(()=>require("./Link-Bzuc__Nc-C0VSCFw-.cjs")),"./Lock.svg":()=>Promise.resolve().then(()=>require("./Lock-xhiH1mKz-sEHw9FoO.cjs")),"./Logo.svg":()=>Promise.resolve().then(()=>require("./Logo-mtzeKD8M-BPvZdgPX.cjs")),"./LogoAPI.svg":()=>Promise.resolve().then(()=>require("./LogoAPI-CaU5E6FK-H9aWX-Pj.cjs")),"./LogoClient.svg":()=>Promise.resolve().then(()=>require("./LogoClient-DdC-t_7P-CN0J-Vs6.cjs")),"./LogoMarket.svg":()=>Promise.resolve().then(()=>require("./LogoMarket-DwlApcab-C3B4miZm.cjs")),"./LogoSwagger.svg":()=>Promise.resolve().then(()=>require("./LogoSwagger-CH60H5qW-56_9U30I.cjs")),"./Magic.svg":()=>Promise.resolve().then(()=>require("./Magic-Dsi9_bEc-Bz81CcSu.cjs")),"./Menu.svg":()=>Promise.resolve().then(()=>require("./Menu-CFK5cOsm-B_mqCQj6.cjs")),"./Page.svg":()=>Promise.resolve().then(()=>require("./Page-B7rVuhpl-DfOGMkFM.cjs")),"./PaperAirplane.svg":()=>Promise.resolve().then(()=>require("./PaperAirplane-BC-4mGEB-CUmTyNIM.cjs")),"./Payment.svg":()=>Promise.resolve().then(()=>require("./Payment-hzcXP1Xb-DA7pQdWt.cjs")),"./Play.svg":()=>Promise.resolve().then(()=>require("./Play-BrVagRQA-DwHMdiTR.cjs")),"./Refresh.svg":()=>Promise.resolve().then(()=>require("./Refresh-Be6vHEEi-CbpDdpiC.cjs")),"./Response.svg":()=>Promise.resolve().then(()=>require("./Response-Dq9pM-ZU-C6e6VGNi.cjs")),"./Search.svg":()=>Promise.resolve().then(()=>require("./Search-DqtlswRG-Cn8bmF-2.cjs")),"./Show.svg":()=>Promise.resolve().then(()=>require("./Show-CMsTZAgT-C7wHpN2M.cjs")),"./SideBarClosed.svg":()=>Promise.resolve().then(()=>require("./SideBarClosed-CYUNS2XM-BrkKCJbJ.cjs")),"./SideBarOpen.svg":()=>Promise.resolve().then(()=>require("./SideBarOpen-BOxW49_U-1NTFL81x.cjs")),"./Sort.svg":()=>Promise.resolve().then(()=>require("./Sort-oTjBhJFQ-ClKvQJ9G.cjs")),"./Terminal.svg":()=>Promise.resolve().then(()=>require("./Terminal-CKp--su5-B0pjt_Yz.cjs")),"./ThumbsDown.svg":()=>Promise.resolve().then(()=>require("./ThumbsDown-BMgnsASL-C-sKah3X.cjs")),"./ThumbsUp.svg":()=>Promise.resolve().then(()=>require("./ThumbsUp-C1j6zY2j-CBEvfE8L.cjs")),"./Trash.svg":()=>Promise.resolve().then(()=>require("./Trash-BpA3zWPD-C-UeHTm2.cjs")),"./Unlock.svg":()=>Promise.resolve().then(()=>require("./Unlock-CY8UqJoE-C46tGVrb.cjs")),"./Upload.svg":()=>Promise.resolve().then(()=>require("./Upload-REIdL7RI-C6EgO_Ra.cjs")),"./User.svg":()=>Promise.resolve().then(()=>require("./User-Df5svMQ3-BzQcMZ_8.cjs")),"./programming-framework-angular.svg":()=>Promise.resolve().then(()=>require("./programming-framework-angular-DD4Vjgbk-BVT4AoJo.cjs")),"./programming-framework-astro.svg":()=>Promise.resolve().then(()=>require("./programming-framework-astro-CLfrRt19-CWwhfV7_.cjs")),"./programming-framework-laravel.svg":()=>Promise.resolve().then(()=>require("./programming-framework-laravel-kAy2wVLy-C3EZCsGC.cjs")),"./programming-framework-nextdotjs.svg":()=>Promise.resolve().then(()=>require("./programming-framework-nextdotjs-BKdd_DY_-DdOe6YSk.cjs")),"./programming-framework-react.svg":()=>Promise.resolve().then(()=>require("./programming-framework-react-PDgmtZuN-4I-M6WEO.cjs")),"./programming-framework-vuedotjs.svg":()=>Promise.resolve().then(()=>require("./programming-framework-vuedotjs-Cv46W2aB-CSjgwP_a.cjs")),"./programming-language-c.svg":()=>Promise.resolve().then(()=>require("./programming-language-c-hPGu2Zvg-DS__u0q2.cjs")),"./programming-language-clojure.svg":()=>Promise.resolve().then(()=>require("./programming-language-clojure-Cvmzky8x-DNGq1StI.cjs")),"./programming-language-csharp.svg":()=>Promise.resolve().then(()=>require("./programming-language-csharp-lqX1oWgb-CxB0WO6j.cjs")),"./programming-language-css3.svg":()=>Promise.resolve().then(()=>require("./programming-language-css3-Dpp4Cr6b-BpPnE1ET.cjs")),"./programming-language-go.svg":()=>Promise.resolve().then(()=>require("./programming-language-go-DoJxWwT6-Cglob461.cjs")),"./programming-language-html5.svg":()=>Promise.resolve().then(()=>require("./programming-language-html5-DlqJK4EL-DFJ6lim3.cjs")),"./programming-language-http.svg":()=>Promise.resolve().then(()=>require("./programming-language-http-wMYwFS1I-CibNNxob.cjs")),"./programming-language-java.svg":()=>Promise.resolve().then(()=>require("./programming-language-java-BCxG2T_w-CK_n5AN7.cjs")),"./programming-language-javascript.svg":()=>Promise.resolve().then(()=>require("./programming-language-javascript-VxLvi1QG-CaGGjM9H.cjs")),"./programming-language-json.svg":()=>Promise.resolve().then(()=>require("./programming-language-json-vEX_g7Zi-DzQJGa14.cjs")),"./programming-language-kotlin.svg":()=>Promise.resolve().then(()=>require("./programming-language-kotlin-DKV8vP9h-DlGiFCvD.cjs")),"./programming-language-node.svg":()=>Promise.resolve().then(()=>require("./programming-language-node-Xsgx38lm-4rntKdSG.cjs")),"./programming-language-objc.svg":()=>Promise.resolve().then(()=>require("./programming-language-objc-BQXSOBsX-ChHn3rog.cjs")),"./programming-language-ocaml.svg":()=>Promise.resolve().then(()=>require("./programming-language-ocaml-BEz7gGv7-pjGiVCW2.cjs")),"./programming-language-php.svg":()=>Promise.resolve().then(()=>require("./programming-language-php-GY38f8r4-ahFMWcim.cjs")),"./programming-language-powershell.svg":()=>Promise.resolve().then(()=>require("./programming-language-powershell-C9DkSp36-RwdG5MCL.cjs")),"./programming-language-python.svg":()=>Promise.resolve().then(()=>require("./programming-language-python-Ct-_kNjo-ujN06OXX.cjs")),"./programming-language-r.svg":()=>Promise.resolve().then(()=>require("./programming-language-r-BGoKwua9-DynRqt7q.cjs")),"./programming-language-ruby.svg":()=>Promise.resolve().then(()=>require("./programming-language-ruby-DhdM4d7g-DFwAUdk6.cjs")),"./programming-language-scala.svg":()=>Promise.resolve().then(()=>require("./programming-language-scala-BVg0dToJ-Dhg_XTFe.cjs")),"./programming-language-shell.svg":()=>Promise.resolve().then(()=>require("./programming-language-shell-BsTa1xI7-CEpfIQQF.cjs")),"./programming-language-swift.svg":()=>Promise.resolve().then(()=>require("./programming-language-swift-Dn72xPjg-DtICVxss.cjs")),"./programming-language-typescript.svg":()=>Promise.resolve().then(()=>require("./programming-language-typescript-CdF-HuRi-jq2P_J1a.cjs")),"./programming-script-code.svg":()=>Promise.resolve().then(()=>require("./programming-script-code-DQN1veb2-DWnN18iL.cjs")),"./programming-tool-git.svg":()=>Promise.resolve().then(()=>require("./programming-tool-git-DDnQ1zGD-Bi0r1H3m.cjs")),"./programming-tool-tailwindcss.svg":()=>Promise.resolve().then(()=>require("./programming-tool-tailwindcss-xjXi0E6g-CpFF5bAj.cjs"))}),Qm=r=>{const e=`./${r}.svg`;return Xm[e]?i.defineAsyncComponent(Xm[e]):(console.warn(`Could not find icon: ${r}`),null)},T_=["src"],Me=i.defineComponent({__name:"ScalarIcon",props:{icon:{},size:{}},setup(r){const e=r,t=Th({variants:{size:{xs:"size-3 stroke-[1.4]",sm:"size-3.5 stroke-[1.2]",md:"size-4 stroke-[1.1]",lg:"size-5",xl:"size-6 stroke-[0.96]","2xl":"size-8 stroke-[0.92]","3xl":"size-10 stroke-[0.9]",full:"size-full"}},defaultVariants:{size:"full"}}),n=Qm(e.icon);return(o,s)=>i.unref(n)?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(Qm)(o.icon)),{key:0,class:i.normalizeClass(i.unref(io)("scalar-icon",i.unref(t)({size:o.size})))},null,8,["class"])):(i.openBlock(),i.createElementBlock("img",{key:1,src:o.icon},null,8,T_))}}),B_=["ariaDisabled"],P_={class:"sr-only"},ji=i.defineComponent({__name:"ScalarIconButton",props:{label:{},icon:{},disabled:{type:Boolean},variant:{default:"ghost"},size:{default:"md"}},setup(r){const e=Th({base:"scalar-icon-button grid aspect-square cursor-pointer rounded",variants:{size:{xxs:"size-3.5 p-0.5",xs:"size-5 p-1",sm:"size-6 p-1",md:"size-10 p-3",full:"h-full w-full"},disabled:{true:"cursor-not-allowed shadow-none"},variant:qv}}),t=i.computed(()=>{const{class:n,...o}=i.useAttrs();return{class:n||"",rest:o}});return(n,o)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(t.value.rest,{ariaDisabled:n.disabled||void 0,class:i.unref(io)(i.unref(e)({size:n.size,variant:n.variant,disabled:n.disabled}),t.value.class),type:"button"}),[i.createVNode(i.unref(Me),{icon:n.icon},null,8,["icon"]),i.createElementVNode("span",P_,i.toDisplayString(n.label),1)],16,B_))}}),I_={class:"sr-only"},M_=["value"],D_=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchInput",props:{loading:{},modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=e;function n(s){t("update:modelValue",s.target.value)}const o=i.computed(()=>{const{class:s,...a}=i.useAttrs();return{className:s||"",rest:a}});return(s,a)=>(i.openBlock(),i.createElementBlock("label",i.mergeProps(o.value.rest,{class:i.unref(io)("flex rounded border bg-back-1 text-sm font-medium focus-within:border-fore-1",o.value.className)}),[i.createElementVNode("span",I_,[i.renderSlot(s.$slots,"label",{},()=>[i.createTextVNode("Enter search")])]),i.createElementVNode("input",{autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"flex-1 rounded bg-transparent p-3 outline-none",placeholder:"Search...",spellcheck:"false",type:"text",value:s.modelValue,onInput:n},null,40,M_),s.loading&&s.loading.isLoading?(i.openBlock(),i.createBlock(i.unref(Fv),{key:0,class:"mr-3 self-center",loadingState:s.loading,size:"20px"},null,8,["loadingState"])):s.modelValue?(i.openBlock(),i.createBlock(i.unref(ji),{key:1,class:"self-center",icon:"Close",label:"Clear Search",size:"md",onClick:a[0]||(a[0]=l=>t("update:modelValue",""))})):i.createCommentVNode("",!0)],16))}}),V_=i.createElementVNode("div",{class:"flex flex-col items-center gap-2 px-3 py-4"},[i.createElementVNode("div",{class:"rotate-90 text-lg font-bold"},":("),i.createElementVNode("div",{class:"text-sm font-medium text-fore-2"},"No results found")],-1),R_=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchResultList",props:{noResults:{type:Boolean}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("ul",i.mergeProps(e.value.rest,{class:i.unref(io)("flex flex-col",e.value.className)}),[t.noResults?i.renderSlot(t.$slots,"noResults",{key:0},()=>[V_]):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default")],16))}}),L_={class:"contents"},j_={class:"text-fore-3 group-hover:text-fore-1"},F_={class:"flex min-w-0 flex-1 flex-col gap-0.75"},q_={class:"flex items-center gap-1"},z_={class:"flex-1 truncate text-sm font-medium"},H_={key:0,class:"text-xs text-fore-2"},U_={class:"truncate text-xs text-fore-2"},K_=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchResultItem",props:{icon:{},active:{type:Boolean}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("li",L_,[i.createElementVNode("a",i.mergeProps(e.value.rest,{class:i.unref(io)("group flex cursor-pointer gap-3 rounded px-3 py-1.5 no-underline hover:bg-back-2",{"bg-back-2":t.active},e.value.className)}),[i.createElementVNode("div",j_,[i.renderSlot(t.$slots,"icon",{},()=>[t.icon?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,icon:t.icon,size:"sm"},null,8,["icon"])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",F_,[i.createElementVNode("div",q_,[i.createElementVNode("div",z_,[i.renderSlot(t.$slots,"default")]),t.$slots.addon?(i.openBlock(),i.createElementBlock("div",H_,[i.renderSlot(t.$slots,"addon")])):i.createCommentVNode("",!0)]),i.createElementVNode("div",U_,[i.renderSlot(t.$slots,"description")])])],16)]))}}),W_={class:"card-form-input"},G_=["for"],J_=["id","type"],Y_=i.defineComponent({inheritAttrs:!1,__name:"CardFormTextInput",props:{id:{},type:{}},setup(r){const e=r,t=i.ref(!0),n=i.computed(()=>e.type==="password"?t.value?"password":"text":e.type??"text");return(o,s)=>(i.openBlock(),i.createElementBlock("div",W_,[i.createElementVNode("label",{for:o.id},[i.renderSlot(o.$slots,"default",{},void 0,!0)],8,G_),i.createElementVNode("input",i.mergeProps(o.$attrs,{id:o.id,autocomplete:"off","data-1p-ignore":"",spellcheck:"false",type:n.value}),null,16,J_),o.type==="password"?(i.openBlock(),i.createBlock(i.unref(ji),{key:0,class:"password-mask",icon:t.value?"Show":"Hide",label:t.value?"Show Password":"Hide Password",onClick:s[0]||(s[0]=a=>t.value=!t.value)},null,8,["icon","label"])):i.createCommentVNode("",!0)]))}}),$r=U(Y_,[["__scopeId","data-v-ba56ce97"]]),X_=r=>(i.pushScopeId("data-v-ad168955"),r=r(),i.popScopeId(),r),Q_={class:"scopes-label"},Z_=X_(()=>i.createElementVNode("em",null,"/",-1)),eN=["checked"],tN={class:"dropdown-item-title"},rN={class:"dropdown-item-description"},nN=i.defineComponent({__name:"SecuritySchemeScopes",props:{scopes:{},selected:{}},emits:["update:selected"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(),s=i.ref(),{floatingStyles:a}=b_(o,s,{placement:"bottom-end",whileElementsMounted:p_,middleware:[G$(5),g_(),m_()]}),l=i.computed({get:()=>t.selected,set:c=>n("update:selected",c)});return(c,d)=>(i.openBlock(),i.createBlock(i.unref(Le.Listbox),{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=u=>l.value=u),multiple:""},{default:i.withCtx(({open:u})=>[i.createElementVNode("div",{ref_key:"trigger",ref:o,class:i.normalizeClass(["wrapper",{"wrapper-open":u}])},[i.createVNode(i.unref(Le.ListboxButton),{as:Sv},{default:i.withCtx(()=>[i.createElementVNode("div",Q_,[i.createTextVNode(" Scopes "+i.toDisplayString(l.value.length),1),Z_,i.createTextVNode(i.toDisplayString(Object.entries(c.scopes).length)+" ",1),i.createVNode(i.unref(Me),{icon:u?"ChevronUp":"ChevronDown",size:"sm"},null,8,["icon"])])]),_:2},1024)],2),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.unref(o0),null,{default:i.withCtx(({styles:h})=>[i.createElementVNode("div",{ref_key:"dropdown",ref:s,class:i.normalizeClass(["floating",h]),style:i.normalizeStyle(i.unref(a))},[i.createVNode(i.unref(Le.ListboxOptions),{as:"dl",class:"dropdown"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.entries(c.scopes),([f,p])=>(i.openBlock(),i.createBlock(i.unref(Le.ListboxOption),{key:f,as:"div",class:"dropdown-item",value:f},{default:i.withCtx(({selected:y})=>[i.createElementVNode("input",{checked:y,class:"dropdown-item-check",tabindex:"-1",type:"checkbox"},null,8,eN),i.createElementVNode("dt",tN,i.toDisplayString(f),1),i.createElementVNode("dd",rN,i.toDisplayString(p),1)]),_:2},1032,["value"]))),128))]),_:1})],6)]),_:1})]))]),_:1},8,["modelValue"]))}}),Zm=U(nN,[["__scopeId","data-v-ad168955"]]),oN=i.defineComponent({__name:"SecurityScheme",props:{value:{},proxy:{}},setup(r){const{toast:e}=Eh(),{server:t}=no(),{authentication:n,setAuthentication:o}=ns(),s=m=>{o({apiKey:{...n.apiKey,token:m.target.value}})},a=m=>{o({http:{...n.http,basic:{...n.http.basic,username:m.target.value}}})},l=m=>{o({http:{...n.http,basic:{...n.http.basic,password:m.target.value}}})},c=m=>{o({http:{...n.http,bearer:{...n.http.bearer,token:m.target.value}}})},d=m=>{o({oAuth2:{...n.oAuth2,clientId:m.target.value}})},u=m=>{o({oAuth2:{...n.oAuth2,username:m.target.value}})},h=m=>{o({oAuth2:{...n.oAuth2,password:m.target.value}})};function f(m){const v=n.oAuth2.scopes.join(" "),b=(Math.random()+1).toString(36).substring(7),w=new URL(m.authorizationUrl);return o({oAuth2:{...n.oAuth2,state:b}}),w.searchParams.set("response_type","token"),w.searchParams.set("client_id",n.oAuth2.clientId),w.searchParams.set("redirect_uri",window.location.href),w.searchParams.set("scope",v),w.searchParams.set("state",b),w.toString()}function p(m,v){if(typeof m!="string"){console.log("tokenUrl is not a string");return}const b=v!=null&&v.baseUrl&&!m.startsWith("http")?gv(v==null?void 0:v.baseUrl,m):m,w=new URL(b);w.searchParams.set("grant_type","password"),w.searchParams.set("username",n.oAuth2.username),w.searchParams.set("password",n.oAuth2.password),w.searchParams.set("client_id",n.oAuth2.clientId),w.searchParams.set("scope",n.oAuth2.scopes.join(" ")),fetch(v!=null&&v.proxy?wv(v==null?void 0:v.proxy,w.toString()):w.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(S=>{if(!S.ok)throw new Error("Failed to get an access token. Please check your credentials.");return S.json()}).then(S=>{o({oAuth2:{...n.oAuth2,accessToken:S.access_token}})}).catch(S=>{e("Couldn’t retrieve the password grant token","warn",{description:"Open your browser console to get more information."}),console.error("[authorizeWithPassword]",S)})}const y=i.computed({get:()=>n.oAuth2.scopes,set:m=>o({oAuth2:{...n.oAuth2,scopes:m}})}),g=m=>{const b=window.open(m,"openAuth2Window","left=100,top=100,width=800,height=600");if(b){const w=setInterval(function(){var S;try{const k=new URLSearchParams(b.location.href).get("access_token");if(b.closed||k){clearInterval(w);const C=(S=b.location.href.match(/state=([^&]*)/))==null?void 0:S[1];k&&n.oAuth2.state===C&&o({oAuth2:{...n.oAuth2,accessToken:k}}),b.close()}}catch{}},200)}};return(m,v)=>{var b;return m.value&&((b=m.value)!=null&&b.type)?(i.openBlock(),i.createBlock(JE,{key:0},{default:i.withCtx(()=>[m.value.type==="apiKey"?(i.openBlock(),i.createBlock($r,{key:0,id:`security-scheme-${m.value.name}`,placeholder:"Token",type:"password",value:i.unref(n).apiKey.token,onInput:s},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.value.in.charAt(0).toUpperCase()+m.value.in.slice(1))+" API ",1)]),_:1},8,["id","value"])):m.value.type==="http"||m.value.type==="basic"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[m.value.type==="basic"||m.value.scheme==="basic"?(i.openBlock(),i.createBlock(Rs,{key:0},{default:i.withCtx(()=>[i.createVNode($r,{id:"http.basic.username",placeholder:"Username",value:i.unref(n).http.basic.username,onInput:a},{default:i.withCtx(()=>[i.createTextVNode(" Username ")]),_:1},8,["value"]),i.createVNode($r,{id:"http.basic.password",placeholder:"Password",type:"password",value:i.unref(n).http.basic.password,onInput:l},{default:i.withCtx(()=>[i.createTextVNode(" Password ")]),_:1},8,["value"])]),_:1})):m.value.type==="http"&&m.value.scheme==="bearer"?(i.openBlock(),i.createBlock($r,{key:1,id:"http.bearer.token",placeholder:"Token",type:"password",value:i.unref(n).http.bearer.token,onInput:c},{default:i.withCtx(()=>[i.createTextVNode(" Bearer Token ")]),_:1},8,["value"])):i.createCommentVNode("",!0)],64)):m.value.type.toLowerCase()==="oauth2"&&m.value.flows?(i.openBlock(),i.createBlock(Rs,{key:2},{default:i.withCtx(()=>[m.value.flows.implicit?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.unref(n).oAuth2.accessToken?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode($r,{id:"oAuth2.accessToken",placeholder:"xxxxx",type:"password",value:i.unref(n).oAuth2.accessToken},{default:i.withCtx(()=>[i.createTextVNode(" Access Token ")]),_:1},8,["value"]),i.createVNode(Sv,{onClick:v[0]||(v[0]=()=>i.unref(o)({oAuth2:{...i.unref(n).oAuth2,accessToken:"",state:""}}))},{default:i.withCtx(()=>[i.createTextVNode(" Reset ")]),_:1})],64)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),m.value.flows.password?(i.openBlock(),i.createBlock(Rm,{key:1},{default:i.withCtx(()=>[i.createVNode(Rs,null,{default:i.withCtx(()=>[i.createVNode($r,{id:"oAuth2.username",placeholder:"Username",value:i.unref(n).oAuth2.username,onInput:u},{default:i.withCtx(()=>[i.createTextVNode(" Username ")]),_:1},8,["value"]),i.createVNode($r,{id:"oAuth2.password",placeholder:"Password",type:"password",value:i.unref(n).oAuth2.password,onInput:h},{default:i.withCtx(()=>[i.createTextVNode(" Password ")]),_:1},8,["value"])]),_:1}),i.createVNode(Rs,null,{default:i.withCtx(()=>{var w,S;return[i.createVNode($r,{id:"oAuth2.clientId",placeholder:"12345",type:"text",value:i.unref(n).oAuth2.clientId,onInput:d},{default:i.withCtx(()=>[i.createTextVNode(" Client ID ")]),_:1},8,["value"]),m.value!==void 0&&Object.entries(((w=m.value.flows.implicit)==null?void 0:w.scopes)??m.value.flows.password.scopes).length>0?(i.openBlock(),i.createBlock(Zm,{key:0,selected:y.value,"onUpdate:selected":v[1]||(v[1]=x=>y.value=x),scopes:((S=m.value.flows.implicit)==null?void 0:S.scopes)??m.value.flows.password.scopes},null,8,["selected","scopes"])):i.createCommentVNode("",!0),i.createElementVNode("button",{class:"cardform-auth-button",type:"button",onClick:v[2]||(v[2]=()=>{var x,k;return p((k=(x=m.value.flows)==null?void 0:x.password)==null?void 0:k.tokenUrl,{baseUrl:i.unref(xi)(i.unref(t)),proxy:m.proxy})})}," Authorize ")]}),_:1})]),_:1})):(i.openBlock(),i.createBlock(Rm,{key:2},{default:i.withCtx(()=>[i.createVNode(Rs,null,{default:i.withCtx(()=>{var w,S;return[i.createVNode($r,{id:"oAuth2.clientId",placeholder:"12345",type:"text",value:i.unref(n).oAuth2.clientId,onInput:d},{default:i.withCtx(()=>[i.createTextVNode(" Client ID ")]),_:1},8,["value"]),m.value!==void 0&&Object.entries(((w=m.value.flows.implicit)==null?void 0:w.scopes)??m.value.flows.password.scopes).length>0?(i.openBlock(),i.createBlock(Zm,{key:0,selected:y.value,"onUpdate:selected":v[3]||(v[3]=x=>y.value=x),scopes:((S=m.value.flows.implicit)==null?void 0:S.scopes)??m.value.flows.password.scopes},null,8,["selected","scopes"])):i.createCommentVNode("",!0),i.createElementVNode("button",{class:"cardform-auth-button",type:"button",onClick:v[4]||(v[4]=()=>{var x,k;return g(f(((x=m.value)==null?void 0:x.flows.implicit)??((k=m.value)==null?void 0:k.flows.password)))})}," Authorize ")]}),_:1})]),_:1}))]),_:1})):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)}}}),zv=U(oN,[["__scopeId","data-v-9f6c0d8d"]]),sN=r=>(i.pushScopeId("data-v-7f0d31fc"),r=r(),i.popScopeId(),r),iN={key:0,class:"security-scheme-label"},aN={key:1,class:"security-scheme-selector"},lN={class:"security-scheme-label"},cN=["value"],dN=sN(()=>i.createElementVNode("option",{value:""},"None",-1)),uN=["value"],hN=i.defineComponent({__name:"SecuritySchemeSelector",props:{value:{}},emits:["input"],setup(r,{emit:e}){const t=r,n=e,{authentication:o,setAuthentication:s}=ns(),a=m=>{l(m.target.value)};i.onMounted(()=>{o.preferredSecurityScheme||l(Object.keys(t.value??{})[0]??null)});const l=m=>{s({preferredSecurityScheme:m}),n("input",m)};i.onServerPrefetch(()=>l(Object.keys(t.value??{})[0]??null));const c=m=>!(m!=null&&m.type),d=m=>m.type.toLowerCase()==="apikey",u=m=>m.type==="http"&&m.scheme.toLowerCase()==="basic"||m.type.toLowerCase()==="basic",h=m=>m.type==="http"&&m.scheme.toLowerCase()==="bearer",f=m=>m.type.toLowerCase()==="oauth2",p=(m,v)=>`${y(m)} (${v})`,y=m=>{var v,b;return c(m)?"No Authentication":d(m)?"API Key":u(m)?"Basic Authentication":h(m)?"Bearer Authentication":f(m)?(v=m.flows)!=null&&v.implicit?"OAuth 2.0 Implicit":(b=m.flows)!=null&&b.password?"OAuth 2.0 Password":"OAuth 2.0":`${m.type} (not yet supported)`},g=i.computed(()=>Object.keys(t.value??{}));return(m,v)=>{var b,w;return g.value.length===1?(i.openBlock(),i.createElementBlock("div",iN,i.toDisplayString(p((b=m.value)==null?void 0:b[g.value[0]],g.value[0])),1)):g.value.length>1?(i.openBlock(),i.createElementBlock("div",aN,[i.createElementVNode("span",lN,i.toDisplayString(i.unref(o).preferredSecurityScheme?p((w=m.value)==null?void 0:w[i.unref(o).preferredSecurityScheme],i.unref(o).preferredSecurityScheme):"None"),1),i.createVNode(i.unref(Me),{icon:"ChevronDown"}),i.createElementVNode("select",{value:i.unref(o).preferredSecurityScheme,onClick:v[0]||(v[0]=i.withModifiers(()=>{},["prevent"])),onInput:a},[dN,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.value,S=>{var x;return i.openBlock(),i.createElementBlock("option",{key:S,value:S??null},i.toDisplayString(p((x=m.value)==null?void 0:x[S],S)),9,uN)}),128))],40,cN)])):i.createCommentVNode("",!0)}}}),Hv=U(hN,[["__scopeId","data-v-7f0d31fc"]]);function Un(){return{info:{title:"",description:"",termsOfService:"",version:"",license:{name:"",url:""},contact:{email:""}},externalDocs:{description:"",url:""},servers:[],tags:[]}}function Uv(r,e){for(const[t,n]of Object.entries(r))n!==null&&typeof n=="object"?(e[t]??(e[t]=new n.__proto__.constructor),Uv(n,e[t])):typeof n<"u"&&(e[t]=n);return e}function Bh({serverState:r,authenticationState:e,operation:t,globalSecurity:n}){var l,c;const o=g0({url:xi(r)},Od(t,{requiredOnly:!1}),e?Sh(e,((l=t.information)==null?void 0:l.security)??n??[]):{}),s=Od(t,{requiredOnly:!1}),a=Po(t,"path",!1);return{id:t.operationId,name:t.name,type:o.method,path:s.path??"",variables:a,cookies:eg(o.cookies),query:o.queryString.map(d=>({...d,enabled:d.required??!0})),headers:eg(o.headers),url:xi(r)??"",body:(c=o.postData)==null?void 0:c.text}}function eg(r){return(r??[]).map(e=>({...e,enabled:!0}))}const fN=Zg.unified().use(Qg).use(Vw).use(Dw),Ei=async r=>{const e=new Pi,{headings:t}=(await fN.process(r)).data;return pN(t,e)},pN=(r,e)=>r.map(t=>({...t,slug:e.slug(t.value)})),rc=r=>{const e=Math.min(...r.map(t=>t.depth));return e>=1&&e<=6?e:1};function Jt(r){var e,t;return r?Object.keys(((e=r==null?void 0:r.components)==null?void 0:e.schemas)??{}).length?(t=r==null?void 0:r.components)==null?void 0:t.schemas:Object.keys((r==null?void 0:r.definitions)??{}).length?r==null?void 0:r.definitions:{}:{}}function mN(r){const e=/{{?\s*([\w.-]+)\s*}}?/g,t=r==null?void 0:r.matchAll(e);return Array.from(t??[],n=>n[1])}const Ph=r=>r?!!Object.keys(Jt(r)??{}).length:!1,Kv=r=>{var e;return!!Object.keys(((e=r==null?void 0:r.components)==null?void 0:e.securitySchemes)??{}).length},Wv=r=>r?!!Object.keys((r==null?void 0:r.webhooks)??{}).length:!1;function Gv(r){try{return!!new URL(r)}catch{return!1}}const gN=(r,e)=>Object.keys(r).map(t=>({[e??t]:t,value:r[t]})),yN=r=>r.reduce((e,t)=>({...e,...t}),{});function nc(r,e){return Object.keys(r).forEach(t=>{Object.hasOwn(e,t)||delete r[t]}),Object.assign(r,e),r}const{server:vN}=no(),{setOperation:bN,setGlobalSecurity:wN}=rh(),{toggleApiClient:kN}=jl(),{setActiveRequest:SN,resetActiveResponse:xN}=C0();function $l(r,e){const t=Bh({serverState:vN,operation:r,authenticationState:null,globalSecurity:null});xN(),SN(t),bN(r),wN(e),kN(t,!0)}var CN=Object.defineProperty,EN=(r,e,t)=>e in r?CN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yr=(r,e,t)=>(EN(r,typeof e!="symbol"?e+"":e,t),t);const $N=(r,e)=>{const t=r[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e)))})};var _N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ih(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ku={exports:{}},Jv={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatNames=r.fastFormats=r.fullFormats=void 0;function e(P,M){return{validate:P,compare:M}}r.fullFormats={date:e(s,a),time:e(c,d),"date-time":e(h,f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:N,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:v,int32:{type:"number",validate:S},int64:{type:"number",validate:x},float:{type:"number",validate:k},double:{type:"number",validate:k},password:!0,binary:!0},r.fastFormats={...r.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},r.formatNames=Object.keys(r.fullFormats);function t(P){return P%4===0&&(P%100!==0||P%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(P){const M=n.exec(P);if(!M)return!1;const j=+M[1],I=+M[2],X=+M[3];return I>=1&&I<=12&&X>=1&&X<=(I===2&&t(j)?29:o[I])}function a(P,M){if(P&&M)return P>M?1:P<M?-1:0}const l=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c(P,M){const j=l.exec(P);if(!j)return!1;const I=+j[1],X=+j[2],W=+j[3],te=j[5];return(I<=23&&X<=59&&W<=59||I===23&&X===59&&W===60)&&(!M||te!=="")}function d(P,M){if(!(P&&M))return;const j=l.exec(P),I=l.exec(M);if(j&&I)return P=j[1]+j[2]+j[3]+(j[4]||""),M=I[1]+I[2]+I[3]+(I[4]||""),P>M?1:P<M?-1:0}const u=/t|\s/i;function h(P){const M=P.split(u);return M.length===2&&s(M[0])&&c(M[1],!0)}function f(P,M){if(!(P&&M))return;const[j,I]=P.split(u),[X,W]=M.split(u),te=a(j,X);if(te!==void 0)return te||d(I,W)}const p=/\/|:/,y=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function g(P){return p.test(P)&&y.test(P)}const m=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function v(P){return m.lastIndex=0,m.test(P)}const b=-(2**31),w=2**31-1;function S(P){return Number.isInteger(P)&&P<=w&&P>=b}function x(P){return Number.isInteger(P)}function k(){return!0}const C=/[^\\]\\Z/;function N(P){if(C.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(Jv);var Yv={},Su={exports:{}},Kn={},Dt={},Xo={},Fi={},ne={},$i={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class e{}r._CodeOrName=e,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class t extends e{constructor(b){if(super(),!r.IDENTIFIER.test(b))throw new Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=t;class n extends e{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((w,S)=>`${w}${S}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((w,S)=>(S instanceof t&&(w[S.str]=(w[S.str]||0)+1),w),{})}}r._Code=n,r.nil=new n("");function o(v,...b){const w=[v[0]];let S=0;for(;S<b.length;)l(w,b[S]),w.push(v[++S]);return new n(w)}r._=o;const s=new n("+");function a(v,...b){const w=[p(v[0])];let S=0;for(;S<b.length;)w.push(s),l(w,b[S]),w.push(s,p(v[++S]));return c(w),new n(w)}r.str=a;function l(v,b){b instanceof n?v.push(...b._items):b instanceof t?v.push(b):v.push(h(b))}r.addCodeArg=l;function c(v){let b=1;for(;b<v.length-1;){if(v[b]===s){const w=d(v[b-1],v[b+1]);if(w!==void 0){v.splice(b-1,3,w);continue}v[b++]="+"}b++}}function d(v,b){if(b==='""')return v;if(v==='""')return b;if(typeof v=="string")return b instanceof t||v[v.length-1]!=='"'?void 0:typeof b!="string"?`${v.slice(0,-1)}${b}"`:b[0]==='"'?v.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(v instanceof t))return`"${v}${b.slice(1)}`}function u(v,b){return b.emptyStr()?v:v.emptyStr()?b:a`${v}${b}`}r.strConcat=u;function h(v){return typeof v=="number"||typeof v=="boolean"||v===null?v:p(Array.isArray(v)?v.join(","):v)}function f(v){return new n(p(v))}r.stringify=f;function p(v){return JSON.stringify(v).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}r.safeStringify=p;function y(v){return typeof v=="string"&&r.IDENTIFIER.test(v)?new n(`.${v}`):o`[${v}]`}r.getProperty=y;function g(v){if(typeof v=="string"&&r.IDENTIFIER.test(v))return new n(`${v}`);throw new Error(`CodeGen: invalid export name: ${v}, use explicit $id name mapping`)}r.getEsmExportName=g;function m(v){return new n(v.toString())}r.regexpCode=m})($i);var xu={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const e=$i;class t extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n=r.UsedValueState||(r.UsedValueState={})),r.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class o{constructor({prefixes:d,parent:u}={}){this._names={},this._prefixes=d,this._parent=u}toName(d){return d instanceof e.Name?d:this.name(d)}name(d){return new e.Name(this._newName(d))}_newName(d){const u=this._names[d]||this._nameGroup(d);return`${d}${u.index++}`}_nameGroup(d){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}r.Scope=o;class s extends e.Name{constructor(d,u){super(u),this.prefix=d}setValue(d,{property:u,itemIndex:h}){this.value=d,this.scopePath=(0,e._)`.${new e.Name(u)}[${h}]`}}r.ValueScopeName=s;const a=(0,e._)`\n`;class l extends o{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?a:e.nil}}get(){return this._scope}name(d){return new s(d,this._newName(d))}value(d,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(d),{prefix:p}=f,y=(h=u.key)!==null&&h!==void 0?h:u.ref;let g=this._values[p];if(g){const b=g.get(y);if(b)return b}else g=this._values[p]=new Map;g.set(y,f);const m=this._scope[p]||(this._scope[p]=[]),v=m.length;return m[v]=u.ref,f.setValue(u,{property:p,itemIndex:v}),f}getValue(d,u){const h=this._values[d];if(h)return h.get(u)}scopeRefs(d,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,e._)`${d}${h.scopePath}`})}scopeCode(d=this._values,u,h){return this._reduceValues(d,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},u,h)}_reduceValues(d,u,h={},f){let p=e.nil;for(const y in d){const g=d[y];if(!g)continue;const m=h[y]=h[y]||new Map;g.forEach(v=>{if(m.has(v))return;m.set(v,n.Started);let b=u(v);if(b){const w=this.opts.es5?r.varKinds.var:r.varKinds.const;p=(0,e._)`${p}${w} ${v} = ${b};${this.opts._n}`}else if(b=f==null?void 0:f(v))p=(0,e._)`${p}${b}${this.opts._n}`;else throw new t(v);m.set(v,n.Completed)})}return p}}r.ValueScope=l})(xu);(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const e=$i,t=xu;var n=$i;Object.defineProperty(r,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return n.Name}});var o=xu;Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),r.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(E,A){return this}}class a extends s{constructor(E,A,B){super(),this.varKind=E,this.name=A,this.rhs=B}render({es5:E,_n:A}){const B=E?t.varKinds.var:this.varKind,z=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${z};`+A}optimizeNames(E,A){if(E[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,E,A)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends s{constructor(E,A,B){super(),this.lhs=E,this.rhs=A,this.sideEffects=B}render({_n:E}){return`${this.lhs} = ${this.rhs};`+E}optimizeNames(E,A){if(!(this.lhs instanceof e.Name&&!E[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,E,A),this}get names(){const E=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(E,this.rhs)}}class c extends l{constructor(E,A,B,z){super(E,B,z),this.op=A}render({_n:E}){return`${this.lhs} ${this.op}= ${this.rhs};`+E}}class d extends s{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`${this.label}:`+E}}class u extends s{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`break${this.label?` ${this.label}`:""};`+E}}class h extends s{constructor(E){super(),this.error=E}render({_n:E}){return`throw ${this.error};`+E}get names(){return this.error.names}}class f extends s{constructor(E){super(),this.code=E}render({_n:E}){return`${this.code};`+E}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(E,A){return this.code=W(this.code,E,A),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class p extends s{constructor(E=[]){super(),this.nodes=E}render(E){return this.nodes.reduce((A,B)=>A+B.render(E),"")}optimizeNodes(){const{nodes:E}=this;let A=E.length;for(;A--;){const B=E[A].optimizeNodes();Array.isArray(B)?E.splice(A,1,...B):B?E[A]=B:E.splice(A,1)}return E.length>0?this:void 0}optimizeNames(E,A){const{nodes:B}=this;let z=B.length;for(;z--;){const H=B[z];H.optimizeNames(E,A)||(te(E,H.names),B.splice(z,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((E,A)=>I(E,A.names),{})}}class y extends p{render(E){return"{"+E._n+super.render(E)+"}"+E._n}}class g extends p{}class m extends y{}m.kind="else";class v extends y{constructor(E,A){super(A),this.condition=E}render(E){let A=`if(${this.condition})`+super.render(E);return this.else&&(A+="else "+this.else.render(E)),A}optimizeNodes(){super.optimizeNodes();const E=this.condition;if(E===!0)return this.nodes;let A=this.else;if(A){const B=A.optimizeNodes();A=this.else=Array.isArray(B)?new m(B):B}if(A)return E===!1?A instanceof v?A:A.nodes:this.nodes.length?this:new v(me(E),A instanceof v?[A]:A.nodes);if(!(E===!1||!this.nodes.length))return this}optimizeNames(E,A){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(E,A),!!(super.optimizeNames(E,A)||this.else))return this.condition=W(this.condition,E,A),this}get names(){const E=super.names;return X(E,this.condition),this.else&&I(E,this.else.names),E}}v.kind="if";class b extends y{}b.kind="for";class w extends b{constructor(E){super(),this.iteration=E}render(E){return`for(${this.iteration})`+super.render(E)}optimizeNames(E,A){if(super.optimizeNames(E,A))return this.iteration=W(this.iteration,E,A),this}get names(){return I(super.names,this.iteration.names)}}class S extends b{constructor(E,A,B,z){super(),this.varKind=E,this.name=A,this.from=B,this.to=z}render(E){const A=E.es5?t.varKinds.var:this.varKind,{name:B,from:z,to:H}=this;return`for(${A} ${B}=${z}; ${B}<${H}; ${B}++)`+super.render(E)}get names(){const E=X(super.names,this.from);return X(E,this.to)}}class x extends b{constructor(E,A,B,z){super(),this.loop=E,this.varKind=A,this.name=B,this.iterable=z}render(E){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(E)}optimizeNames(E,A){if(super.optimizeNames(E,A))return this.iterable=W(this.iterable,E,A),this}get names(){return I(super.names,this.iterable.names)}}class k extends y{constructor(E,A,B){super(),this.name=E,this.args=A,this.async=B}render(E){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(E)}}k.kind="func";class C extends p{render(E){return"return "+super.render(E)}}C.kind="return";class N extends y{render(E){let A="try"+super.render(E);return this.catch&&(A+=this.catch.render(E)),this.finally&&(A+=this.finally.render(E)),A}optimizeNodes(){var E,A;return super.optimizeNodes(),(E=this.catch)===null||E===void 0||E.optimizeNodes(),(A=this.finally)===null||A===void 0||A.optimizeNodes(),this}optimizeNames(E,A){var B,z;return super.optimizeNames(E,A),(B=this.catch)===null||B===void 0||B.optimizeNames(E,A),(z=this.finally)===null||z===void 0||z.optimizeNames(E,A),this}get names(){const E=super.names;return this.catch&&I(E,this.catch.names),this.finally&&I(E,this.finally.names),E}}class P extends y{constructor(E){super(),this.error=E}render(E){return`catch(${this.error})`+super.render(E)}}P.kind="catch";class M extends y{render(E){return"finally"+super.render(E)}}M.kind="finally";class j{constructor(E,A={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...A,_n:A.lines?`
56
+ `,this;e--}else if(o instanceof Re){let c=o.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=o.children[a+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof Re?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class N0{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new ti(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:o}=this.cursor.next(e);return this.pos+=(o.length+e)*t,this.value=o.length<=n?o:t<0?o.slice(o.length-n):o.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class A0{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:o}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(we.prototype[Symbol.iterator]=function(){return this.iter()},ti.prototype[Symbol.iterator]=N0.prototype[Symbol.iterator]=A0.prototype[Symbol.iterator]=function(){return this});class cS{constructor(e,t,n,o){this.from=e,this.to=t,this.number=n,this.text=o}get length(){return this.to-this.from}}function Uo(r,e,t){return e=Math.max(0,Math.min(r.length,e)),[e,Math.max(e,Math.min(r.length,t))]}let Io="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(r=>r?parseInt(r,36):1);for(let r=1;r<Io.length;r++)Io[r]+=Io[r-1];function dS(r){for(let e=1;e<Io.length;e+=2)if(Io[e]>r)return Io[e-1]<=r;return!1}function kp(r){return r>=127462&&r<=127487}const Sp=8205;function pr(r,e,t=!0,n=!0){return(t?O0:uS)(r,e,n)}function O0(r,e,t){if(e==r.length)return e;e&&T0(r.charCodeAt(e))&&B0(r.charCodeAt(e-1))&&e--;let n=Mo(r,e);for(e+=ul(n);e<r.length;){let o=Mo(r,e);if(n==Sp||o==Sp||t&&dS(o))e+=ul(o),n=o;else if(kp(o)){let s=0,a=e-2;for(;a>=0&&kp(Mo(r,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function uS(r,e,t){for(;e>0;){let n=O0(r,e-2,t);if(n<e)return n;e--}return 0}function T0(r){return r>=56320&&r<57344}function B0(r){return r>=55296&&r<56320}function Mo(r,e){let t=r.charCodeAt(e);if(!B0(t)||e+1==r.length)return t;let n=r.charCodeAt(e+1);return T0(n)?(t-55296<<10)+(n-56320)+65536:t}function hS(r){return r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode((r>>10)+55296,(r&1023)+56320))}function ul(r){return r<65536?1:2}const Id=/\r\n?|\n/;exports.MapMode=function(r){return r[r.Simple=0]="Simple",r[r.TrackDel=1]="TrackDel",r[r.TrackBefore=2]="TrackBefore",r[r.TrackAfter=3]="TrackAfter",r}(exports.MapMode||(exports.MapMode={}));class Tr{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,o=0;t<this.sections.length;){let s=this.sections[t++],a=this.sections[t++];a<0?(e(n,o,s),o+=s):o+=a,n+=s}}iterChangedRanges(e,t=!1){Md(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],o=this.sections[t++];o<0?e.push(n,o):e.push(o,n)}return new Tr(e)}composeDesc(e){return this.empty?e:e.empty?this:P0(this,e)}mapDesc(e,t=!1){return e.empty?this:Dd(this,e,t)}mapPos(e,t=-1,n=exports.MapMode.Simple){let o=0,s=0;for(let a=0;a<this.sections.length;){let l=this.sections[a++],c=this.sections[a++],d=o+l;if(c<0){if(d>e)return s+(e-o);s+=l}else{if(n!=exports.MapMode.Simple&&d>=e&&(n==exports.MapMode.TrackDel&&o<e&&d>e||n==exports.MapMode.TrackBefore&&o<e||n==exports.MapMode.TrackAfter&&d>e))return null;if(d>e||d==e&&t<0&&!l)return e==o||t<0?s:s+c;s+=c}o=d}if(e>o)throw new RangeError(`Position ${e} is out of range for changeset of length ${o}`);return s}touchesRange(e,t=e){for(let n=0,o=0;n<this.sections.length&&o<=t;){let s=this.sections[n++],a=this.sections[n++],l=o+s;if(a>=0&&o<=t&&l>=e)return o<e&&l>t?"cover":!0;o=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],o=this.sections[t++];e+=(e?" ":"")+n+(o>=0?":"+o:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Tr(e)}static create(e){return new Tr(e)}}class Ye extends Tr{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Md(this,(t,n,o,s,a)=>e=e.replace(o,o+(n-t),a),!1),e}mapDesc(e,t=!1){return Dd(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let o=0,s=0;o<t.length;o+=2){let a=t[o],l=t[o+1];if(l>=0){t[o]=l,t[o+1]=a;let c=o>>1;for(;n.length<c;)n.push(we.empty);n.push(a?e.slice(s,s+a):we.empty)}s+=a}return new Ye(t,n)}compose(e){return this.empty?e:e.empty?this:P0(this,e,!0)}map(e,t=!1){return e.empty?this:Dd(this,e,t,!0)}iterChanges(e,t=!1){Md(this,e,t)}get desc(){return Tr.create(this.sections)}filter(e){let t=[],n=[],o=[],s=new mi(this);e:for(let a=0,l=0;;){let c=a==e.length?1e9:e[a++];for(;l<c||l==c&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,c-l);st(o,u,-1);let h=s.ins==-1?-1:s.off==0?s.ins:0;st(t,u,h),h>0&&on(n,t,s.text),s.forward(u),l+=u}let d=e[a++];for(;l<d;){if(s.done)break e;let u=Math.min(s.len,d-l);st(t,u,-1),st(o,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),l+=u}}return{changes:new Ye(t,n),filtered:Tr.create(o)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],o=this.sections[t+1];o<0?e.push(n):o==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let o=[],s=[],a=0,l=null;function c(u=!1){if(!u&&!o.length)return;a<t&&st(o,t-a,-1);let h=new Ye(o,s);l=l?l.compose(h.map(l)):h,o=[],s=[],a=0}function d(u){if(Array.isArray(u))for(let h of u)d(h);else if(u instanceof Ye){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);c(),l=l?l.compose(u.map(l)):u}else{let{from:h,to:f=h,insert:p}=u;if(h>f||h<0||f>t)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${t})`);let y=p?typeof p=="string"?we.of(p.split(n||Id)):p:we.empty,g=y.length;if(h==f&&g==0)return;h<a&&c(),h>a&&st(o,h-a,-1),st(o,f-h,g),on(s,o,y),a=f}}return d(e),c(!l),l}static empty(e){return new Ye(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let o=0;o<e.length;o++){let s=e[o];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((a,l)=>l&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;n.length<o;)n.push(we.empty);n[o]=we.of(s.slice(1)),t.push(s[0],n[o].length)}}}return new Ye(t,n)}static createSet(e,t){return new Ye(e,t)}}function st(r,e,t,n=!1){if(e==0&&t<=0)return;let o=r.length-2;o>=0&&t<=0&&t==r[o+1]?r[o]+=e:e==0&&r[o]==0?r[o+1]+=t:n?(r[o]+=e,r[o+1]+=t):r.push(e,t)}function on(r,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<r.length)r[r.length-1]=r[r.length-1].append(t);else{for(;r.length<n;)r.push(we.empty);r.push(t)}}function Md(r,e,t){let n=r.inserted;for(let o=0,s=0,a=0;a<r.sections.length;){let l=r.sections[a++],c=r.sections[a++];if(c<0)o+=l,s+=l;else{let d=o,u=s,h=we.empty;for(;d+=l,u+=c,c&&n&&(h=h.append(n[a-2>>1])),!(t||a==r.sections.length||r.sections[a+1]<0);)l=r.sections[a++],c=r.sections[a++];e(o,d,s,u,h),o=d,s=u}}}function Dd(r,e,t,n=!1){let o=[],s=n?[]:null,a=new mi(r),l=new mi(e);for(let c=-1;;)if(a.ins==-1&&l.ins==-1){let d=Math.min(a.len,l.len);st(o,d,-1),a.forward(d),l.forward(d)}else if(l.ins>=0&&(a.ins<0||c==a.i||a.off==0&&(l.len<a.len||l.len==a.len&&!t))){let d=l.len;for(st(o,l.ins,-1);d;){let u=Math.min(a.len,d);a.ins>=0&&c<a.i&&a.len<=u&&(st(o,0,a.ins),s&&on(s,o,a.text),c=a.i),a.forward(u),d-=u}l.next()}else if(a.ins>=0){let d=0,u=a.len;for(;u;)if(l.ins==-1){let h=Math.min(u,l.len);d+=h,u-=h,l.forward(h)}else if(l.ins==0&&l.len<u)u-=l.len,l.next();else break;st(o,d,c<a.i?a.ins:0),s&&c<a.i&&on(s,o,a.text),c=a.i,a.forward(a.len-u)}else{if(a.done&&l.done)return s?Ye.createSet(o,s):Tr.create(o);throw new Error("Mismatched change set lengths")}}function P0(r,e,t=!1){let n=[],o=t?[]:null,s=new mi(r),a=new mi(e);for(let l=!1;;){if(s.done&&a.done)return o?Ye.createSet(n,o):Tr.create(n);if(s.ins==0)st(n,s.len,0,l),s.next();else if(a.len==0&&!a.done)st(n,0,a.ins,l),o&&on(o,n,a.text),a.next();else{if(s.done||a.done)throw new Error("Mismatched change set lengths");{let c=Math.min(s.len2,a.len),d=n.length;if(s.ins==-1){let u=a.ins==-1?-1:a.off?0:a.ins;st(n,c,u,l),o&&u&&on(o,n,a.text)}else a.ins==-1?(st(n,s.off?0:s.len,c,l),o&&on(o,n,s.textBit(c))):(st(n,s.off?0:s.len,a.off?0:a.ins,l),o&&!a.off&&on(o,n,a.text));l=(s.ins>c||a.ins>=0&&a.len>c)&&(l||n.length>d),s.forward2(c),a.forward(c)}}}}class mi{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?we.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?we.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Mn{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,o;return this.empty?n=o=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),o=e.mapPos(this.to,-1)),n==this.from&&o==this.to?this:new Mn(n,o,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Y.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Y.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Y.range(e.anchor,e.head)}static create(e,t,n){return new Mn(e,t,n)}}class Y{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Y.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Y([this.main],0)}addRange(e,t=!0){return Y.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,Y.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Y(e.ranges.map(t=>Mn.fromJSON(t)),e.main)}static single(e,t=e){return new Y([Y.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,o=0;o<e.length;o++){let s=e[o];if(s.empty?s.from<=n:s.from<n)return Y.normalized(e.slice(),t);n=s.to}return new Y(e,t)}static cursor(e,t=0,n,o){return Mn.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(o??16777215)<<6)}static range(e,t,n,o){let s=(n??16777215)<<6|(o==null?7:Math.min(6,o));return t<e?Mn.create(t,e,48|s):Mn.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let n=e[t];e.sort((o,s)=>o.from-s.from),t=e.indexOf(n);for(let o=1;o<e.length;o++){let s=e[o],a=e[o-1];if(s.empty?s.from<=a.to:s.from<a.to){let l=a.from,c=Math.max(s.to,a.to);o<=t&&t--,e.splice(--o,2,s.anchor>s.head?Y.range(c,l):Y.range(l,c))}}return new Y(e,t)}}function I0(r,e){for(let t of r.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let ih=0;class Z{constructor(e,t,n,o,s){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=o,this.id=ih++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Z(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:ah),!!e.static,e.enables)}of(e){return new Ua([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ua(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ua(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function ah(r,e){return r==e||r.length==e.length&&r.every((t,n)=>t===e[n])}class Ua{constructor(e,t,n,o){this.dependencies=e,this.facet=t,this.type=n,this.value=o,this.id=ih++}dynamicSlot(e){var t;let n=this.value,o=this.facet.compareInput,s=this.id,a=e[s]>>1,l=this.type==2,c=!1,d=!1,u=[];for(let h of this.dependencies)h=="doc"?c=!0:h=="selection"?d=!0:((t=e[h.id])!==null&&t!==void 0?t:1)&1||u.push(e[h.id]);return{create(h){return h.values[a]=n(h),1},update(h,f){if(c&&f.docChanged||d&&(f.docChanged||f.selection)||Vd(h,u)){let p=n(h);if(l?!xp(p,h.values[a],o):!o(p,h.values[a]))return h.values[a]=p,1}return 0},reconfigure:(h,f)=>{let p,y=f.config.address[s];if(y!=null){let g=fl(f,y);if(this.dependencies.every(m=>m instanceof Z?f.facet(m)===h.facet(m):m instanceof qr?f.field(m,!1)==h.field(m,!1):!0)||(l?xp(p=n(h),g,o):o(p=n(h),g)))return h.values[a]=g,0}else p=n(h);return h.values[a]=p,1}}}}function xp(r,e,t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!t(r[n],e[n]))return!1;return!0}function Vd(r,e){let t=!1;for(let n of e)ri(r,n)&1&&(t=!0);return t}function fS(r,e,t){let n=t.map(c=>r[c.id]),o=t.map(c=>c.type),s=n.filter(c=>!(c&1)),a=r[e.id]>>1;function l(c){let d=[];for(let u=0;u<n.length;u++){let h=fl(c,n[u]);if(o[u]==2)for(let f of h)d.push(f);else d.push(h)}return e.combine(d)}return{create(c){for(let d of n)ri(c,d);return c.values[a]=l(c),1},update(c,d){if(!Vd(c,s))return 0;let u=l(c);return e.compare(u,c.values[a])?0:(c.values[a]=u,1)},reconfigure(c,d){let u=Vd(c,n),h=d.config.facets[e.id],f=d.facet(e);if(h&&!u&&ah(t,h))return c.values[a]=f,0;let p=l(c);return e.compare(p,f)?(c.values[a]=f,0):(c.values[a]=p,1)}}}const Cp=Z.define({static:!0});class qr{constructor(e,t,n,o,s){this.id=e,this.createF=t,this.updateF=n,this.compareF=o,this.spec=s,this.provides=void 0}static define(e){let t=new qr(ih++,e.create,e.update,e.compare||((n,o)=>n===o),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Cp).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,o)=>{let s=n.values[t],a=this.updateF(s,o);return this.compareF(s,a)?0:(n.values[t]=a,1)},reconfigure:(n,o)=>o.config.address[this.id]!=null?(n.values[t]=o.field(this),0):(n.values[t]=this.create(n),1)}}init(e){return[this,Cp.of({field:this,create:e})]}get extension(){return this}}const An={lowest:4,low:3,default:2,high:1,highest:0};function Ps(r){return e=>new M0(e,r)}const Wl={highest:Ps(An.highest),high:Ps(An.high),default:Ps(An.default),low:Ps(An.low),lowest:Ps(An.lowest)};class M0{constructor(e,t){this.inner=e,this.prec=t}}class Gl{of(e){return new Rd(this,e)}reconfigure(e){return Gl.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Rd{constructor(e,t){this.compartment=e,this.inner=t}}class hl{constructor(e,t,n,o,s,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=o,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let o=[],s=Object.create(null),a=new Map;for(let f of pS(e,t,a))f instanceof qr?o.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let l=Object.create(null),c=[],d=[];for(let f of o)l[f.id]=d.length<<1,d.push(p=>f.slot(p));let u=n==null?void 0:n.config.facets;for(let f in s){let p=s[f],y=p[0].facet,g=u&&u[f]||[];if(p.every(m=>m.type==0))if(l[y.id]=c.length<<1|1,ah(g,p))c.push(n.facet(y));else{let m=y.combine(p.map(v=>v.value));c.push(n&&y.compare(m,n.facet(y))?n.facet(y):m)}else{for(let m of p)m.type==0?(l[m.id]=c.length<<1|1,c.push(m.value)):(l[m.id]=d.length<<1,d.push(v=>m.dynamicSlot(v)));l[y.id]=d.length<<1,d.push(m=>fS(m,y,p))}}let h=d.map(f=>f(l));return new hl(e,a,h,l,c,s)}}function pS(r,e,t){let n=[[],[],[],[],[]],o=new Map;function s(a,l){let c=o.get(a);if(c!=null){if(c<=l)return;let d=n[c].indexOf(a);d>-1&&n[c].splice(d,1),a instanceof Rd&&t.delete(a.compartment)}if(o.set(a,l),Array.isArray(a))for(let d of a)s(d,l);else if(a instanceof Rd){if(t.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let d=e.get(a.compartment)||a.inner;t.set(a.compartment,d),s(d,l)}else if(a instanceof M0)s(a.inner,a.prec);else if(a instanceof qr)n[l].push(a),a.provides&&s(a.provides,l);else if(a instanceof Ua)n[l].push(a),a.facet.extensions&&s(a.facet.extensions,An.default);else{let d=a.extension;if(!d)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(d,l)}}return s(r,An.default),n.reduce((a,l)=>a.concat(l))}function ri(r,e){if(e&1)return 2;let t=e>>1,n=r.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;r.status[t]=4;let o=r.computeSlot(r,r.config.dynamicSlots[t]);return r.status[t]=2|o}function fl(r,e){return e&1?r.config.staticValues[e>>1]:r.values[e>>1]}const D0=Z.define(),Ld=Z.define({combine:r=>r.some(e=>e),static:!0}),V0=Z.define({combine:r=>r.length?r[0]:void 0,static:!0}),R0=Z.define(),L0=Z.define(),j0=Z.define(),F0=Z.define({combine:r=>r.length?r[0]:!1});class so{constructor(e,t){this.type=e,this.value=t}static define(){return new mS}}class mS{of(e){return new so(this,e)}}class gS{constructor(e){this.map=e}of(e){return new We(this,e)}}class We{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new We(this.type,t)}is(e){return this.type==e}static define(e={}){return new gS(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let o of e){let s=o.map(t);s&&n.push(s)}return n}}We.reconfigure=We.define();We.appendConfig=We.define();class rt{constructor(e,t,n,o,s,a){this.startState=e,this.changes=t,this.selection=n,this.effects=o,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,n&&I0(n,t.newLength),s.some(l=>l.type==rt.time)||(this.annotations=s.concat(rt.time.of(Date.now())))}static create(e,t,n,o,s,a){return new rt(e,t,n,o,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(rt.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}rt.time=so.define();rt.userEvent=so.define();rt.addToHistory=so.define();rt.remote=so.define();function yS(r,e){let t=[];for(let n=0,o=0;;){let s,a;if(n<r.length&&(o==e.length||e[o]>=r[n]))s=r[n++],a=r[n++];else if(o<e.length)s=e[o++],a=e[o++];else return t;!t.length||t[t.length-1]<s?t.push(s,a):t[t.length-1]<a&&(t[t.length-1]=a)}}function q0(r,e,t){var n;let o,s,a;return t?(o=e.changes,s=Ye.empty(e.changes.length),a=r.changes.compose(e.changes)):(o=e.changes.map(r.changes),s=r.changes.mapDesc(e.changes,!0),a=r.changes.compose(o)),{changes:a,selection:e.selection?e.selection.map(s):(n=r.selection)===null||n===void 0?void 0:n.map(o),effects:We.mapEffects(r.effects,o).concat(We.mapEffects(e.effects,s)),annotations:r.annotations.length?r.annotations.concat(e.annotations):e.annotations,scrollIntoView:r.scrollIntoView||e.scrollIntoView}}function jd(r,e,t){let n=e.selection,o=Do(e.annotations);return e.userEvent&&(o=o.concat(rt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Ye?e.changes:Ye.of(e.changes||[],t,r.facet(V0)),selection:n&&(n instanceof Y?n:Y.single(n.anchor,n.head)),effects:Do(e.effects),annotations:o,scrollIntoView:!!e.scrollIntoView}}function z0(r,e,t){let n=jd(r,e.length?e[0]:{},r.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let a=!!e[s].sequential;n=q0(n,jd(r,e[s],a?n.changes.newLength:r.doc.length),a)}let o=rt.create(r,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return bS(t?vS(o):o)}function vS(r){let e=r.startState,t=!0;for(let o of e.facet(R0)){let s=o(r);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:yS(t,s))}if(t!==!0){let o,s;if(t===!1)s=r.changes.invertedDesc,o=Ye.empty(e.doc.length);else{let a=r.changes.filter(t);o=a.changes,s=a.filtered.mapDesc(a.changes).invertedDesc}r=rt.create(e,o,r.selection&&r.selection.map(s),We.mapEffects(r.effects,s),r.annotations,r.scrollIntoView)}let n=e.facet(L0);for(let o=n.length-1;o>=0;o--){let s=n[o](r);s instanceof rt?r=s:Array.isArray(s)&&s.length==1&&s[0]instanceof rt?r=s[0]:r=z0(e,Do(s),!1)}return r}function bS(r){let e=r.startState,t=e.facet(j0),n=r;for(let o=t.length-1;o>=0;o--){let s=t[o](r);s&&Object.keys(s).length&&(n=q0(n,jd(e,s,r.changes.newLength),!0))}return n==r?r:rt.create(e,r.changes,r.selection,n.effects,n.annotations,n.scrollIntoView)}const wS=[];function Do(r){return r==null?wS:Array.isArray(r)?r:[r]}exports.CharCategory=function(r){return r[r.Word=0]="Word",r[r.Space=1]="Space",r[r.Other=2]="Other",r}(exports.CharCategory||(exports.CharCategory={}));const kS=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Fd;try{Fd=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function SS(r){if(Fd)return Fd.test(r);for(let e=0;e<r.length;e++){let t=r[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||kS.test(t)))return!0}return!1}function xS(r){return e=>{if(!/\S/.test(e))return exports.CharCategory.Space;if(SS(e))return exports.CharCategory.Word;for(let t=0;t<r.length;t++)if(e.indexOf(r[t])>-1)return exports.CharCategory.Word;return exports.CharCategory.Other}}class ve{constructor(e,t,n,o,s,a){this.config=e,this.doc=t,this.selection=n,this.values=o,this.status=e.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)ri(this,l<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return ri(this,n),fl(this,n)}update(...e){return z0(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:o}=t;for(let l of e.effects)l.is(Gl.reconfigure)?(t&&(o=new Map,t.compartments.forEach((c,d)=>o.set(d,c)),t=null),o.set(l.value.compartment,l.value.extension)):l.is(We.reconfigure)?(t=null,n=l.value):l.is(We.appendConfig)&&(t=null,n=Do(n).concat(l.value));let s;t?s=e.startState.values.slice():(t=hl.resolve(n,o,this),s=new ve(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,d)=>d.reconfigure(c,this),null).values);let a=e.startState.facet(Ld)?e.newSelection:e.newSelection.asSingle();new ve(t,e.newDoc,a,s,(l,c)=>c.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Y.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),o=this.changes(n.changes),s=[n.range],a=Do(n.effects);for(let l=1;l<t.ranges.length;l++){let c=e(t.ranges[l]),d=this.changes(c.changes),u=d.map(o);for(let f=0;f<l;f++)s[f]=s[f].map(u);let h=o.mapDesc(d,!0);s.push(c.range.map(h)),o=o.compose(u),a=We.mapEffects(a,u).concat(We.mapEffects(Do(c.effects),h))}return{changes:o,selection:Y.create(s,t.mainIndex),effects:a}}changes(e=[]){return e instanceof Ye?e:Ye.of(e,this.doc.length,this.facet(ve.lineSeparator))}toText(e){return we.of(e.split(this.facet(ve.lineSeparator)||Id))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(ri(this,t),fl(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let o=e[n];o instanceof qr&&this.config.address[o.id]!=null&&(t[n]=o.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let o=[];if(n){for(let s in n)if(Object.prototype.hasOwnProperty.call(e,s)){let a=n[s],l=e[s];o.push(a.init(c=>a.spec.fromJSON(l,c)))}}return ve.create({doc:e.doc,selection:Y.fromJSON(e.selection),extensions:t.extensions?o.concat([t.extensions]):o})}static create(e={}){let t=hl.resolve(e.extensions||[],new Map),n=e.doc instanceof we?e.doc:we.of((e.doc||"").split(t.staticFacet(ve.lineSeparator)||Id)),o=e.selection?e.selection instanceof Y?e.selection:Y.single(e.selection.anchor,e.selection.head):Y.single(0);return I0(o,n.length),t.staticFacet(Ld)||(o=o.asSingle()),new ve(t,n,o,t.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(ve.tabSize)}get lineBreak(){return this.facet(ve.lineSeparator)||`
57
+ `}get readOnly(){return this.facet(F0)}phrase(e,...t){for(let n of this.facet(ve.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,o)=>{if(o=="$")return"$";let s=+(o||1);return!s||s>t.length?n:t[s-1]})),e}languageDataAt(e,t,n=-1){let o=[];for(let s of this.facet(D0))for(let a of s(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&o.push(a[e]);return o}charCategorizer(e){return xS(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:o}=this.doc.lineAt(e),s=this.charCategorizer(e),a=e-n,l=e-n;for(;a>0;){let c=pr(t,a,!1);if(s(t.slice(c,a))!=exports.CharCategory.Word)break;a=c}for(;l<o;){let c=pr(t,l);if(s(t.slice(l,c))!=exports.CharCategory.Word)break;l=c}return a==l?null:Y.range(a+n,l+n)}}ve.allowMultipleSelections=Ld;ve.tabSize=Z.define({combine:r=>r.length?r[0]:4});ve.lineSeparator=V0;ve.readOnly=F0;ve.phrases=Z.define({compare(r,e){let t=Object.keys(r),n=Object.keys(e);return t.length==n.length&&t.every(o=>r[o]==e[o])}});ve.languageData=D0;ve.changeFilter=R0;ve.transactionFilter=L0;ve.transactionExtender=j0;Gl.reconfigure=We.define();function Jl(r,e,t={}){let n={};for(let o of r)for(let s of Object.keys(o)){let a=o[s],l=n[s];if(l===void 0)n[s]=a;else if(!(l===a||a===void 0))if(Object.hasOwnProperty.call(t,s))n[s]=t[s](l,a);else throw new Error("Config merge conflict for field "+s)}for(let o in e)n[o]===void 0&&(n[o]=e[o]);return n}class Wn{eq(e){return this==e}range(e,t=e){return qd.create(e,t,this)}}Wn.prototype.startSide=Wn.prototype.endSide=0;Wn.prototype.point=!1;Wn.prototype.mapMode=exports.MapMode.TrackDel;let qd=class H0{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new H0(e,t,n)}};function zd(r,e){return r.from-e.from||r.value.startSide-e.value.startSide}class lh{constructor(e,t,n,o){this.from=e,this.to=t,this.value=n,this.maxPoint=o}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,o=0){let s=n?this.to:this.from;for(let a=o,l=s.length;;){if(a==l)return a;let c=a+l>>1,d=s[c]-e||(n?this.value[c].endSide:this.value[c].startSide)-t;if(c==a)return d>=0?a:l;d>=0?l=c:a=c+1}}between(e,t,n,o){for(let s=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,s);s<a;s++)if(o(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let n=[],o=[],s=[],a=-1,l=-1;for(let c=0;c<this.value.length;c++){let d=this.value[c],u=this.from[c]+e,h=this.to[c]+e,f,p;if(u==h){let y=t.mapPos(u,d.startSide,d.mapMode);if(y==null||(f=p=y,d.startSide!=d.endSide&&(p=t.mapPos(u,d.endSide),p<f)))continue}else if(f=t.mapPos(u,d.startSide),p=t.mapPos(h,d.endSide),f>p||f==p&&d.startSide>0&&d.endSide<=0)continue;(p-f||d.endSide-d.startSide)<0||(a<0&&(a=f),d.point&&(l=Math.max(l,p-f)),n.push(d),o.push(f-a),s.push(p-a))}return{mapped:n.length?new lh(o,s,n,l):null,pos:a}}}class be{constructor(e,t,n,o){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=o}static create(e,t,n,o){return new be(e,t,n,o)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:o=0,filterTo:s=this.length}=e,a=e.filter;if(t.length==0&&!a)return this;if(n&&(t=t.slice().sort(zd)),this.isEmpty)return t.length?be.of(t):this;let l=new U0(this,null,-1).goto(0),c=0,d=[],u=new Ko;for(;l.value||c<t.length;)if(c<t.length&&(l.from-t[c].from||l.startSide-t[c].value.startSide)>=0){let h=t[c++];u.addInner(h.from,h.to,h.value)||d.push(h)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(l.chunkIndex)<t[c].from)&&(!a||o>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&u.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!a||o>l.to||s<l.from||a(l.from,l.to,l.value))&&(u.addInner(l.from,l.to,l.value)||d.push(qd.create(l.from,l.to,l.value))),l.next());return u.finishInner(this.nextLayer.isEmpty&&!d.length?be.empty:this.nextLayer.update({add:d,filter:a,filterFrom:o,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],o=-1;for(let a=0;a<this.chunk.length;a++){let l=this.chunkPos[a],c=this.chunk[a],d=e.touchesRange(l,l+c.length);if(d===!1)o=Math.max(o,c.maxPoint),t.push(c),n.push(e.mapPos(l));else if(d===!0){let{mapped:u,pos:h}=c.map(l,e);u&&(o=Math.max(o,u.maxPoint),t.push(u),n.push(h))}}let s=this.nextLayer.map(e);return t.length==0?s:new be(n,t,s||be.empty,o)}between(e,t,n){if(!this.isEmpty){for(let o=0;o<this.chunk.length;o++){let s=this.chunkPos[o],a=this.chunk[o];if(t>=s&&e<=s+a.length&&a.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return gi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return gi.from(e).goto(t)}static compare(e,t,n,o,s=-1){let a=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),l=t.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),c=Ep(a,l,n),d=new Is(a,c,s),u=new Is(l,c,s);n.iterGaps((h,f,p)=>$p(d,h,u,f,p,o)),n.empty&&n.length==0&&$p(d,0,u,0,0,o)}static eq(e,t,n=0,o){o==null&&(o=999999999);let s=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),a=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let l=Ep(s,a),c=new Is(s,l,0).goto(n),d=new Is(a,l,0).goto(n);for(;;){if(c.to!=d.to||!Hd(c.active,d.active)||c.point&&(!d.point||!c.point.eq(d.point)))return!1;if(c.to>o)return!0;c.next(),d.next()}}static spans(e,t,n,o,s=-1){let a=new Is(e,null,s).goto(t),l=t,c=a.openStart;for(;;){let d=Math.min(a.to,n);if(a.point){let u=a.activeForPoint(a.to),h=a.pointFrom<t?u.length+1:a.point.startSide<0?u.length:Math.min(u.length,c);o.point(l,d,a.point,u,h,a.pointRank),c=Math.min(a.openEnd(d),u.length)}else d>l&&(o.span(l,d,a.active,c),c=a.openEnd(d));if(a.to>n)return c+(a.point&&a.to>n?1:0);l=a.to,a.next()}}static of(e,t=!1){let n=new Ko;for(let o of e instanceof qd?[e]:t?CS(e):e)n.add(o.from,o.to,o.value);return n.finish()}static join(e){if(!e.length)return be.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let o=e[n];o!=be.empty;o=o.nextLayer)t=new be(o.chunkPos,o.chunk,t,Math.max(o.maxPoint,t.maxPoint));return t}}be.empty=new be([],[],null,-1);function CS(r){if(r.length>1)for(let e=r[0],t=1;t<r.length;t++){let n=r[t];if(zd(e,n)>0)return r.slice().sort(zd);e=n}return r}be.empty.nextLayer=be.empty;class Ko{finishChunk(e){this.chunks.push(new lh(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Ko)).add(e,t,n)}addInner(e,t,n){let o=e-this.lastTo||n.startSide-this.last.endSide;if(o<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return o<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(be.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=be.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Ep(r,e,t){let n=new Map;for(let s of r)for(let a=0;a<s.chunk.length;a++)s.chunk[a].maxPoint<=0&&n.set(s.chunk[a],s.chunkPos[a]);let o=new Set;for(let s of e)for(let a=0;a<s.chunk.length;a++){let l=n.get(s.chunk[a]);l!=null&&(t?t.mapPos(l):l)==s.chunkPos[a]&&!(t!=null&&t.touchesRange(l,l+s.chunk[a].length))&&o.add(s.chunk[a])}return o}class U0{constructor(e,t,n,o=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=o}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let o=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(o)||this.layer.chunkEnd(this.chunkIndex)<e||o.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let o=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<o)&&this.setRangeIndex(o)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class gi{constructor(e){this.heap=e}static from(e,t=null,n=-1){let o=[];for(let s=0;s<e.length;s++)for(let a=e[s];!a.isEmpty;a=a.nextLayer)a.maxPoint>=n&&o.push(new U0(a,t,n,s));return o.length==1?o[0]:new gi(o)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)qc(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)qc(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),qc(this.heap,0)}}}function qc(r,e){for(let t=r[e];;){let n=(e<<1)+1;if(n>=r.length)break;let o=r[n];if(n+1<r.length&&o.compare(r[n+1])>=0&&(o=r[n+1],n++),t.compare(o)<0)break;r[n]=t,r[e]=o,e=n}}class Is{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=gi.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){da(this.active,e),da(this.activeTo,e),da(this.activeRank,e),this.minActive=_p(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:o,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||o-this.activeTo[t])>0;)t++;ua(this.active,t,n),ua(this.activeTo,t,o),ua(this.activeRank,t,s),e&&ua(e,t,this.cursor.from),this.minActive=_p(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let o=this.minActive;if(o>-1&&(this.activeTo[o]-this.cursor.from||this.active[o].endSide-this.cursor.startSide)<0){if(this.activeTo[o]>e){this.to=this.activeTo[o],this.endSide=this.active[o].endSide;break}this.removeActive(o),n&&da(n,o)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let o=n.length-1;o>=0&&n[o]<e;o--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function $p(r,e,t,n,o,s){r.goto(e),t.goto(n);let a=n+o,l=n,c=n-e;for(;;){let d=r.to+c-t.to||r.endSide-t.endSide,u=d<0?r.to+c:t.to,h=Math.min(u,a);if(r.point||t.point?r.point&&t.point&&(r.point==t.point||r.point.eq(t.point))&&Hd(r.activeForPoint(r.to),t.activeForPoint(t.to))||s.comparePoint(l,h,r.point,t.point):h>l&&!Hd(r.active,t.active)&&s.compareRange(l,h,r.active,t.active),u>a)break;l=u,d<=0&&r.next(),d>=0&&t.next()}}function Hd(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!=e[t]&&!r[t].eq(e[t]))return!1;return!0}function da(r,e){for(let t=e,n=r.length-1;t<n;t++)r[t]=r[t+1];r.pop()}function ua(r,e,t){for(let n=r.length-1;n>=e;n--)r[n+1]=r[n];r[e]=t}function _p(r,e){let t=-1,n=1e9;for(let o=0;o<e.length;o++)(e[o]-n||r[o].endSide-r[t].endSide)<0&&(t=o,n=e[o]);return t}function ch(r,e,t=r.length){let n=0;for(let o=0;o<t;)r.charCodeAt(o)==9?(n+=e-n%e,o++):(n++,o=pr(r,o));return n}function ES(r,e,t,n){for(let o=0,s=0;;){if(s>=e)return o;if(o==r.length)break;s+=r.charCodeAt(o)==9?t-s%t:1,o=pr(r,o)}return n===!0?-1:r.length}const Ud="ͼ",Np=typeof Symbol>"u"?"__"+Ud:Symbol.for(Ud),Kd=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Ap=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class un{constructor(e,t){this.rules=[];let{finish:n}=t||{};function o(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,l,c,d){let u=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&h[1]=="keyframes";if(h&&l==null)return c.push(a[0]+";");for(let p in l){let y=l[p];if(/&/.test(p))s(p.split(/,\s*/).map(g=>a.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),y,c);else if(y&&typeof y=="object"){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(o(p),y,u,f)}else y!=null&&u.push(p.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+y+";")}(u.length||f)&&c.push((n&&!h&&!d?a.map(n):a).join(", ")+" {"+u.join(" ")+"}")}for(let a in e)s(o(a),e[a],this.rules)}getRules(){return this.rules.join(`
58
+ `)}static newName(){let e=Ap[Np]||1;return Ap[Np]=e+1,Ud+e.toString(36)}static mount(e,t,n){let o=e[Kd],s=n&&n.nonce;o?s&&o.setNonce(s):o=new $S(e,s),o.mount(Array.isArray(t)?t:[t])}}let Op=new Map;class $S{constructor(e,t){this.root=e;let n=e.ownerDocument||e,o=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&o.CSSStyleSheet){let s=Op.get(n);if(s)return e[Kd]=s;this.sheet=new o.CSSStyleSheet,Op.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Kd]=this}mount(e){let t=this.sheet,n=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],l=this.modules.indexOf(a);if(l<o&&l>-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,a),t)for(let c=0;c<a.rules.length;c++)t.insertRule(a.rules[c],n++)}else{for(;o<l;)n+=this.modules[o++].rules.length;n+=a.rules.length,o++}}if(t)this.root.adoptedStyleSheets.indexOf(this.sheet)<0&&(this.root.adoptedStyleSheets=[this.sheet,...this.root.adoptedStyleSheets]);else{let s="";for(let l=0;l<this.modules.length;l++)s+=this.modules[l].getRules()+`
59
+ `;this.styleTag.textContent=s;let a=this.root.head||this.root;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var hn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},yi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_S=typeof navigator<"u"&&/Mac/.test(navigator.platform),NS=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var et=0;et<10;et++)hn[48+et]=hn[96+et]=String(et);for(var et=1;et<=24;et++)hn[et+111]="F"+et;for(var et=65;et<=90;et++)hn[et]=String.fromCharCode(et+32),yi[et]=String.fromCharCode(et);for(var zc in hn)yi.hasOwnProperty(zc)||(yi[zc]=hn[zc]);function AS(r){var e=_S&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||NS&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?yi:hn)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function pl(r){let e;return r.nodeType==11?e=r.getSelection?r:r.ownerDocument:e=r,e.getSelection()}function Wd(r,e){return e?r==e||r.contains(e.nodeType!=1?e.parentNode:e):!1}function OS(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ka(r,e){if(!e.anchorNode)return!1;try{return Wd(r,e.anchorNode)}catch{return!1}}function vi(r){return r.nodeType==3?Gn(r,0,r.nodeValue.length).getClientRects():r.nodeType==1?r.getClientRects():[]}function ni(r,e,t,n){return t?Tp(r,e,t,n,-1)||Tp(r,e,t,n,1):!1}function bi(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e}function Tp(r,e,t,n,o){for(;;){if(r==t&&e==n)return!0;if(e==(o<0?0:Dr(r))){if(r.nodeName=="DIV")return!1;let s=r.parentNode;if(!s||s.nodeType!=1)return!1;e=bi(r)+(o<0?0:1),r=s}else if(r.nodeType==1){if(r=r.childNodes[e+(o<0?-1:0)],r.nodeType==1&&r.contentEditable=="false")return!1;e=o<0?Dr(r):0}else return!1}}function Dr(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function dh(r,e){let t=e?r.left:r.right;return{left:t,right:t,top:r.top,bottom:r.bottom}}function TS(r){return{left:0,right:r.innerWidth,top:0,bottom:r.innerHeight}}function K0(r,e){let t=e.width/r.offsetWidth,n=e.height/r.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-r.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-r.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function BS(r,e,t,n,o,s,a,l){let c=r.ownerDocument,d=c.defaultView||window;for(let u=r,h=!1;u&&!h;)if(u.nodeType==1){let f,p=u==c.body,y=1,g=1;if(p)f=TS(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:y,scaleY:g}=K0(u,b)),f={left:b.left,right:b.left+u.clientWidth*y,top:b.top,bottom:b.top+u.clientHeight*g}}let m=0,v=0;if(o=="nearest")e.top<f.top?(v=-(f.top-e.top+a),t>0&&e.bottom>f.bottom+v&&(v=e.bottom-f.bottom+v+a)):e.bottom>f.bottom&&(v=e.bottom-f.bottom+a,t<0&&e.top-v<f.top&&(v=-(f.top+v-e.top+a)));else{let b=e.bottom-e.top,w=f.bottom-f.top;v=(o=="center"&&b<=w?e.top+b/2-w/2:o=="start"||o=="center"&&t<0?e.top-a:e.bottom-w+a)-f.top}if(n=="nearest"?e.left<f.left?(m=-(f.left-e.left+s),t>0&&e.right>f.right+m&&(m=e.right-f.right+m+s)):e.right>f.right&&(m=e.right-f.right+s,t<0&&e.left<f.left+m&&(m=-(f.left+m-e.left+s))):m=(n=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:n=="start"==l?e.left-s:e.right-(f.right-f.left)+s)-f.left,m||v)if(p)d.scrollBy(m,v);else{let b=0,w=0;if(v){let S=u.scrollTop;u.scrollTop+=v/g,w=(u.scrollTop-S)*g}if(m){let S=u.scrollLeft;u.scrollLeft+=m/y,b=(u.scrollLeft-S)*y}e={left:e.left-b,top:e.top-w,right:e.right-b,bottom:e.bottom-w},b&&Math.abs(b-m)<1&&(n="nearest"),w&&Math.abs(w-v)<1&&(o="nearest")}if(p)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function PS(r){let e=r.ownerDocument;for(let t=r.parentNode;t&&t!=e.body;)if(t.nodeType==1){if(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class IS{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Dr(t):0),n,Math.min(e.focusOffset,n?Dr(n):0))}set(e,t,n,o){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=o}}let yo=null;function W0(r){if(r.setActive)return r.setActive();if(yo)return r.focus(yo);let e=[];for(let t=r;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(r.focus(yo==null?{get preventScroll(){return yo={preventScroll:!0},!0}}:void 0),!yo){yo=!1;for(let t=0;t<e.length;){let n=e[t++],o=e[t++],s=e[t++];n.scrollTop!=o&&(n.scrollTop=o),n.scrollLeft!=s&&(n.scrollLeft=s)}}}let Bp;function Gn(r,e,t=e){let n=Bp||(Bp=document.createRange());return n.setEnd(r,t),n.setStart(r,e),n}function Vo(r,e,t){let n={key:e,code:e,keyCode:t,which:t,cancelable:!0},o=new KeyboardEvent("keydown",n);o.synthetic=!0,r.dispatchEvent(o);let s=new KeyboardEvent("keyup",n);return s.synthetic=!0,r.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function MS(r){for(;r;){if(r&&(r.nodeType==9||r.nodeType==11&&r.host))return r;r=r.assignedSlot||r.parentNode}return null}function G0(r){for(;r.attributes.length;)r.removeAttributeNode(r.attributes[0])}function DS(r,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,Dr(t));;)if(n){if(t.nodeType!=1)return!1;let o=t.childNodes[n-1];o.contentEditable=="false"?n--:(t=o,n=Dr(t))}else{if(t==r)return!0;n=bi(t),t=t.parentNode}}function J0(r){return r.scrollTop>Math.max(1,r.scrollHeight-r.clientHeight-4)}class it{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new it(e.parentNode,bi(e),t)}static after(e,t){return new it(e.parentNode,bi(e)+1,t)}}const uh=[];class Te{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let n=this.dom,o=null,s;for(let a of this.children){if(a.flags&7){if(!a.dom&&(s=o?o.nextSibling:n.firstChild)){let l=Te.get(s);(!l||!l.parent&&l.canReuseDOM(a))&&a.reuseDOM(s)}a.sync(e,t),a.flags&=-8}if(s=o?o.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&s!=a.dom&&(t.written=!0),a.dom.parentNode==n)for(;s&&s!=a.dom;)s=Pp(s);else n.insertBefore(a.dom,s);o=a.dom}for(s=o?o.nextSibling:n.firstChild,s&&t&&t.node==n&&(t.written=!0);s;)s=Pp(s)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let o=Dr(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;o==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?o=-1:o=1),e=s}o<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Te.get(n);)n=n.nextSibling;if(!n)return this.length;for(let o=0,s=0;;o++){let a=this.children[o];if(a.dom==n)return s;s+=a.length+a.breakAfter}}domBoundsAround(e,t,n=0){let o=-1,s=-1,a=-1,l=-1;for(let c=0,d=n,u=n;c<this.children.length;c++){let h=this.children[c],f=d+h.length;if(d<e&&f>t)return h.domBoundsAround(e,t,d);if(f>=e&&o==-1&&(o=c,s=d),d>t&&h.dom.parentNode==this.dom){a=c,l=u;break}u=f,d=f+h.breakAfter}return{from:s,to:l<0?n+this.length:l,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=uh){this.markDirty();for(let o=e;o<t;o++){let s=this.children[o];s.parent==this&&n.indexOf(s)<0&&s.destroy()}this.children.splice(e,t-e,...n);for(let o=0;o<n.length;o++)n[o].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Y0(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,o,s,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Te.prototype.breakAfter=0;function Pp(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}class Y0{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function X0(r,e,t,n,o,s,a,l,c){let{children:d}=r,u=d.length?d[e]:null,h=s.length?s[s.length-1]:null,f=h?h.breakAfter:a;if(!(e==n&&u&&!a&&!f&&s.length<2&&u.merge(t,o,s.length?h:null,t==0,l,c))){if(n<d.length){let p=d[n];p&&(o<p.length||p.breakAfter&&(h!=null&&h.breakAfter))?(e==n&&(p=p.split(o),o=0),!f&&h&&p.merge(0,o,h,!0,0,c)?s[s.length-1]=p:((o||p.children.length&&!p.children[0].length)&&p.merge(0,o,null,!1,0,c),s.push(p))):p!=null&&p.breakAfter&&(h?h.breakAfter=1:a=1),n++}for(u&&(u.breakAfter=a,t>0&&(!a&&s.length&&u.merge(t,u.length,s[0],!1,l,0)?u.breakAfter=s.shift().breakAfter:(t<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(t,u.length,null,!1,l,0),e++));e<n&&s.length;)if(d[n-1].become(s[s.length-1]))n--,s.pop(),c=s.length?0:l;else if(d[e].become(s[0]))e++,s.shift(),l=s.length?0:c;else break;!s.length&&e&&n<d.length&&!d[e-1].breakAfter&&d[n].merge(0,0,d[e-1],!1,l,c)&&e--,(e<n||s.length)&&r.replaceChildren(e,n,s)}}function Q0(r,e,t,n,o,s){let a=r.childCursor(),{i:l,off:c}=a.findPos(t,1),{i:d,off:u}=a.findPos(e,-1),h=e-t;for(let f of n)h+=f.length;r.length+=h,X0(r,d,u,l,c,n,0,o,s)}let Ct=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Gd=typeof document<"u"?document:{documentElement:{style:{}}};const Jd=/Edge\/(\d+)/.exec(Ct.userAgent),Z0=/MSIE \d/.test(Ct.userAgent),Yd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ct.userAgent),Yl=!!(Z0||Yd||Jd),Ip=!Yl&&/gecko\/(\d+)/i.test(Ct.userAgent),Hc=!Yl&&/Chrome\/(\d+)/.exec(Ct.userAgent),Mp="webkitFontSmoothing"in Gd.documentElement.style,ey=!Yl&&/Apple Computer/.test(Ct.vendor),Dp=ey&&(/Mobile\/\w+/.test(Ct.userAgent)||Ct.maxTouchPoints>2);var G={mac:Dp||/Mac/.test(Ct.platform),windows:/Win/.test(Ct.platform),linux:/Linux|X11/.test(Ct.platform),ie:Yl,ie_version:Z0?Gd.documentMode||6:Yd?+Yd[1]:Jd?+Jd[1]:0,gecko:Ip,gecko_version:Ip?+(/Firefox\/(\d+)/.exec(Ct.userAgent)||[0,0])[1]:0,chrome:!!Hc,chrome_version:Hc?+Hc[1]:0,ios:Dp,android:/Android\b/.test(Ct.userAgent),webkit:Mp,safari:ey,webkit_version:Mp?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Gd.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const VS=256;class Vr extends Te{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return this.flags&8||n&&(!(n instanceof Vr)||this.length-(t-e)+n.length>VS||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Vr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new it(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return RS(this.dom,e,t)}}class Rr extends Te{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let o of t)o.setParent(this)}setAttrs(e){if(G0(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,o,s,a){return n&&(!(n instanceof Rr&&n.mark.eq(this.mark))||e&&s<=0||t<this.length&&a<=0)?!1:(Q0(this,e,t,n?n.children.slice():[],s-1,a-1),this.markDirty(),!0)}split(e){let t=[],n=0,o=-1,s=0;for(let l of this.children){let c=n+l.length;c>e&&t.push(n<e?l.split(e-n):l),o<0&&n>=e&&(o=s),n=c,s++}let a=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new Rr(this.mark,t,a)}domAtPos(e){return ty(this,e)}coordsAt(e,t){return ny(this,e,t)}}function RS(r,e,t){let n=r.nodeValue.length;e>n&&(e=n);let o=e,s=e,a=0;e==0&&t<0||e==n&&t>=0?G.chrome||G.gecko||(e?(o--,a=1):s<n&&(s++,a=-1)):t<0?o--:s<n&&s++;let l=Gn(r,o,s).getClientRects();if(!l.length)return null;let c=l[(a?a<0:t>=0)?0:l.length-1];return G.safari&&!a&&c.width==0&&(c=Array.prototype.find.call(l,d=>d.width)||c),a?dh(c,a<0):c||null}class Dn extends Te{static create(e,t,n){return new Dn(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Dn.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,o,s,a){return n&&(!(n instanceof Dn)||!this.widget.compare(n.widget)||e>0&&s<=0||t<this.length&&a<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Dn&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return we.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,o=this.posAtStart;return n?n.slice(o,o+this.length):we.empty}domAtPos(e){return(this.length?e==0:this.side>0)?it.before(this.dom):it.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let o=this.dom.getClientRects(),s=null;if(!o.length)return null;let a=this.side?this.side<0:e>0;for(let l=a?o.length-1:0;s=o[l],!(e>0?l==0:l==o.length-1||s.top<s.bottom);l+=a?-1:1);return dh(s,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Wo extends Te{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Wo&&e.side==this.side}split(){return new Wo(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?it.before(this.dom):it.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return we.empty}get isHidden(){return!0}}Vr.prototype.children=Dn.prototype.children=Wo.prototype.children=uh;function ty(r,e){let t=r.dom,{children:n}=r,o=0;for(let s=0;o<n.length;o++){let a=n[o],l=s+a.length;if(!(l==s&&a.getSide()<=0)){if(e>s&&e<l&&a.dom.parentNode==t)return a.domAtPos(e-s);if(e<=s)break;s=l}}for(let s=o;s>0;s--){let a=n[s-1];if(a.dom.parentNode==t)return a.domAtPos(a.length)}for(let s=o;s<n.length;s++){let a=n[s];if(a.dom.parentNode==t)return a.domAtPos(0)}return new it(t,0)}function ry(r,e,t){let n,{children:o}=r;t>0&&e instanceof Rr&&o.length&&(n=o[o.length-1])instanceof Rr&&n.mark.eq(e.mark)?ry(n,e.children[0],t-1):(o.push(e),e.setParent(r)),r.length+=e.length}function ny(r,e,t){let n=null,o=-1,s=null,a=-1;function l(d,u){for(let h=0,f=0;h<d.children.length&&f<=u;h++){let p=d.children[h],y=f+p.length;y>=u&&(p.children.length?l(p,u-f):(!s||s.isHidden&&t>0)&&(y>u||f==y&&p.getSide()>0)?(s=p,a=u-f):(f<u||f==y&&p.getSide()<0&&!p.isHidden)&&(n=p,o=u-f)),f=y}}l(r,e);let c=(t<0?n:s)||n||s;return c?c.coordsAt(Math.max(0,c==n?o:a),t):LS(r)}function LS(r){let e=r.dom.lastChild;if(!e)return r.dom.getBoundingClientRect();let t=vi(e);return t[t.length-1]||null}function Xd(r,e){for(let t in r)t=="class"&&e.class?e.class+=" "+r.class:t=="style"&&e.style?e.style+=";"+r.style:e[t]=r[t];return e}const Vp=Object.create(null);function hh(r,e,t){if(r==e)return!0;r||(r=Vp),e||(e=Vp);let n=Object.keys(r),o=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=o.length-(t&&o.indexOf(t)>-1?1:0))return!1;for(let s of n)if(s!=t&&(o.indexOf(s)==-1||r[s]!==e[s]))return!1;return!0}function Qd(r,e,t){let n=!1;if(e)for(let o in e)t&&o in t||(n=!0,o=="style"?r.style.cssText="":r.removeAttribute(o));if(t)for(let o in t)e&&e[o]==t[o]||(n=!0,o=="style"?r.style.cssText=t[o]:r.setAttribute(o,t[o]));return n}function jS(r){let e=Object.create(null);for(let t=0;t<r.attributes.length;t++){let n=r.attributes[t];e[n.name]=n.value}return e}class Ke extends Te{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,o,s,a){if(n){if(!(n instanceof Ke))return!1;this.dom||n.transferDOM(this)}return o&&this.setDeco(n?n.attrs:null),Q0(this,e,t,n?n.children.slice():[],s,a),!0}split(e){let t=new Ke;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:o}=this.childPos(e);o&&(t.append(this.children[n].split(o),0),this.children[n].merge(o,this.children[n].length,null,!1,0,0),n++);for(let s=n;s<this.children.length;s++)t.append(this.children[s],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){hh(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){ry(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=Xd(t,this.attrs||{})),n&&(this.attrs=Xd({class:n},this.attrs||{}))}domAtPos(e){return ty(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(G0(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Qd(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let o=this.dom.lastChild;for(;o&&Te.get(o)instanceof Rr;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((n=Te.get(o))===null||n===void 0?void 0:n.isEditable)==!1&&(!G.ios||!this.children.some(s=>s instanceof Vr))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Vr)||/[^ -~]/.test(n.text))return null;let o=vi(n.dom);if(o.length!=1)return null;e+=o[0].width,t=o[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=ny(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:o}=this.parent.view.viewState,s=n.bottom-n.top;if(Math.abs(s-o.lineHeight)<2&&o.textHeight<s){let a=(s-o.textHeight)/2;return{top:n.top+a,bottom:n.bottom-a,left:n.left,right:n.left}}}return n}become(e){return!1}covers(){return!0}static find(e,t){for(let n=0,o=0;n<e.children.length;n++){let s=e.children[n],a=o+s.length;if(a>=t){if(s instanceof Ke)return s;if(a>t)break}o=a+s.breakAfter}return null}}class ln extends Te{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,o,s,a){return n&&(!(n instanceof ln)||!this.widget.compare(n.widget)||e>0&&s<=0||t<this.length&&a<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?it.before(this.dom):it.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new ln(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return uh}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):we.empty}domBoundsAround(){return null}become(e){return e instanceof ln&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t==n?!1:e<0?t<0:n>0}}class os{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Xt=function(r){return r[r.Text=0]="Text",r[r.WidgetBefore=1]="WidgetBefore",r[r.WidgetAfter=2]="WidgetAfter",r[r.WidgetRange=3]="WidgetRange",r}(Xt||(Xt={}));class Be extends Wn{constructor(e,t,n,o){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=o}get heightRelevant(){return!1}static mark(e){return new Mi(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new fn(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,o;if(e.isBlockGap)n=-5e8,o=4e8;else{let{start:s,end:a}=oy(e,t);n=(s?t?-3e8:-1:5e8)-1,o=(a?t?2e8:1:-6e8)+1}return new fn(e,n,o,t,e.widget||null,!0)}static line(e){return new Di(e)}static set(e,t=!1){return be.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Be.none=be.empty;class Mi extends Be{constructor(e){let{start:t,end:n}=oy(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof Mi&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&hh(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Mi.prototype.point=!1;class Di extends Be{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Di&&this.spec.class==e.spec.class&&hh(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Di.prototype.mapMode=exports.MapMode.TrackBefore;Di.prototype.point=!0;class fn extends Be{constructor(e,t,n,o,s,a){super(t,n,s,e),this.block=o,this.isReplace=a,this.mapMode=o?t<=0?exports.MapMode.TrackBefore:exports.MapMode.TrackAfter:exports.MapMode.TrackDel}get type(){return this.startSide!=this.endSide?Xt.WidgetRange:this.startSide<=0?Xt.WidgetBefore:Xt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof fn&&FS(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}fn.prototype.point=!0;function oy(r,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=r;return t==null&&(t=r.inclusive),n==null&&(n=r.inclusive),{start:t??e,end:n??e}}function FS(r,e){return r==e||!!(r&&e&&r.compare(e))}function Zd(r,e,t,n=0){let o=t.length-1;o>=0&&t[o]+n>=r?t[o]=Math.max(t[o],e):t.push(r,e)}class oi{constructor(e,t,n,o){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=o,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ln&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ke),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ha(new Wo(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ln)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:a,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let o=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(ha(new Vr(this.text.slice(this.textOff,this.textOff+o)),t),n),this.atCursorPos=!0,this.textOff+=o,e-=o,n=0}}span(e,t,n,o){this.buildText(t-e,n,o),this.pos=t,this.openStart<0&&(this.openStart=o)}point(e,t,n,o,s,a){if(this.disallowBlockEffectsFor[a]&&n instanceof fn){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(n instanceof fn)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ln(n.widget||new Rp("div"),l,n));else{let c=Dn.create(n.widget||new Rp("span"),l,l?0:n.startSide),d=this.atCursorPos&&!c.isEditable&&s<=o.length&&(e<t||n.startSide>0),u=!c.isEditable&&(e<t||s>o.length||n.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!d&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(o),d&&(h.append(ha(new Wo(1),o),s),s=o.length+Math.max(0,s-o.length)),h.append(ha(c,o),s),this.atCursorPos=u,this.pendingBuffer=u?e<t||s>o.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=o.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,n,o,s){let a=new oi(e,t,n,s);return a.openEnd=be.spans(o,t,n,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function ha(r,e){for(let t of e)r=new Rr(t,[r],r.length);return r}class Rp extends os{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}exports.Direction=function(r){return r[r.LTR=0]="LTR",r[r.RTL=1]="RTL",r}(exports.Direction||(exports.Direction={}));const Jn=exports.Direction.LTR,fh=exports.Direction.RTL;function sy(r){let e=[];for(let t=0;t<r.length;t++)e.push(1<<+r[t]);return e}const qS=sy("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),zS=sy("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),eu=Object.create(null),ir=[];for(let r of["()","[]","{}"]){let e=r.charCodeAt(0),t=r.charCodeAt(1);eu[e]=t,eu[t]=-e}function iy(r){return r<=247?qS[r]:1424<=r&&r<=1524?2:1536<=r&&r<=1785?zS[r-1536]:1774<=r&&r<=2220?4:8192<=r&&r<=8204?256:64336<=r&&r<=65023?4:1}const HS=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class sn{get dir(){return this.level%2?fh:Jn}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,o){let s=-1;for(let a=0;a<e.length;a++){let l=e[a];if(l.from<=t&&l.to>=t){if(l.level==n)return a;(s<0||(o!=0?o<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function ay(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++){let n=r[t],o=e[t];if(n.from!=o.from||n.to!=o.to||n.direction!=o.direction||!ay(n.inner,o.inner))return!1}return!0}const xe=[];function US(r,e,t,n,o){for(let s=0;s<=n.length;s++){let a=s?n[s-1].to:e,l=s<n.length?n[s].from:t,c=s?256:o;for(let d=a,u=c,h=c;d<l;d++){let f=iy(r.charCodeAt(d));f==512?f=u:f==8&&h==4&&(f=16),xe[d]=f==4?2:f,f&7&&(h=f),u=f}for(let d=a,u=c,h=c;d<l;d++){let f=xe[d];if(f==128)d<l-1&&u==xe[d+1]&&u&24?f=xe[d]=u:xe[d]=256;else if(f==64){let p=d+1;for(;p<l&&xe[p]==64;)p++;let y=d&&u==8||p<t&&xe[p]==8?h==1?1:8:256;for(let g=d;g<p;g++)xe[g]=y;d=p-1}else f==8&&h==1&&(xe[d]=1);u=f,f&7&&(h=f)}}}function KS(r,e,t,n,o){let s=o==1?2:1;for(let a=0,l=0,c=0;a<=n.length;a++){let d=a?n[a-1].to:e,u=a<n.length?n[a].from:t;for(let h=d,f,p,y;h<u;h++)if(p=eu[f=r.charCodeAt(h)])if(p<0){for(let g=l-3;g>=0;g-=3)if(ir[g+1]==-p){let m=ir[g+2],v=m&2?o:m&4?m&1?s:o:0;v&&(xe[h]=xe[ir[g]]=v),l=g;break}}else{if(ir.length==189)break;ir[l++]=h,ir[l++]=f,ir[l++]=c}else if((y=xe[h])==2||y==1){let g=y==o;c=g?0:1;for(let m=l-3;m>=0;m-=3){let v=ir[m+2];if(v&2)break;if(g)ir[m+2]|=2;else{if(v&4)break;ir[m+2]|=4}}}}}function WS(r,e,t,n){for(let o=0,s=n;o<=t.length;o++){let a=o?t[o-1].to:r,l=o<t.length?t[o].from:e;for(let c=a;c<l;){let d=xe[c];if(d==256){let u=c+1;for(;;)if(u==l){if(o==t.length)break;u=t[o++].to,l=o<t.length?t[o].from:e}else if(xe[u]==256)u++;else break;let h=s==1,f=(u<e?xe[u]:n)==1,p=h==f?h?1:2:n;for(let y=u,g=o,m=g?t[g-1].to:r;y>c;)y==m&&(y=t[--g].from,m=g?t[g-1].to:r),xe[--y]=p;c=u}else s=d,c++}}}function tu(r,e,t,n,o,s,a){let l=n%2?2:1;if(n%2==o%2)for(let c=e,d=0;c<t;){let u=!0,h=!1;if(d==s.length||c<s[d].from){let g=xe[c];g!=l&&(u=!1,h=g==16)}let f=!u&&l==1?[]:null,p=u?n:n+1,y=c;e:for(;;)if(d<s.length&&y==s[d].from){if(h)break e;let g=s[d];if(!u)for(let m=g.to,v=d+1;;){if(m==t)break e;if(v<s.length&&s[v].from==m)m=s[v++].to;else{if(xe[m]==l)break e;break}}if(d++,f)f.push(g);else{g.from>c&&a.push(new sn(c,g.from,p));let m=g.direction==Jn!=!(p%2);ru(r,m?n+1:n,o,g.inner,g.from,g.to,a),c=g.to}y=g.to}else{if(y==t||(u?xe[y]!=l:xe[y]==l))break;y++}f?tu(r,c,y,n+1,o,f,a):c<y&&a.push(new sn(c,y,p)),c=y}else for(let c=t,d=s.length;c>e;){let u=!0,h=!1;if(!d||c>s[d-1].to){let g=xe[c-1];g!=l&&(u=!1,h=g==16)}let f=!u&&l==1?[]:null,p=u?n:n+1,y=c;e:for(;;)if(d&&y==s[d-1].to){if(h)break e;let g=s[--d];if(!u)for(let m=g.from,v=d;;){if(m==e)break e;if(v&&s[v-1].to==m)m=s[--v].from;else{if(xe[m-1]==l)break e;break}}if(f)f.push(g);else{g.to<c&&a.push(new sn(g.to,c,p));let m=g.direction==Jn!=!(p%2);ru(r,m?n+1:n,o,g.inner,g.from,g.to,a),c=g.from}y=g.from}else{if(y==e||(u?xe[y-1]!=l:xe[y-1]==l))break;y--}f?tu(r,y,c,n+1,o,f,a):y<c&&a.push(new sn(y,c,p)),c=y}}function ru(r,e,t,n,o,s,a){let l=e%2?2:1;US(r,o,s,n,l),KS(r,o,s,n,l),WS(o,s,n,l),tu(r,o,s,e,t,n,a)}function GS(r,e,t){if(!r)return[new sn(0,0,e==fh?1:0)];if(e==Jn&&!t.length&&!HS.test(r))return ly(r.length);if(t.length)for(;r.length>xe.length;)xe[xe.length]=256;let n=[],o=e==Jn?0:1;return ru(r,o,o,t,0,r.length,n),n}function ly(r){return[new sn(0,r,0)]}let cy="";function JS(r,e,t,n,o){var s;let a=n.head-r.from,l=sn.find(e,a,(s=n.bidiLevel)!==null&&s!==void 0?s:-1,n.assoc),c=e[l],d=c.side(o,t);if(a==d){let f=l+=o?1:-1;if(f<0||f>=e.length)return null;c=e[l=f],a=c.side(!o,t),d=c.side(o,t)}let u=pr(r.text,a,c.forward(o,t));(u<c.from||u>c.to)&&(u=d),cy=r.text.slice(Math.min(a,u),Math.max(a,u));let h=l==(o?e.length-1:0)?null:e[l+(o?1:-1)];return h&&u==d&&h.level+(o?0:1)<c.level?Y.cursor(h.side(!o,t)+r.from,h.forward(o,t)?1:-1,h.level):Y.cursor(u+r.from,c.forward(o,t)?-1:1,c.level)}function YS(r,e,t){for(let n=e;n<t;n++){let o=iy(r.charCodeAt(n));if(o==1)return Jn;if(o==2||o==4)return fh}return Jn}const dy=Z.define(),uy=Z.define(),hy=Z.define(),fy=Z.define(),nu=Z.define(),py=Z.define(),my=Z.define(),gy=Z.define({combine:r=>r.some(e=>e)}),XS=Z.define({combine:r=>r.some(e=>e)});class Ro{constructor(e,t="nearest",n="nearest",o=5,s=5,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=o,this.xMargin=s,this.isSnapshot=a}map(e){return e.empty?this:new Ro(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ro(Y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const fa=We.define({map:(r,e)=>r.map(e)});function Br(r,e,t){let n=r.facet(fy);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Xl=Z.define({combine:r=>r.length?r[0]:!0});let QS=0;const Us=Z.define();class Rt{constructor(e,t,n,o,s){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=o,this.extension=s(this)}static define(e,t){const{eventHandlers:n,eventObservers:o,provide:s,decorations:a}=t||{};return new Rt(QS++,e,n,o,l=>{let c=[Us.of(l)];return a&&c.push(wi.of(d=>{let u=d.plugin(l);return u?a(u):Be.none})),s&&c.push(s(l)),c})}static fromClass(e,t){return Rt.define(n=>new e(n),t)}}class Uc{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Br(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Br(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Br(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const yy=Z.define(),ph=Z.define(),wi=Z.define(),vy=Z.define(),mh=Z.define(),by=Z.define();function Lp(r,e){let t=r.state.facet(by);if(!t.length)return t;let n=t.map(s=>s instanceof Function?s(r):s),o=[];return be.spans(n,e.from,e.to,{point(){},span(s,a,l,c){let d=s-e.from,u=a-e.from,h=o;for(let f=l.length-1;f>=0;f--,c--){let p=l[f].spec.bidiIsolate,y;if(p==null&&(p=YS(e.text,d,u)),c>0&&h.length&&(y=h[h.length-1]).to==d&&y.direction==p)y.to=u,h=y.inner;else{let g={from:d,to:u,direction:p,inner:[]};h.push(g),h=g.inner}}}}),o}const wy=Z.define();function ky(r){let e=0,t=0,n=0,o=0;for(let s of r.state.facet(wy)){let a=s(r);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(t=Math.max(t,a.right)),a.top!=null&&(n=Math.max(n,a.top)),a.bottom!=null&&(o=Math.max(o,a.bottom)))}return{left:e,right:t,top:n,bottom:o}}const Ks=Z.define();class Mt{constructor(e,t,n,o){this.fromA=e,this.toA=t,this.fromB=n,this.toB=o}join(e){return new Mt(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let o=e[t-1];if(!(o.fromA>n.toA)){if(o.toA<n.fromA)break;n=n.join(o),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let o=0,s=0,a=0,l=0;;o++){let c=o==e.length?null:e[o],d=a-l,u=c?c.fromB:1e9;for(;s<t.length&&t[s]<u;){let h=t[s],f=t[s+1],p=Math.max(l,h),y=Math.min(u,f);if(p<=y&&new Mt(p+d,y+d,p,y).addToSet(n),f>u)break;s+=2}if(!c)return n;new Mt(c.fromA,c.toA,c.fromB,c.toB).addToSet(n),a=c.toA,l=c.toB}}}class ml{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Ye.empty(this.startState.doc.length);for(let s of n)this.changes=this.changes.compose(s.changes);let o=[];this.changes.iterChangedRanges((s,a,l,c)=>o.push(new Mt(s,a,l,c))),this.changedRanges=o}static create(e,t,n){return new ml(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class jp extends Te{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Ke],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Mt(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:d,toA:u})=>u<this.minWidthFrom||d>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let o=-1;this.view.inputState.composing>=0&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?o=this.domChanged.newSel.head:!sx(e.changes,this.hasComposition)&&!e.selectionSet&&(o=e.state.selection.main.head));let s=o>-1?ex(this.view,e.changes,o):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:d,to:u}=this.hasComposition;n=new Mt(d,u,e.changes.mapPos(d,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(G.ie||G.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,l=this.updateDeco(),c=nx(a,l,e.changes);return n=Mt.extendWithRanges(n,c),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=G.chrome||G.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||o.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof ln&&a.widget instanceof Fp&&s.push(a.dom);o.updateGaps(s)}updateChildren(e,t,n){let o=n?n.range.addToSet(e.slice()):e,s=this.childCursor(t);for(let a=o.length-1;;a--){let l=a>=0?o[a]:null;if(!l)break;let{fromA:c,toA:d,fromB:u,toB:h}=l,f,p,y,g;if(n&&n.range.fromB<h&&n.range.toB>u){let S=oi.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),x=oi.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);p=S.breakAtStart,y=S.openStart,g=x.openEnd;let k=this.compositionView(n);x.breakAtStart?k.breakAfter=1:x.content.length&&k.merge(k.length,k.length,x.content[0],!1,x.openStart,0)&&(k.breakAfter=x.content[0].breakAfter,x.content.shift()),S.content.length&&k.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat(k).concat(x.content)}else({content:f,breakAtStart:p,openStart:y,openEnd:g}=oi.build(this.view.state.doc,u,h,this.decorations,this.dynamicDecorationMap));let{i:m,off:v}=s.findPos(d,1),{i:b,off:w}=s.findPos(c,-1);X0(this,b,w,m,v,f,p,y,g)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new Vr(e.text.nodeValue);t.flags|=8;for(let{deco:o}of e.marks)t=new Rr(o,[t],t.length);let n=new Ke;return n.append(t,0),n}fixCompositionDOM(e){let t=(s,a)=>{a.flags|=8|(a.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(a);let l=Te.get(s);l&&l!=a&&(l.dom=null),a.setDOM(s)},n=this.childPos(e.range.fromB,1),o=this.children[n.i];t(e.line,o);for(let s=e.marks.length-1;s>=-1;s--)n=o.childPos(n.off,1),o=o.children[n.i],t(s>=0?e.marks[s].node:e.text,o)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,o=n==this.dom,s=!o&&Ka(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(o||t||s))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(l.anchor)),d=l.empty?c:this.moveToLine(this.domAtPos(l.head));if(G.gecko&&l.empty&&!this.hasComposition&&ZS(c)){let h=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(h,c.node.childNodes[c.offset]||null)),c=d=new it(h,0),a=!0}let u=this.view.observer.selectionRange;(a||!u.focusNode||(!ni(c.node,c.offset,u.anchorNode,u.anchorOffset)||!ni(d.node,d.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,l))&&(this.view.observer.ignore(()=>{G.android&&G.chrome&&this.dom.contains(u.focusNode)&&ox(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=pl(this.view.root);if(h)if(l.empty){if(G.gecko){let f=tx(c.node,c.offset);if(f&&f!=3){let p=xy(c.node,c.offset,f==1?1:-1);p&&(c=new it(p.node,p.offset))}}h.collapse(c.node,c.offset),l.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=l.bidiLevel)}else if(h.extend){h.collapse(c.node,c.offset);try{h.extend(d.node,d.offset)}catch{}}else{let f=document.createRange();l.anchor>l.head&&([c,d]=[d,c]),f.setEnd(d.node,d.offset),f.setStart(c.node,c.offset),h.removeAllRanges(),h.addRange(f)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(c,d)),this.impreciseAnchor=c.precise?null:new it(u.anchorNode,u.anchorOffset),this.impreciseHead=d.precise?null:new it(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&ni(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=pl(e.root),{anchorNode:o,anchorOffset:s}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=Ke.find(this,t.head);if(!a)return;let l=a.posAtStart;if(t.head==l||t.head==l+a.length)return;let c=this.coordsAt(t.head,-1),d=this.coordsAt(t.head,1);if(!c||!d||c.bottom>d.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=t.from&&n.collapse(o,s)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let o=e.offset;!n&&o<t.childNodes.length;o++){let s=Te.get(t.childNodes[o]);s instanceof Ke&&(n=s.domAtPos(0))}for(let o=e.offset-1;!n&&o>=0;o--){let s=Te.get(t.childNodes[o]);s instanceof Ke&&(n=s.domAtPos(s.length))}return n?new it(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=Te.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let o=this.children[t];if(n<o.length||o instanceof Ke)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,o=0;for(let s=this.length,a=this.children.length-1;a>=0;a--){let l=this.children[a],c=s-l.breakAfter,d=c-l.length;if(c<e)break;d<=e&&(d<e||l.covers(-1))&&(c>e||l.covers(1))&&(!n||l instanceof Ke&&!(n instanceof Ke&&t>=0))&&(n=l,o=d),s=d}return n?n.coordsAt(e-o,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),o=this.children[t];if(!(o instanceof Ke))return null;for(;o.children.length;){let{i:l,off:c}=o.childPos(n,1);for(;;l++){if(l==o.children.length)return null;if((o=o.children[l]).length)break}n=c}if(!(o instanceof Vr))return null;let s=pr(o.text,n);if(s==n)return null;let a=Gn(o.dom,n,s).getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(l==a.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:o}=e,s=this.view.contentDOM.clientWidth,a=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==exports.Direction.LTR;for(let d=0,u=0;u<this.children.length;u++){let h=this.children[u],f=d+h.length;if(f>o)break;if(d>=n){let p=h.dom.getBoundingClientRect();if(t.push(p.height),a){let y=h.dom.lastChild,g=y?vi(y):[];if(g.length){let m=g[g.length-1],v=c?m.right-p.left:p.right-m.left;v>l&&(l=v,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=f)}}}d=f+h.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?exports.Direction.RTL:exports.Direction.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ke){let a=s.measureTextSize();if(a)return a}let e=document.createElement("div"),t,n,o;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=vi(e.firstChild)[0];t=e.getBoundingClientRect().height,n=s?s.width/27:7,o=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:o}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Y0(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,o=0;;o++){let s=o==t.viewports.length?null:t.viewports[o],a=s?s.from-1:this.length;if(a>n){let l=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Be.replace({widget:new Fp(l),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!s)break;n=s.to+1}return Be.set(e)}updateDeco(){let e=this.view.state.facet(wi).map((o,s)=>(this.dynamicDecorationMap[s]=typeof o=="function")?o(this.view):o),t=!1,n=this.view.state.facet(vy).map((o,s)=>{let a=typeof o=="function";return a&&(t=!0),a?o(this.view):o});n.length&&(this.dynamicDecorationMap[e.length]=t,e.push(be.join(n)));for(let o=e.length;o<e.length+3;o++)this.dynamicDecorationMap[o]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),o;if(!n)return;!t.empty&&(o=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,o.left),top:Math.min(n.top,o.top),right:Math.max(n.right,o.right),bottom:Math.max(n.bottom,o.bottom)});let s=ky(this.view),a={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;BS(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==exports.Direction.LTR)}}function ZS(r){return r.node.nodeType==1&&r.node.firstChild&&(r.offset==0||r.node.childNodes[r.offset-1].contentEditable=="false")&&(r.offset==r.node.childNodes.length||r.node.childNodes[r.offset].contentEditable=="false")}class Fp extends os{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Sy(r,e){let t=r.observer.selectionRange,n=t.focusNode&&xy(t.focusNode,t.focusOffset,0);if(!n)return null;let o=e-n.offset;return{from:o,to:o+n.node.nodeValue.length,node:n.node}}function ex(r,e,t){let n=Sy(r,t);if(!n)return null;let{node:o,from:s,to:a}=n,l=o.nodeValue;if(/[\n\r]/.test(l)||r.state.doc.sliceString(n.from,n.to)!=l)return null;let c=e.invertedDesc,d=new Mt(c.mapPos(s),c.mapPos(a),s,a),u=[];for(let h=o.parentNode;;h=h.parentNode){let f=Te.get(h);if(f instanceof Rr)u.push({node:h,deco:f.mark});else{if(f instanceof Ke||h.nodeName=="DIV"&&h.parentNode==r.contentDOM)return{range:d,text:o,marks:u,line:h};if(h!=r.contentDOM)u.push({node:h,deco:new Mi({inclusive:!0,attributes:jS(h),tagName:h.tagName.toLowerCase()})});else return null}}}function xy(r,e,t){if(t<=0)for(let n=r,o=e;;){if(n.nodeType==3)return{node:n,offset:o};if(n.nodeType==1&&o>0)n=n.childNodes[o-1],o=Dr(n);else break}if(t>=0)for(let n=r,o=e;;){if(n.nodeType==3)return{node:n,offset:o};if(n.nodeType==1&&o<n.childNodes.length&&t>=0)n=n.childNodes[o],o=0;else break}return null}function tx(r,e){return r.nodeType!=1?0:(e&&r.childNodes[e-1].contentEditable=="false"?1:0)|(e<r.childNodes.length&&r.childNodes[e].contentEditable=="false"?2:0)}let rx=class{constructor(){this.changes=[]}compareRange(e,t){Zd(e,t,this.changes)}comparePoint(e,t){Zd(e,t,this.changes)}};function nx(r,e,t){let n=new rx;return be.compare(r,e,t,n),n.changes}function ox(r,e){for(let t=r;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function sx(r,e){let t=!1;return e&&r.iterChangedRanges((n,o)=>{n<e.to&&o>e.from&&(t=!0)}),t}function ix(r,e,t=1){let n=r.charCategorizer(e),o=r.doc.lineAt(e),s=e-o.from;if(o.length==0)return Y.cursor(e);s==0?t=1:s==o.length&&(t=-1);let a=s,l=s;t<0?a=pr(o.text,s,!1):l=pr(o.text,s);let c=n(o.text.slice(a,l));for(;a>0;){let d=pr(o.text,a,!1);if(n(o.text.slice(d,a))!=c)break;a=d}for(;l<o.length;){let d=pr(o.text,l);if(n(o.text.slice(l,d))!=c)break;l=d}return Y.range(a+o.from,l+o.from)}function ax(r,e){return e.left>r?e.left-r:Math.max(0,r-e.right)}function lx(r,e){return e.top>r?e.top-r:Math.max(0,r-e.bottom)}function Kc(r,e){return r.top<e.bottom-1&&r.bottom>e.top+1}function qp(r,e){return e<r.top?{top:e,left:r.left,right:r.right,bottom:r.bottom}:r}function zp(r,e){return e>r.bottom?{top:r.top,left:r.left,right:r.right,bottom:e}:r}function ou(r,e,t){let n,o,s,a,l=!1,c,d,u,h;for(let y=r.firstChild;y;y=y.nextSibling){let g=vi(y);for(let m=0;m<g.length;m++){let v=g[m];o&&Kc(o,v)&&(v=qp(zp(v,o.bottom),o.top));let b=ax(e,v),w=lx(t,v);if(b==0&&w==0)return y.nodeType==3?Hp(y,e,t):ou(y,e,t);if(!n||a>w||a==w&&s>b){n=y,o=v,s=b,a=w;let S=w?t<v.top?-1:1:b?e<v.left?-1:1:0;l=!S||(S>0?m<g.length-1:m>0)}b==0?t>v.bottom&&(!u||u.bottom<v.bottom)?(c=y,u=v):t<v.top&&(!h||h.top>v.top)&&(d=y,h=v):u&&Kc(u,v)?u=zp(u,v.bottom):h&&Kc(h,v)&&(h=qp(h,v.top))}}if(u&&u.bottom>=t?(n=c,o=u):h&&h.top<=t&&(n=d,o=h),!n)return{node:r,offset:0};let f=Math.max(o.left,Math.min(o.right,e));if(n.nodeType==3)return Hp(n,f,t);if(l&&n.contentEditable!="false")return ou(n,f,t);let p=Array.prototype.indexOf.call(r.childNodes,n)+(e>=(o.left+o.right)/2?1:0);return{node:r,offset:p}}function Hp(r,e,t){let n=r.nodeValue.length,o=-1,s=1e9,a=0;for(let l=0;l<n;l++){let c=Gn(r,l,l+1).getClientRects();for(let d=0;d<c.length;d++){let u=c[d];if(u.top==u.bottom)continue;a||(a=e-u.left);let h=(u.top>t?u.top-t:t-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&h<s){let f=e>=(u.left+u.right)/2,p=f;if((G.chrome||G.gecko)&&Gn(r,l).getBoundingClientRect().left==u.right&&(p=!f),h<=0)return{node:r,offset:l+(p?1:0)};o=l+(p?1:0),s=h}}}return{node:r,offset:o>-1?o:a>0?r.nodeValue.length:0}}function Cy(r,e,t,n=-1){var o,s;let a=r.contentDOM.getBoundingClientRect(),l=a.top+r.viewState.paddingTop,c,{docHeight:d}=r.viewState,{x:u,y:h}=e,f=h-l;if(f<0)return 0;if(f>d)return r.state.doc.length;for(let S=r.viewState.heightOracle.textHeight/2,x=!1;c=r.elementAtHeight(f),c.type!=Xt.Text;)for(;f=n>0?c.bottom+S:c.top-S,!(f>=0&&f<=d);){if(x)return t?null:0;x=!0,n=-n}h=l+f;let p=c.from;if(p<r.viewport.from)return r.viewport.from==0?0:t?null:Up(r,a,c,u,h);if(p>r.viewport.to)return r.viewport.to==r.state.doc.length?r.state.doc.length:t?null:Up(r,a,c,u,h);let y=r.dom.ownerDocument,g=r.root.elementFromPoint?r.root:y,m=g.elementFromPoint(u,h);m&&!r.contentDOM.contains(m)&&(m=null),m||(u=Math.max(a.left+1,Math.min(a.right-1,u)),m=g.elementFromPoint(u,h),m&&!r.contentDOM.contains(m)&&(m=null));let v,b=-1;if(m&&((o=r.docView.nearest(m))===null||o===void 0?void 0:o.isEditable)!=!1){if(y.caretPositionFromPoint){let S=y.caretPositionFromPoint(u,h);S&&({offsetNode:v,offset:b}=S)}else if(y.caretRangeFromPoint){let S=y.caretRangeFromPoint(u,h);S&&({startContainer:v,startOffset:b}=S,(!r.contentDOM.contains(v)||G.safari&&cx(v,b,u)||G.chrome&&dx(v,b,u))&&(v=void 0))}}if(!v||!r.docView.dom.contains(v)){let S=Ke.find(r.docView,p);if(!S)return f>c.top+c.height/2?c.to:c.from;({node:v,offset:b}=ou(S.dom,u,h))}let w=r.docView.nearest(v);if(!w)return null;if(w.isWidget&&((s=w.dom)===null||s===void 0?void 0:s.nodeType)==1){let S=w.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?w.posAtStart:w.posAtEnd}else return w.localPosFromDOM(v,b)+w.posAtStart}function Up(r,e,t,n,o){let s=Math.round((n-e.left)*r.defaultCharacterWidth);if(r.lineWrapping&&t.height>r.defaultLineHeight*1.5){let l=r.viewState.heightOracle.textHeight,c=Math.floor((o-t.top-(r.defaultLineHeight-l)*.5)/l);s+=c*r.viewState.heightOracle.lineLength}let a=r.state.sliceDoc(t.from,t.to);return t.from+ES(a,s,r.state.tabSize)}function cx(r,e,t){let n;if(r.nodeType!=3||e!=(n=r.nodeValue.length))return!1;for(let o=r.nextSibling;o;o=o.nextSibling)if(o.nodeType!=1||o.nodeName!="BR")return!1;return Gn(r,n-1,n).getBoundingClientRect().left>t}function dx(r,e,t){if(e!=0)return!1;for(let o=r;;){let s=o.parentNode;if(!s||s.nodeType!=1||s.firstChild!=o)return!1;if(s.classList.contains("cm-line"))break;o=s}let n=r.nodeType==1?r.getBoundingClientRect():Gn(r,0,Math.max(r.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function ux(r,e){let t=r.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==Xt.Text))return n}return t}function hx(r,e,t,n){let o=ux(r,e.head),s=!n||o.type!=Xt.Text||!(r.lineWrapping||o.widgetLineBreaks)?null:r.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head);if(s){let a=r.dom.getBoundingClientRect(),l=r.textDirectionAt(o.from),c=r.posAtCoords({x:t==(l==exports.Direction.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(c!=null)return Y.cursor(c,t?-1:1)}return Y.cursor(t?o.to:o.from,t?-1:1)}function Kp(r,e,t,n){let o=r.state.doc.lineAt(e.head),s=r.bidiSpans(o),a=r.textDirectionAt(o.from);for(let l=e,c=null;;){let d=JS(o,s,a,l,t),u=cy;if(!d){if(o.number==(t?r.state.doc.lines:1))return l;u=`
60
+ `,o=r.state.doc.line(o.number+(t?1:-1)),s=r.bidiSpans(o),d=r.visualLineSide(o,!t)}if(c){if(!c(u))return l}else{if(!n)return d;c=n(u)}l=d}}function fx(r,e,t){let n=r.state.charCategorizer(e),o=n(t);return s=>{let a=n(s);return o==exports.CharCategory.Space&&(o=a),o==a}}function px(r,e,t,n){let o=e.head,s=t?1:-1;if(o==(t?r.state.doc.length:0))return Y.cursor(o,e.assoc);let a=e.goalColumn,l,c=r.contentDOM.getBoundingClientRect(),d=r.coordsAtPos(o,e.assoc||-1),u=r.documentTop;if(d)a==null&&(a=d.left-c.left),l=s<0?d.top:d.bottom;else{let p=r.viewState.lineBlockAt(o);a==null&&(a=Math.min(c.right-c.left,r.defaultCharacterWidth*(o-p.from))),l=(s<0?p.top:p.bottom)+u}let h=c.left+a,f=n??r.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let y=l+(f+p)*s,g=Cy(r,{x:h,y},!1,s);if(y<c.top||y>c.bottom||(s<0?g<o:g>o)){let m=r.docView.coordsForChar(g),v=!m||y<m.top?-1:1;return Y.cursor(g,v,void 0,a)}}}function Wa(r,e,t){for(;;){let n=0;for(let o of r)o.between(e-1,e+1,(s,a,l)=>{if(e>s&&e<a){let c=n||t||(e-s<a-e?-1:1);e=c<0?s:a,n=c}});if(!n)return e}}function Wc(r,e,t){let n=Wa(r.state.facet(mh).map(o=>o(r)),t.from,e.head>t.from?-1:1);return n==t.from?t:Y.cursor(n,n<t.from?1:-1)}class mx{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,G.safari&&e.contentDOM.addEventListener("input",()=>null),G.gecko&&Tx(e.contentDOM.ownerDocument)}handleEvent(e){!xx(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let o of n.observers)o(this.view,t);for(let o of n.handlers){if(t.defaultPrevented)break;if(o(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=gx(e),n=this.handlers,o=this.view.contentDOM;for(let s in t)if(s!="scroll"){let a=!t[s].handlers.length,l=n[s];l&&a!=!l.handlers.length&&(o.removeEventListener(s,this.handleEvent),l=null),l||o.addEventListener(s,this.handleEvent,{passive:a})}for(let s in n)s!="scroll"&&!t[s]&&o.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&$y.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),G.android&&G.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return G.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Ey.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||yx.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Vo(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:G.safari&&!G.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Wp(r,e){return(t,n)=>{try{return e.call(r,n,t)}catch(o){Br(t.state,o)}}}function gx(r){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of r){let o=n.spec;if(o&&o.domEventHandlers)for(let s in o.domEventHandlers){let a=o.domEventHandlers[s];a&&t(s).handlers.push(Wp(n.value,a))}if(o&&o.domEventObservers)for(let s in o.domEventObservers){let a=o.domEventObservers[s];a&&t(s).observers.push(Wp(n.value,a))}}for(let n in Qt)t(n).handlers.push(Qt[n]);for(let n in Zt)t(n).observers.push(Zt[n]);return e}const Ey=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],yx="dthko",$y=[16,17,18,20,91,92,224,225],pa=6;function ma(r){return Math.max(0,r)*.7+8}function vx(r,e){return Math.max(Math.abs(r.clientX-e.clientX),Math.abs(r.clientY-e.clientY))}class bx{constructor(e,t,n,o){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=PS(e.contentDOM),this.atoms=e.state.facet(mh).map(a=>a(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ve.allowMultipleSelections)&&wx(e,t),this.dragging=Sx(e,t)&&Oy(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&vx(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,o=0,s=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=ky(this.view);e.clientX-a.left<=s.left+pa?n=-ma(s.left-e.clientX):e.clientX+a.right>=s.right-pa&&(n=ma(e.clientX-s.right)),e.clientY-a.top<=s.top+pa?o=-ma(s.top-e.clientY):e.clientY+a.bottom>=s.bottom-pa&&(o=ma(e.clientY-s.bottom)),this.setScrollSpeed(n,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let o=e.ranges[n],s=null;if(o.empty){let a=Wa(this.atoms,o.from,0);a!=o.from&&(s=Y.cursor(a,-1))}else{let a=Wa(this.atoms,o.from,-1),l=Wa(this.atoms,o.to,1);(a!=o.from||l!=o.to)&&(s=Y.range(o.from==o.anchor?a:l,o.from==o.head?a:l))}s&&(t||(t=e.ranges.slice()),t[n]=s)}return t?Y.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function wx(r,e){let t=r.state.facet(dy);return t.length?t[0](e):G.mac?e.metaKey:e.ctrlKey}function kx(r,e){let t=r.state.facet(uy);return t.length?t[0](e):G.mac?!e.altKey:!e.ctrlKey}function Sx(r,e){let{main:t}=r.state.selection;if(t.empty)return!1;let n=pl(r.root);if(!n||n.rangeCount==0)return!0;let o=n.getRangeAt(0).getClientRects();for(let s=0;s<o.length;s++){let a=o[s];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function xx(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=r.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Te.get(t))&&n.ignoreEvent(e))return!1;return!0}const Qt=Object.create(null),Zt=Object.create(null),_y=G.ie&&G.ie_version<15||G.ios&&G.webkit_version<604;function Cx(r){let e=r.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{r.focus(),t.remove(),Ny(r,t.value)},50)}function Ny(r,e){let{state:t}=r,n,o=1,s=t.toText(e),a=s.lines==t.selection.ranges.length;if(su!=null&&t.selection.ranges.every(c=>c.empty)&&su==s.toString()){let c=-1;n=t.changeByRange(d=>{let u=t.doc.lineAt(d.from);if(u.from==c)return{range:d};c=u.from;let h=t.toText((a?s.line(o++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:h},range:Y.cursor(d.from+h.length)}})}else a?n=t.changeByRange(c=>{let d=s.line(o++);return{changes:{from:c.from,to:c.to,insert:d.text},range:Y.cursor(c.from+d.length)}}):n=t.replaceSelection(s);r.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Zt.scroll=r=>{r.inputState.lastScrollTop=r.scrollDOM.scrollTop,r.inputState.lastScrollLeft=r.scrollDOM.scrollLeft};Qt.keydown=(r,e)=>(r.inputState.setSelectionOrigin("select"),e.keyCode==27&&(r.inputState.lastEscPress=Date.now()),!1);Zt.touchstart=(r,e)=>{r.inputState.lastTouchTime=Date.now(),r.inputState.setSelectionOrigin("select.pointer")};Zt.touchmove=r=>{r.inputState.setSelectionOrigin("select.pointer")};Qt.mousedown=(r,e)=>{if(r.observer.flush(),r.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of r.state.facet(hy))if(t=n(r,e),t)break;if(!t&&e.button==0&&(t=_x(r,e)),t){let n=!r.hasFocus;r.inputState.startMouseSelection(new bx(r,e,t,n)),n&&r.observer.ignore(()=>W0(r.contentDOM));let o=r.inputState.mouseSelection;if(o)return o.start(e),o.dragging===!1}return!1};function Gp(r,e,t,n){if(n==1)return Y.cursor(e,t);if(n==2)return ix(r.state,e,t);{let o=Ke.find(r.docView,e),s=r.state.doc.lineAt(o?o.posAtEnd:e),a=o?o.posAtStart:s.from,l=o?o.posAtEnd:s.to;return l<r.state.doc.length&&l==s.to&&l++,Y.range(a,l)}}let Ay=(r,e)=>r>=e.top&&r<=e.bottom,Jp=(r,e,t)=>Ay(e,t)&&r>=t.left&&r<=t.right;function Ex(r,e,t,n){let o=Ke.find(r.docView,e);if(!o)return 1;let s=e-o.posAtStart;if(s==0)return 1;if(s==o.length)return-1;let a=o.coordsAt(s,-1);if(a&&Jp(t,n,a))return-1;let l=o.coordsAt(s,1);return l&&Jp(t,n,l)?1:a&&Ay(n,a)?-1:1}function Yp(r,e){let t=r.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:Ex(r,t,e.clientX,e.clientY)}}const $x=G.ie&&G.ie_version<=11;let Xp=null,Qp=0,Zp=0;function Oy(r){if(!$x)return r.detail;let e=Xp,t=Zp;return Xp=r,Zp=Date.now(),Qp=!e||t>Date.now()-400&&Math.abs(e.clientX-r.clientX)<2&&Math.abs(e.clientY-r.clientY)<2?(Qp+1)%3:1}function _x(r,e){let t=Yp(r,e),n=Oy(e),o=r.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),o=o.map(s.changes))},get(s,a,l){let c=Yp(r,s),d,u=Gp(r,c.pos,c.bias,n);if(t.pos!=c.pos&&!a){let h=Gp(r,t.pos,t.bias,n),f=Math.min(h.from,u.from),p=Math.max(h.to,u.to);u=f<u.from?Y.range(f,p):Y.range(p,f)}return a?o.replaceRange(o.main.extend(u.from,u.to)):l&&n==1&&o.ranges.length>1&&(d=Nx(o,c.pos))?d:l?o.addRange(u):Y.create([u])}}}function Nx(r,e){for(let t=0;t<r.ranges.length;t++){let{from:n,to:o}=r.ranges[t];if(n<=e&&o>=e)return Y.create(r.ranges.slice(0,t).concat(r.ranges.slice(t+1)),r.mainIndex==t?0:r.mainIndex-(r.mainIndex>t?1:0))}return null}Qt.dragstart=(r,e)=>{let{selection:{main:t}}=r.state;if(e.target.draggable){let o=r.docView.nearest(e.target);if(o&&o.isWidget){let s=o.posAtStart,a=s+o.length;(s>=t.to||a<=t.from)&&(t=Y.range(s,a))}}let{inputState:n}=r;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",r.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Qt.dragend=r=>(r.inputState.draggedContent=null,!1);function em(r,e,t,n){if(!t)return;let o=r.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=r.inputState,a=n&&s&&kx(r,e)?{from:s.from,to:s.to}:null,l={from:o,insert:t},c=r.state.changes(a?[a,l]:l);r.focus(),r.dispatch({changes:c,selection:{anchor:c.mapPos(o,-1),head:c.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),r.inputState.draggedContent=null}Qt.drop=(r,e)=>{if(!e.dataTransfer)return!1;if(r.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),o=0,s=()=>{++o==t.length&&em(r,e,n.filter(a=>a!=null).join(r.state.lineBreak),!1)};for(let a=0;a<t.length;a++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(n[a]=l.result),s()},l.readAsText(t[a])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return em(r,e,n,!0),!0}return!1};Qt.paste=(r,e)=>{if(r.state.readOnly)return!0;r.observer.flush();let t=_y?null:e.clipboardData;return t?(Ny(r,t.getData("text/plain")||t.getData("text/uri-text")),!0):(Cx(r),!1)};function Ax(r,e){let t=r.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),r.focus()},50)}function Ox(r){let e=[],t=[],n=!1;for(let o of r.selection.ranges)o.empty||(e.push(r.sliceDoc(o.from,o.to)),t.push(o));if(!e.length){let o=-1;for(let{from:s}of r.selection.ranges){let a=r.doc.lineAt(s);a.number>o&&(e.push(a.text),t.push({from:a.from,to:Math.min(r.doc.length,a.to+1)})),o=a.number}n=!0}return{text:e.join(r.lineBreak),ranges:t,linewise:n}}let su=null;Qt.copy=Qt.cut=(r,e)=>{let{text:t,ranges:n,linewise:o}=Ox(r.state);if(!t&&!o)return!1;su=o?t:null,e.type=="cut"&&!r.state.readOnly&&r.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let s=_y?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(Ax(r,t),!1)};const Ty=so.define();function By(r,e){let t=[];for(let n of r.facet(my)){let o=n(r,e);o&&t.push(o)}return t?r.update({effects:t,annotations:Ty.of(!0)}):null}function Py(r){setTimeout(()=>{let e=r.hasFocus;if(e!=r.inputState.notifiedFocused){let t=By(r.state,e);t?r.dispatch(t):r.update([])}},10)}Zt.focus=r=>{r.inputState.lastFocusTime=Date.now(),!r.scrollDOM.scrollTop&&(r.inputState.lastScrollTop||r.inputState.lastScrollLeft)&&(r.scrollDOM.scrollTop=r.inputState.lastScrollTop,r.scrollDOM.scrollLeft=r.inputState.lastScrollLeft),Py(r)};Zt.blur=r=>{r.observer.clearSelectionRange(),Py(r)};Zt.compositionstart=Zt.compositionupdate=r=>{r.inputState.compositionFirstChange==null&&(r.inputState.compositionFirstChange=!0),r.inputState.composing<0&&(r.inputState.composing=0)};Zt.compositionend=r=>{r.inputState.composing=-1,r.inputState.compositionEndedAt=Date.now(),r.inputState.compositionPendingKey=!0,r.inputState.compositionPendingChange=r.observer.pendingRecords().length>0,r.inputState.compositionFirstChange=null,G.chrome&&G.android?r.observer.flushSoon():r.inputState.compositionPendingChange?Promise.resolve().then(()=>r.observer.flush()):setTimeout(()=>{r.inputState.composing<0&&r.docView.hasComposition&&r.update([])},50)};Zt.contextmenu=r=>{r.inputState.lastContextMenu=Date.now()};Qt.beforeinput=(r,e)=>{var t;let n;if(G.chrome&&G.android&&(n=Ey.find(o=>o.inputType==e.inputType))&&(r.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let o=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>o+10&&r.hasFocus&&(r.contentDOM.blur(),r.focus())},100)}return!1};const tm=new Set;function Tx(r){tm.has(r)||(tm.add(r),r.addEventListener("copy",()=>{}),r.addEventListener("cut",()=>{}))}const rm=["pre-wrap","normal","pre-line","break-spaces"];class Bx{constructor(e){this.lineWrapping=e,this.doc=we.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return rm.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let o=e[n];o<0?n++:this.heightSamples[Math.floor(o*10)]||(t=!0,this.heightSamples[Math.floor(o*10)]=!0)}return t}refresh(e,t,n,o,s,a){let l=rm.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=n,this.textHeight=o,this.lineLength=s,c){this.heightSamples={};for(let d=0;d<a.length;d++){let u=a[d];u<0?d++:this.heightSamples[Math.floor(u*10)]=!0}}return c}}class Px{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class hr{constructor(e,t,n,o,s){this.from=e,this.length=t,this.top=n,this.height=o,this._content=s}get type(){return typeof this._content=="number"?Xt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof fn?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new hr(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ae=function(r){return r[r.ByPos=0]="ByPos",r[r.ByHeight=1]="ByHeight",r[r.ByPosNoHeight=2]="ByPosNoHeight",r}(Ae||(Ae={}));const Ga=.001;class pt{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Ga&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return pt.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,o){let s=this,a=n.doc;for(let l=o.length-1;l>=0;l--){let{fromA:c,toA:d,fromB:u,toB:h}=o[l],f=s.lineAt(c,Ae.ByPosNoHeight,n.setDoc(t),0,0),p=f.to>=d?f:s.lineAt(d,Ae.ByPosNoHeight,n,0,0);for(h+=p.to-d,d=p.to;l>0&&f.from<=o[l-1].toA;)c=o[l-1].fromA,u=o[l-1].fromB,l--,c<f.from&&(f=s.lineAt(c,Ae.ByPosNoHeight,n,0,0));u+=f.from-c,c=f.from;let y=gh.build(n.setDoc(a),e,u,h);s=s.replace(c,d,y)}return s.updateHeight(n,0)}static empty(){return new St(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,o=0,s=0;for(;;)if(t==n)if(o>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),n+=1+l.break,o-=l.size}else if(s>o*2){let l=e[n];l.break?e.splice(n,1,l.left,null,l.right):e.splice(n,1,l.left,l.right),n+=2+l.break,s-=l.size}else break;else if(o<s){let l=e[t++];l&&(o+=l.size)}else{let l=e[--n];l&&(s+=l.size)}let a=0;return e[t-1]==null?(a=1,t--):e[t]==null&&(a=1,n++),new Ix(pt.of(e.slice(0,t)),a,pt.of(e.slice(n)))}}pt.prototype.size=1;class Iy extends pt{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,o){return new hr(o,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,o,s){return this.blockAt(0,n,o,s)}forEachLine(e,t,n,o,s,a){e<=s+this.length&&t>=s&&a(this.blockAt(0,n,o,s))}updateHeight(e,t=0,n=!1,o){return o&&o.from<=t&&o.more&&this.setHeight(e,o.heights[o.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class St extends Iy{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,o){return new hr(o,this.length,n,this.height,this.breaks)}replace(e,t,n){let o=n[0];return n.length==1&&(o instanceof St||o instanceof Ze&&o.flags&4)&&Math.abs(this.length-o.length)<10?(o instanceof Ze?o=new St(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):pt.of(n)}updateHeight(e,t=0,n=!1,o){return o&&o.from<=t&&o.more?this.setHeight(e,o.heights[o.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ze extends pt{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,s=o-n+1,a,l=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*s);a=c/s,this.length>s+1&&(l=(this.height-c)/(this.length-s-1))}else a=this.height/s;return{firstLine:n,lastLine:o,perLine:a,perChar:l}}blockAt(e,t,n,o){let{firstLine:s,lastLine:a,perLine:l,perChar:c}=this.heightMetrics(t,o);if(t.lineWrapping){let d=o+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),u=t.doc.lineAt(d),h=l+u.length*c,f=Math.max(n,e-h/2);return new hr(u.from,u.length,f,h,0)}else{let d=Math.max(0,Math.min(a-s,Math.floor((e-n)/l))),{from:u,length:h}=t.doc.line(s+d);return new hr(u,h,n+l*d,l,0)}}lineAt(e,t,n,o,s){if(t==Ae.ByHeight)return this.blockAt(e,n,o,s);if(t==Ae.ByPosNoHeight){let{from:p,to:y}=n.doc.lineAt(e);return new hr(p,y-p,0,0,0)}let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(n,s),d=n.doc.lineAt(e),u=l+d.length*c,h=d.number-a,f=o+l*h+c*(d.from-s-h);return new hr(d.from,d.length,Math.max(o,Math.min(f,o+this.height-u)),u,0)}forEachLine(e,t,n,o,s,a){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:l,perLine:c,perChar:d}=this.heightMetrics(n,s);for(let u=e,h=o;u<=t;){let f=n.doc.lineAt(u);if(u==e){let y=f.number-l;h+=c*y+d*(e-s-y)}let p=c+d*f.length;a(new hr(f.from,f.length,h,p,0)),h+=p,u=f.to+1}}replace(e,t,n){let o=this.length-t;if(o>0){let s=n[n.length-1];s instanceof Ze?n[n.length-1]=new Ze(s.length+o):n.push(null,new Ze(o-1))}if(e>0){let s=n[0];s instanceof Ze?n[0]=new Ze(e+s.length):n.unshift(new Ze(e-1),null)}return pt.of(n)}decomposeLeft(e,t){t.push(new Ze(e-1),null)}decomposeRight(e,t){t.push(null,new Ze(this.length-e-1))}updateHeight(e,t=0,n=!1,o){let s=t+this.length;if(o&&o.from<=t+this.length&&o.more){let a=[],l=Math.max(t,o.from),c=-1;for(o.from>t&&a.push(new Ze(o.from-t-1).updateHeight(e,t));l<=s&&o.more;){let u=e.doc.lineAt(l).length;a.length&&a.push(null);let h=o.heights[o.index++];c==-1?c=h:Math.abs(h-c)>=Ga&&(c=-2);let f=new St(u,h);f.outdated=!1,a.push(f),l+=u+1}l<=s&&a.push(null,new Ze(s-l).updateHeight(e,l));let d=pt.of(a);return(c<0||Math.abs(d.height-this.height)>=Ga||Math.abs(c-this.heightMetrics(e,t).perLine)>=Ga)&&(e.heightChanged=!0),d}else(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Ix extends pt{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,o){let s=n+this.left.height;return e<s?this.left.blockAt(e,t,n,o):this.right.blockAt(e,t,s,o+this.left.length+this.break)}lineAt(e,t,n,o,s){let a=o+this.left.height,l=s+this.left.length+this.break,c=t==Ae.ByHeight?e<a:e<l,d=c?this.left.lineAt(e,t,n,o,s):this.right.lineAt(e,t,n,a,l);if(this.break||(c?d.to<l:d.from>l))return d;let u=t==Ae.ByPosNoHeight?Ae.ByPosNoHeight:Ae.ByPos;return c?d.join(this.right.lineAt(l,u,n,a,l)):this.left.lineAt(l,u,n,o,s).join(d)}forEachLine(e,t,n,o,s,a){let l=o+this.left.height,c=s+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,n,o,s,a),t>=c&&this.right.forEachLine(e,t,n,l,c,a);else{let d=this.lineAt(c,Ae.ByPos,n,o,s);e<d.from&&this.left.forEachLine(e,d.from-1,n,o,s,a),d.to>=e&&d.from<=t&&a(d),t>d.to&&this.right.forEachLine(d.to+1,t,n,l,c,a)}}replace(e,t,n){let o=this.left.length+this.break;if(t<o)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-o,t-o,n));let s=[];e>0&&this.decomposeLeft(e,s);let a=s.length;for(let l of n)s.push(l);if(e>0&&nm(s,a-1),t<this.length){let l=s.length;this.decomposeRight(t,s),nm(s,l)}return pt.of(s)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,o=n+this.break;if(e>=o)return this.right.decomposeRight(e-o,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<o&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?pt.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,o){let{left:s,right:a}=this,l=t+s.length+this.break,c=null;return o&&o.from<=t+s.length&&o.more?c=s=s.updateHeight(e,t,n,o):s.updateHeight(e,t,n),o&&o.from<=l+a.length&&o.more?c=a=a.updateHeight(e,l,n,o):a.updateHeight(e,l,n),c?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function nm(r,e){let t,n;r[e]==null&&(t=r[e-1])instanceof Ze&&(n=r[e+1])instanceof Ze&&r.splice(e-1,3,new Ze(t.length+1+n.length))}const Mx=5;class gh{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof St?o.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new St(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let o=n.widget?n.widget.estimatedHeight:0,s=n.widget?n.widget.lineBreaks:0;o<0&&(o=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new Iy(a,o,n)):(a||s||o>=Mx)&&this.addLineDeco(o,s,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new St(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new Ze(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof St)return e;let t=new St(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let o=this.ensureLine();o.length+=n,o.collapsed+=n,o.widgetHeight=Math.max(o.widgetHeight,e),o.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof St)&&!this.isCovered?this.nodes.push(new St(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let o of this.nodes)o instanceof St&&o.updateHeight(this.oracle,n),n+=o?o.length:1;return this.nodes}static build(e,t,n,o){let s=new gh(n,e);return be.spans(t,n,o,s,0),s.finish(n)}}function Dx(r,e,t){let n=new Vx;return be.compare(r,e,t,n,0),n.changes}class Vx{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,o){(e<t||n&&n.heightRelevant||o&&o.heightRelevant)&&Zd(e,t,this.changes,5)}}function Rx(r,e){let t=r.getBoundingClientRect(),n=r.ownerDocument,o=n.defaultView||window,s=Math.max(0,t.left),a=Math.min(o.innerWidth,t.right),l=Math.max(0,t.top),c=Math.min(o.innerHeight,t.bottom);for(let d=r.parentNode;d&&d!=n.body;)if(d.nodeType==1){let u=d,h=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&h.overflow!="visible"){let f=u.getBoundingClientRect();s=Math.max(s,f.left),a=Math.min(a,f.right),l=Math.max(l,f.top),c=d==r.parentNode?f.bottom:Math.min(c,f.bottom)}d=h.position=="absolute"||h.position=="fixed"?u.offsetParent:u.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:s-t.left,right:Math.max(s,a)-t.left,top:l-(t.top+e),bottom:Math.max(l,c)-(t.top+e)}}function Lx(r,e){let t=r.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gc{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let o=e[n],s=t[n];if(o.from!=s.from||o.to!=s.to||o.size!=s.size)return!1}return!0}draw(e,t){return Be.replace({widget:new jx(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class jx extends os{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class om{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=sm,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=exports.Direction.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(ph).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new Bx(t),this.stateDeco=e.facet(wi).filter(n=>typeof n!="function"),this.heightMap=pt.empty().applyChanges(this.stateDeco,we.empty,this.heightOracle.setDoc(e.doc),[new Mt(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Be.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let o=n?t.head:t.anchor;if(!e.some(({from:s,to:a})=>o>=s&&o<=a)){let{from:s,to:a}=this.lineBlockAt(o);e.push(new ga(s,a))}}this.viewports=e.sort((n,o)=>n.from-o.from),this.scaler=this.heightMap.height<=7e6?sm:new zx(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Ws(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(wi).filter(u=>typeof u!="function");let o=e.changedRanges,s=Mt.extendWithRanges(o,Dx(n,this.stateDeco,e?e.changes:Ye.empty(this.state.doc.length))),a=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=a&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let c=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let d=!e.changes.empty||e.flags&2||c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,this.updateForViewport(),d&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(XS)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),o=this.heightOracle,s=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?exports.Direction.RTL:exports.Direction.LTR;let a=this.heightOracle.mustRefreshForWrapping(s),l=t.getBoundingClientRect(),c=a||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let d=0,u=0;if(l.width&&l.height){let{scaleX:S,scaleY:x}=K0(t,l);(this.scaleX!=S||this.scaleY!=x)&&(this.scaleX=S,this.scaleY=x,d|=8,a=c=!0)}let h=(parseInt(n.paddingTop)||0)*this.scaleY,f=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,d|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,d|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=J0(e.scrollDOM);let y=(this.printing?Lx:Rx)(t,this.paddingTop),g=y.top-this.pixelViewport.top,m=y.bottom-this.pixelViewport.bottom;this.pixelViewport=y;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(c=!0)),!this.inView&&!this.scrollTarget)return 0;let b=l.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,d|=8),c){let S=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(S)&&(a=!0),a||o.lineWrapping&&Math.abs(b-this.contentDOMWidth)>o.charWidth){let{lineHeight:x,charWidth:k,textHeight:C}=e.docView.measureTextSize();a=x>0&&o.refresh(s,x,k,C,b/k,S),a&&(e.docView.minWidth=0,d|=8)}g>0&&m>0?u=Math.max(g,m):g<0&&m<0&&(u=Math.min(g,m)),o.heightChanged=!1;for(let x of this.viewports){let k=x.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(x);this.heightMap=(a?pt.empty().applyChanges(this.stateDeco,we.empty,this.heightOracle,[new Mt(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,a,new Px(x.from,k))}o.heightChanged&&(d|=2)}let w=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(d&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),d|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),d}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),o=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:l}=this,c=new ga(o.lineAt(a-n*1e3,Ae.ByHeight,s,0,0).from,o.lineAt(l+(1-n)*1e3,Ae.ByHeight,s,0,0).to);if(t){let{head:d}=t.range;if(d<c.from||d>c.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=o.lineAt(d,Ae.ByPos,s,0,0),f;t.y=="center"?f=(h.top+h.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&d<c.from?f=h.top:f=h.bottom-u,c=new ga(o.lineAt(f-1e3/2,Ae.ByHeight,s,0,0).from,o.lineAt(f+u+1e3/2,Ae.ByHeight,s,0,0).to)}}return c}mapViewport(e,t){let n=t.mapPos(e.from,-1),o=t.mapPos(e.to,1);return new ga(this.heightMap.lineAt(n,Ae.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(o,Ae.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:o}=this.heightMap.lineAt(e,Ae.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,Ae.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:l}=this;return(e==0||o<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(n,250)))&&o>a-2*1e3&&s<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let o of e)t.touchesRange(o.from,o.to)||n.push(new Gc(t.mapPos(o.from),t.mapPos(o.to),o.size));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,o=n?1e4:2e3,s=o>>1,a=o<<1;if(this.defaultTextDirection!=exports.Direction.LTR&&!n)return[];let l=[],c=(d,u,h,f)=>{if(u-d<s)return;let p=this.state.selection.main,y=[p.from];p.empty||y.push(p.to);for(let m of y)if(m>d&&m<u){c(d,m-10,h,f),c(m+10,u,h,f);return}let g=qx(e,m=>m.from>=h.from&&m.to<=h.to&&Math.abs(m.from-d)<s&&Math.abs(m.to-u)<s&&!y.some(v=>m.from<v&&m.to>v));if(!g){if(u<h.to&&t&&n&&t.visibleRanges.some(m=>m.from<=u&&m.to>=u)){let m=t.moveToLineBoundary(Y.cursor(u),!1,!0).head;m>d&&(u=m)}g=new Gc(d,u,this.gapSize(h,d,u,f))}l.push(g)};for(let d of this.viewportLines){if(d.length<a)continue;let u=Fx(d.from,d.to,this.stateDeco);if(u.total<a)continue;let h=this.scrollTarget?this.scrollTarget.range.head:null,f,p;if(n){let y=o/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,m;if(h!=null){let v=va(u,h),b=((this.visibleBottom-this.visibleTop)/2+y)/d.height;g=v-b,m=v+b}else g=(this.visibleTop-d.top-y)/d.height,m=(this.visibleBottom-d.top+y)/d.height;f=ya(u,g),p=ya(u,m)}else{let y=u.total*this.heightOracle.charWidth,g=o*this.heightOracle.charWidth,m,v;if(h!=null){let b=va(u,h),w=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/y;m=b-w,v=b+w}else m=(this.pixelViewport.left-g)/y,v=(this.pixelViewport.right+g)/y;f=ya(u,m),p=ya(u,v)}f>d.from&&c(d.from,f,d,u),p<d.to&&c(p,d.to,d,u)}return l}gapSize(e,t,n,o){let s=va(o,n)-va(o,t);return this.heightOracle.lineWrapping?e.height*s:o.total*this.heightOracle.charWidth*s}updateLineGaps(e){Gc.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Be.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];be.spans(e,this.viewport.from,this.viewport.to,{span(o,s){t.push({from:o,to:s})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((o,s)=>o.from!=t[s].from||o.to!=t[s].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ws(this.heightMap.lineAt(e,Ae.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Ws(this.heightMap.lineAt(this.scaler.fromDOM(e),Ae.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Ws(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ga{constructor(e,t){this.from=e,this.to=t}}function Fx(r,e,t){let n=[],o=r,s=0;return be.spans(t,r,e,{span(){},point(a,l){a>o&&(n.push({from:o,to:a}),s+=a-o),o=l}},20),o<e&&(n.push({from:o,to:e}),s+=e-o),{total:s,ranges:n}}function ya({total:r,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(r*t);for(let o=0;;o++){let{from:s,to:a}=e[o],l=a-s;if(n<=l)return s+n;n-=l}}function va(r,e){let t=0;for(let{from:n,to:o}of r.ranges){if(e<=o){t+=e-n;break}t+=o-n}return t/r.total}function qx(r,e){for(let t of r)if(e(t))return t}const sm={toDOM(r){return r},fromDOM(r){return r},scale:1};class zx{constructor(e,t,n){let o=0,s=0,a=0;this.viewports=n.map(({from:l,to:c})=>{let d=t.lineAt(l,Ae.ByPos,e,0,0).top,u=t.lineAt(c,Ae.ByPos,e,0,0).bottom;return o+=u-d,{from:l,to:c,top:d,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-o)/(t.height-o);for(let l of this.viewports)l.domTop=a+(l.top-s)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,n=0,o=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return o+(e-n)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);n=s.bottom,o=s.domBottom}}fromDOM(e){for(let t=0,n=0,o=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return n+(e-o)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);n=s.bottom,o=s.domBottom}}}function Ws(r,e){if(e.scale==1)return r;let t=e.toDOM(r.top),n=e.toDOM(r.bottom);return new hr(r.from,r.length,t,n-t,Array.isArray(r._content)?r._content.map(o=>Ws(o,e)):r._content)}const ba=Z.define({combine:r=>r.join(" ")}),iu=Z.define({combine:r=>r.indexOf(!0)>-1}),au=un.newName(),My=un.newName(),Dy=un.newName(),Vy={"&light":"."+My,"&dark":"."+Dy};function lu(r,e,t){return new un(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,o=>{if(o=="&")return r;if(!t||!t[o])throw new RangeError(`Unsupported selector: ${o}`);return t[o]}):r+" "+n}})}const Hx=lu("."+au,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Vy),Gs="￿";class Ux{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ve.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Gs}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let o=e;;){this.findPointBefore(n,o);let s=this.text.length;this.readNode(o);let a=o.nextSibling;if(a==t)break;let l=Te.get(o),c=Te.get(a);(l&&c?l.breakAfter:(l?l.breakAfter:im(o))||im(a)&&(o.nodeName!="BR"||o.cmIgnore)&&this.text.length>s)&&this.lineBreak(),o=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,o=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(l=o.exec(t))&&(s=l.index,a=l[0].length),this.append(t.slice(n,s<0?t.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=a-1);n=s+a}}readNode(e){if(e.cmIgnore)return;let t=Te.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let o=n.iter();!o.next().done;)o.lineBreak?this.lineBreak():this.append(o.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Kx(e,n.node,n.offset)?t:0))}}function Kx(r,e,t){for(;;){if(!e||t<Dr(e))return!1;if(e==r)return!0;t=bi(e)+1,e=e.parentNode}}function im(r){return r.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName)}class am{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Wx{constructor(e,t,n,o){this.typeOver=o,this.bounds=null,this.text="";let{impreciseHead:s,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let l=s||a?[]:Yx(e),c=new Ux(l,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=Xx(l,this.bounds.from)}else{let l=e.observer.selectionRange,c=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!Wd(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),d=a&&a.node==l.anchorNode&&a.offset==l.anchorOffset||!Wd(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),u=e.viewport;if((G.ios||G.chrome)&&e.state.selection.main.empty&&c!=d&&(u.from>0||u.to<e.state.doc.length)){let h=Math.min(c,d),f=Math.max(c,d),p=u.from-h,y=u.to-f;(p==0||p==1||h==0)&&(y==0||y==-1||f==e.state.doc.length)&&(c=0,d=e.state.doc.length)}this.newSel=Y.single(d,c)}}}function Ry(r,e){let t,{newSel:n}=e,o=r.state.selection.main,s=r.inputState.lastKeyTime>Date.now()-100?r.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:l}=e.bounds,c=o.from,d=null;(s===8||G.android&&e.text.length<l-a)&&(c=o.to,d="end");let u=Jx(r.state.doc.sliceString(a,l,Gs),e.text,c-a,d);u&&(G.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Gs+Gs&&u.toB--,t={from:a+u.from,to:a+u.toA,insert:we.of(e.text.slice(u.from,u.toB).split(Gs))})}else n&&(!r.hasFocus&&r.state.facet(Xl)||n.main.eq(o))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!o.empty&&n&&n.main.empty?t={from:o.from,to:o.to,insert:r.state.doc.slice(o.from,o.to)}:t&&t.from>=o.from&&t.to<=o.to&&(t.from!=o.from||t.to!=o.to)&&o.to-o.from-(t.to-t.from)<=4?t={from:o.from,to:o.to,insert:r.state.doc.slice(o.from,t.from).append(t.insert).append(r.state.doc.slice(t.to,o.to))}:(G.mac||G.android)&&t&&t.from==t.to&&t.from==o.head-1&&/^\. ?$/.test(t.insert.toString())&&r.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=Y.single(n.main.anchor-1,n.main.head-1)),t={from:o.from,to:o.to,insert:we.of([" "])}):G.chrome&&t&&t.from==t.to&&t.from==o.head&&t.insert.toString()==`
61
+ `&&r.lineWrapping&&(n&&(n=Y.single(n.main.anchor-1,n.main.head-1)),t={from:o.from,to:o.to,insert:we.of([" "])}),t){if(G.ios&&r.inputState.flushIOSKey()||G.android&&(t.from==o.from&&t.to==o.to&&t.insert.length==1&&t.insert.lines==2&&Vo(r.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&t.insert.length==0||s==8&&t.insert.length<t.to-t.from&&t.to>o.head)&&Vo(r.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&t.insert.length==0&&Vo(r.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();r.inputState.composing>=0&&r.inputState.composing++;let l,c=()=>l||(l=Gx(r,t,n));return r.state.facet(py).some(d=>d(r,t.from,t.to,a,c))||r.dispatch(c()),!0}else if(n&&!n.main.eq(o)){let a=!1,l="select";return r.inputState.lastSelectionTime>Date.now()-50&&(r.inputState.lastSelectionOrigin=="select"&&(a=!0),l=r.inputState.lastSelectionOrigin),r.dispatch({selection:n,scrollIntoView:a,userEvent:l}),!0}else return!1}function Gx(r,e,t){let n,o=r.state,s=o.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&r.inputState.composing<0){let l=s.from<e.from?o.sliceDoc(s.from,e.from):"",c=s.to>e.to?o.sliceDoc(e.to,s.to):"";n=o.replaceSelection(r.state.toText(l+e.insert.sliceString(0,void 0,r.state.lineBreak)+c))}else{let l=o.changes(e),c=t&&t.main.to<=l.newLength?t.main:void 0;if(o.selection.ranges.length>1&&r.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let d=r.state.sliceDoc(e.from,e.to),u,h=t&&Sy(r,t.main.head);if(h){let y=e.insert.length-(e.to-e.from);u={from:h.from,to:h.to-y}}else u=r.state.doc.lineAt(s.head);let f=s.to-e.to,p=s.to-s.from;n=o.changeByRange(y=>{if(y.from==s.from&&y.to==s.to)return{changes:l,range:c||y.map(l)};let g=y.to-f,m=g-d.length;if(y.to-y.from!=p||r.state.sliceDoc(m,g)!=d||y.to>=u.from&&y.from<=u.to)return{range:y};let v=o.changes({from:m,to:g,insert:e.insert}),b=y.to-s.to;return{changes:v,range:c?Y.range(Math.max(0,c.anchor+b),Math.max(0,c.head+b)):y.map(v)}})}else n={changes:l,selection:c&&o.selection.replaceRange(c)}}let a="input.type";return(r.composing||r.inputState.compositionPendingChange&&r.inputState.compositionEndedAt>Date.now()-50)&&(r.inputState.compositionPendingChange=!1,a+=".compose",r.inputState.compositionFirstChange&&(a+=".start",r.inputState.compositionFirstChange=!1)),o.update(n,{userEvent:a,scrollIntoView:!0})}function Jx(r,e,t,n){let o=Math.min(r.length,e.length),s=0;for(;s<o&&r.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==o&&r.length==e.length)return null;let a=r.length,l=e.length;for(;a>0&&l>0&&r.charCodeAt(a-1)==e.charCodeAt(l-1);)a--,l--;if(n=="end"){let c=Math.max(0,s-Math.min(a,l));t-=a+c-s}if(a<s&&r.length<e.length){let c=t<=s&&t>=a?s-t:0;s-=c,l=s+(l-a),a=s}else if(l<s){let c=t<=s&&t>=l?s-t:0;s-=c,a=s+(a-l),l=s}return{from:s,toA:a,toB:l}}function Yx(r){let e=[];if(r.root.activeElement!=r.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:o,focusOffset:s}=r.observer.selectionRange;return t&&(e.push(new am(t,n)),(o!=t||s!=n)&&e.push(new am(o,s))),e}function Xx(r,e){if(r.length==0)return null;let t=r[0].pos,n=r.length==2?r[1].pos:t;return t>-1&&n>-1?Y.single(t+e,n+e):null}const Qx={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Jc=G.ie&&G.ie_version<=11;class Zx{constructor(e){this.view=e,this.active=!1,this.selectionRange=new IS,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(G.ie&&G.ie_version<=11||G.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),Jc&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,o=this.selectionRange;if(n.state.facet(Xl)?n.root.activeElement!=this.dom:!Ka(n.dom,o))return;let s=o.anchorNode&&n.docView.nearest(o.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(G.ie&&G.ie_version<=11||G.android&&G.chrome)&&!n.state.selection.main.empty&&o.focusNode&&ni(o.focusNode,o.focusOffset,o.anchorNode,o.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=G.safari&&e.root.nodeType==11&&OS(this.dom.ownerDocument)==this.dom&&e2(this.view)||pl(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=Ka(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&DS(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Qx),Jc&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Jc&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let o=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Vo(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(o)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,o=!1;for(let s of e){let a=this.readMutation(s);a&&(a.typeOver&&(o=!0),t==-1?{from:t,to:n}=a:(t=Math.min(a.from,t),n=Math.max(a.to,n)))}return{from:t,to:n,typeOver:o}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),o=this.selectionChanged&&Ka(this.dom,this.selectionRange);if(e<0&&!o)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Wx(this.view,e,t,n);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,o=Ry(this.view,t);return this.view.state==n&&this.view.update([]),o}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=lm(t,e.previousSibling||e.target.previousSibling,-1),o=lm(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:o?t.posBefore(o):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function lm(r,e,t){for(;e;){let n=Te.get(e);if(n&&n.parent==r)return n;let o=e.parentNode;e=o!=r.dom?o:t>0?e.nextSibling:e.previousSibling}return null}function e2(r){let e=null;function t(c){c.preventDefault(),c.stopImmediatePropagation(),e=c.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",t,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let n=e.startContainer,o=e.startOffset,s=e.endContainer,a=e.endOffset,l=r.docView.domAtPos(r.state.selection.main.anchor);return ni(l.node,l.offset,s,a)&&([n,o,s,a]=[s,a,n,o]),{anchorNode:n,anchorOffset:o,focusNode:s,focusOffset:a}}class ue{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(n=>n.forEach(o=>t(o,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||MS(e.parent)||document,this.viewState=new om(e.state||ve.create(e)),e.scrollTo&&e.scrollTo.is(fa)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Us).map(n=>new Uc(n));for(let n of this.plugins)n.update(this);this.observer=new Zx(this),this.inputState=new mx(this),this.inputState.ensureHandlers(this.plugins),this.docView=new jp(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let t=e.length==1&&e[0]instanceof rt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,o,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,l=0,c=null;e.some(f=>f.annotation(Ty))?(this.inputState.notifiedFocused=a,l=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,c=By(s,a),c||(l=1));let d=this.observer.delayedAndroidKey,u=null;if(d?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(ve.phrases)!=this.state.facet(ve.phrases))return this.setState(s);o=ml.create(this,s,e),o.flags|=l;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:p}=f.state.selection;h=new Ro(p.empty?p:Y.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of f.effects)p.is(fa)&&(h=p.value.clip(this.state))}this.viewState.update(o,h),this.bidiCache=gl.update(this.bidiCache,o.changes),o.empty||(this.updatePlugins(o),this.inputState.update(o)),t=this.docView.update(o),this.state.facet(Ks)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(o.startState.facet(ba)!=o.state.facet(ba)&&(this.viewState.mustMeasureContent=!0),(t||n||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!o.empty)for(let f of this.state.facet(nu))try{f(o)}catch(p){Br(this.state,p,"update listener")}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Ry(this,u)&&d.force&&Vo(this.contentDOM,d.key,d.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new om(e),this.plugins=e.facet(Us).map(n=>new Uc(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new jp(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Us),n=e.state.facet(Us);if(t!=n){let o=[];for(let s of n){let a=t.indexOf(s);if(a<0)o.push(new Uc(s));else{let l=this.plugins[a];l.mustUpdate=e,o.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=o,this.pluginMap.clear()}else for(let o of this.plugins)o.mustUpdate=e;for(let o=0;o<this.plugins.length;o++)this.plugins[o].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,o=n.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(o-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(a<0)if(J0(n))s=-1,a=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(o);s=p.from,a=p.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];c&4||([this.measureRequests,d]=[d,this.measureRequests]);let u=d.map(p=>{try{return p.read(this)}catch(y){return Br(this.state,y),cm}}),h=ml.create(this,this.state,[]),f=!1;h.flags|=c,t?t.flags|=c:t=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h));for(let p=0;p<d.length;p++)if(u[p]!=cm)try{let y=d[p];y.write&&y.write(u[p],this)}catch(y){Br(this.state,y)}if(f&&this.docView.updateSelection(!0),!h.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let y=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-a;if(y>1||y<-1){o=o+y,n.scrollTop=o/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(nu))l(t)}get themeClasses(){return au+" "+(this.state.facet(iu)?Dy:My)+" "+this.state.facet(ba)}updateAttrs(){let e=dm(this,yy,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Xl)?"true":"false",class:"cm-content",style:`${G.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),dm(this,ph,t);let n=this.observer.ignore(()=>{let o=Qd(this.contentDOM,this.contentAttrs,t),s=Qd(this.dom,this.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let o of n.effects)if(o.is(ue.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=o.value}}mountStyles(){this.styleModules=this.state.facet(Ks);let e=this.state.facet(ue.cspNonce);un.mount(this.root,this.styleModules.concat(Hx).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(n=>n.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Wc(this,e,Kp(this,e,t,n))}moveByGroup(e,t){return Wc(this,e,Kp(this,e,t,n=>fx(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),o=this.textDirectionAt(e.from),s=n[t?n.length-1:0];return Y.cursor(s.side(t,o)+e.from,s.forward(!t,o)?1:-1)}moveToLineBoundary(e,t,n=!0){return hx(this,e,t,n)}moveVertically(e,t,n){return Wc(this,e,px(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Cy(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let o=this.state.doc.lineAt(e),s=this.bidiSpans(o),a=s[sn.find(s,e-o.from,-1,t)];return dh(n,a.dir==exports.Direction.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(gy)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>t2)return ly(e.length);let t=this.textDirectionAt(e.from),n;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||ay(s.isolates,n=Lp(this,e))))return s.order;n||(n=Lp(this,e));let o=GS(e.text,t,n);return this.bidiCache.push(new gl(e.from,e.to,t,n,!0,o)),o}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||G.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{W0(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return fa.of(new Ro(typeof e=="number"?Y.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return fa.of(new Ro(Y.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return Rt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Rt.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=un.newName(),o=[ba.of(n),Ks.of(lu(`.${n}`,e))];return t&&t.dark&&o.push(iu.of(!0)),o}static baseTheme(e){return Wl.lowest(Ks.of(lu("."+au,e,Vy)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),o=n&&Te.get(n)||Te.get(e);return((t=o==null?void 0:o.rootView)===null||t===void 0?void 0:t.view)||null}}ue.styleModule=Ks;ue.inputHandler=py;ue.focusChangeEffect=my;ue.perLineTextDirection=gy;ue.exceptionSink=fy;ue.updateListener=nu;ue.editable=Xl;ue.mouseSelectionStyle=hy;ue.dragMovesSelection=uy;ue.clickAddsSelectionRange=dy;ue.decorations=wi;ue.outerDecorations=vy;ue.atomicRanges=mh;ue.bidiIsolatedRanges=by;ue.scrollMargins=wy;ue.darkTheme=iu;ue.cspNonce=Z.define({combine:r=>r.length?r[0]:""});ue.contentAttributes=ph;ue.editorAttributes=yy;ue.lineWrapping=ue.contentAttributes.of({class:"cm-lineWrapping"});ue.announce=We.define();const t2=4096,cm={};class gl{constructor(e,t,n,o,s,a){this.from=e,this.to=t,this.dir=n,this.isolates=o,this.fresh=s,this.order=a}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let n=[],o=e.length?e[e.length-1].dir:exports.Direction.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let a=e[s];a.dir==o&&!t.touchesRange(a.from,a.to)&&n.push(new gl(t.mapPos(a.from,1),t.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return n}}function dm(r,e,t){for(let n=r.state.facet(e),o=n.length-1;o>=0;o--){let s=n[o],a=typeof s=="function"?s(r):s;a&&Xd(a,t)}return t}const r2=G.mac?"mac":G.windows?"win":G.linux?"linux":"key";function n2(r,e){const t=r.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let o,s,a,l;for(let c=0;c<t.length-1;++c){const d=t[c];if(/^(cmd|meta|m)$/i.test(d))l=!0;else if(/^a(lt)?$/i.test(d))o=!0;else if(/^(c|ctrl|control)$/i.test(d))s=!0;else if(/^s(hift)?$/i.test(d))a=!0;else if(/^mod$/i.test(d))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+d)}return o&&(n="Alt-"+n),s&&(n="Ctrl-"+n),l&&(n="Meta-"+n),a&&(n="Shift-"+n),n}function wa(r,e,t){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t!==!1&&e.shiftKey&&(r="Shift-"+r),r}const o2=Wl.default(ue.domEventHandlers({keydown(r,e){return l2(s2(e.state),r,e,"editor")}})),Ly=Z.define({enables:o2}),um=new WeakMap;function s2(r){let e=r.facet(Ly),t=um.get(e);return t||um.set(e,t=a2(e.reduce((n,o)=>n.concat(o),[]))),t}let rn=null;const i2=4e3;function a2(r,e=r2){let t=Object.create(null),n=Object.create(null),o=(a,l)=>{let c=n[a];if(c==null)n[a]=l;else if(c!=l)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,l,c,d,u)=>{var h,f;let p=t[a]||(t[a]=Object.create(null)),y=l.split(/ (?!$)/).map(v=>n2(v,e));for(let v=1;v<y.length;v++){let b=y.slice(0,v).join(" ");o(b,!0),p[b]||(p[b]={preventDefault:!0,stopPropagation:!1,run:[w=>{let S=rn={view:w,prefix:b,scope:a};return setTimeout(()=>{rn==S&&(rn=null)},i2),!0}]})}let g=y.join(" ");o(g,!1);let m=p[g]||(p[g]={preventDefault:!1,stopPropagation:!1,run:((f=(h=p._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});c&&m.run.push(c),d&&(m.preventDefault=!0),u&&(m.stopPropagation=!0)};for(let a of r){let l=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let d of l){let u=t[d]||(t[d]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let h in u)u[h].run.push(a.any)}let c=a[e]||a.key;if(c)for(let d of l)s(d,c,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(d,"Shift-"+c,a.shift,a.preventDefault,a.stopPropagation)}return t}function l2(r,e,t,n){let o=AS(e),s=Mo(o,0),a=ul(s)==o.length&&o!=" ",l="",c=!1,d=!1,u=!1;rn&&rn.view==t&&rn.scope==n&&(l=rn.prefix+" ",$y.indexOf(e.keyCode)<0&&(d=!0,rn=null));let h=new Set,f=m=>{if(m){for(let v of m.run)if(!h.has(v)&&(h.add(v),v(t,e)))return m.stopPropagation&&(u=!0),!0;m.preventDefault&&(m.stopPropagation&&(u=!0),d=!0)}return!1},p=r[n],y,g;return p&&(f(p[l+wa(o,e,!a)])?c=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(G.windows&&e.ctrlKey&&e.altKey)&&(y=hn[e.keyCode])&&y!=o?(f(p[l+wa(y,e,!0)])||e.shiftKey&&(g=yi[e.keyCode])!=o&&g!=y&&f(p[l+wa(g,e,!1)]))&&(c=!0):a&&e.shiftKey&&f(p[l+wa(o,e,!0)])&&(c=!0),!c&&f(p._any)&&(c=!0)),d&&(c=!0),c&&u&&e.stopPropagation(),c}const c2=!G.ios,hm={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};c2&&(hm[".cm-line"].caretColor="transparent !important",hm[".cm-content"]={caretColor:"transparent !important"});function fm(r,e,t,n,o){e.lastIndex=0;for(let s=r.iterRange(t,n),a=t,l;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)o(a+l.index,l)}function d2(r,e){let t=r.visibleRanges;if(t.length==1&&t[0].from==r.viewport.from&&t[0].to==r.viewport.to)return t;let n=[];for(let{from:o,to:s}of t)o=Math.max(r.state.doc.lineAt(o).from,o-e),s=Math.min(r.state.doc.lineAt(s).to,s+e),n.length&&n[n.length-1].to>=o?n[n.length-1].to=s:n.push({from:o,to:s});return n}class jy{constructor(e){const{regexp:t,decoration:n,decorate:o,boundary:s,maxLength:a=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,o)this.addMatch=(l,c,d,u)=>o(u,d,d+l[0].length,l,c);else if(typeof n=="function")this.addMatch=(l,c,d,u)=>{let h=n(l,c,d);h&&u(d,d+l[0].length,h)};else if(n)this.addMatch=(l,c,d,u)=>u(d,d+l[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(e){let t=new Ko,n=t.add.bind(t);for(let{from:o,to:s}of d2(e,this.maxLength))fm(e.state.doc,this.regexp,o,s,(a,l)=>this.addMatch(l,e,a,n));return t.finish()}updateDeco(e,t){let n=1e9,o=-1;return e.docChanged&&e.changes.iterChanges((s,a,l,c)=>{c>e.view.viewport.from&&l<e.view.viewport.to&&(n=Math.min(l,n),o=Math.max(c,o))}),e.viewportChanged||o-n>1e3?this.createDeco(e.view):o>-1?this.updateRange(e.view,t.map(e.changes),n,o):t}updateRange(e,t,n,o){for(let s of e.visibleRanges){let a=Math.max(s.from,n),l=Math.min(s.to,o);if(l>a){let c=e.state.doc.lineAt(a),d=c.to<l?e.state.doc.lineAt(l):c,u=Math.max(s.from,c.from),h=Math.min(s.to,d.to);if(this.boundary){for(;a>c.from;a--)if(this.boundary.test(c.text[a-1-c.from])){u=a;break}for(;l<d.to;l++)if(this.boundary.test(d.text[l-d.from])){h=l;break}}let f=[],p,y=(g,m,v)=>f.push(v.range(g,m));if(c==d)for(this.regexp.lastIndex=u-c.from;(p=this.regexp.exec(c.text))&&p.index<h-c.from;)this.addMatch(p,e,p.index+c.from,y);else fm(e.state.doc,this.regexp,u,h,(g,m)=>this.addMatch(m,e,g,y));t=t.update({filterFrom:u,filterTo:h,filter:(g,m)=>g<u||m>h,add:f})}}return t}}const cu=/x/.unicode!=null?"gu":"g",u2=new RegExp(`[\0-\b
62
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,cu),h2={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Yc=null;function f2(){var r;if(Yc==null&&typeof document<"u"&&document.body){let e=document.body.style;Yc=((r=e.tabSize)!==null&&r!==void 0?r:e.MozTabSize)!=null}return Yc||!1}const Ja=Z.define({combine(r){let e=Jl(r,{render:null,specialChars:u2,addSpecialChars:null});return(e.replaceTabs=!f2())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,cu)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,cu)),e}});function p2(r={}){return[Ja.of(r),m2()]}let pm=null;function m2(){return pm||(pm=Rt.fromClass(class{constructor(r){this.view=r,this.decorations=Be.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(r.state.facet(Ja)),this.decorations=this.decorator.createDeco(r)}makeDecorator(r){return new jy({regexp:r.specialChars,decoration:(e,t,n)=>{let{doc:o}=t.state,s=Mo(e[0],0);if(s==9){let a=o.lineAt(n),l=t.state.tabSize,c=ch(a.text,l,n-a.from);return Be.replace({widget:new b2((l-c%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Be.replace({widget:new v2(r,s)}))},boundary:r.replaceTabs?void 0:/[^]/})}update(r){let e=r.state.facet(Ja);r.startState.facet(Ja)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(r.view)):this.decorations=this.decorator.updateDeco(r,this.decorations)}},{decorations:r=>r.decorations}))}const g2="•";function y2(r){return r>=32?g2:r==10?"␤":String.fromCharCode(9216+r)}class v2 extends os{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=y2(this.code),n=e.state.phrase("Control character")+" "+(h2[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,n,t);if(o)return o;let s=document.createElement("span");return s.textContent=t,s.title=n,s.setAttribute("aria-label",n),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class b2 extends os{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const Ms="-10000px";class w2{constructor(e,t,n,o){this.facet=t,this.createTooltipView=n,this.removeTooltipView=o,this.input=e.state.facet(t),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=n(a,s))}update(e,t){var n;let o=e.state.facet(this.facet),s=o.filter(c=>c);if(o===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let a=[],l=t?[]:null;for(let c=0;c<s.length;c++){let d=s[c],u=-1;if(d){for(let h=0;h<this.tooltips.length;h++){let f=this.tooltips[h];f&&f.create==d.create&&(u=h)}if(u<0)a[c]=this.createTooltipView(d,c?a[c-1]:null),l&&(l[c]=!!d.above);else{let h=a[c]=this.tooltipViews[u];l&&(l[c]=t[u]),h.update&&h.update(e)}}}for(let c of this.tooltipViews)a.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(l.forEach((c,d)=>t[d]=c),t.length=l.length),this.input=o,this.tooltips=s,this.tooltipViews=a,!0}}function k2(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Xc=Z.define({combine:r=>{var e,t,n;return{position:G.ios?"absolute":((e=r.find(o=>o.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(o=>o.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=r.find(o=>o.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||k2}}}),mm=new WeakMap,Fy=Rt.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet(Xc);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new w2(r,qy,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,n=r.state.facet(Xc);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r,e){let t=r.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),r.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let o=document.createElement("div");o.className="cm-tooltip-arrow",t.dom.insertBefore(o,n)}return t.dom.style.position=this.position,t.dom.style.top=Ms,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var r,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(r=n.destroy)===null||r===void 0||r.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=this.view.dom.getBoundingClientRect(),e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(G.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==Ms&&o.style.left=="0px"){let s=o.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(e=o.width/this.parent.offsetWidth,t=o.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:r,parent:this.parent?this.container.getBoundingClientRect():r,pos:this.manager.tooltips.map((o,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(Xc).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:n,scaleX:o,scaleY:s}=r,a=[];for(let l=0;l<this.manager.tooltips.length;l++){let c=this.manager.tooltips[l],d=this.manager.tooltipViews[l],{dom:u}=d,h=r.pos[l],f=r.size[l];if(!h||h.bottom<=Math.max(t.top,n.top)||h.top>=Math.min(t.bottom,n.bottom)||h.right<Math.max(t.left,n.left)-.1||h.left>Math.min(t.right,n.right)+.1){u.style.top=Ms;continue}let p=c.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,y=p?7:0,g=f.right-f.left,m=(e=mm.get(d))!==null&&e!==void 0?e:f.bottom-f.top,v=d.offset||x2,b=this.view.textDirection==exports.Direction.LTR,w=f.width>n.right-n.left?b?n.left:n.right-f.width:b?Math.min(h.left-(p?14:0)+v.x,n.right-g):Math.max(n.left,h.left-g+(p?14:0)-v.x),S=this.above[l];!c.strictSide&&(S?h.top-(f.bottom-f.top)-v.y<n.top:h.bottom+(f.bottom-f.top)+v.y>n.bottom)&&S==n.bottom-h.bottom>h.top-n.top&&(S=this.above[l]=!S);let x=(S?h.top-n.top:n.bottom-h.bottom)-y;if(x<m&&d.resize!==!1){if(x<this.view.defaultLineHeight){u.style.top=Ms;continue}mm.set(d,m),u.style.height=(m=x)/s+"px"}else u.style.height&&(u.style.height="");let k=S?h.top-m-y-v.y:h.bottom+y+v.y,C=w+g;if(d.overlap!==!0)for(let N of a)N.left<C&&N.right>w&&N.top<k+m&&N.bottom>k&&(k=S?N.top-m-2-y:N.bottom+y+2);if(this.position=="absolute"?(u.style.top=(k-r.parent.top)/s+"px",u.style.left=(w-r.parent.left)/o+"px"):(u.style.top=k/s+"px",u.style.left=w/o+"px"),p){let N=h.left+(b?v.x:-v.x)-(w+14-7);p.style.left=N/o+"px"}d.overlap!==!0&&a.push({left:w,top:k,right:C,bottom:k+m}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),d.positioned&&d.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=Ms}},{eventObservers:{scroll(){this.maybeMeasure()}}}),S2=ue.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),x2={x:0,y:0},qy=Z.define({enables:[Fy,S2]});function C2(r,e){let t=r.plugin(Fy);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}class Yn extends Wn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Yn.prototype.elementClass="";Yn.prototype.toDOM=void 0;Yn.prototype.mapMode=exports.MapMode.TrackBefore;Yn.prototype.startSide=Yn.prototype.endSide=-1;Yn.prototype.point=!0;const Qc=Z.define(),Ya=Z.define(),du=Z.define({combine:r=>r.some(e=>e)});function E2(r){let e=[$2];return r&&r.fixed===!1&&e.push(du.of(!0)),e}const $2=Rt.fromClass(class{constructor(r){this.view=r,this.prevViewport=r.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=r.state.facet(Ya).map(e=>new ym(r,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!r.state.facet(du),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),r.scrollDOM.insertBefore(this.dom,r.contentDOM)}update(r){if(this.updateGutters(r)){let e=this.prevViewport,t=r.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}r.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(du)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=r.view.viewport}syncGutters(r){let e=this.dom.nextSibling;r&&this.dom.remove();let t=be.iter(this.view.state.facet(Qc),this.view.viewport.from),n=[],o=this.gutters.map(s=>new _2(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(s.type)){let a=!0;for(let l of s.type)if(l.type==Xt.Text&&a){uu(t,n,l.from);for(let c of o)c.line(this.view,l,n);a=!1}else if(l.widget)for(let c of o)c.widget(this.view,l)}else if(s.type==Xt.Text){uu(t,n,s.from);for(let a of o)a.line(this.view,s,n)}else if(s.widget)for(let a of o)a.widget(this.view,s);for(let s of o)s.finish();r&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(r){let e=r.startState.facet(Ya),t=r.state.facet(Ya),n=r.docChanged||r.heightChanged||r.viewportChanged||!be.eq(r.startState.facet(Qc),r.state.facet(Qc),r.view.viewport.from,r.view.viewport.to);if(e==t)for(let o of this.gutters)o.update(r)&&(n=!0);else{n=!0;let o=[];for(let s of t){let a=e.indexOf(s);a<0?o.push(new ym(this.view,s)):(this.gutters[a].update(r),o.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),o.indexOf(s)<0&&s.destroy();for(let s of o)this.dom.appendChild(s.dom);this.gutters=o}return n}destroy(){for(let r of this.gutters)r.destroy();this.dom.remove()}},{provide:r=>ue.scrollMargins.of(e=>{let t=e.plugin(r);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==exports.Direction.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function gm(r){return Array.isArray(r)?r:[r]}function uu(r,e,t){for(;r.value&&r.from<=t;)r.from==t&&e.push(r.value),r.next()}class _2{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=be.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:o}=this,s=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==o.elements.length){let l=new zy(e,a,s,n);o.elements.push(l),o.dom.appendChild(l.dom)}else o.elements[this.i].update(e,a,s,n);this.height=t.bottom,this.i++}line(e,t,n){let o=[];uu(this.cursor,o,t.from),n.length&&(o=o.concat(n));let s=this.gutter.config.lineMarker(e,t,o);s&&o.unshift(s);let a=this.gutter;o.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,o)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class ym{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,o=>{let s=o.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();a=(c.top+c.bottom)/2}else a=o.clientY;let l=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,l,o)&&o.preventDefault()});this.markers=gm(t.markers(e)),t.initialSpacer&&(this.spacer=new zy(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=gm(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let o=this.config.updateSpacer(this.spacer.markers[0],e);o!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[o])}let n=e.view.viewport;return!be.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class zy{constructor(e,t,n,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,o)}update(e,t,n,o){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),N2(this.markers,o)||this.setMarkers(e,o)}setMarkers(e,t){let n="cm-gutterElement",o=this.dom.firstChild;for(let s=0,a=0;;){let l=a,c=s<t.length?t[s++]:null,d=!1;if(c){let u=c.elementClass;u&&(n+=" "+u);for(let h=a;h<this.markers.length;h++)if(this.markers[h].compare(c)){l=h,d=!0;break}}else l=this.markers.length;for(;a<l;){let u=this.markers[a++];if(u.toDOM){u.destroy(o);let h=o.nextSibling;o.remove(),o=h}}if(!c)break;c.toDOM&&(d?o=o.nextSibling:this.dom.insertBefore(c.toDOM(e),o)),d&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function N2(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].compare(e[t]))return!1;return!0}const A2=Z.define(),_o=Z.define({combine(r){return Jl(r,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let o in t){let s=n[o],a=t[o];n[o]=s?(l,c,d)=>s(l,c,d)||a(l,c,d):a}return n}})}});class Zc extends Yn{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function ed(r,e){return r.state.facet(_o).formatNumber(e,r.state)}const O2=Ya.compute([_o],r=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(A2)},lineMarker(e,t,n){return n.some(o=>o.toDOM)?null:new Zc(ed(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(_o)!=e.state.facet(_o),initialSpacer(e){return new Zc(ed(e,vm(e.state.doc.lines)))},updateSpacer(e,t){let n=ed(t.view,vm(t.view.state.doc.lines));return n==e.number?e:new Zc(n)},domEventHandlers:r.facet(_o).domEventHandlers}));function T2(r={}){return[_o.of(r),E2(),O2]}function vm(r){let e=9;for(;e<r;)e=e*10+9;return e}const Hy=1024;let B2=0;class It{constructor(e,t){this.from=e,this.to=t}}class fe{constructor(e={}){this.id=B2++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=mt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}fe.closedBy=new fe({deserialize:r=>r.split(" ")});fe.openedBy=new fe({deserialize:r=>r.split(" ")});fe.group=new fe({deserialize:r=>r.split(" ")});fe.isolate=new fe({deserialize:r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"}});fe.contextHash=new fe({perNode:!0});fe.lookAhead=new fe({perNode:!0});fe.mounted=new fe({perNode:!0});class ki{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[fe.mounted.id]}}const P2=Object.create(null);class mt{constructor(e,t,n,o=0){this.name=e,this.props=t,this.id=n,this.flags=o}static define(e){let t=e.props&&e.props.length?Object.create(null):P2,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),o=new mt(e.name||"",t,e.id,n);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(o)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return o}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(fe.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let o of n.split(" "))t[o]=e[n];return n=>{for(let o=n.prop(fe.group),s=-1;s<(o?o.length:0);s++){let a=t[s<0?n.name:o[s]];if(a)return a}}}}mt.none=new mt("",Object.create(null),0,8);class yh{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let o=null;for(let s of e){let a=s(n);a&&(o||(o=Object.assign({},n.props)),o[a[0].id]=a[1])}t.push(o?new mt(n.name,o,n.id,n.flags):n)}return new yh(t)}}const ka=new WeakMap,bm=new WeakMap;exports.IterMode=void 0;(function(r){r[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays"})(exports.IterMode||(exports.IterMode={}));class He{constructor(e,t,n,o,s){if(this.type=e,this.children=t,this.positions=n,this.length=o,this.props=null,s&&s.length){this.props=Object.create(null);for(let[a,l]of s)this.props[typeof a=="number"?a:a.id]=l}}toString(){let e=ki.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let o=n.toString();o&&(t&&(t+=","),t+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new yl(this.topNode,e)}cursorAt(e,t=0,n=0){let o=ka.get(this)||this.topNode,s=new yl(o);return s.moveTo(e,t),ka.set(this,s._tree),s}get topNode(){return new at(this,0,0,null)}resolve(e,t=0){let n=Si(ka.get(this)||this.topNode,e,t,!1);return ka.set(this,n),n}resolveInner(e,t=0){let n=Si(bm.get(this)||this.topNode,e,t,!0);return bm.set(this,n),n}resolveStack(e,t=0){return D2(this,e,t)}iterate(e){let{enter:t,leave:n,from:o=0,to:s=this.length}=e,a=e.mode||0,l=(a&exports.IterMode.IncludeAnonymous)>0;for(let c=this.cursor(a|exports.IterMode.IncludeAnonymous);;){let d=!1;if(c.from<=s&&c.to>=o&&(!l&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;d=!0}for(;d&&n&&(l||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;d=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:wh(mt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,o)=>new He(this.type,t,n,o,this.propValues),e.makeTree||((t,n,o)=>new He(mt.none,t,n,o)))}static build(e){return V2(e)}}He.empty=new He(mt.none,[],[],0);class vh{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new vh(this.buffer,this.index)}}class pn{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return mt.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],o=this.set.types[t],s=o.name;if(/\W/.test(s)&&!o.isError&&(s=JSON.stringify(s)),e+=4,n==e)return s;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return s+"("+a.join(",")+")"}findChild(e,t,n,o,s){let{buffer:a}=this,l=-1;for(let c=e;c!=t&&!(Uy(s,o,a[c+1],a[c+2])&&(l=c,n>0));c=a[c+3]);return l}slice(e,t,n){let o=this.buffer,s=new Uint16Array(t-e),a=0;for(let l=e,c=0;l<t;){s[c++]=o[l++],s[c++]=o[l++]-n;let d=s[c++]=o[l++]-n;s[c++]=o[l++]-e,a=Math.max(a,d)}return new pn(s,a,this.set)}}function Uy(r,e,t,n){switch(r){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function Si(r,e,t,n){for(var o;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to<e);){let a=!n&&r instanceof at&&r.index<0?null:r.parent;if(!a)return r;r=a}let s=n?0:exports.IterMode.IgnoreOverlays;if(n)for(let a=r,l=a.parent;l;a=l,l=a.parent)a instanceof at&&a.index<0&&((o=l.enter(e,t,s))===null||o===void 0?void 0:o.from)!=a.from&&(r=l);for(;;){let a=r.enter(e,t,s);if(!a)return r;r=a}}class Ky{cursor(e=0){return new yl(this,e)}getChild(e,t=null,n=null){let o=wm(this,e,t,n);return o.length?o[0]:null}getChildren(e,t=null,n=null){return wm(this,e,t,n)}resolve(e,t=0){return Si(this,e,t,!1)}resolveInner(e,t=0){return Si(this,e,t,!0)}matchContext(e){return hu(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let o=t.lastChild;if(!o||o.to!=t.to)break;o.type.isError&&o.from==o.to?(n=t,t=o.prevSibling):t=o}return n}get node(){return this}get next(){return this.parent}}class at extends Ky{constructor(e,t,n,o){super(),this._tree=e,this.from=t,this.index=n,this._parent=o}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,o,s=0){for(let a=this;;){for(let{children:l,positions:c}=a._tree,d=t>0?l.length:-1;e!=d;e+=t){let u=l[e],h=c[e]+a.from;if(Uy(o,n,h,h+u.length)){if(u instanceof pn){if(s&exports.IterMode.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,t,n-h,o);if(f>-1)return new mr(new I2(a,u,e,h),null,f)}else if(s&exports.IterMode.IncludeAnonymous||!u.type.isAnonymous||bh(u)){let f;if(!(s&exports.IterMode.IgnoreMounts)&&(f=ki.get(u))&&!f.overlay)return new at(f.tree,h,e,a);let p=new at(u,h,e,a);return s&exports.IterMode.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?u.children.length-1:0,t,n,o)}}}if(s&exports.IterMode.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+t:e=t<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let o;if(!(n&exports.IterMode.IgnoreOverlays)&&(o=ki.get(this._tree))&&o.overlay){let s=e-this.from;for(let{from:a,to:l}of o.overlay)if((t>0?a<=s:a<s)&&(t<0?l>=s:l>s))return new at(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function wm(r,e,t,n){let o=r.cursor(),s=[];if(!o.firstChild())return s;if(t!=null){for(let a=!1;!a;)if(a=o.type.is(t),!o.nextSibling())return s}for(;;){if(n!=null&&o.type.is(n))return s;if(o.type.is(e)&&s.push(o.node),!o.nextSibling())return n==null?s:[]}}function hu(r,e,t=e.length-1){for(let n=r.parent;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class I2{constructor(e,t,n,o){this.parent=e,this.buffer=t,this.index=n,this.start=o}}class mr extends Ky{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:o}=this.context,s=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.context.start,n);return s<0?null:new mr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&exports.IterMode.ExcludeBuffers)return null;let{buffer:o}=this.context,s=o.findChild(this.index+4,o.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new mr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new mr(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new mr(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,o=this.index+4,s=n.buffer[this.index+3];if(s>o){let a=n.buffer[this.index+1];e.push(n.slice(o,s,a)),t.push(0)}return new He(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Wy(r){if(!r.length)return null;let e=0,t=r[0];for(let s=1;s<r.length;s++){let a=r[s];(a.from>t.from||a.to<t.to)&&(t=a,e=s)}let n=t instanceof at&&t.index<0?null:t.parent,o=r.slice();return n?o[e]=n:o.splice(e,1),new M2(o,t)}class M2{constructor(e,t){this.heads=e,this.node=t}get next(){return Wy(this.heads)}}function D2(r,e,t){let n=r.resolveInner(e,t),o=null;for(let s=n instanceof at?n:n.context.parent;s;s=s.parent)if(s.index<0){let a=s.parent;(o||(o=[n])).push(a.resolve(e,t)),s=a}else{let a=ki.get(s.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let l=new at(a.tree,a.overlay[0].from+s.from,-1,s);(o||(o=[n])).push(Si(l,e,t,!1))}}return o?Wy(o):n}class yl{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof at)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:o}=this.buffer;return this.type=t||o.set.types[o.buffer[e]],this.from=n+o.buffer[e+1],this.to=n+o.buffer[e+2],!0}yield(e){return e?e instanceof at?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:o}=this.buffer,s=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.buffer.start,n);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&exports.IterMode.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&exports.IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&exports.IterMode.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let o=n<0?0:this.stack[n]+4;if(this.index!=o)return this.yieldBuf(t.findChild(o,this.index,-1,0,4))}else{let o=t.buffer[this.index+3];if(o<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(o)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:o}=this;if(o){if(e>0){if(this.index<o.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(o.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:n}=o)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let s=t+e,a=e<0?-1:n._tree.children.length;s!=a;s+=e){let l=n._tree.children[s];if(this.mode&exports.IterMode.IncludeAnonymous||l instanceof pn||!l.type.isAnonymous||bh(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let o=this.index,s=this.stack.length;s>=0;){for(let a=e;a;a=a._parent)if(a.index==o){if(o==this.index)return a;t=a,n=s+1;break e}o=this.stack[--s]}for(let o=n;o<this.stack.length;o++)t=new mr(this.buffer,t,this.stack[o]);return this.bufferNode=new mr(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let o=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(o=!0)}for(;o&&t&&t(this),o=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,o=!0}}}matchContext(e){if(!this.buffer)return hu(this.node,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let o=e.length-1,s=this.stack.length-1;o>=0;s--){if(s<0)return hu(this.node,e,o);let a=n[t.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[o]&&e[o]!=a.name)return!1;o--}}return!0}}function bh(r){return r.children.some(e=>e instanceof pn||!e.type.isAnonymous||bh(e))}function V2(r){var e;let{buffer:t,nodeSet:n,maxBufferLength:o=Hy,reused:s=[],minRepeatType:a=n.types.length}=r,l=Array.isArray(t)?new vh(t,t.length):t,c=n.types,d=0,u=0;function h(x,k,C,N,P,M){let{id:j,start:I,end:X,size:W}=l,te=u;for(;W<0;)if(l.next(),W==-1){let q=s[j];C.push(q),N.push(I-x);return}else if(W==-3){d=j;return}else if(W==-4){u=j;return}else throw new RangeError(`Unrecognized record size: ${W}`);let me=c[j],ke,Se,se=I-x;if(X-I<=o&&(Se=m(l.pos-k,P))){let q=new Uint16Array(Se.size-Se.skip),T=l.pos-Se.size,V=q.length;for(;l.pos>T;)V=v(Se.start,q,V);ke=new pn(q,X-Se.start,n),se=Se.start-x}else{let q=l.pos-W;l.next();let T=[],V=[],D=j>=a?j:-1,E=0,A=X;for(;l.pos>q;)D>=0&&l.id==D&&l.size>=0?(l.end<=A-o&&(y(T,V,I,E,l.end,A,D,te),E=T.length,A=l.end),l.next()):M>2500?f(I,q,T,V):h(I,q,T,V,D,M+1);if(D>=0&&E>0&&E<T.length&&y(T,V,I,E,I,A,D,te),T.reverse(),V.reverse(),D>-1&&E>0){let B=p(me);ke=wh(me,T,V,0,T.length,0,X-I,B,B)}else ke=g(me,T,V,X-I,te-X)}C.push(ke),N.push(se)}function f(x,k,C,N){let P=[],M=0,j=-1;for(;l.pos>k;){let{id:I,start:X,end:W,size:te}=l;if(te>4)l.next();else{if(j>-1&&X<j)break;j<0&&(j=W-o),P.push(I,X,W),M++,l.next()}}if(M){let I=new Uint16Array(M*4),X=P[P.length-2];for(let W=P.length-3,te=0;W>=0;W-=3)I[te++]=P[W],I[te++]=P[W+1]-X,I[te++]=P[W+2]-X,I[te++]=te;C.push(new pn(I,P[2]-X,n)),N.push(X-x)}}function p(x){return(k,C,N)=>{let P=0,M=k.length-1,j,I;if(M>=0&&(j=k[M])instanceof He){if(!M&&j.type==x&&j.length==N)return j;(I=j.prop(fe.lookAhead))&&(P=C[M]+j.length+I)}return g(x,k,C,N,P)}}function y(x,k,C,N,P,M,j,I){let X=[],W=[];for(;x.length>N;)X.push(x.pop()),W.push(k.pop()+C-P);x.push(g(n.types[j],X,W,M-P,I-M)),k.push(P-C)}function g(x,k,C,N,P=0,M){if(d){let j=[fe.contextHash,d];M=M?[j].concat(M):[j]}if(P>25){let j=[fe.lookAhead,P];M=M?[j].concat(M):[j]}return new He(x,k,C,N,M)}function m(x,k){let C=l.fork(),N=0,P=0,M=0,j=C.end-o,I={size:0,start:0,skip:0};e:for(let X=C.pos-x;C.pos>X;){let W=C.size;if(C.id==k&&W>=0){I.size=N,I.start=P,I.skip=M,M+=4,N+=4,C.next();continue}let te=C.pos-W;if(W<0||te<X||C.start<j)break;let me=C.id>=a?4:0,ke=C.start;for(C.next();C.pos>te;){if(C.size<0)if(C.size==-3)me+=4;else break e;else C.id>=a&&(me+=4);C.next()}P=ke,N+=W,M+=me}return(k<0||N==x)&&(I.size=N,I.start=P,I.skip=M),I.size>4?I:void 0}function v(x,k,C){let{id:N,start:P,end:M,size:j}=l;if(l.next(),j>=0&&N<a){let I=C;if(j>4){let X=l.pos-(j-4);for(;l.pos>X;)C=v(x,k,C)}k[--C]=I,k[--C]=M-x,k[--C]=P-x,k[--C]=N}else j==-3?d=N:j==-4&&(u=N);return C}let b=[],w=[];for(;l.pos>0;)h(r.start||0,r.bufferStart||0,b,w,-1,0);let S=(e=r.length)!==null&&e!==void 0?e:b.length?w[0]+b[0].length:0;return new He(c[r.topID],b.reverse(),w.reverse(),S)}const km=new WeakMap;function Xa(r,e){if(!r.isAnonymous||e instanceof pn||e.type!=r)return 1;let t=km.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=r||!(n instanceof He)){t=1;break}t+=Xa(r,n)}km.set(e,t)}return t}function wh(r,e,t,n,o,s,a,l,c){let d=0;for(let y=n;y<o;y++)d+=Xa(r,e[y]);let u=Math.ceil(d*1.5/8),h=[],f=[];function p(y,g,m,v,b){for(let w=m;w<v;){let S=w,x=g[w],k=Xa(r,y[w]);for(w++;w<v;w++){let C=Xa(r,y[w]);if(k+C>=u)break;k+=C}if(w==S+1){if(k>u){let C=y[S];p(C.children,C.positions,0,C.children.length,g[S]+b);continue}h.push(y[S])}else{let C=g[w-1]+y[w-1].length-x;h.push(wh(r,y,g,S,w,x,C,null,c))}f.push(x+b-s)}}return p(e,t,n,o,0),(l||c)(h,f,a)}class R2{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let o=this.map.get(e);o||this.map.set(e,o=new Map),o.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof mr?this.setBuffer(e.context.buffer,e.index,t):e instanceof at&&this.map.set(e.tree,t)}get(e){return e instanceof mr?this.getBuffer(e.context.buffer,e.index):e instanceof at?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Pr{constructor(e,t,n,o,s=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=o,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let o=[new Pr(0,e.length,e,0,!1,n)];for(let s of t)s.to>e.length&&o.push(s);return o}static applyChanges(e,t,n=128){if(!t.length)return e;let o=[],s=1,a=e.length?e[0]:null;for(let l=0,c=0,d=0;;l++){let u=l<t.length?t[l]:null,h=u?u.fromA:1e9;if(h-c>=n)for(;a&&a.from<h;){let f=a;if(c>=f.from||h<=f.to||d){let p=Math.max(f.from,c)-d,y=Math.min(f.to,h)-d;f=p>=y?null:new Pr(p,y,f.tree,f.offset+d,l>0,!!u)}if(f&&o.push(f),a.to>h)break;a=s<e.length?e[s++]:null}if(!u)break;c=u.toA,d=u.toA-u.toB}return o}}class Gy{startParse(e,t,n){return typeof e=="string"&&(e=new L2(e)),n=n?n.length?n.map(o=>new It(o.from,o.to)):[new It(0,0)]:[new It(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let o=this.startParse(e,t,n);for(;;){let s=o.advance();if(s)return s}}}class L2{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function j2(r){return(e,t,n,o)=>new q2(e,r,t,n,o)}class Sm{constructor(e,t,n,o,s){this.parser=e,this.parse=t,this.overlay=n,this.target=o,this.from=s}}function xm(r){if(!r.length||r.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(r))}class F2{constructor(e,t,n,o,s,a,l){this.parser=e,this.predicate=t,this.mounts=n,this.index=o,this.start=s,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const fu=new fe({perNode:!0});class q2{constructor(e,t,n,o,s){this.nest=t,this.input=n,this.fragments=o,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let o of this.inner)o.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new He(n.type,n.children,n.positions,n.length,n.propValues.concat([[fu,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[fe.mounted.id]=new ki(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new U2(this.fragments),t=null,n=null,o=new yl(new at(this.baseTree,this.ranges[0].from,0,null),exports.IterMode.IncludeAnonymous|exports.IterMode.IgnoreMounts);e:for(let s,a;;){let l=!0,c;if(this.stoppedAt!=null&&o.from>=this.stoppedAt)l=!1;else if(e.hasNode(o)){if(t){let d=t.mounts.find(u=>u.frag.from<=o.from&&u.frag.to>=o.to&&u.mount.overlay);if(d)for(let u of d.mount.overlay){let h=u.from+d.pos,f=u.to+d.pos;h>=o.from&&f<=o.to&&!t.ranges.some(p=>p.from<f&&p.to>h)&&t.ranges.push({from:h,to:f})}}l=!1}else if(n&&(a=z2(n.ranges,o.from,o.to)))l=a!=2;else if(!o.type.isAnonymous&&(s=this.nest(o,this.input))&&(o.from<o.to||!s.overlay)){o.tree||H2(o);let d=e.findMounts(o.from,s.parser);if(typeof s.overlay=="function")t=new F2(s.parser,s.overlay,d,this.inner.length,o.from,o.tree,t);else{let u=$m(this.ranges,s.overlay||(o.from<o.to?[new It(o.from,o.to)]:[]));u.length&&xm(u),(u.length||!s.overlay)&&this.inner.push(new Sm(s.parser,u.length?s.parser.startParse(this.input,_m(d,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(h=>new It(h.from-o.from,h.to-o.from)):null,o.tree,u.length?u[0].from:o.from)),s.overlay?u.length&&(n={ranges:u,depth:0,prev:n}):l=!1}}else t&&(c=t.predicate(o))&&(c===!0&&(c=new It(o.from,o.to)),c.from<c.to&&t.ranges.push(c));if(l&&o.firstChild())t&&t.depth++,n&&n.depth++;else for(;!o.nextSibling();){if(!o.parent())break e;if(t&&!--t.depth){let d=$m(this.ranges,t.ranges);d.length&&(xm(d),this.inner.splice(t.index,0,new Sm(t.parser,t.parser.startParse(this.input,_m(t.mounts,d),d),t.ranges.map(u=>new It(u.from-t.start,u.to-t.start)),t.target,d[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function z2(r,e,t){for(let n of r){if(n.from>=t)break;if(n.to>e)return n.from<=e&&n.to>=t?2:1}return 0}function Cm(r,e,t,n,o,s){if(e<t){let a=r.buffer[e+1];n.push(r.slice(e,t,a)),o.push(a-s)}}function H2(r){let{node:e}=r,t=[],n=e.context.buffer;do t.push(r.index),r.parent();while(!r.tree);let o=r.tree,s=o.children.indexOf(n),a=o.children[s],l=a.buffer,c=[s];function d(u,h,f,p,y,g){let m=t[g],v=[],b=[];Cm(a,u,m,v,b,p);let w=l[m+1],S=l[m+2];c.push(v.length);let x=g?d(m+4,l[m+3],a.set.types[l[m]],w,S-w,g-1):e.toTree();return v.push(x),b.push(w-p),Cm(a,l[m+3],h,v,b,p),new He(f,v,b,y)}o.children[s]=d(0,l.length,mt.none,0,a.length,t.length-1);for(let u of c){let h=r.tree.children[u],f=r.tree.positions[u];r.yield(new at(h,f+r.from,u,r._tree))}}class Em{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(exports.IterMode.IncludeAnonymous|exports.IterMode.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,exports.IterMode.IgnoreOverlays|exports.IterMode.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof He)t=t.children[0];else break}return!1}}class U2{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(fu))!==null&&t!==void 0?t:n.to,this.inner=new Em(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(fu))!==null&&e!==void 0?e:t.to,this.inner=new Em(t.tree,-t.offset)}}findMounts(e,t){var n;let o=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(n=s.tree)===null||n===void 0?void 0:n.prop(fe.mounted);if(a&&a.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let c=this.fragments[l];if(c.from>=s.to)break;c.tree==this.curFrag.tree&&o.push({frag:c,pos:s.from-c.offset,mount:a})}}}return o}}function $m(r,e){let t=null,n=e;for(let o=1,s=0;o<r.length;o++){let a=r[o-1].to,l=r[o].from;for(;s<n.length;s++){let c=n[s];if(c.from>=l)break;c.to<=a||(t||(n=t=e.slice()),c.from<a?(t[s]=new It(c.from,a),c.to>l&&t.splice(s+1,0,new It(l,c.to))):c.to>l?t[s--]=new It(l,c.to):t.splice(s--,1))}}return n}function K2(r,e,t,n){let o=0,s=0,a=!1,l=!1,c=-1e9,d=[];for(;;){let u=o==r.length?1e9:a?r[o].to:r[o].from,h=s==e.length?1e9:l?e[s].to:e[s].from;if(a!=l){let f=Math.max(c,t),p=Math.min(u,h,n);f<p&&d.push(new It(f,p))}if(c=Math.min(u,h),c==1e9)break;u==c&&(a?(a=!1,o++):a=!0),h==c&&(l?(l=!1,s++):l=!0)}return d}function _m(r,e){let t=[];for(let{pos:n,mount:o,frag:s}of r){let a=n+(o.overlay?o.overlay[0].from:0),l=a+o.tree.length,c=Math.max(s.from,a),d=Math.min(s.to,l);if(o.overlay){let u=o.overlay.map(f=>new It(f.from+n,f.to+n)),h=K2(e,u,c,d);for(let f=0,p=c;;f++){let y=f==h.length,g=y?d:h[f].from;if(g>p&&t.push(new Pr(p,g,o.tree,-a,s.from>=p||s.openStart,s.to<=g||s.openEnd)),y)break;p=h[f].to}}else t.push(new Pr(c,d,o.tree,-a,s.from>=a||s.openStart,s.to<=l||s.openEnd))}return t}let W2=0,Qr=class Jy{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=W2++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new Jy([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new vl;return t=>t.modified.indexOf(e)>-1?t:vl.get(t.base||t,t.modified.concat(e).sort((n,o)=>n.id-o.id))}},G2=0;class vl{constructor(){this.instances=[],this.id=G2++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(l=>l.base==e&&J2(t,l.modified));if(n)return n;let o=[],s=new Qr(o,e,t);for(let l of t)l.instances.push(s);let a=Y2(t);for(let l of e.set)if(!l.modified.length)for(let c of a)o.push(vl.get(l,c));return s}}function J2(r,e){return r.length==e.length&&r.every((t,n)=>t==e[n])}function Y2(r){let e=[[]];for(let t=0;t<r.length;t++)for(let n=0,o=e.length;n<o;n++)e.push(e[n].concat(r[t]));return e.sort((t,n)=>n.length-t.length)}function Yy(r){let e=Object.create(null);for(let t in r){let n=r[t];Array.isArray(n)||(n=[n]);for(let o of t.split(" "))if(o){let s=[],a=2,l=o;for(let h=0;;){if(l=="..."&&h>0&&h+3==o.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+o);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==o.length)break;let p=o[h++];if(h==o.length&&p=="!"){a=0;break}if(p!="/")throw new RangeError("Invalid path: "+o);l=o.slice(h)}let c=s.length-1,d=s[c];if(!d)throw new RangeError("Invalid path: "+o);let u=new bl(n,a,c>0?s.slice(0,c):null);e[d]=u.sort(e[d])}}return Xy.add(e)}const Xy=new fe;class bl{constructor(e,t,n,o){this.tags=e,this.mode=t,this.context=n,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}bl.empty=new bl([],2,null);function Qy(r,e){let t=Object.create(null);for(let s of r)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let a of s.tag)t[a.id]=s.class;let{scope:n,all:o=null}=e||{};return{style:s=>{let a=o;for(let l of s)for(let c of l.set){let d=t[c.id];if(d){a=a?a+" "+d:d;break}}return a},scope:n}}function X2(r,e){let t=null;for(let n of r){let o=n.style(e);o&&(t=t?t+" "+o:o)}return t}function Q2(r,e,t,n=0,o=r.length){let s=new Z2(n,Array.isArray(e)?e:[e],t);s.highlightRange(r.cursor(),n,o,"",s.highlighters),s.flush(o)}class Z2{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,o,s){let{type:a,from:l,to:c}=e;if(l>=n||c<=t)return;a.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(a)));let d=o,u=eC(e)||bl.empty,h=X2(s,u.tags);if(h&&(d&&(d+=" "),d+=h,u.mode==1&&(o+=(o?" ":"")+h)),this.startSpan(Math.max(t,l),d),u.opaque)return;let f=e.tree&&e.tree.prop(fe.mounted);if(f&&f.overlay){let p=e.node.enter(f.overlay[0].from+l,1),y=this.highlighters.filter(m=>!m.scope||m.scope(f.tree.type)),g=e.firstChild();for(let m=0,v=l;;m++){let b=m<f.overlay.length?f.overlay[m]:null,w=b?b.from+l:c,S=Math.max(t,v),x=Math.min(n,w);if(S<x&&g)for(;e.from<x&&(this.highlightRange(e,S,x,o,s),this.startSpan(Math.min(x,e.to),d),!(e.to>=w||!e.nextSibling())););if(!b||w>n)break;v=b.to+l,v>t&&(this.highlightRange(p.cursor(),Math.max(t,b.from+l),Math.min(n,v),"",y),this.startSpan(Math.min(n,v),d))}g&&e.parent()}else if(e.firstChild()){f&&(o="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,o,s),this.startSpan(Math.min(n,e.to),d)}while(e.nextSibling());e.parent()}}}function eC(r){let e=r.type.prop(Xy);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}const K=Qr.define,Sa=K(),Zr=K(),Nm=K(Zr),Am=K(Zr),en=K(),xa=K(en),td=K(en),cr=K(),$n=K(cr),ar=K(),lr=K(),pu=K(),Ds=K(pu),Ca=K(),F={comment:Sa,lineComment:K(Sa),blockComment:K(Sa),docComment:K(Sa),name:Zr,variableName:K(Zr),typeName:Nm,tagName:K(Nm),propertyName:Am,attributeName:K(Am),className:K(Zr),labelName:K(Zr),namespace:K(Zr),macroName:K(Zr),literal:en,string:xa,docString:K(xa),character:K(xa),attributeValue:K(xa),number:td,integer:K(td),float:K(td),bool:K(en),regexp:K(en),escape:K(en),color:K(en),url:K(en),keyword:ar,self:K(ar),null:K(ar),atom:K(ar),unit:K(ar),modifier:K(ar),operatorKeyword:K(ar),controlKeyword:K(ar),definitionKeyword:K(ar),moduleKeyword:K(ar),operator:lr,derefOperator:K(lr),arithmeticOperator:K(lr),logicOperator:K(lr),bitwiseOperator:K(lr),compareOperator:K(lr),updateOperator:K(lr),definitionOperator:K(lr),typeOperator:K(lr),controlOperator:K(lr),punctuation:pu,separator:K(pu),bracket:Ds,angleBracket:K(Ds),squareBracket:K(Ds),paren:K(Ds),brace:K(Ds),content:cr,heading:$n,heading1:K($n),heading2:K($n),heading3:K($n),heading4:K($n),heading5:K($n),heading6:K($n),contentSeparator:K(cr),list:K(cr),quote:K(cr),emphasis:K(cr),strong:K(cr),link:K(cr),monospace:K(cr),strikethrough:K(cr),inserted:K(),deleted:K(),changed:K(),invalid:K(),meta:Ca,documentMeta:K(Ca),annotation:K(Ca),processingInstruction:K(Ca),definition:Qr.defineModifier(),constant:Qr.defineModifier(),function:Qr.defineModifier(),standard:Qr.defineModifier(),local:Qr.defineModifier(),special:Qr.defineModifier()};Qy([{tag:F.link,class:"tok-link"},{tag:F.heading,class:"tok-heading"},{tag:F.emphasis,class:"tok-emphasis"},{tag:F.strong,class:"tok-strong"},{tag:F.keyword,class:"tok-keyword"},{tag:F.atom,class:"tok-atom"},{tag:F.bool,class:"tok-bool"},{tag:F.url,class:"tok-url"},{tag:F.labelName,class:"tok-labelName"},{tag:F.inserted,class:"tok-inserted"},{tag:F.deleted,class:"tok-deleted"},{tag:F.literal,class:"tok-literal"},{tag:F.string,class:"tok-string"},{tag:F.number,class:"tok-number"},{tag:[F.regexp,F.escape,F.special(F.string)],class:"tok-string2"},{tag:F.variableName,class:"tok-variableName"},{tag:F.local(F.variableName),class:"tok-variableName tok-local"},{tag:F.definition(F.variableName),class:"tok-variableName tok-definition"},{tag:F.special(F.variableName),class:"tok-variableName2"},{tag:F.definition(F.propertyName),class:"tok-propertyName tok-definition"},{tag:F.typeName,class:"tok-typeName"},{tag:F.namespace,class:"tok-namespace"},{tag:F.className,class:"tok-className"},{tag:F.macroName,class:"tok-macroName"},{tag:F.propertyName,class:"tok-propertyName"},{tag:F.operator,class:"tok-operator"},{tag:F.comment,class:"tok-comment"},{tag:F.meta,class:"tok-meta"},{tag:F.invalid,class:"tok-invalid"},{tag:F.punctuation,class:"tok-punctuation"}]);var rd;const No=new fe;function Zy(r){return Z.define({combine:r?e=>e.concat(r):void 0})}const ev=new fe;class Gt{constructor(e,t,n=[],o=""){this.data=e,this.name=o,ve.prototype.hasOwnProperty("tree")||Object.defineProperty(ve.prototype,"tree",{get(){return mn(this)}}),this.parser=t,this.extension=[Jo.of(this),ve.languageData.of((s,a,l)=>{let c=Om(s,a,l),d=c.type.prop(No);if(!d)return[];let u=s.facet(d),h=c.type.prop(ev);if(h){let f=c.resolve(a-c.from,l);for(let p of h)if(p.test(f,s)){let y=s.facet(p.facet);return p.type=="replace"?y:y.concat(u)}}return u})].concat(n)}isActiveAt(e,t,n=-1){return Om(e,t,n).type.prop(No)==this.data}findRegions(e){let t=e.facet(Jo);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],o=(s,a)=>{if(s.prop(No)==this.data){n.push({from:a,to:a+s.length});return}let l=s.prop(fe.mounted);if(l){if(l.tree.prop(No)==this.data){if(l.overlay)for(let c of l.overlay)n.push({from:c.from+a,to:c.to+a});else n.push({from:a,to:a+s.length});return}else if(l.overlay){let c=n.length;if(o(l.tree,l.overlay[0].from+a),n.length>c)return}}for(let c=0;c<s.children.length;c++){let d=s.children[c];d instanceof He&&o(d,s.positions[c]+a)}};return o(mn(e),0),n}get allowsNesting(){return!0}}Gt.setState=We.define();function Om(r,e,t){let n=r.facet(Jo),o=mn(r).topNode;if(!n||n.allowsNesting)for(let s=o;s;s=s.enter(e,t,exports.IterMode.ExcludeBuffers))s.type.isTop&&(o=s);return o}class wl extends Gt{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=Zy(e.languageData);return new wl(t,e.parser.configure({props:[No.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new wl(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function mn(r){let e=r.field(Gt.state,!1);return e?e.tree:He.empty}class tC{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let Vs=null;class kl{constructor(e,t,n=[],o,s,a,l,c){this.parser=e,this.state=t,this.fragments=n,this.tree=o,this.treeLen=s,this.viewport=a,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new kl(e,t,[],He.empty,0,n,[],null)}startParse(){return this.parser.startParse(new tC(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=He.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let o=Date.now()+e;e=()=>Date.now()>o}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let o=this.parse.advance();if(o)if(this.fragments=this.withoutTempSkipped(Pr.addTree(o,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=o,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Pr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Vs;Vs=this;try{return e()}finally{Vs=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Tm(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:o,treeLen:s,viewport:a,skipped:l}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((d,u,h,f)=>c.push({fromA:d,toA:u,fromB:h,toB:f})),n=Pr.applyChanges(n,c),o=He.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){l=[];for(let d of this.skipped){let u=e.mapPos(d.from,1),h=e.mapPos(d.to,-1);u<h&&l.push({from:u,to:h})}}}return new kl(this.parser,t,n,o,s,a,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:o,to:s}=this.skipped[n];o<e.to&&s>e.from&&(this.fragments=Tm(this.fragments,o,s),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Gy{createParse(t,n,o){let s=o[0].from,a=o[o.length-1].to;return{parsedPos:s,advance(){let c=Vs;if(c){for(let d of o)c.tempSkipped.push(d);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=a,new He(mt.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Vs}}function Tm(r,e,t){return Pr.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}class Go{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new Go(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=kl.create(e.facet(Jo).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Go(n)}}Gt.state=qr.define({create:Go.init,update(r,e){for(let t of e.effects)if(t.is(Gt.setState))return t.value;return e.startState.facet(Jo)!=e.state.facet(Jo)?Go.init(e.state):r.apply(e)}});let tv=r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(tv=r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const nd=typeof navigator<"u"&&(!((rd=navigator.scheduling)===null||rd===void 0)&&rd.isInputPending)?()=>navigator.scheduling.isInputPending():null,rC=Rt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Gt.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Gt.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=tv(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:o}}=this.view,s=n.field(Gt.state);if(s.tree==s.context.tree&&s.context.isDone(o+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!nd?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<o&&n.doc.length>o+1e3,c=s.context.work(()=>nd&&nd()||Date.now()>a,o+(l?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Gt.setState.of(new Go(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Br(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Jo=Z.define({combine(r){return r.length?r[0]:null},enables:r=>[Gt.state,rC,ue.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})]});class nC{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const oC=Z.define(),kh=Z.define({combine:r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e}});function rv(r){let e=r.facet(kh);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}function nv(r,e){let t="",n=r.tabSize,o=r.facet(kh)[0];if(o==" "){for(;e>=n;)t+=" ",e-=n;o=" "}for(let s=0;s<e;s++)t+=o;return t}function sC(r,e){r instanceof ve&&(r=new ov(r));for(let n of r.state.facet(oC)){let o=n(r,e);if(o!==void 0)return o}let t=mn(r.state);return t.length>=e?iC(r,t,e):null}class ov{constructor(e,t={}){this.state=e,this.options=t,this.unit=rv(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:s}=this.options;return o!=null&&o>=n.from&&o<=n.to?s&&o==e?{text:"",from:e}:(t<0?o<e:o<=e)?{text:n.text.slice(o-n.from),from:o}:{text:n.text.slice(0,o-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:o}=this.lineAt(e,t);return n.slice(e-o,Math.min(n.length,e+100-o))}column(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.countColumn(n,e-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(n,n.search(/\S|$/))),s}countColumn(e,t=e.length){return ch(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let a=s(o);if(a>-1)return a}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const sv=new fe;function iC(r,e,t){let n=e.resolveStack(t),o=n.node.enterUnfinishedNodesBefore(t);if(o!=n.node){let s=[];for(let a=o;a!=n.node;a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)n={node:s[a],next:n}}return iv(n,r,t)}function iv(r,e,t){for(let n=r;n;n=n.next){let o=lC(n.node);if(o)return o(Sh.create(e,t,n))}return 0}function aC(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function lC(r){let e=r.type.prop(sv);if(e)return e;let t=r.firstChild,n;if(t&&(n=t.type.prop(fe.closedBy))){let o=r.lastChild,s=o&&n.indexOf(o.name)>-1;return a=>av(a,!0,1,void 0,s&&!aC(a)?o.from:void 0)}return r.parent==null?cC:null}function cC(){return 0}class Sh extends ov{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new Sh(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(dC(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return iv(this.context.next,this.base,this.pos)}}function dC(r,e){for(let t=e;t;t=t.parent)if(r==t)return!0;return!1}function uC(r){let e=r.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let o=r.options.simulateBreak,s=r.state.doc.lineAt(t.from),a=o==null||o<=s.from?s.to:Math.min(s.to,o);for(let l=t.to;;){let c=e.childAfter(l);if(!c||c==n)return null;if(!c.type.isSkipped)return c.from<a?t:null;l=c.to}}function hC({closing:r,align:e=!0,units:t=1}){return n=>av(n,e,t,r)}function av(r,e,t,n,o){let s=r.textAfter,a=s.match(/^\s*/)[0].length,l=n&&s.slice(a,a+n.length)==n||o==r.pos+a,c=e?uC(r):null;return c?l?r.column(c.from):r.column(c.to):r.baseIndent+(l?0:r.unit*t)}const fC=r=>r.baseIndent;function pC({except:r,units:e=1}={}){return t=>{let n=r&&r.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const mC=200;function gC(){return ve.transactionFilter.of(r=>{if(!r.docChanged||!r.isUserEvent("input.type")&&!r.isUserEvent("input.complete"))return r;let e=r.startState.languageDataAt("indentOnInput",r.startState.selection.main.head);if(!e.length)return r;let t=r.newDoc,{head:n}=r.newSelection.main,o=t.lineAt(n);if(n>o.from+mC)return r;let s=t.sliceString(o.from,n);if(!e.some(d=>d.test(s)))return r;let{state:a}=r,l=-1,c=[];for(let{head:d}of a.selection.ranges){let u=a.doc.lineAt(d);if(u.from==l)continue;l=u.from;let h=sC(a,u.from);if(h==null)continue;let f=/^\s*/.exec(u.text)[0],p=nv(a,h);f!=p&&c.push({from:u.from,to:u.from+f.length,insert:p})}return c.length?[r,{changes:c,sequential:!0}]:r})}const yC=new fe;function vC(r){let e=r.firstChild,t=r.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?r.to:t.from}:null}class Vi{constructor(e,t){this.specs=e;let n;function o(l){let c=un.newName();return(n||(n=Object.create(null)))["."+c]=l,c}const s=typeof t.all=="string"?t.all:t.all?o(t.all):void 0,a=t.scope;this.scope=a instanceof Gt?l=>l.prop(No)==a.data:a?l=>l==a:void 0,this.style=Qy(e.map(l=>({tag:l.tag,class:l.class||o(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=n?new un(n):null,this.themeType=t.themeType}static define(e,t){return new Vi(e,t||{})}}const mu=Z.define(),lv=Z.define({combine(r){return r.length?[r[0]]:null}});function od(r){let e=r.facet(mu);return e.length?e:r.facet(lv)}function cv(r,e){let t=[wC],n;return r instanceof Vi&&(r.module&&t.push(ue.styleModule.of(r.module)),n=r.themeType),e!=null&&e.fallback?t.push(lv.of(r)):n?t.push(mu.computeN([ue.darkTheme],o=>o.facet(ue.darkTheme)==(n=="dark")?[r]:[])):t.push(mu.of(r)),t}class bC{constructor(e){this.markCache=Object.create(null),this.tree=mn(e.state),this.decorations=this.buildDeco(e,od(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=mn(e.state),n=od(e.state),o=n!=od(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!o&&t.type==this.tree.type&&a>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Be.none;let n=new Ko;for(let{from:o,to:s}of e.visibleRanges)Q2(this.tree,t,(a,l,c)=>{n.add(a,l,this.markCache[c]||(this.markCache[c]=Be.mark({class:c})))},o,s);return n.finish()}}const wC=Wl.high(Rt.fromClass(bC,{decorations:r=>r.decorations})),kC=Vi.define([{tag:F.meta,color:"#404740"},{tag:F.link,textDecoration:"underline"},{tag:F.heading,textDecoration:"underline",fontWeight:"bold"},{tag:F.emphasis,fontStyle:"italic"},{tag:F.strong,fontWeight:"bold"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.keyword,color:"#708"},{tag:[F.atom,F.bool,F.url,F.contentSeparator,F.labelName],color:"#219"},{tag:[F.literal,F.inserted],color:"#164"},{tag:[F.string,F.deleted],color:"#a11"},{tag:[F.regexp,F.escape,F.special(F.string)],color:"#e40"},{tag:F.definition(F.variableName),color:"#00f"},{tag:F.local(F.variableName),color:"#30a"},{tag:[F.typeName,F.namespace],color:"#085"},{tag:F.className,color:"#167"},{tag:[F.special(F.variableName),F.macroName],color:"#256"},{tag:F.definition(F.propertyName),color:"#00c"},{tag:F.comment,color:"#940"},{tag:F.invalid,color:"#f00"}]),SC=ue.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),dv=1e4,uv="()[]{}",hv=Z.define({combine(r){return Jl(r,{afterCursor:!0,brackets:uv,maxScanDistance:dv,renderMatch:EC})}}),xC=Be.mark({class:"cm-matchingBracket"}),CC=Be.mark({class:"cm-nonmatchingBracket"});function EC(r){let e=[],t=r.matched?xC:CC;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}const $C=qr.define({create(){return Be.none},update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],n=e.state.facet(hv);for(let o of e.state.selection.ranges){if(!o.empty)continue;let s=Ea(e.state,o.head,-1,n)||o.head>0&&Ea(e.state,o.head-1,1,n)||n.afterCursor&&(Ea(e.state,o.head,1,n)||o.head<e.state.doc.length&&Ea(e.state,o.head+1,-1,n));s&&(t=t.concat(n.renderMatch(s,e.state)))}return Be.set(t,!0)},provide:r=>ue.decorations.from(r)}),_C=[$C,SC];function NC(r={}){return[hv.of(r),_C]}const fv=new fe;function gu(r,e,t){let n=r.prop(e<0?fe.openedBy:fe.closedBy);if(n)return n;if(r.name.length==1){let o=t.indexOf(r.name);if(o>-1&&o%2==(e<0?1:0))return[t[o+e]]}return null}function yu(r){let e=r.type.prop(fv);return e?e(r.node):r}function Ea(r,e,t,n={}){let o=n.maxScanDistance||dv,s=n.brackets||uv,a=mn(r),l=a.resolveInner(e,t);for(let c=l;c;c=c.parent){let d=gu(c.type,t,s);if(d&&c.from<c.to){let u=yu(c);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return AC(r,e,t,c,u,d,s)}}return OC(r,e,t,a,l.type,o,s)}function AC(r,e,t,n,o,s,a){let l=n.parent,c={from:o.from,to:o.to},d=0,u=l==null?void 0:l.cursor();if(u&&(t<0?u.childBefore(n.from):u.childAfter(n.to)))do if(t<0?u.to<=n.from:u.from>=n.to){if(d==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let h=yu(u);return{start:c,end:h?{from:h.from,to:h.to}:void 0,matched:!0}}else if(gu(u.type,t,a))d++;else if(gu(u.type,-t,a)){if(d==0){let h=yu(u);return{start:c,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}d--}}while(t<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function OC(r,e,t,n,o,s,a){let l=t<0?r.sliceDoc(e-1,e):r.sliceDoc(e,e+1),c=a.indexOf(l);if(c<0||c%2==0!=t>0)return null;let d={from:t<0?e-1:e,to:t>0?e+1:e},u=r.doc.iterRange(e,t>0?r.doc.length:0),h=0;for(let f=0;!u.next().done&&f<=s;){let p=u.value;t<0&&(f+=p.length);let y=e+f*t;for(let g=t>0?0:p.length-1,m=t>0?p.length:-1;g!=m;g+=t){let v=a.indexOf(p[g]);if(!(v<0||n.resolveInner(y+g,1).type!=o))if(v%2==0==t>0)h++;else{if(h==1)return{start:d,end:{from:y+g,to:y+g+1},matched:v>>1==c>>1};h--}}t>0&&(f+=p.length)}return u.done?{start:d,matched:!1}:null}const TC=Object.create(null),Bm=[mt.none],Pm=[],Im=Object.create(null),BC=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])BC[r]=PC(TC,e);function sd(r,e){Pm.indexOf(r)>-1||(Pm.push(r),console.warn(e))}function PC(r,e){let t=[];for(let l of e.split(" ")){let c=[];for(let d of l.split(".")){let u=r[d]||F[d];u?typeof u=="function"?c.length?c=c.map(u):sd(d,`Modifier ${d} used at start of tag`):c.length?sd(d,`Tag ${d} used as modifier`):c=Array.isArray(u)?u:[u]:sd(d,`Unknown highlighting tag ${d}`)}for(let d of c)t.push(d)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),o=n+" "+t.map(l=>l.id),s=Im[o];if(s)return s.id;let a=Im[o]=mt.define({id:Bm.length,name:n,props:[Yy({[n]:t})]});return Bm.push(a),a.id}exports.Direction.RTL,exports.Direction.LTR;var IC=r=>{var{theme:e,settings:t={},styles:n=[]}=r,o={".cm-gutters":{}},s={};t.background&&(s.backgroundColor=t.background),t.backgroundImage&&(s.backgroundImage=t.backgroundImage),t.foreground&&(s.color=t.foreground),(t.background||t.foreground)&&(o["&"]=s),t.fontFamily&&(o["&.cm-editor .cm-scroller"]={fontFamily:t.fontFamily}),t.gutterBackground&&(o[".cm-gutters"].backgroundColor=t.gutterBackground),t.gutterForeground&&(o[".cm-gutters"].color=t.gutterForeground),t.gutterBorder&&(o[".cm-gutters"].borderRightColor=t.gutterBorder),t.caret&&(o[".cm-content"]={caretColor:t.caret},o[".cm-cursor, .cm-dropCursor"]={borderLeftColor:t.caret});var a={};t.gutterActiveForeground&&(a.color=t.gutterActiveForeground),t.lineHighlight&&(o[".cm-activeLine"]={backgroundColor:t.lineHighlight},a.backgroundColor=t.lineHighlight),o[".cm-activeLineGutter"]=a,t.selection&&(o["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:t.selection+" !important"}),t.selectionMatch&&(o["& .cm-selectionMatch"]={backgroundColor:t.selectionMatch});var l=ue.theme(o,{dark:e==="dark"}),c=Vi.define(n),d=[l,cv(c)];return d};const MC=IC({theme:"light",settings:{background:"var(--scalar-background-2)",foreground:"var(--scalar-color-1)",caret:"var(--scalar-color-1)",selection:"rgba(151, 183, 205, 0.2)",selectionMatch:"#e3dcce",gutterBackground:"var(--scalar-background-2)",gutterForeground:"var(--scalar-color-3)",gutterBorder:"transparent",lineHighlight:"var(--scalar-background-3)",fontFamily:"var(--scalar-font-code)"},styles:[{tag:[F.standard(F.tagName),F.tagName],color:"var(--scalar-color-purple)"},{tag:[F.comment],color:"var(--scalar-color-3)"},{tag:[F.className],color:"var(--scalar-color-orange)"},{tag:[F.variableName,F.propertyName,F.attributeName],color:"var(--scalar-color-1)"},{tag:[F.operator],color:"var(--scalar-color-2)"},{tag:[F.keyword,F.typeName,F.typeOperator],color:"var(--scalar-color-green)"},{tag:[F.string],color:"var(--scalar-color-blue)"},{tag:[F.bracket,F.regexp,F.meta],color:"var(--scalar-color-3)"},{tag:[F.number],color:"var(--scalar-color-blue)"},{tag:[F.name,F.quote],color:"var(--scalar-color-3)"},{tag:[F.heading],color:"var(--scalar-color-3)",fontWeight:"bold"},{tag:[F.emphasis],color:"var(--scalar-color-3)",fontStyle:"italic"},{tag:[F.deleted],color:"var(--scalar-color-3)",backgroundColor:"transparent"},{tag:[F.atom,F.bool,F.special(F.variableName)],color:"var(--scalar-color-3)"},{tag:[F.url,F.escape,F.regexp,F.link],color:"var(--scalar-color-1)"},{tag:F.link,textDecoration:"underline"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.invalid,color:"var(--scalar-color-3)"}]}),Mm=new jy({regexp:/(\{[^}]+\})/g,decoration:()=>Be.mark({attributes:{class:"api-client-url-variable"}})}),DC=()=>Rt.fromClass(class{constructor(r){fp(this,"variables");this.variables=Mm.createDeco(r)}update(r){this.variables=Mm.updateDeco(r,this.variables)}},{decorations:r=>r.variables,provide:r=>ue.atomicRanges.of(e=>{var t;return((t=e.plugin(r))==null?void 0:t.variables)||Be.none})}),VC={class:"scalar-modal-layout modal-layout"},RC=i.defineComponent({__name:"FlowModal",props:{state:{},title:{},bodyClass:{},maxWidth:{},variant:{default:"normal"}},setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(Le.Dialog),{open:e.state.open,onClose:t[0]||(t[0]=n=>e.state.hide())},{default:i.withCtx(()=>[i.createElementVNode("div",VC,[i.createVNode(i.unref(Le.DialogPanel),{class:i.normalizeClass(["modal",{"modal-content-large":e.variant==="large","modal-content-normal":e.variant==="normal","modal-content-small":e.variant==="small","modal-content-search":e.variant==="search","modal-content-history":e.variant==="history"}]),style:i.normalizeStyle({maxWidth:e.maxWidth})},{default:i.withCtx(()=>[e.title?(i.openBlock(),i.createBlock(i.unref(Le.DialogTitle),{key:0,class:"modal-header"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.title),1)]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(Le.DialogDescription),{class:i.normalizeClass(["modal-body custom-scroll",[e.bodyClass]])},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"])]),_:3},8,["class","style"])])]),_:3},8,["open"]))}}),pv=U(RC,[["__scopeId","data-v-4aafbf68"]]),mv=()=>i.reactive({open:!1,show(){this.open=!0},hide(){this.open=!1}});function Qa(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}const gv=(r,e)=>{if(typeof e!="string"||!e.length)return r;const t=r.trim(),n=e.trim(),o=t.endsWith("/")?t:`${t}/`,s=n.startsWith("/")?n.slice(1):n;return[o,s].join("")};function yv(r){return typeof window>"u"?Buffer.from(r).toString("base64"):btoa(r)}const vv=r=>{const e=/(?:\{+)\s*(\w+)\s*(?:\}+)/g;return[...r.matchAll(e)].map(t=>t[1].trim())||[]};function LC(r){return!(!r||Array.isArray(r)&&!r.length||(r??[]).some(e=>!Object.keys(e).length))}function xh(r,e){var c,d;const t=[],n=[],o=[];if(!r.customSecurity&&(!r.preferredSecurityScheme||!LC(e)))return{headers:t,queryString:n,cookies:o};const a=(e==null?void 0:e.some(u=>r.preferredSecurityScheme&&Object.keys(u).includes(r.preferredSecurityScheme)))||r.customSecurity?r.preferredSecurityScheme:Object.keys((e==null?void 0:e[0])??{}).pop(),l=(c=r.securitySchemes)==null?void 0:c[a??""];if(l){if("type"in l&&l.type==="apiKey"){if("in"in l&&l.in==="header"){const u=(d=r.apiKey.token)!=null&&d.length?r.apiKey.token:"YOUR_TOKEN";t.push({name:"name"in l?l.name:"",value:u})}else if("in"in l&&l.in==="cookie"){const u=r.apiKey.token.length?r.apiKey.token:"YOUR_TOKEN";o.push({name:l.name,value:u})}else if("in"in l&&l.in==="query"){const u=r.apiKey.token.length?r.apiKey.token:"YOUR_TOKEN";n.push({name:l.name,value:u})}}else if("type"in l&&(l.type==="http"||l.type==="basic")){if("type"in l&&(l.type==="basic"||l.type==="http"&&l.scheme==="basic")){const{username:u,password:h}=r.http.basic,f=Ch(u,h);t.push({name:"Authorization",value:`Basic ${f}`.trim()})}else if("type"in l&&l.type==="http"&&l.scheme==="bearer"){const u=r.http.bearer.token.length?r.http.bearer.token:"YOUR_SECRET_TOKEN";t.push({name:"Authorization",value:`Bearer ${u}`})}}else if("type"in l&&l.type.toLowerCase()==="oauth2"){const u=r.oAuth2.accessToken||"YOUR_SECRET_TOKEN";t.push({name:"Authorization",value:`Bearer ${u}`})}}return{headers:t,queryString:n,cookies:o}}function Ch(r,e){return r!=null&&r.length||e!=null&&e.length?yv(`${r}:${e}`):""}function bv(r){return[r.apiKey.token,r.http.bearer.token,r.oAuth2.accessToken,Ch(r.http.basic.username,r.http.basic.password),r.http.basic.password].filter(Boolean)}function Eh(r,e){const t=/{{\s*([\w.-]+)\s*}}/g,n=/{\s*([\w.-]+)\s*}/g,o=(s,a)=>{var l;return typeof e=="function"?e(a):(l=e[a])==null?void 0:l.toString()};return r.replace(t,o).replace(n,o)}function xi(r){var o;const e=(o=r==null?void 0:r.servers)==null?void 0:o[r.selectedServer??0],t=r.variables.reduce((s,a)=>(s[a.name]=a.value,s),{});return typeof(e==null?void 0:e.url)=="string"?Eh(e==null?void 0:e.url,t):e==null?void 0:e.url}function wv(r,e){const t=new URL(e);return t.href=r,t.searchParams.append("scalar_url",e),t.toString()}const jC=Xe.useEventBus(Symbol());var FC=Object.defineProperty,qC=(r,e,t)=>e in r?FC(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,dt=(r,e,t)=>(qC(r,typeof e!="symbol"?e+"":e,t),t);function zC(r){if(!r||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}zC("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:20px;width:20px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;transition:opacity .4s,box-shadow .2s;z-index:100}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toast][data-theme=dark] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;opacity:0;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]{opacity:1}[data-sonner-toast]:focus [data-close-button]{opacity:1}[data-sonner-toast]:focus-within [data-close-button]{opacity:1}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:'';position:absolute;left:0;right:0;height:100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{display:none;transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}");let vu=1;class HC{constructor(){dt(this,"subscribers"),dt(this,"toasts"),dt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)})),dt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))}),dt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]}),dt(this,"create",e=>{var t;const{message:n,...o}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:vu++,a=this.toasts.findIndex(c=>c.id===s),l=e.dismissible===void 0?!0:e.dismissible;return a!==-1?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...e,id:s,title:n}),{...c,...e,id:s,dismissible:l,title:n}):c):this.addToast({title:n,...o,dismissible:l,id:s}),s}),dt(this,"dismiss",e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e)),dt(this,"message",(e,t)=>this.create({...t,message:e})),dt(this,"error",(e,t)=>this.create({...t,type:"error",message:e})),dt(this,"success",(e,t)=>this.create({...t,type:"success",message:e})),dt(this,"info",(e,t)=>this.create({...t,type:"info",message:e})),dt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e})),dt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e})),dt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading}));const o=e instanceof Promise?e:e();let s=n!==void 0;return o.then(a=>{if(t.success!==void 0){s=!1;const l=typeof t.success=="function"?t.success(a):t.success;this.create({id:n,type:"success",message:l})}}).catch(a=>{if(t.error!==void 0){s=!1;const l=typeof t.error=="function"?t.error(a):t.error;this.create({id:n,type:"error",message:l})}}).finally(()=>{var a;s&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),n}),dt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||vu++;return this.publish({...t,id:n,title:e}),n}),this.subscribers=[],this.toasts=[]}}const Ht=new HC,UC=(r,e)=>{const t=(e==null?void 0:e.id)||vu++;return Ht.publish({title:r,...e,id:t}),t},KC=UC,$a=Object.assign(KC,{success:Ht.success,info:Ht.info,warning:Ht.warning,error:Ht.error,custom:Ht.custom,message:Ht.message,promise:Ht.promise,dismiss:Ht.dismiss,loading:Ht.loading}),WC=["data-visible"],GC={className:"sonner-spinner"},JC=i.defineComponent({__name:"Loader",props:{visible:Boolean},setup(r){const e=Array(12).fill(0);return(t,n)=>(i.openBlock(),i.createElementBlock("div",{className:"sonner-loading-wrapper","data-visible":r.visible},[i.createElementVNode("div",GC,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(e),o=>(i.openBlock(),i.createElementBlock("div",{key:`spinner-bar-${o}`,className:"sonner-loading-bar"}))),128))])],8,WC))}}),Ri=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},YC={},XC={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},QC=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1),ZC=[QC];function eE(r,e){return i.openBlock(),i.createElementBlock("svg",XC,ZC)}const tE=Ri(YC,[["render",eE]]),rE={},nE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},oE=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1),sE=[oE];function iE(r,e){return i.openBlock(),i.createElementBlock("svg",nE,sE)}const aE=Ri(rE,[["render",iE]]),lE={},cE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},dE=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1),uE=[dE];function hE(r,e){return i.openBlock(),i.createElementBlock("svg",cE,uE)}const fE=Ri(lE,[["render",hE]]),pE={},mE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},gE=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1),yE=[gE];function vE(r,e){return i.openBlock(),i.createElementBlock("svg",mE,yE)}const bE=Ri(pE,[["render",vE]]),wE={},kE={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},SE=i.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),xE=i.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1),CE=[SE,xE];function EE(r,e){return i.openBlock(),i.createElementBlock("svg",kE,CE)}const $E=Ri(wE,[["render",EE]]),_E=["aria-live","data-styled","data-mounted","data-promise","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-type","data-invert","data-swipe-out","data-expanded"],NE=["data-disabled"],AE={key:1,"data-icon":""},OE={"data-content":""},TE={"data-title":""},BE=4e3,PE=14,IE=20,ME=200,DE=i.defineComponent({__name:"Toast",props:{toast:{},toasts:{},index:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},duration:{},descriptionClass:{}},emits:["update:heights","removeToast"],setup(r,{emit:e}){const t=B=>!!B.promise,n=e,o=r,s=i.ref(!1),a=i.ref(!1),l=i.ref(!1),c=i.ref(!1),d=i.ref(null),u=i.ref(0),h=i.ref(0),f=i.ref(null),p=i.ref(null),y=i.computed(()=>o.index===0),g=i.computed(()=>o.index+1<=o.visibleToasts),m=i.computed(()=>o.toast.type),v=i.computed(()=>o.toast.dismissible),b=o.toast.className||"",w=o.toast.descriptionClassName||"",S=o.toast.style||{},x=i.computed(()=>o.heights.findIndex(B=>B.toastId===o.toast.id)||0),k=i.computed(()=>o.toast.duration||o.duration||BE),C=i.ref(0),N=i.ref(0),P=i.ref(k.value),M=i.ref(0),j=i.ref(null),I=i.computed(()=>o.position.split("-")),X=i.computed(()=>I.value[0]),W=i.computed(()=>I.value[1]),te=i.computed(()=>o.heights.reduce((B,z,H)=>H>=x.value?B:B+z.height,0)),me=i.computed(()=>o.toast.invert||o.invert),ke=i.computed(()=>d.value==="loading"),Se=i.computed(()=>d.value??(o.toast.type||null)),se=i.computed(()=>!t(o.toast)&&typeof o.toast.title=="object"),q=i.computed(()=>{if(!t(o.toast))return null;switch(d.value){case"loading":return o.toast.loading;case"success":return typeof o.toast.success=="function"?f.value:o.toast.success;case"error":return typeof o.toast.error=="function"?f.value:o.toast.error;default:return null}});i.onMounted(()=>s.value=!0),i.watchEffect(()=>{N.value=x.value*PE+te.value});function T(){var B,z;(!ke.value||v.value)&&(V(),(z=(B=o.toast).onDismiss)==null||z.call(B,o.toast))}function V(){a.value=!0,u.value=N.value;const B=o.heights.filter(z=>z.toastId!==o.toast.id);n("update:heights",B),setTimeout(()=>{n("removeToast",o.toast)},ME)}const D=B=>{ke||(u.value=N.value,B.target.setPointerCapture(B.pointerId),B.target.tagName!=="BUTTON"&&(l.value=!0,j.value={x:B.clientX,y:B.clientY}))},E=B=>{var z,H,ie,oe;if(c.value)return;j.value=null;const ye=Number(((z=p.value)==null?void 0:z.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(ye)>=IE){u.value=N.value,(ie=(H=o.toast).onDismiss)==null||ie.call(H,o.toast),V(),c.value=!0;return}(oe=p.value)==null||oe.style.setProperty("--swipe-amount","0px"),l.value=!0},A=B=>{var z;if(!j.value)return;const H=B.clientY-j.value.y,ie=B.clientX-j.value.x,oe=(I.value[0]==="top"?Math.min:Math.max)(0,H),ye=B.pointerType==="touch"?10:2;Math.abs(oe)>ye?(z=p.value)==null||z.style.setProperty("--swipe-amount",`${H}px`):Math.abs(ie)>ye&&(j.value=null)};return i.watchEffect(B=>{if(o.toast.promise&&d.value==="loading"||o.toast.duration===1/0)return;let z;const H=()=>{if(M.value<C.value){const oe=new Date().getTime()-C.value;P.value=P.value-oe}M.value=new Date().getTime()},ie=()=>{C.value=new Date().getTime(),z=setTimeout(()=>{var oe,ye;(ye=(oe=o.toast).onAutoClose)==null||ye.call(oe,o.toast),V()},P.value)};o.expanded||o.interacting?H():ie(),B(()=>{clearTimeout(z)})}),i.onMounted(()=>{if(p.value){const B=p.value.getBoundingClientRect().height;h.value=B;const z=[{toastId:o.toast.id,height:B},...o.heights];n("update:heights",z)}}),i.onUnmounted(()=>{if(p.value){const B=o.heights.filter(z=>z.toastId!==o.toast.id);n("update:heights",B)}}),i.watchEffect(()=>{o.toast.delete&&V()}),(B,z)=>(i.openBlock(),i.createElementBlock("li",{"aria-live":B.toast.important?"assertive":"polite","aria-atomic":"",role:"status",tabindex:"0",ref_key:"toastRef",ref:p,"data-sonner-toast":"",class:i.normalizeClass(i.unref(b)),"data-styled":!se.value,"data-mounted":s.value,"data-promise":!!B.toast.promise,"data-removed":a.value,"data-visible":g.value,"data-y-position":X.value,"data-x-position":W.value,"data-index":o.index,"data-front":y.value,"data-swiping":l.value,"data-type":d.value!=="loading"&&d.value?d.value:m.value,"data-invert":me.value,"data-swipe-out":c.value,"data-expanded":!!(o.expanded||o.expandByDefault&&s.value),style:i.normalizeStyle({"--index":o.index,"--toasts-before":o.index,"--z-index":B.toasts.length-o.index,"--offset":`${a.value?u.value:N.value}px`,"--initial-height":o.expandByDefault?"auto":`${h.value}px`,...i.unref(S)}),onPointerdown:D,onPointerup:E,onPointermove:A},[o.closeButton&&!se.value?(i.openBlock(),i.createElementBlock("button",{key:0,"aria-label":"Close toast","data-close-button":"","data-disabled":ke.value,onClick:T},[i.createVNode($E)],8,NE)):i.createCommentVNode("",!0),m.value||B.toast.icon||B.toast.promise?(i.openBlock(),i.createElementBlock("div",AE,[typeof B.toast.promise=="function"||m.value==="loading"?(i.openBlock(),i.createBlock(JC,{key:0,visible:d.value==="loading"||m.value==="loading"},null,8,["visible"])):i.createCommentVNode("",!0),Se.value==="success"?(i.openBlock(),i.createBlock(tE,{key:1})):Se.value==="info"?(i.openBlock(),i.createBlock(aE,{key:2})):Se.value==="warning"?(i.openBlock(),i.createBlock(fE,{key:3})):Se.value==="error"?(i.openBlock(),i.createBlock(bE,{key:4})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",OE,[i.createElementVNode("div",TE,[typeof B.toast.title=="string"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(B.toast.title),1)],64)):B.toast.title===void 0||B.toast.title===null?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(q.value),1)],64)):se.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(B.toast.title),{key:2,onCloseToast:z[0]||(z[0]=()=>{var H;V(),(H=B.toast.cancel)!=null&&H.onClick&&B.toast.cancel.onClick()})},null,32)):i.createCommentVNode("",!0)]),B.toast.description?(i.openBlock(),i.createElementBlock("div",{key:0,"data-description":"",class:i.normalizeClass(B.descriptionClass+i.unref(w))},i.toDisplayString(B.toast.description),3)):i.createCommentVNode("",!0)]),B.toast.cancel?(i.openBlock(),i.createElementBlock("button",{key:2,"data-button":"","data-cancel":"",onClick:z[1]||(z[1]=()=>{var H;V(),(H=B.toast.cancel)!=null&&H.onClick&&B.toast.cancel.onClick()})},i.toDisplayString(B.toast.cancel.label),1)):i.createCommentVNode("",!0),B.toast.action?(i.openBlock(),i.createElementBlock("button",{key:3,"data-button":"",onClick:z[2]||(z[2]=()=>{var H;V(),(H=B.toast.action)==null||H.onClick()})},i.toDisplayString(B.toast.action.label),1)):i.createCommentVNode("",!0)],46,_E))}}),VE=["aria-label"],RE=["dir","data-theme","data-rich-colors","data-y-position","data-x-position"],LE=3,Dm="32px",jE=4e3,FE=356,Vm=14,qE=typeof window<"u"&&typeof document<"u",zE=i.defineComponent({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{default:jE},gap:{default:Vm},visibleToasts:{default:LE},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},className:{default:""},style:{default:()=>({})},offset:{default:Dm},dir:{default:"auto"}},setup(r){const e=r,t=i.useAttrs(),n=i.ref([]),o=i.ref([]),s=i.ref(!1),a=i.ref(!1),l=i.ref(e.theme!=="system"?e.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),c=i.computed(()=>e.position.split("-")),d=i.ref(null),u=e.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function h(p){n.value=n.value.filter(({id:y})=>y!==p.id)}function f(){if(typeof window>"u")return"ltr";const p=document.documentElement.getAttribute("dir");return p==="auto"||!p?window.getComputedStyle(document.documentElement).direction:p}return i.onMounted(()=>{const p=Ht.subscribe(y=>{if(y.dismiss){n.value=n.value.map(g=>g.id===y.id?{...g,delete:!0}:g);return}i.nextTick(()=>{const g=n.value.findIndex(m=>m.id===y.id);g!==-1?n.value.splice(g,1,y):n.value=[y,...n.value]})});i.onUnmounted(()=>{p()})}),i.watch(()=>e.theme,p=>{if(p!=="system"){l.value=p;return}p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?l.value="dark":l.value="light"),!(typeof window>"u")&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:y})=>{y?l.value="dark":l.value="light"})}),i.watchEffect(()=>{n.value.length<=1&&(s.value=!1)}),i.watchEffect(p=>{function y(g){var m,v;e.hotkey.every(b=>g[b]||g.code===b)&&(s.value=!0,(m=d.value)==null||m.focus()),g.code==="Escape"&&(document.activeElement===d.value||(v=d.value)!=null&&v.contains(document.activeElement))&&(s.value=!1)}qE&&(document.addEventListener("keydown",y),p(()=>{document.removeEventListener("keydown",y)}))}),(p,y)=>{var g;return i.openBlock(),i.createElementBlock("section",{"aria-label":`Notifications ${i.unref(u)}`,tabIndex:-1},[i.createElementVNode("ol",{ref_key:"listRef",ref:d,"data-sonner-toaster":"",dir:p.dir==="auto"?f():p.dir,tabIndex:-1,"data-theme":p.theme,"data-rich-colors":p.richColors,"data-y-position":c.value[0],"data-x-position":c.value[1],style:i.normalizeStyle({"--front-toast-height":`${(g=o.value[0])==null?void 0:g.height}px`,"--offset":typeof p.offset=="number"?`${p.offset}px`:p.offset||Dm,"--width":`${FE}px`,"--gap":`${Vm}px`,...i.unref(t).style}),onMouseenter:y[1]||(y[1]=m=>s.value=!0),onMousemove:y[2]||(y[2]=m=>s.value=!0),onMouseleave:y[3]||(y[3]=()=>{a.value||(s.value=!1)}),onPointerdown:y[4]||(y[4]=m=>a.value=!1),onPointerup:y[5]||(y[5]=m=>a.value=!1)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(m,v)=>{var b,w,S,x;return i.openBlock(),i.createBlock(DE,{key:m.id,index:v,toast:m,duration:((b=p.toastOptions)==null?void 0:b.duration)??p.duration,className:(w=p.toastOptions)==null?void 0:w.className,descriptionClassName:(S=p.toastOptions)==null?void 0:S.descriptionClassName,invert:p.invert,visibleToasts:p.visibleToasts,closeButton:p.closeButton,interacting:a.value,position:p.position,style:i.normalizeStyle((x=p.toastOptions)==null?void 0:x.style),toasts:n.value,expandByDefault:p.expand,gap:p.gap,expanded:s.value,heights:o.value,"onUpdate:heights":y[0]||(y[0]=k=>o.value=k),onRemoveToast:h},null,8,["index","toast","duration","className","descriptionClassName","invert","visibleToasts","closeButton","interacting","position","style","toasts","expandByDefault","gap","expanded","heights"])}),128))],44,RE)],8,VE)}}}),kv={toast:()=>null};function HE(r){kv.toast=r}function $h(){return{initializeToasts:HE,toast:(r,e="info",t={timeout:3e3})=>{kv.toast(r,e,t)}}}const UE=i.defineComponent({__name:"ScalarToasts",setup(r){const e=i.ref(!1);i.onMounted(()=>e.value=!0);const t={success:$a.success,error:$a.error,warn:$a.warning,info:$a},{initializeToasts:n}=$h();return n((o,s="info",a={})=>{(t[s]||t.info)(o,{duration:a.timeout||3e3,description:a.description})}),(o,s)=>e.value?(i.openBlock(),i.createBlock(i.unref(zE),{key:0,toastOptions:{className:"toaster"}})):i.createCommentVNode("",!0)}}),KE={},WE={class:"card-form"};function GE(r,e){return i.openBlock(),i.createElementBlock("form",WE,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const JE=U(KE,[["render",GE],["__scopeId","data-v-983db964"]]),YE=i.defineComponent({__name:"CardFormButton",setup(r,{expose:e}){const t=i.ref();return e({el:t}),(n,o)=>(i.openBlock(),i.createElementBlock("button",{ref_key:"el",ref:t,class:"card-form-button",type:"button"},[i.renderSlot(n.$slots,"default",{},void 0,!0)],512))}}),Sv=U(YE,[["__scopeId","data-v-d19add49"]]),XE={},QE={class:"card-form-group"};function ZE(r,e){return i.openBlock(),i.createElementBlock("div",QE,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Rs=U(XE,[["render",ZE],["__scopeId","data-v-c2b3e8ed"]]),e$={},t$={class:"card-form-rows"};function r$(r,e){return i.openBlock(),i.createElementBlock("div",t$,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Rm=U(e$,[["render",r$],["__scopeId","data-v-31dc20e9"]]);function xv(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(t=xv(r[e]))&&(n&&(n+=" "),n+=t);else for(e in r)r[e]&&(n&&(n+=" "),n+=e);return n}function id(){for(var r,e,t=0,n="";t<arguments.length;)(r=arguments[t++])&&(e=xv(r))&&(n&&(n+=" "),n+=e);return n}const Lm=r=>typeof r=="boolean"?"".concat(r):r===0?"0":r,n$=r=>{const e=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l,c;return typeof(r==null||(l=r.hooks)===null||l===void 0?void 0:l["cx:done"])<"u"?r==null?void 0:r.hooks["cx:done"](id(s)):typeof(r==null||(c=r.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?r==null?void 0:r.hooks.onComplete(id(s)):id(s)};return{compose:function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return l=>{const c=Object.fromEntries(Object.entries(l||{}).filter(d=>{let[u]=d;return!["class","className"].includes(u)}));return e(s.map(d=>d(c)),l==null?void 0:l.class,l==null?void 0:l.className)}},cva:o=>s=>{var a;if((o==null?void 0:o.variants)==null)return e(o==null?void 0:o.base,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:l,defaultVariants:c}=o,d=Object.keys(l).map(f=>{const p=s==null?void 0:s[f],y=c==null?void 0:c[f],g=Lm(p)||Lm(y);return l[f][g]}),u={...c,...s&&Object.entries(s).reduce((f,p)=>{let[y,g]=p;return typeof g>"u"?f:{...f,[y]:g}},{})},h=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((f,p)=>{let{class:y,className:g,...m}=p;return Object.entries(m).every(v=>{let[b,w]=v;const S=u[b];return Array.isArray(w)?w.includes(S):S===w})?[...f,y,g]:f},[]);return e(o==null?void 0:o.base,d,h,s==null?void 0:s.class,s==null?void 0:s.className)},cx:e}},_h="-";function o$(r){const e=i$(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;function o(a){const l=a.split(_h);return l[0]===""&&l.length!==1&&l.shift(),Cv(l,e)||s$(a)}function s(a,l){const c=t[a]||[];return l&&n[a]?[...c,...n[a]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Cv(r,e){var a;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),o=n?Cv(r.slice(1),n):void 0;if(o)return o;if(e.validators.length===0)return;const s=r.join(_h);return(a=e.validators.find(({validator:l})=>l(s)))==null?void 0:a.classGroupId}const jm=/^\[(.+)\]$/;function s$(r){if(jm.test(r)){const e=jm.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}}function i$(r){const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return l$(Object.entries(r.classGroups),t).forEach(([s,a])=>{bu(a,n,s,e)}),n}function bu(r,e,t,n){r.forEach(o=>{if(typeof o=="string"){const s=o===""?e:Fm(e,o);s.classGroupId=t;return}if(typeof o=="function"){if(a$(o)){bu(o(n),e,t,n);return}e.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,a])=>{bu(a,Fm(e,s),t,n)})})}function Fm(r,e){let t=r;return e.split(_h).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t}function a$(r){return r.isThemeGetter}function l$(r,e){return e?r.map(([t,n])=>{const o=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,l])=>[e+a,l])):s);return[t,o]}):r}function c$(r){if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;function o(s,a){t.set(s,a),e++,e>r&&(e=0,n=t,t=new Map)}return{get(s){let a=t.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){t.has(s)?t.set(s,a):o(s,a)}}}const Ev="!";function d$(r){const e=r.separator,t=e.length===1,n=e[0],o=e.length;return function(a){const l=[];let c=0,d=0,u;for(let g=0;g<a.length;g++){let m=a[g];if(c===0){if(m===n&&(t||a.slice(g,g+o)===e)){l.push(a.slice(d,g)),d=g+o;continue}if(m==="/"){u=g;continue}}m==="["?c++:m==="]"&&c--}const h=l.length===0?a:a.substring(d),f=h.startsWith(Ev),p=f?h.substring(1):h,y=u&&u>d?u-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:y}}}function u$(r){if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e}function h$(r){return{cache:c$(r.cacheSize),splitModifiers:d$(r),...o$(r)}}const f$=/\s+/;function p$(r,e){const{splitModifiers:t,getClassGroupId:n,getConflictingClassGroupIds:o}=e,s=new Set;return r.trim().split(f$).map(a=>{const{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=t(a);let h=n(u?d.substring(0,u):d),f=!!u;if(!h){if(!u)return{isTailwindClass:!1,originalClassName:a};if(h=n(d),!h)return{isTailwindClass:!1,originalClassName:a};f=!1}const p=u$(l).join(":");return{isTailwindClass:!0,modifierId:c?p+Ev:p,classGroupId:h,originalClassName:a,hasPostfixModifier:f}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:l,classGroupId:c,hasPostfixModifier:d}=a,u=l+c;return s.has(u)?!1:(s.add(u),o(c,d).forEach(h=>s.add(l+h)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function m$(){let r=0,e,t,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=$v(e))&&(n&&(n+=" "),n+=t);return n}function $v(r){if(typeof r=="string")return r;let e,t="";for(let n=0;n<r.length;n++)r[n]&&(e=$v(r[n]))&&(t&&(t+=" "),t+=e);return t}function qm(r,...e){let t,n,o,s=a;function a(c){const d=e.reduce((u,h)=>h(u),r());return t=h$(d),n=t.cache.get,o=t.cache.set,s=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=p$(c,t);return o(c,u),u}return function(){return s(m$.apply(null,arguments))}}function Ne(r){const e=t=>t[r]||[];return e.isThemeGetter=!0,e}const _v=/^\[(?:([a-z-]+):)?(.+)\]$/i,g$=/^\d+\/\d+$/,y$=new Set(["px","full","screen"]),v$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,b$=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,w$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,k$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Er(r){return Vn(r)||y$.has(r)||g$.test(r)}function Hr(r){return ss(r,"length",O$)}function Vn(r){return!!r&&!Number.isNaN(Number(r))}function _a(r){return ss(r,"number",Vn)}function Ls(r){return!!r&&Number.isInteger(Number(r))}function x$(r){return r.endsWith("%")&&Vn(r.slice(0,-1))}function ce(r){return _v.test(r)}function Ur(r){return v$.test(r)}const C$=new Set(["length","size","percentage"]);function E$(r){return ss(r,C$,Nv)}function $$(r){return ss(r,"position",Nv)}const _$=new Set(["image","url"]);function N$(r){return ss(r,_$,B$)}function A$(r){return ss(r,"",T$)}function js(){return!0}function ss(r,e,t){const n=_v.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1}function O$(r){return b$.test(r)&&!w$.test(r)}function Nv(){return!1}function T$(r){return k$.test(r)}function B$(r){return S$.test(r)}function zm(){const r=Ne("colors"),e=Ne("spacing"),t=Ne("blur"),n=Ne("brightness"),o=Ne("borderColor"),s=Ne("borderRadius"),a=Ne("borderSpacing"),l=Ne("borderWidth"),c=Ne("contrast"),d=Ne("grayscale"),u=Ne("hueRotate"),h=Ne("invert"),f=Ne("gap"),p=Ne("gradientColorStops"),y=Ne("gradientColorStopPositions"),g=Ne("inset"),m=Ne("margin"),v=Ne("opacity"),b=Ne("padding"),w=Ne("saturate"),S=Ne("scale"),x=Ne("sepia"),k=Ne("skew"),C=Ne("space"),N=Ne("translate"),P=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ce,e],I=()=>[ce,e],X=()=>["",Er,Hr],W=()=>["auto",Vn,ce],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",ce],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[Vn,_a],V=()=>[Vn,ce];return{cacheSize:500,separator:":",theme:{colors:[js],spacing:[Er,Hr],blur:["none","",Ur,ce],brightness:T(),borderColor:[r],borderRadius:["none","","full",Ur,ce],borderSpacing:I(),borderWidth:X(),contrast:T(),grayscale:se(),hueRotate:V(),invert:se(),gap:I(),gradientColorStops:[r],gradientColorStopPositions:[x$,Hr],inset:j(),margin:j(),opacity:T(),padding:I(),saturate:T(),scale:T(),sepia:se(),skew:V(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ce]}],container:["container"],columns:[{columns:[Ur]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),ce]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ls,ce]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ce]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Ls,ce]}],"grid-cols":[{"grid-cols":[js]}],"col-start-end":[{col:["auto",{span:["full",Ls,ce]},ce]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[js]}],"row-start-end":[{row:["auto",{span:[Ls,ce]},ce]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ce]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Se()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Se(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Se(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ce,e]}],"min-w":[{"min-w":[ce,e,"min","max","fit"]}],"max-w":[{"max-w":[ce,e,"none","full","min","max","fit","prose",{screen:[Ur]},Ur]}],h:[{h:[ce,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ce,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ur,Hr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_a]}],"font-family":[{font:[js]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ce]}],"line-clamp":[{"line-clamp":["none",Vn,_a]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Er,ce]}],"list-image":[{"list-image":["none",ce]}],"list-style-type":[{list:["none","disc","decimal",ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Er,Hr]}],"underline-offset":[{"underline-offset":["auto",Er,ce]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),$$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",E$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},N$]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...me(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:me()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[Er,ce]}],"outline-w":[{outline:[Er,Hr]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Er,Hr]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",Ur,A$]}],"shadow-color":[{shadow:[js]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ke(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ke()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ur,ce]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ce]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ce]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Ls,ce]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ce]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[Er,Hr,_a]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function P$(r,{cacheSize:e,prefix:t,separator:n,extend:o={},override:s={}}){Za(r,"cacheSize",e),Za(r,"prefix",t),Za(r,"separator",n);for(const a in s)I$(r[a],s[a]);for(const a in o)M$(r[a],o[a]);return r}function Za(r,e,t){t!==void 0&&(r[e]=t)}function I$(r,e){if(e)for(const t in e)Za(r,t,e[t])}function M$(r,e){if(e)for(const t in e){const n=e[t];n!==void 0&&(r[t]=(r[t]||[]).concat(n))}}function D$(r,...e){return typeof r=="function"?qm(zm,r,...e):qm(()=>P$(zm(),r),...e)}const Sl=Math.min,Hn=Math.max,xl=Math.round,Na=Math.floor,gn=r=>({x:r,y:r}),V$={left:"right",right:"left",bottom:"top",top:"bottom"},R$={start:"end",end:"start"};function Hm(r,e,t){return Hn(r,Sl(e,t))}function Ql(r,e){return typeof r=="function"?r(e):r}function Xn(r){return r.split("-")[0]}function Zl(r){return r.split("-")[1]}function Av(r){return r==="x"?"y":"x"}function Ov(r){return r==="y"?"height":"width"}function ec(r){return["top","bottom"].includes(Xn(r))?"y":"x"}function Tv(r){return Av(ec(r))}function L$(r,e,t){t===void 0&&(t=!1);const n=Zl(r),o=Tv(r),s=Ov(o);let a=o==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Cl(a)),[a,Cl(a)]}function j$(r){const e=Cl(r);return[wu(r),e,wu(e)]}function wu(r){return r.replace(/start|end/g,e=>R$[e])}function F$(r,e,t){const n=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?o:n:e?n:o;case"left":case"right":return e?s:a;default:return[]}}function q$(r,e,t,n){const o=Zl(r);let s=F$(Xn(r),t==="start",n);return o&&(s=s.map(a=>a+"-"+o),e&&(s=s.concat(s.map(wu)))),s}function Cl(r){return r.replace(/left|right|bottom|top/g,e=>V$[e])}function z$(r){return{top:0,right:0,bottom:0,left:0,...r}}function H$(r){return typeof r!="number"?z$(r):{top:r,right:r,bottom:r,left:r}}function El(r){const{x:e,y:t,width:n,height:o}=r;return{width:n,height:o,top:t,left:e,right:e+n,bottom:t+o,x:e,y:t}}function Um(r,e,t){let{reference:n,floating:o}=r;const s=ec(e),a=Tv(e),l=Ov(a),c=Xn(e),d=s==="y",u=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let p;switch(c){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-o.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Zl(e)){case"start":p[a]-=f*(t&&d?-1:1);break;case"end":p[a]+=f*(t&&d?-1:1);break}return p}const U$=async(r,e,t)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=t,l=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let d=await a.getElementRects({reference:r,floating:e,strategy:o}),{x:u,y:h}=Um(d,n,c),f=n,p={},y=0;for(let g=0;g<l.length;g++){const{name:m,fn:v}=l[g],{x:b,y:w,data:S,reset:x}=await v({x:u,y:h,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:d,platform:a,elements:{reference:r,floating:e}});u=b??u,h=w??h,p={...p,[m]:{...p[m],...S}},x&&y<=50&&(y++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(d=x.rects===!0?await a.getElementRects({reference:r,floating:e,strategy:o}):x.rects),{x:u,y:h}=Um(d,f,c)),g=-1)}return{x:u,y:h,placement:f,strategy:o,middlewareData:p}};async function Bv(r,e){var t;e===void 0&&(e={});const{x:n,y:o,platform:s,rects:a,elements:l,strategy:c}=r,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Ql(e,r),y=H$(p),m=l[f?h==="floating"?"reference":"floating":h],v=El(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(m)))==null||t?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),b=h==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},x=El(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:c}):b);return{top:(v.top-x.top+y.top)/S.y,bottom:(x.bottom-v.bottom+y.bottom)/S.y,left:(v.left-x.left+y.left)/S.x,right:(x.right-v.right+y.right)/S.x}}const K$=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:d}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...m}=Ql(r,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const v=Xn(o),b=Xn(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),S=f||(b||!g?[Cl(l)]:j$(l));!f&&y!=="none"&&S.push(...q$(l,g,y,w));const x=[l,...S],k=await Bv(e,m),C=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&C.push(k[v]),h){const I=L$(o,a,w);C.push(k[I[0]],k[I[1]])}if(N=[...N,{placement:o,overflows:C}],!C.every(I=>I<=0)){var P,M;const I=(((P=s.flip)==null?void 0:P.index)||0)+1,X=x[I];if(X)return{data:{index:I,overflows:N},reset:{placement:X}};let W=(M=N.filter(te=>te.overflows[0]<=0).sort((te,me)=>te.overflows[1]-me.overflows[1])[0])==null?void 0:M.placement;if(!W)switch(p){case"bestFit":{var j;const te=(j=N.map(me=>[me.placement,me.overflows.filter(ke=>ke>0).reduce((ke,Se)=>ke+Se,0)]).sort((me,ke)=>me[1]-ke[1])[0])==null?void 0:j[0];te&&(W=te);break}case"initialPlacement":W=l;break}if(o!==W)return{reset:{placement:W}}}return{}}}};async function W$(r,e){const{placement:t,platform:n,elements:o}=r,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Xn(t),l=Zl(t),c=ec(t)==="y",d=["left","top"].includes(a)?-1:1,u=s&&c?-1:1,h=Ql(e,r);let{mainAxis:f,crossAxis:p,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof y=="number"&&(p=l==="end"?y*-1:y),c?{x:p*u,y:f*d}:{x:f*d,y:p*u}}const G$=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:o,y:s,placement:a,middlewareData:l}=e,c=await W$(e,r);return a===((t=l.offset)==null?void 0:t.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},J$=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:m=>{let{x:v,y:b}=m;return{x:v,y:b}}},...c}=Ql(r,e),d={x:t,y:n},u=await Bv(e,c),h=ec(Xn(o)),f=Av(h);let p=d[f],y=d[h];if(s){const m=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[m],w=p-u[v];p=Hm(b,p,w)}if(a){const m=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=y+u[m],w=y-u[v];y=Hm(b,y,w)}const g=l.fn({...e,[f]:p,[h]:y});return{...g,data:{x:g.x-t,y:g.y-n}}}}};function Lr(r){return Nh(r)?(r.nodeName||"").toLowerCase():"#document"}function $t(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function zr(r){var e;return(e=(Nh(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function Nh(r){return r instanceof Node||r instanceof $t(r).Node}function jr(r){return r instanceof Element||r instanceof $t(r).Element}function vr(r){return r instanceof HTMLElement||r instanceof $t(r).HTMLElement}function Km(r){return typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof $t(r).ShadowRoot}function Li(r){const{overflow:e,overflowX:t,overflowY:n,display:o}=Lt(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(o)}function Y$(r){return["table","td","th"].includes(Lr(r))}function Ah(r){const e=Oh(),t=Lt(r);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function X$(r){let e=Yo(r);for(;vr(e)&&!tc(e);){if(Ah(e))return e;e=Yo(e)}return null}function Oh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tc(r){return["html","body","#document"].includes(Lr(r))}function Lt(r){return $t(r).getComputedStyle(r)}function rc(r){return jr(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function Yo(r){if(Lr(r)==="html")return r;const e=r.assignedSlot||r.parentNode||Km(r)&&r.host||zr(r);return Km(e)?e.host:e}function Pv(r){const e=Yo(r);return tc(e)?r.ownerDocument?r.ownerDocument.body:r.body:vr(e)&&Li(e)?e:Pv(e)}function Ci(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const o=Pv(r),s=o===((n=r.ownerDocument)==null?void 0:n.body),a=$t(o);return s?e.concat(a,a.visualViewport||[],Li(o)?o:[],a.frameElement&&t?Ci(a.frameElement):[]):e.concat(o,Ci(o,[],t))}function Iv(r){const e=Lt(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=vr(r),s=o?r.offsetWidth:t,a=o?r.offsetHeight:n,l=xl(t)!==s||xl(n)!==a;return l&&(t=s,n=a),{width:t,height:n,$:l}}function Th(r){return jr(r)?r:r.contextElement}function Lo(r){const e=Th(r);if(!vr(e))return gn(1);const t=e.getBoundingClientRect(),{width:n,height:o,$:s}=Iv(e);let a=(s?xl(t.width):t.width)/n,l=(s?xl(t.height):t.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Q$=gn(0);function Mv(r){const e=$t(r);return!Oh()||!e.visualViewport?Q$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Z$(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==$t(r)?!1:e}function Qn(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const o=r.getBoundingClientRect(),s=Th(r);let a=gn(1);e&&(n?jr(n)&&(a=Lo(n)):a=Lo(r));const l=Z$(s,t,n)?Mv(s):gn(0);let c=(o.left+l.x)/a.x,d=(o.top+l.y)/a.y,u=o.width/a.x,h=o.height/a.y;if(s){const f=$t(s),p=n&&jr(n)?$t(n):n;let y=f,g=y.frameElement;for(;g&&n&&p!==y;){const m=Lo(g),v=g.getBoundingClientRect(),b=Lt(g),w=v.left+(g.clientLeft+parseFloat(b.paddingLeft))*m.x,S=v.top+(g.clientTop+parseFloat(b.paddingTop))*m.y;c*=m.x,d*=m.y,u*=m.x,h*=m.y,c+=w,d+=S,y=$t(g),g=y.frameElement}}return El({width:u,height:h,x:c,y:d})}const e_=[":popover-open",":modal"];function Dv(r){return e_.some(e=>{try{return r.matches(e)}catch{return!1}})}function t_(r){let{elements:e,rect:t,offsetParent:n,strategy:o}=r;const s=o==="fixed",a=zr(n),l=e?Dv(e.floating):!1;if(n===a||l&&s)return t;let c={scrollLeft:0,scrollTop:0},d=gn(1);const u=gn(0),h=vr(n);if((h||!h&&!s)&&((Lr(n)!=="body"||Li(a))&&(c=rc(n)),vr(n))){const f=Qn(n);d=Lo(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+u.x,y:t.y*d.y-c.scrollTop*d.y+u.y}}function r_(r){return Array.from(r.getClientRects())}function Vv(r){return Qn(zr(r)).left+rc(r).scrollLeft}function n_(r){const e=zr(r),t=rc(r),n=r.ownerDocument.body,o=Hn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Hn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Vv(r);const l=-t.scrollTop;return Lt(n).direction==="rtl"&&(a+=Hn(e.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:l}}function o_(r,e){const t=$t(r),n=zr(r),o=t.visualViewport;let s=n.clientWidth,a=n.clientHeight,l=0,c=0;if(o){s=o.width,a=o.height;const d=Oh();(!d||d&&e==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:l,y:c}}function s_(r,e){const t=Qn(r,!0,e==="fixed"),n=t.top+r.clientTop,o=t.left+r.clientLeft,s=vr(r)?Lo(r):gn(1),a=r.clientWidth*s.x,l=r.clientHeight*s.y,c=o*s.x,d=n*s.y;return{width:a,height:l,x:c,y:d}}function Wm(r,e,t){let n;if(e==="viewport")n=o_(r,t);else if(e==="document")n=n_(zr(r));else if(jr(e))n=s_(e,t);else{const o=Mv(r);n={...e,x:e.x-o.x,y:e.y-o.y}}return El(n)}function Rv(r,e){const t=Yo(r);return t===e||!jr(t)||tc(t)?!1:Lt(t).position==="fixed"||Rv(t,e)}function i_(r,e){const t=e.get(r);if(t)return t;let n=Ci(r,[],!1).filter(l=>jr(l)&&Lr(l)!=="body"),o=null;const s=Lt(r).position==="fixed";let a=s?Yo(r):r;for(;jr(a)&&!tc(a);){const l=Lt(a),c=Ah(a);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Li(a)&&!c&&Rv(r,a))?n=n.filter(u=>u!==a):o=l,a=Yo(a)}return e.set(r,n),n}function a_(r){let{element:e,boundary:t,rootBoundary:n,strategy:o}=r;const a=[...t==="clippingAncestors"?i_(e,this._c):[].concat(t),n],l=a[0],c=a.reduce((d,u)=>{const h=Wm(e,u,o);return d.top=Hn(h.top,d.top),d.right=Sl(h.right,d.right),d.bottom=Sl(h.bottom,d.bottom),d.left=Hn(h.left,d.left),d},Wm(e,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function l_(r){const{width:e,height:t}=Iv(r);return{width:e,height:t}}function c_(r,e,t){const n=vr(e),o=zr(e),s=t==="fixed",a=Qn(r,!0,s,e);let l={scrollLeft:0,scrollTop:0};const c=gn(0);if(n||!n&&!s)if((Lr(e)!=="body"||Li(o))&&(l=rc(e)),n){const h=Qn(e,!0,s,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}else o&&(c.x=Vv(o));const d=a.left+l.scrollLeft-c.x,u=a.top+l.scrollTop-c.y;return{x:d,y:u,width:a.width,height:a.height}}function Gm(r,e){return!vr(r)||Lt(r).position==="fixed"?null:e?e(r):r.offsetParent}function Lv(r,e){const t=$t(r);if(!vr(r)||Dv(r))return t;let n=Gm(r,e);for(;n&&Y$(n)&&Lt(n).position==="static";)n=Gm(n,e);return n&&(Lr(n)==="html"||Lr(n)==="body"&&Lt(n).position==="static"&&!Ah(n))?t:n||X$(r)||t}const d_=async function(r){const e=this.getOffsetParent||Lv,t=this.getDimensions;return{reference:c_(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,...await t(r.floating)}}};function u_(r){return Lt(r).direction==="rtl"}const h_={convertOffsetParentRelativeRectToViewportRelativeRect:t_,getDocumentElement:zr,getClippingRect:a_,getOffsetParent:Lv,getElementRects:d_,getClientRects:r_,getDimensions:l_,getScale:Lo,isElement:jr,isRTL:u_};function f_(r,e){let t=null,n;const o=zr(r);function s(){var l;clearTimeout(n),(l=t)==null||l.disconnect(),t=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:d,top:u,width:h,height:f}=r.getBoundingClientRect();if(l||e(),!h||!f)return;const p=Na(u),y=Na(o.clientWidth-(d+h)),g=Na(o.clientHeight-(u+f)),m=Na(d),b={rootMargin:-p+"px "+-y+"px "+-g+"px "+-m+"px",threshold:Hn(0,Sl(1,c))||1};let w=!0;function S(x){const k=x[0].intersectionRatio;if(k!==c){if(!w)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{t=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{t=new IntersectionObserver(S,b)}t.observe(r)}return a(!0),s}function p_(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Th(r),u=o||s?[...d?Ci(d):[],...Ci(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",t,{passive:!0}),s&&v.addEventListener("resize",t)});const h=d&&l?f_(d,t):null;let f=-1,p=null;a&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===d&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),t()}),d&&!c&&p.observe(d),p.observe(e));let y,g=c?Qn(r):null;c&&m();function m(){const v=Qn(r);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&t(),g=v,y=requestAnimationFrame(m)}return t(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",t),s&&b.removeEventListener("resize",t)}),h==null||h(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(y)}}const m_=J$,g_=K$,y_=(r,e,t)=>{const n=new Map,o={platform:h_,...t},s={...o.platform,_c:n};return U$(r,e,{...o,platform:s})};function v_(r){return r!=null&&typeof r=="object"&&"$el"in r}function Jm(r){if(v_(r)){const e=r.$el;return Nh(e)&&Lr(e)==="#comment"?null:e}return r}function jv(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Ym(r,e){const t=jv(r);return Math.round(e*t)/t}function b_(r,e,t){t===void 0&&(t={});const n=t.whileElementsMounted,o=i.computed(()=>{var C;return(C=i.unref(t.open))!=null?C:!0}),s=i.computed(()=>i.unref(t.middleware)),a=i.computed(()=>{var C;return(C=i.unref(t.placement))!=null?C:"bottom"}),l=i.computed(()=>{var C;return(C=i.unref(t.strategy))!=null?C:"absolute"}),c=i.computed(()=>{var C;return(C=i.unref(t.transform))!=null?C:!0}),d=i.computed(()=>Jm(r.value)),u=i.computed(()=>Jm(e.value)),h=i.ref(0),f=i.ref(0),p=i.ref(l.value),y=i.ref(a.value),g=i.shallowRef({}),m=i.ref(!1),v=i.computed(()=>{const C={position:p.value,left:"0",top:"0"};if(!u.value)return C;const N=Ym(u.value,h.value),P=Ym(u.value,f.value);return c.value?{...C,transform:"translate("+N+"px, "+P+"px)",...jv(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:N+"px",top:P+"px"}});let b;function w(){d.value==null||u.value==null||y_(d.value,u.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(C=>{h.value=C.x,f.value=C.y,p.value=C.strategy,y.value=C.placement,g.value=C.middlewareData,m.value=!0})}function S(){typeof b=="function"&&(b(),b=void 0)}function x(){if(S(),n===void 0){w();return}if(d.value!=null&&u.value!=null){b=n(d.value,u.value,w);return}}function k(){o.value||(m.value=!1)}return i.watch([s,a,l],w,{flush:"sync"}),i.watch([d,u],x,{flush:"sync"}),i.watch(o,k,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(S),{x:i.shallowReadonly(h),y:i.shallowReadonly(f),strategy:i.shallowReadonly(p),placement:i.shallowReadonly(y),middlewareData:i.shallowReadonly(g),isPositioned:i.shallowReadonly(m),floatingStyles:v,update:w}}const w_=D$({extend:{classGroups:{"font-size":["text-xxs"]}}}),{cva:Bh,cx:io,compose:j4}=n$({hooks:{onComplete:r=>w_(r)}}),k_=i.createStaticVNode('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-47faceda></path>',5),S_={key:0,class:"circular-loader"},x_=i.defineComponent({__name:"ScalarLoading",props:{loadingState:{},size:{default:"24px"}},setup(r){return i.useCssVars(e=>({d6cae758:e.size})),(e,t)=>e.loadingState?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(io)("loader-wrapper"))},[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["svg-loader",{"icon-is-valid":e.loadingState.isValid,"icon-is-invalid":e.loadingState.isInvalid}]),viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[k_,e.loadingState.isLoading?(i.openBlock(),i.createElementBlock("g",S_,[i.createElementVNode("circle",{class:i.normalizeClass(["loader-path",{"loader-path-off":e.loadingState.isValid||e.loadingState.isInvalid}]),cx:"50",cy:"50",fill:"none",r:"20","stroke-width":"2"},null,2)])):i.createCommentVNode("",!0)],2))],2)):i.createCommentVNode("",!0)}}),C_=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},Fv=C_(x_,[["__scopeId","data-v-47faceda"]]),qv={solid:["scalar-button-solid","bg-back-btn-1 text-fore-btn-1 shadow-sm active:bg-back-btn-1 active:shadow-none hocus:bg-hover-btn-1"],outlined:["scalar-button-outlined","active:bg-btn-1 border border-solid border-border bg-transparent text-fore-1 hocus:bg-border"],ghost:["scalar-button-ghost","bg-transparent text-fore-3 transition-colors active:text-fore-1 hocus:text-fore-1"],danger:["scalar-button-danger","bg-error text-white active:brightness-90 hocus:brightness-90"]},E_=Bh({base:"scalar-button row cursor-pointer items-center justify-center rounded font-medium",variants:{disabled:{true:"bg-background-2 text-color-3 cursor-not-allowed shadow-none"},fullWidth:{true:"w-full"},size:{sm:"px-2 py-1 text-xs",md:"h-10 px-6 text-sm"},variant:qv},compoundVariants:[{disabled:!0,variant:"ghost",class:"bg-transparent text-ghost"}]}),$_=["ariaDisabled","type"],__={key:0,class:"mr-2 h-4 w-4"},N_={key:1,class:"ml-2"},ku=i.defineComponent({inheritAttrs:!1,__name:"ScalarButton",props:{disabled:{type:Boolean},fullWidth:{type:Boolean,default:!1},loading:{},size:{default:"md"},variant:{default:"solid"},type:{default:"button"}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{class:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(e.value.rest,{ariaDisabled:t.disabled||void 0,class:i.unref(io)(i.unref(E_)({fullWidth:t.fullWidth,disabled:t.disabled,size:t.size,variant:t.variant}),{"pl-9 pr-3":t.loading},`${e.value.class}`),type:t.type}),[t.$slots.icon?(i.openBlock(),i.createElementBlock("div",__,[i.renderSlot(t.$slots,"icon")])):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default"),t.loading?(i.openBlock(),i.createElementBlock("div",N_,[i.createVNode(i.unref(Fv),{loadingState:t.loading,size:"20px"},null,8,["loadingState"])])):i.createCommentVNode("",!0)],16,$_))}});(function(r){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:t,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},t.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=n.variable[1].inside,a=0;a<o.length;a++)s[o[a]]=r.languages.bash[o[a]];r.languages.sh=r.languages.bash,r.languages.shell=r.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(){if(typeof Prism>"u"||typeof document>"u")return;var r="line-numbers",e=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(a,l){if(!(a.tagName!=="PRE"||!a.classList.contains(r))){var c=a.querySelector(".line-numbers-rows");if(c){var d=parseInt(a.getAttribute("data-start"),10)||1,u=d+(c.children.length-1);l<d&&(l=d),l>u&&(l=u);var h=l-d;return c.children[h]}}},resize:function(a){n([a])},assumeViewportIndependence:!0};function n(a){if(a=a.filter(function(c){var d=o(c),u=d["white-space"];return u==="pre-wrap"||u==="pre-line"}),a.length!=0){var l=a.map(function(c){var d=c.querySelector("code"),u=c.querySelector(".line-numbers-rows");if(!(!d||!u)){var h=c.querySelector(".line-numbers-sizer"),f=d.textContent.split(e);h||(h=document.createElement("span"),h.className="line-numbers-sizer",d.appendChild(h)),h.innerHTML="0",h.style.display="block";var p=h.getBoundingClientRect().height;return h.innerHTML="",{element:c,lines:f,lineHeights:[],oneLinerHeight:p,sizer:h}}}).filter(Boolean);l.forEach(function(c){var d=c.sizer,u=c.lines,h=c.lineHeights,f=c.oneLinerHeight;h[u.length-1]=void 0,u.forEach(function(p,y){if(p&&p.length>1){var g=d.appendChild(document.createElement("span"));g.style.display="block",g.textContent=p}else h[y]=f})}),l.forEach(function(c){for(var d=c.sizer,u=c.lineHeights,h=0,f=0;f<u.length;f++)u[f]===void 0&&(u[f]=d.children[h++].getBoundingClientRect().height)}),l.forEach(function(c){var d=c.sizer,u=c.element.querySelector(".line-numbers-rows");d.style.display="none",d.innerHTML="",c.lineHeights.forEach(function(h,f){u.children[f].style.height=h+"px"})})}}function o(a){return a?window.getComputedStyle?getComputedStyle(a):a.currentStyle||null:null}var s=void 0;window.addEventListener("resize",function(){t.assumeViewportIndependence&&s===window.innerWidth||(s=window.innerWidth,n(Array.prototype.slice.call(document.querySelectorAll("pre."+r))))}),Prism.hooks.add("complete",function(a){if(a.code){var l=a.element,c=l.parentNode;if(!(!c||!/pre/i.test(c.nodeName))&&!l.querySelector(".line-numbers-rows")&&Prism.util.isActive(l,r)){l.classList.remove(r),c.classList.add(r);var d=a.code.match(e),u=d?d.length+1:1,h,f=new Array(u+1).join("<span></span>");h=document.createElement("span"),h.setAttribute("aria-hidden","true"),h.className="line-numbers-rows",h.innerHTML=f,c.hasAttribute("data-start")&&(c.style.counterReset="linenumber "+(parseInt(c.getAttribute("data-start"),10)-1)),a.element.appendChild(h),n([c]),Prism.hooks.run("line-numbers",a)}}}),Prism.hooks.add("line-numbers",function(a){a.plugins=a.plugins||{},a.plugins.lineNumbers=!0})})();function A_(r){const e=new Set;return JSON.stringify(r,(t,n)=>{if(typeof n=="object"&&n!==null){if(e.has(n))return"[Circular]";e.add(n)}return n},2)}function Aa(r){if(typeof r=="string")return r;if(typeof r=="object")try{return JSON.stringify(r,null,2)}catch{return A_(r)}return r}const O_=["innerHTML"],Nr=i.defineComponent({__name:"ScalarCodeBlock",props:{content:{},lang:{default:"js"},lineNumbers:{type:Boolean,default:!1},hideCredentials:{}},setup(r){const e=r,t=Gu(Aa(e.content)),n=`components-scalar-code-block${t}`,{plugins:o,highlightElement:s}=Bs;e.hideCredentials&&Bs.hooks.add("wrap",function(h){if(!e.hideCredentials)return;let f=!1;typeof e.hideCredentials=="string"?h.content.includes(e.hideCredentials)&&(f=!0):Array.isArray(e.hideCredentials)&&(f=e.hideCredentials.some(p=>h.content.includes(p))),f&&(h.content=h.content.replace(/<span class="credentials">.*?<\/span>/g,p=>p.replace(/<span class="credentials">|<\/span>/g,"")),h.content=h.content.replace(new RegExp(typeof e.hideCredentials=="string"?e.hideCredentials:e.hideCredentials.join("|"),"g"),p=>`<span class="credentials">${p}</span>`))});const a=i.ref(null),l=i.ref(ts[n]??""),c=i.computed(()=>e.lang==="node"?"js":e.lang),d=e.lang;i.watch([()=>e.lang,()=>e.content,a],()=>{a.value&&e.content&&(!l.value||e.lang!==d)&&(l.value="",i.nextTick(()=>s(a.value)))},{immediate:!0});const u=/\n(?!$)/g;return i.onServerPrefetch(async()=>{let h="";e.lineNumbers&&Bs.hooks.add("after-tokenize",p=>{const y=p.code.match(u),g=y?y.length+1:1;h=`<span aria-hidden="true" class="line-numbers-rows">${new Array(g+1).join("<span></span>")}</span>`});const f=Bs.highlight(Aa(e.content),Bs.languages[c.value],c.value);if(l.value=f+h,t!==0){const p=i.useSSRContext();p.payload.data[n]=f+h}}),i.onMounted(async()=>{await Promise.resolve().then(()=>require("./prism-autoloader-Dlh8Vzlw--ejn04HW.cjs")),o.autoloader.languages_path="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/"}),(h,f)=>(i.openBlock(),i.createElementBlock("pre",{class:i.normalizeClass([`scalar-component scalar-codeblock-pre language-${c.value}`,{"line-numbers":h.lineNumbers}])},[l.value?(i.openBlock(),i.createElementBlock("code",{key:0,class:i.normalizeClass(`scalar-codeblock-code language-${c.value}`),innerHTML:i.unref(Aa)(l.value)},null,10,O_)):(i.openBlock(),i.createElementBlock("code",{key:1,ref_key:"el",ref:a,class:i.normalizeClass(`scalar-codeblock-code language-${c.value}`)},i.toDisplayString(i.unref(Aa)(h.content)),3))],2))}}),Xm=Object.assign({"./Add.svg":()=>Promise.resolve().then(()=>require("./Add-yNxGpRcH-LOS6C7pM.cjs")),"./ArrowLeft.svg":()=>Promise.resolve().then(()=>require("./ArrowLeft-D7tW1xQo-CyIsf2QR.cjs")),"./ArrowRight.svg":()=>Promise.resolve().then(()=>require("./ArrowRight-DmO-sdb2-DDacgVg5.cjs")),"./Background.svg":()=>Promise.resolve().then(()=>require("./Background-CU9VIbfN-hSED7pzA.cjs")),"./Brackets.svg":()=>Promise.resolve().then(()=>require("./Brackets-CI207-BL-Cauv5rAc.cjs")),"./Branch.svg":()=>Promise.resolve().then(()=>require("./Branch-CXwj8YuG-xolS1YAY.cjs")),"./CallToAction.svg":()=>Promise.resolve().then(()=>require("./CallToAction-XLYRSI1h-DKYrI3r6.cjs")),"./Checkmark.svg":()=>Promise.resolve().then(()=>require("./Checkmark-DhbrPM0P-BALt5_hQ.cjs")),"./ChevronDown.svg":()=>Promise.resolve().then(()=>require("./ChevronDown-Co7EAKAv-BMVIms1W.cjs")),"./ChevronLeft.svg":()=>Promise.resolve().then(()=>require("./ChevronLeft-DYt0idAu-DgJ680do.cjs")),"./ChevronRight.svg":()=>Promise.resolve().then(()=>require("./ChevronRight-ylxToVWl-BVcmudpo.cjs")),"./ChevronUp.svg":()=>Promise.resolve().then(()=>require("./ChevronUp-xAnukIfj-BRXM2fAN.cjs")),"./Clipboard.svg":()=>Promise.resolve().then(()=>require("./Clipboard-CU_KxGEv-jXeM-Shn.cjs")),"./Close.svg":()=>Promise.resolve().then(()=>require("./Close-xHiYwS8Q-7fmTnaEC.cjs")),"./CodeFolder.svg":()=>Promise.resolve().then(()=>require("./CodeFolder-Cv_igzJE-Dl4HVTRL.cjs")),"./Cookie.svg":()=>Promise.resolve().then(()=>require("./Cookie-CEHvXpqB-BCUOR3DZ.cjs")),"./DarkMode.svg":()=>Promise.resolve().then(()=>require("./DarkMode-BMR457PH--Sj-ogZo.cjs")),"./Delete.svg":()=>Promise.resolve().then(()=>require("./Delete-BCZmxrDD-C-UeHTm2.cjs")),"./Discord.svg":()=>Promise.resolve().then(()=>require("./Discord-BHYOFBB2-BzF4Z2zQ.cjs")),"./DocsPage.svg":()=>Promise.resolve().then(()=>require("./DocsPage-Dwx7ZMU9-CfDSbvvO.cjs")),"./Duplicate.svg":()=>Promise.resolve().then(()=>require("./Duplicate-DRWEv4R_-B49h9017.cjs")),"./Edit.svg":()=>Promise.resolve().then(()=>require("./Edit-Br04RNYb-bn7B8ziL.cjs")),"./Ellipses.svg":()=>Promise.resolve().then(()=>require("./Ellipses-Bo_X36Hx-1Rf8jX_Q.cjs")),"./Error.svg":()=>Promise.resolve().then(()=>require("./Error-C5LiISnw-NBv6rBv1.cjs")),"./ExternalLink.svg":()=>Promise.resolve().then(()=>require("./ExternalLink-DK8L-EH7-BZtIWcdg.cjs")),"./FilterList.svg":()=>Promise.resolve().then(()=>require("./FilterList-CS8Il7NE-BgVOPtsD.cjs")),"./Folder.svg":()=>Promise.resolve().then(()=>require("./Folder-CTvnVSEo-ouH5odiT.cjs")),"./GitHub.svg":()=>Promise.resolve().then(()=>require("./GitHub-NdE6Zs9k-CDcqenD_.cjs")),"./Hide.svg":()=>Promise.resolve().then(()=>require("./Hide-BgcCtErz-CoFXGWU2.cjs")),"./History.svg":()=>Promise.resolve().then(()=>require("./History-D9nmhNIn-C8K3DZOi.cjs")),"./JsonObject.svg":()=>Promise.resolve().then(()=>require("./JsonObject-hGdHUQ4M-DEiEsxEM.cjs")),"./Key.svg":()=>Promise.resolve().then(()=>require("./Key-CWXJqX28-D85Imfdm.cjs")),"./Leave.svg":()=>Promise.resolve().then(()=>require("./Leave-K1J3uwoG-COzffJei.cjs")),"./LightDarkModeToggle.svg":()=>Promise.resolve().then(()=>require("./LightDarkModeToggle-De3vO47x-BQRdUm4n.cjs")),"./LightMode.svg":()=>Promise.resolve().then(()=>require("./LightMode-BeoMphBY-_W1RBSYN.cjs")),"./Link.svg":()=>Promise.resolve().then(()=>require("./Link-Bzuc__Nc-C0VSCFw-.cjs")),"./Lock.svg":()=>Promise.resolve().then(()=>require("./Lock-xhiH1mKz-sEHw9FoO.cjs")),"./Logo.svg":()=>Promise.resolve().then(()=>require("./Logo-DwEDtgj--C5AHDg9a.cjs")),"./LogoAPI.svg":()=>Promise.resolve().then(()=>require("./LogoAPI-CohCfL3L-BkOy0M4B.cjs")),"./LogoClient.svg":()=>Promise.resolve().then(()=>require("./LogoClient-Bq5O2QL2-S5itDPVb.cjs")),"./LogoMarket.svg":()=>Promise.resolve().then(()=>require("./LogoMarket-DwlApcab-C3B4miZm.cjs")),"./LogoSwagger.svg":()=>Promise.resolve().then(()=>require("./LogoSwagger-CH60H5qW-56_9U30I.cjs")),"./Magic.svg":()=>Promise.resolve().then(()=>require("./Magic-Dsi9_bEc-Bz81CcSu.cjs")),"./Menu.svg":()=>Promise.resolve().then(()=>require("./Menu-CFK5cOsm-B_mqCQj6.cjs")),"./Page.svg":()=>Promise.resolve().then(()=>require("./Page-DA7CO5gc-DcduUMiC.cjs")),"./PaperAirplane.svg":()=>Promise.resolve().then(()=>require("./PaperAirplane-BC-4mGEB-CUmTyNIM.cjs")),"./Payment.svg":()=>Promise.resolve().then(()=>require("./Payment-hzcXP1Xb-DA7pQdWt.cjs")),"./Play.svg":()=>Promise.resolve().then(()=>require("./Play-Cd4-o7Ji-CBfi8CFf.cjs")),"./Refresh.svg":()=>Promise.resolve().then(()=>require("./Refresh-BHRzzQ8P-Il9DkP3P.cjs")),"./Response.svg":()=>Promise.resolve().then(()=>require("./Response-DsTlT4S--C3Dp26r4.cjs")),"./Search.svg":()=>Promise.resolve().then(()=>require("./Search-DqtlswRG-Cn8bmF-2.cjs")),"./Show.svg":()=>Promise.resolve().then(()=>require("./Show-CbiiMLUa-dwb14rwM.cjs")),"./SideBarClosed.svg":()=>Promise.resolve().then(()=>require("./SideBarClosed-K53-CtXh-B185l2xR.cjs")),"./SideBarOpen.svg":()=>Promise.resolve().then(()=>require("./SideBarOpen-C7UgT82P-BGBt4u0H.cjs")),"./Sort.svg":()=>Promise.resolve().then(()=>require("./Sort-CaVMT7jM-ZDWW3rIv.cjs")),"./Terminal.svg":()=>Promise.resolve().then(()=>require("./Terminal-DJ7x2McL-hJZC098M.cjs")),"./ThumbsDown.svg":()=>Promise.resolve().then(()=>require("./ThumbsDown-BMgnsASL-C-sKah3X.cjs")),"./ThumbsUp.svg":()=>Promise.resolve().then(()=>require("./ThumbsUp-C1j6zY2j-CBEvfE8L.cjs")),"./Trash.svg":()=>Promise.resolve().then(()=>require("./Trash-BpA3zWPD-C-UeHTm2.cjs")),"./Unlock.svg":()=>Promise.resolve().then(()=>require("./Unlock-HVYHMLxl-DmJa6-5V.cjs")),"./Upload.svg":()=>Promise.resolve().then(()=>require("./Upload-D_pwqBDY-BSr0Hcxs.cjs")),"./User.svg":()=>Promise.resolve().then(()=>require("./User-BLGkPc5I-rjkGtmo9.cjs")),"./programming-framework-angular.svg":()=>Promise.resolve().then(()=>require("./programming-framework-angular-DD4Vjgbk-BVT4AoJo.cjs")),"./programming-framework-astro.svg":()=>Promise.resolve().then(()=>require("./programming-framework-astro-CLfrRt19-CWwhfV7_.cjs")),"./programming-framework-laravel.svg":()=>Promise.resolve().then(()=>require("./programming-framework-laravel-kAy2wVLy-C3EZCsGC.cjs")),"./programming-framework-nextdotjs.svg":()=>Promise.resolve().then(()=>require("./programming-framework-nextdotjs-BKdd_DY_-DdOe6YSk.cjs")),"./programming-framework-react.svg":()=>Promise.resolve().then(()=>require("./programming-framework-react-PDgmtZuN-4I-M6WEO.cjs")),"./programming-framework-vuedotjs.svg":()=>Promise.resolve().then(()=>require("./programming-framework-vuedotjs-Cim7D5tw-B-b4rAHl.cjs")),"./programming-language-c.svg":()=>Promise.resolve().then(()=>require("./programming-language-c-hPGu2Zvg-DS__u0q2.cjs")),"./programming-language-clojure.svg":()=>Promise.resolve().then(()=>require("./programming-language-clojure-uqYXn7U6-CPSSiHiG.cjs")),"./programming-language-csharp.svg":()=>Promise.resolve().then(()=>require("./programming-language-csharp-CGxYkVA6-CGh_3iRh.cjs")),"./programming-language-css3.svg":()=>Promise.resolve().then(()=>require("./programming-language-css3-Dpp4Cr6b-BpPnE1ET.cjs")),"./programming-language-go.svg":()=>Promise.resolve().then(()=>require("./programming-language-go-CuKo8iD9-BAfNltt8.cjs")),"./programming-language-html5.svg":()=>Promise.resolve().then(()=>require("./programming-language-html5-DlqJK4EL-DFJ6lim3.cjs")),"./programming-language-http.svg":()=>Promise.resolve().then(()=>require("./programming-language-http-f3NXC-Ae-B7iG0CXa.cjs")),"./programming-language-java.svg":()=>Promise.resolve().then(()=>require("./programming-language-java-BBodetdf-BsfrQqMF.cjs")),"./programming-language-javascript.svg":()=>Promise.resolve().then(()=>require("./programming-language-javascript-VxLvi1QG-CaGGjM9H.cjs")),"./programming-language-json.svg":()=>Promise.resolve().then(()=>require("./programming-language-json-Dq_K-q5f-MbJWJ6qp.cjs")),"./programming-language-kotlin.svg":()=>Promise.resolve().then(()=>require("./programming-language-kotlin-eTASnmL3-DXA6cq0H.cjs")),"./programming-language-node.svg":()=>Promise.resolve().then(()=>require("./programming-language-node-oucaVOgY-B29T_bjm.cjs")),"./programming-language-objc.svg":()=>Promise.resolve().then(()=>require("./programming-language-objc-CPgQxmNi-OEqaI5Rl.cjs")),"./programming-language-ocaml.svg":()=>Promise.resolve().then(()=>require("./programming-language-ocaml-Q1-Jv5Q5-BUqWtkTy.cjs")),"./programming-language-php.svg":()=>Promise.resolve().then(()=>require("./programming-language-php-GY38f8r4-ahFMWcim.cjs")),"./programming-language-powershell.svg":()=>Promise.resolve().then(()=>require("./programming-language-powershell-xLOxAYP_-fFTn4fJl.cjs")),"./programming-language-python.svg":()=>Promise.resolve().then(()=>require("./programming-language-python-Ct-_kNjo-ujN06OXX.cjs")),"./programming-language-r.svg":()=>Promise.resolve().then(()=>require("./programming-language-r-Ch3T1qiC-Df1j2gqW.cjs")),"./programming-language-ruby.svg":()=>Promise.resolve().then(()=>require("./programming-language-ruby-DhdM4d7g-DFwAUdk6.cjs")),"./programming-language-scala.svg":()=>Promise.resolve().then(()=>require("./programming-language-scala-BVg0dToJ-Dhg_XTFe.cjs")),"./programming-language-shell.svg":()=>Promise.resolve().then(()=>require("./programming-language-shell-uj1zoCVW-D8xaixWm.cjs")),"./programming-language-swift.svg":()=>Promise.resolve().then(()=>require("./programming-language-swift-Dn72xPjg-DtICVxss.cjs")),"./programming-language-typescript.svg":()=>Promise.resolve().then(()=>require("./programming-language-typescript-CdF-HuRi-jq2P_J1a.cjs")),"./programming-script-code.svg":()=>Promise.resolve().then(()=>require("./programming-script-code-CUHv6qR8-DY9nCXfq.cjs")),"./programming-tool-git.svg":()=>Promise.resolve().then(()=>require("./programming-tool-git-C-BMJCAo-BmrHT5RO.cjs")),"./programming-tool-tailwindcss.svg":()=>Promise.resolve().then(()=>require("./programming-tool-tailwindcss-xjXi0E6g-CpFF5bAj.cjs"))}),Qm=r=>{const e=`./${r}.svg`;return Xm[e]?i.defineAsyncComponent(Xm[e]):(console.warn(`Could not find icon: ${r}`),null)},T_=["src"],Me=i.defineComponent({__name:"ScalarIcon",props:{icon:{},size:{}},setup(r){const e=r,t=Bh({variants:{size:{xs:"size-3 stroke-[1.4]",sm:"size-3.5 stroke-[1.2]",md:"size-4 stroke-[1.1]",lg:"size-5",xl:"size-6 stroke-[0.96]","2xl":"size-8 stroke-[0.92]","3xl":"size-10 stroke-[0.9]",full:"size-full"}},defaultVariants:{size:"full"}}),n=Qm(e.icon);return(o,s)=>i.unref(n)?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(Qm)(o.icon)),{key:0,class:i.normalizeClass(i.unref(io)("scalar-icon",i.unref(t)({size:o.size})))},null,8,["class"])):(i.openBlock(),i.createElementBlock("img",{key:1,src:o.icon},null,8,T_))}}),B_=["ariaDisabled"],P_={class:"sr-only"},ji=i.defineComponent({__name:"ScalarIconButton",props:{label:{},icon:{},disabled:{type:Boolean},variant:{default:"ghost"},size:{default:"md"}},setup(r){const e=Bh({base:"scalar-icon-button grid aspect-square cursor-pointer rounded",variants:{size:{xxs:"size-3.5 p-0.5",xs:"size-5 p-1",sm:"size-6 p-1",md:"size-10 p-3",full:"h-full w-full"},disabled:{true:"cursor-not-allowed shadow-none"},variant:qv}}),t=i.computed(()=>{const{class:n,...o}=i.useAttrs();return{class:n||"",rest:o}});return(n,o)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(t.value.rest,{ariaDisabled:n.disabled||void 0,class:i.unref(io)(i.unref(e)({size:n.size,variant:n.variant,disabled:n.disabled}),t.value.class),type:"button"}),[i.createVNode(i.unref(Me),{icon:n.icon},null,8,["icon"]),i.createElementVNode("span",P_,i.toDisplayString(n.label),1)],16,B_))}}),I_={class:"sr-only"},M_=["value"],D_=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchInput",props:{loading:{},modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=e;function n(s){t("update:modelValue",s.target.value)}const o=i.computed(()=>{const{class:s,...a}=i.useAttrs();return{className:s||"",rest:a}});return(s,a)=>(i.openBlock(),i.createElementBlock("label",i.mergeProps(o.value.rest,{class:i.unref(io)("flex rounded border bg-back-1 text-sm font-medium focus-within:border-fore-1",o.value.className)}),[i.createElementVNode("span",I_,[i.renderSlot(s.$slots,"label",{},()=>[i.createTextVNode("Enter search")])]),i.createElementVNode("input",{autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"flex-1 rounded bg-transparent p-3 outline-none",placeholder:"Search...",spellcheck:"false",type:"text",value:s.modelValue,onInput:n},null,40,M_),s.loading&&s.loading.isLoading?(i.openBlock(),i.createBlock(i.unref(Fv),{key:0,class:"mr-3 self-center",loadingState:s.loading,size:"20px"},null,8,["loadingState"])):s.modelValue?(i.openBlock(),i.createBlock(i.unref(ji),{key:1,class:"self-center",icon:"Close",label:"Clear Search",size:"md",onClick:a[0]||(a[0]=l=>t("update:modelValue",""))})):i.createCommentVNode("",!0)],16))}}),V_=i.createElementVNode("div",{class:"flex flex-col items-center gap-2 px-3 py-4"},[i.createElementVNode("div",{class:"rotate-90 text-lg font-bold"},":("),i.createElementVNode("div",{class:"text-sm font-medium text-fore-2"},"No results found")],-1),R_=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchResultList",props:{noResults:{type:Boolean}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("ul",i.mergeProps(e.value.rest,{class:i.unref(io)("flex flex-col",e.value.className)}),[t.noResults?i.renderSlot(t.$slots,"noResults",{key:0},()=>[V_]):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default")],16))}}),L_={class:"contents"},j_={class:"text-fore-3 group-hover:text-fore-1"},F_={class:"flex min-w-0 flex-1 flex-col gap-0.75"},q_={class:"flex items-center gap-1"},z_={class:"flex-1 truncate text-sm font-medium"},H_={key:0,class:"text-xs text-fore-2"},U_={class:"truncate text-xs text-fore-2"},K_=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchResultItem",props:{icon:{},active:{type:Boolean}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("li",L_,[i.createElementVNode("a",i.mergeProps(e.value.rest,{class:i.unref(io)("group flex cursor-pointer gap-3 rounded px-3 py-1.5 no-underline hover:bg-back-2",{"bg-back-2":t.active},e.value.className)}),[i.createElementVNode("div",j_,[i.renderSlot(t.$slots,"icon",{},()=>[t.icon?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,icon:t.icon,size:"sm"},null,8,["icon"])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",F_,[i.createElementVNode("div",q_,[i.createElementVNode("div",z_,[i.renderSlot(t.$slots,"default")]),t.$slots.addon?(i.openBlock(),i.createElementBlock("div",H_,[i.renderSlot(t.$slots,"addon")])):i.createCommentVNode("",!0)]),i.createElementVNode("div",U_,[i.renderSlot(t.$slots,"description")])])],16)]))}}),W_={class:"card-form-input"},G_=["for"],J_=["id","type"],Y_=i.defineComponent({inheritAttrs:!1,__name:"CardFormTextInput",props:{id:{},type:{}},setup(r){const e=r,t=i.ref(!0),n=i.computed(()=>e.type==="password"?t.value?"password":"text":e.type??"text");return(o,s)=>(i.openBlock(),i.createElementBlock("div",W_,[i.createElementVNode("label",{for:o.id},[i.renderSlot(o.$slots,"default",{},void 0,!0)],8,G_),i.createElementVNode("input",i.mergeProps(o.$attrs,{id:o.id,autocomplete:"off","data-1p-ignore":"",spellcheck:"false",type:n.value}),null,16,J_),o.type==="password"?(i.openBlock(),i.createBlock(i.unref(ji),{key:0,class:"password-mask",icon:t.value?"Show":"Hide",label:t.value?"Show Password":"Hide Password",onClick:s[0]||(s[0]=a=>t.value=!t.value)},null,8,["icon","label"])):i.createCommentVNode("",!0)]))}}),$r=U(Y_,[["__scopeId","data-v-76a13854"]]),X_=r=>(i.pushScopeId("data-v-a4bf8cfc"),r=r(),i.popScopeId(),r),Q_={class:"scopes-label"},Z_=X_(()=>i.createElementVNode("em",null,"/",-1)),eN=["checked"],tN={class:"dropdown-item-title"},rN={class:"dropdown-item-description"},nN=i.defineComponent({__name:"SecuritySchemeScopes",props:{scopes:{},selected:{}},emits:["update:selected"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(),s=i.ref(),{floatingStyles:a}=b_(o,s,{placement:"bottom-end",whileElementsMounted:p_,middleware:[G$(5),g_(),m_()]}),l=i.computed({get:()=>t.selected,set:c=>n("update:selected",c)});return(c,d)=>(i.openBlock(),i.createBlock(i.unref(Le.Listbox),{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=u=>l.value=u),multiple:""},{default:i.withCtx(({open:u})=>[i.createElementVNode("div",{ref_key:"trigger",ref:o,class:i.normalizeClass(["wrapper",{"wrapper-open":u}])},[i.createVNode(i.unref(Le.ListboxButton),{as:Sv},{default:i.withCtx(()=>[i.createElementVNode("div",Q_,[i.createTextVNode(" Scopes "+i.toDisplayString(l.value.length),1),Z_,i.createTextVNode(i.toDisplayString(Object.entries(c.scopes).length)+" ",1),i.createVNode(i.unref(Me),{icon:u?"ChevronUp":"ChevronDown",size:"sm"},null,8,["icon"])])]),_:2},1024)],2),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.unref(o0),null,{default:i.withCtx(({styles:h})=>[i.createElementVNode("div",{ref_key:"dropdown",ref:s,class:i.normalizeClass(["floating",h]),style:i.normalizeStyle(i.unref(a))},[i.createVNode(i.unref(Le.ListboxOptions),{as:"dl",class:"dropdown"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.entries(c.scopes),([f,p])=>(i.openBlock(),i.createBlock(i.unref(Le.ListboxOption),{key:f,as:"div",class:"dropdown-item",value:f},{default:i.withCtx(({selected:y})=>[i.createElementVNode("input",{checked:y,class:"dropdown-item-check",tabindex:"-1",type:"checkbox"},null,8,eN),i.createElementVNode("dt",tN,i.toDisplayString(f),1),i.createElementVNode("dd",rN,i.toDisplayString(p),1)]),_:2},1032,["value"]))),128))]),_:1})],6)]),_:1})]))]),_:1},8,["modelValue"]))}}),Zm=U(nN,[["__scopeId","data-v-a4bf8cfc"]]),oN=i.defineComponent({__name:"SecurityScheme",props:{value:{},proxy:{}},setup(r){const{toast:e}=$h(),{server:t}=no(),{authentication:n,setAuthentication:o}=ns(),s=m=>{o({apiKey:{...n.apiKey,token:m.target.value}})},a=m=>{o({http:{...n.http,basic:{...n.http.basic,username:m.target.value}}})},l=m=>{o({http:{...n.http,basic:{...n.http.basic,password:m.target.value}}})},c=m=>{o({http:{...n.http,bearer:{...n.http.bearer,token:m.target.value}}})},d=m=>{o({oAuth2:{...n.oAuth2,clientId:m.target.value}})},u=m=>{o({oAuth2:{...n.oAuth2,username:m.target.value}})},h=m=>{o({oAuth2:{...n.oAuth2,password:m.target.value}})};function f(m){const v=n.oAuth2.scopes.join(" "),b=(Math.random()+1).toString(36).substring(7),w=new URL(m.authorizationUrl);return o({oAuth2:{...n.oAuth2,state:b}}),w.searchParams.set("response_type","token"),w.searchParams.set("client_id",n.oAuth2.clientId),w.searchParams.set("redirect_uri",window.location.href),w.searchParams.set("scope",v),w.searchParams.set("state",b),w.toString()}function p(m,v){if(typeof m!="string"){console.log("tokenUrl is not a string");return}const b=v!=null&&v.baseUrl&&!m.startsWith("http")?gv(v==null?void 0:v.baseUrl,m):m,w=new URL(b);w.searchParams.set("grant_type","password"),w.searchParams.set("username",n.oAuth2.username),w.searchParams.set("password",n.oAuth2.password),w.searchParams.set("client_id",n.oAuth2.clientId),w.searchParams.set("scope",n.oAuth2.scopes.join(" ")),fetch(v!=null&&v.proxy?wv(v==null?void 0:v.proxy,w.toString()):w.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(S=>{if(!S.ok)throw new Error("Failed to get an access token. Please check your credentials.");return S.json()}).then(S=>{o({oAuth2:{...n.oAuth2,accessToken:S.access_token}})}).catch(S=>{e("Couldn’t retrieve the password grant token","warn",{description:"Open your browser console to get more information."}),console.error("[authorizeWithPassword]",S)})}const y=i.computed({get:()=>n.oAuth2.scopes,set:m=>o({oAuth2:{...n.oAuth2,scopes:m}})}),g=m=>{const b=window.open(m,"openAuth2Window","left=100,top=100,width=800,height=600");if(b){const w=setInterval(function(){var S;try{const k=new URLSearchParams(b.location.href).get("access_token");if(b.closed||k){clearInterval(w);const C=(S=b.location.href.match(/state=([^&]*)/))==null?void 0:S[1];k&&n.oAuth2.state===C&&o({oAuth2:{...n.oAuth2,accessToken:k}}),b.close()}}catch{}},200)}};return(m,v)=>{var b;return m.value&&((b=m.value)!=null&&b.type)?(i.openBlock(),i.createBlock(JE,{key:0},{default:i.withCtx(()=>[m.value.type==="apiKey"?(i.openBlock(),i.createBlock($r,{key:0,id:`security-scheme-${m.value.name}`,placeholder:"Token",type:"password",value:i.unref(n).apiKey.token,onInput:s},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.value.in.charAt(0).toUpperCase()+m.value.in.slice(1))+" API ",1)]),_:1},8,["id","value"])):m.value.type==="http"||m.value.type==="basic"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[m.value.type==="basic"||m.value.scheme==="basic"?(i.openBlock(),i.createBlock(Rs,{key:0},{default:i.withCtx(()=>[i.createVNode($r,{id:"http.basic.username",placeholder:"Username",value:i.unref(n).http.basic.username,onInput:a},{default:i.withCtx(()=>[i.createTextVNode(" Username ")]),_:1},8,["value"]),i.createVNode($r,{id:"http.basic.password",placeholder:"Password",type:"password",value:i.unref(n).http.basic.password,onInput:l},{default:i.withCtx(()=>[i.createTextVNode(" Password ")]),_:1},8,["value"])]),_:1})):m.value.type==="http"&&m.value.scheme==="bearer"?(i.openBlock(),i.createBlock($r,{key:1,id:"http.bearer.token",placeholder:"Token",type:"password",value:i.unref(n).http.bearer.token,onInput:c},{default:i.withCtx(()=>[i.createTextVNode(" Bearer Token ")]),_:1},8,["value"])):i.createCommentVNode("",!0)],64)):m.value.type.toLowerCase()==="oauth2"&&m.value.flows?(i.openBlock(),i.createBlock(Rs,{key:2},{default:i.withCtx(()=>[m.value.flows.implicit?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.unref(n).oAuth2.accessToken?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode($r,{id:"oAuth2.accessToken",placeholder:"xxxxx",type:"password",value:i.unref(n).oAuth2.accessToken},{default:i.withCtx(()=>[i.createTextVNode(" Access Token ")]),_:1},8,["value"]),i.createVNode(Sv,{onClick:v[0]||(v[0]=()=>i.unref(o)({oAuth2:{...i.unref(n).oAuth2,accessToken:"",state:""}}))},{default:i.withCtx(()=>[i.createTextVNode(" Reset ")]),_:1})],64)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),m.value.flows.password?(i.openBlock(),i.createBlock(Rm,{key:1},{default:i.withCtx(()=>[i.createVNode(Rs,null,{default:i.withCtx(()=>[i.createVNode($r,{id:"oAuth2.username",placeholder:"Username",value:i.unref(n).oAuth2.username,onInput:u},{default:i.withCtx(()=>[i.createTextVNode(" Username ")]),_:1},8,["value"]),i.createVNode($r,{id:"oAuth2.password",placeholder:"Password",type:"password",value:i.unref(n).oAuth2.password,onInput:h},{default:i.withCtx(()=>[i.createTextVNode(" Password ")]),_:1},8,["value"])]),_:1}),i.createVNode(Rs,null,{default:i.withCtx(()=>{var w,S;return[i.createVNode($r,{id:"oAuth2.clientId",placeholder:"12345",type:"text",value:i.unref(n).oAuth2.clientId,onInput:d},{default:i.withCtx(()=>[i.createTextVNode(" Client ID ")]),_:1},8,["value"]),m.value!==void 0&&Object.entries(((w=m.value.flows.implicit)==null?void 0:w.scopes)??m.value.flows.password.scopes).length>0?(i.openBlock(),i.createBlock(Zm,{key:0,selected:y.value,"onUpdate:selected":v[1]||(v[1]=x=>y.value=x),scopes:((S=m.value.flows.implicit)==null?void 0:S.scopes)??m.value.flows.password.scopes},null,8,["selected","scopes"])):i.createCommentVNode("",!0),i.createElementVNode("button",{class:"cardform-auth-button",type:"button",onClick:v[2]||(v[2]=()=>{var x,k;return p((k=(x=m.value.flows)==null?void 0:x.password)==null?void 0:k.tokenUrl,{baseUrl:i.unref(xi)(i.unref(t)),proxy:m.proxy})})}," Authorize ")]}),_:1})]),_:1})):(i.openBlock(),i.createBlock(Rm,{key:2},{default:i.withCtx(()=>[i.createVNode(Rs,null,{default:i.withCtx(()=>{var w,S;return[i.createVNode($r,{id:"oAuth2.clientId",placeholder:"12345",type:"text",value:i.unref(n).oAuth2.clientId,onInput:d},{default:i.withCtx(()=>[i.createTextVNode(" Client ID ")]),_:1},8,["value"]),m.value!==void 0&&Object.entries(((w=m.value.flows.implicit)==null?void 0:w.scopes)??m.value.flows.password.scopes).length>0?(i.openBlock(),i.createBlock(Zm,{key:0,selected:y.value,"onUpdate:selected":v[3]||(v[3]=x=>y.value=x),scopes:((S=m.value.flows.implicit)==null?void 0:S.scopes)??m.value.flows.password.scopes},null,8,["selected","scopes"])):i.createCommentVNode("",!0),i.createElementVNode("button",{class:"cardform-auth-button",type:"button",onClick:v[4]||(v[4]=()=>{var x,k;return g(f(((x=m.value)==null?void 0:x.flows.implicit)??((k=m.value)==null?void 0:k.flows.password)))})}," Authorize ")]}),_:1})]),_:1}))]),_:1})):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)}}}),zv=U(oN,[["__scopeId","data-v-9f6c0d8d"]]),sN=r=>(i.pushScopeId("data-v-7f0d31fc"),r=r(),i.popScopeId(),r),iN={key:0,class:"security-scheme-label"},aN={key:1,class:"security-scheme-selector"},lN={class:"security-scheme-label"},cN=["value"],dN=sN(()=>i.createElementVNode("option",{value:""},"None",-1)),uN=["value"],hN=i.defineComponent({__name:"SecuritySchemeSelector",props:{value:{}},emits:["input"],setup(r,{emit:e}){const t=r,n=e,{authentication:o,setAuthentication:s}=ns(),a=m=>{l(m.target.value)};i.onMounted(()=>{o.preferredSecurityScheme||l(Object.keys(t.value??{})[0]??null)});const l=m=>{s({preferredSecurityScheme:m}),n("input",m)};i.onServerPrefetch(()=>l(Object.keys(t.value??{})[0]??null));const c=m=>!(m!=null&&m.type),d=m=>m.type.toLowerCase()==="apikey",u=m=>m.type==="http"&&m.scheme.toLowerCase()==="basic"||m.type.toLowerCase()==="basic",h=m=>m.type==="http"&&m.scheme.toLowerCase()==="bearer",f=m=>m.type.toLowerCase()==="oauth2",p=(m,v)=>`${y(m)} (${v})`,y=m=>{var v,b;return c(m)?"No Authentication":d(m)?"API Key":u(m)?"Basic Authentication":h(m)?"Bearer Authentication":f(m)?(v=m.flows)!=null&&v.implicit?"OAuth 2.0 Implicit":(b=m.flows)!=null&&b.password?"OAuth 2.0 Password":"OAuth 2.0":`${m.type} (not yet supported)`},g=i.computed(()=>Object.keys(t.value??{}));return(m,v)=>{var b,w;return g.value.length===1?(i.openBlock(),i.createElementBlock("div",iN,i.toDisplayString(p((b=m.value)==null?void 0:b[g.value[0]],g.value[0])),1)):g.value.length>1?(i.openBlock(),i.createElementBlock("div",aN,[i.createElementVNode("span",lN,i.toDisplayString(i.unref(o).preferredSecurityScheme?p((w=m.value)==null?void 0:w[i.unref(o).preferredSecurityScheme],i.unref(o).preferredSecurityScheme):"None"),1),i.createVNode(i.unref(Me),{icon:"ChevronDown"}),i.createElementVNode("select",{value:i.unref(o).preferredSecurityScheme,onClick:v[0]||(v[0]=i.withModifiers(()=>{},["prevent"])),onInput:a},[dN,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.value,S=>{var x;return i.openBlock(),i.createElementBlock("option",{key:S,value:S??null},i.toDisplayString(p((x=m.value)==null?void 0:x[S],S)),9,uN)}),128))],40,cN)])):i.createCommentVNode("",!0)}}}),Hv=U(hN,[["__scopeId","data-v-7f0d31fc"]]);function Un(){return{info:{title:"",description:"",termsOfService:"",version:"",license:{name:"",url:""},contact:{email:""}},externalDocs:{description:"",url:""},servers:[],tags:[]}}function Uv(r,e){for(const[t,n]of Object.entries(r))n!==null&&typeof n=="object"?(e[t]??(e[t]=new n.__proto__.constructor),Uv(n,e[t])):typeof n<"u"&&(e[t]=n);return e}function Ph({serverState:r,authenticationState:e,operation:t,globalSecurity:n}){var l,c;const o=g0({url:xi(r)},Td(t,{requiredOnly:!1}),e?xh(e,((l=t.information)==null?void 0:l.security)??n??[]):{}),s=Td(t,{requiredOnly:!1}),a=Po(t,"path",!1);return{id:t.operationId,name:t.name,type:o.method,path:s.path??"",variables:a,cookies:eg(o.cookies),query:o.queryString.map(d=>({...d,enabled:d.required??!0})),headers:eg(o.headers),url:xi(r)??"",body:(c=o.postData)==null?void 0:c.text}}function eg(r){return(r??[]).map(e=>({...e,enabled:!0}))}const fN=Zg.unified().use(Qg).use(Vw).use(Dw),Ei=async r=>{const e=new Pi,{headings:t}=(await fN.process(r)).data;return pN(t,e)},pN=(r,e)=>r.map(t=>({...t,slug:e.slug(t.value)})),nc=r=>{const e=Math.min(...r.map(t=>t.depth));return e>=1&&e<=6?e:1};function Jt(r){var e,t;return r?Object.keys(((e=r==null?void 0:r.components)==null?void 0:e.schemas)??{}).length?(t=r==null?void 0:r.components)==null?void 0:t.schemas:Object.keys((r==null?void 0:r.definitions)??{}).length?r==null?void 0:r.definitions:{}:{}}function mN(r){const e=/{{?\s*([\w.-]+)\s*}}?/g,t=r==null?void 0:r.matchAll(e);return Array.from(t??[],n=>n[1])}const Ih=r=>r?!!Object.keys(Jt(r)??{}).length:!1,Kv=r=>{var e;return!!Object.keys(((e=r==null?void 0:r.components)==null?void 0:e.securitySchemes)??{}).length},Wv=r=>r?!!Object.keys((r==null?void 0:r.webhooks)??{}).length:!1;function Gv(r){try{return!!new URL(r)}catch{return!1}}const gN=(r,e)=>Object.keys(r).map(t=>({[e??t]:t,value:r[t]})),yN=r=>r.reduce((e,t)=>({...e,...t}),{});function oc(r,e){return Object.keys(r).forEach(t=>{Object.hasOwn(e,t)||delete r[t]}),Object.assign(r,e),r}const{server:vN}=no(),{setOperation:bN,setGlobalSecurity:wN}=nh(),{toggleApiClient:kN}=Fl(),{setActiveRequest:SN,resetActiveResponse:xN}=C0();function $l(r,e){const t=Ph({serverState:vN,operation:r,authenticationState:null,globalSecurity:null});xN(),SN(t),bN(r),wN(e),kN(t,!0)}var CN=Object.defineProperty,EN=(r,e,t)=>e in r?CN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yr=(r,e,t)=>(EN(r,typeof e!="symbol"?e+"":e,t),t);const $N=(r,e)=>{const t=r[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e)))})};var _N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Su={exports:{}},Jv={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatNames=r.fastFormats=r.fullFormats=void 0;function e(P,M){return{validate:P,compare:M}}r.fullFormats={date:e(s,a),time:e(c,d),"date-time":e(h,f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:N,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:v,int32:{type:"number",validate:S},int64:{type:"number",validate:x},float:{type:"number",validate:k},double:{type:"number",validate:k},password:!0,binary:!0},r.fastFormats={...r.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},r.formatNames=Object.keys(r.fullFormats);function t(P){return P%4===0&&(P%100!==0||P%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(P){const M=n.exec(P);if(!M)return!1;const j=+M[1],I=+M[2],X=+M[3];return I>=1&&I<=12&&X>=1&&X<=(I===2&&t(j)?29:o[I])}function a(P,M){if(P&&M)return P>M?1:P<M?-1:0}const l=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c(P,M){const j=l.exec(P);if(!j)return!1;const I=+j[1],X=+j[2],W=+j[3],te=j[5];return(I<=23&&X<=59&&W<=59||I===23&&X===59&&W===60)&&(!M||te!=="")}function d(P,M){if(!(P&&M))return;const j=l.exec(P),I=l.exec(M);if(j&&I)return P=j[1]+j[2]+j[3]+(j[4]||""),M=I[1]+I[2]+I[3]+(I[4]||""),P>M?1:P<M?-1:0}const u=/t|\s/i;function h(P){const M=P.split(u);return M.length===2&&s(M[0])&&c(M[1],!0)}function f(P,M){if(!(P&&M))return;const[j,I]=P.split(u),[X,W]=M.split(u),te=a(j,X);if(te!==void 0)return te||d(I,W)}const p=/\/|:/,y=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function g(P){return p.test(P)&&y.test(P)}const m=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function v(P){return m.lastIndex=0,m.test(P)}const b=-(2**31),w=2**31-1;function S(P){return Number.isInteger(P)&&P<=w&&P>=b}function x(P){return Number.isInteger(P)}function k(){return!0}const C=/[^\\]\\Z/;function N(P){if(C.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(Jv);var Yv={},xu={exports:{}},Kn={},Dt={},Xo={},Fi={},ne={},$i={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class e{}r._CodeOrName=e,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class t extends e{constructor(b){if(super(),!r.IDENTIFIER.test(b))throw new Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=t;class n extends e{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((w,S)=>`${w}${S}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((w,S)=>(S instanceof t&&(w[S.str]=(w[S.str]||0)+1),w),{})}}r._Code=n,r.nil=new n("");function o(v,...b){const w=[v[0]];let S=0;for(;S<b.length;)l(w,b[S]),w.push(v[++S]);return new n(w)}r._=o;const s=new n("+");function a(v,...b){const w=[p(v[0])];let S=0;for(;S<b.length;)w.push(s),l(w,b[S]),w.push(s,p(v[++S]));return c(w),new n(w)}r.str=a;function l(v,b){b instanceof n?v.push(...b._items):b instanceof t?v.push(b):v.push(h(b))}r.addCodeArg=l;function c(v){let b=1;for(;b<v.length-1;){if(v[b]===s){const w=d(v[b-1],v[b+1]);if(w!==void 0){v.splice(b-1,3,w);continue}v[b++]="+"}b++}}function d(v,b){if(b==='""')return v;if(v==='""')return b;if(typeof v=="string")return b instanceof t||v[v.length-1]!=='"'?void 0:typeof b!="string"?`${v.slice(0,-1)}${b}"`:b[0]==='"'?v.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(v instanceof t))return`"${v}${b.slice(1)}`}function u(v,b){return b.emptyStr()?v:v.emptyStr()?b:a`${v}${b}`}r.strConcat=u;function h(v){return typeof v=="number"||typeof v=="boolean"||v===null?v:p(Array.isArray(v)?v.join(","):v)}function f(v){return new n(p(v))}r.stringify=f;function p(v){return JSON.stringify(v).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}r.safeStringify=p;function y(v){return typeof v=="string"&&r.IDENTIFIER.test(v)?new n(`.${v}`):o`[${v}]`}r.getProperty=y;function g(v){if(typeof v=="string"&&r.IDENTIFIER.test(v))return new n(`${v}`);throw new Error(`CodeGen: invalid export name: ${v}, use explicit $id name mapping`)}r.getEsmExportName=g;function m(v){return new n(v.toString())}r.regexpCode=m})($i);var Cu={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const e=$i;class t extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n=r.UsedValueState||(r.UsedValueState={})),r.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class o{constructor({prefixes:d,parent:u}={}){this._names={},this._prefixes=d,this._parent=u}toName(d){return d instanceof e.Name?d:this.name(d)}name(d){return new e.Name(this._newName(d))}_newName(d){const u=this._names[d]||this._nameGroup(d);return`${d}${u.index++}`}_nameGroup(d){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}r.Scope=o;class s extends e.Name{constructor(d,u){super(u),this.prefix=d}setValue(d,{property:u,itemIndex:h}){this.value=d,this.scopePath=(0,e._)`.${new e.Name(u)}[${h}]`}}r.ValueScopeName=s;const a=(0,e._)`\n`;class l extends o{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?a:e.nil}}get(){return this._scope}name(d){return new s(d,this._newName(d))}value(d,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(d),{prefix:p}=f,y=(h=u.key)!==null&&h!==void 0?h:u.ref;let g=this._values[p];if(g){const b=g.get(y);if(b)return b}else g=this._values[p]=new Map;g.set(y,f);const m=this._scope[p]||(this._scope[p]=[]),v=m.length;return m[v]=u.ref,f.setValue(u,{property:p,itemIndex:v}),f}getValue(d,u){const h=this._values[d];if(h)return h.get(u)}scopeRefs(d,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,e._)`${d}${h.scopePath}`})}scopeCode(d=this._values,u,h){return this._reduceValues(d,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},u,h)}_reduceValues(d,u,h={},f){let p=e.nil;for(const y in d){const g=d[y];if(!g)continue;const m=h[y]=h[y]||new Map;g.forEach(v=>{if(m.has(v))return;m.set(v,n.Started);let b=u(v);if(b){const w=this.opts.es5?r.varKinds.var:r.varKinds.const;p=(0,e._)`${p}${w} ${v} = ${b};${this.opts._n}`}else if(b=f==null?void 0:f(v))p=(0,e._)`${p}${b}${this.opts._n}`;else throw new t(v);m.set(v,n.Completed)})}return p}}r.ValueScope=l})(Cu);(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const e=$i,t=Cu;var n=$i;Object.defineProperty(r,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return n.Name}});var o=Cu;Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),r.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(E,A){return this}}class a extends s{constructor(E,A,B){super(),this.varKind=E,this.name=A,this.rhs=B}render({es5:E,_n:A}){const B=E?t.varKinds.var:this.varKind,z=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${z};`+A}optimizeNames(E,A){if(E[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,E,A)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends s{constructor(E,A,B){super(),this.lhs=E,this.rhs=A,this.sideEffects=B}render({_n:E}){return`${this.lhs} = ${this.rhs};`+E}optimizeNames(E,A){if(!(this.lhs instanceof e.Name&&!E[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,E,A),this}get names(){const E=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(E,this.rhs)}}class c extends l{constructor(E,A,B,z){super(E,B,z),this.op=A}render({_n:E}){return`${this.lhs} ${this.op}= ${this.rhs};`+E}}class d extends s{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`${this.label}:`+E}}class u extends s{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`break${this.label?` ${this.label}`:""};`+E}}class h extends s{constructor(E){super(),this.error=E}render({_n:E}){return`throw ${this.error};`+E}get names(){return this.error.names}}class f extends s{constructor(E){super(),this.code=E}render({_n:E}){return`${this.code};`+E}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(E,A){return this.code=W(this.code,E,A),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class p extends s{constructor(E=[]){super(),this.nodes=E}render(E){return this.nodes.reduce((A,B)=>A+B.render(E),"")}optimizeNodes(){const{nodes:E}=this;let A=E.length;for(;A--;){const B=E[A].optimizeNodes();Array.isArray(B)?E.splice(A,1,...B):B?E[A]=B:E.splice(A,1)}return E.length>0?this:void 0}optimizeNames(E,A){const{nodes:B}=this;let z=B.length;for(;z--;){const H=B[z];H.optimizeNames(E,A)||(te(E,H.names),B.splice(z,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((E,A)=>I(E,A.names),{})}}class y extends p{render(E){return"{"+E._n+super.render(E)+"}"+E._n}}class g extends p{}class m extends y{}m.kind="else";class v extends y{constructor(E,A){super(A),this.condition=E}render(E){let A=`if(${this.condition})`+super.render(E);return this.else&&(A+="else "+this.else.render(E)),A}optimizeNodes(){super.optimizeNodes();const E=this.condition;if(E===!0)return this.nodes;let A=this.else;if(A){const B=A.optimizeNodes();A=this.else=Array.isArray(B)?new m(B):B}if(A)return E===!1?A instanceof v?A:A.nodes:this.nodes.length?this:new v(me(E),A instanceof v?[A]:A.nodes);if(!(E===!1||!this.nodes.length))return this}optimizeNames(E,A){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(E,A),!!(super.optimizeNames(E,A)||this.else))return this.condition=W(this.condition,E,A),this}get names(){const E=super.names;return X(E,this.condition),this.else&&I(E,this.else.names),E}}v.kind="if";class b extends y{}b.kind="for";class w extends b{constructor(E){super(),this.iteration=E}render(E){return`for(${this.iteration})`+super.render(E)}optimizeNames(E,A){if(super.optimizeNames(E,A))return this.iteration=W(this.iteration,E,A),this}get names(){return I(super.names,this.iteration.names)}}class S extends b{constructor(E,A,B,z){super(),this.varKind=E,this.name=A,this.from=B,this.to=z}render(E){const A=E.es5?t.varKinds.var:this.varKind,{name:B,from:z,to:H}=this;return`for(${A} ${B}=${z}; ${B}<${H}; ${B}++)`+super.render(E)}get names(){const E=X(super.names,this.from);return X(E,this.to)}}class x extends b{constructor(E,A,B,z){super(),this.loop=E,this.varKind=A,this.name=B,this.iterable=z}render(E){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(E)}optimizeNames(E,A){if(super.optimizeNames(E,A))return this.iterable=W(this.iterable,E,A),this}get names(){return I(super.names,this.iterable.names)}}class k extends y{constructor(E,A,B){super(),this.name=E,this.args=A,this.async=B}render(E){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(E)}}k.kind="func";class C extends p{render(E){return"return "+super.render(E)}}C.kind="return";class N extends y{render(E){let A="try"+super.render(E);return this.catch&&(A+=this.catch.render(E)),this.finally&&(A+=this.finally.render(E)),A}optimizeNodes(){var E,A;return super.optimizeNodes(),(E=this.catch)===null||E===void 0||E.optimizeNodes(),(A=this.finally)===null||A===void 0||A.optimizeNodes(),this}optimizeNames(E,A){var B,z;return super.optimizeNames(E,A),(B=this.catch)===null||B===void 0||B.optimizeNames(E,A),(z=this.finally)===null||z===void 0||z.optimizeNames(E,A),this}get names(){const E=super.names;return this.catch&&I(E,this.catch.names),this.finally&&I(E,this.finally.names),E}}class P extends y{constructor(E){super(),this.error=E}render(E){return`catch(${this.error})`+super.render(E)}}P.kind="catch";class M extends y{render(E){return"finally"+super.render(E)}}M.kind="finally";class j{constructor(E,A={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...A,_n:A.lines?`
63
63
  `:""},this._extScope=E,this._scope=new t.Scope({parent:E}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(E){return this._scope.name(E)}scopeName(E){return this._extScope.name(E)}scopeValue(E,A){const B=this._extScope.value(E,A);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(E,A){return this._extScope.getValue(E,A)}scopeRefs(E){return this._extScope.scopeRefs(E,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(E,A,B,z){const H=this._scope.toName(A);return B!==void 0&&z&&(this._constants[H.str]=B),this._leafNode(new a(E,H,B)),H}const(E,A,B){return this._def(t.varKinds.const,E,A,B)}let(E,A,B){return this._def(t.varKinds.let,E,A,B)}var(E,A,B){return this._def(t.varKinds.var,E,A,B)}assign(E,A,B){return this._leafNode(new l(E,A,B))}add(E,A){return this._leafNode(new c(E,r.operators.ADD,A))}code(E){return typeof E=="function"?E():E!==e.nil&&this._leafNode(new f(E)),this}object(...E){const A=["{"];for(const[B,z]of E)A.length>1&&A.push(","),A.push(B),(B!==z||this.opts.es5)&&(A.push(":"),(0,e.addCodeArg)(A,z));return A.push("}"),new e._Code(A)}if(E,A,B){if(this._blockNode(new v(E)),A&&B)this.code(A).else().code(B).endIf();else if(A)this.code(A).endIf();else if(B)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(E){return this._elseNode(new v(E))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(v,m)}_for(E,A){return this._blockNode(E),A&&this.code(A).endFor(),this}for(E,A){return this._for(new w(E),A)}forRange(E,A,B,z,H=this.opts.es5?t.varKinds.var:t.varKinds.let){const ie=this._scope.toName(E);return this._for(new S(H,ie,A,B),()=>z(ie))}forOf(E,A,B,z=t.varKinds.const){const H=this._scope.toName(E);if(this.opts.es5){const ie=A instanceof e.Name?A:this.var("_arr",A);return this.forRange("_i",0,(0,e._)`${ie}.length`,oe=>{this.var(H,(0,e._)`${ie}[${oe}]`),B(H)})}return this._for(new x("of",z,H,A),()=>B(H))}forIn(E,A,B,z=this.opts.es5?t.varKinds.var:t.varKinds.const){if(this.opts.ownProperties)return this.forOf(E,(0,e._)`Object.keys(${A})`,B);const H=this._scope.toName(E);return this._for(new x("in",z,H,A),()=>B(H))}endFor(){return this._endBlockNode(b)}label(E){return this._leafNode(new d(E))}break(E){return this._leafNode(new u(E))}return(E){const A=new C;if(this._blockNode(A),this.code(E),A.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(E,A,B){if(!A&&!B)throw new Error('CodeGen: "try" without "catch" and "finally"');const z=new N;if(this._blockNode(z),this.code(E),A){const H=this.name("e");this._currNode=z.catch=new P(H),A(H)}return B&&(this._currNode=z.finally=new M,this.code(B)),this._endBlockNode(P,M)}throw(E){return this._leafNode(new h(E))}block(E,A){return this._blockStarts.push(this._nodes.length),E&&this.code(E).endBlock(A),this}endBlock(E){const A=this._blockStarts.pop();if(A===void 0)throw new Error("CodeGen: not in self-balancing block");const B=this._nodes.length-A;if(B<0||E!==void 0&&B!==E)throw new Error(`CodeGen: wrong number of nodes: ${B} vs ${E} expected`);return this._nodes.length=A,this}func(E,A=e.nil,B,z){return this._blockNode(new k(E,A,B)),z&&this.code(z).endFunc(),this}endFunc(){return this._endBlockNode(k)}optimize(E=1){for(;E-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(E){return this._currNode.nodes.push(E),this}_blockNode(E){this._currNode.nodes.push(E),this._nodes.push(E)}_endBlockNode(E,A){const B=this._currNode;if(B instanceof E||A&&B instanceof A)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${A?`${E.kind}/${A.kind}`:E.kind}"`)}_elseNode(E){const A=this._currNode;if(!(A instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=A.else=E,this}get _root(){return this._nodes[0]}get _currNode(){const E=this._nodes;return E[E.length-1]}set _currNode(E){const A=this._nodes;A[A.length-1]=E}}r.CodeGen=j;function I(D,E){for(const A in E)D[A]=(D[A]||0)+(E[A]||0);return D}function X(D,E){return E instanceof e._CodeOrName?I(D,E.names):D}function W(D,E,A){if(D instanceof e.Name)return B(D);if(!z(D))return D;return new e._Code(D._items.reduce((H,ie)=>(ie instanceof e.Name&&(ie=B(ie)),ie instanceof e._Code?H.push(...ie._items):H.push(ie),H),[]));function B(H){const ie=A[H.str];return ie===void 0||E[H.str]!==1?H:(delete E[H.str],ie)}function z(H){return H instanceof e._Code&&H._items.some(ie=>ie instanceof e.Name&&E[ie.str]===1&&A[ie.str]!==void 0)}}function te(D,E){for(const A in E)D[A]=(D[A]||0)-(E[A]||0)}function me(D){return typeof D=="boolean"||typeof D=="number"||D===null?!D:(0,e._)`!${V(D)}`}r.not=me;const ke=T(r.operators.AND);function Se(...D){return D.reduce(ke)}r.and=Se;const se=T(r.operators.OR);function q(...D){return D.reduce(se)}r.or=q;function T(D){return(E,A)=>E===e.nil?A:A===e.nil?E:(0,e._)`${V(E)} ${D} ${V(A)}`}function V(D){return D instanceof e.Name?D:(0,e._)`(${D})`}})(ne);var he={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.checkStrictMode=r.getErrorPath=r.Type=r.useFunc=r.setEvaluated=r.evaluatedPropsToName=r.mergeEvaluated=r.eachItem=r.unescapeJsonPointer=r.escapeJsonPointer=r.escapeFragment=r.unescapeFragment=r.schemaRefOrVal=r.schemaHasRulesButRef=r.schemaHasRules=r.checkUnknownRules=r.alwaysValidSchema=r.toHash=void 0;const e=ne,t=$i;function n(k){const C={};for(const N of k)C[N]=!0;return C}r.toHash=n;function o(k,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(s(k,C),!a(C,k.self.RULES.all))}r.alwaysValidSchema=o;function s(k,C=k.schema){const{opts:N,self:P}=k;if(!N.strictSchema||typeof C=="boolean")return;const M=P.RULES.keywords;for(const j in C)M[j]||x(k,`unknown keyword: "${j}"`)}r.checkUnknownRules=s;function a(k,C){if(typeof k=="boolean")return!k;for(const N in k)if(C[N])return!0;return!1}r.schemaHasRules=a;function l(k,C){if(typeof k=="boolean")return!k;for(const N in k)if(N!=="$ref"&&C.all[N])return!0;return!1}r.schemaHasRulesButRef=l;function c({topSchemaRef:k,schemaPath:C},N,P,M){if(!M){if(typeof N=="number"||typeof N=="boolean")return N;if(typeof N=="string")return(0,e._)`${N}`}return(0,e._)`${k}${C}${(0,e.getProperty)(P)}`}r.schemaRefOrVal=c;function d(k){return f(decodeURIComponent(k))}r.unescapeFragment=d;function u(k){return encodeURIComponent(h(k))}r.escapeFragment=u;function h(k){return typeof k=="number"?`${k}`:k.replace(/~/g,"~0").replace(/\//g,"~1")}r.escapeJsonPointer=h;function f(k){return k.replace(/~1/g,"/").replace(/~0/g,"~")}r.unescapeJsonPointer=f;function p(k,C){if(Array.isArray(k))for(const N of k)C(N);else C(k)}r.eachItem=p;function y({mergeNames:k,mergeToName:C,mergeValues:N,resultToName:P}){return(M,j,I,X)=>{const W=I===void 0?j:I instanceof e.Name?(j instanceof e.Name?k(M,j,I):C(M,j,I),I):j instanceof e.Name?(C(M,I,j),j):N(j,I);return X===e.Name&&!(W instanceof e.Name)?P(M,W):W}}r.mergeEvaluated={props:y({mergeNames:(k,C,N)=>k.if((0,e._)`${N} !== true && ${C} !== undefined`,()=>{k.if((0,e._)`${C} === true`,()=>k.assign(N,!0),()=>k.assign(N,(0,e._)`${N} || {}`).code((0,e._)`Object.assign(${N}, ${C})`))}),mergeToName:(k,C,N)=>k.if((0,e._)`${N} !== true`,()=>{C===!0?k.assign(N,!0):(k.assign(N,(0,e._)`${N} || {}`),m(k,N,C))}),mergeValues:(k,C)=>k===!0?!0:{...k,...C},resultToName:g}),items:y({mergeNames:(k,C,N)=>k.if((0,e._)`${N} !== true && ${C} !== undefined`,()=>k.assign(N,(0,e._)`${C} === true ? true : ${N} > ${C} ? ${N} : ${C}`)),mergeToName:(k,C,N)=>k.if((0,e._)`${N} !== true`,()=>k.assign(N,C===!0?!0:(0,e._)`${N} > ${C} ? ${N} : ${C}`)),mergeValues:(k,C)=>k===!0?!0:Math.max(k,C),resultToName:(k,C)=>k.var("items",C)})};function g(k,C){if(C===!0)return k.var("props",!0);const N=k.var("props",(0,e._)`{}`);return C!==void 0&&m(k,N,C),N}r.evaluatedPropsToName=g;function m(k,C,N){Object.keys(N).forEach(P=>k.assign((0,e._)`${C}${(0,e.getProperty)(P)}`,!0))}r.setEvaluated=m;const v={};function b(k,C){return k.scopeValue("func",{ref:C,code:v[C.code]||(v[C.code]=new t._Code(C.code))})}r.useFunc=b;var w;(function(k){k[k.Num=0]="Num",k[k.Str=1]="Str"})(w=r.Type||(r.Type={}));function S(k,C,N){if(k instanceof e.Name){const P=C===w.Num;return N?P?(0,e._)`"[" + ${k} + "]"`:(0,e._)`"['" + ${k} + "']"`:P?(0,e._)`"/" + ${k}`:(0,e._)`"/" + ${k}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return N?(0,e.getProperty)(k).toString():"/"+h(k)}r.getErrorPath=S;function x(k,C,N=k.opts.strictSchema){if(N){if(C=`strict mode: ${C}`,N===!0)throw new Error(C);k.self.logger.warn(C)}}r.checkStrictMode=x})(he);var _t={};Object.defineProperty(_t,"__esModule",{value:!0});const ot=ne,NN={data:new ot.Name("data"),valCxt:new ot.Name("valCxt"),instancePath:new ot.Name("instancePath"),parentData:new ot.Name("parentData"),parentDataProperty:new ot.Name("parentDataProperty"),rootData:new ot.Name("rootData"),dynamicAnchors:new ot.Name("dynamicAnchors"),vErrors:new ot.Name("vErrors"),errors:new ot.Name("errors"),this:new ot.Name("this"),self:new ot.Name("self"),scope:new ot.Name("scope"),json:new ot.Name("json"),jsonPos:new ot.Name("jsonPos"),jsonLen:new ot.Name("jsonLen"),jsonPart:new ot.Name("jsonPart")};_t.default=NN;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const e=ne,t=he,n=_t;r.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},r.keyword$DataError={message:({keyword:m,schemaType:v})=>v?(0,e.str)`"${m}" keyword must be ${v} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function o(m,v=r.keywordError,b,w){const{it:S}=m,{gen:x,compositeRule:k,allErrors:C}=S,N=h(m,v,b);w??(k||C)?c(x,N):d(S,(0,e._)`[${N}]`)}r.reportError=o;function s(m,v=r.keywordError,b){const{it:w}=m,{gen:S,compositeRule:x,allErrors:k}=w,C=h(m,v,b);c(S,C),x||k||d(w,n.default.vErrors)}r.reportExtraError=s;function a(m,v){m.assign(n.default.errors,v),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(v,()=>m.assign((0,e._)`${n.default.vErrors}.length`,v),()=>m.assign(n.default.vErrors,null)))}r.resetErrorsCount=a;function l({gen:m,keyword:v,schemaValue:b,data:w,errsCount:S,it:x}){if(S===void 0)throw new Error("ajv implementation error");const k=m.name("err");m.forRange("i",S,n.default.errors,C=>{m.const(k,(0,e._)`${n.default.vErrors}[${C}]`),m.if((0,e._)`${k}.instancePath === undefined`,()=>m.assign((0,e._)`${k}.instancePath`,(0,e.strConcat)(n.default.instancePath,x.errorPath))),m.assign((0,e._)`${k}.schemaPath`,(0,e.str)`${x.errSchemaPath}/${v}`),x.opts.verbose&&(m.assign((0,e._)`${k}.schema`,b),m.assign((0,e._)`${k}.data`,w))})}r.extendErrors=l;function c(m,v){const b=m.const("err",v);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${b}]`),(0,e._)`${n.default.vErrors}.push(${b})`),m.code((0,e._)`${n.default.errors}++`)}function d(m,v){const{gen:b,validateName:w,schemaEnv:S}=m;S.$async?b.throw((0,e._)`new ${m.ValidationError}(${v})`):(b.assign((0,e._)`${w}.errors`,v),b.return(!1))}const u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function h(m,v,b){const{createErrors:w}=m.it;return w===!1?(0,e._)`{}`:f(m,v,b)}function f(m,v,b={}){const{gen:w,it:S}=m,x=[p(S,b),y(m,b)];return g(m,v,x),w.object(...x)}function p({errorPath:m},{instancePath:v}){const b=v?(0,e.str)`${m}${(0,t.getErrorPath)(v,t.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,b)]}function y({keyword:m,it:{errSchemaPath:v}},{schemaPath:b,parentSchema:w}){let S=w?v:(0,e.str)`${v}/${m}`;return b&&(S=(0,e.str)`${S}${(0,t.getErrorPath)(b,t.Type.Str)}`),[u.schemaPath,S]}function g(m,{params:v,message:b},w){const{keyword:S,data:x,schemaValue:k,it:C}=m,{opts:N,propertyName:P,topSchemaRef:M,schemaPath:j}=C;w.push([u.keyword,S],[u.params,typeof v=="function"?v(m):v||(0,e._)`{}`]),N.messages&&w.push([u.message,typeof b=="function"?b(m):b]),N.verbose&&w.push([u.schema,k],[u.parentSchema,(0,e._)`${M}${j}`],[n.default.data,x]),P&&w.push([u.propertyName,P])}})(Fi);Object.defineProperty(Xo,"__esModule",{value:!0});Xo.boolOrEmptySchema=Xo.topBoolOrEmptySchema=void 0;const AN=Fi,ON=ne,TN=_t,BN={message:"boolean schema is false"};function PN(r){const{gen:e,schema:t,validateName:n}=r;t===!1?Xv(r,!1):typeof t=="object"&&t.$async===!0?e.return(TN.default.data):(e.assign((0,ON._)`${n}.errors`,null),e.return(!0))}Xo.topBoolOrEmptySchema=PN;function IN(r,e){const{gen:t,schema:n}=r;n===!1?(t.var(e,!1),Xv(r)):t.var(e,!0)}Xo.boolOrEmptySchema=IN;function Xv(r,e){const{gen:t,data:n}=r,o={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,AN.reportError)(o,BN,void 0,e)}var qi={},Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.getRules=Zn.isJSONType=void 0;const MN=["string","number","integer","boolean","null","object","array"],DN=new Set(MN);function VN(r){return typeof r=="string"&&DN.has(r)}Zn.isJSONType=VN;function RN(){const r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}Zn.getRules=RN;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.shouldUseRule=Ir.shouldUseGroup=Ir.schemaHasRulesForType=void 0;function LN({schema:r,self:e},t){const n=e.RULES.types[t];return n&&n!==!0&&Qv(r,n)}Ir.schemaHasRulesForType=LN;function Qv(r,e){return e.rules.some(t=>Zv(r,t))}Ir.shouldUseGroup=Qv;function Zv(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}Ir.shouldUseRule=Zv;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.reportTypeError=r.checkDataTypes=r.checkDataType=r.coerceAndCheckDataType=r.getJSONTypes=r.getSchemaTypes=r.DataType=void 0;const e=Zn,t=Ir,n=Fi,o=ne,s=he;var a;(function(w){w[w.Correct=0]="Correct",w[w.Wrong=1]="Wrong"})(a=r.DataType||(r.DataType={}));function l(w){const S=c(w.type);if(S.includes("null")){if(w.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!S.length&&w.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');w.nullable===!0&&S.push("null")}return S}r.getSchemaTypes=l;function c(w){const S=Array.isArray(w)?w:w?[w]:[];if(S.every(e.isJSONType))return S;throw new Error("type must be JSONType or JSONType[]: "+S.join(","))}r.getJSONTypes=c;function d(w,S){const{gen:x,data:k,opts:C}=w,N=h(S,C.coerceTypes),P=S.length>0&&!(N.length===0&&S.length===1&&(0,t.schemaHasRulesForType)(w,S[0]));if(P){const M=g(S,k,C.strictNumbers,a.Wrong);x.if(M,()=>{N.length?f(w,S,N):v(w)})}return P}r.coerceAndCheckDataType=d;const u=new Set(["string","number","integer","boolean","null"]);function h(w,S){return S?w.filter(x=>u.has(x)||S==="array"&&x==="array"):[]}function f(w,S,x){const{gen:k,data:C,opts:N}=w,P=k.let("dataType",(0,o._)`typeof ${C}`),M=k.let("coerced",(0,o._)`undefined`);N.coerceTypes==="array"&&k.if((0,o._)`${P} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>k.assign(C,(0,o._)`${C}[0]`).assign(P,(0,o._)`typeof ${C}`).if(g(S,C,N.strictNumbers),()=>k.assign(M,C))),k.if((0,o._)`${M} !== undefined`);for(const I of x)(u.has(I)||I==="array"&&N.coerceTypes==="array")&&j(I);k.else(),v(w),k.endIf(),k.if((0,o._)`${M} !== undefined`,()=>{k.assign(C,M),p(w,M)});function j(I){switch(I){case"string":k.elseIf((0,o._)`${P} == "number" || ${P} == "boolean"`).assign(M,(0,o._)`"" + ${C}`).elseIf((0,o._)`${C} === null`).assign(M,(0,o._)`""`);return;case"number":k.elseIf((0,o._)`${P} == "boolean" || ${C} === null
64
64
  || (${P} == "string" && ${C} && ${C} == +${C})`).assign(M,(0,o._)`+${C}`);return;case"integer":k.elseIf((0,o._)`${P} === "boolean" || ${C} === null
65
65
  || (${P} === "string" && ${C} && ${C} == +${C} && !(${C} % 1))`).assign(M,(0,o._)`+${C}`);return;case"boolean":k.elseIf((0,o._)`${C} === "false" || ${C} === 0 || ${C} === null`).assign(M,!1).elseIf((0,o._)`${C} === "true" || ${C} === 1`).assign(M,!0);return;case"null":k.elseIf((0,o._)`${C} === "" || ${C} === 0 || ${C} === false`),k.assign(M,null);return;case"array":k.elseIf((0,o._)`${P} === "string" || ${P} === "number"
66
- || ${P} === "boolean" || ${C} === null`).assign(M,(0,o._)`[${C}]`)}}}function p({gen:w,parentData:S,parentDataProperty:x},k){w.if((0,o._)`${S} !== undefined`,()=>w.assign((0,o._)`${S}[${x}]`,k))}function y(w,S,x,k=a.Correct){const C=k===a.Correct?o.operators.EQ:o.operators.NEQ;let N;switch(w){case"null":return(0,o._)`${S} ${C} null`;case"array":N=(0,o._)`Array.isArray(${S})`;break;case"object":N=(0,o._)`${S} && typeof ${S} == "object" && !Array.isArray(${S})`;break;case"integer":N=P((0,o._)`!(${S} % 1) && !isNaN(${S})`);break;case"number":N=P();break;default:return(0,o._)`typeof ${S} ${C} ${w}`}return k===a.Correct?N:(0,o.not)(N);function P(M=o.nil){return(0,o.and)((0,o._)`typeof ${S} == "number"`,M,x?(0,o._)`isFinite(${S})`:o.nil)}}r.checkDataType=y;function g(w,S,x,k){if(w.length===1)return y(w[0],S,x,k);let C;const N=(0,s.toHash)(w);if(N.array&&N.object){const P=(0,o._)`typeof ${S} != "object"`;C=N.null?P:(0,o._)`!${S} || ${P}`,delete N.null,delete N.array,delete N.object}else C=o.nil;N.number&&delete N.integer;for(const P in N)C=(0,o.and)(C,y(P,S,x,k));return C}r.checkDataTypes=g;const m={message:({schema:w})=>`must be ${w}`,params:({schema:w,schemaValue:S})=>typeof w=="string"?(0,o._)`{type: ${w}}`:(0,o._)`{type: ${S}}`};function v(w){const S=b(w);(0,n.reportError)(S,m)}r.reportTypeError=v;function b(w){const{gen:S,data:x,schema:k}=w,C=(0,s.schemaRefOrVal)(w,k,"type");return{gen:S,keyword:"type",data:x,schema:k.type,schemaCode:C,schemaValue:C,parentSchema:k,params:{},it:w}}})(qi);var oc={};Object.defineProperty(oc,"__esModule",{value:!0});oc.assignDefaults=void 0;const vo=ne,jN=he;function FN(r,e){const{properties:t,items:n}=r.schema;if(e==="object"&&t)for(const o in t)tg(r,o,t[o].default);else e==="array"&&Array.isArray(n)&&n.forEach((o,s)=>tg(r,s,o.default))}oc.assignDefaults=FN;function tg(r,e,t){const{gen:n,compositeRule:o,data:s,opts:a}=r;if(t===void 0)return;const l=(0,vo._)`${s}${(0,vo.getProperty)(e)}`;if(o){(0,jN.checkStrictMode)(r,`default is ignored for: ${l}`);return}let c=(0,vo._)`${l} === undefined`;a.useDefaults==="empty"&&(c=(0,vo._)`${c} || ${l} === null || ${l} === ""`),n.if(c,(0,vo._)`${l} = ${(0,vo.stringify)(t)}`)}var gr={},de={};Object.defineProperty(de,"__esModule",{value:!0});de.validateUnion=de.validateArray=de.usePattern=de.callValidateCode=de.schemaProperties=de.allSchemaProperties=de.noPropertyInData=de.propertyInData=de.isOwnProperty=de.hasPropFunc=de.reportMissingProp=de.checkMissingProp=de.checkReportMissingProp=void 0;const Oe=ne,Mh=he,Kr=_t,qN=he;function zN(r,e){const{gen:t,data:n,it:o}=r;t.if(Vh(t,n,e,o.opts.ownProperties),()=>{r.setParams({missingProperty:(0,Oe._)`${e}`},!0),r.error()})}de.checkReportMissingProp=zN;function HN({gen:r,data:e,it:{opts:t}},n,o){return(0,Oe.or)(...n.map(s=>(0,Oe.and)(Vh(r,e,s,t.ownProperties),(0,Oe._)`${o} = ${s}`)))}de.checkMissingProp=HN;function UN(r,e){r.setParams({missingProperty:e},!0),r.error()}de.reportMissingProp=UN;function eb(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Oe._)`Object.prototype.hasOwnProperty`})}de.hasPropFunc=eb;function Dh(r,e,t){return(0,Oe._)`${eb(r)}.call(${e}, ${t})`}de.isOwnProperty=Dh;function KN(r,e,t,n){const o=(0,Oe._)`${e}${(0,Oe.getProperty)(t)} !== undefined`;return n?(0,Oe._)`${o} && ${Dh(r,e,t)}`:o}de.propertyInData=KN;function Vh(r,e,t,n){const o=(0,Oe._)`${e}${(0,Oe.getProperty)(t)} === undefined`;return n?(0,Oe.or)(o,(0,Oe.not)(Dh(r,e,t))):o}de.noPropertyInData=Vh;function tb(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}de.allSchemaProperties=tb;function WN(r,e){return tb(e).filter(t=>!(0,Mh.alwaysValidSchema)(r,e[t]))}de.schemaProperties=WN;function GN({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:o,errorPath:s},it:a},l,c,d){const u=d?(0,Oe._)`${r}, ${e}, ${n}${o}`:e,h=[[Kr.default.instancePath,(0,Oe.strConcat)(Kr.default.instancePath,s)],[Kr.default.parentData,a.parentData],[Kr.default.parentDataProperty,a.parentDataProperty],[Kr.default.rootData,Kr.default.rootData]];a.opts.dynamicRef&&h.push([Kr.default.dynamicAnchors,Kr.default.dynamicAnchors]);const f=(0,Oe._)`${u}, ${t.object(...h)}`;return c!==Oe.nil?(0,Oe._)`${l}.call(${c}, ${f})`:(0,Oe._)`${l}(${f})`}de.callValidateCode=GN;const JN=(0,Oe._)`new RegExp`;function YN({gen:r,it:{opts:e}},t){const n=e.unicodeRegExp?"u":"",{regExp:o}=e.code,s=o(t,n);return r.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Oe._)`${o.code==="new RegExp"?JN:(0,qN.useFunc)(r,o)}(${t}, ${n})`})}de.usePattern=YN;function XN(r){const{gen:e,data:t,keyword:n,it:o}=r,s=e.name("valid");if(o.allErrors){const l=e.let("valid",!0);return a(()=>e.assign(l,!1)),l}return e.var(s,!0),a(()=>e.break()),s;function a(l){const c=e.const("len",(0,Oe._)`${t}.length`);e.forRange("i",0,c,d=>{r.subschema({keyword:n,dataProp:d,dataPropType:Mh.Type.Num},s),e.if((0,Oe.not)(s),l)})}}de.validateArray=XN;function QN(r){const{gen:e,schema:t,keyword:n,it:o}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(l=>(0,Mh.alwaysValidSchema)(o,l))&&!o.opts.unevaluated)return;const s=e.let("valid",!1),a=e.name("_valid");e.block(()=>t.forEach((l,c)=>{const d=r.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);e.assign(s,(0,Oe._)`${s} || ${a}`),r.mergeValidEvaluated(d,a)||e.if((0,Oe.not)(s))})),r.result(s,()=>r.reset(),()=>r.error(!0))}de.validateUnion=QN;Object.defineProperty(gr,"__esModule",{value:!0});gr.validateKeywordUsage=gr.validSchemaType=gr.funcKeywordCode=gr.macroKeywordCode=void 0;const ut=ne,On=_t,ZN=de,eA=Fi;function tA(r,e){const{gen:t,keyword:n,schema:o,parentSchema:s,it:a}=r,l=e.macro.call(a.self,o,s,a),c=rb(t,n,l);a.opts.validateSchema!==!1&&a.self.validateSchema(l,!0);const d=t.name("valid");r.subschema({schema:l,schemaPath:ut.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},d),r.pass(d,()=>r.error(!0))}gr.macroKeywordCode=tA;function rA(r,e){var t;const{gen:n,keyword:o,schema:s,parentSchema:a,$data:l,it:c}=r;oA(c,e);const d=!l&&e.compile?e.compile.call(c.self,s,a,c):e.validate,u=rb(n,o,d),h=n.let("valid");r.block$data(h,f),r.ok((t=e.valid)!==null&&t!==void 0?t:h);function f(){if(e.errors===!1)g(),e.modifying&&rg(r),m(()=>r.error());else{const v=e.async?p():y();e.modifying&&rg(r),m(()=>nA(r,v))}}function p(){const v=n.let("ruleErrs",null);return n.try(()=>g((0,ut._)`await `),b=>n.assign(h,!1).if((0,ut._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(v,(0,ut._)`${b}.errors`),()=>n.throw(b))),v}function y(){const v=(0,ut._)`${u}.errors`;return n.assign(v,null),g(ut.nil),v}function g(v=e.async?(0,ut._)`await `:ut.nil){const b=c.opts.passContext?On.default.this:On.default.self,w=!("compile"in e&&!l||e.schema===!1);n.assign(h,(0,ut._)`${v}${(0,ZN.callValidateCode)(r,u,b,w)}`,e.modifying)}function m(v){var b;n.if((0,ut.not)((b=e.valid)!==null&&b!==void 0?b:h),v)}}gr.funcKeywordCode=rA;function rg(r){const{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,ut._)`${n.parentData}[${n.parentDataProperty}]`))}function nA(r,e){const{gen:t}=r;t.if((0,ut._)`Array.isArray(${e})`,()=>{t.assign(On.default.vErrors,(0,ut._)`${On.default.vErrors} === null ? ${e} : ${On.default.vErrors}.concat(${e})`).assign(On.default.errors,(0,ut._)`${On.default.vErrors}.length`),(0,eA.extendErrors)(r)},()=>r.error())}function oA({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function rb(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,ut.stringify)(t)})}function sA(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r>"u")}gr.validSchemaType=sA;function iA({schema:r,opts:e,self:t,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");const a=o.dependencies;if(a!=null&&a.some(l=>!Object.prototype.hasOwnProperty.call(r,l)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(r[s])){const l=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(l);else throw new Error(l)}}gr.validateKeywordUsage=iA;var cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.extendSubschemaMode=cn.extendSubschemaData=cn.getSubschema=void 0;const fr=ne,nb=he;function aA(r,{keyword:e,schemaProp:t,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const l=r.schema[e];return t===void 0?{schema:l,schemaPath:(0,fr._)`${r.schemaPath}${(0,fr.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:l[t],schemaPath:(0,fr._)`${r.schemaPath}${(0,fr.getProperty)(e)}${(0,fr.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,nb.escapeFragment)(t)}`}}if(n!==void 0){if(o===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}cn.getSubschema=aA;function lA(r,e,{dataProp:t,dataPropType:n,data:o,dataTypes:s,propertyName:a}){if(o!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=e;if(t!==void 0){const{errorPath:d,dataPathArr:u,opts:h}=e,f=l.let("data",(0,fr._)`${e.data}${(0,fr.getProperty)(t)}`,!0);c(f),r.errorPath=(0,fr.str)`${d}${(0,nb.getErrorPath)(t,n,h.jsPropertySyntax)}`,r.parentDataProperty=(0,fr._)`${t}`,r.dataPathArr=[...u,r.parentDataProperty]}if(o!==void 0){const d=o instanceof fr.Name?o:l.let("data",o,!0);c(d),a!==void 0&&(r.propertyName=a)}s&&(r.dataTypes=s);function c(d){r.data=d,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,d]}}cn.extendSubschemaData=lA;function cA(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(r.compositeRule=n),o!==void 0&&(r.createErrors=o),s!==void 0&&(r.allErrors=s),r.jtdDiscriminator=e,r.jtdMetadata=t}cn.extendSubschemaMode=cA;var tt={},ob=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,o,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!r(e[o],t[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){var a=s[o];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t},sb={exports:{}},an=sb.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},o=t.post||function(){};el(e,n,o,r,"",r)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};an.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function el(r,e,t,n,o,s,a,l,c,d){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,o,s,a,l,c,d);for(var u in n){var h=n[u];if(Array.isArray(h)){if(u in an.arrayKeywords)for(var f=0;f<h.length;f++)el(r,e,t,h[f],o+"/"+u+"/"+f,s,o,u,n,f)}else if(u in an.propsKeywords){if(h&&typeof h=="object")for(var p in h)el(r,e,t,h[p],o+"/"+u+"/"+dA(p),s,o,u,n,p)}else(u in an.keywords||r.allKeys&&!(u in an.skipKeywords))&&el(r,e,t,h,o+"/"+u,s,o,u,n)}t(n,o,s,a,l,c,d)}}function dA(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}var uA=sb.exports;Object.defineProperty(tt,"__esModule",{value:!0});tt.getSchemaRefs=tt.resolveUrl=tt.normalizeId=tt._getFullPath=tt.getFullPath=tt.inlineRef=void 0;const hA=he,fA=ob,pA=uA,mA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function gA(r,e=!0){return typeof r=="boolean"?!0:e===!0?!Cu(r):e?ib(r)<=e:!1}tt.inlineRef=gA;const yA=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Cu(r){for(const e in r){if(yA.has(e))return!0;const t=r[e];if(Array.isArray(t)&&t.some(Cu)||typeof t=="object"&&Cu(t))return!0}return!1}function ib(r){let e=0;for(const t in r)if(t==="$ref"||(e++,!mA.has(t)&&(typeof r[t]=="object"&&(0,hA.eachItem)(r[t],n=>e+=ib(n)),e===1/0)))return 1/0;return e}function ab(r,e="",t){t!==!1&&(e=jo(e));const n=r.parse(e);return lb(r,n)}tt.getFullPath=ab;function lb(r,e){return r.serialize(e).split("#")[0]+"#"}tt._getFullPath=lb;const vA=/#\/?$/;function jo(r){return r?r.replace(vA,""):""}tt.normalizeId=jo;function bA(r,e,t){return t=jo(t),r.resolve(e,t)}tt.resolveUrl=bA;const wA=/^[a-z_][-a-z0-9._]*$/i;function kA(r,e){if(typeof r=="boolean")return{};const{schemaId:t,uriResolver:n}=this.opts,o=jo(r[t]||e),s={"":o},a=ab(n,o,!1),l={},c=new Set;return pA(r,{allKeys:!0},(h,f,p,y)=>{if(y===void 0)return;const g=a+f;let m=s[y];typeof h[t]=="string"&&(m=v.call(this,h[t])),b.call(this,h.$anchor),b.call(this,h.$dynamicAnchor),s[f]=m;function v(w){const S=this.opts.uriResolver.resolve;if(w=jo(m?S(m,w):w),c.has(w))throw u(w);c.add(w);let x=this.refs[w];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?d(h,x.schema,w):w!==jo(g)&&(w[0]==="#"?(d(h,l[w],w),l[w]=h):this.refs[w]=g),w}function b(w){if(typeof w=="string"){if(!wA.test(w))throw new Error(`invalid anchor "${w}"`);v.call(this,`#${w}`)}}}),l;function d(h,f,p){if(f!==void 0&&!fA(h,f))throw u(p)}function u(h){return new Error(`reference "${h}" resolves to more than one schema`)}}tt.getSchemaRefs=kA;Object.defineProperty(Dt,"__esModule",{value:!0});Dt.getData=Dt.KeywordCxt=Dt.validateFunctionCode=void 0;const cb=Xo,ng=qi,Rh=Ir,_l=qi,SA=oc,si=gr,id=cn,J=ne,re=_t,xA=tt,Mr=he,Fs=Fi;function CA(r){if(hb(r)&&(fb(r),ub(r))){_A(r);return}db(r,()=>(0,cb.topBoolOrEmptySchema)(r))}Dt.validateFunctionCode=CA;function db({gen:r,validateName:e,schema:t,schemaEnv:n,opts:o},s){o.code.es5?r.func(e,(0,J._)`${re.default.data}, ${re.default.valCxt}`,n.$async,()=>{r.code((0,J._)`"use strict"; ${og(t,o)}`),$A(r,o),r.code(s)}):r.func(e,(0,J._)`${re.default.data}, ${EA(o)}`,n.$async,()=>r.code(og(t,o)).code(s))}function EA(r){return(0,J._)`{${re.default.instancePath}="", ${re.default.parentData}, ${re.default.parentDataProperty}, ${re.default.rootData}=${re.default.data}${r.dynamicRef?(0,J._)`, ${re.default.dynamicAnchors}={}`:J.nil}}={}`}function $A(r,e){r.if(re.default.valCxt,()=>{r.var(re.default.instancePath,(0,J._)`${re.default.valCxt}.${re.default.instancePath}`),r.var(re.default.parentData,(0,J._)`${re.default.valCxt}.${re.default.parentData}`),r.var(re.default.parentDataProperty,(0,J._)`${re.default.valCxt}.${re.default.parentDataProperty}`),r.var(re.default.rootData,(0,J._)`${re.default.valCxt}.${re.default.rootData}`),e.dynamicRef&&r.var(re.default.dynamicAnchors,(0,J._)`${re.default.valCxt}.${re.default.dynamicAnchors}`)},()=>{r.var(re.default.instancePath,(0,J._)`""`),r.var(re.default.parentData,(0,J._)`undefined`),r.var(re.default.parentDataProperty,(0,J._)`undefined`),r.var(re.default.rootData,re.default.data),e.dynamicRef&&r.var(re.default.dynamicAnchors,(0,J._)`{}`)})}function _A(r){const{schema:e,opts:t,gen:n}=r;db(r,()=>{t.$comment&&e.$comment&&mb(r),BA(r),n.let(re.default.vErrors,null),n.let(re.default.errors,0),t.unevaluated&&NA(r),pb(r),MA(r)})}function NA(r){const{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,J._)`${t}.evaluated`),e.if((0,J._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,J._)`${r.evaluated}.props`,(0,J._)`undefined`)),e.if((0,J._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,J._)`${r.evaluated}.items`,(0,J._)`undefined`))}function og(r,e){const t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,J._)`/*# sourceURL=${t} */`:J.nil}function AA(r,e){if(hb(r)&&(fb(r),ub(r))){OA(r,e);return}(0,cb.boolOrEmptySchema)(r,e)}function ub({schema:r,self:e}){if(typeof r=="boolean")return!r;for(const t in r)if(e.RULES.all[t])return!0;return!1}function hb(r){return typeof r.schema!="boolean"}function OA(r,e){const{schema:t,gen:n,opts:o}=r;o.$comment&&t.$comment&&mb(r),PA(r),IA(r);const s=n.const("_errs",re.default.errors);pb(r,s),n.var(e,(0,J._)`${s} === ${re.default.errors}`)}function fb(r){(0,Mr.checkUnknownRules)(r),TA(r)}function pb(r,e){if(r.opts.jtd)return sg(r,[],!1,e);const t=(0,ng.getSchemaTypes)(r.schema),n=(0,ng.coerceAndCheckDataType)(r,t);sg(r,t,!n,e)}function TA(r){const{schema:e,errSchemaPath:t,opts:n,self:o}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Mr.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function BA(r){const{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Mr.checkStrictMode)(r,"default is ignored in the schema root")}function PA(r){const e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,xA.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function IA(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function mb({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:o}){const s=t.$comment;if(o.$comment===!0)r.code((0,J._)`${re.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){const a=(0,J.str)`${n}/$comment`,l=r.scopeValue("root",{ref:e.root});r.code((0,J._)`${re.default.self}.opts.$comment(${s}, ${a}, ${l}.schema)`)}}function MA(r){const{gen:e,schemaEnv:t,validateName:n,ValidationError:o,opts:s}=r;t.$async?e.if((0,J._)`${re.default.errors} === 0`,()=>e.return(re.default.data),()=>e.throw((0,J._)`new ${o}(${re.default.vErrors})`)):(e.assign((0,J._)`${n}.errors`,re.default.vErrors),s.unevaluated&&DA(r),e.return((0,J._)`${re.default.errors} === 0`))}function DA({gen:r,evaluated:e,props:t,items:n}){t instanceof J.Name&&r.assign((0,J._)`${e}.props`,t),n instanceof J.Name&&r.assign((0,J._)`${e}.items`,n)}function sg(r,e,t,n){const{gen:o,schema:s,data:a,allErrors:l,opts:c,self:d}=r,{RULES:u}=d;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,Mr.schemaHasRulesButRef)(s,u))){o.block(()=>vb(r,"$ref",u.all.$ref.definition));return}c.jtd||VA(r,e),o.block(()=>{for(const f of u.rules)h(f);h(u.post)});function h(f){(0,Rh.shouldUseGroup)(s,f)&&(f.type?(o.if((0,_l.checkDataType)(f.type,a,c.strictNumbers)),ig(r,f),e.length===1&&e[0]===f.type&&t&&(o.else(),(0,_l.reportTypeError)(r)),o.endIf()):ig(r,f),l||o.if((0,J._)`${re.default.errors} === ${n||0}`))}}function ig(r,e){const{gen:t,schema:n,opts:{useDefaults:o}}=r;o&&(0,SA.assignDefaults)(r,e.type),t.block(()=>{for(const s of e.rules)(0,Rh.shouldUseRule)(n,s)&&vb(r,s.keyword,s.definition,e.type)})}function VA(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(RA(r,e),r.opts.allowUnionTypes||LA(r,e),jA(r,r.dataTypes))}function RA(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{gb(r.dataTypes,t)||Lh(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),qA(r,e)}}function LA(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Lh(r,"use allowUnionTypes to allow union type keyword")}function jA(r,e){const t=r.self.RULES.all;for(const n in t){const o=t[n];if(typeof o=="object"&&(0,Rh.shouldUseRule)(r.schema,o)){const{type:s}=o.definition;s.length&&!s.some(a=>FA(e,a))&&Lh(r,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function FA(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function gb(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function qA(r,e){const t=[];for(const n of r.dataTypes)gb(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function Lh(r,e){const t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,Mr.checkStrictMode)(r,e,r.opts.strictTypes)}class yb{constructor(e,t,n){if((0,si.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Mr.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",bb(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,si.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",re.default.errors))}result(e,t,n){this.failResult((0,J.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,J.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail((0,J._)`${t} !== undefined && (${(0,J.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Fs.reportExtraError:Fs.reportError)(this,this.def.error,t)}$dataError(){(0,Fs.reportError)(this,this.def.$dataError||Fs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Fs.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=J.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=J.nil,t=J.nil){if(!this.$data)return;const{gen:n,schemaCode:o,schemaType:s,def:a}=this;n.if((0,J.or)((0,J._)`${o} === undefined`,t)),e!==J.nil&&n.assign(e,!0),(s.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==J.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:o,it:s}=this;return(0,J.or)(a(),l());function a(){if(n.length){if(!(t instanceof J.Name))throw new Error("ajv implementation error");const c=Array.isArray(n)?n:[n];return(0,J._)`${(0,_l.checkDataTypes)(c,t,s.opts.strictNumbers,_l.DataType.Wrong)}`}return J.nil}function l(){if(o.validateSchema){const c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,J._)`!${c}(${t})`}return J.nil}}subschema(e,t){const n=(0,id.getSubschema)(this.it,e);(0,id.extendSubschemaData)(n,this.it,e),(0,id.extendSubschemaMode)(n,e);const o={...this.it,...n,items:void 0,props:void 0};return AA(o,t),o}mergeEvaluated(e,t){const{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Mr.mergeEvaluated.props(o,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Mr.mergeEvaluated.items(o,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(t,()=>this.mergeEvaluated(e,J.Name)),!0}}Dt.KeywordCxt=yb;function vb(r,e,t,n){const o=new yb(r,t,e);"code"in t?t.code(o,n):o.$data&&t.validate?(0,si.funcKeywordCode)(o,t):"macro"in t?(0,si.macroKeywordCode)(o,t):(t.compile||t.validate)&&(0,si.funcKeywordCode)(o,t)}const zA=/^\/(?:[^~]|~0|~1)*$/,HA=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function bb(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let o,s;if(r==="")return re.default.rootData;if(r[0]==="/"){if(!zA.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);o=r,s=re.default.rootData}else{const d=HA.exec(r);if(!d)throw new Error(`Invalid JSON-pointer: ${r}`);const u=+d[1];if(o=d[2],o==="#"){if(u>=e)throw new Error(c("property/index",u));return n[e-u]}if(u>e)throw new Error(c("data",u));if(s=t[e-u],!o)return s}let a=s;const l=o.split("/");for(const d of l)d&&(s=(0,J._)`${s}${(0,J.getProperty)((0,Mr.unescapeJsonPointer)(d))}`,a=(0,J._)`${a} && ${s}`);return a;function c(d,u){return`Cannot access ${d} ${u} levels up, current level is ${e}`}}Dt.getData=bb;var is={};Object.defineProperty(is,"__esModule",{value:!0});class UA extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}is.default=UA;var as={};Object.defineProperty(as,"__esModule",{value:!0});const ad=tt;class KA extends Error{constructor(e,t,n,o){super(o||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,ad.resolveUrl)(e,t,n),this.missingSchema=(0,ad.normalizeId)((0,ad.getFullPath)(e,this.missingRef))}}as.default=KA;var ft={};Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;const qt=ne,WA=is,_n=_t,Wt=tt,ag=he,GA=Dt;class sc{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Wt.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}ft.SchemaEnv=sc;function jh(r){const e=wb.call(this,r);if(e)return e;const t=(0,Wt.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,a=new qt.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s});let l;r.$async&&(l=a.scopeValue("Error",{ref:WA.default,code:(0,qt._)`require("ajv/dist/runtime/validation_error").default`}));const c=a.scopeName("validate");r.validateName=c;const d={gen:a,allErrors:this.opts.allErrors,data:_n.default.data,parentData:_n.default.parentData,parentDataProperty:_n.default.parentDataProperty,dataNames:[_n.default.data],dataPathArr:[qt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,qt.stringify)(r.schema)}:{ref:r.schema}),validateName:c,ValidationError:l,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:qt.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,qt._)`""`,opts:this.opts,self:this};let u;try{this._compilations.add(r),(0,GA.validateFunctionCode)(d),a.optimize(this.opts.code.optimize);const h=a.toString();u=`${a.scopeRefs(_n.default.scope)}return ${h}`,this.opts.code.process&&(u=this.opts.code.process(u,r));const f=new Function(`${_n.default.self}`,`${_n.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=r.schema,f.schemaEnv=r,r.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:h,scopeValues:a._values}),this.opts.unevaluated){const{props:p,items:y}=d;f.evaluated={props:p instanceof qt.Name?void 0:p,items:y instanceof qt.Name?void 0:y,dynamicProps:p instanceof qt.Name,dynamicItems:y instanceof qt.Name},f.source&&(f.source.evaluated=(0,qt.stringify)(f.evaluated))}return r.validate=f,r}catch(h){throw delete r.validate,delete r.validateName,u&&this.logger.error("Error compiling schema, function code:",u),h}finally{this._compilations.delete(r)}}ft.compileSchema=jh;function JA(r,e,t){var n;t=(0,Wt.resolveUrl)(this.opts.uriResolver,e,t);const o=r.refs[t];if(o)return o;let s=QA.call(this,r,t);if(s===void 0){const a=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:l}=this.opts;a&&(s=new sc({schema:a,schemaId:l,root:r,baseId:e}))}if(s!==void 0)return r.refs[t]=YA.call(this,s)}ft.resolveRef=JA;function YA(r){return(0,Wt.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:jh.call(this,r)}function wb(r){for(const e of this._compilations)if(XA(e,r))return e}ft.getCompilingSchema=wb;function XA(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function QA(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||ic.call(this,r,e)}function ic(r,e){const t=this.opts.uriResolver.parse(e),n=(0,Wt._getFullPath)(this.opts.uriResolver,t);let o=(0,Wt.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===o)return ld.call(this,t,r);const s=(0,Wt.normalizeId)(n),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){const l=ic.call(this,r,a);return typeof(l==null?void 0:l.schema)!="object"?void 0:ld.call(this,t,l)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||jh.call(this,a),s===(0,Wt.normalizeId)(e)){const{schema:l}=a,{schemaId:c}=this.opts,d=l[c];return d&&(o=(0,Wt.resolveUrl)(this.opts.uriResolver,o,d)),new sc({schema:l,schemaId:c,root:r,baseId:o})}return ld.call(this,t,a)}}ft.resolveSchema=ic;const ZA=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function ld(r,{baseId:e,schema:t,root:n}){var o;if(((o=r.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(const l of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;const c=t[(0,ag.unescapeFragment)(l)];if(c===void 0)return;t=c;const d=typeof t=="object"&&t[this.opts.schemaId];!ZA.has(l)&&d&&(e=(0,Wt.resolveUrl)(this.opts.uriResolver,e,d))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,ag.schemaHasRulesButRef)(t,this.RULES)){const l=(0,Wt.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=ic.call(this,n,l)}const{schemaId:a}=this.opts;if(s=s||new sc({schema:t,schemaId:a,root:n,baseId:e}),s.schema!==s.root.schema)return s}const eO="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",tO="Meta-schema for $data reference (JSON AnySchema extension proposal)",rO="object",nO=["$data"],oO={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},sO=!1,iO={$id:eO,description:tO,type:rO,required:nO,properties:oO,additionalProperties:sO};var Fh={},Eu={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(r,e){(function(t,n){n(e)})(_N,function(t){function n(){for(var $=arguments.length,_=Array($),O=0;O<$;O++)_[O]=arguments[O];if(_.length>1){_[0]=_[0].slice(0,-1);for(var R=_.length-1,L=1;L<R;++L)_[L]=_[L].slice(1,-1);return _[R]=_[R].slice(1),_.join("")}else return _[0]}function o($){return"(?:"+$+")"}function s($){return $===void 0?"undefined":$===null?"null":Object.prototype.toString.call($).split(" ").pop().split("]").shift().toLowerCase()}function a($){return $.toUpperCase()}function l($){return $!=null?$ instanceof Array?$:typeof $.length!="number"||$.split||$.setInterval||$.call?[$]:Array.prototype.slice.call($):[]}function c($,_){var O=$;if(_)for(var R in _)O[R]=_[R];return O}function d($){var _="[A-Za-z]",O="[0-9]",R=n(O,"[A-Fa-f]"),L=o(o("%[EFef]"+R+"%"+R+R+"%"+R+R)+"|"+o("%[89A-Fa-f]"+R+"%"+R+R)+"|"+o("%"+R+R)),ee="[\\:\\/\\?\\#\\[\\]\\@]",Q="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ge=n(ee,Q),Fe=$?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ce=$?"[\\uE000-\\uF8FF]":"[]",pe=n(_,O,"[\\-\\.\\_\\~]",Fe);o(_+n(_,O,"[\\+\\-\\.]")+"*"),o(o(L+"|"+n(pe,Q,"[\\:]"))+"*");var _e=o(o("25[0-5]")+"|"+o("2[0-4]"+O)+"|"+o("1"+O+O)+"|"+o("0?[1-9]"+O)+"|0?0?"+O),De=o(_e+"\\."+_e+"\\."+_e+"\\."+_e),ae=o(R+"{1,4}"),qe=o(o(ae+"\\:"+ae)+"|"+De),Ee=o(o(ae+"\\:")+"{6}"+qe),At=o("\\:\\:"+o(ae+"\\:")+"{5}"+qe),go=o(o(ae)+"?\\:\\:"+o(ae+"\\:")+"{4}"+qe),Ft=o(o(o(ae+"\\:")+"{0,1}"+ae)+"?\\:\\:"+o(ae+"\\:")+"{3}"+qe),xr=o(o(o(ae+"\\:")+"{0,2}"+ae)+"?\\:\\:"+o(ae+"\\:")+"{2}"+qe),xn=o(o(o(ae+"\\:")+"{0,3}"+ae)+"?\\:\\:"+ae+"\\:"+qe),Cn=o(o(o(ae+"\\:")+"{0,4}"+ae)+"?\\:\\:"+qe),Ot=o(o(o(ae+"\\:")+"{0,5}"+ae)+"?\\:\\:"+ae),Cr=o(o(o(ae+"\\:")+"{0,6}"+ae)+"?\\:\\:"),En=o([Ee,At,go,Ft,xr,xn,Cn,Ot,Cr].join("|")),sr=o(o(pe+"|"+L)+"+");o("[vV]"+R+"+\\."+n(pe,Q,"[\\:]")+"+"),o(o(L+"|"+n(pe,Q))+"*");var oa=o(L+"|"+n(pe,Q,"[\\:\\@]"));return o(o(L+"|"+n(pe,Q,"[\\@]"))+"+"),o(o(oa+"|"+n("[\\/\\?]",Ce))+"*"),{NOT_SCHEME:new RegExp(n("[^]",_,O,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",pe,Q),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",pe,Q),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",pe,Q),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",pe,Q),"g"),NOT_QUERY:new RegExp(n("[^\\%]",pe,Q,"[\\:\\@\\/\\?]",Ce),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",pe,Q,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",pe,Q),"g"),UNRESERVED:new RegExp(pe,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",pe,ge),"g"),PCT_ENCODED:new RegExp(L,"g"),IPV4ADDRESS:new RegExp("^("+De+")$"),IPV6ADDRESS:new RegExp("^\\[?("+En+")"+o(o("\\%25|\\%(?!"+R+"{2})")+"("+sr+")")+"?\\]?$")}}var u=d(!1),h=d(!0),f=function(){function $(_,O){var R=[],L=!0,ee=!1,Q=void 0;try{for(var ge=_[Symbol.iterator](),Fe;!(L=(Fe=ge.next()).done)&&(R.push(Fe.value),!(O&&R.length===O));L=!0);}catch(Ce){ee=!0,Q=Ce}finally{try{!L&&ge.return&&ge.return()}finally{if(ee)throw Q}}return R}return function(_,O){if(Array.isArray(_))return _;if(Symbol.iterator in Object(_))return $(_,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function($){if(Array.isArray($)){for(var _=0,O=Array($.length);_<$.length;_++)O[_]=$[_];return O}else return Array.from($)},y=2147483647,g=36,m=1,v=26,b=38,w=700,S=72,x=128,k="-",C=/^xn--/,N=/[^\0-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=g-m,I=Math.floor,X=String.fromCharCode;function W($){throw new RangeError(M[$])}function te($,_){for(var O=[],R=$.length;R--;)O[R]=_($[R]);return O}function me($,_){var O=$.split("@"),R="";O.length>1&&(R=O[0]+"@",$=O[1]),$=$.replace(P,".");var L=$.split("."),ee=te(L,_).join(".");return R+ee}function ke($){for(var _=[],O=0,R=$.length;O<R;){var L=$.charCodeAt(O++);if(L>=55296&&L<=56319&&O<R){var ee=$.charCodeAt(O++);(ee&64512)==56320?_.push(((L&1023)<<10)+(ee&1023)+65536):(_.push(L),O--)}else _.push(L)}return _}var Se=function($){return String.fromCodePoint.apply(String,p($))},se=function($){return $-48<10?$-22:$-65<26?$-65:$-97<26?$-97:g},q=function($,_){return $+22+75*($<26)-((_!=0)<<5)},T=function($,_,O){var R=0;for($=O?I($/w):$>>1,$+=I($/_);$>j*v>>1;R+=g)$=I($/j);return I(R+(j+1)*$/($+b))},V=function($){var _=[],O=$.length,R=0,L=x,ee=S,Q=$.lastIndexOf(k);Q<0&&(Q=0);for(var ge=0;ge<Q;++ge)$.charCodeAt(ge)>=128&&W("not-basic"),_.push($.charCodeAt(ge));for(var Fe=Q>0?Q+1:0;Fe<O;){for(var Ce=R,pe=1,_e=g;;_e+=g){Fe>=O&&W("invalid-input");var De=se($.charCodeAt(Fe++));(De>=g||De>I((y-R)/pe))&&W("overflow"),R+=De*pe;var ae=_e<=ee?m:_e>=ee+v?v:_e-ee;if(De<ae)break;var qe=g-ae;pe>I(y/qe)&&W("overflow"),pe*=qe}var Ee=_.length+1;ee=T(R-Ce,Ee,Ce==0),I(R/Ee)>y-L&&W("overflow"),L+=I(R/Ee),R%=Ee,_.splice(R++,0,L)}return String.fromCodePoint.apply(String,_)},D=function($){var _=[];$=ke($);var O=$.length,R=x,L=0,ee=S,Q=!0,ge=!1,Fe=void 0;try{for(var Ce=$[Symbol.iterator](),pe;!(Q=(pe=Ce.next()).done);Q=!0){var _e=pe.value;_e<128&&_.push(X(_e))}}catch(Ts){ge=!0,Fe=Ts}finally{try{!Q&&Ce.return&&Ce.return()}finally{if(ge)throw Fe}}var De=_.length,ae=De;for(De&&_.push(k);ae<O;){var qe=y,Ee=!0,At=!1,go=void 0;try{for(var Ft=$[Symbol.iterator](),xr;!(Ee=(xr=Ft.next()).done);Ee=!0){var xn=xr.value;xn>=R&&xn<qe&&(qe=xn)}}catch(Ts){At=!0,go=Ts}finally{try{!Ee&&Ft.return&&Ft.return()}finally{if(At)throw go}}var Cn=ae+1;qe-R>I((y-L)/Cn)&&W("overflow"),L+=(qe-R)*Cn,R=qe;var Ot=!0,Cr=!1,En=void 0;try{for(var sr=$[Symbol.iterator](),oa;!(Ot=(oa=sr.next()).done);Ot=!0){var dp=oa.value;if(dp<R&&++L>y&&W("overflow"),dp==R){for(var sa=L,ia=g;;ia+=g){var aa=ia<=ee?m:ia>=ee+v?v:ia-ee;if(sa<aa)break;var up=sa-aa,hp=g-aa;_.push(X(q(aa+up%hp,0))),sa=I(up/hp)}_.push(X(q(sa,0))),ee=T(L,Cn,ae==De),L=0,++ae}}}catch(Ts){Cr=!0,En=Ts}finally{try{!Ot&&sr.return&&sr.return()}finally{if(Cr)throw En}}++L,++R}return _.join("")},E=function($){return me($,function(_){return C.test(_)?V(_.slice(4).toLowerCase()):_})},A=function($){return me($,function(_){return N.test(_)?"xn--"+D(_):_})},B={version:"2.1.0",ucs2:{decode:ke,encode:Se},decode:V,encode:D,toASCII:A,toUnicode:E},z={};function H($){var _=$.charCodeAt(0),O=void 0;return _<16?O="%0"+_.toString(16).toUpperCase():_<128?O="%"+_.toString(16).toUpperCase():_<2048?O="%"+(_>>6|192).toString(16).toUpperCase()+"%"+(_&63|128).toString(16).toUpperCase():O="%"+(_>>12|224).toString(16).toUpperCase()+"%"+(_>>6&63|128).toString(16).toUpperCase()+"%"+(_&63|128).toString(16).toUpperCase(),O}function ie($){for(var _="",O=0,R=$.length;O<R;){var L=parseInt($.substr(O+1,2),16);if(L<128)_+=String.fromCharCode(L),O+=3;else if(L>=194&&L<224){if(R-O>=6){var ee=parseInt($.substr(O+4,2),16);_+=String.fromCharCode((L&31)<<6|ee&63)}else _+=$.substr(O,6);O+=6}else if(L>=224){if(R-O>=9){var Q=parseInt($.substr(O+4,2),16),ge=parseInt($.substr(O+7,2),16);_+=String.fromCharCode((L&15)<<12|(Q&63)<<6|ge&63)}else _+=$.substr(O,9);O+=9}else _+=$.substr(O,3),O+=3}return _}function oe($,_){function O(R){var L=ie(R);return L.match(_.UNRESERVED)?L:R}return $.scheme&&($.scheme=String($.scheme).replace(_.PCT_ENCODED,O).toLowerCase().replace(_.NOT_SCHEME,"")),$.userinfo!==void 0&&($.userinfo=String($.userinfo).replace(_.PCT_ENCODED,O).replace(_.NOT_USERINFO,H).replace(_.PCT_ENCODED,a)),$.host!==void 0&&($.host=String($.host).replace(_.PCT_ENCODED,O).toLowerCase().replace(_.NOT_HOST,H).replace(_.PCT_ENCODED,a)),$.path!==void 0&&($.path=String($.path).replace(_.PCT_ENCODED,O).replace($.scheme?_.NOT_PATH:_.NOT_PATH_NOSCHEME,H).replace(_.PCT_ENCODED,a)),$.query!==void 0&&($.query=String($.query).replace(_.PCT_ENCODED,O).replace(_.NOT_QUERY,H).replace(_.PCT_ENCODED,a)),$.fragment!==void 0&&($.fragment=String($.fragment).replace(_.PCT_ENCODED,O).replace(_.NOT_FRAGMENT,H).replace(_.PCT_ENCODED,a)),$}function ye($){return $.replace(/^0*(.*)/,"$1")||"0"}function rr($,_){var O=$.match(_.IPV4ADDRESS)||[],R=f(O,2),L=R[1];return L?L.split(".").map(ye).join("."):$}function co($,_){var O=$.match(_.IPV6ADDRESS)||[],R=f(O,3),L=R[1],ee=R[2];if(L){for(var Q=L.toLowerCase().split("::").reverse(),ge=f(Q,2),Fe=ge[0],Ce=ge[1],pe=Ce?Ce.split(":").map(ye):[],_e=Fe.split(":").map(ye),De=_.IPV4ADDRESS.test(_e[_e.length-1]),ae=De?7:8,qe=_e.length-ae,Ee=Array(ae),At=0;At<ae;++At)Ee[At]=pe[At]||_e[qe+At]||"";De&&(Ee[ae-1]=rr(Ee[ae-1],_));var go=Ee.reduce(function(Ot,Cr,En){if(!Cr||Cr==="0"){var sr=Ot[Ot.length-1];sr&&sr.index+sr.length===En?sr.length++:Ot.push({index:En,length:1})}return Ot},[]),Ft=go.sort(function(Ot,Cr){return Cr.length-Ot.length})[0],xr=void 0;if(Ft&&Ft.length>1){var xn=Ee.slice(0,Ft.index),Cn=Ee.slice(Ft.index+Ft.length);xr=xn.join(":")+"::"+Cn.join(":")}else xr=Ee.join(":");return ee&&(xr+="%"+ee),xr}else return $}var Cs=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Es="".match(/(){0}/)[1]===void 0;function kt($){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O={},R=_.iri!==!1?h:u;_.reference==="suffix"&&($=(_.scheme?_.scheme+":":"")+"//"+$);var L=$.match(Cs);if(L){Es?(O.scheme=L[1],O.userinfo=L[3],O.host=L[4],O.port=parseInt(L[5],10),O.path=L[6]||"",O.query=L[7],O.fragment=L[8],isNaN(O.port)&&(O.port=L[5])):(O.scheme=L[1]||void 0,O.userinfo=$.indexOf("@")!==-1?L[3]:void 0,O.host=$.indexOf("//")!==-1?L[4]:void 0,O.port=parseInt(L[5],10),O.path=L[6]||"",O.query=$.indexOf("?")!==-1?L[7]:void 0,O.fragment=$.indexOf("#")!==-1?L[8]:void 0,isNaN(O.port)&&(O.port=$.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?L[4]:void 0)),O.host&&(O.host=co(rr(O.host,R),R)),O.scheme===void 0&&O.userinfo===void 0&&O.host===void 0&&O.port===void 0&&!O.path&&O.query===void 0?O.reference="same-document":O.scheme===void 0?O.reference="relative":O.fragment===void 0?O.reference="absolute":O.reference="uri",_.reference&&_.reference!=="suffix"&&_.reference!==O.reference&&(O.error=O.error||"URI is not a "+_.reference+" reference.");var ee=z[(_.scheme||O.scheme||"").toLowerCase()];if(!_.unicodeSupport&&(!ee||!ee.unicodeSupport)){if(O.host&&(_.domainHost||ee&&ee.domainHost))try{O.host=B.toASCII(O.host.replace(R.PCT_ENCODED,ie).toLowerCase())}catch(Q){O.error=O.error||"Host's domain name can not be converted to ASCII via punycode: "+Q}oe(O,u)}else oe(O,R);ee&&ee.parse&&ee.parse(O,_)}else O.error=O.error||"URI can not be parsed.";return O}function $s($,_){var O=_.iri!==!1?h:u,R=[];return $.userinfo!==void 0&&(R.push($.userinfo),R.push("@")),$.host!==void 0&&R.push(co(rr(String($.host),O),O).replace(O.IPV6ADDRESS,function(L,ee,Q){return"["+ee+(Q?"%25"+Q:"")+"]"})),(typeof $.port=="number"||typeof $.port=="string")&&(R.push(":"),R.push(String($.port))),R.length?R.join(""):void 0}var uo=/^\.\.?\//,ho=/^\/\.(\/|$)/,fo=/^\/\.\.(\/|$)/,_s=/^\/?(?:.|\n)*?(?=\/|$)/;function nr($){for(var _=[];$.length;)if($.match(uo))$=$.replace(uo,"");else if($.match(ho))$=$.replace(ho,"/");else if($.match(fo))$=$.replace(fo,"/"),_.pop();else if($==="."||$==="..")$="";else{var O=$.match(_s);if(O){var R=O[0];$=$.slice(R.length),_.push(R)}else throw new Error("Unexpected dot segment condition")}return _.join("")}function gt($){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=_.iri?h:u,R=[],L=z[(_.scheme||$.scheme||"").toLowerCase()];if(L&&L.serialize&&L.serialize($,_),$.host&&!O.IPV6ADDRESS.test($.host)&&(_.domainHost||L&&L.domainHost))try{$.host=_.iri?B.toUnicode($.host):B.toASCII($.host.replace(O.PCT_ENCODED,ie).toLowerCase())}catch(ge){$.error=$.error||"Host's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+ge}oe($,O),_.reference!=="suffix"&&$.scheme&&(R.push($.scheme),R.push(":"));var ee=$s($,_);if(ee!==void 0&&(_.reference!=="suffix"&&R.push("//"),R.push(ee),$.path&&$.path.charAt(0)!=="/"&&R.push("/")),$.path!==void 0){var Q=$.path;!_.absolutePath&&(!L||!L.absolutePath)&&(Q=nr(Q)),ee===void 0&&(Q=Q.replace(/^\/\//,"/%2F")),R.push(Q)}return $.query!==void 0&&(R.push("?"),R.push($.query)),$.fragment!==void 0&&(R.push("#"),R.push($.fragment)),R.join("")}function po($,_){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=arguments[3],L={};return R||($=kt(gt($,O),O),_=kt(gt(_,O),O)),O=O||{},!O.tolerant&&_.scheme?(L.scheme=_.scheme,L.userinfo=_.userinfo,L.host=_.host,L.port=_.port,L.path=nr(_.path||""),L.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(L.userinfo=_.userinfo,L.host=_.host,L.port=_.port,L.path=nr(_.path||""),L.query=_.query):(_.path?(_.path.charAt(0)==="/"?L.path=nr(_.path):(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path?L.path="/"+_.path:$.path?L.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+_.path:L.path=_.path,L.path=nr(L.path)),L.query=_.query):(L.path=$.path,_.query!==void 0?L.query=_.query:L.query=$.query),L.userinfo=$.userinfo,L.host=$.host,L.port=$.port),L.scheme=$.scheme),L.fragment=_.fragment,L}function Ns($,_,O){var R=c({scheme:"null"},O);return gt(po(kt($,R),kt(_,R),R,!0),R)}function kn($,_){return typeof $=="string"?$=gt(kt($,_),_):s($)==="object"&&($=kt(gt($,_),_)),$}function As($,_,O){return typeof $=="string"?$=gt(kt($,O),O):s($)==="object"&&($=gt($,O)),typeof _=="string"?_=gt(kt(_,O),O):s(_)==="object"&&(_=gt(_,O)),$===_}function na($,_){return $&&$.toString().replace(!_||!_.iri?u.ESCAPE:h.ESCAPE,H)}function Nt($,_){return $&&$.toString().replace(!_||!_.iri?u.PCT_ENCODED:h.PCT_ENCODED,ie)}var Sn={scheme:"http",domainHost:!0,parse:function($,_){return $.host||($.error=$.error||"HTTP URIs must have a host."),$},serialize:function($,_){var O=String($.scheme).toLowerCase()==="https";return($.port===(O?443:80)||$.port==="")&&($.port=void 0),$.path||($.path="/"),$}},rp={scheme:"https",domainHost:Sn.domainHost,parse:Sn.parse,serialize:Sn.serialize};function np($){return typeof $.secure=="boolean"?$.secure:String($.scheme).toLowerCase()==="wss"}var Os={scheme:"ws",domainHost:!0,parse:function($,_){var O=$;return O.secure=np(O),O.resourceName=(O.path||"/")+(O.query?"?"+O.query:""),O.path=void 0,O.query=void 0,O},serialize:function($,_){if(($.port===(np($)?443:80)||$.port==="")&&($.port=void 0),typeof $.secure=="boolean"&&($.scheme=$.secure?"wss":"ws",$.secure=void 0),$.resourceName){var O=$.resourceName.split("?"),R=f(O,2),L=R[0],ee=R[1];$.path=L&&L!=="/"?L:void 0,$.query=ee,$.resourceName=void 0}return $.fragment=void 0,$}},op={scheme:"wss",domainHost:Os.domainHost,parse:Os.parse,serialize:Os.serialize},Sw={},sp="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",or="[0-9A-Fa-f]",xw=o(o("%[EFef]"+or+"%"+or+or+"%"+or+or)+"|"+o("%[89A-Fa-f]"+or+"%"+or+or)+"|"+o("%"+or+or)),Cw="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Ew="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",$w=n(Ew,'[\\"\\\\]'),_w="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Nw=new RegExp(sp,"g"),mo=new RegExp(xw,"g"),Aw=new RegExp(n("[^]",Cw,"[\\.]",'[\\"]',$w),"g"),ip=new RegExp(n("[^]",sp,_w),"g"),Ow=ip;function Lc($){var _=ie($);return _.match(Nw)?_:$}var ap={scheme:"mailto",parse:function($,_){var O=$,R=O.to=O.path?O.path.split(","):[];if(O.path=void 0,O.query){for(var L=!1,ee={},Q=O.query.split("&"),ge=0,Fe=Q.length;ge<Fe;++ge){var Ce=Q[ge].split("=");switch(Ce[0]){case"to":for(var pe=Ce[1].split(","),_e=0,De=pe.length;_e<De;++_e)R.push(pe[_e]);break;case"subject":O.subject=Nt(Ce[1],_);break;case"body":O.body=Nt(Ce[1],_);break;default:L=!0,ee[Nt(Ce[0],_)]=Nt(Ce[1],_);break}}L&&(O.headers=ee)}O.query=void 0;for(var ae=0,qe=R.length;ae<qe;++ae){var Ee=R[ae].split("@");if(Ee[0]=Nt(Ee[0]),_.unicodeSupport)Ee[1]=Nt(Ee[1],_).toLowerCase();else try{Ee[1]=B.toASCII(Nt(Ee[1],_).toLowerCase())}catch(At){O.error=O.error||"Email address's domain name can not be converted to ASCII via punycode: "+At}R[ae]=Ee.join("@")}return O},serialize:function($,_){var O=$,R=l($.to);if(R){for(var L=0,ee=R.length;L<ee;++L){var Q=String(R[L]),ge=Q.lastIndexOf("@"),Fe=Q.slice(0,ge).replace(mo,Lc).replace(mo,a).replace(Aw,H),Ce=Q.slice(ge+1);try{Ce=_.iri?B.toUnicode(Ce):B.toASCII(Nt(Ce,_).toLowerCase())}catch(ae){O.error=O.error||"Email address's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+ae}R[L]=Fe+"@"+Ce}O.path=R.join(",")}var pe=$.headers=$.headers||{};$.subject&&(pe.subject=$.subject),$.body&&(pe.body=$.body);var _e=[];for(var De in pe)pe[De]!==Sw[De]&&_e.push(De.replace(mo,Lc).replace(mo,a).replace(ip,H)+"="+pe[De].replace(mo,Lc).replace(mo,a).replace(Ow,H));return _e.length&&(O.query=_e.join("&")),O}},Tw=/^([^\:]+)\:(.*)/,lp={scheme:"urn",parse:function($,_){var O=$.path&&$.path.match(Tw),R=$;if(O){var L=_.scheme||R.scheme||"urn",ee=O[1].toLowerCase(),Q=O[2],ge=L+":"+(_.nid||ee),Fe=z[ge];R.nid=ee,R.nss=Q,R.path=void 0,Fe&&(R=Fe.parse(R,_))}else R.error=R.error||"URN can not be parsed.";return R},serialize:function($,_){var O=_.scheme||$.scheme||"urn",R=$.nid,L=O+":"+(_.nid||R),ee=z[L];ee&&($=ee.serialize($,_));var Q=$,ge=$.nss;return Q.path=(R||_.nid)+":"+ge,Q}},Bw=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,cp={scheme:"urn:uuid",parse:function($,_){var O=$;return O.uuid=O.nss,O.nss=void 0,!_.tolerant&&(!O.uuid||!O.uuid.match(Bw))&&(O.error=O.error||"UUID is not valid."),O},serialize:function($,_){var O=$;return O.nss=($.uuid||"").toLowerCase(),O}};z[Sn.scheme]=Sn,z[rp.scheme]=rp,z[Os.scheme]=Os,z[op.scheme]=op,z[ap.scheme]=ap,z[lp.scheme]=lp,z[cp.scheme]=cp,t.SCHEMES=z,t.pctEncChar=H,t.pctDecChars=ie,t.parse=kt,t.removeDotSegments=nr,t.serialize=gt,t.resolveComponents=po,t.resolve=Ns,t.normalize=kn,t.equal=As,t.escapeComponent=na,t.unescapeComponent=Nt,Object.defineProperty(t,"__esModule",{value:!0})})})(Eu,Eu.exports);var aO=Eu.exports;Object.defineProperty(Fh,"__esModule",{value:!0});const kb=aO;kb.code='require("ajv/dist/runtime/uri").default';Fh.default=kb;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var e=Dt;Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var t=ne;Object.defineProperty(r,"_",{enumerable:!0,get:function(){return t._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return t.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return t.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return t.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return t.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return t.CodeGen}});const n=is,o=as,s=Zn,a=ft,l=ne,c=tt,d=qi,u=he,h=iO,f=Fh,p=(q,T)=>new RegExp(q,T);p.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function w(q){var T,V,D,E,A,B,z,H,ie,oe,ye,rr,co,Cs,Es,kt,$s,uo,ho,fo,_s,nr,gt,po,Ns;const kn=q.strict,As=(T=q.code)===null||T===void 0?void 0:T.optimize,na=As===!0||As===void 0?1:As||0,Nt=(D=(V=q.code)===null||V===void 0?void 0:V.regExp)!==null&&D!==void 0?D:p,Sn=(E=q.uriResolver)!==null&&E!==void 0?E:f.default;return{strictSchema:(B=(A=q.strictSchema)!==null&&A!==void 0?A:kn)!==null&&B!==void 0?B:!0,strictNumbers:(H=(z=q.strictNumbers)!==null&&z!==void 0?z:kn)!==null&&H!==void 0?H:!0,strictTypes:(oe=(ie=q.strictTypes)!==null&&ie!==void 0?ie:kn)!==null&&oe!==void 0?oe:"log",strictTuples:(rr=(ye=q.strictTuples)!==null&&ye!==void 0?ye:kn)!==null&&rr!==void 0?rr:"log",strictRequired:(Cs=(co=q.strictRequired)!==null&&co!==void 0?co:kn)!==null&&Cs!==void 0?Cs:!1,code:q.code?{...q.code,optimize:na,regExp:Nt}:{optimize:na,regExp:Nt},loopRequired:(Es=q.loopRequired)!==null&&Es!==void 0?Es:b,loopEnum:(kt=q.loopEnum)!==null&&kt!==void 0?kt:b,meta:($s=q.meta)!==null&&$s!==void 0?$s:!0,messages:(uo=q.messages)!==null&&uo!==void 0?uo:!0,inlineRefs:(ho=q.inlineRefs)!==null&&ho!==void 0?ho:!0,schemaId:(fo=q.schemaId)!==null&&fo!==void 0?fo:"$id",addUsedSchema:(_s=q.addUsedSchema)!==null&&_s!==void 0?_s:!0,validateSchema:(nr=q.validateSchema)!==null&&nr!==void 0?nr:!0,validateFormats:(gt=q.validateFormats)!==null&&gt!==void 0?gt:!0,unicodeRegExp:(po=q.unicodeRegExp)!==null&&po!==void 0?po:!0,int32range:(Ns=q.int32range)!==null&&Ns!==void 0?Ns:!0,uriResolver:Sn}}class S{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...w(T)};const{es5:V,lines:D}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:g,es5:V,lines:D}),this.logger=I(T.logger);const E=T.validateFormats;T.validateFormats=!1,this.RULES=(0,s.getRules)(),x.call(this,m,T,"NOT SUPPORTED"),x.call(this,v,T,"DEPRECATED","warn"),this._metaOpts=M.call(this),T.formats&&N.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&P.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),C.call(this),T.validateFormats=E}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:V,schemaId:D}=this.opts;let E=h;D==="id"&&(E={...h},E.id=E.$id,delete E.$id),V&&T&&this.addMetaSchema(E,E[D],!1)}defaultMeta(){const{meta:T,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[V]||T:void 0}validate(T,V){let D;if(typeof T=="string"){if(D=this.getSchema(T),!D)throw new Error(`no schema with key or ref "${T}"`)}else D=this.compile(T);const E=D(V);return"$async"in D||(this.errors=D.errors),E}compile(T,V){const D=this._addSchema(T,V);return D.validate||this._compileSchemaEnv(D)}compileAsync(T,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:D}=this.opts;return E.call(this,T,V);async function E(oe,ye){await A.call(this,oe.$schema);const rr=this._addSchema(oe,ye);return rr.validate||B.call(this,rr)}async function A(oe){oe&&!this.getSchema(oe)&&await E.call(this,{$ref:oe},!0)}async function B(oe){try{return this._compileSchemaEnv(oe)}catch(ye){if(!(ye instanceof o.default))throw ye;return z.call(this,ye),await H.call(this,ye.missingSchema),B.call(this,oe)}}function z({missingSchema:oe,missingRef:ye}){if(this.refs[oe])throw new Error(`AnySchema ${oe} is loaded but ${ye} cannot be resolved`)}async function H(oe){const ye=await ie.call(this,oe);this.refs[oe]||await A.call(this,ye.$schema),this.refs[oe]||this.addSchema(ye,oe,V)}async function ie(oe){const ye=this._loading[oe];if(ye)return ye;try{return await(this._loading[oe]=D(oe))}finally{delete this._loading[oe]}}}addSchema(T,V,D,E=this.opts.validateSchema){if(Array.isArray(T)){for(const B of T)this.addSchema(B,void 0,D,E);return this}let A;if(typeof T=="object"){const{schemaId:B}=this.opts;if(A=T[B],A!==void 0&&typeof A!="string")throw new Error(`schema ${B} must be string`)}return V=(0,c.normalizeId)(V||A),this._checkUnique(V),this.schemas[V]=this._addSchema(T,D,V,E,!0),this}addMetaSchema(T,V,D=this.opts.validateSchema){return this.addSchema(T,V,!0,D),this}validateSchema(T,V){if(typeof T=="boolean")return!0;let D;if(D=T.$schema,D!==void 0&&typeof D!="string")throw new Error("$schema must be a string");if(D=D||this.opts.defaultMeta||this.defaultMeta(),!D)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const E=this.validate(D,T);if(!E&&V){const A="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(A);else throw new Error(A)}return E}getSchema(T){let V;for(;typeof(V=k.call(this,T))=="string";)T=V;if(V===void 0){const{schemaId:D}=this.opts,E=new a.SchemaEnv({schema:{},schemaId:D});if(V=a.resolveSchema.call(this,E,T),!V)return;this.refs[T]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const V=k.call(this,T);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const V=T;this._cache.delete(V);let D=T[this.opts.schemaId];return D&&(D=(0,c.normalizeId)(D),delete this.schemas[D],delete this.refs[D]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const V of T)this.addKeyword(V);return this}addKeyword(T,V){let D;if(typeof T=="string")D=T,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=D);else if(typeof T=="object"&&V===void 0){if(V=T,D=V.keyword,Array.isArray(D)&&!D.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,D,V),!V)return(0,u.eachItem)(D,A=>te.call(this,A)),this;ke.call(this,V);const E={...V,type:(0,d.getJSONTypes)(V.type),schemaType:(0,d.getJSONTypes)(V.schemaType)};return(0,u.eachItem)(D,E.type.length===0?A=>te.call(this,A,E):A=>E.type.forEach(B=>te.call(this,A,E,B))),this}getKeyword(T){const V=this.RULES.all[T];return typeof V=="object"?V.definition:!!V}removeKeyword(T){const{RULES:V}=this;delete V.keywords[T],delete V.all[T];for(const D of V.rules){const E=D.rules.findIndex(A=>A.keyword===T);E>=0&&D.rules.splice(E,1)}return this}addFormat(T,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[T]=V,this}errorsText(T=this.errors,{separator:V=", ",dataVar:D="data"}={}){return!T||T.length===0?"No errors":T.map(E=>`${D}${E.instancePath} ${E.message}`).reduce((E,A)=>E+V+A)}$dataMetaSchema(T,V){const D=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const E of V){const A=E.split("/").slice(1);let B=T;for(const z of A)B=B[z];for(const z in D){const H=D[z];if(typeof H!="object")continue;const{$data:ie}=H.definition,oe=B[z];ie&&oe&&(B[z]=se(oe))}}return T}_removeAllSchemas(T,V){for(const D in T){const E=T[D];(!V||V.test(D))&&(typeof E=="string"?delete T[D]:E&&!E.meta&&(this._cache.delete(E.schema),delete T[D]))}}_addSchema(T,V,D,E=this.opts.validateSchema,A=this.opts.addUsedSchema){let B;const{schemaId:z}=this.opts;if(typeof T=="object")B=T[z];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let H=this._cache.get(T);if(H!==void 0)return H;D=(0,c.normalizeId)(B||D);const ie=c.getSchemaRefs.call(this,T,D);return H=new a.SchemaEnv({schema:T,schemaId:z,meta:V,baseId:D,localRefs:ie}),this._cache.set(H.schema,H),A&&!D.startsWith("#")&&(D&&this._checkUnique(D),this.refs[D]=H),E&&this.validateSchema(T,!0),H}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):a.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const V=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,T)}finally{this.opts=V}}}r.default=S,S.ValidationError=n.default,S.MissingRefError=o.default;function x(q,T,V,D="error"){for(const E in q){const A=E;A in T&&this.logger[D](`${V}: option ${E}. ${q[A]}`)}}function k(q){return q=(0,c.normalizeId)(q),this.schemas[q]||this.refs[q]}function C(){const q=this.opts.schemas;if(q)if(Array.isArray(q))this.addSchema(q);else for(const T in q)this.addSchema(q[T],T)}function N(){for(const q in this.opts.formats){const T=this.opts.formats[q];T&&this.addFormat(q,T)}}function P(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in q){const V=q[T];V.keyword||(V.keyword=T),this.addKeyword(V)}}function M(){const q={...this.opts};for(const T of y)delete q[T];return q}const j={log(){},warn(){},error(){}};function I(q){if(q===!1)return j;if(q===void 0)return console;if(q.log&&q.warn&&q.error)return q;throw new Error("logger must implement log, warn and error methods")}const X=/^[a-z_$][a-z0-9_$:-]*$/i;function W(q,T){const{RULES:V}=this;if((0,u.eachItem)(q,D=>{if(V.keywords[D])throw new Error(`Keyword ${D} is already defined`);if(!X.test(D))throw new Error(`Keyword ${D} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function te(q,T,V){var D;const E=T==null?void 0:T.post;if(V&&E)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:A}=this;let B=E?A.post:A.rules.find(({type:H})=>H===V);if(B||(B={type:V,rules:[]},A.rules.push(B)),A.keywords[q]=!0,!T)return;const z={keyword:q,definition:{...T,type:(0,d.getJSONTypes)(T.type),schemaType:(0,d.getJSONTypes)(T.schemaType)}};T.before?me.call(this,B,z,T.before):B.rules.push(z),A.all[q]=z,(D=T.implements)===null||D===void 0||D.forEach(H=>this.addKeyword(H))}function me(q,T,V){const D=q.rules.findIndex(E=>E.keyword===V);D>=0?q.rules.splice(D,0,T):(q.rules.push(T),this.logger.warn(`rule ${V} is not defined`))}function ke(q){let{metaSchema:T}=q;T!==void 0&&(q.$data&&this.opts.$data&&(T=se(T)),q.validateSchema=this.compile(T,!0))}const Se={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(q){return{anyOf:[q,Se]}}})(Kn);var qh={},ac={},zh={};Object.defineProperty(zh,"__esModule",{value:!0});const lO={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};zh.default=lO;var br={};Object.defineProperty(br,"__esModule",{value:!0});br.callRef=br.getValidate=void 0;const cO=as,lg=de,yt=ne,bo=_t,cg=ft,Oa=he,dO={keyword:"$ref",schemaType:"string",code(r){const{gen:e,schema:t,it:n}=r,{baseId:o,schemaEnv:s,validateName:a,opts:l,self:c}=n,{root:d}=s;if((t==="#"||t==="#/")&&o===d.baseId)return h();const u=cg.resolveRef.call(c,d,o,t);if(u===void 0)throw new cO.default(n.opts.uriResolver,o,t);if(u instanceof cg.SchemaEnv)return f(u);return p(u);function h(){if(s===d)return tl(r,a,s,s.$async);const y=e.scopeValue("root",{ref:d});return tl(r,(0,yt._)`${y}.validate`,d,d.$async)}function f(y){const g=Sb(r,y);tl(r,g,y,y.$async)}function p(y){const g=e.scopeValue("schema",l.code.source===!0?{ref:y,code:(0,yt.stringify)(y)}:{ref:y}),m=e.name("valid"),v=r.subschema({schema:y,dataTypes:[],schemaPath:yt.nil,topSchemaRef:g,errSchemaPath:t},m);r.mergeEvaluated(v),r.ok(m)}}};function Sb(r,e){const{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,yt._)`${t.scopeValue("wrapper",{ref:e})}.validate`}br.getValidate=Sb;function tl(r,e,t,n){const{gen:o,it:s}=r,{allErrors:a,schemaEnv:l,opts:c}=s,d=c.passContext?bo.default.this:yt.nil;n?u():h();function u(){if(!l.$async)throw new Error("async schema referenced by sync schema");const y=o.let("valid");o.try(()=>{o.code((0,yt._)`await ${(0,lg.callValidateCode)(r,e,d)}`),p(e),a||o.assign(y,!0)},g=>{o.if((0,yt._)`!(${g} instanceof ${s.ValidationError})`,()=>o.throw(g)),f(g),a||o.assign(y,!1)}),r.ok(y)}function h(){r.result((0,lg.callValidateCode)(r,e,d),()=>p(e),()=>f(e))}function f(y){const g=(0,yt._)`${y}.errors`;o.assign(bo.default.vErrors,(0,yt._)`${bo.default.vErrors} === null ? ${g} : ${bo.default.vErrors}.concat(${g})`),o.assign(bo.default.errors,(0,yt._)`${bo.default.vErrors}.length`)}function p(y){var g;if(!s.opts.unevaluated)return;const m=(g=t==null?void 0:t.validate)===null||g===void 0?void 0:g.evaluated;if(s.props!==!0)if(m&&!m.dynamicProps)m.props!==void 0&&(s.props=Oa.mergeEvaluated.props(o,m.props,s.props));else{const v=o.var("props",(0,yt._)`${y}.evaluated.props`);s.props=Oa.mergeEvaluated.props(o,v,s.props,yt.Name)}if(s.items!==!0)if(m&&!m.dynamicItems)m.items!==void 0&&(s.items=Oa.mergeEvaluated.items(o,m.items,s.items));else{const v=o.var("items",(0,yt._)`${y}.evaluated.items`);s.items=Oa.mergeEvaluated.items(o,v,s.items,yt.Name)}}}br.callRef=tl;br.default=dO;Object.defineProperty(ac,"__esModule",{value:!0});const uO=zh,hO=br,fO=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",uO.default,hO.default];ac.default=fO;var lc={},Hh={};Object.defineProperty(Hh,"__esModule",{value:!0});const Nl=ne,Wr=Nl.operators,Al={maximum:{okStr:"<=",ok:Wr.LTE,fail:Wr.GT},minimum:{okStr:">=",ok:Wr.GTE,fail:Wr.LT},exclusiveMaximum:{okStr:"<",ok:Wr.LT,fail:Wr.GTE},exclusiveMinimum:{okStr:">",ok:Wr.GT,fail:Wr.LTE}},pO={message:({keyword:r,schemaCode:e})=>(0,Nl.str)`must be ${Al[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Nl._)`{comparison: ${Al[r].okStr}, limit: ${e}}`},mO={keyword:Object.keys(Al),type:"number",schemaType:"number",$data:!0,error:pO,code(r){const{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,Nl._)`${t} ${Al[e].fail} ${n} || isNaN(${t})`)}};Hh.default=mO;var cc={};Object.defineProperty(cc,"__esModule",{value:!0});const ii=ne,gO={message:({schemaCode:r})=>(0,ii.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,ii._)`{multipleOf: ${r}}`},yO={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:gO,code(r){const{gen:e,data:t,schemaCode:n,it:o}=r,s=o.opts.multipleOfPrecision,a=e.let("res"),l=s?(0,ii._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,ii._)`${a} !== parseInt(${a})`;r.fail$data((0,ii._)`(${n} === 0 || (${a} = ${t}/${n}, ${l}))`)}};cc.default=yO;var dc={},Uh={};Object.defineProperty(Uh,"__esModule",{value:!0});function xb(r){const e=r.length;let t=0,n=0,o;for(;n<e;)t++,o=r.charCodeAt(n++),o>=55296&&o<=56319&&n<e&&(o=r.charCodeAt(n),(o&64512)===56320&&n++);return t}Uh.default=xb;xb.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(dc,"__esModule",{value:!0});const Tn=ne,vO=he,bO=Uh,wO={message({keyword:r,schemaCode:e}){const t=r==="maxLength"?"more":"fewer";return(0,Tn.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Tn._)`{limit: ${r}}`},kO={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:wO,code(r){const{keyword:e,data:t,schemaCode:n,it:o}=r,s=e==="maxLength"?Tn.operators.GT:Tn.operators.LT,a=o.opts.unicode===!1?(0,Tn._)`${t}.length`:(0,Tn._)`${(0,vO.useFunc)(r.gen,bO.default)}(${t})`;r.fail$data((0,Tn._)`${a} ${s} ${n}`)}};dc.default=kO;var uc={};Object.defineProperty(uc,"__esModule",{value:!0});const SO=de,Ol=ne,xO={message:({schemaCode:r})=>(0,Ol.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,Ol._)`{pattern: ${r}}`},CO={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:xO,code(r){const{data:e,$data:t,schema:n,schemaCode:o,it:s}=r,a=s.opts.unicodeRegExp?"u":"",l=t?(0,Ol._)`(new RegExp(${o}, ${a}))`:(0,SO.usePattern)(r,n);r.fail$data((0,Ol._)`!${l}.test(${e})`)}};uc.default=CO;var hc={};Object.defineProperty(hc,"__esModule",{value:!0});const ai=ne,EO={message({keyword:r,schemaCode:e}){const t=r==="maxProperties"?"more":"fewer";return(0,ai.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,ai._)`{limit: ${r}}`},$O={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:EO,code(r){const{keyword:e,data:t,schemaCode:n}=r,o=e==="maxProperties"?ai.operators.GT:ai.operators.LT;r.fail$data((0,ai._)`Object.keys(${t}).length ${o} ${n}`)}};hc.default=$O;var fc={};Object.defineProperty(fc,"__esModule",{value:!0});const qs=de,li=ne,_O=he,NO={message:({params:{missingProperty:r}})=>(0,li.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,li._)`{missingProperty: ${r}}`},AO={keyword:"required",type:"object",schemaType:"array",$data:!0,error:NO,code(r){const{gen:e,schema:t,schemaCode:n,data:o,$data:s,it:a}=r,{opts:l}=a;if(!s&&t.length===0)return;const c=t.length>=l.loopRequired;if(a.allErrors?d():u(),l.strictRequired){const p=r.parentSchema.properties,{definedProperties:y}=r.it;for(const g of t)if((p==null?void 0:p[g])===void 0&&!y.has(g)){const m=a.schemaEnv.baseId+a.errSchemaPath,v=`required property "${g}" is not defined at "${m}" (strictRequired)`;(0,_O.checkStrictMode)(a,v,a.opts.strictRequired)}}function d(){if(c||s)r.block$data(li.nil,h);else for(const p of t)(0,qs.checkReportMissingProp)(r,p)}function u(){const p=e.let("missing");if(c||s){const y=e.let("valid",!0);r.block$data(y,()=>f(p,y)),r.ok(y)}else e.if((0,qs.checkMissingProp)(r,t,p)),(0,qs.reportMissingProp)(r,p),e.else()}function h(){e.forOf("prop",n,p=>{r.setParams({missingProperty:p}),e.if((0,qs.noPropertyInData)(e,o,p,l.ownProperties),()=>r.error())})}function f(p,y){r.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(y,(0,qs.propertyInData)(e,o,p,l.ownProperties)),e.if((0,li.not)(y),()=>{r.error(),e.break()})},li.nil)}}};fc.default=AO;var pc={};Object.defineProperty(pc,"__esModule",{value:!0});const ci=ne,OO={message({keyword:r,schemaCode:e}){const t=r==="maxItems"?"more":"fewer";return(0,ci.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,ci._)`{limit: ${r}}`},TO={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:OO,code(r){const{keyword:e,data:t,schemaCode:n}=r,o=e==="maxItems"?ci.operators.GT:ci.operators.LT;r.fail$data((0,ci._)`${t}.length ${o} ${n}`)}};pc.default=TO;var mc={},zi={};Object.defineProperty(zi,"__esModule",{value:!0});const Cb=ob;Cb.code='require("ajv/dist/runtime/equal").default';zi.default=Cb;Object.defineProperty(mc,"__esModule",{value:!0});const cd=qi,Qe=ne,BO=he,PO=zi,IO={message:({params:{i:r,j:e}})=>(0,Qe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,Qe._)`{i: ${r}, j: ${e}}`},MO={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:IO,code(r){const{gen:e,data:t,$data:n,schema:o,parentSchema:s,schemaCode:a,it:l}=r;if(!n&&!o)return;const c=e.let("valid"),d=s.items?(0,cd.getSchemaTypes)(s.items):[];r.block$data(c,u,(0,Qe._)`${a} === false`),r.ok(c);function u(){const y=e.let("i",(0,Qe._)`${t}.length`),g=e.let("j");r.setParams({i:y,j:g}),e.assign(c,!0),e.if((0,Qe._)`${y} > 1`,()=>(h()?f:p)(y,g))}function h(){return d.length>0&&!d.some(y=>y==="object"||y==="array")}function f(y,g){const m=e.name("item"),v=(0,cd.checkDataTypes)(d,m,l.opts.strictNumbers,cd.DataType.Wrong),b=e.const("indices",(0,Qe._)`{}`);e.for((0,Qe._)`;${y}--;`,()=>{e.let(m,(0,Qe._)`${t}[${y}]`),e.if(v,(0,Qe._)`continue`),d.length>1&&e.if((0,Qe._)`typeof ${m} == "string"`,(0,Qe._)`${m} += "_"`),e.if((0,Qe._)`typeof ${b}[${m}] == "number"`,()=>{e.assign(g,(0,Qe._)`${b}[${m}]`),r.error(),e.assign(c,!1).break()}).code((0,Qe._)`${b}[${m}] = ${y}`)})}function p(y,g){const m=(0,BO.useFunc)(e,PO.default),v=e.name("outer");e.label(v).for((0,Qe._)`;${y}--;`,()=>e.for((0,Qe._)`${g} = ${y}; ${g}--;`,()=>e.if((0,Qe._)`${m}(${t}[${y}], ${t}[${g}])`,()=>{r.error(),e.assign(c,!1).break(v)})))}}};mc.default=MO;var gc={};Object.defineProperty(gc,"__esModule",{value:!0});const $u=ne,DO=he,VO=zi,RO={message:"must be equal to constant",params:({schemaCode:r})=>(0,$u._)`{allowedValue: ${r}}`},LO={keyword:"const",$data:!0,error:RO,code(r){const{gen:e,data:t,$data:n,schemaCode:o,schema:s}=r;n||s&&typeof s=="object"?r.fail$data((0,$u._)`!${(0,DO.useFunc)(e,VO.default)}(${t}, ${o})`):r.fail((0,$u._)`${s} !== ${t}`)}};gc.default=LO;var yc={};Object.defineProperty(yc,"__esModule",{value:!0});const Js=ne,jO=he,FO=zi,qO={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,Js._)`{allowedValues: ${r}}`},zO={keyword:"enum",schemaType:"array",$data:!0,error:qO,code(r){const{gen:e,data:t,$data:n,schema:o,schemaCode:s,it:a}=r;if(!n&&o.length===0)throw new Error("enum must have non-empty array");const l=o.length>=a.opts.loopEnum;let c;const d=()=>c??(c=(0,jO.useFunc)(e,FO.default));let u;if(l||n)u=e.let("valid"),r.block$data(u,h);else{if(!Array.isArray(o))throw new Error("ajv implementation error");const p=e.const("vSchema",s);u=(0,Js.or)(...o.map((y,g)=>f(p,g)))}r.pass(u);function h(){e.assign(u,!1),e.forOf("v",s,p=>e.if((0,Js._)`${d()}(${t}, ${p})`,()=>e.assign(u,!0).break()))}function f(p,y){const g=o[y];return typeof g=="object"&&g!==null?(0,Js._)`${d()}(${t}, ${p}[${y}])`:(0,Js._)`${t} === ${g}`}}};yc.default=zO;Object.defineProperty(lc,"__esModule",{value:!0});const HO=Hh,UO=cc,KO=dc,WO=uc,GO=hc,JO=fc,YO=pc,XO=mc,QO=gc,ZO=yc,eT=[HO.default,UO.default,KO.default,WO.default,GO.default,JO.default,YO.default,XO.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},QO.default,ZO.default];lc.default=eT;var Hi={},ls={};Object.defineProperty(ls,"__esModule",{value:!0});ls.validateAdditionalItems=void 0;const Bn=ne,_u=he,tT={message:({params:{len:r}})=>(0,Bn.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Bn._)`{limit: ${r}}`},rT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:tT,code(r){const{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,_u.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Eb(r,n)}};function Eb(r,e){const{gen:t,schema:n,data:o,keyword:s,it:a}=r;a.items=!0;const l=t.const("len",(0,Bn._)`${o}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Bn._)`${l} <= ${e.length}`);else if(typeof n=="object"&&!(0,_u.alwaysValidSchema)(a,n)){const d=t.var("valid",(0,Bn._)`${l} <= ${e.length}`);t.if((0,Bn.not)(d),()=>c(d)),r.ok(d)}function c(d){t.forRange("i",e.length,l,u=>{r.subschema({keyword:s,dataProp:u,dataPropType:_u.Type.Num},d),a.allErrors||t.if((0,Bn.not)(d),()=>t.break())})}}ls.validateAdditionalItems=Eb;ls.default=rT;var Kh={},cs={};Object.defineProperty(cs,"__esModule",{value:!0});cs.validateTuple=void 0;const dg=ne,rl=he,nT=de,oT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){const{schema:e,it:t}=r;if(Array.isArray(e))return $b(r,"additionalItems",e);t.items=!0,!(0,rl.alwaysValidSchema)(t,e)&&r.ok((0,nT.validateArray)(r))}};function $b(r,e,t=r.schema){const{gen:n,parentSchema:o,data:s,keyword:a,it:l}=r;u(o),l.opts.unevaluated&&t.length&&l.items!==!0&&(l.items=rl.mergeEvaluated.items(n,t.length,l.items));const c=n.name("valid"),d=n.const("len",(0,dg._)`${s}.length`);t.forEach((h,f)=>{(0,rl.alwaysValidSchema)(l,h)||(n.if((0,dg._)`${d} > ${f}`,()=>r.subschema({keyword:a,schemaProp:f,dataProp:f},c)),r.ok(c))});function u(h){const{opts:f,errSchemaPath:p}=l,y=t.length,g=y===h.minItems&&(y===h.maxItems||h[e]===!1);if(f.strictTuples&&!g){const m=`"${a}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,rl.checkStrictMode)(l,m,f.strictTuples)}}}cs.validateTuple=$b;cs.default=oT;Object.defineProperty(Kh,"__esModule",{value:!0});const sT=cs,iT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,sT.validateTuple)(r,"items")};Kh.default=iT;var Wh={};Object.defineProperty(Wh,"__esModule",{value:!0});const ug=ne,aT=he,lT=de,cT=ls,dT={message:({params:{len:r}})=>(0,ug.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,ug._)`{limit: ${r}}`},uT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:dT,code(r){const{schema:e,parentSchema:t,it:n}=r,{prefixItems:o}=t;n.items=!0,!(0,aT.alwaysValidSchema)(n,e)&&(o?(0,cT.validateAdditionalItems)(r,o):r.ok((0,lT.validateArray)(r)))}};Wh.default=uT;var Gh={};Object.defineProperty(Gh,"__esModule",{value:!0});const Pt=ne,Ta=he,hT={message:({params:{min:r,max:e}})=>e===void 0?(0,Pt.str)`must contain at least ${r} valid item(s)`:(0,Pt.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,Pt._)`{minContains: ${r}}`:(0,Pt._)`{minContains: ${r}, maxContains: ${e}}`},fT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:hT,code(r){const{gen:e,schema:t,parentSchema:n,data:o,it:s}=r;let a,l;const{minContains:c,maxContains:d}=n;s.opts.next?(a=c===void 0?1:c,l=d):a=1;const u=e.const("len",(0,Pt._)`${o}.length`);if(r.setParams({min:a,max:l}),l===void 0&&a===0){(0,Ta.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(l!==void 0&&a>l){(0,Ta.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Ta.alwaysValidSchema)(s,t)){let g=(0,Pt._)`${u} >= ${a}`;l!==void 0&&(g=(0,Pt._)`${g} && ${u} <= ${l}`),r.pass(g);return}s.items=!0;const h=e.name("valid");l===void 0&&a===1?p(h,()=>e.if(h,()=>e.break())):a===0?(e.let(h,!0),l!==void 0&&e.if((0,Pt._)`${o}.length > 0`,f)):(e.let(h,!1),f()),r.result(h,()=>r.reset());function f(){const g=e.name("_valid"),m=e.let("count",0);p(g,()=>e.if(g,()=>y(m)))}function p(g,m){e.forRange("i",0,u,v=>{r.subschema({keyword:"contains",dataProp:v,dataPropType:Ta.Type.Num,compositeRule:!0},g),m()})}function y(g){e.code((0,Pt._)`${g}++`),l===void 0?e.if((0,Pt._)`${g} >= ${a}`,()=>e.assign(h,!0).break()):(e.if((0,Pt._)`${g} > ${l}`,()=>e.assign(h,!1).break()),a===1?e.assign(h,!0):e.if((0,Pt._)`${g} >= ${a}`,()=>e.assign(h,!0)))}}};Gh.default=fT;var vc={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const e=ne,t=he,n=de;r.error={message:({params:{property:c,depsCount:d,deps:u}})=>{const h=d===1?"property":"properties";return(0,e.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:u,missingProperty:h}})=>(0,e._)`{property: ${c},
66
+ || ${P} === "boolean" || ${C} === null`).assign(M,(0,o._)`[${C}]`)}}}function p({gen:w,parentData:S,parentDataProperty:x},k){w.if((0,o._)`${S} !== undefined`,()=>w.assign((0,o._)`${S}[${x}]`,k))}function y(w,S,x,k=a.Correct){const C=k===a.Correct?o.operators.EQ:o.operators.NEQ;let N;switch(w){case"null":return(0,o._)`${S} ${C} null`;case"array":N=(0,o._)`Array.isArray(${S})`;break;case"object":N=(0,o._)`${S} && typeof ${S} == "object" && !Array.isArray(${S})`;break;case"integer":N=P((0,o._)`!(${S} % 1) && !isNaN(${S})`);break;case"number":N=P();break;default:return(0,o._)`typeof ${S} ${C} ${w}`}return k===a.Correct?N:(0,o.not)(N);function P(M=o.nil){return(0,o.and)((0,o._)`typeof ${S} == "number"`,M,x?(0,o._)`isFinite(${S})`:o.nil)}}r.checkDataType=y;function g(w,S,x,k){if(w.length===1)return y(w[0],S,x,k);let C;const N=(0,s.toHash)(w);if(N.array&&N.object){const P=(0,o._)`typeof ${S} != "object"`;C=N.null?P:(0,o._)`!${S} || ${P}`,delete N.null,delete N.array,delete N.object}else C=o.nil;N.number&&delete N.integer;for(const P in N)C=(0,o.and)(C,y(P,S,x,k));return C}r.checkDataTypes=g;const m={message:({schema:w})=>`must be ${w}`,params:({schema:w,schemaValue:S})=>typeof w=="string"?(0,o._)`{type: ${w}}`:(0,o._)`{type: ${S}}`};function v(w){const S=b(w);(0,n.reportError)(S,m)}r.reportTypeError=v;function b(w){const{gen:S,data:x,schema:k}=w,C=(0,s.schemaRefOrVal)(w,k,"type");return{gen:S,keyword:"type",data:x,schema:k.type,schemaCode:C,schemaValue:C,parentSchema:k,params:{},it:w}}})(qi);var sc={};Object.defineProperty(sc,"__esModule",{value:!0});sc.assignDefaults=void 0;const vo=ne,jN=he;function FN(r,e){const{properties:t,items:n}=r.schema;if(e==="object"&&t)for(const o in t)tg(r,o,t[o].default);else e==="array"&&Array.isArray(n)&&n.forEach((o,s)=>tg(r,s,o.default))}sc.assignDefaults=FN;function tg(r,e,t){const{gen:n,compositeRule:o,data:s,opts:a}=r;if(t===void 0)return;const l=(0,vo._)`${s}${(0,vo.getProperty)(e)}`;if(o){(0,jN.checkStrictMode)(r,`default is ignored for: ${l}`);return}let c=(0,vo._)`${l} === undefined`;a.useDefaults==="empty"&&(c=(0,vo._)`${c} || ${l} === null || ${l} === ""`),n.if(c,(0,vo._)`${l} = ${(0,vo.stringify)(t)}`)}var gr={},de={};Object.defineProperty(de,"__esModule",{value:!0});de.validateUnion=de.validateArray=de.usePattern=de.callValidateCode=de.schemaProperties=de.allSchemaProperties=de.noPropertyInData=de.propertyInData=de.isOwnProperty=de.hasPropFunc=de.reportMissingProp=de.checkMissingProp=de.checkReportMissingProp=void 0;const Oe=ne,Dh=he,Kr=_t,qN=he;function zN(r,e){const{gen:t,data:n,it:o}=r;t.if(Rh(t,n,e,o.opts.ownProperties),()=>{r.setParams({missingProperty:(0,Oe._)`${e}`},!0),r.error()})}de.checkReportMissingProp=zN;function HN({gen:r,data:e,it:{opts:t}},n,o){return(0,Oe.or)(...n.map(s=>(0,Oe.and)(Rh(r,e,s,t.ownProperties),(0,Oe._)`${o} = ${s}`)))}de.checkMissingProp=HN;function UN(r,e){r.setParams({missingProperty:e},!0),r.error()}de.reportMissingProp=UN;function eb(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Oe._)`Object.prototype.hasOwnProperty`})}de.hasPropFunc=eb;function Vh(r,e,t){return(0,Oe._)`${eb(r)}.call(${e}, ${t})`}de.isOwnProperty=Vh;function KN(r,e,t,n){const o=(0,Oe._)`${e}${(0,Oe.getProperty)(t)} !== undefined`;return n?(0,Oe._)`${o} && ${Vh(r,e,t)}`:o}de.propertyInData=KN;function Rh(r,e,t,n){const o=(0,Oe._)`${e}${(0,Oe.getProperty)(t)} === undefined`;return n?(0,Oe.or)(o,(0,Oe.not)(Vh(r,e,t))):o}de.noPropertyInData=Rh;function tb(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}de.allSchemaProperties=tb;function WN(r,e){return tb(e).filter(t=>!(0,Dh.alwaysValidSchema)(r,e[t]))}de.schemaProperties=WN;function GN({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:o,errorPath:s},it:a},l,c,d){const u=d?(0,Oe._)`${r}, ${e}, ${n}${o}`:e,h=[[Kr.default.instancePath,(0,Oe.strConcat)(Kr.default.instancePath,s)],[Kr.default.parentData,a.parentData],[Kr.default.parentDataProperty,a.parentDataProperty],[Kr.default.rootData,Kr.default.rootData]];a.opts.dynamicRef&&h.push([Kr.default.dynamicAnchors,Kr.default.dynamicAnchors]);const f=(0,Oe._)`${u}, ${t.object(...h)}`;return c!==Oe.nil?(0,Oe._)`${l}.call(${c}, ${f})`:(0,Oe._)`${l}(${f})`}de.callValidateCode=GN;const JN=(0,Oe._)`new RegExp`;function YN({gen:r,it:{opts:e}},t){const n=e.unicodeRegExp?"u":"",{regExp:o}=e.code,s=o(t,n);return r.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Oe._)`${o.code==="new RegExp"?JN:(0,qN.useFunc)(r,o)}(${t}, ${n})`})}de.usePattern=YN;function XN(r){const{gen:e,data:t,keyword:n,it:o}=r,s=e.name("valid");if(o.allErrors){const l=e.let("valid",!0);return a(()=>e.assign(l,!1)),l}return e.var(s,!0),a(()=>e.break()),s;function a(l){const c=e.const("len",(0,Oe._)`${t}.length`);e.forRange("i",0,c,d=>{r.subschema({keyword:n,dataProp:d,dataPropType:Dh.Type.Num},s),e.if((0,Oe.not)(s),l)})}}de.validateArray=XN;function QN(r){const{gen:e,schema:t,keyword:n,it:o}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(l=>(0,Dh.alwaysValidSchema)(o,l))&&!o.opts.unevaluated)return;const s=e.let("valid",!1),a=e.name("_valid");e.block(()=>t.forEach((l,c)=>{const d=r.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);e.assign(s,(0,Oe._)`${s} || ${a}`),r.mergeValidEvaluated(d,a)||e.if((0,Oe.not)(s))})),r.result(s,()=>r.reset(),()=>r.error(!0))}de.validateUnion=QN;Object.defineProperty(gr,"__esModule",{value:!0});gr.validateKeywordUsage=gr.validSchemaType=gr.funcKeywordCode=gr.macroKeywordCode=void 0;const ut=ne,On=_t,ZN=de,eA=Fi;function tA(r,e){const{gen:t,keyword:n,schema:o,parentSchema:s,it:a}=r,l=e.macro.call(a.self,o,s,a),c=rb(t,n,l);a.opts.validateSchema!==!1&&a.self.validateSchema(l,!0);const d=t.name("valid");r.subschema({schema:l,schemaPath:ut.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},d),r.pass(d,()=>r.error(!0))}gr.macroKeywordCode=tA;function rA(r,e){var t;const{gen:n,keyword:o,schema:s,parentSchema:a,$data:l,it:c}=r;oA(c,e);const d=!l&&e.compile?e.compile.call(c.self,s,a,c):e.validate,u=rb(n,o,d),h=n.let("valid");r.block$data(h,f),r.ok((t=e.valid)!==null&&t!==void 0?t:h);function f(){if(e.errors===!1)g(),e.modifying&&rg(r),m(()=>r.error());else{const v=e.async?p():y();e.modifying&&rg(r),m(()=>nA(r,v))}}function p(){const v=n.let("ruleErrs",null);return n.try(()=>g((0,ut._)`await `),b=>n.assign(h,!1).if((0,ut._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(v,(0,ut._)`${b}.errors`),()=>n.throw(b))),v}function y(){const v=(0,ut._)`${u}.errors`;return n.assign(v,null),g(ut.nil),v}function g(v=e.async?(0,ut._)`await `:ut.nil){const b=c.opts.passContext?On.default.this:On.default.self,w=!("compile"in e&&!l||e.schema===!1);n.assign(h,(0,ut._)`${v}${(0,ZN.callValidateCode)(r,u,b,w)}`,e.modifying)}function m(v){var b;n.if((0,ut.not)((b=e.valid)!==null&&b!==void 0?b:h),v)}}gr.funcKeywordCode=rA;function rg(r){const{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,ut._)`${n.parentData}[${n.parentDataProperty}]`))}function nA(r,e){const{gen:t}=r;t.if((0,ut._)`Array.isArray(${e})`,()=>{t.assign(On.default.vErrors,(0,ut._)`${On.default.vErrors} === null ? ${e} : ${On.default.vErrors}.concat(${e})`).assign(On.default.errors,(0,ut._)`${On.default.vErrors}.length`),(0,eA.extendErrors)(r)},()=>r.error())}function oA({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function rb(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,ut.stringify)(t)})}function sA(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r>"u")}gr.validSchemaType=sA;function iA({schema:r,opts:e,self:t,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");const a=o.dependencies;if(a!=null&&a.some(l=>!Object.prototype.hasOwnProperty.call(r,l)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(r[s])){const l=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(l);else throw new Error(l)}}gr.validateKeywordUsage=iA;var cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.extendSubschemaMode=cn.extendSubschemaData=cn.getSubschema=void 0;const fr=ne,nb=he;function aA(r,{keyword:e,schemaProp:t,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const l=r.schema[e];return t===void 0?{schema:l,schemaPath:(0,fr._)`${r.schemaPath}${(0,fr.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:l[t],schemaPath:(0,fr._)`${r.schemaPath}${(0,fr.getProperty)(e)}${(0,fr.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,nb.escapeFragment)(t)}`}}if(n!==void 0){if(o===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}cn.getSubschema=aA;function lA(r,e,{dataProp:t,dataPropType:n,data:o,dataTypes:s,propertyName:a}){if(o!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=e;if(t!==void 0){const{errorPath:d,dataPathArr:u,opts:h}=e,f=l.let("data",(0,fr._)`${e.data}${(0,fr.getProperty)(t)}`,!0);c(f),r.errorPath=(0,fr.str)`${d}${(0,nb.getErrorPath)(t,n,h.jsPropertySyntax)}`,r.parentDataProperty=(0,fr._)`${t}`,r.dataPathArr=[...u,r.parentDataProperty]}if(o!==void 0){const d=o instanceof fr.Name?o:l.let("data",o,!0);c(d),a!==void 0&&(r.propertyName=a)}s&&(r.dataTypes=s);function c(d){r.data=d,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,d]}}cn.extendSubschemaData=lA;function cA(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(r.compositeRule=n),o!==void 0&&(r.createErrors=o),s!==void 0&&(r.allErrors=s),r.jtdDiscriminator=e,r.jtdMetadata=t}cn.extendSubschemaMode=cA;var tt={},ob=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,o,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!r(e[o],t[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){var a=s[o];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t},sb={exports:{}},an=sb.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},o=t.post||function(){};el(e,n,o,r,"",r)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};an.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function el(r,e,t,n,o,s,a,l,c,d){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,o,s,a,l,c,d);for(var u in n){var h=n[u];if(Array.isArray(h)){if(u in an.arrayKeywords)for(var f=0;f<h.length;f++)el(r,e,t,h[f],o+"/"+u+"/"+f,s,o,u,n,f)}else if(u in an.propsKeywords){if(h&&typeof h=="object")for(var p in h)el(r,e,t,h[p],o+"/"+u+"/"+dA(p),s,o,u,n,p)}else(u in an.keywords||r.allKeys&&!(u in an.skipKeywords))&&el(r,e,t,h,o+"/"+u,s,o,u,n)}t(n,o,s,a,l,c,d)}}function dA(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}var uA=sb.exports;Object.defineProperty(tt,"__esModule",{value:!0});tt.getSchemaRefs=tt.resolveUrl=tt.normalizeId=tt._getFullPath=tt.getFullPath=tt.inlineRef=void 0;const hA=he,fA=ob,pA=uA,mA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function gA(r,e=!0){return typeof r=="boolean"?!0:e===!0?!Eu(r):e?ib(r)<=e:!1}tt.inlineRef=gA;const yA=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Eu(r){for(const e in r){if(yA.has(e))return!0;const t=r[e];if(Array.isArray(t)&&t.some(Eu)||typeof t=="object"&&Eu(t))return!0}return!1}function ib(r){let e=0;for(const t in r)if(t==="$ref"||(e++,!mA.has(t)&&(typeof r[t]=="object"&&(0,hA.eachItem)(r[t],n=>e+=ib(n)),e===1/0)))return 1/0;return e}function ab(r,e="",t){t!==!1&&(e=jo(e));const n=r.parse(e);return lb(r,n)}tt.getFullPath=ab;function lb(r,e){return r.serialize(e).split("#")[0]+"#"}tt._getFullPath=lb;const vA=/#\/?$/;function jo(r){return r?r.replace(vA,""):""}tt.normalizeId=jo;function bA(r,e,t){return t=jo(t),r.resolve(e,t)}tt.resolveUrl=bA;const wA=/^[a-z_][-a-z0-9._]*$/i;function kA(r,e){if(typeof r=="boolean")return{};const{schemaId:t,uriResolver:n}=this.opts,o=jo(r[t]||e),s={"":o},a=ab(n,o,!1),l={},c=new Set;return pA(r,{allKeys:!0},(h,f,p,y)=>{if(y===void 0)return;const g=a+f;let m=s[y];typeof h[t]=="string"&&(m=v.call(this,h[t])),b.call(this,h.$anchor),b.call(this,h.$dynamicAnchor),s[f]=m;function v(w){const S=this.opts.uriResolver.resolve;if(w=jo(m?S(m,w):w),c.has(w))throw u(w);c.add(w);let x=this.refs[w];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?d(h,x.schema,w):w!==jo(g)&&(w[0]==="#"?(d(h,l[w],w),l[w]=h):this.refs[w]=g),w}function b(w){if(typeof w=="string"){if(!wA.test(w))throw new Error(`invalid anchor "${w}"`);v.call(this,`#${w}`)}}}),l;function d(h,f,p){if(f!==void 0&&!fA(h,f))throw u(p)}function u(h){return new Error(`reference "${h}" resolves to more than one schema`)}}tt.getSchemaRefs=kA;Object.defineProperty(Dt,"__esModule",{value:!0});Dt.getData=Dt.KeywordCxt=Dt.validateFunctionCode=void 0;const cb=Xo,ng=qi,Lh=Ir,_l=qi,SA=sc,si=gr,ad=cn,J=ne,re=_t,xA=tt,Mr=he,Fs=Fi;function CA(r){if(hb(r)&&(fb(r),ub(r))){_A(r);return}db(r,()=>(0,cb.topBoolOrEmptySchema)(r))}Dt.validateFunctionCode=CA;function db({gen:r,validateName:e,schema:t,schemaEnv:n,opts:o},s){o.code.es5?r.func(e,(0,J._)`${re.default.data}, ${re.default.valCxt}`,n.$async,()=>{r.code((0,J._)`"use strict"; ${og(t,o)}`),$A(r,o),r.code(s)}):r.func(e,(0,J._)`${re.default.data}, ${EA(o)}`,n.$async,()=>r.code(og(t,o)).code(s))}function EA(r){return(0,J._)`{${re.default.instancePath}="", ${re.default.parentData}, ${re.default.parentDataProperty}, ${re.default.rootData}=${re.default.data}${r.dynamicRef?(0,J._)`, ${re.default.dynamicAnchors}={}`:J.nil}}={}`}function $A(r,e){r.if(re.default.valCxt,()=>{r.var(re.default.instancePath,(0,J._)`${re.default.valCxt}.${re.default.instancePath}`),r.var(re.default.parentData,(0,J._)`${re.default.valCxt}.${re.default.parentData}`),r.var(re.default.parentDataProperty,(0,J._)`${re.default.valCxt}.${re.default.parentDataProperty}`),r.var(re.default.rootData,(0,J._)`${re.default.valCxt}.${re.default.rootData}`),e.dynamicRef&&r.var(re.default.dynamicAnchors,(0,J._)`${re.default.valCxt}.${re.default.dynamicAnchors}`)},()=>{r.var(re.default.instancePath,(0,J._)`""`),r.var(re.default.parentData,(0,J._)`undefined`),r.var(re.default.parentDataProperty,(0,J._)`undefined`),r.var(re.default.rootData,re.default.data),e.dynamicRef&&r.var(re.default.dynamicAnchors,(0,J._)`{}`)})}function _A(r){const{schema:e,opts:t,gen:n}=r;db(r,()=>{t.$comment&&e.$comment&&mb(r),BA(r),n.let(re.default.vErrors,null),n.let(re.default.errors,0),t.unevaluated&&NA(r),pb(r),MA(r)})}function NA(r){const{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,J._)`${t}.evaluated`),e.if((0,J._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,J._)`${r.evaluated}.props`,(0,J._)`undefined`)),e.if((0,J._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,J._)`${r.evaluated}.items`,(0,J._)`undefined`))}function og(r,e){const t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,J._)`/*# sourceURL=${t} */`:J.nil}function AA(r,e){if(hb(r)&&(fb(r),ub(r))){OA(r,e);return}(0,cb.boolOrEmptySchema)(r,e)}function ub({schema:r,self:e}){if(typeof r=="boolean")return!r;for(const t in r)if(e.RULES.all[t])return!0;return!1}function hb(r){return typeof r.schema!="boolean"}function OA(r,e){const{schema:t,gen:n,opts:o}=r;o.$comment&&t.$comment&&mb(r),PA(r),IA(r);const s=n.const("_errs",re.default.errors);pb(r,s),n.var(e,(0,J._)`${s} === ${re.default.errors}`)}function fb(r){(0,Mr.checkUnknownRules)(r),TA(r)}function pb(r,e){if(r.opts.jtd)return sg(r,[],!1,e);const t=(0,ng.getSchemaTypes)(r.schema),n=(0,ng.coerceAndCheckDataType)(r,t);sg(r,t,!n,e)}function TA(r){const{schema:e,errSchemaPath:t,opts:n,self:o}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Mr.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function BA(r){const{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Mr.checkStrictMode)(r,"default is ignored in the schema root")}function PA(r){const e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,xA.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function IA(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function mb({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:o}){const s=t.$comment;if(o.$comment===!0)r.code((0,J._)`${re.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){const a=(0,J.str)`${n}/$comment`,l=r.scopeValue("root",{ref:e.root});r.code((0,J._)`${re.default.self}.opts.$comment(${s}, ${a}, ${l}.schema)`)}}function MA(r){const{gen:e,schemaEnv:t,validateName:n,ValidationError:o,opts:s}=r;t.$async?e.if((0,J._)`${re.default.errors} === 0`,()=>e.return(re.default.data),()=>e.throw((0,J._)`new ${o}(${re.default.vErrors})`)):(e.assign((0,J._)`${n}.errors`,re.default.vErrors),s.unevaluated&&DA(r),e.return((0,J._)`${re.default.errors} === 0`))}function DA({gen:r,evaluated:e,props:t,items:n}){t instanceof J.Name&&r.assign((0,J._)`${e}.props`,t),n instanceof J.Name&&r.assign((0,J._)`${e}.items`,n)}function sg(r,e,t,n){const{gen:o,schema:s,data:a,allErrors:l,opts:c,self:d}=r,{RULES:u}=d;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,Mr.schemaHasRulesButRef)(s,u))){o.block(()=>vb(r,"$ref",u.all.$ref.definition));return}c.jtd||VA(r,e),o.block(()=>{for(const f of u.rules)h(f);h(u.post)});function h(f){(0,Lh.shouldUseGroup)(s,f)&&(f.type?(o.if((0,_l.checkDataType)(f.type,a,c.strictNumbers)),ig(r,f),e.length===1&&e[0]===f.type&&t&&(o.else(),(0,_l.reportTypeError)(r)),o.endIf()):ig(r,f),l||o.if((0,J._)`${re.default.errors} === ${n||0}`))}}function ig(r,e){const{gen:t,schema:n,opts:{useDefaults:o}}=r;o&&(0,SA.assignDefaults)(r,e.type),t.block(()=>{for(const s of e.rules)(0,Lh.shouldUseRule)(n,s)&&vb(r,s.keyword,s.definition,e.type)})}function VA(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(RA(r,e),r.opts.allowUnionTypes||LA(r,e),jA(r,r.dataTypes))}function RA(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{gb(r.dataTypes,t)||jh(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),qA(r,e)}}function LA(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&jh(r,"use allowUnionTypes to allow union type keyword")}function jA(r,e){const t=r.self.RULES.all;for(const n in t){const o=t[n];if(typeof o=="object"&&(0,Lh.shouldUseRule)(r.schema,o)){const{type:s}=o.definition;s.length&&!s.some(a=>FA(e,a))&&jh(r,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function FA(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function gb(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function qA(r,e){const t=[];for(const n of r.dataTypes)gb(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function jh(r,e){const t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,Mr.checkStrictMode)(r,e,r.opts.strictTypes)}class yb{constructor(e,t,n){if((0,si.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Mr.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",bb(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,si.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",re.default.errors))}result(e,t,n){this.failResult((0,J.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,J.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail((0,J._)`${t} !== undefined && (${(0,J.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Fs.reportExtraError:Fs.reportError)(this,this.def.error,t)}$dataError(){(0,Fs.reportError)(this,this.def.$dataError||Fs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Fs.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=J.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=J.nil,t=J.nil){if(!this.$data)return;const{gen:n,schemaCode:o,schemaType:s,def:a}=this;n.if((0,J.or)((0,J._)`${o} === undefined`,t)),e!==J.nil&&n.assign(e,!0),(s.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==J.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:o,it:s}=this;return(0,J.or)(a(),l());function a(){if(n.length){if(!(t instanceof J.Name))throw new Error("ajv implementation error");const c=Array.isArray(n)?n:[n];return(0,J._)`${(0,_l.checkDataTypes)(c,t,s.opts.strictNumbers,_l.DataType.Wrong)}`}return J.nil}function l(){if(o.validateSchema){const c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,J._)`!${c}(${t})`}return J.nil}}subschema(e,t){const n=(0,ad.getSubschema)(this.it,e);(0,ad.extendSubschemaData)(n,this.it,e),(0,ad.extendSubschemaMode)(n,e);const o={...this.it,...n,items:void 0,props:void 0};return AA(o,t),o}mergeEvaluated(e,t){const{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Mr.mergeEvaluated.props(o,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Mr.mergeEvaluated.items(o,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(t,()=>this.mergeEvaluated(e,J.Name)),!0}}Dt.KeywordCxt=yb;function vb(r,e,t,n){const o=new yb(r,t,e);"code"in t?t.code(o,n):o.$data&&t.validate?(0,si.funcKeywordCode)(o,t):"macro"in t?(0,si.macroKeywordCode)(o,t):(t.compile||t.validate)&&(0,si.funcKeywordCode)(o,t)}const zA=/^\/(?:[^~]|~0|~1)*$/,HA=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function bb(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let o,s;if(r==="")return re.default.rootData;if(r[0]==="/"){if(!zA.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);o=r,s=re.default.rootData}else{const d=HA.exec(r);if(!d)throw new Error(`Invalid JSON-pointer: ${r}`);const u=+d[1];if(o=d[2],o==="#"){if(u>=e)throw new Error(c("property/index",u));return n[e-u]}if(u>e)throw new Error(c("data",u));if(s=t[e-u],!o)return s}let a=s;const l=o.split("/");for(const d of l)d&&(s=(0,J._)`${s}${(0,J.getProperty)((0,Mr.unescapeJsonPointer)(d))}`,a=(0,J._)`${a} && ${s}`);return a;function c(d,u){return`Cannot access ${d} ${u} levels up, current level is ${e}`}}Dt.getData=bb;var is={};Object.defineProperty(is,"__esModule",{value:!0});class UA extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}is.default=UA;var as={};Object.defineProperty(as,"__esModule",{value:!0});const ld=tt;class KA extends Error{constructor(e,t,n,o){super(o||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,ld.resolveUrl)(e,t,n),this.missingSchema=(0,ld.normalizeId)((0,ld.getFullPath)(e,this.missingRef))}}as.default=KA;var ft={};Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;const qt=ne,WA=is,_n=_t,Wt=tt,ag=he,GA=Dt;class ic{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Wt.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}ft.SchemaEnv=ic;function Fh(r){const e=wb.call(this,r);if(e)return e;const t=(0,Wt.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,a=new qt.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s});let l;r.$async&&(l=a.scopeValue("Error",{ref:WA.default,code:(0,qt._)`require("ajv/dist/runtime/validation_error").default`}));const c=a.scopeName("validate");r.validateName=c;const d={gen:a,allErrors:this.opts.allErrors,data:_n.default.data,parentData:_n.default.parentData,parentDataProperty:_n.default.parentDataProperty,dataNames:[_n.default.data],dataPathArr:[qt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,qt.stringify)(r.schema)}:{ref:r.schema}),validateName:c,ValidationError:l,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:qt.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,qt._)`""`,opts:this.opts,self:this};let u;try{this._compilations.add(r),(0,GA.validateFunctionCode)(d),a.optimize(this.opts.code.optimize);const h=a.toString();u=`${a.scopeRefs(_n.default.scope)}return ${h}`,this.opts.code.process&&(u=this.opts.code.process(u,r));const f=new Function(`${_n.default.self}`,`${_n.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=r.schema,f.schemaEnv=r,r.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:h,scopeValues:a._values}),this.opts.unevaluated){const{props:p,items:y}=d;f.evaluated={props:p instanceof qt.Name?void 0:p,items:y instanceof qt.Name?void 0:y,dynamicProps:p instanceof qt.Name,dynamicItems:y instanceof qt.Name},f.source&&(f.source.evaluated=(0,qt.stringify)(f.evaluated))}return r.validate=f,r}catch(h){throw delete r.validate,delete r.validateName,u&&this.logger.error("Error compiling schema, function code:",u),h}finally{this._compilations.delete(r)}}ft.compileSchema=Fh;function JA(r,e,t){var n;t=(0,Wt.resolveUrl)(this.opts.uriResolver,e,t);const o=r.refs[t];if(o)return o;let s=QA.call(this,r,t);if(s===void 0){const a=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:l}=this.opts;a&&(s=new ic({schema:a,schemaId:l,root:r,baseId:e}))}if(s!==void 0)return r.refs[t]=YA.call(this,s)}ft.resolveRef=JA;function YA(r){return(0,Wt.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:Fh.call(this,r)}function wb(r){for(const e of this._compilations)if(XA(e,r))return e}ft.getCompilingSchema=wb;function XA(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function QA(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||ac.call(this,r,e)}function ac(r,e){const t=this.opts.uriResolver.parse(e),n=(0,Wt._getFullPath)(this.opts.uriResolver,t);let o=(0,Wt.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===o)return cd.call(this,t,r);const s=(0,Wt.normalizeId)(n),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){const l=ac.call(this,r,a);return typeof(l==null?void 0:l.schema)!="object"?void 0:cd.call(this,t,l)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||Fh.call(this,a),s===(0,Wt.normalizeId)(e)){const{schema:l}=a,{schemaId:c}=this.opts,d=l[c];return d&&(o=(0,Wt.resolveUrl)(this.opts.uriResolver,o,d)),new ic({schema:l,schemaId:c,root:r,baseId:o})}return cd.call(this,t,a)}}ft.resolveSchema=ac;const ZA=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function cd(r,{baseId:e,schema:t,root:n}){var o;if(((o=r.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(const l of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;const c=t[(0,ag.unescapeFragment)(l)];if(c===void 0)return;t=c;const d=typeof t=="object"&&t[this.opts.schemaId];!ZA.has(l)&&d&&(e=(0,Wt.resolveUrl)(this.opts.uriResolver,e,d))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,ag.schemaHasRulesButRef)(t,this.RULES)){const l=(0,Wt.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=ac.call(this,n,l)}const{schemaId:a}=this.opts;if(s=s||new ic({schema:t,schemaId:a,root:n,baseId:e}),s.schema!==s.root.schema)return s}const eO="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",tO="Meta-schema for $data reference (JSON AnySchema extension proposal)",rO="object",nO=["$data"],oO={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},sO=!1,iO={$id:eO,description:tO,type:rO,required:nO,properties:oO,additionalProperties:sO};var qh={},$u={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(r,e){(function(t,n){n(e)})(_N,function(t){function n(){for(var $=arguments.length,_=Array($),O=0;O<$;O++)_[O]=arguments[O];if(_.length>1){_[0]=_[0].slice(0,-1);for(var R=_.length-1,L=1;L<R;++L)_[L]=_[L].slice(1,-1);return _[R]=_[R].slice(1),_.join("")}else return _[0]}function o($){return"(?:"+$+")"}function s($){return $===void 0?"undefined":$===null?"null":Object.prototype.toString.call($).split(" ").pop().split("]").shift().toLowerCase()}function a($){return $.toUpperCase()}function l($){return $!=null?$ instanceof Array?$:typeof $.length!="number"||$.split||$.setInterval||$.call?[$]:Array.prototype.slice.call($):[]}function c($,_){var O=$;if(_)for(var R in _)O[R]=_[R];return O}function d($){var _="[A-Za-z]",O="[0-9]",R=n(O,"[A-Fa-f]"),L=o(o("%[EFef]"+R+"%"+R+R+"%"+R+R)+"|"+o("%[89A-Fa-f]"+R+"%"+R+R)+"|"+o("%"+R+R)),ee="[\\:\\/\\?\\#\\[\\]\\@]",Q="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ge=n(ee,Q),Fe=$?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ce=$?"[\\uE000-\\uF8FF]":"[]",pe=n(_,O,"[\\-\\.\\_\\~]",Fe);o(_+n(_,O,"[\\+\\-\\.]")+"*"),o(o(L+"|"+n(pe,Q,"[\\:]"))+"*");var _e=o(o("25[0-5]")+"|"+o("2[0-4]"+O)+"|"+o("1"+O+O)+"|"+o("0?[1-9]"+O)+"|0?0?"+O),De=o(_e+"\\."+_e+"\\."+_e+"\\."+_e),ae=o(R+"{1,4}"),qe=o(o(ae+"\\:"+ae)+"|"+De),Ee=o(o(ae+"\\:")+"{6}"+qe),At=o("\\:\\:"+o(ae+"\\:")+"{5}"+qe),go=o(o(ae)+"?\\:\\:"+o(ae+"\\:")+"{4}"+qe),Ft=o(o(o(ae+"\\:")+"{0,1}"+ae)+"?\\:\\:"+o(ae+"\\:")+"{3}"+qe),xr=o(o(o(ae+"\\:")+"{0,2}"+ae)+"?\\:\\:"+o(ae+"\\:")+"{2}"+qe),xn=o(o(o(ae+"\\:")+"{0,3}"+ae)+"?\\:\\:"+ae+"\\:"+qe),Cn=o(o(o(ae+"\\:")+"{0,4}"+ae)+"?\\:\\:"+qe),Ot=o(o(o(ae+"\\:")+"{0,5}"+ae)+"?\\:\\:"+ae),Cr=o(o(o(ae+"\\:")+"{0,6}"+ae)+"?\\:\\:"),En=o([Ee,At,go,Ft,xr,xn,Cn,Ot,Cr].join("|")),sr=o(o(pe+"|"+L)+"+");o("[vV]"+R+"+\\."+n(pe,Q,"[\\:]")+"+"),o(o(L+"|"+n(pe,Q))+"*");var oa=o(L+"|"+n(pe,Q,"[\\:\\@]"));return o(o(L+"|"+n(pe,Q,"[\\@]"))+"+"),o(o(oa+"|"+n("[\\/\\?]",Ce))+"*"),{NOT_SCHEME:new RegExp(n("[^]",_,O,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",pe,Q),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",pe,Q),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",pe,Q),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",pe,Q),"g"),NOT_QUERY:new RegExp(n("[^\\%]",pe,Q,"[\\:\\@\\/\\?]",Ce),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",pe,Q,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",pe,Q),"g"),UNRESERVED:new RegExp(pe,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",pe,ge),"g"),PCT_ENCODED:new RegExp(L,"g"),IPV4ADDRESS:new RegExp("^("+De+")$"),IPV6ADDRESS:new RegExp("^\\[?("+En+")"+o(o("\\%25|\\%(?!"+R+"{2})")+"("+sr+")")+"?\\]?$")}}var u=d(!1),h=d(!0),f=function(){function $(_,O){var R=[],L=!0,ee=!1,Q=void 0;try{for(var ge=_[Symbol.iterator](),Fe;!(L=(Fe=ge.next()).done)&&(R.push(Fe.value),!(O&&R.length===O));L=!0);}catch(Ce){ee=!0,Q=Ce}finally{try{!L&&ge.return&&ge.return()}finally{if(ee)throw Q}}return R}return function(_,O){if(Array.isArray(_))return _;if(Symbol.iterator in Object(_))return $(_,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function($){if(Array.isArray($)){for(var _=0,O=Array($.length);_<$.length;_++)O[_]=$[_];return O}else return Array.from($)},y=2147483647,g=36,m=1,v=26,b=38,w=700,S=72,x=128,k="-",C=/^xn--/,N=/[^\0-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=g-m,I=Math.floor,X=String.fromCharCode;function W($){throw new RangeError(M[$])}function te($,_){for(var O=[],R=$.length;R--;)O[R]=_($[R]);return O}function me($,_){var O=$.split("@"),R="";O.length>1&&(R=O[0]+"@",$=O[1]),$=$.replace(P,".");var L=$.split("."),ee=te(L,_).join(".");return R+ee}function ke($){for(var _=[],O=0,R=$.length;O<R;){var L=$.charCodeAt(O++);if(L>=55296&&L<=56319&&O<R){var ee=$.charCodeAt(O++);(ee&64512)==56320?_.push(((L&1023)<<10)+(ee&1023)+65536):(_.push(L),O--)}else _.push(L)}return _}var Se=function($){return String.fromCodePoint.apply(String,p($))},se=function($){return $-48<10?$-22:$-65<26?$-65:$-97<26?$-97:g},q=function($,_){return $+22+75*($<26)-((_!=0)<<5)},T=function($,_,O){var R=0;for($=O?I($/w):$>>1,$+=I($/_);$>j*v>>1;R+=g)$=I($/j);return I(R+(j+1)*$/($+b))},V=function($){var _=[],O=$.length,R=0,L=x,ee=S,Q=$.lastIndexOf(k);Q<0&&(Q=0);for(var ge=0;ge<Q;++ge)$.charCodeAt(ge)>=128&&W("not-basic"),_.push($.charCodeAt(ge));for(var Fe=Q>0?Q+1:0;Fe<O;){for(var Ce=R,pe=1,_e=g;;_e+=g){Fe>=O&&W("invalid-input");var De=se($.charCodeAt(Fe++));(De>=g||De>I((y-R)/pe))&&W("overflow"),R+=De*pe;var ae=_e<=ee?m:_e>=ee+v?v:_e-ee;if(De<ae)break;var qe=g-ae;pe>I(y/qe)&&W("overflow"),pe*=qe}var Ee=_.length+1;ee=T(R-Ce,Ee,Ce==0),I(R/Ee)>y-L&&W("overflow"),L+=I(R/Ee),R%=Ee,_.splice(R++,0,L)}return String.fromCodePoint.apply(String,_)},D=function($){var _=[];$=ke($);var O=$.length,R=x,L=0,ee=S,Q=!0,ge=!1,Fe=void 0;try{for(var Ce=$[Symbol.iterator](),pe;!(Q=(pe=Ce.next()).done);Q=!0){var _e=pe.value;_e<128&&_.push(X(_e))}}catch(Ts){ge=!0,Fe=Ts}finally{try{!Q&&Ce.return&&Ce.return()}finally{if(ge)throw Fe}}var De=_.length,ae=De;for(De&&_.push(k);ae<O;){var qe=y,Ee=!0,At=!1,go=void 0;try{for(var Ft=$[Symbol.iterator](),xr;!(Ee=(xr=Ft.next()).done);Ee=!0){var xn=xr.value;xn>=R&&xn<qe&&(qe=xn)}}catch(Ts){At=!0,go=Ts}finally{try{!Ee&&Ft.return&&Ft.return()}finally{if(At)throw go}}var Cn=ae+1;qe-R>I((y-L)/Cn)&&W("overflow"),L+=(qe-R)*Cn,R=qe;var Ot=!0,Cr=!1,En=void 0;try{for(var sr=$[Symbol.iterator](),oa;!(Ot=(oa=sr.next()).done);Ot=!0){var dp=oa.value;if(dp<R&&++L>y&&W("overflow"),dp==R){for(var sa=L,ia=g;;ia+=g){var aa=ia<=ee?m:ia>=ee+v?v:ia-ee;if(sa<aa)break;var up=sa-aa,hp=g-aa;_.push(X(q(aa+up%hp,0))),sa=I(up/hp)}_.push(X(q(sa,0))),ee=T(L,Cn,ae==De),L=0,++ae}}}catch(Ts){Cr=!0,En=Ts}finally{try{!Ot&&sr.return&&sr.return()}finally{if(Cr)throw En}}++L,++R}return _.join("")},E=function($){return me($,function(_){return C.test(_)?V(_.slice(4).toLowerCase()):_})},A=function($){return me($,function(_){return N.test(_)?"xn--"+D(_):_})},B={version:"2.1.0",ucs2:{decode:ke,encode:Se},decode:V,encode:D,toASCII:A,toUnicode:E},z={};function H($){var _=$.charCodeAt(0),O=void 0;return _<16?O="%0"+_.toString(16).toUpperCase():_<128?O="%"+_.toString(16).toUpperCase():_<2048?O="%"+(_>>6|192).toString(16).toUpperCase()+"%"+(_&63|128).toString(16).toUpperCase():O="%"+(_>>12|224).toString(16).toUpperCase()+"%"+(_>>6&63|128).toString(16).toUpperCase()+"%"+(_&63|128).toString(16).toUpperCase(),O}function ie($){for(var _="",O=0,R=$.length;O<R;){var L=parseInt($.substr(O+1,2),16);if(L<128)_+=String.fromCharCode(L),O+=3;else if(L>=194&&L<224){if(R-O>=6){var ee=parseInt($.substr(O+4,2),16);_+=String.fromCharCode((L&31)<<6|ee&63)}else _+=$.substr(O,6);O+=6}else if(L>=224){if(R-O>=9){var Q=parseInt($.substr(O+4,2),16),ge=parseInt($.substr(O+7,2),16);_+=String.fromCharCode((L&15)<<12|(Q&63)<<6|ge&63)}else _+=$.substr(O,9);O+=9}else _+=$.substr(O,3),O+=3}return _}function oe($,_){function O(R){var L=ie(R);return L.match(_.UNRESERVED)?L:R}return $.scheme&&($.scheme=String($.scheme).replace(_.PCT_ENCODED,O).toLowerCase().replace(_.NOT_SCHEME,"")),$.userinfo!==void 0&&($.userinfo=String($.userinfo).replace(_.PCT_ENCODED,O).replace(_.NOT_USERINFO,H).replace(_.PCT_ENCODED,a)),$.host!==void 0&&($.host=String($.host).replace(_.PCT_ENCODED,O).toLowerCase().replace(_.NOT_HOST,H).replace(_.PCT_ENCODED,a)),$.path!==void 0&&($.path=String($.path).replace(_.PCT_ENCODED,O).replace($.scheme?_.NOT_PATH:_.NOT_PATH_NOSCHEME,H).replace(_.PCT_ENCODED,a)),$.query!==void 0&&($.query=String($.query).replace(_.PCT_ENCODED,O).replace(_.NOT_QUERY,H).replace(_.PCT_ENCODED,a)),$.fragment!==void 0&&($.fragment=String($.fragment).replace(_.PCT_ENCODED,O).replace(_.NOT_FRAGMENT,H).replace(_.PCT_ENCODED,a)),$}function ye($){return $.replace(/^0*(.*)/,"$1")||"0"}function rr($,_){var O=$.match(_.IPV4ADDRESS)||[],R=f(O,2),L=R[1];return L?L.split(".").map(ye).join("."):$}function co($,_){var O=$.match(_.IPV6ADDRESS)||[],R=f(O,3),L=R[1],ee=R[2];if(L){for(var Q=L.toLowerCase().split("::").reverse(),ge=f(Q,2),Fe=ge[0],Ce=ge[1],pe=Ce?Ce.split(":").map(ye):[],_e=Fe.split(":").map(ye),De=_.IPV4ADDRESS.test(_e[_e.length-1]),ae=De?7:8,qe=_e.length-ae,Ee=Array(ae),At=0;At<ae;++At)Ee[At]=pe[At]||_e[qe+At]||"";De&&(Ee[ae-1]=rr(Ee[ae-1],_));var go=Ee.reduce(function(Ot,Cr,En){if(!Cr||Cr==="0"){var sr=Ot[Ot.length-1];sr&&sr.index+sr.length===En?sr.length++:Ot.push({index:En,length:1})}return Ot},[]),Ft=go.sort(function(Ot,Cr){return Cr.length-Ot.length})[0],xr=void 0;if(Ft&&Ft.length>1){var xn=Ee.slice(0,Ft.index),Cn=Ee.slice(Ft.index+Ft.length);xr=xn.join(":")+"::"+Cn.join(":")}else xr=Ee.join(":");return ee&&(xr+="%"+ee),xr}else return $}var Cs=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Es="".match(/(){0}/)[1]===void 0;function kt($){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O={},R=_.iri!==!1?h:u;_.reference==="suffix"&&($=(_.scheme?_.scheme+":":"")+"//"+$);var L=$.match(Cs);if(L){Es?(O.scheme=L[1],O.userinfo=L[3],O.host=L[4],O.port=parseInt(L[5],10),O.path=L[6]||"",O.query=L[7],O.fragment=L[8],isNaN(O.port)&&(O.port=L[5])):(O.scheme=L[1]||void 0,O.userinfo=$.indexOf("@")!==-1?L[3]:void 0,O.host=$.indexOf("//")!==-1?L[4]:void 0,O.port=parseInt(L[5],10),O.path=L[6]||"",O.query=$.indexOf("?")!==-1?L[7]:void 0,O.fragment=$.indexOf("#")!==-1?L[8]:void 0,isNaN(O.port)&&(O.port=$.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?L[4]:void 0)),O.host&&(O.host=co(rr(O.host,R),R)),O.scheme===void 0&&O.userinfo===void 0&&O.host===void 0&&O.port===void 0&&!O.path&&O.query===void 0?O.reference="same-document":O.scheme===void 0?O.reference="relative":O.fragment===void 0?O.reference="absolute":O.reference="uri",_.reference&&_.reference!=="suffix"&&_.reference!==O.reference&&(O.error=O.error||"URI is not a "+_.reference+" reference.");var ee=z[(_.scheme||O.scheme||"").toLowerCase()];if(!_.unicodeSupport&&(!ee||!ee.unicodeSupport)){if(O.host&&(_.domainHost||ee&&ee.domainHost))try{O.host=B.toASCII(O.host.replace(R.PCT_ENCODED,ie).toLowerCase())}catch(Q){O.error=O.error||"Host's domain name can not be converted to ASCII via punycode: "+Q}oe(O,u)}else oe(O,R);ee&&ee.parse&&ee.parse(O,_)}else O.error=O.error||"URI can not be parsed.";return O}function $s($,_){var O=_.iri!==!1?h:u,R=[];return $.userinfo!==void 0&&(R.push($.userinfo),R.push("@")),$.host!==void 0&&R.push(co(rr(String($.host),O),O).replace(O.IPV6ADDRESS,function(L,ee,Q){return"["+ee+(Q?"%25"+Q:"")+"]"})),(typeof $.port=="number"||typeof $.port=="string")&&(R.push(":"),R.push(String($.port))),R.length?R.join(""):void 0}var uo=/^\.\.?\//,ho=/^\/\.(\/|$)/,fo=/^\/\.\.(\/|$)/,_s=/^\/?(?:.|\n)*?(?=\/|$)/;function nr($){for(var _=[];$.length;)if($.match(uo))$=$.replace(uo,"");else if($.match(ho))$=$.replace(ho,"/");else if($.match(fo))$=$.replace(fo,"/"),_.pop();else if($==="."||$==="..")$="";else{var O=$.match(_s);if(O){var R=O[0];$=$.slice(R.length),_.push(R)}else throw new Error("Unexpected dot segment condition")}return _.join("")}function gt($){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=_.iri?h:u,R=[],L=z[(_.scheme||$.scheme||"").toLowerCase()];if(L&&L.serialize&&L.serialize($,_),$.host&&!O.IPV6ADDRESS.test($.host)&&(_.domainHost||L&&L.domainHost))try{$.host=_.iri?B.toUnicode($.host):B.toASCII($.host.replace(O.PCT_ENCODED,ie).toLowerCase())}catch(ge){$.error=$.error||"Host's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+ge}oe($,O),_.reference!=="suffix"&&$.scheme&&(R.push($.scheme),R.push(":"));var ee=$s($,_);if(ee!==void 0&&(_.reference!=="suffix"&&R.push("//"),R.push(ee),$.path&&$.path.charAt(0)!=="/"&&R.push("/")),$.path!==void 0){var Q=$.path;!_.absolutePath&&(!L||!L.absolutePath)&&(Q=nr(Q)),ee===void 0&&(Q=Q.replace(/^\/\//,"/%2F")),R.push(Q)}return $.query!==void 0&&(R.push("?"),R.push($.query)),$.fragment!==void 0&&(R.push("#"),R.push($.fragment)),R.join("")}function po($,_){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=arguments[3],L={};return R||($=kt(gt($,O),O),_=kt(gt(_,O),O)),O=O||{},!O.tolerant&&_.scheme?(L.scheme=_.scheme,L.userinfo=_.userinfo,L.host=_.host,L.port=_.port,L.path=nr(_.path||""),L.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(L.userinfo=_.userinfo,L.host=_.host,L.port=_.port,L.path=nr(_.path||""),L.query=_.query):(_.path?(_.path.charAt(0)==="/"?L.path=nr(_.path):(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path?L.path="/"+_.path:$.path?L.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+_.path:L.path=_.path,L.path=nr(L.path)),L.query=_.query):(L.path=$.path,_.query!==void 0?L.query=_.query:L.query=$.query),L.userinfo=$.userinfo,L.host=$.host,L.port=$.port),L.scheme=$.scheme),L.fragment=_.fragment,L}function Ns($,_,O){var R=c({scheme:"null"},O);return gt(po(kt($,R),kt(_,R),R,!0),R)}function kn($,_){return typeof $=="string"?$=gt(kt($,_),_):s($)==="object"&&($=kt(gt($,_),_)),$}function As($,_,O){return typeof $=="string"?$=gt(kt($,O),O):s($)==="object"&&($=gt($,O)),typeof _=="string"?_=gt(kt(_,O),O):s(_)==="object"&&(_=gt(_,O)),$===_}function na($,_){return $&&$.toString().replace(!_||!_.iri?u.ESCAPE:h.ESCAPE,H)}function Nt($,_){return $&&$.toString().replace(!_||!_.iri?u.PCT_ENCODED:h.PCT_ENCODED,ie)}var Sn={scheme:"http",domainHost:!0,parse:function($,_){return $.host||($.error=$.error||"HTTP URIs must have a host."),$},serialize:function($,_){var O=String($.scheme).toLowerCase()==="https";return($.port===(O?443:80)||$.port==="")&&($.port=void 0),$.path||($.path="/"),$}},rp={scheme:"https",domainHost:Sn.domainHost,parse:Sn.parse,serialize:Sn.serialize};function np($){return typeof $.secure=="boolean"?$.secure:String($.scheme).toLowerCase()==="wss"}var Os={scheme:"ws",domainHost:!0,parse:function($,_){var O=$;return O.secure=np(O),O.resourceName=(O.path||"/")+(O.query?"?"+O.query:""),O.path=void 0,O.query=void 0,O},serialize:function($,_){if(($.port===(np($)?443:80)||$.port==="")&&($.port=void 0),typeof $.secure=="boolean"&&($.scheme=$.secure?"wss":"ws",$.secure=void 0),$.resourceName){var O=$.resourceName.split("?"),R=f(O,2),L=R[0],ee=R[1];$.path=L&&L!=="/"?L:void 0,$.query=ee,$.resourceName=void 0}return $.fragment=void 0,$}},op={scheme:"wss",domainHost:Os.domainHost,parse:Os.parse,serialize:Os.serialize},Sw={},sp="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",or="[0-9A-Fa-f]",xw=o(o("%[EFef]"+or+"%"+or+or+"%"+or+or)+"|"+o("%[89A-Fa-f]"+or+"%"+or+or)+"|"+o("%"+or+or)),Cw="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Ew="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",$w=n(Ew,'[\\"\\\\]'),_w="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Nw=new RegExp(sp,"g"),mo=new RegExp(xw,"g"),Aw=new RegExp(n("[^]",Cw,"[\\.]",'[\\"]',$w),"g"),ip=new RegExp(n("[^]",sp,_w),"g"),Ow=ip;function jc($){var _=ie($);return _.match(Nw)?_:$}var ap={scheme:"mailto",parse:function($,_){var O=$,R=O.to=O.path?O.path.split(","):[];if(O.path=void 0,O.query){for(var L=!1,ee={},Q=O.query.split("&"),ge=0,Fe=Q.length;ge<Fe;++ge){var Ce=Q[ge].split("=");switch(Ce[0]){case"to":for(var pe=Ce[1].split(","),_e=0,De=pe.length;_e<De;++_e)R.push(pe[_e]);break;case"subject":O.subject=Nt(Ce[1],_);break;case"body":O.body=Nt(Ce[1],_);break;default:L=!0,ee[Nt(Ce[0],_)]=Nt(Ce[1],_);break}}L&&(O.headers=ee)}O.query=void 0;for(var ae=0,qe=R.length;ae<qe;++ae){var Ee=R[ae].split("@");if(Ee[0]=Nt(Ee[0]),_.unicodeSupport)Ee[1]=Nt(Ee[1],_).toLowerCase();else try{Ee[1]=B.toASCII(Nt(Ee[1],_).toLowerCase())}catch(At){O.error=O.error||"Email address's domain name can not be converted to ASCII via punycode: "+At}R[ae]=Ee.join("@")}return O},serialize:function($,_){var O=$,R=l($.to);if(R){for(var L=0,ee=R.length;L<ee;++L){var Q=String(R[L]),ge=Q.lastIndexOf("@"),Fe=Q.slice(0,ge).replace(mo,jc).replace(mo,a).replace(Aw,H),Ce=Q.slice(ge+1);try{Ce=_.iri?B.toUnicode(Ce):B.toASCII(Nt(Ce,_).toLowerCase())}catch(ae){O.error=O.error||"Email address's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+ae}R[L]=Fe+"@"+Ce}O.path=R.join(",")}var pe=$.headers=$.headers||{};$.subject&&(pe.subject=$.subject),$.body&&(pe.body=$.body);var _e=[];for(var De in pe)pe[De]!==Sw[De]&&_e.push(De.replace(mo,jc).replace(mo,a).replace(ip,H)+"="+pe[De].replace(mo,jc).replace(mo,a).replace(Ow,H));return _e.length&&(O.query=_e.join("&")),O}},Tw=/^([^\:]+)\:(.*)/,lp={scheme:"urn",parse:function($,_){var O=$.path&&$.path.match(Tw),R=$;if(O){var L=_.scheme||R.scheme||"urn",ee=O[1].toLowerCase(),Q=O[2],ge=L+":"+(_.nid||ee),Fe=z[ge];R.nid=ee,R.nss=Q,R.path=void 0,Fe&&(R=Fe.parse(R,_))}else R.error=R.error||"URN can not be parsed.";return R},serialize:function($,_){var O=_.scheme||$.scheme||"urn",R=$.nid,L=O+":"+(_.nid||R),ee=z[L];ee&&($=ee.serialize($,_));var Q=$,ge=$.nss;return Q.path=(R||_.nid)+":"+ge,Q}},Bw=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,cp={scheme:"urn:uuid",parse:function($,_){var O=$;return O.uuid=O.nss,O.nss=void 0,!_.tolerant&&(!O.uuid||!O.uuid.match(Bw))&&(O.error=O.error||"UUID is not valid."),O},serialize:function($,_){var O=$;return O.nss=($.uuid||"").toLowerCase(),O}};z[Sn.scheme]=Sn,z[rp.scheme]=rp,z[Os.scheme]=Os,z[op.scheme]=op,z[ap.scheme]=ap,z[lp.scheme]=lp,z[cp.scheme]=cp,t.SCHEMES=z,t.pctEncChar=H,t.pctDecChars=ie,t.parse=kt,t.removeDotSegments=nr,t.serialize=gt,t.resolveComponents=po,t.resolve=Ns,t.normalize=kn,t.equal=As,t.escapeComponent=na,t.unescapeComponent=Nt,Object.defineProperty(t,"__esModule",{value:!0})})})($u,$u.exports);var aO=$u.exports;Object.defineProperty(qh,"__esModule",{value:!0});const kb=aO;kb.code='require("ajv/dist/runtime/uri").default';qh.default=kb;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var e=Dt;Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var t=ne;Object.defineProperty(r,"_",{enumerable:!0,get:function(){return t._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return t.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return t.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return t.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return t.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return t.CodeGen}});const n=is,o=as,s=Zn,a=ft,l=ne,c=tt,d=qi,u=he,h=iO,f=qh,p=(q,T)=>new RegExp(q,T);p.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function w(q){var T,V,D,E,A,B,z,H,ie,oe,ye,rr,co,Cs,Es,kt,$s,uo,ho,fo,_s,nr,gt,po,Ns;const kn=q.strict,As=(T=q.code)===null||T===void 0?void 0:T.optimize,na=As===!0||As===void 0?1:As||0,Nt=(D=(V=q.code)===null||V===void 0?void 0:V.regExp)!==null&&D!==void 0?D:p,Sn=(E=q.uriResolver)!==null&&E!==void 0?E:f.default;return{strictSchema:(B=(A=q.strictSchema)!==null&&A!==void 0?A:kn)!==null&&B!==void 0?B:!0,strictNumbers:(H=(z=q.strictNumbers)!==null&&z!==void 0?z:kn)!==null&&H!==void 0?H:!0,strictTypes:(oe=(ie=q.strictTypes)!==null&&ie!==void 0?ie:kn)!==null&&oe!==void 0?oe:"log",strictTuples:(rr=(ye=q.strictTuples)!==null&&ye!==void 0?ye:kn)!==null&&rr!==void 0?rr:"log",strictRequired:(Cs=(co=q.strictRequired)!==null&&co!==void 0?co:kn)!==null&&Cs!==void 0?Cs:!1,code:q.code?{...q.code,optimize:na,regExp:Nt}:{optimize:na,regExp:Nt},loopRequired:(Es=q.loopRequired)!==null&&Es!==void 0?Es:b,loopEnum:(kt=q.loopEnum)!==null&&kt!==void 0?kt:b,meta:($s=q.meta)!==null&&$s!==void 0?$s:!0,messages:(uo=q.messages)!==null&&uo!==void 0?uo:!0,inlineRefs:(ho=q.inlineRefs)!==null&&ho!==void 0?ho:!0,schemaId:(fo=q.schemaId)!==null&&fo!==void 0?fo:"$id",addUsedSchema:(_s=q.addUsedSchema)!==null&&_s!==void 0?_s:!0,validateSchema:(nr=q.validateSchema)!==null&&nr!==void 0?nr:!0,validateFormats:(gt=q.validateFormats)!==null&&gt!==void 0?gt:!0,unicodeRegExp:(po=q.unicodeRegExp)!==null&&po!==void 0?po:!0,int32range:(Ns=q.int32range)!==null&&Ns!==void 0?Ns:!0,uriResolver:Sn}}class S{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...w(T)};const{es5:V,lines:D}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:g,es5:V,lines:D}),this.logger=I(T.logger);const E=T.validateFormats;T.validateFormats=!1,this.RULES=(0,s.getRules)(),x.call(this,m,T,"NOT SUPPORTED"),x.call(this,v,T,"DEPRECATED","warn"),this._metaOpts=M.call(this),T.formats&&N.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&P.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),C.call(this),T.validateFormats=E}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:V,schemaId:D}=this.opts;let E=h;D==="id"&&(E={...h},E.id=E.$id,delete E.$id),V&&T&&this.addMetaSchema(E,E[D],!1)}defaultMeta(){const{meta:T,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[V]||T:void 0}validate(T,V){let D;if(typeof T=="string"){if(D=this.getSchema(T),!D)throw new Error(`no schema with key or ref "${T}"`)}else D=this.compile(T);const E=D(V);return"$async"in D||(this.errors=D.errors),E}compile(T,V){const D=this._addSchema(T,V);return D.validate||this._compileSchemaEnv(D)}compileAsync(T,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:D}=this.opts;return E.call(this,T,V);async function E(oe,ye){await A.call(this,oe.$schema);const rr=this._addSchema(oe,ye);return rr.validate||B.call(this,rr)}async function A(oe){oe&&!this.getSchema(oe)&&await E.call(this,{$ref:oe},!0)}async function B(oe){try{return this._compileSchemaEnv(oe)}catch(ye){if(!(ye instanceof o.default))throw ye;return z.call(this,ye),await H.call(this,ye.missingSchema),B.call(this,oe)}}function z({missingSchema:oe,missingRef:ye}){if(this.refs[oe])throw new Error(`AnySchema ${oe} is loaded but ${ye} cannot be resolved`)}async function H(oe){const ye=await ie.call(this,oe);this.refs[oe]||await A.call(this,ye.$schema),this.refs[oe]||this.addSchema(ye,oe,V)}async function ie(oe){const ye=this._loading[oe];if(ye)return ye;try{return await(this._loading[oe]=D(oe))}finally{delete this._loading[oe]}}}addSchema(T,V,D,E=this.opts.validateSchema){if(Array.isArray(T)){for(const B of T)this.addSchema(B,void 0,D,E);return this}let A;if(typeof T=="object"){const{schemaId:B}=this.opts;if(A=T[B],A!==void 0&&typeof A!="string")throw new Error(`schema ${B} must be string`)}return V=(0,c.normalizeId)(V||A),this._checkUnique(V),this.schemas[V]=this._addSchema(T,D,V,E,!0),this}addMetaSchema(T,V,D=this.opts.validateSchema){return this.addSchema(T,V,!0,D),this}validateSchema(T,V){if(typeof T=="boolean")return!0;let D;if(D=T.$schema,D!==void 0&&typeof D!="string")throw new Error("$schema must be a string");if(D=D||this.opts.defaultMeta||this.defaultMeta(),!D)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const E=this.validate(D,T);if(!E&&V){const A="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(A);else throw new Error(A)}return E}getSchema(T){let V;for(;typeof(V=k.call(this,T))=="string";)T=V;if(V===void 0){const{schemaId:D}=this.opts,E=new a.SchemaEnv({schema:{},schemaId:D});if(V=a.resolveSchema.call(this,E,T),!V)return;this.refs[T]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const V=k.call(this,T);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const V=T;this._cache.delete(V);let D=T[this.opts.schemaId];return D&&(D=(0,c.normalizeId)(D),delete this.schemas[D],delete this.refs[D]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const V of T)this.addKeyword(V);return this}addKeyword(T,V){let D;if(typeof T=="string")D=T,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=D);else if(typeof T=="object"&&V===void 0){if(V=T,D=V.keyword,Array.isArray(D)&&!D.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,D,V),!V)return(0,u.eachItem)(D,A=>te.call(this,A)),this;ke.call(this,V);const E={...V,type:(0,d.getJSONTypes)(V.type),schemaType:(0,d.getJSONTypes)(V.schemaType)};return(0,u.eachItem)(D,E.type.length===0?A=>te.call(this,A,E):A=>E.type.forEach(B=>te.call(this,A,E,B))),this}getKeyword(T){const V=this.RULES.all[T];return typeof V=="object"?V.definition:!!V}removeKeyword(T){const{RULES:V}=this;delete V.keywords[T],delete V.all[T];for(const D of V.rules){const E=D.rules.findIndex(A=>A.keyword===T);E>=0&&D.rules.splice(E,1)}return this}addFormat(T,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[T]=V,this}errorsText(T=this.errors,{separator:V=", ",dataVar:D="data"}={}){return!T||T.length===0?"No errors":T.map(E=>`${D}${E.instancePath} ${E.message}`).reduce((E,A)=>E+V+A)}$dataMetaSchema(T,V){const D=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const E of V){const A=E.split("/").slice(1);let B=T;for(const z of A)B=B[z];for(const z in D){const H=D[z];if(typeof H!="object")continue;const{$data:ie}=H.definition,oe=B[z];ie&&oe&&(B[z]=se(oe))}}return T}_removeAllSchemas(T,V){for(const D in T){const E=T[D];(!V||V.test(D))&&(typeof E=="string"?delete T[D]:E&&!E.meta&&(this._cache.delete(E.schema),delete T[D]))}}_addSchema(T,V,D,E=this.opts.validateSchema,A=this.opts.addUsedSchema){let B;const{schemaId:z}=this.opts;if(typeof T=="object")B=T[z];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let H=this._cache.get(T);if(H!==void 0)return H;D=(0,c.normalizeId)(B||D);const ie=c.getSchemaRefs.call(this,T,D);return H=new a.SchemaEnv({schema:T,schemaId:z,meta:V,baseId:D,localRefs:ie}),this._cache.set(H.schema,H),A&&!D.startsWith("#")&&(D&&this._checkUnique(D),this.refs[D]=H),E&&this.validateSchema(T,!0),H}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):a.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const V=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,T)}finally{this.opts=V}}}r.default=S,S.ValidationError=n.default,S.MissingRefError=o.default;function x(q,T,V,D="error"){for(const E in q){const A=E;A in T&&this.logger[D](`${V}: option ${E}. ${q[A]}`)}}function k(q){return q=(0,c.normalizeId)(q),this.schemas[q]||this.refs[q]}function C(){const q=this.opts.schemas;if(q)if(Array.isArray(q))this.addSchema(q);else for(const T in q)this.addSchema(q[T],T)}function N(){for(const q in this.opts.formats){const T=this.opts.formats[q];T&&this.addFormat(q,T)}}function P(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in q){const V=q[T];V.keyword||(V.keyword=T),this.addKeyword(V)}}function M(){const q={...this.opts};for(const T of y)delete q[T];return q}const j={log(){},warn(){},error(){}};function I(q){if(q===!1)return j;if(q===void 0)return console;if(q.log&&q.warn&&q.error)return q;throw new Error("logger must implement log, warn and error methods")}const X=/^[a-z_$][a-z0-9_$:-]*$/i;function W(q,T){const{RULES:V}=this;if((0,u.eachItem)(q,D=>{if(V.keywords[D])throw new Error(`Keyword ${D} is already defined`);if(!X.test(D))throw new Error(`Keyword ${D} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function te(q,T,V){var D;const E=T==null?void 0:T.post;if(V&&E)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:A}=this;let B=E?A.post:A.rules.find(({type:H})=>H===V);if(B||(B={type:V,rules:[]},A.rules.push(B)),A.keywords[q]=!0,!T)return;const z={keyword:q,definition:{...T,type:(0,d.getJSONTypes)(T.type),schemaType:(0,d.getJSONTypes)(T.schemaType)}};T.before?me.call(this,B,z,T.before):B.rules.push(z),A.all[q]=z,(D=T.implements)===null||D===void 0||D.forEach(H=>this.addKeyword(H))}function me(q,T,V){const D=q.rules.findIndex(E=>E.keyword===V);D>=0?q.rules.splice(D,0,T):(q.rules.push(T),this.logger.warn(`rule ${V} is not defined`))}function ke(q){let{metaSchema:T}=q;T!==void 0&&(q.$data&&this.opts.$data&&(T=se(T)),q.validateSchema=this.compile(T,!0))}const Se={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(q){return{anyOf:[q,Se]}}})(Kn);var zh={},lc={},Hh={};Object.defineProperty(Hh,"__esModule",{value:!0});const lO={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Hh.default=lO;var br={};Object.defineProperty(br,"__esModule",{value:!0});br.callRef=br.getValidate=void 0;const cO=as,lg=de,yt=ne,bo=_t,cg=ft,Oa=he,dO={keyword:"$ref",schemaType:"string",code(r){const{gen:e,schema:t,it:n}=r,{baseId:o,schemaEnv:s,validateName:a,opts:l,self:c}=n,{root:d}=s;if((t==="#"||t==="#/")&&o===d.baseId)return h();const u=cg.resolveRef.call(c,d,o,t);if(u===void 0)throw new cO.default(n.opts.uriResolver,o,t);if(u instanceof cg.SchemaEnv)return f(u);return p(u);function h(){if(s===d)return tl(r,a,s,s.$async);const y=e.scopeValue("root",{ref:d});return tl(r,(0,yt._)`${y}.validate`,d,d.$async)}function f(y){const g=Sb(r,y);tl(r,g,y,y.$async)}function p(y){const g=e.scopeValue("schema",l.code.source===!0?{ref:y,code:(0,yt.stringify)(y)}:{ref:y}),m=e.name("valid"),v=r.subschema({schema:y,dataTypes:[],schemaPath:yt.nil,topSchemaRef:g,errSchemaPath:t},m);r.mergeEvaluated(v),r.ok(m)}}};function Sb(r,e){const{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,yt._)`${t.scopeValue("wrapper",{ref:e})}.validate`}br.getValidate=Sb;function tl(r,e,t,n){const{gen:o,it:s}=r,{allErrors:a,schemaEnv:l,opts:c}=s,d=c.passContext?bo.default.this:yt.nil;n?u():h();function u(){if(!l.$async)throw new Error("async schema referenced by sync schema");const y=o.let("valid");o.try(()=>{o.code((0,yt._)`await ${(0,lg.callValidateCode)(r,e,d)}`),p(e),a||o.assign(y,!0)},g=>{o.if((0,yt._)`!(${g} instanceof ${s.ValidationError})`,()=>o.throw(g)),f(g),a||o.assign(y,!1)}),r.ok(y)}function h(){r.result((0,lg.callValidateCode)(r,e,d),()=>p(e),()=>f(e))}function f(y){const g=(0,yt._)`${y}.errors`;o.assign(bo.default.vErrors,(0,yt._)`${bo.default.vErrors} === null ? ${g} : ${bo.default.vErrors}.concat(${g})`),o.assign(bo.default.errors,(0,yt._)`${bo.default.vErrors}.length`)}function p(y){var g;if(!s.opts.unevaluated)return;const m=(g=t==null?void 0:t.validate)===null||g===void 0?void 0:g.evaluated;if(s.props!==!0)if(m&&!m.dynamicProps)m.props!==void 0&&(s.props=Oa.mergeEvaluated.props(o,m.props,s.props));else{const v=o.var("props",(0,yt._)`${y}.evaluated.props`);s.props=Oa.mergeEvaluated.props(o,v,s.props,yt.Name)}if(s.items!==!0)if(m&&!m.dynamicItems)m.items!==void 0&&(s.items=Oa.mergeEvaluated.items(o,m.items,s.items));else{const v=o.var("items",(0,yt._)`${y}.evaluated.items`);s.items=Oa.mergeEvaluated.items(o,v,s.items,yt.Name)}}}br.callRef=tl;br.default=dO;Object.defineProperty(lc,"__esModule",{value:!0});const uO=Hh,hO=br,fO=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",uO.default,hO.default];lc.default=fO;var cc={},Uh={};Object.defineProperty(Uh,"__esModule",{value:!0});const Nl=ne,Wr=Nl.operators,Al={maximum:{okStr:"<=",ok:Wr.LTE,fail:Wr.GT},minimum:{okStr:">=",ok:Wr.GTE,fail:Wr.LT},exclusiveMaximum:{okStr:"<",ok:Wr.LT,fail:Wr.GTE},exclusiveMinimum:{okStr:">",ok:Wr.GT,fail:Wr.LTE}},pO={message:({keyword:r,schemaCode:e})=>(0,Nl.str)`must be ${Al[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Nl._)`{comparison: ${Al[r].okStr}, limit: ${e}}`},mO={keyword:Object.keys(Al),type:"number",schemaType:"number",$data:!0,error:pO,code(r){const{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,Nl._)`${t} ${Al[e].fail} ${n} || isNaN(${t})`)}};Uh.default=mO;var dc={};Object.defineProperty(dc,"__esModule",{value:!0});const ii=ne,gO={message:({schemaCode:r})=>(0,ii.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,ii._)`{multipleOf: ${r}}`},yO={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:gO,code(r){const{gen:e,data:t,schemaCode:n,it:o}=r,s=o.opts.multipleOfPrecision,a=e.let("res"),l=s?(0,ii._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,ii._)`${a} !== parseInt(${a})`;r.fail$data((0,ii._)`(${n} === 0 || (${a} = ${t}/${n}, ${l}))`)}};dc.default=yO;var uc={},Kh={};Object.defineProperty(Kh,"__esModule",{value:!0});function xb(r){const e=r.length;let t=0,n=0,o;for(;n<e;)t++,o=r.charCodeAt(n++),o>=55296&&o<=56319&&n<e&&(o=r.charCodeAt(n),(o&64512)===56320&&n++);return t}Kh.default=xb;xb.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(uc,"__esModule",{value:!0});const Tn=ne,vO=he,bO=Kh,wO={message({keyword:r,schemaCode:e}){const t=r==="maxLength"?"more":"fewer";return(0,Tn.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Tn._)`{limit: ${r}}`},kO={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:wO,code(r){const{keyword:e,data:t,schemaCode:n,it:o}=r,s=e==="maxLength"?Tn.operators.GT:Tn.operators.LT,a=o.opts.unicode===!1?(0,Tn._)`${t}.length`:(0,Tn._)`${(0,vO.useFunc)(r.gen,bO.default)}(${t})`;r.fail$data((0,Tn._)`${a} ${s} ${n}`)}};uc.default=kO;var hc={};Object.defineProperty(hc,"__esModule",{value:!0});const SO=de,Ol=ne,xO={message:({schemaCode:r})=>(0,Ol.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,Ol._)`{pattern: ${r}}`},CO={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:xO,code(r){const{data:e,$data:t,schema:n,schemaCode:o,it:s}=r,a=s.opts.unicodeRegExp?"u":"",l=t?(0,Ol._)`(new RegExp(${o}, ${a}))`:(0,SO.usePattern)(r,n);r.fail$data((0,Ol._)`!${l}.test(${e})`)}};hc.default=CO;var fc={};Object.defineProperty(fc,"__esModule",{value:!0});const ai=ne,EO={message({keyword:r,schemaCode:e}){const t=r==="maxProperties"?"more":"fewer";return(0,ai.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,ai._)`{limit: ${r}}`},$O={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:EO,code(r){const{keyword:e,data:t,schemaCode:n}=r,o=e==="maxProperties"?ai.operators.GT:ai.operators.LT;r.fail$data((0,ai._)`Object.keys(${t}).length ${o} ${n}`)}};fc.default=$O;var pc={};Object.defineProperty(pc,"__esModule",{value:!0});const qs=de,li=ne,_O=he,NO={message:({params:{missingProperty:r}})=>(0,li.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,li._)`{missingProperty: ${r}}`},AO={keyword:"required",type:"object",schemaType:"array",$data:!0,error:NO,code(r){const{gen:e,schema:t,schemaCode:n,data:o,$data:s,it:a}=r,{opts:l}=a;if(!s&&t.length===0)return;const c=t.length>=l.loopRequired;if(a.allErrors?d():u(),l.strictRequired){const p=r.parentSchema.properties,{definedProperties:y}=r.it;for(const g of t)if((p==null?void 0:p[g])===void 0&&!y.has(g)){const m=a.schemaEnv.baseId+a.errSchemaPath,v=`required property "${g}" is not defined at "${m}" (strictRequired)`;(0,_O.checkStrictMode)(a,v,a.opts.strictRequired)}}function d(){if(c||s)r.block$data(li.nil,h);else for(const p of t)(0,qs.checkReportMissingProp)(r,p)}function u(){const p=e.let("missing");if(c||s){const y=e.let("valid",!0);r.block$data(y,()=>f(p,y)),r.ok(y)}else e.if((0,qs.checkMissingProp)(r,t,p)),(0,qs.reportMissingProp)(r,p),e.else()}function h(){e.forOf("prop",n,p=>{r.setParams({missingProperty:p}),e.if((0,qs.noPropertyInData)(e,o,p,l.ownProperties),()=>r.error())})}function f(p,y){r.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(y,(0,qs.propertyInData)(e,o,p,l.ownProperties)),e.if((0,li.not)(y),()=>{r.error(),e.break()})},li.nil)}}};pc.default=AO;var mc={};Object.defineProperty(mc,"__esModule",{value:!0});const ci=ne,OO={message({keyword:r,schemaCode:e}){const t=r==="maxItems"?"more":"fewer";return(0,ci.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,ci._)`{limit: ${r}}`},TO={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:OO,code(r){const{keyword:e,data:t,schemaCode:n}=r,o=e==="maxItems"?ci.operators.GT:ci.operators.LT;r.fail$data((0,ci._)`${t}.length ${o} ${n}`)}};mc.default=TO;var gc={},zi={};Object.defineProperty(zi,"__esModule",{value:!0});const Cb=ob;Cb.code='require("ajv/dist/runtime/equal").default';zi.default=Cb;Object.defineProperty(gc,"__esModule",{value:!0});const dd=qi,Qe=ne,BO=he,PO=zi,IO={message:({params:{i:r,j:e}})=>(0,Qe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,Qe._)`{i: ${r}, j: ${e}}`},MO={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:IO,code(r){const{gen:e,data:t,$data:n,schema:o,parentSchema:s,schemaCode:a,it:l}=r;if(!n&&!o)return;const c=e.let("valid"),d=s.items?(0,dd.getSchemaTypes)(s.items):[];r.block$data(c,u,(0,Qe._)`${a} === false`),r.ok(c);function u(){const y=e.let("i",(0,Qe._)`${t}.length`),g=e.let("j");r.setParams({i:y,j:g}),e.assign(c,!0),e.if((0,Qe._)`${y} > 1`,()=>(h()?f:p)(y,g))}function h(){return d.length>0&&!d.some(y=>y==="object"||y==="array")}function f(y,g){const m=e.name("item"),v=(0,dd.checkDataTypes)(d,m,l.opts.strictNumbers,dd.DataType.Wrong),b=e.const("indices",(0,Qe._)`{}`);e.for((0,Qe._)`;${y}--;`,()=>{e.let(m,(0,Qe._)`${t}[${y}]`),e.if(v,(0,Qe._)`continue`),d.length>1&&e.if((0,Qe._)`typeof ${m} == "string"`,(0,Qe._)`${m} += "_"`),e.if((0,Qe._)`typeof ${b}[${m}] == "number"`,()=>{e.assign(g,(0,Qe._)`${b}[${m}]`),r.error(),e.assign(c,!1).break()}).code((0,Qe._)`${b}[${m}] = ${y}`)})}function p(y,g){const m=(0,BO.useFunc)(e,PO.default),v=e.name("outer");e.label(v).for((0,Qe._)`;${y}--;`,()=>e.for((0,Qe._)`${g} = ${y}; ${g}--;`,()=>e.if((0,Qe._)`${m}(${t}[${y}], ${t}[${g}])`,()=>{r.error(),e.assign(c,!1).break(v)})))}}};gc.default=MO;var yc={};Object.defineProperty(yc,"__esModule",{value:!0});const _u=ne,DO=he,VO=zi,RO={message:"must be equal to constant",params:({schemaCode:r})=>(0,_u._)`{allowedValue: ${r}}`},LO={keyword:"const",$data:!0,error:RO,code(r){const{gen:e,data:t,$data:n,schemaCode:o,schema:s}=r;n||s&&typeof s=="object"?r.fail$data((0,_u._)`!${(0,DO.useFunc)(e,VO.default)}(${t}, ${o})`):r.fail((0,_u._)`${s} !== ${t}`)}};yc.default=LO;var vc={};Object.defineProperty(vc,"__esModule",{value:!0});const Js=ne,jO=he,FO=zi,qO={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,Js._)`{allowedValues: ${r}}`},zO={keyword:"enum",schemaType:"array",$data:!0,error:qO,code(r){const{gen:e,data:t,$data:n,schema:o,schemaCode:s,it:a}=r;if(!n&&o.length===0)throw new Error("enum must have non-empty array");const l=o.length>=a.opts.loopEnum;let c;const d=()=>c??(c=(0,jO.useFunc)(e,FO.default));let u;if(l||n)u=e.let("valid"),r.block$data(u,h);else{if(!Array.isArray(o))throw new Error("ajv implementation error");const p=e.const("vSchema",s);u=(0,Js.or)(...o.map((y,g)=>f(p,g)))}r.pass(u);function h(){e.assign(u,!1),e.forOf("v",s,p=>e.if((0,Js._)`${d()}(${t}, ${p})`,()=>e.assign(u,!0).break()))}function f(p,y){const g=o[y];return typeof g=="object"&&g!==null?(0,Js._)`${d()}(${t}, ${p}[${y}])`:(0,Js._)`${t} === ${g}`}}};vc.default=zO;Object.defineProperty(cc,"__esModule",{value:!0});const HO=Uh,UO=dc,KO=uc,WO=hc,GO=fc,JO=pc,YO=mc,XO=gc,QO=yc,ZO=vc,eT=[HO.default,UO.default,KO.default,WO.default,GO.default,JO.default,YO.default,XO.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},QO.default,ZO.default];cc.default=eT;var Hi={},ls={};Object.defineProperty(ls,"__esModule",{value:!0});ls.validateAdditionalItems=void 0;const Bn=ne,Nu=he,tT={message:({params:{len:r}})=>(0,Bn.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Bn._)`{limit: ${r}}`},rT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:tT,code(r){const{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Nu.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Eb(r,n)}};function Eb(r,e){const{gen:t,schema:n,data:o,keyword:s,it:a}=r;a.items=!0;const l=t.const("len",(0,Bn._)`${o}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Bn._)`${l} <= ${e.length}`);else if(typeof n=="object"&&!(0,Nu.alwaysValidSchema)(a,n)){const d=t.var("valid",(0,Bn._)`${l} <= ${e.length}`);t.if((0,Bn.not)(d),()=>c(d)),r.ok(d)}function c(d){t.forRange("i",e.length,l,u=>{r.subschema({keyword:s,dataProp:u,dataPropType:Nu.Type.Num},d),a.allErrors||t.if((0,Bn.not)(d),()=>t.break())})}}ls.validateAdditionalItems=Eb;ls.default=rT;var Wh={},cs={};Object.defineProperty(cs,"__esModule",{value:!0});cs.validateTuple=void 0;const dg=ne,rl=he,nT=de,oT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){const{schema:e,it:t}=r;if(Array.isArray(e))return $b(r,"additionalItems",e);t.items=!0,!(0,rl.alwaysValidSchema)(t,e)&&r.ok((0,nT.validateArray)(r))}};function $b(r,e,t=r.schema){const{gen:n,parentSchema:o,data:s,keyword:a,it:l}=r;u(o),l.opts.unevaluated&&t.length&&l.items!==!0&&(l.items=rl.mergeEvaluated.items(n,t.length,l.items));const c=n.name("valid"),d=n.const("len",(0,dg._)`${s}.length`);t.forEach((h,f)=>{(0,rl.alwaysValidSchema)(l,h)||(n.if((0,dg._)`${d} > ${f}`,()=>r.subschema({keyword:a,schemaProp:f,dataProp:f},c)),r.ok(c))});function u(h){const{opts:f,errSchemaPath:p}=l,y=t.length,g=y===h.minItems&&(y===h.maxItems||h[e]===!1);if(f.strictTuples&&!g){const m=`"${a}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,rl.checkStrictMode)(l,m,f.strictTuples)}}}cs.validateTuple=$b;cs.default=oT;Object.defineProperty(Wh,"__esModule",{value:!0});const sT=cs,iT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,sT.validateTuple)(r,"items")};Wh.default=iT;var Gh={};Object.defineProperty(Gh,"__esModule",{value:!0});const ug=ne,aT=he,lT=de,cT=ls,dT={message:({params:{len:r}})=>(0,ug.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,ug._)`{limit: ${r}}`},uT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:dT,code(r){const{schema:e,parentSchema:t,it:n}=r,{prefixItems:o}=t;n.items=!0,!(0,aT.alwaysValidSchema)(n,e)&&(o?(0,cT.validateAdditionalItems)(r,o):r.ok((0,lT.validateArray)(r)))}};Gh.default=uT;var Jh={};Object.defineProperty(Jh,"__esModule",{value:!0});const Pt=ne,Ta=he,hT={message:({params:{min:r,max:e}})=>e===void 0?(0,Pt.str)`must contain at least ${r} valid item(s)`:(0,Pt.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,Pt._)`{minContains: ${r}}`:(0,Pt._)`{minContains: ${r}, maxContains: ${e}}`},fT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:hT,code(r){const{gen:e,schema:t,parentSchema:n,data:o,it:s}=r;let a,l;const{minContains:c,maxContains:d}=n;s.opts.next?(a=c===void 0?1:c,l=d):a=1;const u=e.const("len",(0,Pt._)`${o}.length`);if(r.setParams({min:a,max:l}),l===void 0&&a===0){(0,Ta.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(l!==void 0&&a>l){(0,Ta.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Ta.alwaysValidSchema)(s,t)){let g=(0,Pt._)`${u} >= ${a}`;l!==void 0&&(g=(0,Pt._)`${g} && ${u} <= ${l}`),r.pass(g);return}s.items=!0;const h=e.name("valid");l===void 0&&a===1?p(h,()=>e.if(h,()=>e.break())):a===0?(e.let(h,!0),l!==void 0&&e.if((0,Pt._)`${o}.length > 0`,f)):(e.let(h,!1),f()),r.result(h,()=>r.reset());function f(){const g=e.name("_valid"),m=e.let("count",0);p(g,()=>e.if(g,()=>y(m)))}function p(g,m){e.forRange("i",0,u,v=>{r.subschema({keyword:"contains",dataProp:v,dataPropType:Ta.Type.Num,compositeRule:!0},g),m()})}function y(g){e.code((0,Pt._)`${g}++`),l===void 0?e.if((0,Pt._)`${g} >= ${a}`,()=>e.assign(h,!0).break()):(e.if((0,Pt._)`${g} > ${l}`,()=>e.assign(h,!1).break()),a===1?e.assign(h,!0):e.if((0,Pt._)`${g} >= ${a}`,()=>e.assign(h,!0)))}}};Jh.default=fT;var bc={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const e=ne,t=he,n=de;r.error={message:({params:{property:c,depsCount:d,deps:u}})=>{const h=d===1?"property":"properties";return(0,e.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:u,missingProperty:h}})=>(0,e._)`{property: ${c},
67
67
  missingProperty: ${h},
68
68
  depsCount: ${d},
69
- deps: ${u}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(c){const[d,u]=s(c);a(c,d),l(c,u)}};function s({schema:c}){const d={},u={};for(const h in c){if(h==="__proto__")continue;const f=Array.isArray(c[h])?d:u;f[h]=c[h]}return[d,u]}function a(c,d=c.schema){const{gen:u,data:h,it:f}=c;if(Object.keys(d).length===0)return;const p=u.let("missing");for(const y in d){const g=d[y];if(g.length===0)continue;const m=(0,n.propertyInData)(u,h,y,f.opts.ownProperties);c.setParams({property:y,depsCount:g.length,deps:g.join(", ")}),f.allErrors?u.if(m,()=>{for(const v of g)(0,n.checkReportMissingProp)(c,v)}):(u.if((0,e._)`${m} && (${(0,n.checkMissingProp)(c,g,p)})`),(0,n.reportMissingProp)(c,p),u.else())}}r.validatePropertyDeps=a;function l(c,d=c.schema){const{gen:u,data:h,keyword:f,it:p}=c,y=u.name("valid");for(const g in d)(0,t.alwaysValidSchema)(p,d[g])||(u.if((0,n.propertyInData)(u,h,g,p.opts.ownProperties),()=>{const m=c.subschema({keyword:f,schemaProp:g},y);c.mergeValidEvaluated(m,y)},()=>u.var(y,!0)),c.ok(y))}r.validateSchemaDeps=l,r.default=o})(vc);var Jh={};Object.defineProperty(Jh,"__esModule",{value:!0});const _b=ne,pT=he,mT={message:"property name must be valid",params:({params:r})=>(0,_b._)`{propertyName: ${r.propertyName}}`},gT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:mT,code(r){const{gen:e,schema:t,data:n,it:o}=r;if((0,pT.alwaysValidSchema)(o,t))return;const s=e.name("valid");e.forIn("key",n,a=>{r.setParams({propertyName:a}),r.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),e.if((0,_b.not)(s),()=>{r.error(!0),o.allErrors||e.break()})}),r.ok(s)}};Jh.default=gT;var bc={};Object.defineProperty(bc,"__esModule",{value:!0});const Ba=de,zt=ne,yT=_t,Pa=he,vT={message:"must NOT have additional properties",params:({params:r})=>(0,zt._)`{additionalProperty: ${r.additionalProperty}}`},bT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:vT,code(r){const{gen:e,schema:t,parentSchema:n,data:o,errsCount:s,it:a}=r;if(!s)throw new Error("ajv implementation error");const{allErrors:l,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,Pa.alwaysValidSchema)(a,t))return;const d=(0,Ba.allSchemaProperties)(n.properties),u=(0,Ba.allSchemaProperties)(n.patternProperties);h(),r.ok((0,zt._)`${s} === ${yT.default.errors}`);function h(){e.forIn("key",o,m=>{!d.length&&!u.length?y(m):e.if(f(m),()=>y(m))})}function f(m){let v;if(d.length>8){const b=(0,Pa.schemaRefOrVal)(a,n.properties,"properties");v=(0,Ba.isOwnProperty)(e,b,m)}else d.length?v=(0,zt.or)(...d.map(b=>(0,zt._)`${m} === ${b}`)):v=zt.nil;return u.length&&(v=(0,zt.or)(v,...u.map(b=>(0,zt._)`${(0,Ba.usePattern)(r,b)}.test(${m})`))),(0,zt.not)(v)}function p(m){e.code((0,zt._)`delete ${o}[${m}]`)}function y(m){if(c.removeAdditional==="all"||c.removeAdditional&&t===!1){p(m);return}if(t===!1){r.setParams({additionalProperty:m}),r.error(),l||e.break();return}if(typeof t=="object"&&!(0,Pa.alwaysValidSchema)(a,t)){const v=e.name("valid");c.removeAdditional==="failing"?(g(m,v,!1),e.if((0,zt.not)(v),()=>{r.reset(),p(m)})):(g(m,v),l||e.if((0,zt.not)(v),()=>e.break()))}}function g(m,v,b){const w={keyword:"additionalProperties",dataProp:m,dataPropType:Pa.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(w,v)}}};bc.default=bT;var Yh={};Object.defineProperty(Yh,"__esModule",{value:!0});const wT=Dt,hg=de,dd=he,fg=bc,kT={keyword:"properties",type:"object",schemaType:"object",code(r){const{gen:e,schema:t,parentSchema:n,data:o,it:s}=r;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&fg.default.code(new wT.KeywordCxt(s,fg.default,"additionalProperties"));const a=(0,hg.allSchemaProperties)(t);for(const h of a)s.definedProperties.add(h);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=dd.mergeEvaluated.props(e,(0,dd.toHash)(a),s.props));const l=a.filter(h=>!(0,dd.alwaysValidSchema)(s,t[h]));if(l.length===0)return;const c=e.name("valid");for(const h of l)d(h)?u(h):(e.if((0,hg.propertyInData)(e,o,h,s.opts.ownProperties)),u(h),s.allErrors||e.else().var(c,!0),e.endIf()),r.it.definedProperties.add(h),r.ok(c);function d(h){return s.opts.useDefaults&&!s.compositeRule&&t[h].default!==void 0}function u(h){r.subschema({keyword:"properties",schemaProp:h,dataProp:h},c)}}};Yh.default=kT;var Xh={};Object.defineProperty(Xh,"__esModule",{value:!0});const pg=de,Ia=ne,mg=he,gg=he,ST={keyword:"patternProperties",type:"object",schemaType:"object",code(r){const{gen:e,schema:t,data:n,parentSchema:o,it:s}=r,{opts:a}=s,l=(0,pg.allSchemaProperties)(t),c=l.filter(g=>(0,mg.alwaysValidSchema)(s,t[g]));if(l.length===0||c.length===l.length&&(!s.opts.unevaluated||s.props===!0))return;const d=a.strictSchema&&!a.allowMatchingProperties&&o.properties,u=e.name("valid");s.props!==!0&&!(s.props instanceof Ia.Name)&&(s.props=(0,gg.evaluatedPropsToName)(e,s.props));const{props:h}=s;f();function f(){for(const g of l)d&&p(g),s.allErrors?y(g):(e.var(u,!0),y(g),e.if(u))}function p(g){for(const m in d)new RegExp(g).test(m)&&(0,mg.checkStrictMode)(s,`property ${m} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){e.forIn("key",n,m=>{e.if((0,Ia._)`${(0,pg.usePattern)(r,g)}.test(${m})`,()=>{const v=c.includes(g);v||r.subschema({keyword:"patternProperties",schemaProp:g,dataProp:m,dataPropType:gg.Type.Str},u),s.opts.unevaluated&&h!==!0?e.assign((0,Ia._)`${h}[${m}]`,!0):!v&&!s.allErrors&&e.if((0,Ia.not)(u),()=>e.break())})})}}};Xh.default=ST;var Qh={};Object.defineProperty(Qh,"__esModule",{value:!0});const xT=he,CT={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:e,schema:t,it:n}=r;if((0,xT.alwaysValidSchema)(n,t)){r.fail();return}const o=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};Qh.default=CT;var Zh={};Object.defineProperty(Zh,"__esModule",{value:!0});const ET=de,$T={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ET.validateUnion,error:{message:"must match a schema in anyOf"}};Zh.default=$T;var ef={};Object.defineProperty(ef,"__esModule",{value:!0});const nl=ne,_T=he,NT={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,nl._)`{passingSchemas: ${r.passing}}`},AT={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:NT,code(r){const{gen:e,schema:t,parentSchema:n,it:o}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;const s=t,a=e.let("valid",!1),l=e.let("passing",null),c=e.name("_valid");r.setParams({passing:l}),e.block(d),r.result(a,()=>r.reset(),()=>r.error(!0));function d(){s.forEach((u,h)=>{let f;(0,_T.alwaysValidSchema)(o,u)?e.var(c,!0):f=r.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},c),h>0&&e.if((0,nl._)`${c} && ${a}`).assign(a,!1).assign(l,(0,nl._)`[${l}, ${h}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(l,h),f&&r.mergeEvaluated(f,nl.Name)})})}}};ef.default=AT;var tf={};Object.defineProperty(tf,"__esModule",{value:!0});const OT=he,TT={keyword:"allOf",schemaType:"array",code(r){const{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");const o=e.name("valid");t.forEach((s,a)=>{if((0,OT.alwaysValidSchema)(n,s))return;const l=r.subschema({keyword:"allOf",schemaProp:a},o);r.ok(o),r.mergeEvaluated(l)})}};tf.default=TT;var rf={};Object.defineProperty(rf,"__esModule",{value:!0});const Tl=ne,Nb=he,BT={message:({params:r})=>(0,Tl.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,Tl._)`{failingKeyword: ${r.ifClause}}`},PT={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:BT,code(r){const{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,Nb.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const o=yg(n,"then"),s=yg(n,"else");if(!o&&!s)return;const a=e.let("valid",!0),l=e.name("_valid");if(c(),r.reset(),o&&s){const u=e.let("ifClause");r.setParams({ifClause:u}),e.if(l,d("then",u),d("else",u))}else o?e.if(l,d("then")):e.if((0,Tl.not)(l),d("else"));r.pass(a,()=>r.error(!0));function c(){const u=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);r.mergeEvaluated(u)}function d(u,h){return()=>{const f=r.subschema({keyword:u},l);e.assign(a,l),r.mergeValidEvaluated(f,a),h?e.assign(h,(0,Tl._)`${u}`):r.setParams({ifClause:u})}}}};function yg(r,e){const t=r.schema[e];return t!==void 0&&!(0,Nb.alwaysValidSchema)(r,t)}rf.default=PT;var nf={};Object.defineProperty(nf,"__esModule",{value:!0});const IT=he,MT={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,IT.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};nf.default=MT;Object.defineProperty(Hi,"__esModule",{value:!0});const DT=ls,VT=Kh,RT=cs,LT=Wh,jT=Gh,FT=vc,qT=Jh,zT=bc,HT=Yh,UT=Xh,KT=Qh,WT=Zh,GT=ef,JT=tf,YT=rf,XT=nf;function QT(r=!1){const e=[KT.default,WT.default,GT.default,JT.default,YT.default,XT.default,qT.default,zT.default,FT.default,HT.default,UT.default];return r?e.push(VT.default,LT.default):e.push(DT.default,RT.default),e.push(jT.default),e}Hi.default=QT;var Ui={},of={};Object.defineProperty(of,"__esModule",{value:!0});const Ve=ne,ZT={message:({schemaCode:r})=>(0,Ve.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,Ve._)`{format: ${r}}`},eB={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:ZT,code(r,e){const{gen:t,data:n,$data:o,schema:s,schemaCode:a,it:l}=r,{opts:c,errSchemaPath:d,schemaEnv:u,self:h}=l;if(!c.validateFormats)return;o?f():p();function f(){const y=t.scopeValue("formats",{ref:h.formats,code:c.code.formats}),g=t.const("fDef",(0,Ve._)`${y}[${a}]`),m=t.let("fType"),v=t.let("format");t.if((0,Ve._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>t.assign(m,(0,Ve._)`${g}.type || "string"`).assign(v,(0,Ve._)`${g}.validate`),()=>t.assign(m,(0,Ve._)`"string"`).assign(v,g)),r.fail$data((0,Ve.or)(b(),w()));function b(){return c.strictSchema===!1?Ve.nil:(0,Ve._)`${a} && !${v}`}function w(){const S=u.$async?(0,Ve._)`(${g}.async ? await ${v}(${n}) : ${v}(${n}))`:(0,Ve._)`${v}(${n})`,x=(0,Ve._)`(typeof ${v} == "function" ? ${S} : ${v}.test(${n}))`;return(0,Ve._)`${v} && ${v} !== true && ${m} === ${e} && !${x}`}}function p(){const y=h.formats[s];if(!y){b();return}if(y===!0)return;const[g,m,v]=w(y);g===e&&r.pass(S());function b(){if(c.strictSchema===!1){h.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${s}" ignored in schema at path "${d}"`}}function w(x){const k=x instanceof RegExp?(0,Ve.regexpCode)(x):c.code.formats?(0,Ve._)`${c.code.formats}${(0,Ve.getProperty)(s)}`:void 0,C=t.scopeValue("formats",{key:s,ref:x,code:k});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,Ve._)`${C}.validate`]:["string",x,C]}function S(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Ve._)`await ${v}(${n})`}return typeof m=="function"?(0,Ve._)`${v}(${n})`:(0,Ve._)`${v}.test(${n})`}}}};of.default=eB;Object.defineProperty(Ui,"__esModule",{value:!0});const tB=of,rB=[tB.default];Ui.default=rB;var eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.contentVocabulary=eo.metadataVocabulary=void 0;eo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];eo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(qh,"__esModule",{value:!0});const nB=ac,oB=lc,sB=Hi,iB=Ui,vg=eo,aB=[nB.default,oB.default,(0,sB.default)(),iB.default,vg.metadataVocabulary,vg.contentVocabulary];qh.default=aB;var Ki={},Ab={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r.DiscrError||(r.DiscrError={}))})(Ab);Object.defineProperty(Ki,"__esModule",{value:!0});const xo=ne,Nu=Ab,bg=ft,lB=he,cB={message:({params:{discrError:r,tagName:e}})=>r===Nu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,xo._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},dB={keyword:"discriminator",type:"object",schemaType:"object",error:cB,code(r){const{gen:e,data:t,schema:n,parentSchema:o,it:s}=r,{oneOf:a}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=n.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const c=e.let("valid",!1),d=e.const("tag",(0,xo._)`${t}${(0,xo.getProperty)(l)}`);e.if((0,xo._)`typeof ${d} == "string"`,()=>u(),()=>r.error(!1,{discrError:Nu.DiscrError.Tag,tag:d,tagName:l})),r.ok(c);function u(){const p=f();e.if(!1);for(const y in p)e.elseIf((0,xo._)`${d} === ${y}`),e.assign(c,h(p[y]));e.else(),r.error(!1,{discrError:Nu.DiscrError.Mapping,tag:d,tagName:l}),e.endIf()}function h(p){const y=e.name("valid"),g=r.subschema({keyword:"oneOf",schemaProp:p},y);return r.mergeEvaluated(g,xo.Name),y}function f(){var p;const y={},g=v(o);let m=!0;for(let S=0;S<a.length;S++){let x=a[S];x!=null&&x.$ref&&!(0,lB.schemaHasRulesButRef)(x,s.self.RULES)&&(x=bg.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,x==null?void 0:x.$ref),x instanceof bg.SchemaEnv&&(x=x.schema));const k=(p=x==null?void 0:x.properties)===null||p===void 0?void 0:p[l];if(typeof k!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);m=m&&(g||v(x)),b(k,S)}if(!m)throw new Error(`discriminator: "${l}" must be required`);return y;function v({required:S}){return Array.isArray(S)&&S.includes(l)}function b(S,x){if(S.const)w(S.const,x);else if(S.enum)for(const k of S.enum)w(k,x);else throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`)}function w(S,x){if(typeof S!="string"||S in y)throw new Error(`discriminator: "${l}" values must be unique strings`);y[S]=x}}}};Ki.default=dB;const uB="http://json-schema.org/draft-07/schema#",hB="http://json-schema.org/draft-07/schema#",fB="Core schema meta-schema",pB={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},mB=["object","boolean"],gB={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},yB={$schema:uB,$id:hB,title:fB,definitions:pB,type:mB,properties:gB,default:!0};(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const t=Kn,n=qh,o=Ki,s=yB,a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends t.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(y,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}r.exports=e=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var d=Dt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=ne;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=is;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var f=as;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(Su,Su.exports);var vB=Su.exports;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatLimitDefinition=void 0;const e=vB,t=ne,n=t.operators,o={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:l,schemaCode:c})=>t.str`should be ${o[l].okStr} ${c}`,params:({keyword:l,schemaCode:c})=>t._`{comparison: ${o[l].okStr}, limit: ${c}}`};r.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(l){const{gen:c,data:d,schemaCode:u,keyword:h,it:f}=l,{opts:p,self:y}=f;if(!p.validateFormats)return;const g=new e.KeywordCxt(f,y.RULES.all.format.definition,"format");g.$data?m():v();function m(){const w=c.scopeValue("formats",{ref:y.formats,code:p.code.formats}),S=c.const("fmt",t._`${w}[${g.schemaCode}]`);l.fail$data(t.or(t._`typeof ${S} != "object"`,t._`${S} instanceof RegExp`,t._`typeof ${S}.compare != "function"`,b(S)))}function v(){const w=g.schema,S=y.formats[w];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${h}": format "${w}" does not define "compare" function`);const x=c.scopeValue("formats",{key:w,ref:S,code:p.code.formats?t._`${p.code.formats}${t.getProperty(w)}`:void 0});l.fail$data(b(x))}function b(w){return t._`${w}.compare(${d}, ${u}) ${o[h].fail} 0`}},dependencies:["format"]};const a=l=>(l.addKeyword(r.formatLimitDefinition),l);r.default=a})(Yv);(function(r,e){Object.defineProperty(e,"__esModule",{value:!0});const t=Jv,n=Yv,o=ne,s=new o.Name("fullFormats"),a=new o.Name("fastFormats"),l=(d,u={keywords:!0})=>{if(Array.isArray(u))return c(d,u,t.fullFormats,s),d;const[h,f]=u.mode==="fast"?[t.fastFormats,a]:[t.fullFormats,s],p=u.formats||t.formatNames;return c(d,p,h,f),u.keywords&&n.default(d),d};l.get=(d,u="full")=>{const h=(u==="fast"?t.fastFormats:t.fullFormats)[d];if(!h)throw new Error(`Unknown format "${d}"`);return h};function c(d,u,h,f){var p,y;(p=(y=d.opts.code).formats)!==null&&p!==void 0||(y.formats=o._`require("ajv-formats/dist/formats").${f}`);for(const g of u)d.addFormat(g,h[g])}r.exports=e=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l})(ku,ku.exports);var bB=ku.exports;const wB=Ih(bB);var Au={exports:{}},sf={},af={};Object.defineProperty(af,"__esModule",{value:!0});const kB=br,SB=["$schema","id","$defs",{keyword:"$comment"},"definitions",kB.default];af.default=SB;var lf={},cf={};Object.defineProperty(cf,"__esModule",{value:!0});const Ou=Kn,xB=ne,Gr=xB.operators,Tu={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:Gr.LTE,fail:Gr.GT},{okStr:"<",ok:Gr.LT,fail:Gr.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:Gr.GTE,fail:Gr.LT},{okStr:">",ok:Gr.GT,fail:Gr.LTE}]}},CB={message:r=>Ou.str`must be ${Bu(r).okStr} ${r.schemaCode}`,params:r=>Ou._`{comparison: ${Bu(r).okStr}, limit: ${r.schemaCode}}`},EB={keyword:Object.keys(Tu),type:"number",schemaType:"number",$data:!0,error:CB,code(r){const{data:e,schemaCode:t}=r;r.fail$data(Ou._`${e} ${Bu(r).fail} ${t} || isNaN(${e})`)}};function Bu(r){var e;const t=r.keyword,n=!((e=r.parentSchema)===null||e===void 0)&&e[Tu[t].exclusive]?1:0;return Tu[t].ops[n]}cf.default=EB;var df={};Object.defineProperty(df,"__esModule",{value:!0});const wg={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},$B={keyword:Object.keys(wg),type:"number",schemaType:"boolean",code({keyword:r,parentSchema:e}){const t=wg[r];if(e[t]===void 0)throw new Error(`${r} can only be used with ${t}`)}};df.default=$B;Object.defineProperty(lf,"__esModule",{value:!0});const _B=cf,NB=df,AB=cc,OB=dc,TB=uc,BB=hc,PB=fc,IB=pc,MB=mc,DB=gc,VB=yc,RB=[_B.default,NB.default,AB.default,OB.default,TB.default,BB.default,PB.default,IB.default,MB.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},DB.default,VB.default];lf.default=RB;Object.defineProperty(sf,"__esModule",{value:!0});const LB=af,jB=lf,FB=Hi,qB=Ui,zB=["title","description","default"],HB=[LB.default,jB.default,FB.default(),qB.default,zB];sf.default=HB;const UB="http://json-schema.org/draft-04/schema#",KB="http://json-schema.org/draft-04/schema#",WB="Core schema meta-schema",GB={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},JB="object",YB={id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},XB={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},QB={id:UB,$schema:KB,description:WB,definitions:GB,type:JB,properties:YB,dependencies:XB,default:{}};(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const t=Kn,n=sf,o=Ki,s=QB,a=["/properties"],l="http://json-schema.org/draft-04/schema";class c extends t.default{constructor(f={}){super({...f,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),n.default.forEach(f=>this.addVocabulary(f)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const f=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(f,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}r.exports=e=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var d=Kn;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=Kn;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})})(Au,Au.exports);var ZB=Au.exports;const eP=Ih(ZB);var Pu={exports:{}},uf={},hf={},ds={};Object.defineProperty(ds,"__esModule",{value:!0});ds.dynamicAnchor=void 0;const ud=ne,tP=_t,kg=ft,rP=br,nP={keyword:"$dynamicAnchor",schemaType:"string",code:r=>Ob(r,r.schema)};function Ob(r,e){const{gen:t,it:n}=r;n.schemaEnv.root.dynamicAnchors[e]=!0;const o=(0,ud._)`${tP.default.dynamicAnchors}${(0,ud.getProperty)(e)}`,s=n.errSchemaPath==="#"?n.validateName:oP(r);t.if((0,ud._)`!${o}`,()=>t.assign(o,s))}ds.dynamicAnchor=Ob;function oP(r){const{schemaEnv:e,schema:t,self:n}=r.it,{root:o,baseId:s,localRefs:a,meta:l}=e.root,{schemaId:c}=n.opts,d=new kg.SchemaEnv({schema:t,schemaId:c,root:o,baseId:s,localRefs:a,meta:l});return kg.compileSchema.call(n,d),(0,rP.getValidate)(r,d)}ds.default=nP;var us={};Object.defineProperty(us,"__esModule",{value:!0});us.dynamicRef=void 0;const Sg=ne,sP=_t,xg=br,iP={keyword:"$dynamicRef",schemaType:"string",code:r=>Tb(r,r.schema)};function Tb(r,e){const{gen:t,keyword:n,it:o}=r;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);const s=e.slice(1);if(o.allErrors)a();else{const c=t.let("valid",!1);a(c),r.ok(c)}function a(c){if(o.schemaEnv.root.dynamicAnchors[s]){const d=t.let("_v",(0,Sg._)`${sP.default.dynamicAnchors}${(0,Sg.getProperty)(s)}`);t.if(d,l(d,c),l(o.validateName,c))}else l(o.validateName,c)()}function l(c,d){return d?()=>t.block(()=>{(0,xg.callRef)(r,c),t.let(d,!0)}):()=>(0,xg.callRef)(r,c)}}us.dynamicRef=Tb;us.default=iP;var ff={};Object.defineProperty(ff,"__esModule",{value:!0});const aP=ds,lP=he,cP={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,aP.dynamicAnchor)(r,""):(0,lP.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};ff.default=cP;var pf={};Object.defineProperty(pf,"__esModule",{value:!0});const dP=us,uP={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,dP.dynamicRef)(r,r.schema)};pf.default=uP;Object.defineProperty(hf,"__esModule",{value:!0});const hP=ds,fP=us,pP=ff,mP=pf,gP=[hP.default,fP.default,pP.default,mP.default];hf.default=gP;var mf={},gf={};Object.defineProperty(gf,"__esModule",{value:!0});const Cg=vc,yP={keyword:"dependentRequired",type:"object",schemaType:"object",error:Cg.error,code:r=>(0,Cg.validatePropertyDeps)(r)};gf.default=yP;var yf={};Object.defineProperty(yf,"__esModule",{value:!0});const vP=vc,bP={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,vP.validateSchemaDeps)(r)};yf.default=bP;var vf={};Object.defineProperty(vf,"__esModule",{value:!0});const wP=he,kP={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:e,it:t}){e.contains===void 0&&(0,wP.checkStrictMode)(t,`"${r}" without "contains" is ignored`)}};vf.default=kP;Object.defineProperty(mf,"__esModule",{value:!0});const SP=gf,xP=yf,CP=vf,EP=[SP.default,xP.default,CP.default];mf.default=EP;var bf={},wf={};Object.defineProperty(wf,"__esModule",{value:!0});const Xr=ne,Eg=he,$P=_t,_P={message:"must NOT have unevaluated properties",params:({params:r})=>(0,Xr._)`{unevaluatedProperty: ${r.unevaluatedProperty}}`},NP={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:_P,code(r){const{gen:e,schema:t,data:n,errsCount:o,it:s}=r;if(!o)throw new Error("ajv implementation error");const{allErrors:a,props:l}=s;l instanceof Xr.Name?e.if((0,Xr._)`${l} !== true`,()=>e.forIn("key",n,h=>e.if(d(l,h),()=>c(h)))):l!==!0&&e.forIn("key",n,h=>l===void 0?c(h):e.if(u(l,h),()=>c(h))),s.props=!0,r.ok((0,Xr._)`${o} === ${$P.default.errors}`);function c(h){if(t===!1){r.setParams({unevaluatedProperty:h}),r.error(),a||e.break();return}if(!(0,Eg.alwaysValidSchema)(s,t)){const f=e.name("valid");r.subschema({keyword:"unevaluatedProperties",dataProp:h,dataPropType:Eg.Type.Str},f),a||e.if((0,Xr.not)(f),()=>e.break())}}function d(h,f){return(0,Xr._)`!${h} || !${h}[${f}]`}function u(h,f){const p=[];for(const y in h)h[y]===!0&&p.push((0,Xr._)`${f} !== ${y}`);return(0,Xr.and)(...p)}}};wf.default=NP;var kf={};Object.defineProperty(kf,"__esModule",{value:!0});const Pn=ne,$g=he,AP={message:({params:{len:r}})=>(0,Pn.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Pn._)`{limit: ${r}}`},OP={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:AP,code(r){const{gen:e,schema:t,data:n,it:o}=r,s=o.items||0;if(s===!0)return;const a=e.const("len",(0,Pn._)`${n}.length`);if(t===!1)r.setParams({len:s}),r.fail((0,Pn._)`${a} > ${s}`);else if(typeof t=="object"&&!(0,$g.alwaysValidSchema)(o,t)){const c=e.var("valid",(0,Pn._)`${a} <= ${s}`);e.if((0,Pn.not)(c),()=>l(c,s)),r.ok(c)}o.items=!0;function l(c,d){e.forRange("i",d,a,u=>{r.subschema({keyword:"unevaluatedItems",dataProp:u,dataPropType:$g.Type.Num},c),o.allErrors||e.if((0,Pn.not)(c),()=>e.break())})}}};kf.default=OP;Object.defineProperty(bf,"__esModule",{value:!0});const TP=wf,BP=kf,PP=[TP.default,BP.default];bf.default=PP;Object.defineProperty(uf,"__esModule",{value:!0});const IP=ac,MP=lc,DP=Hi,VP=hf,RP=mf,LP=bf,jP=Ui,_g=eo,FP=[VP.default,IP.default,MP.default,(0,DP.default)(!0),jP.default,_g.metadataVocabulary,_g.contentVocabulary,RP.default,LP.default];uf.default=FP;var Sf={};const qP="https://json-schema.org/draft/2020-12/schema",zP="https://json-schema.org/draft/2020-12/schema",HP={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},UP="meta",KP="Core and Validation specifications meta-schema",WP=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],GP=["object","boolean"],JP="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",YP={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},XP={$schema:qP,$id:zP,$vocabulary:HP,$dynamicAnchor:UP,title:KP,allOf:WP,type:GP,$comment:JP,properties:YP},QP="https://json-schema.org/draft/2020-12/schema",ZP="https://json-schema.org/draft/2020-12/meta/applicator",eI={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},tI="meta",rI="Applicator vocabulary meta-schema",nI=["object","boolean"],oI={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},sI={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},iI={$schema:QP,$id:ZP,$vocabulary:eI,$dynamicAnchor:tI,title:rI,type:nI,properties:oI,$defs:sI},aI="https://json-schema.org/draft/2020-12/schema",lI="https://json-schema.org/draft/2020-12/meta/unevaluated",cI={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},dI="meta",uI="Unevaluated applicator vocabulary meta-schema",hI=["object","boolean"],fI={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},pI={$schema:aI,$id:lI,$vocabulary:cI,$dynamicAnchor:dI,title:uI,type:hI,properties:fI},mI="https://json-schema.org/draft/2020-12/schema",gI="https://json-schema.org/draft/2020-12/meta/content",yI={"https://json-schema.org/draft/2020-12/vocab/content":!0},vI="meta",bI="Content vocabulary meta-schema",wI=["object","boolean"],kI={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},SI={$schema:mI,$id:gI,$vocabulary:yI,$dynamicAnchor:vI,title:bI,type:wI,properties:kI},xI="https://json-schema.org/draft/2020-12/schema",CI="https://json-schema.org/draft/2020-12/meta/core",EI={"https://json-schema.org/draft/2020-12/vocab/core":!0},$I="meta",_I="Core vocabulary meta-schema",NI=["object","boolean"],AI={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},OI={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},TI={$schema:xI,$id:CI,$vocabulary:EI,$dynamicAnchor:$I,title:_I,type:NI,properties:AI,$defs:OI},BI="https://json-schema.org/draft/2020-12/schema",PI="https://json-schema.org/draft/2020-12/meta/format-annotation",II={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},MI="meta",DI="Format vocabulary meta-schema for annotation results",VI=["object","boolean"],RI={format:{type:"string"}},LI={$schema:BI,$id:PI,$vocabulary:II,$dynamicAnchor:MI,title:DI,type:VI,properties:RI},jI="https://json-schema.org/draft/2020-12/schema",FI="https://json-schema.org/draft/2020-12/meta/meta-data",qI={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},zI="meta",HI="Meta-data vocabulary meta-schema",UI=["object","boolean"],KI={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},WI={$schema:jI,$id:FI,$vocabulary:qI,$dynamicAnchor:zI,title:HI,type:UI,properties:KI},GI="https://json-schema.org/draft/2020-12/schema",JI="https://json-schema.org/draft/2020-12/meta/validation",YI={"https://json-schema.org/draft/2020-12/vocab/validation":!0},XI="meta",QI="Validation vocabulary meta-schema",ZI=["object","boolean"],eM={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},tM={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},rM={$schema:GI,$id:JI,$vocabulary:YI,$dynamicAnchor:XI,title:QI,type:ZI,properties:eM,$defs:tM};Object.defineProperty(Sf,"__esModule",{value:!0});const nM=XP,oM=iI,sM=pI,iM=SI,aM=TI,lM=LI,cM=WI,dM=rM,uM=["/properties"];function hM(r){return[nM,oM,sM,iM,aM,e(this,lM),cM,e(this,dM)].forEach(t=>this.addMetaSchema(t,void 0,!1)),this;function e(t,n){return r?t.$dataMetaSchema(n,uM):n}}Sf.default=hM;(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const t=Kn,n=uf,o=Ki,s=Sf,a="https://json-schema.org/draft/2020-12/schema";class l extends t.default{constructor(p={}){super({...p,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:p,meta:y}=this.opts;y&&(s.default.call(this,p),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}r.exports=e=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var c=Dt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=ne;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var u=is;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var h=as;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(Pu,Pu.exports);var fM=Pu.exports;const pM=Ih(fM),Bb=["2.0","3.0","3.1"],mM={"http://json-schema.org/draft-04/schema#":eP,"https://json-schema.org/draft/2020-12/schema":pM},Iu={EMPTY_OR_INVALID:"Cannot find JSON, YAML or filename in data",OPENAPI_VERSION_NOT_SUPPORTED:"Cannot find supported Swagger/OpenAPI version in specification, version must be a string.",INVALID_REFERENCE:"Can’t resolve URI: %s",EXTERNAL_REFERENCE_NOT_SUPPORTED:"External references are not supported yet: %s"},gM="x-inlined-refs";function dr(r,e){const t={};for(const[n,o]of Object.entries(r))Array.isArray(o)?t[n]=o.map(s=>typeof s=="object"&&s!==null?dr(s,e):s):typeof o=="object"&&o!==null?t[n]=dr(o,e):t[n]=o;return e(t)}function yM(r,e){return dr(r,t=>e(t)?t:void 0)}function Pb(r){return typeof r!==void 0&&Array.isArray(r)&&r.length>0&&r.some(e=>e.isEntrypoint===!0)}function vM(r){const e=[];return!r||typeof r!="object"||dr(r,t=>(t.$ref&&typeof t.$ref=="string"&&!t.$ref.startsWith("#")&&e.push(t.$ref.split("#")[0]),t)),e}const xf=Symbol.for("yaml.alias"),Mu=Symbol.for("yaml.document"),dn=Symbol.for("yaml.map"),Ib=Symbol.for("yaml.pair"),Fr=Symbol.for("yaml.scalar"),hs=Symbol.for("yaml.seq"),jt=Symbol.for("yaml.node.type"),ao=r=>!!r&&typeof r=="object"&&r[jt]===xf,fs=r=>!!r&&typeof r=="object"&&r[jt]===Mu,ps=r=>!!r&&typeof r=="object"&&r[jt]===dn,Pe=r=>!!r&&typeof r=="object"&&r[jt]===Ib,$e=r=>!!r&&typeof r=="object"&&r[jt]===Fr,ms=r=>!!r&&typeof r=="object"&&r[jt]===hs;function Ie(r){if(r&&typeof r=="object")switch(r[jt]){case dn:case hs:return!0}return!1}function je(r){if(r&&typeof r=="object")switch(r[jt]){case xf:case dn:case Fr:case hs:return!0}return!1}const bM=r=>($e(r)||Ie(r))&&!!r.anchor,vt=Symbol("break visit"),Mb=Symbol("skip children"),yr=Symbol("remove node");function yn(r,e){const t=Db(e);fs(r)?Ao(null,r.contents,t,Object.freeze([r]))===yr&&(r.contents=null):Ao(null,r,t,Object.freeze([]))}yn.BREAK=vt;yn.SKIP=Mb;yn.REMOVE=yr;function Ao(r,e,t,n){const o=Vb(r,e,t,n);if(je(o)||Pe(o))return Rb(r,n,o),Ao(r,o,t,n);if(typeof o!="symbol"){if(Ie(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=Ao(s,e.items[s],t,n);if(typeof a=="number")s=a-1;else{if(a===vt)return vt;a===yr&&(e.items.splice(s,1),s-=1)}}}else if(Pe(e)){n=Object.freeze(n.concat(e));const s=Ao("key",e.key,t,n);if(s===vt)return vt;s===yr&&(e.key=null);const a=Ao("value",e.value,t,n);if(a===vt)return vt;a===yr&&(e.value=null)}}return o}async function wc(r,e){const t=Db(e);fs(r)?await Oo(null,r.contents,t,Object.freeze([r]))===yr&&(r.contents=null):await Oo(null,r,t,Object.freeze([]))}wc.BREAK=vt;wc.SKIP=Mb;wc.REMOVE=yr;async function Oo(r,e,t,n){const o=await Vb(r,e,t,n);if(je(o)||Pe(o))return Rb(r,n,o),Oo(r,o,t,n);if(typeof o!="symbol"){if(Ie(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=await Oo(s,e.items[s],t,n);if(typeof a=="number")s=a-1;else{if(a===vt)return vt;a===yr&&(e.items.splice(s,1),s-=1)}}}else if(Pe(e)){n=Object.freeze(n.concat(e));const s=await Oo("key",e.key,t,n);if(s===vt)return vt;s===yr&&(e.key=null);const a=await Oo("value",e.value,t,n);if(a===vt)return vt;a===yr&&(e.value=null)}}return o}function Db(r){return typeof r=="object"&&(r.Collection||r.Node||r.Value)?Object.assign({Alias:r.Node,Map:r.Node,Scalar:r.Node,Seq:r.Node},r.Value&&{Map:r.Value,Scalar:r.Value,Seq:r.Value},r.Collection&&{Map:r.Collection,Seq:r.Collection},r):r}function Vb(r,e,t,n){var o,s,a,l,c;if(typeof t=="function")return t(r,e,n);if(ps(e))return(o=t.Map)==null?void 0:o.call(t,r,e,n);if(ms(e))return(s=t.Seq)==null?void 0:s.call(t,r,e,n);if(Pe(e))return(a=t.Pair)==null?void 0:a.call(t,r,e,n);if($e(e))return(l=t.Scalar)==null?void 0:l.call(t,r,e,n);if(ao(e))return(c=t.Alias)==null?void 0:c.call(t,r,e,n)}function Rb(r,e,t){const n=e[e.length-1];if(Ie(n))n.items[r]=t;else if(Pe(n))r==="key"?n.key=t:n.value=t;else if(fs(n))n.contents=t;else{const o=ao(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const wM={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},kM=r=>r.replace(/[!,[\]{}]/g,e=>wM[e]);class ht{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ht.defaultYaml,e),this.tags=Object.assign({},ht.defaultTags,t)}clone(){const e=new ht(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ht(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ht.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ht.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:ht.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ht.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),o=n.shift();switch(o){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[s,a]=n;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[s]=n;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const a=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,a),!1}}default:return t(0,`Unknown directive ${o}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const a=e.slice(2,-1);return a==="!"||a==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),a)}const[,n,o]=e.match(/^(.*!)([^!]*)$/s);o||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(o)}catch(a){return t(String(a)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+kM(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let o;if(e&&n.length>0&&je(e.contents)){const s={};yn(e.contents,(a,l)=>{je(l)&&l.tag&&(s[l.tag]=!0)}),o=Object.keys(s)}else o=[];for(const[s,a]of n)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||o.some(l=>l.startsWith(a)))&&t.push(`%TAG ${s} ${a}`);return t.join(`
70
- `)}}ht.defaultYaml={explicit:!1,version:"1.2"};ht.defaultTags={"!!":"tag:yaml.org,2002:"};function Lb(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){const e=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(e)}return!0}function jb(r){const e=new Set;return yn(r,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Fb(r,e){for(let t=1;;++t){const n=`${r}${t}`;if(!e.has(n))return n}}function SM(r,e){const t=[],n=new Map;let o=null;return{onAnchor:s=>{t.push(s),o||(o=jb(r));const a=Fb(e,o);return o.add(a),a},setAnchors:()=>{for(const s of t){const a=n.get(s);if(typeof a=="object"&&a.anchor&&($e(a.node)||Ie(a.node)))a.node.anchor=a.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=s,l}}},sourceObjects:n}}function To(r,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let o=0,s=n.length;o<s;++o){const a=n[o],l=To(r,n,String(o),a);l===void 0?delete n[o]:l!==a&&(n[o]=l)}else if(n instanceof Map)for(const o of Array.from(n.keys())){const s=n.get(o),a=To(r,n,o,s);a===void 0?n.delete(o):a!==s&&n.set(o,a)}else if(n instanceof Set)for(const o of Array.from(n)){const s=To(r,n,o,o);s===void 0?n.delete(o):s!==o&&(n.delete(o),n.add(s))}else for(const[o,s]of Object.entries(n)){const a=To(r,n,o,s);a===void 0?delete n[o]:a!==s&&(n[o]=a)}return r.call(e,t,n)}function Vt(r,e,t){if(Array.isArray(r))return r.map((n,o)=>Vt(n,String(o),t));if(r&&typeof r.toJSON=="function"){if(!t||!bM(r))return r.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(r,n),t.onCreate=s=>{n.res=s,delete t.onCreate};const o=r.toJSON(e,t);return t.onCreate&&t.onCreate(o),o}return typeof r=="bigint"&&!(t!=null&&t.keep)?Number(r):r}class Cf{constructor(e){Object.defineProperty(this,jt,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:o,reviver:s}={}){if(!fs(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Vt(this,"",a);if(typeof o=="function")for(const{count:c,res:d}of a.anchors.values())o(d,c);return typeof s=="function"?To(s,{"":l},"",l):l}}class kc extends Cf{constructor(e){super(xf),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return yn(e,{Node:(n,o)=>{if(o===this)return yn.BREAK;o.anchor===this.source&&(t=o)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:o,maxAliasCount:s}=t,a=this.resolve(o);if(!a){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let l=n.get(a);if(l||(Vt(a,null,t),l=n.get(a)),!l||l.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=ol(o,a,n)),l.count*l.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return l.res}toString(e,t,n){const o=`*${this.source}`;if(e){if(Lb(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${o} `}return o}}function ol(r,e,t){if(ao(e)){const n=e.resolve(r),o=t&&n&&t.get(n);return o?o.count*o.aliasCount:0}else if(Ie(e)){let n=0;for(const o of e.items){const s=ol(r,o,t);s>n&&(n=s)}return n}else if(Pe(e)){const n=ol(r,e.key,t),o=ol(r,e.value,t);return Math.max(n,o)}return 1}const qb=r=>!r||typeof r!="function"&&typeof r!="object";class le extends Cf{constructor(e){super(Fr),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Vt(this.value,e,t)}toString(){return String(this.value)}}le.BLOCK_FOLDED="BLOCK_FOLDED";le.BLOCK_LITERAL="BLOCK_LITERAL";le.PLAIN="PLAIN";le.QUOTE_DOUBLE="QUOTE_DOUBLE";le.QUOTE_SINGLE="QUOTE_SINGLE";const xM="tag:yaml.org,2002:";function CM(r,e,t){if(e){const n=t.filter(s=>s.tag===e),o=n.find(s=>!s.format)??n[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return t.find(n=>{var o;return((o=n.identify)==null?void 0:o.call(n,r))&&!n.format})}function _i(r,e,t){var n,o,s;if(fs(r)&&(r=r.contents),je(r))return r;if(Pe(r)){const y=(o=(n=t.schema[dn]).createNode)==null?void 0:o.call(n,t.schema,null,t);return y.items.push(r),y}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt<"u"&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:a,onAnchor:l,onTagObj:c,schema:d,sourceObjects:u}=t;let h;if(a&&r&&typeof r=="object"){if(h=u.get(r),h)return h.anchor||(h.anchor=l(r)),new kc(h.anchor);h={anchor:null,node:null},u.set(r,h)}e!=null&&e.startsWith("!!")&&(e=xM+e.slice(2));let f=CM(r,e,d.tags);if(!f){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){const y=new le(r);return h&&(h.node=y),y}f=r instanceof Map?d[dn]:Symbol.iterator in Object(r)?d[hs]:d[dn]}c&&(c(f),delete t.onTagObj);const p=f!=null&&f.createNode?f.createNode(t.schema,r,t):typeof((s=f==null?void 0:f.nodeClass)==null?void 0:s.from)=="function"?f.nodeClass.from(t.schema,r,t):new le(r);return e?p.tag=e:f.default||(p.tag=f.tag),h&&(h.node=p),p}function Bl(r,e,t){let n=t;for(let o=e.length-1;o>=0;--o){const s=e[o];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=n,n=a}else n=new Map([[s,n]])}return _i(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}const Ys=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done;class Ef extends Cf{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>je(n)||Pe(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ys(e))this.add(t);else{const[n,...o]=e,s=this.get(n,!0);if(Ie(s))s.addIn(o,t);else if(s===void 0&&this.schema)this.set(n,Bl(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const o=this.get(t,!0);if(Ie(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...o]=e,s=this.get(n,!0);return o.length===0?!t&&$e(s)?s.value:s:Ie(s)?s.getIn(o,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Pe(t))return!1;const n=t.value;return n==null||e&&$e(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const o=this.get(t,!0);return Ie(o)?o.hasIn(n):!1}setIn(e,t){const[n,...o]=e;if(o.length===0)this.set(n,t);else{const s=this.get(n,!0);if(Ie(s))s.setIn(o,t);else if(s===void 0&&this.schema)this.set(n,Bl(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}}Ef.maxFlowStringSingleLineLength=60;const EM=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function Ar(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}const Rn=(r,e,t)=>r.endsWith(`
69
+ deps: ${u}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(c){const[d,u]=s(c);a(c,d),l(c,u)}};function s({schema:c}){const d={},u={};for(const h in c){if(h==="__proto__")continue;const f=Array.isArray(c[h])?d:u;f[h]=c[h]}return[d,u]}function a(c,d=c.schema){const{gen:u,data:h,it:f}=c;if(Object.keys(d).length===0)return;const p=u.let("missing");for(const y in d){const g=d[y];if(g.length===0)continue;const m=(0,n.propertyInData)(u,h,y,f.opts.ownProperties);c.setParams({property:y,depsCount:g.length,deps:g.join(", ")}),f.allErrors?u.if(m,()=>{for(const v of g)(0,n.checkReportMissingProp)(c,v)}):(u.if((0,e._)`${m} && (${(0,n.checkMissingProp)(c,g,p)})`),(0,n.reportMissingProp)(c,p),u.else())}}r.validatePropertyDeps=a;function l(c,d=c.schema){const{gen:u,data:h,keyword:f,it:p}=c,y=u.name("valid");for(const g in d)(0,t.alwaysValidSchema)(p,d[g])||(u.if((0,n.propertyInData)(u,h,g,p.opts.ownProperties),()=>{const m=c.subschema({keyword:f,schemaProp:g},y);c.mergeValidEvaluated(m,y)},()=>u.var(y,!0)),c.ok(y))}r.validateSchemaDeps=l,r.default=o})(bc);var Yh={};Object.defineProperty(Yh,"__esModule",{value:!0});const _b=ne,pT=he,mT={message:"property name must be valid",params:({params:r})=>(0,_b._)`{propertyName: ${r.propertyName}}`},gT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:mT,code(r){const{gen:e,schema:t,data:n,it:o}=r;if((0,pT.alwaysValidSchema)(o,t))return;const s=e.name("valid");e.forIn("key",n,a=>{r.setParams({propertyName:a}),r.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),e.if((0,_b.not)(s),()=>{r.error(!0),o.allErrors||e.break()})}),r.ok(s)}};Yh.default=gT;var wc={};Object.defineProperty(wc,"__esModule",{value:!0});const Ba=de,zt=ne,yT=_t,Pa=he,vT={message:"must NOT have additional properties",params:({params:r})=>(0,zt._)`{additionalProperty: ${r.additionalProperty}}`},bT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:vT,code(r){const{gen:e,schema:t,parentSchema:n,data:o,errsCount:s,it:a}=r;if(!s)throw new Error("ajv implementation error");const{allErrors:l,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,Pa.alwaysValidSchema)(a,t))return;const d=(0,Ba.allSchemaProperties)(n.properties),u=(0,Ba.allSchemaProperties)(n.patternProperties);h(),r.ok((0,zt._)`${s} === ${yT.default.errors}`);function h(){e.forIn("key",o,m=>{!d.length&&!u.length?y(m):e.if(f(m),()=>y(m))})}function f(m){let v;if(d.length>8){const b=(0,Pa.schemaRefOrVal)(a,n.properties,"properties");v=(0,Ba.isOwnProperty)(e,b,m)}else d.length?v=(0,zt.or)(...d.map(b=>(0,zt._)`${m} === ${b}`)):v=zt.nil;return u.length&&(v=(0,zt.or)(v,...u.map(b=>(0,zt._)`${(0,Ba.usePattern)(r,b)}.test(${m})`))),(0,zt.not)(v)}function p(m){e.code((0,zt._)`delete ${o}[${m}]`)}function y(m){if(c.removeAdditional==="all"||c.removeAdditional&&t===!1){p(m);return}if(t===!1){r.setParams({additionalProperty:m}),r.error(),l||e.break();return}if(typeof t=="object"&&!(0,Pa.alwaysValidSchema)(a,t)){const v=e.name("valid");c.removeAdditional==="failing"?(g(m,v,!1),e.if((0,zt.not)(v),()=>{r.reset(),p(m)})):(g(m,v),l||e.if((0,zt.not)(v),()=>e.break()))}}function g(m,v,b){const w={keyword:"additionalProperties",dataProp:m,dataPropType:Pa.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(w,v)}}};wc.default=bT;var Xh={};Object.defineProperty(Xh,"__esModule",{value:!0});const wT=Dt,hg=de,ud=he,fg=wc,kT={keyword:"properties",type:"object",schemaType:"object",code(r){const{gen:e,schema:t,parentSchema:n,data:o,it:s}=r;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&fg.default.code(new wT.KeywordCxt(s,fg.default,"additionalProperties"));const a=(0,hg.allSchemaProperties)(t);for(const h of a)s.definedProperties.add(h);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=ud.mergeEvaluated.props(e,(0,ud.toHash)(a),s.props));const l=a.filter(h=>!(0,ud.alwaysValidSchema)(s,t[h]));if(l.length===0)return;const c=e.name("valid");for(const h of l)d(h)?u(h):(e.if((0,hg.propertyInData)(e,o,h,s.opts.ownProperties)),u(h),s.allErrors||e.else().var(c,!0),e.endIf()),r.it.definedProperties.add(h),r.ok(c);function d(h){return s.opts.useDefaults&&!s.compositeRule&&t[h].default!==void 0}function u(h){r.subschema({keyword:"properties",schemaProp:h,dataProp:h},c)}}};Xh.default=kT;var Qh={};Object.defineProperty(Qh,"__esModule",{value:!0});const pg=de,Ia=ne,mg=he,gg=he,ST={keyword:"patternProperties",type:"object",schemaType:"object",code(r){const{gen:e,schema:t,data:n,parentSchema:o,it:s}=r,{opts:a}=s,l=(0,pg.allSchemaProperties)(t),c=l.filter(g=>(0,mg.alwaysValidSchema)(s,t[g]));if(l.length===0||c.length===l.length&&(!s.opts.unevaluated||s.props===!0))return;const d=a.strictSchema&&!a.allowMatchingProperties&&o.properties,u=e.name("valid");s.props!==!0&&!(s.props instanceof Ia.Name)&&(s.props=(0,gg.evaluatedPropsToName)(e,s.props));const{props:h}=s;f();function f(){for(const g of l)d&&p(g),s.allErrors?y(g):(e.var(u,!0),y(g),e.if(u))}function p(g){for(const m in d)new RegExp(g).test(m)&&(0,mg.checkStrictMode)(s,`property ${m} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){e.forIn("key",n,m=>{e.if((0,Ia._)`${(0,pg.usePattern)(r,g)}.test(${m})`,()=>{const v=c.includes(g);v||r.subschema({keyword:"patternProperties",schemaProp:g,dataProp:m,dataPropType:gg.Type.Str},u),s.opts.unevaluated&&h!==!0?e.assign((0,Ia._)`${h}[${m}]`,!0):!v&&!s.allErrors&&e.if((0,Ia.not)(u),()=>e.break())})})}}};Qh.default=ST;var Zh={};Object.defineProperty(Zh,"__esModule",{value:!0});const xT=he,CT={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:e,schema:t,it:n}=r;if((0,xT.alwaysValidSchema)(n,t)){r.fail();return}const o=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};Zh.default=CT;var ef={};Object.defineProperty(ef,"__esModule",{value:!0});const ET=de,$T={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ET.validateUnion,error:{message:"must match a schema in anyOf"}};ef.default=$T;var tf={};Object.defineProperty(tf,"__esModule",{value:!0});const nl=ne,_T=he,NT={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,nl._)`{passingSchemas: ${r.passing}}`},AT={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:NT,code(r){const{gen:e,schema:t,parentSchema:n,it:o}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;const s=t,a=e.let("valid",!1),l=e.let("passing",null),c=e.name("_valid");r.setParams({passing:l}),e.block(d),r.result(a,()=>r.reset(),()=>r.error(!0));function d(){s.forEach((u,h)=>{let f;(0,_T.alwaysValidSchema)(o,u)?e.var(c,!0):f=r.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},c),h>0&&e.if((0,nl._)`${c} && ${a}`).assign(a,!1).assign(l,(0,nl._)`[${l}, ${h}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(l,h),f&&r.mergeEvaluated(f,nl.Name)})})}}};tf.default=AT;var rf={};Object.defineProperty(rf,"__esModule",{value:!0});const OT=he,TT={keyword:"allOf",schemaType:"array",code(r){const{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");const o=e.name("valid");t.forEach((s,a)=>{if((0,OT.alwaysValidSchema)(n,s))return;const l=r.subschema({keyword:"allOf",schemaProp:a},o);r.ok(o),r.mergeEvaluated(l)})}};rf.default=TT;var nf={};Object.defineProperty(nf,"__esModule",{value:!0});const Tl=ne,Nb=he,BT={message:({params:r})=>(0,Tl.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,Tl._)`{failingKeyword: ${r.ifClause}}`},PT={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:BT,code(r){const{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,Nb.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const o=yg(n,"then"),s=yg(n,"else");if(!o&&!s)return;const a=e.let("valid",!0),l=e.name("_valid");if(c(),r.reset(),o&&s){const u=e.let("ifClause");r.setParams({ifClause:u}),e.if(l,d("then",u),d("else",u))}else o?e.if(l,d("then")):e.if((0,Tl.not)(l),d("else"));r.pass(a,()=>r.error(!0));function c(){const u=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);r.mergeEvaluated(u)}function d(u,h){return()=>{const f=r.subschema({keyword:u},l);e.assign(a,l),r.mergeValidEvaluated(f,a),h?e.assign(h,(0,Tl._)`${u}`):r.setParams({ifClause:u})}}}};function yg(r,e){const t=r.schema[e];return t!==void 0&&!(0,Nb.alwaysValidSchema)(r,t)}nf.default=PT;var of={};Object.defineProperty(of,"__esModule",{value:!0});const IT=he,MT={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,IT.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};of.default=MT;Object.defineProperty(Hi,"__esModule",{value:!0});const DT=ls,VT=Wh,RT=cs,LT=Gh,jT=Jh,FT=bc,qT=Yh,zT=wc,HT=Xh,UT=Qh,KT=Zh,WT=ef,GT=tf,JT=rf,YT=nf,XT=of;function QT(r=!1){const e=[KT.default,WT.default,GT.default,JT.default,YT.default,XT.default,qT.default,zT.default,FT.default,HT.default,UT.default];return r?e.push(VT.default,LT.default):e.push(DT.default,RT.default),e.push(jT.default),e}Hi.default=QT;var Ui={},sf={};Object.defineProperty(sf,"__esModule",{value:!0});const Ve=ne,ZT={message:({schemaCode:r})=>(0,Ve.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,Ve._)`{format: ${r}}`},eB={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:ZT,code(r,e){const{gen:t,data:n,$data:o,schema:s,schemaCode:a,it:l}=r,{opts:c,errSchemaPath:d,schemaEnv:u,self:h}=l;if(!c.validateFormats)return;o?f():p();function f(){const y=t.scopeValue("formats",{ref:h.formats,code:c.code.formats}),g=t.const("fDef",(0,Ve._)`${y}[${a}]`),m=t.let("fType"),v=t.let("format");t.if((0,Ve._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>t.assign(m,(0,Ve._)`${g}.type || "string"`).assign(v,(0,Ve._)`${g}.validate`),()=>t.assign(m,(0,Ve._)`"string"`).assign(v,g)),r.fail$data((0,Ve.or)(b(),w()));function b(){return c.strictSchema===!1?Ve.nil:(0,Ve._)`${a} && !${v}`}function w(){const S=u.$async?(0,Ve._)`(${g}.async ? await ${v}(${n}) : ${v}(${n}))`:(0,Ve._)`${v}(${n})`,x=(0,Ve._)`(typeof ${v} == "function" ? ${S} : ${v}.test(${n}))`;return(0,Ve._)`${v} && ${v} !== true && ${m} === ${e} && !${x}`}}function p(){const y=h.formats[s];if(!y){b();return}if(y===!0)return;const[g,m,v]=w(y);g===e&&r.pass(S());function b(){if(c.strictSchema===!1){h.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${s}" ignored in schema at path "${d}"`}}function w(x){const k=x instanceof RegExp?(0,Ve.regexpCode)(x):c.code.formats?(0,Ve._)`${c.code.formats}${(0,Ve.getProperty)(s)}`:void 0,C=t.scopeValue("formats",{key:s,ref:x,code:k});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,Ve._)`${C}.validate`]:["string",x,C]}function S(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Ve._)`await ${v}(${n})`}return typeof m=="function"?(0,Ve._)`${v}(${n})`:(0,Ve._)`${v}.test(${n})`}}}};sf.default=eB;Object.defineProperty(Ui,"__esModule",{value:!0});const tB=sf,rB=[tB.default];Ui.default=rB;var eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.contentVocabulary=eo.metadataVocabulary=void 0;eo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];eo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(zh,"__esModule",{value:!0});const nB=lc,oB=cc,sB=Hi,iB=Ui,vg=eo,aB=[nB.default,oB.default,(0,sB.default)(),iB.default,vg.metadataVocabulary,vg.contentVocabulary];zh.default=aB;var Ki={},Ab={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r.DiscrError||(r.DiscrError={}))})(Ab);Object.defineProperty(Ki,"__esModule",{value:!0});const xo=ne,Au=Ab,bg=ft,lB=he,cB={message:({params:{discrError:r,tagName:e}})=>r===Au.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,xo._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},dB={keyword:"discriminator",type:"object",schemaType:"object",error:cB,code(r){const{gen:e,data:t,schema:n,parentSchema:o,it:s}=r,{oneOf:a}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=n.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const c=e.let("valid",!1),d=e.const("tag",(0,xo._)`${t}${(0,xo.getProperty)(l)}`);e.if((0,xo._)`typeof ${d} == "string"`,()=>u(),()=>r.error(!1,{discrError:Au.DiscrError.Tag,tag:d,tagName:l})),r.ok(c);function u(){const p=f();e.if(!1);for(const y in p)e.elseIf((0,xo._)`${d} === ${y}`),e.assign(c,h(p[y]));e.else(),r.error(!1,{discrError:Au.DiscrError.Mapping,tag:d,tagName:l}),e.endIf()}function h(p){const y=e.name("valid"),g=r.subschema({keyword:"oneOf",schemaProp:p},y);return r.mergeEvaluated(g,xo.Name),y}function f(){var p;const y={},g=v(o);let m=!0;for(let S=0;S<a.length;S++){let x=a[S];x!=null&&x.$ref&&!(0,lB.schemaHasRulesButRef)(x,s.self.RULES)&&(x=bg.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,x==null?void 0:x.$ref),x instanceof bg.SchemaEnv&&(x=x.schema));const k=(p=x==null?void 0:x.properties)===null||p===void 0?void 0:p[l];if(typeof k!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);m=m&&(g||v(x)),b(k,S)}if(!m)throw new Error(`discriminator: "${l}" must be required`);return y;function v({required:S}){return Array.isArray(S)&&S.includes(l)}function b(S,x){if(S.const)w(S.const,x);else if(S.enum)for(const k of S.enum)w(k,x);else throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`)}function w(S,x){if(typeof S!="string"||S in y)throw new Error(`discriminator: "${l}" values must be unique strings`);y[S]=x}}}};Ki.default=dB;const uB="http://json-schema.org/draft-07/schema#",hB="http://json-schema.org/draft-07/schema#",fB="Core schema meta-schema",pB={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},mB=["object","boolean"],gB={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},yB={$schema:uB,$id:hB,title:fB,definitions:pB,type:mB,properties:gB,default:!0};(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const t=Kn,n=zh,o=Ki,s=yB,a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends t.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(y,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}r.exports=e=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var d=Dt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=ne;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=is;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var f=as;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(xu,xu.exports);var vB=xu.exports;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatLimitDefinition=void 0;const e=vB,t=ne,n=t.operators,o={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:l,schemaCode:c})=>t.str`should be ${o[l].okStr} ${c}`,params:({keyword:l,schemaCode:c})=>t._`{comparison: ${o[l].okStr}, limit: ${c}}`};r.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(l){const{gen:c,data:d,schemaCode:u,keyword:h,it:f}=l,{opts:p,self:y}=f;if(!p.validateFormats)return;const g=new e.KeywordCxt(f,y.RULES.all.format.definition,"format");g.$data?m():v();function m(){const w=c.scopeValue("formats",{ref:y.formats,code:p.code.formats}),S=c.const("fmt",t._`${w}[${g.schemaCode}]`);l.fail$data(t.or(t._`typeof ${S} != "object"`,t._`${S} instanceof RegExp`,t._`typeof ${S}.compare != "function"`,b(S)))}function v(){const w=g.schema,S=y.formats[w];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${h}": format "${w}" does not define "compare" function`);const x=c.scopeValue("formats",{key:w,ref:S,code:p.code.formats?t._`${p.code.formats}${t.getProperty(w)}`:void 0});l.fail$data(b(x))}function b(w){return t._`${w}.compare(${d}, ${u}) ${o[h].fail} 0`}},dependencies:["format"]};const a=l=>(l.addKeyword(r.formatLimitDefinition),l);r.default=a})(Yv);(function(r,e){Object.defineProperty(e,"__esModule",{value:!0});const t=Jv,n=Yv,o=ne,s=new o.Name("fullFormats"),a=new o.Name("fastFormats"),l=(d,u={keywords:!0})=>{if(Array.isArray(u))return c(d,u,t.fullFormats,s),d;const[h,f]=u.mode==="fast"?[t.fastFormats,a]:[t.fullFormats,s],p=u.formats||t.formatNames;return c(d,p,h,f),u.keywords&&n.default(d),d};l.get=(d,u="full")=>{const h=(u==="fast"?t.fastFormats:t.fullFormats)[d];if(!h)throw new Error(`Unknown format "${d}"`);return h};function c(d,u,h,f){var p,y;(p=(y=d.opts.code).formats)!==null&&p!==void 0||(y.formats=o._`require("ajv-formats/dist/formats").${f}`);for(const g of u)d.addFormat(g,h[g])}r.exports=e=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l})(Su,Su.exports);var bB=Su.exports;const wB=Mh(bB);var Ou={exports:{}},af={},lf={};Object.defineProperty(lf,"__esModule",{value:!0});const kB=br,SB=["$schema","id","$defs",{keyword:"$comment"},"definitions",kB.default];lf.default=SB;var cf={},df={};Object.defineProperty(df,"__esModule",{value:!0});const Tu=Kn,xB=ne,Gr=xB.operators,Bu={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:Gr.LTE,fail:Gr.GT},{okStr:"<",ok:Gr.LT,fail:Gr.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:Gr.GTE,fail:Gr.LT},{okStr:">",ok:Gr.GT,fail:Gr.LTE}]}},CB={message:r=>Tu.str`must be ${Pu(r).okStr} ${r.schemaCode}`,params:r=>Tu._`{comparison: ${Pu(r).okStr}, limit: ${r.schemaCode}}`},EB={keyword:Object.keys(Bu),type:"number",schemaType:"number",$data:!0,error:CB,code(r){const{data:e,schemaCode:t}=r;r.fail$data(Tu._`${e} ${Pu(r).fail} ${t} || isNaN(${e})`)}};function Pu(r){var e;const t=r.keyword,n=!((e=r.parentSchema)===null||e===void 0)&&e[Bu[t].exclusive]?1:0;return Bu[t].ops[n]}df.default=EB;var uf={};Object.defineProperty(uf,"__esModule",{value:!0});const wg={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},$B={keyword:Object.keys(wg),type:"number",schemaType:"boolean",code({keyword:r,parentSchema:e}){const t=wg[r];if(e[t]===void 0)throw new Error(`${r} can only be used with ${t}`)}};uf.default=$B;Object.defineProperty(cf,"__esModule",{value:!0});const _B=df,NB=uf,AB=dc,OB=uc,TB=hc,BB=fc,PB=pc,IB=mc,MB=gc,DB=yc,VB=vc,RB=[_B.default,NB.default,AB.default,OB.default,TB.default,BB.default,PB.default,IB.default,MB.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},DB.default,VB.default];cf.default=RB;Object.defineProperty(af,"__esModule",{value:!0});const LB=lf,jB=cf,FB=Hi,qB=Ui,zB=["title","description","default"],HB=[LB.default,jB.default,FB.default(),qB.default,zB];af.default=HB;const UB="http://json-schema.org/draft-04/schema#",KB="http://json-schema.org/draft-04/schema#",WB="Core schema meta-schema",GB={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},JB="object",YB={id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},XB={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},QB={id:UB,$schema:KB,description:WB,definitions:GB,type:JB,properties:YB,dependencies:XB,default:{}};(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const t=Kn,n=af,o=Ki,s=QB,a=["/properties"],l="http://json-schema.org/draft-04/schema";class c extends t.default{constructor(f={}){super({...f,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),n.default.forEach(f=>this.addVocabulary(f)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const f=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(f,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}r.exports=e=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var d=Kn;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=Kn;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})})(Ou,Ou.exports);var ZB=Ou.exports;const eP=Mh(ZB);var Iu={exports:{}},hf={},ff={},ds={};Object.defineProperty(ds,"__esModule",{value:!0});ds.dynamicAnchor=void 0;const hd=ne,tP=_t,kg=ft,rP=br,nP={keyword:"$dynamicAnchor",schemaType:"string",code:r=>Ob(r,r.schema)};function Ob(r,e){const{gen:t,it:n}=r;n.schemaEnv.root.dynamicAnchors[e]=!0;const o=(0,hd._)`${tP.default.dynamicAnchors}${(0,hd.getProperty)(e)}`,s=n.errSchemaPath==="#"?n.validateName:oP(r);t.if((0,hd._)`!${o}`,()=>t.assign(o,s))}ds.dynamicAnchor=Ob;function oP(r){const{schemaEnv:e,schema:t,self:n}=r.it,{root:o,baseId:s,localRefs:a,meta:l}=e.root,{schemaId:c}=n.opts,d=new kg.SchemaEnv({schema:t,schemaId:c,root:o,baseId:s,localRefs:a,meta:l});return kg.compileSchema.call(n,d),(0,rP.getValidate)(r,d)}ds.default=nP;var us={};Object.defineProperty(us,"__esModule",{value:!0});us.dynamicRef=void 0;const Sg=ne,sP=_t,xg=br,iP={keyword:"$dynamicRef",schemaType:"string",code:r=>Tb(r,r.schema)};function Tb(r,e){const{gen:t,keyword:n,it:o}=r;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);const s=e.slice(1);if(o.allErrors)a();else{const c=t.let("valid",!1);a(c),r.ok(c)}function a(c){if(o.schemaEnv.root.dynamicAnchors[s]){const d=t.let("_v",(0,Sg._)`${sP.default.dynamicAnchors}${(0,Sg.getProperty)(s)}`);t.if(d,l(d,c),l(o.validateName,c))}else l(o.validateName,c)()}function l(c,d){return d?()=>t.block(()=>{(0,xg.callRef)(r,c),t.let(d,!0)}):()=>(0,xg.callRef)(r,c)}}us.dynamicRef=Tb;us.default=iP;var pf={};Object.defineProperty(pf,"__esModule",{value:!0});const aP=ds,lP=he,cP={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,aP.dynamicAnchor)(r,""):(0,lP.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};pf.default=cP;var mf={};Object.defineProperty(mf,"__esModule",{value:!0});const dP=us,uP={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,dP.dynamicRef)(r,r.schema)};mf.default=uP;Object.defineProperty(ff,"__esModule",{value:!0});const hP=ds,fP=us,pP=pf,mP=mf,gP=[hP.default,fP.default,pP.default,mP.default];ff.default=gP;var gf={},yf={};Object.defineProperty(yf,"__esModule",{value:!0});const Cg=bc,yP={keyword:"dependentRequired",type:"object",schemaType:"object",error:Cg.error,code:r=>(0,Cg.validatePropertyDeps)(r)};yf.default=yP;var vf={};Object.defineProperty(vf,"__esModule",{value:!0});const vP=bc,bP={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,vP.validateSchemaDeps)(r)};vf.default=bP;var bf={};Object.defineProperty(bf,"__esModule",{value:!0});const wP=he,kP={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:e,it:t}){e.contains===void 0&&(0,wP.checkStrictMode)(t,`"${r}" without "contains" is ignored`)}};bf.default=kP;Object.defineProperty(gf,"__esModule",{value:!0});const SP=yf,xP=vf,CP=bf,EP=[SP.default,xP.default,CP.default];gf.default=EP;var wf={},kf={};Object.defineProperty(kf,"__esModule",{value:!0});const Xr=ne,Eg=he,$P=_t,_P={message:"must NOT have unevaluated properties",params:({params:r})=>(0,Xr._)`{unevaluatedProperty: ${r.unevaluatedProperty}}`},NP={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:_P,code(r){const{gen:e,schema:t,data:n,errsCount:o,it:s}=r;if(!o)throw new Error("ajv implementation error");const{allErrors:a,props:l}=s;l instanceof Xr.Name?e.if((0,Xr._)`${l} !== true`,()=>e.forIn("key",n,h=>e.if(d(l,h),()=>c(h)))):l!==!0&&e.forIn("key",n,h=>l===void 0?c(h):e.if(u(l,h),()=>c(h))),s.props=!0,r.ok((0,Xr._)`${o} === ${$P.default.errors}`);function c(h){if(t===!1){r.setParams({unevaluatedProperty:h}),r.error(),a||e.break();return}if(!(0,Eg.alwaysValidSchema)(s,t)){const f=e.name("valid");r.subschema({keyword:"unevaluatedProperties",dataProp:h,dataPropType:Eg.Type.Str},f),a||e.if((0,Xr.not)(f),()=>e.break())}}function d(h,f){return(0,Xr._)`!${h} || !${h}[${f}]`}function u(h,f){const p=[];for(const y in h)h[y]===!0&&p.push((0,Xr._)`${f} !== ${y}`);return(0,Xr.and)(...p)}}};kf.default=NP;var Sf={};Object.defineProperty(Sf,"__esModule",{value:!0});const Pn=ne,$g=he,AP={message:({params:{len:r}})=>(0,Pn.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Pn._)`{limit: ${r}}`},OP={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:AP,code(r){const{gen:e,schema:t,data:n,it:o}=r,s=o.items||0;if(s===!0)return;const a=e.const("len",(0,Pn._)`${n}.length`);if(t===!1)r.setParams({len:s}),r.fail((0,Pn._)`${a} > ${s}`);else if(typeof t=="object"&&!(0,$g.alwaysValidSchema)(o,t)){const c=e.var("valid",(0,Pn._)`${a} <= ${s}`);e.if((0,Pn.not)(c),()=>l(c,s)),r.ok(c)}o.items=!0;function l(c,d){e.forRange("i",d,a,u=>{r.subschema({keyword:"unevaluatedItems",dataProp:u,dataPropType:$g.Type.Num},c),o.allErrors||e.if((0,Pn.not)(c),()=>e.break())})}}};Sf.default=OP;Object.defineProperty(wf,"__esModule",{value:!0});const TP=kf,BP=Sf,PP=[TP.default,BP.default];wf.default=PP;Object.defineProperty(hf,"__esModule",{value:!0});const IP=lc,MP=cc,DP=Hi,VP=ff,RP=gf,LP=wf,jP=Ui,_g=eo,FP=[VP.default,IP.default,MP.default,(0,DP.default)(!0),jP.default,_g.metadataVocabulary,_g.contentVocabulary,RP.default,LP.default];hf.default=FP;var xf={};const qP="https://json-schema.org/draft/2020-12/schema",zP="https://json-schema.org/draft/2020-12/schema",HP={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},UP="meta",KP="Core and Validation specifications meta-schema",WP=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],GP=["object","boolean"],JP="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",YP={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},XP={$schema:qP,$id:zP,$vocabulary:HP,$dynamicAnchor:UP,title:KP,allOf:WP,type:GP,$comment:JP,properties:YP},QP="https://json-schema.org/draft/2020-12/schema",ZP="https://json-schema.org/draft/2020-12/meta/applicator",eI={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},tI="meta",rI="Applicator vocabulary meta-schema",nI=["object","boolean"],oI={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},sI={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},iI={$schema:QP,$id:ZP,$vocabulary:eI,$dynamicAnchor:tI,title:rI,type:nI,properties:oI,$defs:sI},aI="https://json-schema.org/draft/2020-12/schema",lI="https://json-schema.org/draft/2020-12/meta/unevaluated",cI={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},dI="meta",uI="Unevaluated applicator vocabulary meta-schema",hI=["object","boolean"],fI={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},pI={$schema:aI,$id:lI,$vocabulary:cI,$dynamicAnchor:dI,title:uI,type:hI,properties:fI},mI="https://json-schema.org/draft/2020-12/schema",gI="https://json-schema.org/draft/2020-12/meta/content",yI={"https://json-schema.org/draft/2020-12/vocab/content":!0},vI="meta",bI="Content vocabulary meta-schema",wI=["object","boolean"],kI={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},SI={$schema:mI,$id:gI,$vocabulary:yI,$dynamicAnchor:vI,title:bI,type:wI,properties:kI},xI="https://json-schema.org/draft/2020-12/schema",CI="https://json-schema.org/draft/2020-12/meta/core",EI={"https://json-schema.org/draft/2020-12/vocab/core":!0},$I="meta",_I="Core vocabulary meta-schema",NI=["object","boolean"],AI={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},OI={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},TI={$schema:xI,$id:CI,$vocabulary:EI,$dynamicAnchor:$I,title:_I,type:NI,properties:AI,$defs:OI},BI="https://json-schema.org/draft/2020-12/schema",PI="https://json-schema.org/draft/2020-12/meta/format-annotation",II={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},MI="meta",DI="Format vocabulary meta-schema for annotation results",VI=["object","boolean"],RI={format:{type:"string"}},LI={$schema:BI,$id:PI,$vocabulary:II,$dynamicAnchor:MI,title:DI,type:VI,properties:RI},jI="https://json-schema.org/draft/2020-12/schema",FI="https://json-schema.org/draft/2020-12/meta/meta-data",qI={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},zI="meta",HI="Meta-data vocabulary meta-schema",UI=["object","boolean"],KI={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},WI={$schema:jI,$id:FI,$vocabulary:qI,$dynamicAnchor:zI,title:HI,type:UI,properties:KI},GI="https://json-schema.org/draft/2020-12/schema",JI="https://json-schema.org/draft/2020-12/meta/validation",YI={"https://json-schema.org/draft/2020-12/vocab/validation":!0},XI="meta",QI="Validation vocabulary meta-schema",ZI=["object","boolean"],eM={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},tM={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},rM={$schema:GI,$id:JI,$vocabulary:YI,$dynamicAnchor:XI,title:QI,type:ZI,properties:eM,$defs:tM};Object.defineProperty(xf,"__esModule",{value:!0});const nM=XP,oM=iI,sM=pI,iM=SI,aM=TI,lM=LI,cM=WI,dM=rM,uM=["/properties"];function hM(r){return[nM,oM,sM,iM,aM,e(this,lM),cM,e(this,dM)].forEach(t=>this.addMetaSchema(t,void 0,!1)),this;function e(t,n){return r?t.$dataMetaSchema(n,uM):n}}xf.default=hM;(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const t=Kn,n=hf,o=Ki,s=xf,a="https://json-schema.org/draft/2020-12/schema";class l extends t.default{constructor(p={}){super({...p,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:p,meta:y}=this.opts;y&&(s.default.call(this,p),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}r.exports=e=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var c=Dt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=ne;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var u=is;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var h=as;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(Iu,Iu.exports);var fM=Iu.exports;const pM=Mh(fM),Bb=["2.0","3.0","3.1"],mM={"http://json-schema.org/draft-04/schema#":eP,"https://json-schema.org/draft/2020-12/schema":pM},Mu={EMPTY_OR_INVALID:"Cannot find JSON, YAML or filename in data",OPENAPI_VERSION_NOT_SUPPORTED:"Cannot find supported Swagger/OpenAPI version in specification, version must be a string.",INVALID_REFERENCE:"Can’t resolve URI: %s",EXTERNAL_REFERENCE_NOT_SUPPORTED:"External references are not supported yet: %s"},gM="x-inlined-refs";function dr(r,e){const t={};for(const[n,o]of Object.entries(r))Array.isArray(o)?t[n]=o.map(s=>typeof s=="object"&&s!==null?dr(s,e):s):typeof o=="object"&&o!==null?t[n]=dr(o,e):t[n]=o;return e(t)}function yM(r,e){return dr(r,t=>e(t)?t:void 0)}function Pb(r){return typeof r!==void 0&&Array.isArray(r)&&r.length>0&&r.some(e=>e.isEntrypoint===!0)}function vM(r){const e=[];return!r||typeof r!="object"||dr(r,t=>(t.$ref&&typeof t.$ref=="string"&&!t.$ref.startsWith("#")&&e.push(t.$ref.split("#")[0]),t)),e}const Cf=Symbol.for("yaml.alias"),Du=Symbol.for("yaml.document"),dn=Symbol.for("yaml.map"),Ib=Symbol.for("yaml.pair"),Fr=Symbol.for("yaml.scalar"),hs=Symbol.for("yaml.seq"),jt=Symbol.for("yaml.node.type"),ao=r=>!!r&&typeof r=="object"&&r[jt]===Cf,fs=r=>!!r&&typeof r=="object"&&r[jt]===Du,ps=r=>!!r&&typeof r=="object"&&r[jt]===dn,Pe=r=>!!r&&typeof r=="object"&&r[jt]===Ib,$e=r=>!!r&&typeof r=="object"&&r[jt]===Fr,ms=r=>!!r&&typeof r=="object"&&r[jt]===hs;function Ie(r){if(r&&typeof r=="object")switch(r[jt]){case dn:case hs:return!0}return!1}function je(r){if(r&&typeof r=="object")switch(r[jt]){case Cf:case dn:case Fr:case hs:return!0}return!1}const bM=r=>($e(r)||Ie(r))&&!!r.anchor,vt=Symbol("break visit"),Mb=Symbol("skip children"),yr=Symbol("remove node");function yn(r,e){const t=Db(e);fs(r)?Ao(null,r.contents,t,Object.freeze([r]))===yr&&(r.contents=null):Ao(null,r,t,Object.freeze([]))}yn.BREAK=vt;yn.SKIP=Mb;yn.REMOVE=yr;function Ao(r,e,t,n){const o=Vb(r,e,t,n);if(je(o)||Pe(o))return Rb(r,n,o),Ao(r,o,t,n);if(typeof o!="symbol"){if(Ie(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=Ao(s,e.items[s],t,n);if(typeof a=="number")s=a-1;else{if(a===vt)return vt;a===yr&&(e.items.splice(s,1),s-=1)}}}else if(Pe(e)){n=Object.freeze(n.concat(e));const s=Ao("key",e.key,t,n);if(s===vt)return vt;s===yr&&(e.key=null);const a=Ao("value",e.value,t,n);if(a===vt)return vt;a===yr&&(e.value=null)}}return o}async function kc(r,e){const t=Db(e);fs(r)?await Oo(null,r.contents,t,Object.freeze([r]))===yr&&(r.contents=null):await Oo(null,r,t,Object.freeze([]))}kc.BREAK=vt;kc.SKIP=Mb;kc.REMOVE=yr;async function Oo(r,e,t,n){const o=await Vb(r,e,t,n);if(je(o)||Pe(o))return Rb(r,n,o),Oo(r,o,t,n);if(typeof o!="symbol"){if(Ie(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=await Oo(s,e.items[s],t,n);if(typeof a=="number")s=a-1;else{if(a===vt)return vt;a===yr&&(e.items.splice(s,1),s-=1)}}}else if(Pe(e)){n=Object.freeze(n.concat(e));const s=await Oo("key",e.key,t,n);if(s===vt)return vt;s===yr&&(e.key=null);const a=await Oo("value",e.value,t,n);if(a===vt)return vt;a===yr&&(e.value=null)}}return o}function Db(r){return typeof r=="object"&&(r.Collection||r.Node||r.Value)?Object.assign({Alias:r.Node,Map:r.Node,Scalar:r.Node,Seq:r.Node},r.Value&&{Map:r.Value,Scalar:r.Value,Seq:r.Value},r.Collection&&{Map:r.Collection,Seq:r.Collection},r):r}function Vb(r,e,t,n){var o,s,a,l,c;if(typeof t=="function")return t(r,e,n);if(ps(e))return(o=t.Map)==null?void 0:o.call(t,r,e,n);if(ms(e))return(s=t.Seq)==null?void 0:s.call(t,r,e,n);if(Pe(e))return(a=t.Pair)==null?void 0:a.call(t,r,e,n);if($e(e))return(l=t.Scalar)==null?void 0:l.call(t,r,e,n);if(ao(e))return(c=t.Alias)==null?void 0:c.call(t,r,e,n)}function Rb(r,e,t){const n=e[e.length-1];if(Ie(n))n.items[r]=t;else if(Pe(n))r==="key"?n.key=t:n.value=t;else if(fs(n))n.contents=t;else{const o=ao(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const wM={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},kM=r=>r.replace(/[!,[\]{}]/g,e=>wM[e]);class ht{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ht.defaultYaml,e),this.tags=Object.assign({},ht.defaultTags,t)}clone(){const e=new ht(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ht(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ht.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ht.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:ht.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ht.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),o=n.shift();switch(o){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[s,a]=n;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[s]=n;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const a=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,a),!1}}default:return t(0,`Unknown directive ${o}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const a=e.slice(2,-1);return a==="!"||a==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),a)}const[,n,o]=e.match(/^(.*!)([^!]*)$/s);o||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(o)}catch(a){return t(String(a)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+kM(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let o;if(e&&n.length>0&&je(e.contents)){const s={};yn(e.contents,(a,l)=>{je(l)&&l.tag&&(s[l.tag]=!0)}),o=Object.keys(s)}else o=[];for(const[s,a]of n)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||o.some(l=>l.startsWith(a)))&&t.push(`%TAG ${s} ${a}`);return t.join(`
70
+ `)}}ht.defaultYaml={explicit:!1,version:"1.2"};ht.defaultTags={"!!":"tag:yaml.org,2002:"};function Lb(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){const e=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(e)}return!0}function jb(r){const e=new Set;return yn(r,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Fb(r,e){for(let t=1;;++t){const n=`${r}${t}`;if(!e.has(n))return n}}function SM(r,e){const t=[],n=new Map;let o=null;return{onAnchor:s=>{t.push(s),o||(o=jb(r));const a=Fb(e,o);return o.add(a),a},setAnchors:()=>{for(const s of t){const a=n.get(s);if(typeof a=="object"&&a.anchor&&($e(a.node)||Ie(a.node)))a.node.anchor=a.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=s,l}}},sourceObjects:n}}function To(r,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let o=0,s=n.length;o<s;++o){const a=n[o],l=To(r,n,String(o),a);l===void 0?delete n[o]:l!==a&&(n[o]=l)}else if(n instanceof Map)for(const o of Array.from(n.keys())){const s=n.get(o),a=To(r,n,o,s);a===void 0?n.delete(o):a!==s&&n.set(o,a)}else if(n instanceof Set)for(const o of Array.from(n)){const s=To(r,n,o,o);s===void 0?n.delete(o):s!==o&&(n.delete(o),n.add(s))}else for(const[o,s]of Object.entries(n)){const a=To(r,n,o,s);a===void 0?delete n[o]:a!==s&&(n[o]=a)}return r.call(e,t,n)}function Vt(r,e,t){if(Array.isArray(r))return r.map((n,o)=>Vt(n,String(o),t));if(r&&typeof r.toJSON=="function"){if(!t||!bM(r))return r.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(r,n),t.onCreate=s=>{n.res=s,delete t.onCreate};const o=r.toJSON(e,t);return t.onCreate&&t.onCreate(o),o}return typeof r=="bigint"&&!(t!=null&&t.keep)?Number(r):r}class Ef{constructor(e){Object.defineProperty(this,jt,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:o,reviver:s}={}){if(!fs(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Vt(this,"",a);if(typeof o=="function")for(const{count:c,res:d}of a.anchors.values())o(d,c);return typeof s=="function"?To(s,{"":l},"",l):l}}class Sc extends Ef{constructor(e){super(Cf),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return yn(e,{Node:(n,o)=>{if(o===this)return yn.BREAK;o.anchor===this.source&&(t=o)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:o,maxAliasCount:s}=t,a=this.resolve(o);if(!a){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let l=n.get(a);if(l||(Vt(a,null,t),l=n.get(a)),!l||l.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=ol(o,a,n)),l.count*l.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return l.res}toString(e,t,n){const o=`*${this.source}`;if(e){if(Lb(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${o} `}return o}}function ol(r,e,t){if(ao(e)){const n=e.resolve(r),o=t&&n&&t.get(n);return o?o.count*o.aliasCount:0}else if(Ie(e)){let n=0;for(const o of e.items){const s=ol(r,o,t);s>n&&(n=s)}return n}else if(Pe(e)){const n=ol(r,e.key,t),o=ol(r,e.value,t);return Math.max(n,o)}return 1}const qb=r=>!r||typeof r!="function"&&typeof r!="object";class le extends Ef{constructor(e){super(Fr),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Vt(this.value,e,t)}toString(){return String(this.value)}}le.BLOCK_FOLDED="BLOCK_FOLDED";le.BLOCK_LITERAL="BLOCK_LITERAL";le.PLAIN="PLAIN";le.QUOTE_DOUBLE="QUOTE_DOUBLE";le.QUOTE_SINGLE="QUOTE_SINGLE";const xM="tag:yaml.org,2002:";function CM(r,e,t){if(e){const n=t.filter(s=>s.tag===e),o=n.find(s=>!s.format)??n[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return t.find(n=>{var o;return((o=n.identify)==null?void 0:o.call(n,r))&&!n.format})}function _i(r,e,t){var n,o,s;if(fs(r)&&(r=r.contents),je(r))return r;if(Pe(r)){const y=(o=(n=t.schema[dn]).createNode)==null?void 0:o.call(n,t.schema,null,t);return y.items.push(r),y}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt<"u"&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:a,onAnchor:l,onTagObj:c,schema:d,sourceObjects:u}=t;let h;if(a&&r&&typeof r=="object"){if(h=u.get(r),h)return h.anchor||(h.anchor=l(r)),new Sc(h.anchor);h={anchor:null,node:null},u.set(r,h)}e!=null&&e.startsWith("!!")&&(e=xM+e.slice(2));let f=CM(r,e,d.tags);if(!f){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){const y=new le(r);return h&&(h.node=y),y}f=r instanceof Map?d[dn]:Symbol.iterator in Object(r)?d[hs]:d[dn]}c&&(c(f),delete t.onTagObj);const p=f!=null&&f.createNode?f.createNode(t.schema,r,t):typeof((s=f==null?void 0:f.nodeClass)==null?void 0:s.from)=="function"?f.nodeClass.from(t.schema,r,t):new le(r);return e?p.tag=e:f.default||(p.tag=f.tag),h&&(h.node=p),p}function Bl(r,e,t){let n=t;for(let o=e.length-1;o>=0;--o){const s=e[o];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=n,n=a}else n=new Map([[s,n]])}return _i(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}const Ys=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done;class $f extends Ef{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>je(n)||Pe(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ys(e))this.add(t);else{const[n,...o]=e,s=this.get(n,!0);if(Ie(s))s.addIn(o,t);else if(s===void 0&&this.schema)this.set(n,Bl(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const o=this.get(t,!0);if(Ie(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...o]=e,s=this.get(n,!0);return o.length===0?!t&&$e(s)?s.value:s:Ie(s)?s.getIn(o,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Pe(t))return!1;const n=t.value;return n==null||e&&$e(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const o=this.get(t,!0);return Ie(o)?o.hasIn(n):!1}setIn(e,t){const[n,...o]=e;if(o.length===0)this.set(n,t);else{const s=this.get(n,!0);if(Ie(s))s.setIn(o,t);else if(s===void 0&&this.schema)this.set(n,Bl(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}}$f.maxFlowStringSingleLineLength=60;const EM=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function Ar(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}const Rn=(r,e,t)=>r.endsWith(`
71
71
  `)?Ar(t,e):t.includes(`
72
72
  `)?`
73
- `+Ar(t,e):(r.endsWith(" ")?"":" ")+t,zb="flow",Du="block",sl="quoted";function Sc(r,e,t="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:s=20,onFold:a,onOverflow:l}={}){if(!o||o<0)return r;const c=Math.max(1+s,1+o-e.length);if(r.length<=c)return r;const d=[],u={};let h=o-e.length;typeof n=="number"&&(n>o-Math.max(2,s)?d.push(0):h=o-n);let f,p,y=!1,g=-1,m=-1,v=-1;t===Du&&(g=Ng(r,g,e.length),g!==-1&&(h=g+c));for(let w;w=r[g+=1];){if(t===sl&&w==="\\"){switch(m=g,r[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(w===`
74
- `)t===Du&&(g=Ng(r,g,e.length)),h=g+e.length+c,f=void 0;else{if(w===" "&&p&&p!==" "&&p!==`
73
+ `+Ar(t,e):(r.endsWith(" ")?"":" ")+t,zb="flow",Vu="block",sl="quoted";function xc(r,e,t="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:s=20,onFold:a,onOverflow:l}={}){if(!o||o<0)return r;const c=Math.max(1+s,1+o-e.length);if(r.length<=c)return r;const d=[],u={};let h=o-e.length;typeof n=="number"&&(n>o-Math.max(2,s)?d.push(0):h=o-n);let f,p,y=!1,g=-1,m=-1,v=-1;t===Vu&&(g=Ng(r,g,e.length),g!==-1&&(h=g+c));for(let w;w=r[g+=1];){if(t===sl&&w==="\\"){switch(m=g,r[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(w===`
74
+ `)t===Vu&&(g=Ng(r,g,e.length)),h=g+e.length+c,f=void 0;else{if(w===" "&&p&&p!==" "&&p!==`
75
75
  `&&p!==" "){const S=r[g+1];S&&S!==" "&&S!==`
76
76
  `&&S!==" "&&(f=g)}if(g>=h)if(f)d.push(f),h=f+c,f=void 0;else if(t===sl){for(;p===" "||p===" ";)p=w,w=r[g+=1],y=!0;const S=g>v+1?g-2:m-1;if(u[S])return r;d.push(S),u[S]=!0,h=S+c,f=void 0}else y=!0}p=w}if(y&&l&&l(),d.length===0)return r;a&&a();let b=r.slice(0,d[0]);for(let w=0;w<d.length;++w){const S=d[w],x=d[w+1]||r.length;S===0?b=`
77
77
  ${e}${r.slice(0,x)}`:(t===sl&&u[S]&&(b+=`${r[S]}\\`),b+=`
78
78
  ${e}${r.slice(S+1,x)}`)}return b}function Ng(r,e,t){let n=e,o=e+1,s=r[o];for(;s===" "||s===" ";)if(e<o+t)s=r[++e];else{do s=r[++e];while(s&&s!==`
79
- `);n=e,o=e+1,s=r[o]}return n}const xc=(r,e)=>({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),Cc=r=>/^(%|---|\.\.\.)/m.test(r);function $M(r,e,t){if(!e||e<0)return!1;const n=e-t,o=r.length;if(o<=n)return!1;for(let s=0,a=0;s<o;++s)if(r[s]===`
80
- `){if(s-a>n)return!0;if(a=s+1,o-a<=n)return!1}return!0}function di(r,e){const t=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,o=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Cc(r)?" ":"");let a="",l=0;for(let c=0,d=t[c];d;d=t[++c])if(d===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(a+=t.slice(l,c)+"\\ ",c+=1,l=c,d="\\"),d==="\\")switch(t[c+1]){case"u":{a+=t.slice(l,c);const u=t.substr(c+2,4);switch(u){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:u.substr(0,2)==="00"?a+="\\x"+u.substr(2):a+=t.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<o)c+=1;else{for(a+=t.slice(l,c)+`
79
+ `);n=e,o=e+1,s=r[o]}return n}const Cc=(r,e)=>({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),Ec=r=>/^(%|---|\.\.\.)/m.test(r);function $M(r,e,t){if(!e||e<0)return!1;const n=e-t,o=r.length;if(o<=n)return!1;for(let s=0,a=0;s<o;++s)if(r[s]===`
80
+ `){if(s-a>n)return!0;if(a=s+1,o-a<=n)return!1}return!0}function di(r,e){const t=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,o=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Ec(r)?" ":"");let a="",l=0;for(let c=0,d=t[c];d;d=t[++c])if(d===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(a+=t.slice(l,c)+"\\ ",c+=1,l=c,d="\\"),d==="\\")switch(t[c+1]){case"u":{a+=t.slice(l,c);const u=t.substr(c+2,4);switch(u){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:u.substr(0,2)==="00"?a+="\\x"+u.substr(2):a+=t.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<o)c+=1;else{for(a+=t.slice(l,c)+`
81
81
 
82
82
  `;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)a+=`
83
- `,c+=2;a+=s,t[c+2]===" "&&(a+="\\"),c+=1,l=c+1}break;default:c+=1}return a=l?a+t.slice(l):t,n?a:Sc(a,s,sl,xc(e,!1))}function Vu(r,e){if(e.options.singleQuote===!1||e.implicitKey&&r.includes(`
84
- `)||/[ \t]\n|\n[ \t]/.test(r))return di(r,e);const t=e.indent||(Cc(r)?" ":""),n="'"+r.replace(/'/g,"''").replace(/\n+/g,`$&
85
- ${t}`)+"'";return e.implicitKey?n:Sc(n,t,zb,xc(e,!1))}function Bo(r,e){const{singleQuote:t}=e.options;let n;if(t===!1)n=di;else{const o=r.includes('"'),s=r.includes("'");o&&!s?n=Vu:s&&!o?n=di:n=t?Vu:di}return n(r,e)}let Ru;try{Ru=new RegExp(`(^|(?<!
83
+ `,c+=2;a+=s,t[c+2]===" "&&(a+="\\"),c+=1,l=c+1}break;default:c+=1}return a=l?a+t.slice(l):t,n?a:xc(a,s,sl,Cc(e,!1))}function Ru(r,e){if(e.options.singleQuote===!1||e.implicitKey&&r.includes(`
84
+ `)||/[ \t]\n|\n[ \t]/.test(r))return di(r,e);const t=e.indent||(Ec(r)?" ":""),n="'"+r.replace(/'/g,"''").replace(/\n+/g,`$&
85
+ ${t}`)+"'";return e.implicitKey?n:xc(n,t,zb,Cc(e,!1))}function Bo(r,e){const{singleQuote:t}=e.options;let n;if(t===!1)n=di;else{const o=r.includes('"'),s=r.includes("'");o&&!s?n=Ru:s&&!o?n=di:n=t?Ru:di}return n(r,e)}let Lu;try{Lu=new RegExp(`(^|(?<!
86
86
  ))
87
87
  +(?!
88
- |$)`,"g")}catch{Ru=/\n+(?!\n|$)/g}function il({comment:r,type:e,value:t},n,o,s){const{blockQuote:a,commentString:l,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return Bo(t,n);const d=n.indent||(n.forceBlockIndent||Cc(t)?" ":""),u=a==="literal"?!0:a==="folded"||e===le.BLOCK_FOLDED?!1:e===le.BLOCK_LITERAL?!0:!$M(t,c,d.length);if(!t)return u?`|
88
+ |$)`,"g")}catch{Lu=/\n+(?!\n|$)/g}function il({comment:r,type:e,value:t},n,o,s){const{blockQuote:a,commentString:l,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return Bo(t,n);const d=n.indent||(n.forceBlockIndent||Ec(t)?" ":""),u=a==="literal"?!0:a==="folded"||e===le.BLOCK_FOLDED?!1:e===le.BLOCK_LITERAL?!0:!$M(t,c,d.length);if(!t)return u?`|
89
89
  `:`>
90
90
  `;let h,f;for(f=t.length;f>0;--f){const x=t[f-1];if(x!==`
91
91
  `&&x!==" "&&x!==" ")break}let p=t.substring(f);const y=p.indexOf(`
92
92
  `);y===-1?h="-":t===p||y!==p.length-1?(h="+",s&&s()):h="",p&&(t=t.slice(0,-p.length),p[p.length-1]===`
93
- `&&(p=p.slice(0,-1)),p=p.replace(Ru,`$&${d}`));let g=!1,m,v=-1;for(m=0;m<t.length;++m){const x=t[m];if(x===" ")g=!0;else if(x===`
93
+ `&&(p=p.slice(0,-1)),p=p.replace(Lu,`$&${d}`));let g=!1,m,v=-1;for(m=0;m<t.length;++m){const x=t[m];if(x===" ")g=!0;else if(x===`
94
94
  `)v=m;else break}let b=t.substring(0,v<m?v+1:m);b&&(t=t.substring(b.length),b=b.replace(/\n+/g,`$&${d}`));let w=(u?"|":">")+(g?d?"2":"1":"")+h;if(r&&(w+=" "+l(r.replace(/ ?[\r\n]+/g," ")),o&&o()),u)return t=t.replace(/\n+/g,`$&${d}`),`${w}
95
95
  ${d}${b}${t}${p}`;t=t.replace(/\n+/g,`
96
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);const S=Sc(`${b}${t}${p}`,d,Du,xc(n,!0));return`${w}
96
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);const S=xc(`${b}${t}${p}`,d,Vu,Cc(n,!0));return`${w}
97
97
  ${d}${S}`}function _M(r,e,t,n){const{type:o,value:s}=r,{actualString:a,implicitKey:l,indent:c,indentStep:d,inFlow:u}=e;if(l&&s.includes(`
98
98
  `)||u&&/[[\]{},]/.test(s))return Bo(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||u||!s.includes(`
99
99
  `)?Bo(s,e):il(r,e,t,n);if(!l&&!u&&o!==le.PLAIN&&s.includes(`
100
- `))return il(r,e,t,n);if(Cc(s)){if(c==="")return e.forceBlockIndent=!0,il(r,e,t,n);if(l&&c===d)return Bo(s,e)}const h=s.replace(/\n+/g,`$&
101
- ${c}`);if(a){const f=g=>{var m;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((m=g.test)==null?void 0:m.test(h))},{compat:p,tags:y}=e.doc.schema;if(y.some(f)||p!=null&&p.some(f))return Bo(s,e)}return l?h:Sc(h,c,zb,xc(e,!1))}function Wi(r,e,t,n){const{implicitKey:o,inFlow:s}=e,a=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)});let{type:l}=r;l!==le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=le.QUOTE_DOUBLE);const c=u=>{switch(u){case le.BLOCK_FOLDED:case le.BLOCK_LITERAL:return o||s?Bo(a.value,e):il(a,e,t,n);case le.QUOTE_DOUBLE:return di(a.value,e);case le.QUOTE_SINGLE:return Vu(a.value,e);case le.PLAIN:return _M(a,e,t,n);default:return null}};let d=c(l);if(d===null){const{defaultKeyType:u,defaultStringType:h}=e.options,f=o&&u||h;if(d=c(f),d===null)throw new Error(`Unsupported default string type ${f}`)}return d}function Hb(r,e){const t=Object.assign({blockQuote:!0,commentString:EM,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},r.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:r,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function NM(r,e){var t;if(e.tag){const s=r.filter(a=>a.tag===e.tag);if(s.length>0)return s.find(a=>a.format===e.format)??s[0]}let n,o;if($e(e)){o=e.value;const s=r.filter(a=>{var l;return(l=a.identify)==null?void 0:l.call(a,o)});n=s.find(a=>a.format===e.format)??s.find(a=>!a.format)}else o=e,n=r.find(s=>s.nodeClass&&o instanceof s.nodeClass);if(!n){const s=((t=o==null?void 0:o.constructor)==null?void 0:t.name)??typeof o;throw new Error(`Tag not resolved for ${s} value`)}return n}function AM(r,e,{anchors:t,doc:n}){if(!n.directives)return"";const o=[],s=($e(r)||Ie(r))&&r.anchor;s&&Lb(s)&&(t.add(s),o.push(`&${s}`));const a=r.tag?r.tag:e.default?null:e.tag;return a&&o.push(n.directives.tagString(a)),o.join(" ")}function Qo(r,e,t,n){var o;if(Pe(r))return r.toString(e,t,n);if(ao(r)){if(e.doc.directives)return r.toString(e);if((o=e.resolvedAliases)!=null&&o.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let s;const a=je(r)?r:e.doc.createNode(r,{onTagObj:d=>s=d});s||(s=NM(e.doc.schema.tags,a));const l=AM(a,s,e);l.length>0&&(e.indentAtStart=(e.indentAtStart??0)+l.length+1);const c=typeof s.stringify=="function"?s.stringify(a,e,t,n):$e(a)?Wi(a,e,t,n):a.toString(e,t,n);return l?$e(a)||c[0]==="{"||c[0]==="["?`${l} ${c}`:`${l}
100
+ `))return il(r,e,t,n);if(Ec(s)){if(c==="")return e.forceBlockIndent=!0,il(r,e,t,n);if(l&&c===d)return Bo(s,e)}const h=s.replace(/\n+/g,`$&
101
+ ${c}`);if(a){const f=g=>{var m;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((m=g.test)==null?void 0:m.test(h))},{compat:p,tags:y}=e.doc.schema;if(y.some(f)||p!=null&&p.some(f))return Bo(s,e)}return l?h:xc(h,c,zb,Cc(e,!1))}function Wi(r,e,t,n){const{implicitKey:o,inFlow:s}=e,a=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)});let{type:l}=r;l!==le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=le.QUOTE_DOUBLE);const c=u=>{switch(u){case le.BLOCK_FOLDED:case le.BLOCK_LITERAL:return o||s?Bo(a.value,e):il(a,e,t,n);case le.QUOTE_DOUBLE:return di(a.value,e);case le.QUOTE_SINGLE:return Ru(a.value,e);case le.PLAIN:return _M(a,e,t,n);default:return null}};let d=c(l);if(d===null){const{defaultKeyType:u,defaultStringType:h}=e.options,f=o&&u||h;if(d=c(f),d===null)throw new Error(`Unsupported default string type ${f}`)}return d}function Hb(r,e){const t=Object.assign({blockQuote:!0,commentString:EM,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},r.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:r,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function NM(r,e){var t;if(e.tag){const s=r.filter(a=>a.tag===e.tag);if(s.length>0)return s.find(a=>a.format===e.format)??s[0]}let n,o;if($e(e)){o=e.value;const s=r.filter(a=>{var l;return(l=a.identify)==null?void 0:l.call(a,o)});n=s.find(a=>a.format===e.format)??s.find(a=>!a.format)}else o=e,n=r.find(s=>s.nodeClass&&o instanceof s.nodeClass);if(!n){const s=((t=o==null?void 0:o.constructor)==null?void 0:t.name)??typeof o;throw new Error(`Tag not resolved for ${s} value`)}return n}function AM(r,e,{anchors:t,doc:n}){if(!n.directives)return"";const o=[],s=($e(r)||Ie(r))&&r.anchor;s&&Lb(s)&&(t.add(s),o.push(`&${s}`));const a=r.tag?r.tag:e.default?null:e.tag;return a&&o.push(n.directives.tagString(a)),o.join(" ")}function Qo(r,e,t,n){var o;if(Pe(r))return r.toString(e,t,n);if(ao(r)){if(e.doc.directives)return r.toString(e);if((o=e.resolvedAliases)!=null&&o.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let s;const a=je(r)?r:e.doc.createNode(r,{onTagObj:d=>s=d});s||(s=NM(e.doc.schema.tags,a));const l=AM(a,s,e);l.length>0&&(e.indentAtStart=(e.indentAtStart??0)+l.length+1);const c=typeof s.stringify=="function"?s.stringify(a,e,t,n):$e(a)?Wi(a,e,t,n):a.toString(e,t,n);return l?$e(a)||c[0]==="{"||c[0]==="["?`${l} ${c}`:`${l}
102
102
  ${e.indent}${c}`:c}function OM({key:r,value:e},t,n,o){const{allNullValues:s,doc:a,indent:l,indentStep:c,options:{commentString:d,indentSeq:u,simpleKeys:h}}=t;let f=je(r)&&r.comment||null;if(h){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(Ie(r)){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!h&&(!r||f&&e==null&&!t.inFlow||Ie(r)||($e(r)?r.type===le.BLOCK_FOLDED||r.type===le.BLOCK_LITERAL:typeof r=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(h||!s),indent:l+c});let y=!1,g=!1,m=Qo(r,t,()=>y=!0,()=>g=!0);if(!p&&!t.inFlow&&m.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(s||e==null)return y&&n&&n(),m===""?"?":p?`? ${m}`:m}else if(s&&!h||e==null&&p)return m=`? ${m}`,f&&!y?m+=Rn(m,t.indent,d(f)):g&&o&&o(),m;y&&(f=null),p?(f&&(m+=Rn(m,t.indent,d(f))),m=`? ${m}
103
103
  ${l}:`):(m=`${m}:`,f&&(m+=Rn(m,t.indent,d(f))));let v,b,w;je(e)?(v=!!e.spaceBefore,b=e.commentBefore,w=e.comment):(v=!1,b=null,w=null,e&&typeof e=="object"&&(e=a.createNode(e))),t.implicitKey=!1,!p&&!f&&$e(e)&&(t.indentAtStart=m.length+1),g=!1,!u&&c.length>=2&&!t.inFlow&&!p&&ms(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1;const x=Qo(e,t,()=>S=!0,()=>g=!0);let k=" ";if(f||v||b){if(k=v?`
104
104
  `:"",b){const C=d(b);k+=`
@@ -109,32 +109,32 @@ ${Ar(C,t.indent)}`}x===""&&!t.inFlow?k===`
109
109
  ${t.indent}`}else if(!p&&Ie(e)){const C=x[0],N=x.indexOf(`
110
110
  `),P=N!==-1,M=t.inFlow??e.flow??e.items.length===0;if(P||!M){let j=!1;if(P&&(C==="&"||C==="!")){let I=x.indexOf(" ");C==="&"&&I!==-1&&I<N&&x[I+1]==="!"&&(I=x.indexOf(" ",I+1)),(I===-1||N<I)&&(j=!0)}j||(k=`
111
111
  ${t.indent}`)}}else(x===""||x[0]===`
112
- `)&&(k="");return m+=k+x,t.inFlow?S&&n&&n():w&&!S?m+=Rn(m,t.indent,d(w)):g&&o&&o(),m}function Ub(r,e){(r==="debug"||r==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Ag="<<";function Kb(r,e,{key:t,value:n}){if(r!=null&&r.doc.schema.merge&&TM(t))if(n=ao(n)?n.resolve(r.doc):n,ms(n))for(const o of n.items)hd(r,e,o);else if(Array.isArray(n))for(const o of n)hd(r,e,o);else hd(r,e,n);else{const o=Vt(t,"",r);if(e instanceof Map)e.set(o,Vt(n,o,r));else if(e instanceof Set)e.add(o);else{const s=BM(t,o,r),a=Vt(n,s,r);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}const TM=r=>r===Ag||$e(r)&&r.value===Ag&&(!r.type||r.type===le.PLAIN);function hd(r,e,t){const n=r&&ao(t)?t.resolve(r.doc):t;if(!ps(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,r,Map);for(const[s,a]of o)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function BM(r,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(je(r)&&t!=null&&t.doc){const n=Hb(t.doc,{});n.anchors=new Set;for(const s of t.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;const o=r.toString(n);if(!t.mapKeyWarned){let s=JSON.stringify(o);s.length>40&&(s=s.substring(0,36)+'..."'),Ub(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return o}return JSON.stringify(e)}function $f(r,e,t){const n=_i(r,void 0,t),o=_i(e,void 0,t);return new lt(n,o)}class lt{constructor(e,t=null){Object.defineProperty(this,jt,{value:Ib}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return je(t)&&(t=t.clone(e)),je(n)&&(n=n.clone(e)),new lt(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return Kb(t,n,this)}toString(e,t,n){return e!=null&&e.doc?OM(this,e,t,n):JSON.stringify(this)}}function Wb(r,e,t){return(e.inFlow??r.flow?IM:PM)(r,e,t)}function PM({comment:r,items:e},t,{blockItemPrefix:n,flowChars:o,itemIndent:s,onChompKeep:a,onComment:l}){const{indent:c,options:{commentString:d}}=t,u=Object.assign({},t,{indent:s,type:null});let h=!1;const f=[];for(let y=0;y<e.length;++y){const g=e[y];let m=null;if(je(g))!h&&g.spaceBefore&&f.push(""),Pl(t,f,g.commentBefore,h),g.comment&&(m=g.comment);else if(Pe(g)){const b=je(g.key)?g.key:null;b&&(!h&&b.spaceBefore&&f.push(""),Pl(t,f,b.commentBefore,h))}h=!1;let v=Qo(g,u,()=>m=null,()=>h=!0);m&&(v+=Rn(v,s,d(m))),h&&m&&(h=!1),f.push(n+v)}let p;if(f.length===0)p=o.start+o.end;else{p=f[0];for(let y=1;y<f.length;++y){const g=f[y];p+=g?`
112
+ `)&&(k="");return m+=k+x,t.inFlow?S&&n&&n():w&&!S?m+=Rn(m,t.indent,d(w)):g&&o&&o(),m}function Ub(r,e){(r==="debug"||r==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Ag="<<";function Kb(r,e,{key:t,value:n}){if(r!=null&&r.doc.schema.merge&&TM(t))if(n=ao(n)?n.resolve(r.doc):n,ms(n))for(const o of n.items)fd(r,e,o);else if(Array.isArray(n))for(const o of n)fd(r,e,o);else fd(r,e,n);else{const o=Vt(t,"",r);if(e instanceof Map)e.set(o,Vt(n,o,r));else if(e instanceof Set)e.add(o);else{const s=BM(t,o,r),a=Vt(n,s,r);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}const TM=r=>r===Ag||$e(r)&&r.value===Ag&&(!r.type||r.type===le.PLAIN);function fd(r,e,t){const n=r&&ao(t)?t.resolve(r.doc):t;if(!ps(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,r,Map);for(const[s,a]of o)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function BM(r,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(je(r)&&t!=null&&t.doc){const n=Hb(t.doc,{});n.anchors=new Set;for(const s of t.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;const o=r.toString(n);if(!t.mapKeyWarned){let s=JSON.stringify(o);s.length>40&&(s=s.substring(0,36)+'..."'),Ub(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return o}return JSON.stringify(e)}function _f(r,e,t){const n=_i(r,void 0,t),o=_i(e,void 0,t);return new lt(n,o)}class lt{constructor(e,t=null){Object.defineProperty(this,jt,{value:Ib}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return je(t)&&(t=t.clone(e)),je(n)&&(n=n.clone(e)),new lt(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return Kb(t,n,this)}toString(e,t,n){return e!=null&&e.doc?OM(this,e,t,n):JSON.stringify(this)}}function Wb(r,e,t){return(e.inFlow??r.flow?IM:PM)(r,e,t)}function PM({comment:r,items:e},t,{blockItemPrefix:n,flowChars:o,itemIndent:s,onChompKeep:a,onComment:l}){const{indent:c,options:{commentString:d}}=t,u=Object.assign({},t,{indent:s,type:null});let h=!1;const f=[];for(let y=0;y<e.length;++y){const g=e[y];let m=null;if(je(g))!h&&g.spaceBefore&&f.push(""),Pl(t,f,g.commentBefore,h),g.comment&&(m=g.comment);else if(Pe(g)){const b=je(g.key)?g.key:null;b&&(!h&&b.spaceBefore&&f.push(""),Pl(t,f,b.commentBefore,h))}h=!1;let v=Qo(g,u,()=>m=null,()=>h=!0);m&&(v+=Rn(v,s,d(m))),h&&m&&(h=!1),f.push(n+v)}let p;if(f.length===0)p=o.start+o.end;else{p=f[0];for(let y=1;y<f.length;++y){const g=f[y];p+=g?`
113
113
  ${c}${g}`:`
114
114
  `}}return r?(p+=`
115
115
  `+Ar(d(r),c),l&&l()):h&&a&&a(),p}function IM({items:r},e,{flowChars:t,itemIndent:n}){const{indent:o,indentStep:s,flowCollectionPadding:a,options:{commentString:l}}=e;n+=s;const c=Object.assign({},e,{indent:n,inFlow:!0,type:null});let d=!1,u=0;const h=[];for(let y=0;y<r.length;++y){const g=r[y];let m=null;if(je(g))g.spaceBefore&&h.push(""),Pl(e,h,g.commentBefore,!1),g.comment&&(m=g.comment);else if(Pe(g)){const b=je(g.key)?g.key:null;b&&(b.spaceBefore&&h.push(""),Pl(e,h,b.commentBefore,!1),b.comment&&(d=!0));const w=je(g.value)?g.value:null;w?(w.comment&&(m=w.comment),w.commentBefore&&(d=!0)):g.value==null&&b!=null&&b.comment&&(m=b.comment)}m&&(d=!0);let v=Qo(g,c,()=>m=null);y<r.length-1&&(v+=","),m&&(v+=Rn(v,n,l(m))),!d&&(h.length>u||v.includes(`
116
116
  `))&&(d=!0),h.push(v),u=h.length}const{start:f,end:p}=t;if(h.length===0)return f+p;if(!d){const y=h.reduce((g,m)=>g+m.length+2,2);d=e.options.lineWidth>0&&y>e.options.lineWidth}if(d){let y=f;for(const g of h)y+=g?`
117
117
  ${s}${o}${g}`:`
118
118
  `;return`${y}
119
- ${o}${p}`}else return`${f}${a}${h.join(" ")}${a}${p}`}function Pl({indent:r,options:{commentString:e}},t,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const s=Ar(e(n),r);t.push(s.trimStart())}}function Ln(r,e){const t=$e(e)?e.value:e;for(const n of r)if(Pe(n)&&(n.key===e||n.key===t||$e(n.key)&&n.key.value===t))return n}class Et extends Ef{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(dn,e),this.items=[]}static from(e,t,n){const{keepUndefined:o,replacer:s}=n,a=new this(e),l=(c,d)=>{if(typeof s=="function")d=s.call(t,c,d);else if(Array.isArray(s)&&!s.includes(c))return;(d!==void 0||o)&&a.items.push($f(c,d,n))};if(t instanceof Map)for(const[c,d]of t)l(c,d);else if(t&&typeof t=="object")for(const c of Object.keys(t))l(c,t[c]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,t){var n;let o;Pe(e)?o=e:!e||typeof e!="object"||!("key"in e)?o=new lt(e,e==null?void 0:e.value):o=new lt(e.key,e.value);const s=Ln(this.items,o.key),a=(n=this.schema)==null?void 0:n.sortMapEntries;if(s){if(!t)throw new Error(`Key ${o.key} already set`);$e(s.value)&&qb(o.value)?s.value.value=o.value:s.value=o.value}else if(a){const l=this.items.findIndex(c=>a(o,c)<0);l===-1?this.items.push(o):this.items.splice(l,0,o)}else this.items.push(o)}delete(e){const t=Ln(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=Ln(this.items,e),o=n==null?void 0:n.value;return(!t&&$e(o)?o.value:o)??void 0}has(e){return!!Ln(this.items,e)}set(e,t){this.add(new lt(e,t),!0)}toJSON(e,t,n){const o=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(o);for(const s of this.items)Kb(t,o,s);return o}toString(e,t,n){if(!e)return JSON.stringify(this);for(const o of this.items)if(!Pe(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Wb(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const gs={collection:"map",default:!0,nodeClass:Et,tag:"tag:yaml.org,2002:map",resolve(r,e){return ps(r)||e("Expected a mapping for this tag"),r},createNode:(r,e,t)=>Et.from(r,e,t)};class vn extends Ef{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(hs,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Ma(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=Ma(e);if(typeof n!="number")return;const o=this.items[n];return!t&&$e(o)?o.value:o}has(e){const t=Ma(e);return typeof t=="number"&&t<this.items.length}set(e,t){const n=Ma(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];$e(o)&&qb(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t!=null&&t.onCreate&&t.onCreate(n);let o=0;for(const s of this.items)n.push(Vt(s,String(o++),t));return n}toString(e,t,n){return e?Wb(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:o}=n,s=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let l of t){if(typeof o=="function"){const c=t instanceof Set?l:String(a++);l=o.call(t,c,l)}s.items.push(_i(l,void 0,n))}}return s}}function Ma(r){let e=$e(r)?r.value:r;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const ys={collection:"seq",default:!0,nodeClass:vn,tag:"tag:yaml.org,2002:seq",resolve(r,e){return ms(r)||e("Expected a sequence for this tag"),r},createNode:(r,e,t)=>vn.from(r,e,t)},Ec={identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify(r,e,t,n){return e=Object.assign({actualString:!0},e),Wi(r,e,t,n)}},$c={identify:r=>r==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new le(null),stringify:({source:r},e)=>typeof r=="string"&&$c.test.test(r)?r:e.options.nullStr},_f={identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:r=>new le(r[0]==="t"||r[0]==="T"),stringify({source:r,value:e},t){if(r&&_f.test.test(r)){const n=r[0]==="t"||r[0]==="T";if(e===n)return r}return e?t.options.trueStr:t.options.falseStr}};function er({format:r,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);const o=typeof n=="number"?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let s=JSON.stringify(n);if(!r&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let l=e-(s.length-a-1);for(;l-- >0;)s+="0"}return s}const Gb={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:er},Jb={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r),stringify(r){const e=Number(r.value);return isFinite(e)?e.toExponential():er(r)}},Yb={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(r){const e=new le(parseFloat(r)),t=r.indexOf(".");return t!==-1&&r[r.length-1]==="0"&&(e.minFractionDigits=r.length-t-1),e},stringify:er},_c=r=>typeof r=="bigint"||Number.isInteger(r),Nf=(r,e,t,{intAsBigInt:n})=>n?BigInt(r):parseInt(r.substring(e),t);function Xb(r,e,t){const{value:n}=r;return _c(n)&&n>=0?t+n.toString(e):er(r)}const Qb={identify:r=>_c(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(r,e,t)=>Nf(r,2,8,t),stringify:r=>Xb(r,8,"0o")},Zb={identify:_c,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(r,e,t)=>Nf(r,0,10,t),stringify:er},e1={identify:r=>_c(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(r,e,t)=>Nf(r,2,16,t),stringify:r=>Xb(r,16,"0x")},MM=[gs,ys,Ec,$c,_f,Qb,Zb,e1,Gb,Jb,Yb];function Og(r){return typeof r=="bigint"||Number.isInteger(r)}const Da=({value:r})=>JSON.stringify(r),DM=[{identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify:Da},{identify:r=>r==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Da},{identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:r=>r==="true",stringify:Da},{identify:Og,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(r,e,{intAsBigInt:t})=>t?BigInt(r):parseInt(r,10),stringify:({value:r})=>Og(r)?r.toString():JSON.stringify(r)},{identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:r=>parseFloat(r),stringify:Da}],VM={default:!0,tag:"",test:/^/,resolve(r,e){return e(`Unresolved plain scalar ${JSON.stringify(r)}`),r}},RM=[gs,ys].concat(DM,VM),Af={identify:r=>r instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(r,e){if(typeof Buffer=="function")return Buffer.from(r,"base64");if(typeof atob=="function"){const t=atob(r.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let o=0;o<t.length;++o)n[o]=t.charCodeAt(o);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),r},stringify({comment:r,type:e,value:t},n,o,s){const a=t;let l;if(typeof Buffer=="function")l=a instanceof Buffer?a.toString("base64"):Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let d=0;d<a.length;++d)c+=String.fromCharCode(a[d]);l=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=le.BLOCK_LITERAL),e!==le.QUOTE_DOUBLE){const c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),d=Math.ceil(l.length/c),u=new Array(d);for(let h=0,f=0;h<d;++h,f+=c)u[h]=l.substr(f,c);l=u.join(e===le.BLOCK_LITERAL?`
119
+ ${o}${p}`}else return`${f}${a}${h.join(" ")}${a}${p}`}function Pl({indent:r,options:{commentString:e}},t,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const s=Ar(e(n),r);t.push(s.trimStart())}}function Ln(r,e){const t=$e(e)?e.value:e;for(const n of r)if(Pe(n)&&(n.key===e||n.key===t||$e(n.key)&&n.key.value===t))return n}class Et extends $f{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(dn,e),this.items=[]}static from(e,t,n){const{keepUndefined:o,replacer:s}=n,a=new this(e),l=(c,d)=>{if(typeof s=="function")d=s.call(t,c,d);else if(Array.isArray(s)&&!s.includes(c))return;(d!==void 0||o)&&a.items.push(_f(c,d,n))};if(t instanceof Map)for(const[c,d]of t)l(c,d);else if(t&&typeof t=="object")for(const c of Object.keys(t))l(c,t[c]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,t){var n;let o;Pe(e)?o=e:!e||typeof e!="object"||!("key"in e)?o=new lt(e,e==null?void 0:e.value):o=new lt(e.key,e.value);const s=Ln(this.items,o.key),a=(n=this.schema)==null?void 0:n.sortMapEntries;if(s){if(!t)throw new Error(`Key ${o.key} already set`);$e(s.value)&&qb(o.value)?s.value.value=o.value:s.value=o.value}else if(a){const l=this.items.findIndex(c=>a(o,c)<0);l===-1?this.items.push(o):this.items.splice(l,0,o)}else this.items.push(o)}delete(e){const t=Ln(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=Ln(this.items,e),o=n==null?void 0:n.value;return(!t&&$e(o)?o.value:o)??void 0}has(e){return!!Ln(this.items,e)}set(e,t){this.add(new lt(e,t),!0)}toJSON(e,t,n){const o=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(o);for(const s of this.items)Kb(t,o,s);return o}toString(e,t,n){if(!e)return JSON.stringify(this);for(const o of this.items)if(!Pe(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Wb(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const gs={collection:"map",default:!0,nodeClass:Et,tag:"tag:yaml.org,2002:map",resolve(r,e){return ps(r)||e("Expected a mapping for this tag"),r},createNode:(r,e,t)=>Et.from(r,e,t)};class vn extends $f{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(hs,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Ma(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=Ma(e);if(typeof n!="number")return;const o=this.items[n];return!t&&$e(o)?o.value:o}has(e){const t=Ma(e);return typeof t=="number"&&t<this.items.length}set(e,t){const n=Ma(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];$e(o)&&qb(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t!=null&&t.onCreate&&t.onCreate(n);let o=0;for(const s of this.items)n.push(Vt(s,String(o++),t));return n}toString(e,t,n){return e?Wb(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:o}=n,s=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let l of t){if(typeof o=="function"){const c=t instanceof Set?l:String(a++);l=o.call(t,c,l)}s.items.push(_i(l,void 0,n))}}return s}}function Ma(r){let e=$e(r)?r.value:r;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const ys={collection:"seq",default:!0,nodeClass:vn,tag:"tag:yaml.org,2002:seq",resolve(r,e){return ms(r)||e("Expected a sequence for this tag"),r},createNode:(r,e,t)=>vn.from(r,e,t)},$c={identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify(r,e,t,n){return e=Object.assign({actualString:!0},e),Wi(r,e,t,n)}},_c={identify:r=>r==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new le(null),stringify:({source:r},e)=>typeof r=="string"&&_c.test.test(r)?r:e.options.nullStr},Nf={identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:r=>new le(r[0]==="t"||r[0]==="T"),stringify({source:r,value:e},t){if(r&&Nf.test.test(r)){const n=r[0]==="t"||r[0]==="T";if(e===n)return r}return e?t.options.trueStr:t.options.falseStr}};function er({format:r,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);const o=typeof n=="number"?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let s=JSON.stringify(n);if(!r&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let l=e-(s.length-a-1);for(;l-- >0;)s+="0"}return s}const Gb={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:er},Jb={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r),stringify(r){const e=Number(r.value);return isFinite(e)?e.toExponential():er(r)}},Yb={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(r){const e=new le(parseFloat(r)),t=r.indexOf(".");return t!==-1&&r[r.length-1]==="0"&&(e.minFractionDigits=r.length-t-1),e},stringify:er},Nc=r=>typeof r=="bigint"||Number.isInteger(r),Af=(r,e,t,{intAsBigInt:n})=>n?BigInt(r):parseInt(r.substring(e),t);function Xb(r,e,t){const{value:n}=r;return Nc(n)&&n>=0?t+n.toString(e):er(r)}const Qb={identify:r=>Nc(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(r,e,t)=>Af(r,2,8,t),stringify:r=>Xb(r,8,"0o")},Zb={identify:Nc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(r,e,t)=>Af(r,0,10,t),stringify:er},e1={identify:r=>Nc(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(r,e,t)=>Af(r,2,16,t),stringify:r=>Xb(r,16,"0x")},MM=[gs,ys,$c,_c,Nf,Qb,Zb,e1,Gb,Jb,Yb];function Og(r){return typeof r=="bigint"||Number.isInteger(r)}const Da=({value:r})=>JSON.stringify(r),DM=[{identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify:Da},{identify:r=>r==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Da},{identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:r=>r==="true",stringify:Da},{identify:Og,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(r,e,{intAsBigInt:t})=>t?BigInt(r):parseInt(r,10),stringify:({value:r})=>Og(r)?r.toString():JSON.stringify(r)},{identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:r=>parseFloat(r),stringify:Da}],VM={default:!0,tag:"",test:/^/,resolve(r,e){return e(`Unresolved plain scalar ${JSON.stringify(r)}`),r}},RM=[gs,ys].concat(DM,VM),Of={identify:r=>r instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(r,e){if(typeof Buffer=="function")return Buffer.from(r,"base64");if(typeof atob=="function"){const t=atob(r.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let o=0;o<t.length;++o)n[o]=t.charCodeAt(o);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),r},stringify({comment:r,type:e,value:t},n,o,s){const a=t;let l;if(typeof Buffer=="function")l=a instanceof Buffer?a.toString("base64"):Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let d=0;d<a.length;++d)c+=String.fromCharCode(a[d]);l=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=le.BLOCK_LITERAL),e!==le.QUOTE_DOUBLE){const c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),d=Math.ceil(l.length/c),u=new Array(d);for(let h=0,f=0;h<d;++h,f+=c)u[h]=l.substr(f,c);l=u.join(e===le.BLOCK_LITERAL?`
120
120
  `:" ")}return Wi({comment:r,type:e,value:l},n,o,s)}};function t1(r,e){if(ms(r))for(let t=0;t<r.items.length;++t){let n=r.items[t];if(!Pe(n)){if(ps(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");const o=n.items[0]||new lt(new le(null));if(n.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${n.commentBefore}
121
121
  ${o.key.commentBefore}`:n.commentBefore),n.comment){const s=o.value??o.key;s.comment=s.comment?`${n.comment}
122
- ${s.comment}`:n.comment}n=o}r.items[t]=Pe(n)?n:new lt(n)}}else e("Expected a sequence for this tag");return r}function r1(r,e,t){const{replacer:n}=t,o=new vn(r);o.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(s++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const d=Object.keys(a);if(d.length===1)l=d[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else l=a;o.items.push($f(l,c,t))}return o}const Of={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:t1,createNode:r1};class Fo extends vn{constructor(){super(),this.add=Et.prototype.add.bind(this),this.delete=Et.prototype.delete.bind(this),this.get=Et.prototype.get.bind(this),this.has=Et.prototype.has.bind(this),this.set=Et.prototype.set.bind(this),this.tag=Fo.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const o of this.items){let s,a;if(Pe(o)?(s=Vt(o.key,"",t),a=Vt(o.value,s,t)):s=Vt(o,"",t),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}return n}static from(e,t,n){const o=r1(e,t,n),s=new this;return s.items=o.items,s}}Fo.tag="tag:yaml.org,2002:omap";const Tf={collection:"seq",identify:r=>r instanceof Map,nodeClass:Fo,default:!1,tag:"tag:yaml.org,2002:omap",resolve(r,e){const t=t1(r,e),n=[];for(const{key:o}of t.items)$e(o)&&(n.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):n.push(o.value));return Object.assign(new Fo,t)},createNode:(r,e,t)=>Fo.from(r,e,t)};function n1({value:r,source:e},t){return e&&(r?o1:s1).test.test(e)?e:r?t.options.trueStr:t.options.falseStr}const o1={identify:r=>r===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new le(!0),stringify:n1},s1={identify:r=>r===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new le(!1),stringify:n1},LM={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:er},jM={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r.replace(/_/g,"")),stringify(r){const e=Number(r.value);return isFinite(e)?e.toExponential():er(r)}},FM={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(r){const e=new le(parseFloat(r.replace(/_/g,""))),t=r.indexOf(".");if(t!==-1){const n=r.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:er},Gi=r=>typeof r=="bigint"||Number.isInteger(r);function Nc(r,e,t,{intAsBigInt:n}){const o=r[0];if((o==="-"||o==="+")&&(e+=1),r=r.substring(e).replace(/_/g,""),n){switch(t){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}const a=BigInt(r);return o==="-"?BigInt(-1)*a:a}const s=parseInt(r,t);return o==="-"?-1*s:s}function Bf(r,e,t){const{value:n}=r;if(Gi(n)){const o=n.toString(e);return n<0?"-"+t+o.substr(1):t+o}return er(r)}const qM={identify:Gi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(r,e,t)=>Nc(r,2,2,t),stringify:r=>Bf(r,2,"0b")},zM={identify:Gi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(r,e,t)=>Nc(r,1,8,t),stringify:r=>Bf(r,8,"0")},HM={identify:Gi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(r,e,t)=>Nc(r,0,10,t),stringify:er},UM={identify:Gi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(r,e,t)=>Nc(r,2,16,t),stringify:r=>Bf(r,16,"0x")};class qo extends Et{constructor(e){super(e),this.tag=qo.tag}add(e){let t;Pe(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new lt(e.key,null):t=new lt(e,null),Ln(this.items,t.key)||this.items.push(t)}get(e,t){const n=Ln(this.items,e);return!t&&Pe(n)?$e(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=Ln(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new lt(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:o}=n,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof o=="function"&&(a=o.call(t,a,a)),s.items.push($f(a,null,n));return s}}qo.tag="tag:yaml.org,2002:set";const Pf={collection:"map",identify:r=>r instanceof Set,nodeClass:qo,default:!1,tag:"tag:yaml.org,2002:set",createNode:(r,e,t)=>qo.from(r,e,t),resolve(r,e){if(ps(r)){if(r.hasAllNullValues(!0))return Object.assign(new qo,r);e("Set items must all have null values")}else e("Expected a mapping for this tag");return r}};function If(r,e){const t=r[0],n=t==="-"||t==="+"?r.substring(1):r,o=a=>e?BigInt(a):Number(a),s=n.replace(/_/g,"").split(":").reduce((a,l)=>a*o(60)+o(l),o(0));return t==="-"?o(-1)*s:s}function i1(r){let{value:e}=r,t=a=>a;if(typeof e=="bigint")t=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return er(r);let n="";e<0&&(n="-",e*=t(-1));const o=t(60),s=[e%o];return e<60?s.unshift(0):(e=(e-s[0])/o,s.unshift(e%o),e>=60&&(e=(e-s[0])/o,s.unshift(e))),n+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const a1={identify:r=>typeof r=="bigint"||Number.isInteger(r),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(r,e,{intAsBigInt:t})=>If(r,t),stringify:i1},l1={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:r=>If(r,!1),stringify:i1},Ac={identify:r=>r instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(r){const e=r.match(Ac.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,n,o,s,a,l]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0;let d=Date.UTC(t,n-1,o,s||0,a||0,l||0,c);const u=e[8];if(u&&u!=="Z"){let h=If(u,!1);Math.abs(h)<30&&(h*=60),d-=6e4*h}return new Date(d)},stringify:({value:r})=>r.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Tg=[gs,ys,Ec,$c,o1,s1,qM,zM,HM,UM,LM,jM,FM,Af,Tf,Of,Pf,a1,l1,Ac],Bg=new Map([["core",MM],["failsafe",[gs,ys,Ec]],["json",RM],["yaml11",Tg],["yaml-1.1",Tg]]),Pg={binary:Af,bool:_f,float:Yb,floatExp:Jb,floatNaN:Gb,floatTime:l1,int:Zb,intHex:e1,intOct:Qb,intTime:a1,map:gs,null:$c,omap:Tf,pairs:Of,seq:ys,set:Pf,timestamp:Ac},KM={"tag:yaml.org,2002:binary":Af,"tag:yaml.org,2002:omap":Tf,"tag:yaml.org,2002:pairs":Of,"tag:yaml.org,2002:set":Pf,"tag:yaml.org,2002:timestamp":Ac};function fd(r,e){let t=Bg.get(e);if(!t)if(Array.isArray(r))t=[];else{const n=Array.from(Bg.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${n} or define customTags array`)}if(Array.isArray(r))for(const n of r)t=t.concat(n);else typeof r=="function"&&(t=r(t.slice()));return t.map(n=>{if(typeof n!="string")return n;const o=Pg[n];if(o)return o;const s=Object.keys(Pg).map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${s}`)})}const WM=(r,e)=>r.key<e.key?-1:r.key>e.key?1:0;class Oc{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:o,schema:s,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(e)?fd(e,"compat"):e?fd(null,e):null,this.merge=!!n,this.name=typeof s=="string"&&s||"core",this.knownTags=o?KM:{},this.tags=fd(t,this.name),this.toStringOptions=l??null,Object.defineProperty(this,dn,{value:gs}),Object.defineProperty(this,Fr,{value:Ec}),Object.defineProperty(this,hs,{value:ys}),this.sortMapEntries=typeof a=="function"?a:a===!0?WM:null}clone(){const e=Object.create(Oc.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function GM(r,e){var t;const n=[];let o=e.directives===!0;if(e.directives!==!1&&r.directives){const d=r.directives.toString(r);d?(n.push(d),o=!0):r.directives.docStart&&(o=!0)}o&&n.push("---");const s=Hb(r,e),{commentString:a}=s.options;if(r.commentBefore){n.length!==1&&n.unshift("");const d=a(r.commentBefore);n.unshift(Ar(d,""))}let l=!1,c=null;if(r.contents){if(je(r.contents)){if(r.contents.spaceBefore&&o&&n.push(""),r.contents.commentBefore){const h=a(r.contents.commentBefore);n.push(Ar(h,""))}s.forceBlockIndent=!!r.comment,c=r.contents.comment}const d=c?void 0:()=>l=!0;let u=Qo(r.contents,s,()=>c=null,d);c&&(u+=Rn(u,"",a(c))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(Qo(r.contents,s));if((t=r.directives)!=null&&t.docEnd)if(r.comment){const d=a(r.comment);d.includes(`
122
+ ${s.comment}`:n.comment}n=o}r.items[t]=Pe(n)?n:new lt(n)}}else e("Expected a sequence for this tag");return r}function r1(r,e,t){const{replacer:n}=t,o=new vn(r);o.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(s++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const d=Object.keys(a);if(d.length===1)l=d[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else l=a;o.items.push(_f(l,c,t))}return o}const Tf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:t1,createNode:r1};class Fo extends vn{constructor(){super(),this.add=Et.prototype.add.bind(this),this.delete=Et.prototype.delete.bind(this),this.get=Et.prototype.get.bind(this),this.has=Et.prototype.has.bind(this),this.set=Et.prototype.set.bind(this),this.tag=Fo.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const o of this.items){let s,a;if(Pe(o)?(s=Vt(o.key,"",t),a=Vt(o.value,s,t)):s=Vt(o,"",t),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}return n}static from(e,t,n){const o=r1(e,t,n),s=new this;return s.items=o.items,s}}Fo.tag="tag:yaml.org,2002:omap";const Bf={collection:"seq",identify:r=>r instanceof Map,nodeClass:Fo,default:!1,tag:"tag:yaml.org,2002:omap",resolve(r,e){const t=t1(r,e),n=[];for(const{key:o}of t.items)$e(o)&&(n.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):n.push(o.value));return Object.assign(new Fo,t)},createNode:(r,e,t)=>Fo.from(r,e,t)};function n1({value:r,source:e},t){return e&&(r?o1:s1).test.test(e)?e:r?t.options.trueStr:t.options.falseStr}const o1={identify:r=>r===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new le(!0),stringify:n1},s1={identify:r=>r===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new le(!1),stringify:n1},LM={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:er},jM={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r.replace(/_/g,"")),stringify(r){const e=Number(r.value);return isFinite(e)?e.toExponential():er(r)}},FM={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(r){const e=new le(parseFloat(r.replace(/_/g,""))),t=r.indexOf(".");if(t!==-1){const n=r.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:er},Gi=r=>typeof r=="bigint"||Number.isInteger(r);function Ac(r,e,t,{intAsBigInt:n}){const o=r[0];if((o==="-"||o==="+")&&(e+=1),r=r.substring(e).replace(/_/g,""),n){switch(t){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}const a=BigInt(r);return o==="-"?BigInt(-1)*a:a}const s=parseInt(r,t);return o==="-"?-1*s:s}function Pf(r,e,t){const{value:n}=r;if(Gi(n)){const o=n.toString(e);return n<0?"-"+t+o.substr(1):t+o}return er(r)}const qM={identify:Gi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(r,e,t)=>Ac(r,2,2,t),stringify:r=>Pf(r,2,"0b")},zM={identify:Gi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(r,e,t)=>Ac(r,1,8,t),stringify:r=>Pf(r,8,"0")},HM={identify:Gi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(r,e,t)=>Ac(r,0,10,t),stringify:er},UM={identify:Gi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(r,e,t)=>Ac(r,2,16,t),stringify:r=>Pf(r,16,"0x")};class qo extends Et{constructor(e){super(e),this.tag=qo.tag}add(e){let t;Pe(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new lt(e.key,null):t=new lt(e,null),Ln(this.items,t.key)||this.items.push(t)}get(e,t){const n=Ln(this.items,e);return!t&&Pe(n)?$e(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=Ln(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new lt(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:o}=n,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof o=="function"&&(a=o.call(t,a,a)),s.items.push(_f(a,null,n));return s}}qo.tag="tag:yaml.org,2002:set";const If={collection:"map",identify:r=>r instanceof Set,nodeClass:qo,default:!1,tag:"tag:yaml.org,2002:set",createNode:(r,e,t)=>qo.from(r,e,t),resolve(r,e){if(ps(r)){if(r.hasAllNullValues(!0))return Object.assign(new qo,r);e("Set items must all have null values")}else e("Expected a mapping for this tag");return r}};function Mf(r,e){const t=r[0],n=t==="-"||t==="+"?r.substring(1):r,o=a=>e?BigInt(a):Number(a),s=n.replace(/_/g,"").split(":").reduce((a,l)=>a*o(60)+o(l),o(0));return t==="-"?o(-1)*s:s}function i1(r){let{value:e}=r,t=a=>a;if(typeof e=="bigint")t=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return er(r);let n="";e<0&&(n="-",e*=t(-1));const o=t(60),s=[e%o];return e<60?s.unshift(0):(e=(e-s[0])/o,s.unshift(e%o),e>=60&&(e=(e-s[0])/o,s.unshift(e))),n+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const a1={identify:r=>typeof r=="bigint"||Number.isInteger(r),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(r,e,{intAsBigInt:t})=>Mf(r,t),stringify:i1},l1={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:r=>Mf(r,!1),stringify:i1},Oc={identify:r=>r instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(r){const e=r.match(Oc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,n,o,s,a,l]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0;let d=Date.UTC(t,n-1,o,s||0,a||0,l||0,c);const u=e[8];if(u&&u!=="Z"){let h=Mf(u,!1);Math.abs(h)<30&&(h*=60),d-=6e4*h}return new Date(d)},stringify:({value:r})=>r.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Tg=[gs,ys,$c,_c,o1,s1,qM,zM,HM,UM,LM,jM,FM,Of,Bf,Tf,If,a1,l1,Oc],Bg=new Map([["core",MM],["failsafe",[gs,ys,$c]],["json",RM],["yaml11",Tg],["yaml-1.1",Tg]]),Pg={binary:Of,bool:Nf,float:Yb,floatExp:Jb,floatNaN:Gb,floatTime:l1,int:Zb,intHex:e1,intOct:Qb,intTime:a1,map:gs,null:_c,omap:Bf,pairs:Tf,seq:ys,set:If,timestamp:Oc},KM={"tag:yaml.org,2002:binary":Of,"tag:yaml.org,2002:omap":Bf,"tag:yaml.org,2002:pairs":Tf,"tag:yaml.org,2002:set":If,"tag:yaml.org,2002:timestamp":Oc};function pd(r,e){let t=Bg.get(e);if(!t)if(Array.isArray(r))t=[];else{const n=Array.from(Bg.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${n} or define customTags array`)}if(Array.isArray(r))for(const n of r)t=t.concat(n);else typeof r=="function"&&(t=r(t.slice()));return t.map(n=>{if(typeof n!="string")return n;const o=Pg[n];if(o)return o;const s=Object.keys(Pg).map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${s}`)})}const WM=(r,e)=>r.key<e.key?-1:r.key>e.key?1:0;class Tc{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:o,schema:s,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(e)?pd(e,"compat"):e?pd(null,e):null,this.merge=!!n,this.name=typeof s=="string"&&s||"core",this.knownTags=o?KM:{},this.tags=pd(t,this.name),this.toStringOptions=l??null,Object.defineProperty(this,dn,{value:gs}),Object.defineProperty(this,Fr,{value:$c}),Object.defineProperty(this,hs,{value:ys}),this.sortMapEntries=typeof a=="function"?a:a===!0?WM:null}clone(){const e=Object.create(Tc.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function GM(r,e){var t;const n=[];let o=e.directives===!0;if(e.directives!==!1&&r.directives){const d=r.directives.toString(r);d?(n.push(d),o=!0):r.directives.docStart&&(o=!0)}o&&n.push("---");const s=Hb(r,e),{commentString:a}=s.options;if(r.commentBefore){n.length!==1&&n.unshift("");const d=a(r.commentBefore);n.unshift(Ar(d,""))}let l=!1,c=null;if(r.contents){if(je(r.contents)){if(r.contents.spaceBefore&&o&&n.push(""),r.contents.commentBefore){const h=a(r.contents.commentBefore);n.push(Ar(h,""))}s.forceBlockIndent=!!r.comment,c=r.contents.comment}const d=c?void 0:()=>l=!0;let u=Qo(r.contents,s,()=>c=null,d);c&&(u+=Rn(u,"",a(c))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(Qo(r.contents,s));if((t=r.directives)!=null&&t.docEnd)if(r.comment){const d=a(r.comment);d.includes(`
123
123
  `)?(n.push("..."),n.push(Ar(d,""))):n.push(`... ${d}`)}else n.push("...");else{let d=r.comment;d&&l&&(d=d.replace(/^\n+/,"")),d&&((!l||c)&&n[n.length-1]!==""&&n.push(""),n.push(Ar(a(d),"")))}return n.join(`
124
124
  `)+`
125
- `}class vs{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,jt,{value:Mu});let o=null;typeof t=="function"||Array.isArray(t)?o=t:n===void 0&&t&&(n=t,t=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:a}=s;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new ht({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,o,n)}clone(){const e=Object.create(vs.prototype,{[jt]:{value:Mu}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=je(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){wo(this.contents)&&this.contents.add(e)}addIn(e,t){wo(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=jb(this);e.anchor=!t||n.has(t)?Fb(t||"a",n):t}return new kc(e.anchor)}createNode(e,t,n){let o;if(typeof t=="function")e=t.call({"":e},"",e),o=t;else if(Array.isArray(t)){const m=b=>typeof b=="number"||b instanceof String||b instanceof Number,v=t.filter(m).map(String);v.length>0&&(t=t.concat(v)),o=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:s,anchorPrefix:a,flow:l,keepUndefined:c,onTagObj:d,tag:u}=n??{},{onAnchor:h,setAnchors:f,sourceObjects:p}=SM(this,a||"a"),y={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:h,onTagObj:d,replacer:o,schema:this.schema,sourceObjects:p},g=_i(e,u,y);return l&&Ie(g)&&(g.flow=!0),f(),g}createPair(e,t,n={}){const o=this.createNode(e,null,n),s=this.createNode(t,null,n);return new lt(o,s)}delete(e){return wo(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ys(e)?this.contents==null?!1:(this.contents=null,!0):wo(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ie(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ys(e)?!t&&$e(this.contents)?this.contents.value:this.contents:Ie(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ie(this.contents)?this.contents.has(e):!1}hasIn(e){return Ys(e)?this.contents!==void 0:Ie(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Bl(this.schema,[e],t):wo(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ys(e)?this.contents=t:this.contents==null?this.contents=Bl(this.schema,Array.from(e),t):wo(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ht({version:"1.1"}),n={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ht({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Oc(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:o,onAnchor:s,reviver:a}={}){const l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},c=Vt(this.contents,t??"",l);if(typeof s=="function")for(const{count:d,res:u}of l.anchors.values())s(u,d);return typeof a=="function"?To(a,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return GM(this,e)}}function wo(r){if(Ie(r))return!0;throw new Error("Expected a YAML collection as document contents")}class Mf extends Error{constructor(e,t,n,o){super(),this.name=e,this.code=n,this.message=o,this.pos=t}}class jn extends Mf{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class c1 extends Mf{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const Il=(r,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));const{line:n,col:o}=t.linePos[0];t.message+=` at line ${n}, column ${o}`;let s=o-1,a=r.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const l=Math.min(s-39,a.length-79);a="…"+a.substring(l),s-=l-1}if(a.length>80&&(a=a.substring(0,79)+"…"),n>1&&/^ *$/.test(a.substring(0,s))){let l=r.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`…
125
+ `}class vs{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,jt,{value:Du});let o=null;typeof t=="function"||Array.isArray(t)?o=t:n===void 0&&t&&(n=t,t=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:a}=s;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new ht({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,o,n)}clone(){const e=Object.create(vs.prototype,{[jt]:{value:Du}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=je(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){wo(this.contents)&&this.contents.add(e)}addIn(e,t){wo(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=jb(this);e.anchor=!t||n.has(t)?Fb(t||"a",n):t}return new Sc(e.anchor)}createNode(e,t,n){let o;if(typeof t=="function")e=t.call({"":e},"",e),o=t;else if(Array.isArray(t)){const m=b=>typeof b=="number"||b instanceof String||b instanceof Number,v=t.filter(m).map(String);v.length>0&&(t=t.concat(v)),o=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:s,anchorPrefix:a,flow:l,keepUndefined:c,onTagObj:d,tag:u}=n??{},{onAnchor:h,setAnchors:f,sourceObjects:p}=SM(this,a||"a"),y={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:h,onTagObj:d,replacer:o,schema:this.schema,sourceObjects:p},g=_i(e,u,y);return l&&Ie(g)&&(g.flow=!0),f(),g}createPair(e,t,n={}){const o=this.createNode(e,null,n),s=this.createNode(t,null,n);return new lt(o,s)}delete(e){return wo(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ys(e)?this.contents==null?!1:(this.contents=null,!0):wo(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ie(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ys(e)?!t&&$e(this.contents)?this.contents.value:this.contents:Ie(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ie(this.contents)?this.contents.has(e):!1}hasIn(e){return Ys(e)?this.contents!==void 0:Ie(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Bl(this.schema,[e],t):wo(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ys(e)?this.contents=t:this.contents==null?this.contents=Bl(this.schema,Array.from(e),t):wo(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ht({version:"1.1"}),n={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ht({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Tc(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:o,onAnchor:s,reviver:a}={}){const l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},c=Vt(this.contents,t??"",l);if(typeof s=="function")for(const{count:d,res:u}of l.anchors.values())s(u,d);return typeof a=="function"?To(a,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return GM(this,e)}}function wo(r){if(Ie(r))return!0;throw new Error("Expected a YAML collection as document contents")}class Df extends Error{constructor(e,t,n,o){super(),this.name=e,this.code=n,this.message=o,this.pos=t}}class jn extends Df{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class c1 extends Df{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const Il=(r,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));const{line:n,col:o}=t.linePos[0];t.message+=` at line ${n}, column ${o}`;let s=o-1,a=r.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const l=Math.min(s-39,a.length-79);a="…"+a.substring(l),s-=l-1}if(a.length>80&&(a=a.substring(0,79)+"…"),n>1&&/^ *$/.test(a.substring(0,s))){let l=r.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`…
126
126
  `),a=l+a}if(/[^ ]/.test(a)){let l=1;const c=t.linePos[1];c&&c.line===n&&c.col>o&&(l=Math.max(1,Math.min(c.col-o,80-s)));const d=" ".repeat(s)+"^".repeat(l);t.message+=`:
127
127
 
128
128
  ${a}
129
129
  ${d}
130
130
  `}};function Zo(r,{flow:e,indicator:t,next:n,offset:o,onError:s,startOnNewline:a}){let l=!1,c=a,d=a,u="",h="",f=!1,p=!1,y=!1,g=null,m=null,v=null,b=null,w=null;for(const k of r)switch(y&&(k.type!=="space"&&k.type!=="newline"&&k.type!=="comma"&&s(k.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),k.type){case"space":!e&&c&&t!=="doc-start"&&k.source[0]===" "&&s(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=!0;break;case"comment":{d||s(k,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const C=k.source.substring(1)||" ";u?u+=h+C:u=C,h="",c=!1;break}case"newline":c?u?u+=k.source:l=!0:h+=k.source,c=!0,f=!0,(g||m)&&(p=!0),d=!0;break;case"anchor":g&&s(k,"MULTIPLE_ANCHORS","A node can have at most one anchor"),k.source.endsWith(":")&&s(k.offset+k.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=k,w===null&&(w=k.offset),c=!1,d=!1,y=!0;break;case"tag":{m&&s(k,"MULTIPLE_TAGS","A node can have at most one tag"),m=k,w===null&&(w=k.offset),c=!1,d=!1,y=!0;break}case t:(g||m)&&s(k,"BAD_PROP_ORDER",`Anchors and tags must be after the ${k.source} indicator`),b&&s(k,"UNEXPECTED_TOKEN",`Unexpected ${k.source} in ${e??"collection"}`),b=k,c=!1,d=!1;break;case"comma":if(e){v&&s(k,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),v=k,c=!1,d=!1;break}default:s(k,"UNEXPECTED_TOKEN",`Unexpected ${k.type} token`),c=!1,d=!1}const S=r[r.length-1],x=S?S.offset+S.source.length:o;return y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:v,found:b,spaceBefore:l,comment:u,hasNewline:f,hasNewlineAfterProp:p,anchor:g,tag:m,end:x,start:w??x}}function Ni(r){if(!r)return null;switch(r.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(r.source.includes(`
131
- `))return!0;if(r.end){for(const e of r.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of r.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ni(e.key)||Ni(e.value))return!0}return!1;default:return!0}}function Lu(r,e,t){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===r&&(n.source==="]"||n.source==="}")&&Ni(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function d1(r,e,t){const{uniqueKeys:n}=r.options;if(n===!1)return!1;const o=typeof n=="function"?n:(s,a)=>s===a||$e(s)&&$e(a)&&s.value===a.value&&!(s.value==="<<"&&r.schema.merge);return e.some(s=>o(s.key,t))}const Ig="All mapping items must start at the same column";function JM({composeNode:r,composeEmptyNode:e},t,n,o,s){var a;const l=(s==null?void 0:s.nodeClass)??Et,c=new l(t.schema);t.atRoot&&(t.atRoot=!1);let d=n.offset,u=null;for(const h of n.items){const{start:f,key:p,sep:y,value:g}=h,m=Zo(f,{indicator:"explicit-key-ind",next:p??(y==null?void 0:y[0]),offset:d,onError:o,startOnNewline:!0}),v=!m.found;if(v){if(p&&(p.type==="block-seq"?o(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==n.indent&&o(d,"BAD_INDENT",Ig)),!m.anchor&&!m.tag&&!y){u=m.end,m.comment&&(c.comment?c.comment+=`
132
- `+m.comment:c.comment=m.comment);continue}(m.hasNewlineAfterProp||Ni(p))&&o(p??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((a=m.found)==null?void 0:a.indent)!==n.indent&&o(d,"BAD_INDENT",Ig);const b=m.end,w=p?r(t,p,m,o):e(t,b,f,null,m,o);t.schema.compat&&Lu(n.indent,p,o),d1(t,c.items,w)&&o(b,"DUPLICATE_KEY","Map keys must be unique");const S=Zo(y??[],{indicator:"map-value-ind",next:g,offset:w.range[2],onError:o,startOnNewline:!p||p.type==="block-scalar"});if(d=S.end,S.found){v&&((g==null?void 0:g.type)==="block-map"&&!S.hasNewline&&o(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&m.start<S.found.offset-1024&&o(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const x=g?r(t,g,S,o):e(t,d,y,null,S,o);t.schema.compat&&Lu(n.indent,g,o),d=x.range[2];const k=new lt(w,x);t.options.keepSourceTokens&&(k.srcToken=h),c.items.push(k)}else{v&&o(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(w.comment?w.comment+=`
133
- `+S.comment:w.comment=S.comment);const x=new lt(w);t.options.keepSourceTokens&&(x.srcToken=h),c.items.push(x)}}return u&&u<d&&o(u,"IMPOSSIBLE","Map comment with trailing content"),c.range=[n.offset,d,u??d],c}function YM({composeNode:r,composeEmptyNode:e},t,n,o,s){const a=(s==null?void 0:s.nodeClass)??vn,l=new a(t.schema);t.atRoot&&(t.atRoot=!1);let c=n.offset,d=null;for(const{start:u,value:h}of n.items){const f=Zo(u,{indicator:"seq-item-ind",next:h,offset:c,onError:o,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||h)h&&h.type==="block-seq"?o(f.end,"BAD_INDENT","All sequence items must start at the same column"):o(c,"MISSING_CHAR","Sequence item without - indicator");else{d=f.end,f.comment&&(l.comment=f.comment);continue}const p=h?r(t,h,f,o):e(t,f.end,u,null,f,o);t.schema.compat&&Lu(n.indent,h,o),c=p.range[2],l.items.push(p)}return l.range=[n.offset,c,d??c],l}function Ji(r,e,t,n){let o="";if(r){let s=!1,a="";for(const l of r){const{source:c,type:d}=l;switch(d){case"space":s=!0;break;case"comment":{t&&!s&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=c.substring(1)||" ";o?o+=a+u:o=u,a="";break}case"newline":o&&(a+=c),s=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}e+=c.length}}return{comment:o,offset:e}}const pd="Block collections are not allowed within flow collections",md=r=>r&&(r.type==="block-map"||r.type==="block-seq");function XM({composeNode:r,composeEmptyNode:e},t,n,o,s){const a=n.start.source==="{",l=a?"flow map":"flow sequence",c=(s==null?void 0:s.nodeClass)??(a?Et:vn),d=new c(t.schema);d.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1);let h=n.offset+n.start.source.length;for(let m=0;m<n.items.length;++m){const v=n.items[m],{start:b,key:w,sep:S,value:x}=v,k=Zo(b,{flow:l,indicator:"explicit-key-ind",next:w??(S==null?void 0:S[0]),offset:h,onError:o,startOnNewline:!1});if(!k.found){if(!k.anchor&&!k.tag&&!S&&!x){m===0&&k.comma?o(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):m<n.items.length-1&&o(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),k.comment&&(d.comment?d.comment+=`
131
+ `))return!0;if(r.end){for(const e of r.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of r.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ni(e.key)||Ni(e.value))return!0}return!1;default:return!0}}function ju(r,e,t){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===r&&(n.source==="]"||n.source==="}")&&Ni(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function d1(r,e,t){const{uniqueKeys:n}=r.options;if(n===!1)return!1;const o=typeof n=="function"?n:(s,a)=>s===a||$e(s)&&$e(a)&&s.value===a.value&&!(s.value==="<<"&&r.schema.merge);return e.some(s=>o(s.key,t))}const Ig="All mapping items must start at the same column";function JM({composeNode:r,composeEmptyNode:e},t,n,o,s){var a;const l=(s==null?void 0:s.nodeClass)??Et,c=new l(t.schema);t.atRoot&&(t.atRoot=!1);let d=n.offset,u=null;for(const h of n.items){const{start:f,key:p,sep:y,value:g}=h,m=Zo(f,{indicator:"explicit-key-ind",next:p??(y==null?void 0:y[0]),offset:d,onError:o,startOnNewline:!0}),v=!m.found;if(v){if(p&&(p.type==="block-seq"?o(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==n.indent&&o(d,"BAD_INDENT",Ig)),!m.anchor&&!m.tag&&!y){u=m.end,m.comment&&(c.comment?c.comment+=`
132
+ `+m.comment:c.comment=m.comment);continue}(m.hasNewlineAfterProp||Ni(p))&&o(p??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((a=m.found)==null?void 0:a.indent)!==n.indent&&o(d,"BAD_INDENT",Ig);const b=m.end,w=p?r(t,p,m,o):e(t,b,f,null,m,o);t.schema.compat&&ju(n.indent,p,o),d1(t,c.items,w)&&o(b,"DUPLICATE_KEY","Map keys must be unique");const S=Zo(y??[],{indicator:"map-value-ind",next:g,offset:w.range[2],onError:o,startOnNewline:!p||p.type==="block-scalar"});if(d=S.end,S.found){v&&((g==null?void 0:g.type)==="block-map"&&!S.hasNewline&&o(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&m.start<S.found.offset-1024&&o(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const x=g?r(t,g,S,o):e(t,d,y,null,S,o);t.schema.compat&&ju(n.indent,g,o),d=x.range[2];const k=new lt(w,x);t.options.keepSourceTokens&&(k.srcToken=h),c.items.push(k)}else{v&&o(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(w.comment?w.comment+=`
133
+ `+S.comment:w.comment=S.comment);const x=new lt(w);t.options.keepSourceTokens&&(x.srcToken=h),c.items.push(x)}}return u&&u<d&&o(u,"IMPOSSIBLE","Map comment with trailing content"),c.range=[n.offset,d,u??d],c}function YM({composeNode:r,composeEmptyNode:e},t,n,o,s){const a=(s==null?void 0:s.nodeClass)??vn,l=new a(t.schema);t.atRoot&&(t.atRoot=!1);let c=n.offset,d=null;for(const{start:u,value:h}of n.items){const f=Zo(u,{indicator:"seq-item-ind",next:h,offset:c,onError:o,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||h)h&&h.type==="block-seq"?o(f.end,"BAD_INDENT","All sequence items must start at the same column"):o(c,"MISSING_CHAR","Sequence item without - indicator");else{d=f.end,f.comment&&(l.comment=f.comment);continue}const p=h?r(t,h,f,o):e(t,f.end,u,null,f,o);t.schema.compat&&ju(n.indent,h,o),c=p.range[2],l.items.push(p)}return l.range=[n.offset,c,d??c],l}function Ji(r,e,t,n){let o="";if(r){let s=!1,a="";for(const l of r){const{source:c,type:d}=l;switch(d){case"space":s=!0;break;case"comment":{t&&!s&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=c.substring(1)||" ";o?o+=a+u:o=u,a="";break}case"newline":o&&(a+=c),s=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}e+=c.length}}return{comment:o,offset:e}}const md="Block collections are not allowed within flow collections",gd=r=>r&&(r.type==="block-map"||r.type==="block-seq");function XM({composeNode:r,composeEmptyNode:e},t,n,o,s){const a=n.start.source==="{",l=a?"flow map":"flow sequence",c=(s==null?void 0:s.nodeClass)??(a?Et:vn),d=new c(t.schema);d.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1);let h=n.offset+n.start.source.length;for(let m=0;m<n.items.length;++m){const v=n.items[m],{start:b,key:w,sep:S,value:x}=v,k=Zo(b,{flow:l,indicator:"explicit-key-ind",next:w??(S==null?void 0:S[0]),offset:h,onError:o,startOnNewline:!1});if(!k.found){if(!k.anchor&&!k.tag&&!S&&!x){m===0&&k.comma?o(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):m<n.items.length-1&&o(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),k.comment&&(d.comment?d.comment+=`
134
134
  `+k.comment:d.comment=k.comment),h=k.end;continue}!a&&t.options.strict&&Ni(w)&&o(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)k.comma&&o(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(k.comma||o(k.start,"MISSING_CHAR",`Missing , between ${l} items`),k.comment){let C="";e:for(const N of b)switch(N.type){case"comma":case"space":break;case"comment":C=N.source.substring(1);break e;default:break e}if(C){let N=d.items[d.items.length-1];Pe(N)&&(N=N.value??N.key),N.comment?N.comment+=`
135
- `+C:N.comment=C,k.comment=k.comment.substring(C.length+1)}}if(!a&&!S&&!k.found){const C=x?r(t,x,k,o):e(t,k.end,S,null,k,o);d.items.push(C),h=C.range[2],md(x)&&o(C.range,"BLOCK_IN_FLOW",pd)}else{const C=k.end,N=w?r(t,w,k,o):e(t,C,b,null,k,o);md(w)&&o(N.range,"BLOCK_IN_FLOW",pd);const P=Zo(S??[],{flow:l,indicator:"map-value-ind",next:x,offset:N.range[2],onError:o,startOnNewline:!1});if(P.found){if(!a&&!k.found&&t.options.strict){if(S)for(const I of S){if(I===P.found)break;if(I.type==="newline"){o(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}k.start<P.found.offset-1024&&o(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else x&&("source"in x&&x.source&&x.source[0]===":"?o(x,"MISSING_CHAR",`Missing space after : in ${l}`):o(P.start,"MISSING_CHAR",`Missing , or : between ${l} items`));const M=x?r(t,x,P,o):P.found?e(t,P.end,S,null,P,o):null;M?md(x)&&o(M.range,"BLOCK_IN_FLOW",pd):P.comment&&(N.comment?N.comment+=`
135
+ `+C:N.comment=C,k.comment=k.comment.substring(C.length+1)}}if(!a&&!S&&!k.found){const C=x?r(t,x,k,o):e(t,k.end,S,null,k,o);d.items.push(C),h=C.range[2],gd(x)&&o(C.range,"BLOCK_IN_FLOW",md)}else{const C=k.end,N=w?r(t,w,k,o):e(t,C,b,null,k,o);gd(w)&&o(N.range,"BLOCK_IN_FLOW",md);const P=Zo(S??[],{flow:l,indicator:"map-value-ind",next:x,offset:N.range[2],onError:o,startOnNewline:!1});if(P.found){if(!a&&!k.found&&t.options.strict){if(S)for(const I of S){if(I===P.found)break;if(I.type==="newline"){o(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}k.start<P.found.offset-1024&&o(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else x&&("source"in x&&x.source&&x.source[0]===":"?o(x,"MISSING_CHAR",`Missing space after : in ${l}`):o(P.start,"MISSING_CHAR",`Missing , or : between ${l} items`));const M=x?r(t,x,P,o):P.found?e(t,P.end,S,null,P,o):null;M?gd(x)&&o(M.range,"BLOCK_IN_FLOW",md):P.comment&&(N.comment?N.comment+=`
136
136
  `+P.comment:N.comment=P.comment);const j=new lt(N,M);if(t.options.keepSourceTokens&&(j.srcToken=v),a){const I=d;d1(t,I.items,N)&&o(C,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(j)}else{const I=new Et(t.schema);I.flow=!0,I.items.push(j),d.items.push(I)}h=M?M.range[2]:P.end}}const f=a?"}":"]",[p,...y]=n.end;let g=h;if(p&&p.source===f)g=p.offset+p.source.length;else{const m=l[0].toUpperCase()+l.substring(1),v=u?`${m} must end with a ${f}`:`${m} in block collection must be sufficiently indented and end with a ${f}`;o(h,u?"MISSING_CHAR":"BAD_INDENT",v),p&&p.source.length!==1&&y.unshift(p)}if(y.length>0){const m=Ji(y,g,t.options.strict,o);m.comment&&(d.comment?d.comment+=`
137
- `+m.comment:d.comment=m.comment),d.range=[n.offset,g,m.offset]}else d.range=[n.offset,g,g];return d}function gd(r,e,t,n,o,s){const a=t.type==="block-map"?JM(r,e,t,n,s):t.type==="block-seq"?YM(r,e,t,n,s):XM(r,e,t,n,s),l=a.constructor;return o==="!"||o===l.tagName?(a.tag=l.tagName,a):(o&&(a.tag=o),a)}function QM(r,e,t,n,o){var s;const a=n?e.directives.tagName(n.source,f=>o(n,"TAG_RESOLVE_FAILED",f)):null,l=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!n||!a||a==="!"||a===Et.tagName&&l==="map"||a===vn.tagName&&l==="seq"||!l)return gd(r,e,t,o,a);let c=e.schema.tags.find(f=>f.tag===a&&f.collection===l);if(!c){const f=e.schema.knownTags[a];if(f&&f.collection===l)e.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return f!=null&&f.collection?o(n,"BAD_COLLECTION_TYPE",`${f.tag} used for ${l} collection, but expects ${f.collection}`,!0):o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),gd(r,e,t,o,a)}const d=gd(r,e,t,o,a,c),u=((s=c.resolve)==null?void 0:s.call(c,d,f=>o(n,"TAG_RESOLVE_FAILED",f),e.options))??d,h=je(u)?u:new le(u);return h.range=d.range,h.tag=a,c!=null&&c.format&&(h.format=c.format),h}function u1(r,e,t){const n=r.offset,o=ZM(r,e,t);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};const s=o.mode===">"?le.BLOCK_FOLDED:le.BLOCK_LITERAL,a=r.source?eD(r.source):[];let l=a.length;for(let g=a.length-1;g>=0;--g){const m=a[g][1];if(m===""||m==="\r")l=g;else break}if(l===0){const g=o.chomp==="+"&&a.length>0?`
137
+ `+m.comment:d.comment=m.comment),d.range=[n.offset,g,m.offset]}else d.range=[n.offset,g,g];return d}function yd(r,e,t,n,o,s){const a=t.type==="block-map"?JM(r,e,t,n,s):t.type==="block-seq"?YM(r,e,t,n,s):XM(r,e,t,n,s),l=a.constructor;return o==="!"||o===l.tagName?(a.tag=l.tagName,a):(o&&(a.tag=o),a)}function QM(r,e,t,n,o){var s;const a=n?e.directives.tagName(n.source,f=>o(n,"TAG_RESOLVE_FAILED",f)):null,l=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!n||!a||a==="!"||a===Et.tagName&&l==="map"||a===vn.tagName&&l==="seq"||!l)return yd(r,e,t,o,a);let c=e.schema.tags.find(f=>f.tag===a&&f.collection===l);if(!c){const f=e.schema.knownTags[a];if(f&&f.collection===l)e.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return f!=null&&f.collection?o(n,"BAD_COLLECTION_TYPE",`${f.tag} used for ${l} collection, but expects ${f.collection}`,!0):o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),yd(r,e,t,o,a)}const d=yd(r,e,t,o,a,c),u=((s=c.resolve)==null?void 0:s.call(c,d,f=>o(n,"TAG_RESOLVE_FAILED",f),e.options))??d,h=je(u)?u:new le(u);return h.range=d.range,h.tag=a,c!=null&&c.format&&(h.format=c.format),h}function u1(r,e,t){const n=r.offset,o=ZM(r,e,t);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};const s=o.mode===">"?le.BLOCK_FOLDED:le.BLOCK_LITERAL,a=r.source?eD(r.source):[];let l=a.length;for(let g=a.length-1;g>=0;--g){const m=a[g][1];if(m===""||m==="\r")l=g;else break}if(l===0){const g=o.chomp==="+"&&a.length>0?`
138
138
  `.repeat(Math.max(1,a.length-1)):"";let m=n+o.length;return r.source&&(m+=r.source.length),{value:g,type:s,comment:o.comment,range:[n,m,m]}}let c=r.indent+o.indent,d=r.offset+o.length,u=0;for(let g=0;g<l;++g){const[m,v]=a[g];if(v===""||v==="\r")o.indent===0&&m.length>c&&(c=m.length);else{m.length<c&&t(d+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(c=m.length),u=g;break}d+=m.length+v.length+1}for(let g=a.length-1;g>=l;--g)a[g][0].length>c&&(l=g+1);let h="",f="",p=!1;for(let g=0;g<u;++g)h+=a[g][0].slice(c)+`
139
139
  `;for(let g=u;g<l;++g){let[m,v]=a[g];d+=m.length+v.length+1;const b=v[v.length-1]==="\r";if(b&&(v=v.slice(0,-1)),v&&m.length<c){const w=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;t(d-v.length-(b?2:1),"BAD_INDENT",w),m=""}s===le.BLOCK_LITERAL?(h+=f+m.slice(c)+v,f=`
140
140
  `):m.length>c||v[0]===" "?(f===" "?f=`
@@ -164,10 +164,10 @@ ${d}
164
164
  `);)n===`
165
165
  `&&(t+=`
166
166
  `),e+=1,n=r[e+1];return t||(t=" "),{fold:t,offset:e}}const sD={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
167
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function iD(r,e,t,n){const o=r.substr(e,t),s=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(s)){const a=r.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(s)}function p1(r,e,t,n){const{value:o,type:s,comment:a,range:l}=e.type==="block-scalar"?u1(e,r.options.strict,n):h1(e,r.options.strict,n),c=t?r.directives.tagName(t.source,h=>n(t,"TAG_RESOLVE_FAILED",h)):null,d=t&&c?aD(r.schema,o,c,t,n):e.type==="scalar"?lD(r,o,e,n):r.schema[Fr];let u;try{const h=d.resolve(o,f=>n(t??e,"TAG_RESOLVE_FAILED",f),r.options);u=$e(h)?h:new le(h)}catch(h){const f=h instanceof Error?h.message:String(h);n(t??e,"TAG_RESOLVE_FAILED",f),u=new le(o)}return u.range=l,u.source=o,s&&(u.type=s),c&&(u.tag=c),d.format&&(u.format=d.format),a&&(u.comment=a),u}function aD(r,e,t,n,o){var s;if(t==="!")return r[Fr];const a=[];for(const c of r.tags)if(!c.collection&&c.tag===t)if(c.default&&c.test)a.push(c);else return c;for(const c of a)if((s=c.test)!=null&&s.test(e))return c;const l=r.knownTags[t];return l&&!l.collection?(r.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),r[Fr])}function lD({directives:r,schema:e},t,n,o){const s=e.tags.find(a=>{var l;return a.default&&((l=a.test)==null?void 0:l.test(t))})||e[Fr];if(e.compat){const a=e.compat.find(l=>{var c;return l.default&&((c=l.test)==null?void 0:c.test(t))})??e[Fr];if(s.tag!==a.tag){const l=r.tagString(s.tag),c=r.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;o(n,"TAG_RESOLVE_FAILED",d,!0)}}return s}function cD(r,e,t){if(e){t===null&&(t=e.length);for(let n=t-1;n>=0;--n){let o=e[n];switch(o.type){case"space":case"comment":case"newline":r-=o.source.length;continue}for(o=e[++n];(o==null?void 0:o.type)==="space";)r+=o.source.length,o=e[++n];break}}return r}const dD={composeNode:m1,composeEmptyNode:Df};function m1(r,e,t,n){const{spaceBefore:o,comment:s,anchor:a,tag:l}=t;let c,d=!0;switch(e.type){case"alias":c=uD(r,e,n),(a||l)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=p1(r,e,l,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=QM(dD,r,e,l,n),a&&(c.anchor=a.source.substring(1));break;default:{const u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),c=Df(r,e.offset,void 0,null,t,n),d=!1}}return a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),o&&(c.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?c.comment=s:c.commentBefore=s),r.options.keepSourceTokens&&d&&(c.srcToken=e),c}function Df(r,e,t,n,{spaceBefore:o,comment:s,anchor:a,tag:l,end:c},d){const u={type:"scalar",offset:cD(e,t,n),indent:-1,source:""},h=p1(r,u,l,d);return a&&(h.anchor=a.source.substring(1),h.anchor===""&&d(a,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(h.spaceBefore=!0),s&&(h.comment=s,h.range[2]=c),h}function uD({options:r},{offset:e,source:t,end:n},o){const s=new kc(t.substring(1));s.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&o(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=e+t.length,l=Ji(n,a,r.strict,o);return s.range=[e,a,l.offset],l.comment&&(s.comment=l.comment),s}function hD(r,e,{offset:t,start:n,value:o,end:s},a){const l=Object.assign({_directives:e},r),c=new vs(void 0,l),d={atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=Zo(n,{indicator:"doc-start",next:o??(s==null?void 0:s[0]),offset:t,onError:a,startOnNewline:!0});u.found&&(c.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!u.hasNewline&&a(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=o?m1(d,o,u,a):Df(d,u.end,n,null,u,a);const h=c.contents.range[2],f=Ji(s,h,!1,a);return f.comment&&(c.comment=f.comment),c.range=[t,h,f.offset],c}function zs(r){if(typeof r=="number")return[r,r+1];if(Array.isArray(r))return r.length===2?r:[r[0],r[1]];const{offset:e,source:t}=r;return[e,e+(typeof t=="string"?t.length:1)]}function Mg(r){var e;let t="",n=!1,o=!1;for(let s=0;s<r.length;++s){const a=r[s];switch(a[0]){case"#":t+=(t===""?"":o?`
167
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function iD(r,e,t,n){const o=r.substr(e,t),s=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(s)){const a=r.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(s)}function p1(r,e,t,n){const{value:o,type:s,comment:a,range:l}=e.type==="block-scalar"?u1(e,r.options.strict,n):h1(e,r.options.strict,n),c=t?r.directives.tagName(t.source,h=>n(t,"TAG_RESOLVE_FAILED",h)):null,d=t&&c?aD(r.schema,o,c,t,n):e.type==="scalar"?lD(r,o,e,n):r.schema[Fr];let u;try{const h=d.resolve(o,f=>n(t??e,"TAG_RESOLVE_FAILED",f),r.options);u=$e(h)?h:new le(h)}catch(h){const f=h instanceof Error?h.message:String(h);n(t??e,"TAG_RESOLVE_FAILED",f),u=new le(o)}return u.range=l,u.source=o,s&&(u.type=s),c&&(u.tag=c),d.format&&(u.format=d.format),a&&(u.comment=a),u}function aD(r,e,t,n,o){var s;if(t==="!")return r[Fr];const a=[];for(const c of r.tags)if(!c.collection&&c.tag===t)if(c.default&&c.test)a.push(c);else return c;for(const c of a)if((s=c.test)!=null&&s.test(e))return c;const l=r.knownTags[t];return l&&!l.collection?(r.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),r[Fr])}function lD({directives:r,schema:e},t,n,o){const s=e.tags.find(a=>{var l;return a.default&&((l=a.test)==null?void 0:l.test(t))})||e[Fr];if(e.compat){const a=e.compat.find(l=>{var c;return l.default&&((c=l.test)==null?void 0:c.test(t))})??e[Fr];if(s.tag!==a.tag){const l=r.tagString(s.tag),c=r.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;o(n,"TAG_RESOLVE_FAILED",d,!0)}}return s}function cD(r,e,t){if(e){t===null&&(t=e.length);for(let n=t-1;n>=0;--n){let o=e[n];switch(o.type){case"space":case"comment":case"newline":r-=o.source.length;continue}for(o=e[++n];(o==null?void 0:o.type)==="space";)r+=o.source.length,o=e[++n];break}}return r}const dD={composeNode:m1,composeEmptyNode:Vf};function m1(r,e,t,n){const{spaceBefore:o,comment:s,anchor:a,tag:l}=t;let c,d=!0;switch(e.type){case"alias":c=uD(r,e,n),(a||l)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=p1(r,e,l,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=QM(dD,r,e,l,n),a&&(c.anchor=a.source.substring(1));break;default:{const u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),c=Vf(r,e.offset,void 0,null,t,n),d=!1}}return a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),o&&(c.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?c.comment=s:c.commentBefore=s),r.options.keepSourceTokens&&d&&(c.srcToken=e),c}function Vf(r,e,t,n,{spaceBefore:o,comment:s,anchor:a,tag:l,end:c},d){const u={type:"scalar",offset:cD(e,t,n),indent:-1,source:""},h=p1(r,u,l,d);return a&&(h.anchor=a.source.substring(1),h.anchor===""&&d(a,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(h.spaceBefore=!0),s&&(h.comment=s,h.range[2]=c),h}function uD({options:r},{offset:e,source:t,end:n},o){const s=new Sc(t.substring(1));s.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&o(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=e+t.length,l=Ji(n,a,r.strict,o);return s.range=[e,a,l.offset],l.comment&&(s.comment=l.comment),s}function hD(r,e,{offset:t,start:n,value:o,end:s},a){const l=Object.assign({_directives:e},r),c=new vs(void 0,l),d={atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=Zo(n,{indicator:"doc-start",next:o??(s==null?void 0:s[0]),offset:t,onError:a,startOnNewline:!0});u.found&&(c.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!u.hasNewline&&a(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=o?m1(d,o,u,a):Vf(d,u.end,n,null,u,a);const h=c.contents.range[2],f=Ji(s,h,!1,a);return f.comment&&(c.comment=f.comment),c.range=[t,h,f.offset],c}function zs(r){if(typeof r=="number")return[r,r+1];if(Array.isArray(r))return r.length===2?r:[r[0],r[1]];const{offset:e,source:t}=r;return[e,e+(typeof t=="string"?t.length:1)]}function Mg(r){var e;let t="",n=!1,o=!1;for(let s=0;s<r.length;++s){const a=r[s];switch(a[0]){case"#":t+=(t===""?"":o?`
168
168
 
169
169
  `:`
170
- `)+(a.substring(1)||" "),n=!0,o=!1;break;case"%":((e=r[s+1])==null?void 0:e[0])!=="#"&&(s+=1),n=!1;break;default:n||(o=!0),n=!1}}return{comment:t,afterEmptyLine:o}}class Vf{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,o,s)=>{const a=zs(t);s?this.warnings.push(new c1(a,n,o)):this.errors.push(new jn(a,n,o))},this.directives=new ht({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:o}=Mg(this.prelude);if(n){const s=e.contents;if(t)e.comment=e.comment?`${e.comment}
170
+ `)+(a.substring(1)||" "),n=!0,o=!1;break;case"%":((e=r[s+1])==null?void 0:e[0])!=="#"&&(s+=1),n=!1;break;default:n||(o=!0),n=!1}}return{comment:t,afterEmptyLine:o}}class Rf{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,o,s)=>{const a=zs(t);s?this.warnings.push(new c1(a,n,o)):this.errors.push(new jn(a,n,o))},this.directives=new ht({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:o}=Mg(this.prelude);if(n){const s=e.contents;if(t)e.comment=e.comment?`${e.comment}
171
171
  ${n}`:n;else if(o||e.directives.docStart||!s)e.commentBefore=n;else if(Ie(s)&&!s.flow&&s.items.length>0){let a=s.items[0];Pe(a)&&(a=a.key);const l=a.commentBefore;a.commentBefore=l?`${n}
172
172
  ${l}`:n}else{const a=s.commentBefore;s.commentBefore=a?`${n}
173
173
  ${a}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Mg(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const o of e)yield*this.next(o);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,o)=>{const s=zs(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",n,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=hD(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new jn(zs(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new jn(zs(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const t=Ji(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const n=this.doc.comment;this.doc.comment=n?`${n}
@@ -175,20 +175,20 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
175
175
  `}];switch(l[0]){case"|":case">":{const d=l.indexOf(`
176
176
  `),u=l.substring(0,d),h=l.substring(d+1)+`
177
177
  `,f=[{type:"block-scalar-header",offset:s,indent:n,source:u}];return g1(f,c)||f.push({type:"newline",offset:-1,indent:n,source:`
178
- `}),{type:"block-scalar",offset:s,indent:n,props:f,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:l,end:c};default:return{type:"scalar",offset:s,indent:n,source:l,end:c}}}function mD(r,e,t={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:s=!1,type:a}=t,l="indent"in r?r.indent:null;if(n&&typeof l=="number"&&(l+=2),!a)switch(r.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const d=r.props[0];if(d.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=d.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const c=Wi({type:a,value:e},{implicitKey:o||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":gD(r,c);break;case'"':yd(r,c,"double-quoted-scalar");break;case"'":yd(r,c,"single-quoted-scalar");break;default:yd(r,c,"scalar")}}function gD(r,e){const t=e.indexOf(`
178
+ `}),{type:"block-scalar",offset:s,indent:n,props:f,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:l,end:c};default:return{type:"scalar",offset:s,indent:n,source:l,end:c}}}function mD(r,e,t={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:s=!1,type:a}=t,l="indent"in r?r.indent:null;if(n&&typeof l=="number"&&(l+=2),!a)switch(r.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const d=r.props[0];if(d.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=d.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const c=Wi({type:a,value:e},{implicitKey:o||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":gD(r,c);break;case'"':vd(r,c,"double-quoted-scalar");break;case"'":vd(r,c,"single-quoted-scalar");break;default:vd(r,c,"scalar")}}function gD(r,e){const t=e.indexOf(`
179
179
  `),n=e.substring(0,t),o=e.substring(t+1)+`
180
180
  `;if(r.type==="block-scalar"){const s=r.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,r.source=o}else{const{offset:s}=r,a="indent"in r?r.indent:-1,l=[{type:"block-scalar-header",offset:s,indent:a,source:n}];g1(l,"end"in r?r.end:void 0)||l.push({type:"newline",offset:-1,indent:a,source:`
181
- `});for(const c of Object.keys(r))c!=="type"&&c!=="offset"&&delete r[c];Object.assign(r,{type:"block-scalar",indent:a,props:l,source:o})}}function g1(r,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":r.push(t);break;case"newline":return r.push(t),!0}return!1}function yd(r,e,t){switch(r.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":r.type=t,r.source=e;break;case"block-scalar":{const n=r.props.slice(1);let o=e.length;r.props[0].type==="block-scalar-header"&&(o-=r.props[0].source.length);for(const s of n)s.offset+=o;delete r.props,Object.assign(r,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:r.offset+e.length,indent:r.indent,source:`
182
- `};delete r.items,Object.assign(r,{type:t,source:e,end:[n]});break}default:{const n="indent"in r?r.indent:-1,o="end"in r&&Array.isArray(r.end)?r.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(r))s!=="type"&&s!=="offset"&&delete r[s];Object.assign(r,{type:t,indent:n,source:e,end:o})}}}const yD=r=>"type"in r?Ml(r):al(r);function Ml(r){switch(r.type){case"block-scalar":{let e="";for(const t of r.props)e+=Ml(t);return e+r.source}case"block-map":case"block-seq":{let e="";for(const t of r.items)e+=al(t);return e}case"flow-collection":{let e=r.start.source;for(const t of r.items)e+=al(t);for(const t of r.end)e+=t.source;return e}case"document":{let e=al(r);if(r.end)for(const t of r.end)e+=t.source;return e}default:{let e=r.source;if("end"in r&&r.end)for(const t of r.end)e+=t.source;return e}}}function al({start:r,key:e,sep:t,value:n}){let o="";for(const s of r)o+=s.source;if(e&&(o+=Ml(e)),t)for(const s of t)o+=s.source;return n&&(o+=Ml(n)),o}const ju=Symbol("break visit"),vD=Symbol("skip children"),y1=Symbol("remove item");function to(r,e){"type"in r&&r.type==="document"&&(r={start:r.start,value:r.value}),v1(Object.freeze([]),r,e)}to.BREAK=ju;to.SKIP=vD;to.REMOVE=y1;to.itemAtPath=(r,e)=>{let t=r;for(const[n,o]of e){const s=t==null?void 0:t[n];if(s&&"items"in s)t=s.items[o];else return}return t};to.parentCollection=(r,e)=>{const t=to.itemAtPath(r,e.slice(0,-1)),n=e[e.length-1][0],o=t==null?void 0:t[n];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function v1(r,e,t){let n=t(e,r);if(typeof n=="symbol")return n;for(const o of["key","value"]){const s=e[o];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){const l=v1(Object.freeze(r.concat([[o,a]])),s.items[a],t);if(typeof l=="number")a=l-1;else{if(l===ju)return ju;l===y1&&(s.items.splice(a,1),a-=1)}}typeof n=="function"&&o==="key"&&(n=n(e,r))}}return typeof n=="function"?n(e,r):n}const Tc="\uFEFF",Bc="",Pc="",Ai="",bD=r=>!!r&&"items"in r,wD=r=>!!r&&(r.type==="scalar"||r.type==="single-quoted-scalar"||r.type==="double-quoted-scalar"||r.type==="block-scalar");function kD(r){switch(r){case Tc:return"<BOM>";case Bc:return"<DOC>";case Pc:return"<FLOW_END>";case Ai:return"<SCALAR>";default:return JSON.stringify(r)}}function b1(r){switch(r){case Tc:return"byte-order-mark";case Bc:return"doc-mode";case Pc:return"flow-error-end";case Ai:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
181
+ `});for(const c of Object.keys(r))c!=="type"&&c!=="offset"&&delete r[c];Object.assign(r,{type:"block-scalar",indent:a,props:l,source:o})}}function g1(r,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":r.push(t);break;case"newline":return r.push(t),!0}return!1}function vd(r,e,t){switch(r.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":r.type=t,r.source=e;break;case"block-scalar":{const n=r.props.slice(1);let o=e.length;r.props[0].type==="block-scalar-header"&&(o-=r.props[0].source.length);for(const s of n)s.offset+=o;delete r.props,Object.assign(r,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:r.offset+e.length,indent:r.indent,source:`
182
+ `};delete r.items,Object.assign(r,{type:t,source:e,end:[n]});break}default:{const n="indent"in r?r.indent:-1,o="end"in r&&Array.isArray(r.end)?r.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(r))s!=="type"&&s!=="offset"&&delete r[s];Object.assign(r,{type:t,indent:n,source:e,end:o})}}}const yD=r=>"type"in r?Ml(r):al(r);function Ml(r){switch(r.type){case"block-scalar":{let e="";for(const t of r.props)e+=Ml(t);return e+r.source}case"block-map":case"block-seq":{let e="";for(const t of r.items)e+=al(t);return e}case"flow-collection":{let e=r.start.source;for(const t of r.items)e+=al(t);for(const t of r.end)e+=t.source;return e}case"document":{let e=al(r);if(r.end)for(const t of r.end)e+=t.source;return e}default:{let e=r.source;if("end"in r&&r.end)for(const t of r.end)e+=t.source;return e}}}function al({start:r,key:e,sep:t,value:n}){let o="";for(const s of r)o+=s.source;if(e&&(o+=Ml(e)),t)for(const s of t)o+=s.source;return n&&(o+=Ml(n)),o}const Fu=Symbol("break visit"),vD=Symbol("skip children"),y1=Symbol("remove item");function to(r,e){"type"in r&&r.type==="document"&&(r={start:r.start,value:r.value}),v1(Object.freeze([]),r,e)}to.BREAK=Fu;to.SKIP=vD;to.REMOVE=y1;to.itemAtPath=(r,e)=>{let t=r;for(const[n,o]of e){const s=t==null?void 0:t[n];if(s&&"items"in s)t=s.items[o];else return}return t};to.parentCollection=(r,e)=>{const t=to.itemAtPath(r,e.slice(0,-1)),n=e[e.length-1][0],o=t==null?void 0:t[n];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function v1(r,e,t){let n=t(e,r);if(typeof n=="symbol")return n;for(const o of["key","value"]){const s=e[o];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){const l=v1(Object.freeze(r.concat([[o,a]])),s.items[a],t);if(typeof l=="number")a=l-1;else{if(l===Fu)return Fu;l===y1&&(s.items.splice(a,1),a-=1)}}typeof n=="function"&&o==="key"&&(n=n(e,r))}}return typeof n=="function"?n(e,r):n}const Bc="\uFEFF",Pc="",Ic="",Ai="",bD=r=>!!r&&"items"in r,wD=r=>!!r&&(r.type==="scalar"||r.type==="single-quoted-scalar"||r.type==="double-quoted-scalar"||r.type==="block-scalar");function kD(r){switch(r){case Bc:return"<BOM>";case Pc:return"<DOC>";case Ic:return"<FLOW_END>";case Ai:return"<SCALAR>";default:return JSON.stringify(r)}}function b1(r){switch(r){case Bc:return"byte-order-mark";case Pc:return"doc-mode";case Ic:return"flow-error-end";case Ai:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
183
183
  `:case`\r
184
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(r[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const SD=Object.freeze(Object.defineProperty({__proto__:null,BOM:Tc,DOCUMENT:Bc,FLOW_END:Pc,SCALAR:Ai,createScalarToken:pD,isCollection:bD,isScalar:wD,prettyToken:kD,resolveAsScalar:fD,setScalarValue:mD,stringify:yD,tokenType:b1,visit:to},Symbol.toStringTag,{value:"Module"}));function Tt(r){switch(r){case void 0:case" ":case`
185
- `:case"\r":case" ":return!0;default:return!1}}const Dg="0123456789ABCDEFabcdef".split(""),xD="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),vd=",[]{}".split(""),CD=` ,[]{}
186
- \r `.split(""),bd=r=>!r||CD.includes(r);class w1{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
184
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(r[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const SD=Object.freeze(Object.defineProperty({__proto__:null,BOM:Bc,DOCUMENT:Pc,FLOW_END:Ic,SCALAR:Ai,createScalarToken:pD,isCollection:bD,isScalar:wD,prettyToken:kD,resolveAsScalar:fD,setScalarValue:mD,stringify:yD,tokenType:b1,visit:to},Symbol.toStringTag,{value:"Module"}));function Tt(r){switch(r){case void 0:case" ":case`
185
+ `:case"\r":case" ":return!0;default:return!1}}const Dg="0123456789ABCDEFabcdef".split(""),xD="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),bd=",[]{}".split(""),CD=` ,[]{}
186
+ \r `.split(""),wd=r=>!r||CD.includes(r);class w1{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
187
187
  `?!0:t==="\r"?this.buffer[e+1]===`
188
188
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){const o=this.buffer[n+e+1];if(o===`
189
189
  `||!o&&!this.atEnd)return e+n+1}return t===`
190
190
  `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Tt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
191
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Tc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length;const n=e.indexOf("#");if(n!==-1){const s=e[n-1];(s===" "||s===" ")&&(t=n-1)}for(;;){const s=e[t-1];if(s===" "||s===" ")t-=1;else break}const o=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Bc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if(t==="---"&&Tt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if(t==="..."&&Tt(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Tt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Tt(t)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(bd),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&o[0]!=="#"||n===0&&(o.startsWith("---")||o.startsWith("..."))&&Tt(o[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield Pc,yield*this.parseLineStart();let s=0;for(;o[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),o[s]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(bd),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const a=this.charAt(1);if(this.flowKey||Tt(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let o=n.indexOf(`
191
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Bc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length;const n=e.indexOf("#");if(n!==-1){const s=e[n-1];(s===" "||s===" ")&&(t=n-1)}for(;;){const s=e[t-1];if(s===" "||s===" ")t-=1;else break}const o=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Pc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if(t==="---"&&Tt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if(t==="..."&&Tt(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Tt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Tt(t)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(wd),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&o[0]!=="#"||n===0&&(o.startsWith("---")||o.startsWith("..."))&&Tt(o[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield Ic,yield*this.parseLineStart();let s=0;for(;o[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),o[s]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(wd),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const a=this.charAt(1);if(this.flowKey||Tt(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let o=n.indexOf(`
192
192
  `,this.pos);if(o!==-1){for(;o!==-1;){const s=this.continueScalar(o+1);if(s===-1)break;o=n.indexOf(`
193
193
  `,s)}o!==-1&&(t=o-(n[o-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Tt(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let o=this.pos;n=this.buffer[o];++o)switch(n){case" ":t+=1;break;case`
194
194
  `:e=o,t=0;break;case"\r":{const s=this.buffer[o+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
@@ -196,27 +196,27 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
196
196
  `,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}if(!this.blockScalarKeep)do{let o=e-1,s=this.buffer[o];s==="\r"&&(s=this.buffer[--o]);const a=o;for(;s===" "||s===" ";)s=this.buffer[--o];if(s===`
197
197
  `&&o>=this.pos&&o+1+t>a)e=o;else break}while(!0);return yield Ai,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,n=this.pos-1,o;for(;o=this.buffer[++n];)if(o===":"){const s=this.buffer[n+1];if(Tt(s)||e&&s===",")break;t=n}else if(Tt(o)){let s=this.buffer[n+1];if(o==="\r"&&(s===`
198
198
  `?(n+=1,o=`
199
- `,s=this.buffer[n+1]):t=n),s==="#"||e&&vd.includes(s))break;if(o===`
200
- `){const a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&vd.includes(o))break;t=n}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Ai,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(bd))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(Tt(t)||e&&vd.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!Tt(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(xD.includes(t))t=this.buffer[++e];else if(t==="%"&&Dg.includes(this.buffer[e+1])&&Dg.includes(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
199
+ `,s=this.buffer[n+1]):t=n),s==="#"||e&&bd.includes(s))break;if(o===`
200
+ `){const a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&bd.includes(o))break;t=n}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Ai,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(wd))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(Tt(t)||e&&bd.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!Tt(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(xD.includes(t))t=this.buffer[++e];else if(t==="%"&&Dg.includes(this.buffer[e+1])&&Dg.includes(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
201
201
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
202
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");const o=t-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=t),o}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class k1{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const s=t+n>>1;this.lineStarts[s]<e?t=s+1:n=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const o=this.lineStarts[t-1];return{line:t,col:e-o+1}}}}function Ut(r,e){for(let t=0;t<r.length;++t)if(r[t].type===e)return!0;return!1}function Vg(r){for(let e=0;e<r.length;++e)switch(r[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function S1(r){switch(r==null?void 0:r.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Va(r){switch(r.type){case"document":return r.start;case"block-map":{const e=r.items[r.items.length-1];return e.sep??e.start}case"block-seq":return r.items[r.items.length-1].start;default:return[]}}function ko(r){var e;if(r.length===0)return[];let t=r.length;e:for(;--t>=0;)switch(r[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((e=r[++t])==null?void 0:e.type)==="space";);return r.splice(t,r.length)}function Rg(r){if(r.start.type==="flow-seq-start")for(const e of r.items)e.sep&&!e.value&&!Ut(e.start,"explicit-key-ind")&&!Ut(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,S1(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Rf{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new w1,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=b1(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Rg(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{const o=n.items[n.items.length-1];if(o.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=t;else{Object.assign(o,{key:t,sep:[]}),this.onKeyLine=!Ut(o.start,"explicit-key-ind");return}break}case"block-seq":{const o=n.items[n.items.length-1];o.value?n.items.push({start:[],value:t}):o.value=t;break}case"flow-collection":{const o=n.items[n.items.length-1];!o||o.value?n.items.push({start:[],key:t,sep:[]}):o.sep?o.value=t:Object.assign(o,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const o=t.items[t.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Vg(o.start)===-1&&(t.indent===0||o.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(n.type==="document"?n.end=o.start:n.items.push({start:o.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Vg(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const t=Va(this.peek(2)),n=ko(t);let o;e.end?(o=e.end,o.push(this.sourceToken),delete e.end):o=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
202
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");const o=t-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=t),o}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class k1{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const s=t+n>>1;this.lineStarts[s]<e?t=s+1:n=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const o=this.lineStarts[t-1];return{line:t,col:e-o+1}}}}function Ut(r,e){for(let t=0;t<r.length;++t)if(r[t].type===e)return!0;return!1}function Vg(r){for(let e=0;e<r.length;++e)switch(r[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function S1(r){switch(r==null?void 0:r.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Va(r){switch(r.type){case"document":return r.start;case"block-map":{const e=r.items[r.items.length-1];return e.sep??e.start}case"block-seq":return r.items[r.items.length-1].start;default:return[]}}function ko(r){var e;if(r.length===0)return[];let t=r.length;e:for(;--t>=0;)switch(r[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((e=r[++t])==null?void 0:e.type)==="space";);return r.splice(t,r.length)}function Rg(r){if(r.start.type==="flow-seq-start")for(const e of r.items)e.sep&&!e.value&&!Ut(e.start,"explicit-key-ind")&&!Ut(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,S1(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Lf{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new w1,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=b1(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Rg(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{const o=n.items[n.items.length-1];if(o.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=t;else{Object.assign(o,{key:t,sep:[]}),this.onKeyLine=!Ut(o.start,"explicit-key-ind");return}break}case"block-seq":{const o=n.items[n.items.length-1];o.value?n.items.push({start:[],value:t}):o.value=t;break}case"flow-collection":{const o=n.items[n.items.length-1];!o||o.value?n.items.push({start:[],key:t,sep:[]}):o.sep?o.value=t:Object.assign(o,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const o=t.items[t.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Vg(o.start)===-1&&(t.indent===0||o.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(n.type==="document"?n.end=o.start:n.items.push({start:o.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Vg(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const t=Va(this.peek(2)),n=ko(t);let o;e.end?(o=e.end,o.push(this.sourceToken),delete e.end):o=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
203
203
  `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
204
204
  `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var t;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const o="end"in n.value?n.value.end:void 0,s=Array.isArray(o)?o[o.length-1]:void 0;(s==null?void 0:s.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],s=(t=o==null?void 0:o.value)==null?void 0:t.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent&&n.sep&&this.type!=="seq-item-ind";let s=[];if(o&&n.sep&&!n.value){const a=[];for(let l=0;l<n.sep.length;++l){const c=n.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=n.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!Ut(n.start,"explicit-key-ind")?n.start.push(this.sourceToken):o||n.value?(s.push(this.sourceToken),e.items.push({start:s})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(Ut(n.start,"explicit-key-ind"))if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ut(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(S1(n.key)&&!Ut(n.sep,"newline")){const a=ko(n.start),l=n.key,c=n.sep;c.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(Ut(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const a=ko(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Ut(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);o||n.value?(e.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{const a=this.startBlockValue(e);if(a){o&&a.type!=="block-seq"&&Ut(n.start,"explicit-key-ind")&&e.items.push({start:s}),this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var t;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const o="end"in n.value?n.value.end:void 0,s=Array.isArray(o)?o[o.length-1]:void 0;(s==null?void 0:s.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],s=(t=o==null?void 0:o.value)==null?void 0:t.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Ut(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n&&n.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:o,sep:[]}):t.sep?this.stack.push(o):Object.assign(t,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const o=Va(n),s=ko(o);Rg(e);const a=e.end.splice(1,e.end.length);a.push(this.sourceToken);const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
205
205
  `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
206
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Va(e),n=ko(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Va(e),n=ko(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function x1(r){const e=r.prettyErrors!==!1;return{lineCounter:r.lineCounter||e&&new k1||null,prettyErrors:e}}function ED(r,e={}){const{lineCounter:t,prettyErrors:n}=x1(e),o=new Rf(t==null?void 0:t.addNewLine),s=new Vf(e),a=Array.from(s.compose(o.parse(r)));if(n&&t)for(const l of a)l.errors.forEach(Il(r,t)),l.warnings.forEach(Il(r,t));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function C1(r,e={}){const{lineCounter:t,prettyErrors:n}=x1(e),o=new Rf(t==null?void 0:t.addNewLine),s=new Vf(e);let a=null;for(const l of s.compose(o.parse(r),!0,r.length))if(!a)a=l;else if(a.options.logLevel!=="silent"){a.errors.push(new jn(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(a.errors.forEach(Il(r,t)),a.warnings.forEach(Il(r,t))),a}function $D(r,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);const o=C1(r,t);if(!o)return null;if(o.warnings.forEach(s=>Ub(o.options.logLevel,s)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},t))}function _D(r,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const o=Math.round(t);t=o<1?void 0:o>8?{indent:8}:{indent:o}}if(r===void 0){const{keepUndefined:o}=t??e??{};if(!o)return}return new vs(r,n,t).toString(t)}const E1=Object.freeze(Object.defineProperty({__proto__:null,Alias:kc,CST:SD,Composer:Vf,Document:vs,Lexer:w1,LineCounter:k1,Pair:lt,Parser:Rf,Scalar:le,Schema:Oc,YAMLError:Mf,YAMLMap:Et,YAMLParseError:jn,YAMLSeq:vn,YAMLWarning:c1,isAlias:ao,isCollection:Ie,isDocument:fs,isMap:ps,isNode:je,isPair:Pe,isScalar:$e,isSeq:ms,parse:$D,parseAllDocuments:ED,parseDocument:C1,stringify:_D,visit:yn,visitAsync:wc},Symbol.toStringTag,{value:"Module"}));function $1(r){if(Pb(r))return r;if(typeof r=="string")try{return JSON.parse(r)}catch{return E1.parse(r)}return r}function _1(r){if(Pb(r))return r;const e=$1(r);return[{isEntrypoint:!0,specification:e,filename:"openapi.json",dir:"./",references:vM(e)}]}async function ND(r){const e=new Ff,t=_1(r),n=await e.validate(t),o=structuredClone(e.specification),s=e.resolveReferences(t);return{valid:n.valid,version:e.version,errors:n.errors,specification:o,schema:s}}const AD=r=>JSON.stringify(r,null,2),OD=r=>E1.stringify(r);function TD(r){var e;if((e=r.openapi)!=null&&e.startsWith("3.0"))r.openapi="3.1.0";else return r;return r=dr(r,t=>(t.type!=="undefined"&&t.nullable===!0&&(t.type=["null",t.type],delete t.nullable),t)),r=dr(r,t=>(t.exclusiveMinimum===!0?(t.exclusiveMinimum=t.minimum,delete t.minimum):t.exclusiveMinimum===!1&&delete t.exclusiveMinimum,t.exclusiveMaximum===!0?(t.exclusiveMaximum=t.maximum,delete t.maximum):t.exclusiveMaximum===!1&&delete t.exclusiveMaximum,t)),r=dr(r,t=>(t.example!==void 0&&(t.examples={default:t.example},delete t.example),t)),r=dr(r,t=>{if(t.type==="object"&&t.properties!==void 0)for(const[n,o]of Object.entries(t.properties))o!==void 0&&o.type==="string"&&o.format==="binary"&&(o.contentEncoding="application/octet-stream",delete o.format);return t}),r=dr(r,t=>{if(!(t.type==="string"&&t.format==="binary"))return t}),r=dr(r,t=>t.type==="string"&&t.format==="base64"?{type:"string",contentEncoding:"base64"}:t),r}function BD(r){return r}function PD(r){return[BD,TD].reduce((e,t)=>t(e),r)}async function ID(r){const e=new Ff,t=_1(r);return{...await e.validate(t),specification:e.specification,version:e.version}}function N1(r){for(const e of new Set(Bb)){const t=e==="2.0"?"swagger":"openapi",n=r[t];if(typeof n=="string"&&n.startsWith(e))return{version:e,specificationType:t,specificationVersion:n}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function MD(r){return decodeURI(r.replace(/~1/g,"/").replace(/~0/g,"~"))}function A1(r){const e=structuredClone(r);return t(e),t(e),e;function t(n){Object.entries(n??{}).forEach(([o,s])=>{if(n.$ref!==void 0){const a=VD(e,n.$ref);delete n.$ref,typeof a=="object"&&Object.keys(a).forEach(l=>{n[l]===void 0&&(n[l]=a[l])})}typeof s=="object"&&!DD(s)&&t(s)})}}function DD(r){try{return JSON.stringify(r),!1}catch{return!0}}function VD(r,e){if(typeof e!="string")return;const[t,n]=e.split("#",2);if(t)throw new Error(Iu.EXTERNAL_REFERENCE_NOT_SUPPORTED.replace("%s",e));return MD(n).split("/").slice(1).reduce((o,s)=>o[s],r)}const RD="[",LD="]",jD="{",FD="}",qD=":",zD=",",O1="true",T1="false",B1="null",Lg='"',HD=new Map([["t",O1],["f",T1],["n",B1]]),Fu=new Map([[Lg,Lg],["\\","\\"],["/","/"],["b","\b"],["n",`
207
- `],["f","\f"],["r","\r"],["t"," "]]),wd=new Map([[RD,"LBracket"],[LD,"RBracket"],[jD,"LBrace"],[FD,"RBrace"],[qD,"Colon"],[zD,"Comma"],[O1,"Boolean"],[T1,"Boolean"],[B1,"Null"]]);class Oi extends Error{constructor(e,{line:t,column:n,offset:o}){super(`${e} (${t}:${n})`),this.line=t,this.column=n,this.offset=o}}class UD extends Oi{constructor(e,t){super(`Unexpected character '${e}' found.`,t)}}class kd extends Oi{constructor(e){super(`Unexpected token ${e.type} found.`,e.loc.start)}}class KD extends Oi{constructor(e){super("Unexpected end of input found.",e)}}const jg='"',Fg="/",qg="*",WD={mode:"json",ranges:!1};function GD(r){return/[\s\n]/.test(r)}function tn(r){return r>="0"&&r<="9"}function JD(r){return tn(r)||/[a-f]/i.test(r)}function YD(r){return r>="1"&&r<="9"}function XD(r){return/[tfn]/.test(r)}function QD(r){return tn(r)||r==="."||r==="-"}function ZD(r,e){e=Object.freeze({...WD,...e});let t=-1,n=1,o=0,s=!1;const a=[];function l(v,b,w,S){const x=w.offset+b.length;let k=e.ranges?{range:[w.offset,x]}:void 0;return{type:v,loc:{start:w,end:S||{line:w.line,column:w.column+b.length,offset:x}},...k}}function c(){let v=r.charAt(++t);return s?(n++,o=1,s=!1):o++,v==="\r"?(s=!0,r.charAt(t+1)===`
206
+ `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Va(e),n=ko(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Va(e),n=ko(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function x1(r){const e=r.prettyErrors!==!1;return{lineCounter:r.lineCounter||e&&new k1||null,prettyErrors:e}}function ED(r,e={}){const{lineCounter:t,prettyErrors:n}=x1(e),o=new Lf(t==null?void 0:t.addNewLine),s=new Rf(e),a=Array.from(s.compose(o.parse(r)));if(n&&t)for(const l of a)l.errors.forEach(Il(r,t)),l.warnings.forEach(Il(r,t));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function C1(r,e={}){const{lineCounter:t,prettyErrors:n}=x1(e),o=new Lf(t==null?void 0:t.addNewLine),s=new Rf(e);let a=null;for(const l of s.compose(o.parse(r),!0,r.length))if(!a)a=l;else if(a.options.logLevel!=="silent"){a.errors.push(new jn(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(a.errors.forEach(Il(r,t)),a.warnings.forEach(Il(r,t))),a}function $D(r,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);const o=C1(r,t);if(!o)return null;if(o.warnings.forEach(s=>Ub(o.options.logLevel,s)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},t))}function _D(r,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const o=Math.round(t);t=o<1?void 0:o>8?{indent:8}:{indent:o}}if(r===void 0){const{keepUndefined:o}=t??e??{};if(!o)return}return new vs(r,n,t).toString(t)}const E1=Object.freeze(Object.defineProperty({__proto__:null,Alias:Sc,CST:SD,Composer:Rf,Document:vs,Lexer:w1,LineCounter:k1,Pair:lt,Parser:Lf,Scalar:le,Schema:Tc,YAMLError:Df,YAMLMap:Et,YAMLParseError:jn,YAMLSeq:vn,YAMLWarning:c1,isAlias:ao,isCollection:Ie,isDocument:fs,isMap:ps,isNode:je,isPair:Pe,isScalar:$e,isSeq:ms,parse:$D,parseAllDocuments:ED,parseDocument:C1,stringify:_D,visit:yn,visitAsync:kc},Symbol.toStringTag,{value:"Module"}));function $1(r){if(Pb(r))return r;if(typeof r=="string")try{return JSON.parse(r)}catch{return E1.parse(r)}return r}function _1(r){if(Pb(r))return r;const e=$1(r);return[{isEntrypoint:!0,specification:e,filename:"openapi.json",dir:"./",references:vM(e)}]}async function ND(r){const e=new qf,t=_1(r),n=await e.validate(t),o=structuredClone(e.specification),s=e.resolveReferences(t);return{valid:n.valid,version:e.version,errors:n.errors,specification:o,schema:s}}const AD=r=>JSON.stringify(r,null,2),OD=r=>E1.stringify(r);function TD(r){var e;if((e=r.openapi)!=null&&e.startsWith("3.0"))r.openapi="3.1.0";else return r;return r=dr(r,t=>(t.type!=="undefined"&&t.nullable===!0&&(t.type=["null",t.type],delete t.nullable),t)),r=dr(r,t=>(t.exclusiveMinimum===!0?(t.exclusiveMinimum=t.minimum,delete t.minimum):t.exclusiveMinimum===!1&&delete t.exclusiveMinimum,t.exclusiveMaximum===!0?(t.exclusiveMaximum=t.maximum,delete t.maximum):t.exclusiveMaximum===!1&&delete t.exclusiveMaximum,t)),r=dr(r,t=>(t.example!==void 0&&(t.examples={default:t.example},delete t.example),t)),r=dr(r,t=>{if(t.type==="object"&&t.properties!==void 0)for(const[n,o]of Object.entries(t.properties))o!==void 0&&o.type==="string"&&o.format==="binary"&&(o.contentEncoding="application/octet-stream",delete o.format);return t}),r=dr(r,t=>{if(!(t.type==="string"&&t.format==="binary"))return t}),r=dr(r,t=>t.type==="string"&&t.format==="base64"?{type:"string",contentEncoding:"base64"}:t),r}function BD(r){return r}function PD(r){return[BD,TD].reduce((e,t)=>t(e),r)}async function ID(r){const e=new qf,t=_1(r);return{...await e.validate(t),specification:e.specification,version:e.version}}function N1(r){for(const e of new Set(Bb)){const t=e==="2.0"?"swagger":"openapi",n=r[t];if(typeof n=="string"&&n.startsWith(e))return{version:e,specificationType:t,specificationVersion:n}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function MD(r){return decodeURI(r.replace(/~1/g,"/").replace(/~0/g,"~"))}function A1(r){const e=structuredClone(r);return t(e),t(e),e;function t(n){Object.entries(n??{}).forEach(([o,s])=>{if(n.$ref!==void 0){const a=VD(e,n.$ref);delete n.$ref,typeof a=="object"&&Object.keys(a).forEach(l=>{n[l]===void 0&&(n[l]=a[l])})}typeof s=="object"&&!DD(s)&&t(s)})}}function DD(r){try{return JSON.stringify(r),!1}catch{return!0}}function VD(r,e){if(typeof e!="string")return;const[t,n]=e.split("#",2);if(t)throw new Error(Mu.EXTERNAL_REFERENCE_NOT_SUPPORTED.replace("%s",e));return MD(n).split("/").slice(1).reduce((o,s)=>o[s],r)}const RD="[",LD="]",jD="{",FD="}",qD=":",zD=",",O1="true",T1="false",B1="null",Lg='"',HD=new Map([["t",O1],["f",T1],["n",B1]]),qu=new Map([[Lg,Lg],["\\","\\"],["/","/"],["b","\b"],["n",`
207
+ `],["f","\f"],["r","\r"],["t"," "]]),kd=new Map([[RD,"LBracket"],[LD,"RBracket"],[jD,"LBrace"],[FD,"RBrace"],[qD,"Colon"],[zD,"Comma"],[O1,"Boolean"],[T1,"Boolean"],[B1,"Null"]]);class Oi extends Error{constructor(e,{line:t,column:n,offset:o}){super(`${e} (${t}:${n})`),this.line=t,this.column=n,this.offset=o}}class UD extends Oi{constructor(e,t){super(`Unexpected character '${e}' found.`,t)}}class Sd extends Oi{constructor(e){super(`Unexpected token ${e.type} found.`,e.loc.start)}}class KD extends Oi{constructor(e){super("Unexpected end of input found.",e)}}const jg='"',Fg="/",qg="*",WD={mode:"json",ranges:!1};function GD(r){return/[\s\n]/.test(r)}function tn(r){return r>="0"&&r<="9"}function JD(r){return tn(r)||/[a-f]/i.test(r)}function YD(r){return r>="1"&&r<="9"}function XD(r){return/[tfn]/.test(r)}function QD(r){return tn(r)||r==="."||r==="-"}function ZD(r,e){e=Object.freeze({...WD,...e});let t=-1,n=1,o=0,s=!1;const a=[];function l(v,b,w,S){const x=w.offset+b.length;let k=e.ranges?{range:[w.offset,x]}:void 0;return{type:v,loc:{start:w,end:S||{line:w.line,column:w.column+b.length,offset:x}},...k}}function c(){let v=r.charAt(++t);return s?(n++,o=1,s=!1):o++,v==="\r"?(s=!0,r.charAt(t+1)===`
208
208
  `&&t++):v===`
209
- `&&(s=!0),v}function d(){return{line:n,column:o,offset:t}}function u(v){let b=HD.get(v);if(r.slice(t,t+b.length)===b)return t+=b.length-1,o+=b.length-1,{value:b,c:c()};for(let w=1;w<b.length;w++)b[w]!==r.charAt(t+w)&&y(c())}function h(v){let b=v;for(v=c();v&&v!==jg;){if(v==="\\")if(b+=v,v=c(),Fu.has(v))b+=v;else if(v==="u"){b+=v;for(let w=0;w<4;w++)v=c(),JD(v)?b+=v:y(v)}else y(v);else b+=v;v=c()}return v||g(),b+=v,{value:b,c:c()}}function f(v){let b="";if(v==="-"&&(b+=v,v=c(),tn(v)||y(v)),v==="0")b+=v,v=c(),tn(v)&&y(v);else{YD(v)||y(v);do b+=v,v=c();while(tn(v))}if(v===".")do b+=v,v=c();while(tn(v));if(v==="e"||v==="E")for(b+=v,v=c(),(v==="+"||v==="-")&&(b+=v,v=c()),v||g(),tn(v)||y(v);tn(v);)b+=v,v=c();return{value:b,c:v}}function p(v){let b=v;if(v=c(),v==="/"){do b+=v,v=c();while(v&&v!=="\r"&&v!==`
210
- `);return{value:b,c:v}}if(v===qg){for(;v;)if(b+=v,v=c(),v===qg&&(b+=v,v=c(),v===Fg))return b+=v,v=c(),{value:b,c:v};g()}y(v)}function y(v){throw new UD(v,d())}function g(){throw new KD(d())}let m=c();for(;t<r.length;){for(;GD(m);)m=c();if(!m)break;const v=d();if(wd.has(m))a.push(l(wd.get(m),m,v)),m=c();else if(XD(m)){const b=u(m);let w=b.value;m=b.c,a.push(l(wd.get(w),w,v))}else if(QD(m)){const b=f(m);let w=b.value;m=b.c,a.push(l("Number",w,v))}else if(m===jg){const b=h(m);let w=b.value;m=b.c,a.push(l("String",w,v))}else if(m===Fg&&e.mode==="jsonc"){const b=p(m);let w=b.value;m=b.c,a.push(l(w.startsWith("//")?"LineComment":"BlockComment",w,v,d()))}else y(m)}return a}const _r={document(r,e={}){return{type:"Document",body:r,...e}},string(r,e={}){return{type:"String",value:r,...e}},number(r,e={}){return{type:"Number",value:r,...e}},boolean(r,e={}){return{type:"Boolean",value:r,...e}},null(r={}){return{type:"Null",...r}},array(r,e={}){return{type:"Array",elements:r,...e}},element(r,e={}){return{type:"Element",value:r,...e}},object(r,e={}){return{type:"Object",members:r,...e}},member(r,e,t={}){return{type:"Member",name:r,value:e,...t}}},e5={mode:"json",ranges:!1,tokens:!1};function t5(r,e){let t="",n=r.indexOf("\\"),o=0;for(;n>=0;){t+=r.slice(o,n);const s=r.charAt(n+1);if(Fu.has(s))t+=Fu.get(s),o=n+2;else if(s==="u"){const a=r.slice(n+2,n+6);if(a.length<4||/[^0-9a-f]/i.test(a))throw new Oi(`Invalid unicode escape \\u${a}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});t+=String.fromCharCode(parseInt(a,16)),o=n+6}else throw new Oi(`Invalid escape \\${s}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});n=r.indexOf("\\",o)}return t+=r.slice(o),t}function r5(r,e){switch(e.type){case"Boolean":return r==="true";case"Number":return Number(r);case"String":return t5(r.slice(1,-1),e);default:throw new TypeError(`Unknown token type "${e.type}.`)}}function n5(r,e){e=Object.freeze({...e5,...e});const t=ZD(r,{mode:e.mode,ranges:e.ranges});let n=0;function o(){return t[n++]}function s(){const b=t[n++];return b&&b.type.endsWith("Comment")?s():b}const a=e.mode==="jsonc"?s:o;function l(b,w){if(!b||b.type!==w)throw new kd(b)}function c(b,w){return e.ranges?{range:[b.offset,w.offset]}:void 0}function d(b){const w=c(b.loc.start,b.loc.end),S=r5(r.slice(b.loc.start.offset,b.loc.end.offset),b),x={loc:{start:{...b.loc.start},end:{...b.loc.end}},...w};switch(b.type){case"String":return _r.string(S,x);case"Number":return _r.number(S,x);case"Boolean":return _r.boolean(S,x);default:throw new TypeError(`Unknown token type ${b.type}.`)}}function u(b){const w=c(b.loc.start,b.loc.end);return _r.null({loc:{start:{...b.loc.start},end:{...b.loc.end}},...w})}function h(b){l(b,"String");const w=d(b);b=a(),l(b,"Colon");const S=y(),x=c(w.loc.start,S.loc.end);return _r.member(w,S,{loc:{start:{...w.loc.start},end:{...S.loc.end}},...x})}function f(b){l(b,"LBrace");const w=[];let S=a();if(S&&S.type!=="RBrace")do if(w.push(h(S)),S=a(),S.type==="Comma")S=a();else break;while(S);l(S,"RBrace");const x=c(b.loc.start,S.loc.end);return _r.object(w,{loc:{start:{...b.loc.start},end:{...S.loc.end}},...x})}function p(b){l(b,"LBracket");const w=[];let S=a();if(S&&S.type!=="RBracket")do{const k=y(S);if(w.push(_r.element(k,{loc:k.loc})),S=a(),S.type==="Comma")S=a();else break}while(S);l(S,"RBracket");const x=c(b.loc.start,S.loc.end);return _r.array(w,{loc:{start:{...b.loc.start},end:{...S.loc.end}},...x})}function y(b){switch(b=b||a(),b.type){case"String":case"Boolean":case"Number":return d(b);case"Null":return u(b);case"LBrace":return f(b);case"LBracket":return p(b);default:throw new kd(b)}}const g=y(),m=a();if(m)throw new kd(m);const v={loc:{start:{line:1,column:1,offset:0},end:{...g.loc.end}}};return e.tokens&&(v.tokens=t),e.ranges&&(v.range=[v.loc.start.offset,v.loc.end.offset]),_r.document(g,v)}const o5=r=>e=>r===e,s5=r=>e=>!r(e),i5=r=>Object.values(r),a5=r=>r!==void 0,Lf=r=>e=>e.keyword===r,l5=Lf("required"),c5=Lf("anyOf"),P1=Lf("enum"),Xs=r=>r&&r.errors||[],I1=r=>r&&i5(r.children)||[],d5=r=>e=>I1(r).filter(s5(o5(e))),zg=r=>e=>e.reduce((t,n)=>t.concat(n),r),M1=r=>{const e=r.split("/").slice(1);for(const t in e)e[t]=e[t].split("~1").join("/").split("~0").join("~");return e};function u5(r,e,t){const n=M1(e),o=n.length-1;return n.reduce((s,a,l)=>{switch(s==null?void 0:s.type){case"Object":{const c=s.members.filter(h=>h.name.value===a);if(c.length!==1)throw new Error(`Couldn't find property ${a} of ${e}`);const{name:d,value:u}=c[0];return t&&l===o?d:u}case"Array":return s.elements[a];default:if(s.loc)return s}},r.body)}function h5(r){if(!r||!r.elements)return"";const e=r.elements.filter(t=>t&&t.name&&t.name.value==="type");return e.length&&e[0].value&&`:${e[0].value.value}`||""}function f5(r,e){let t="";return M1(e).reduce((n,o)=>{switch(n==null?void 0:n.type){case"Object":{t+=`/${o}`;const s=n.members.filter(a=>a.name.value===o);if(s.length!==1)throw new Error(`Couldn't find property ${o} of ${e}`);return s[0].value}case"Array":return t+=`/${o}${h5(n.elements[o])}`,n.elements[o]}},r.body),t}class bs{constructor(e={isIdentifierLocation:!1},{colorize:t,data:n,schema:o,jsonAst:s,jsonRaw:a}){this.options=e,this.colorize=!!(t||t===void 0),this.data=n,this.schema=o,this.jsonAst=s,this.jsonRaw=a}getChalk(){return this.colorize?chalk:new chalk.Instance({level:0})}getLocation(e=this.instancePath){const{isIdentifierLocation:t,isSkipEndLocation:n}=this.options,{loc:o}=u5(this.jsonAst,e,t);return{start:o.start,end:n?void 0:o.end}}getDecoratedPath(e=this.instancePath){return f5(this.jsonAst,e)}getCodeFrame(e,t=this.instancePath){return codeFrameColumns(this.jsonRaw,this.getLocation(t),{highlightCode:!1,message:e})}get instancePath(){return typeof this.options.instancePath<"u"?this.options.instancePath:this.options.dataPath}print(){throw new Error(`Implement the 'print' method inside ${this.constructor.name}!`)}getError(){throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)}}class p5 extends bs{constructor(...e){super(...e),this.name="AdditionalPropValidationError",this.options.isIdentifierLocation=!0}print(){const{message:e,params:t}=this.options,n=this.getChalk();return[n`{red {bold ADDITIONAL PROPERTY} ${e}}\n`].concat(this.getCodeFrame(n`😲 {magentaBright ${t.additionalProperty}} is not expected to be here!`,`${this.instancePath}/${t.additionalProperty}`))}getError(){const{params:e}=this.options;return{...this.getLocation(`${this.instancePath}/${e.additionalProperty}`),error:`${this.getDecoratedPath()} Property ${e.additionalProperty} is not expected to be here`,path:this.instancePath}}}class m5 extends bs{constructor(...e){super(...e),this.name="DefaultValidationError",this.options.isSkipEndLocation=!0}print(){const{keyword:e,message:t}=this.options,n=this.getChalk();return[n`{red {bold ${e.toUpperCase()}} ${t}}\n`].concat(this.getCodeFrame(n`👈🏽 {magentaBright ${e}} ${t}`))}getError(){const{keyword:e,message:t}=this.options;return{...this.getLocation(),error:`${this.getDecoratedPath()}: ${e} ${t}`,path:this.instancePath}}}var Ic={},g5=/~/,y5=/~[01]/g;function v5(r){switch(r){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+r)}function D1(r){return g5.test(r)?r.replace(y5,v5):r}function b5(r,e,t){for(var n,o,s=1,a=e.length;s<a;){if(e[s]==="constructor"||e[s]==="prototype"||e[s]==="__proto__")return r;if(n=D1(e[s++]),o=a>s,typeof r[n]>"u"&&(Array.isArray(r)&&n==="-"&&(n=r.length),o&&(e[s]!==""&&e[s]<1/0||e[s]==="-"?r[n]=[]:r[n]={})),!o)break;r=r[n]}var l=r[n];return t===void 0?delete r[n]:r[n]=t,l}function jf(r){if(typeof r=="string"){if(r=r.split("/"),r[0]==="")return r;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(r)){for(const e of r)if(typeof e!="string"&&typeof e!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return r}throw new Error("Invalid JSON pointer.")}function V1(r,e){if(typeof r!="object")throw new Error("Invalid input object.");e=jf(e);var t=e.length;if(t===1)return r;for(var n=1;n<t;){if(r=r[D1(e[n++])],t===n)return r;if(typeof r!="object"||r===null)return}}function R1(r,e,t){if(typeof r!="object")throw new Error("Invalid input object.");if(e=jf(e),e.length===0)throw new Error("Invalid JSON pointer for set.");return b5(r,e,t)}function w5(r){var e=jf(r);return{get:function(t){return V1(t,e)},set:function(t,n){return R1(t,e,n)}}}Ic.get=V1;Ic.set=R1;Ic.compile=w5;const Sd=[],Hg=[];function k5(r,e){if(r===e)return 0;const t=r;r.length>e.length&&(r=e,e=t);let n=r.length,o=e.length;for(;n>0&&r.charCodeAt(~-n)===e.charCodeAt(~-o);)n--,o--;let s=0;for(;s<n&&r.charCodeAt(s)===e.charCodeAt(s);)s++;if(n-=s,o-=s,n===0)return o;let a,l,c,d,u=0,h=0;for(;u<n;)Hg[u]=r.charCodeAt(s+u),Sd[u]=++u;for(;h<o;)for(a=e.charCodeAt(s+h),c=h++,l=h,u=0;u<n;u++)d=a===Hg[u]?c:c+1,c=Sd[u],l=Sd[u]=c>l?d>l?l+1:d:d>c?c+1:d;return l}class S5 extends bs{constructor(...e){super(...e),this.name="EnumValidationError"}print(){const{message:e,params:{allowedValues:t}}=this.options,n=this.getChalk(),o=this.findBestMatch();return[n`{red {bold ENUM} ${e}}`,n`{red (${t.join(", ")})}\n`].concat(this.getCodeFrame(o!==null?n`👈🏽 Did you mean {magentaBright ${o}} here?`:n`👈🏽 Unexpected value, should be equal to one of the allowed values`))}getError(){const{message:e,params:t}=this.options,n=this.findBestMatch(),o=t.allowedValues.join(", "),s={...this.getLocation(),error:`${this.getDecoratedPath()} ${e}: ${o}`,path:this.instancePath};return n!==null&&(s.suggestion=`Did you mean ${n}?`),s}findBestMatch(){const{params:{allowedValues:e}}=this.options,t=this.instancePath===""?this.data:Ic.get(this.data,this.instancePath);if(!t)return null;const n=e.map(o=>({value:o,weight:k5(o,t.toString())})).sort((o,s)=>o.weight>s.weight?1:o.weight<s.weight?-1:0)[0];return e.length===1||n.weight<n.value.length?n.value:null}}class x5 extends bs{constructor(...e){super(...e),this.name="PatternValidationError",this.options.isIdentifierLocation=!0}print(){const{message:e,params:t,propertyName:n}=this.options,o=this.getChalk();return[o`{red {bold PROPERTY} ${e}}\n`].concat(this.getCodeFrame(o`😲 must match pattern {magentaBright ${t.pattern}}`,`${this.instancePath}/${n}`))}getError(){const{params:e,propertyName:t}=this.options;return{...this.getLocation(),error:`${this.getDecoratedPath()} Property "${t}" must match pattern ${e.pattern}`,path:this.instancePath}}}class C5 extends bs{constructor(...e){super(...e),this.name="RequiredValidationError"}getLocation(e=this.instancePath){const{start:t}=super.getLocation(e);return{start:t}}print(){const{message:e,params:t}=this.options,n=this.getChalk();return[n`{red {bold REQUIRED} ${e}}\n`].concat(this.getCodeFrame(n`☹️ {magentaBright ${t.missingProperty}} is missing here!`))}getError(){const{message:e}=this.options;return{...this.getLocation(),error:`${this.getDecoratedPath()} ${e}`,path:this.instancePath}}}class E5 extends bs{constructor(...e){super(...e),this.name="UnevaluatedPropValidationError",this.options.isIdentifierLocation=!0}print(){const{message:e,params:t}=this.options,n=this.getChalk();return[n`{red {bold UNEVALUATED PROPERTY} ${e}}\n`].concat(this.getCodeFrame(n`😲 {magentaBright ${t.unevaluatedProperty}} is not expected to be here!`,`${this.instancePath}/${t.unevaluatedProperty}`))}getError(){const{params:e}=this.options;return{...this.getLocation(`${this.instancePath}/${e.unevaluatedProperty}`),error:`${this.getDecoratedPath()} Property ${e.unevaluatedProperty} is not expected to be here`,path:this.instancePath}}}const $5=/\/[\w_-]+(\/\d+)?/g;function _5(r=[]){const e={children:{}};return r.forEach(t=>{const n=typeof t.instancePath<"u"?t.instancePath:t.dataPath,o=n===""?[""]:n.match($5);o&&o.reduce((s,a,l)=>(s.children[a]=s.children[a]||{children:{},errors:[]},l===o.length-1&&s.children[a].errors.push(t),s.children[a]),e)}),e}function L1(r,e,t){Xs(r).forEach(n=>{l5(n)&&(r.errors=[n],r.children={})}),Xs(r).some(c5)&&Object.keys(r.children).length>0&&delete r.errors,r.errors&&r.errors.length&&Xs(r).every(P1)&&d5(e)(r).filter(a5).some(Xs)&&delete e.children[t],Object.entries(r.children).forEach(([n,o])=>L1(o,r,n))}function j1(r,e){const t=Xs(r);if(t.length&&t.every(P1)){const n=[...new Set(zg([])(t.map(s=>s.params.allowedValues)))],o=t[0];return[new S5({...o,params:{allowedValues:n}},e)]}return zg(t.reduce((n,o)=>{switch(o.keyword){case"additionalProperties":return n.concat(new p5(o,e));case"pattern":return n.concat(new x5(o,e));case"required":return n.concat(new C5(o,e));case"unevaluatedProperties":return n.concat(new E5(o,e));default:return n.concat(new m5(o,e))}},[]))(I1(r).map(n=>j1(n,e)))}function N5(r,e){const t=_5(r||[]);return L1(t),j1(t,e)}function A5(r,e,t,n={}){const{colorize:o=!0,format:s="cli",indent:a=null,json:l=null}=n,c=l||JSON.stringify(e,null,a),d=n5(c),u=p=>p.print().join(`
209
+ `&&(s=!0),v}function d(){return{line:n,column:o,offset:t}}function u(v){let b=HD.get(v);if(r.slice(t,t+b.length)===b)return t+=b.length-1,o+=b.length-1,{value:b,c:c()};for(let w=1;w<b.length;w++)b[w]!==r.charAt(t+w)&&y(c())}function h(v){let b=v;for(v=c();v&&v!==jg;){if(v==="\\")if(b+=v,v=c(),qu.has(v))b+=v;else if(v==="u"){b+=v;for(let w=0;w<4;w++)v=c(),JD(v)?b+=v:y(v)}else y(v);else b+=v;v=c()}return v||g(),b+=v,{value:b,c:c()}}function f(v){let b="";if(v==="-"&&(b+=v,v=c(),tn(v)||y(v)),v==="0")b+=v,v=c(),tn(v)&&y(v);else{YD(v)||y(v);do b+=v,v=c();while(tn(v))}if(v===".")do b+=v,v=c();while(tn(v));if(v==="e"||v==="E")for(b+=v,v=c(),(v==="+"||v==="-")&&(b+=v,v=c()),v||g(),tn(v)||y(v);tn(v);)b+=v,v=c();return{value:b,c:v}}function p(v){let b=v;if(v=c(),v==="/"){do b+=v,v=c();while(v&&v!=="\r"&&v!==`
210
+ `);return{value:b,c:v}}if(v===qg){for(;v;)if(b+=v,v=c(),v===qg&&(b+=v,v=c(),v===Fg))return b+=v,v=c(),{value:b,c:v};g()}y(v)}function y(v){throw new UD(v,d())}function g(){throw new KD(d())}let m=c();for(;t<r.length;){for(;GD(m);)m=c();if(!m)break;const v=d();if(kd.has(m))a.push(l(kd.get(m),m,v)),m=c();else if(XD(m)){const b=u(m);let w=b.value;m=b.c,a.push(l(kd.get(w),w,v))}else if(QD(m)){const b=f(m);let w=b.value;m=b.c,a.push(l("Number",w,v))}else if(m===jg){const b=h(m);let w=b.value;m=b.c,a.push(l("String",w,v))}else if(m===Fg&&e.mode==="jsonc"){const b=p(m);let w=b.value;m=b.c,a.push(l(w.startsWith("//")?"LineComment":"BlockComment",w,v,d()))}else y(m)}return a}const _r={document(r,e={}){return{type:"Document",body:r,...e}},string(r,e={}){return{type:"String",value:r,...e}},number(r,e={}){return{type:"Number",value:r,...e}},boolean(r,e={}){return{type:"Boolean",value:r,...e}},null(r={}){return{type:"Null",...r}},array(r,e={}){return{type:"Array",elements:r,...e}},element(r,e={}){return{type:"Element",value:r,...e}},object(r,e={}){return{type:"Object",members:r,...e}},member(r,e,t={}){return{type:"Member",name:r,value:e,...t}}},e5={mode:"json",ranges:!1,tokens:!1};function t5(r,e){let t="",n=r.indexOf("\\"),o=0;for(;n>=0;){t+=r.slice(o,n);const s=r.charAt(n+1);if(qu.has(s))t+=qu.get(s),o=n+2;else if(s==="u"){const a=r.slice(n+2,n+6);if(a.length<4||/[^0-9a-f]/i.test(a))throw new Oi(`Invalid unicode escape \\u${a}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});t+=String.fromCharCode(parseInt(a,16)),o=n+6}else throw new Oi(`Invalid escape \\${s}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});n=r.indexOf("\\",o)}return t+=r.slice(o),t}function r5(r,e){switch(e.type){case"Boolean":return r==="true";case"Number":return Number(r);case"String":return t5(r.slice(1,-1),e);default:throw new TypeError(`Unknown token type "${e.type}.`)}}function n5(r,e){e=Object.freeze({...e5,...e});const t=ZD(r,{mode:e.mode,ranges:e.ranges});let n=0;function o(){return t[n++]}function s(){const b=t[n++];return b&&b.type.endsWith("Comment")?s():b}const a=e.mode==="jsonc"?s:o;function l(b,w){if(!b||b.type!==w)throw new Sd(b)}function c(b,w){return e.ranges?{range:[b.offset,w.offset]}:void 0}function d(b){const w=c(b.loc.start,b.loc.end),S=r5(r.slice(b.loc.start.offset,b.loc.end.offset),b),x={loc:{start:{...b.loc.start},end:{...b.loc.end}},...w};switch(b.type){case"String":return _r.string(S,x);case"Number":return _r.number(S,x);case"Boolean":return _r.boolean(S,x);default:throw new TypeError(`Unknown token type ${b.type}.`)}}function u(b){const w=c(b.loc.start,b.loc.end);return _r.null({loc:{start:{...b.loc.start},end:{...b.loc.end}},...w})}function h(b){l(b,"String");const w=d(b);b=a(),l(b,"Colon");const S=y(),x=c(w.loc.start,S.loc.end);return _r.member(w,S,{loc:{start:{...w.loc.start},end:{...S.loc.end}},...x})}function f(b){l(b,"LBrace");const w=[];let S=a();if(S&&S.type!=="RBrace")do if(w.push(h(S)),S=a(),S.type==="Comma")S=a();else break;while(S);l(S,"RBrace");const x=c(b.loc.start,S.loc.end);return _r.object(w,{loc:{start:{...b.loc.start},end:{...S.loc.end}},...x})}function p(b){l(b,"LBracket");const w=[];let S=a();if(S&&S.type!=="RBracket")do{const k=y(S);if(w.push(_r.element(k,{loc:k.loc})),S=a(),S.type==="Comma")S=a();else break}while(S);l(S,"RBracket");const x=c(b.loc.start,S.loc.end);return _r.array(w,{loc:{start:{...b.loc.start},end:{...S.loc.end}},...x})}function y(b){switch(b=b||a(),b.type){case"String":case"Boolean":case"Number":return d(b);case"Null":return u(b);case"LBrace":return f(b);case"LBracket":return p(b);default:throw new Sd(b)}}const g=y(),m=a();if(m)throw new Sd(m);const v={loc:{start:{line:1,column:1,offset:0},end:{...g.loc.end}}};return e.tokens&&(v.tokens=t),e.ranges&&(v.range=[v.loc.start.offset,v.loc.end.offset]),_r.document(g,v)}const o5=r=>e=>r===e,s5=r=>e=>!r(e),i5=r=>Object.values(r),a5=r=>r!==void 0,jf=r=>e=>e.keyword===r,l5=jf("required"),c5=jf("anyOf"),P1=jf("enum"),Xs=r=>r&&r.errors||[],I1=r=>r&&i5(r.children)||[],d5=r=>e=>I1(r).filter(s5(o5(e))),zg=r=>e=>e.reduce((t,n)=>t.concat(n),r),M1=r=>{const e=r.split("/").slice(1);for(const t in e)e[t]=e[t].split("~1").join("/").split("~0").join("~");return e};function u5(r,e,t){const n=M1(e),o=n.length-1;return n.reduce((s,a,l)=>{switch(s==null?void 0:s.type){case"Object":{const c=s.members.filter(h=>h.name.value===a);if(c.length!==1)throw new Error(`Couldn't find property ${a} of ${e}`);const{name:d,value:u}=c[0];return t&&l===o?d:u}case"Array":return s.elements[a];default:if(s.loc)return s}},r.body)}function h5(r){if(!r||!r.elements)return"";const e=r.elements.filter(t=>t&&t.name&&t.name.value==="type");return e.length&&e[0].value&&`:${e[0].value.value}`||""}function f5(r,e){let t="";return M1(e).reduce((n,o)=>{switch(n==null?void 0:n.type){case"Object":{t+=`/${o}`;const s=n.members.filter(a=>a.name.value===o);if(s.length!==1)throw new Error(`Couldn't find property ${o} of ${e}`);return s[0].value}case"Array":return t+=`/${o}${h5(n.elements[o])}`,n.elements[o]}},r.body),t}class bs{constructor(e={isIdentifierLocation:!1},{colorize:t,data:n,schema:o,jsonAst:s,jsonRaw:a}){this.options=e,this.colorize=!!(t||t===void 0),this.data=n,this.schema=o,this.jsonAst=s,this.jsonRaw=a}getChalk(){return this.colorize?chalk:new chalk.Instance({level:0})}getLocation(e=this.instancePath){const{isIdentifierLocation:t,isSkipEndLocation:n}=this.options,{loc:o}=u5(this.jsonAst,e,t);return{start:o.start,end:n?void 0:o.end}}getDecoratedPath(e=this.instancePath){return f5(this.jsonAst,e)}getCodeFrame(e,t=this.instancePath){return codeFrameColumns(this.jsonRaw,this.getLocation(t),{highlightCode:!1,message:e})}get instancePath(){return typeof this.options.instancePath<"u"?this.options.instancePath:this.options.dataPath}print(){throw new Error(`Implement the 'print' method inside ${this.constructor.name}!`)}getError(){throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)}}class p5 extends bs{constructor(...e){super(...e),this.name="AdditionalPropValidationError",this.options.isIdentifierLocation=!0}print(){const{message:e,params:t}=this.options,n=this.getChalk();return[n`{red {bold ADDITIONAL PROPERTY} ${e}}\n`].concat(this.getCodeFrame(n`😲 {magentaBright ${t.additionalProperty}} is not expected to be here!`,`${this.instancePath}/${t.additionalProperty}`))}getError(){const{params:e}=this.options;return{...this.getLocation(`${this.instancePath}/${e.additionalProperty}`),error:`${this.getDecoratedPath()} Property ${e.additionalProperty} is not expected to be here`,path:this.instancePath}}}class m5 extends bs{constructor(...e){super(...e),this.name="DefaultValidationError",this.options.isSkipEndLocation=!0}print(){const{keyword:e,message:t}=this.options,n=this.getChalk();return[n`{red {bold ${e.toUpperCase()}} ${t}}\n`].concat(this.getCodeFrame(n`👈🏽 {magentaBright ${e}} ${t}`))}getError(){const{keyword:e,message:t}=this.options;return{...this.getLocation(),error:`${this.getDecoratedPath()}: ${e} ${t}`,path:this.instancePath}}}var Mc={},g5=/~/,y5=/~[01]/g;function v5(r){switch(r){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+r)}function D1(r){return g5.test(r)?r.replace(y5,v5):r}function b5(r,e,t){for(var n,o,s=1,a=e.length;s<a;){if(e[s]==="constructor"||e[s]==="prototype"||e[s]==="__proto__")return r;if(n=D1(e[s++]),o=a>s,typeof r[n]>"u"&&(Array.isArray(r)&&n==="-"&&(n=r.length),o&&(e[s]!==""&&e[s]<1/0||e[s]==="-"?r[n]=[]:r[n]={})),!o)break;r=r[n]}var l=r[n];return t===void 0?delete r[n]:r[n]=t,l}function Ff(r){if(typeof r=="string"){if(r=r.split("/"),r[0]==="")return r;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(r)){for(const e of r)if(typeof e!="string"&&typeof e!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return r}throw new Error("Invalid JSON pointer.")}function V1(r,e){if(typeof r!="object")throw new Error("Invalid input object.");e=Ff(e);var t=e.length;if(t===1)return r;for(var n=1;n<t;){if(r=r[D1(e[n++])],t===n)return r;if(typeof r!="object"||r===null)return}}function R1(r,e,t){if(typeof r!="object")throw new Error("Invalid input object.");if(e=Ff(e),e.length===0)throw new Error("Invalid JSON pointer for set.");return b5(r,e,t)}function w5(r){var e=Ff(r);return{get:function(t){return V1(t,e)},set:function(t,n){return R1(t,e,n)}}}Mc.get=V1;Mc.set=R1;Mc.compile=w5;const xd=[],Hg=[];function k5(r,e){if(r===e)return 0;const t=r;r.length>e.length&&(r=e,e=t);let n=r.length,o=e.length;for(;n>0&&r.charCodeAt(~-n)===e.charCodeAt(~-o);)n--,o--;let s=0;for(;s<n&&r.charCodeAt(s)===e.charCodeAt(s);)s++;if(n-=s,o-=s,n===0)return o;let a,l,c,d,u=0,h=0;for(;u<n;)Hg[u]=r.charCodeAt(s+u),xd[u]=++u;for(;h<o;)for(a=e.charCodeAt(s+h),c=h++,l=h,u=0;u<n;u++)d=a===Hg[u]?c:c+1,c=xd[u],l=xd[u]=c>l?d>l?l+1:d:d>c?c+1:d;return l}class S5 extends bs{constructor(...e){super(...e),this.name="EnumValidationError"}print(){const{message:e,params:{allowedValues:t}}=this.options,n=this.getChalk(),o=this.findBestMatch();return[n`{red {bold ENUM} ${e}}`,n`{red (${t.join(", ")})}\n`].concat(this.getCodeFrame(o!==null?n`👈🏽 Did you mean {magentaBright ${o}} here?`:n`👈🏽 Unexpected value, should be equal to one of the allowed values`))}getError(){const{message:e,params:t}=this.options,n=this.findBestMatch(),o=t.allowedValues.join(", "),s={...this.getLocation(),error:`${this.getDecoratedPath()} ${e}: ${o}`,path:this.instancePath};return n!==null&&(s.suggestion=`Did you mean ${n}?`),s}findBestMatch(){const{params:{allowedValues:e}}=this.options,t=this.instancePath===""?this.data:Mc.get(this.data,this.instancePath);if(!t)return null;const n=e.map(o=>({value:o,weight:k5(o,t.toString())})).sort((o,s)=>o.weight>s.weight?1:o.weight<s.weight?-1:0)[0];return e.length===1||n.weight<n.value.length?n.value:null}}class x5 extends bs{constructor(...e){super(...e),this.name="PatternValidationError",this.options.isIdentifierLocation=!0}print(){const{message:e,params:t,propertyName:n}=this.options,o=this.getChalk();return[o`{red {bold PROPERTY} ${e}}\n`].concat(this.getCodeFrame(o`😲 must match pattern {magentaBright ${t.pattern}}`,`${this.instancePath}/${n}`))}getError(){const{params:e,propertyName:t}=this.options;return{...this.getLocation(),error:`${this.getDecoratedPath()} Property "${t}" must match pattern ${e.pattern}`,path:this.instancePath}}}class C5 extends bs{constructor(...e){super(...e),this.name="RequiredValidationError"}getLocation(e=this.instancePath){const{start:t}=super.getLocation(e);return{start:t}}print(){const{message:e,params:t}=this.options,n=this.getChalk();return[n`{red {bold REQUIRED} ${e}}\n`].concat(this.getCodeFrame(n`☹️ {magentaBright ${t.missingProperty}} is missing here!`))}getError(){const{message:e}=this.options;return{...this.getLocation(),error:`${this.getDecoratedPath()} ${e}`,path:this.instancePath}}}class E5 extends bs{constructor(...e){super(...e),this.name="UnevaluatedPropValidationError",this.options.isIdentifierLocation=!0}print(){const{message:e,params:t}=this.options,n=this.getChalk();return[n`{red {bold UNEVALUATED PROPERTY} ${e}}\n`].concat(this.getCodeFrame(n`😲 {magentaBright ${t.unevaluatedProperty}} is not expected to be here!`,`${this.instancePath}/${t.unevaluatedProperty}`))}getError(){const{params:e}=this.options;return{...this.getLocation(`${this.instancePath}/${e.unevaluatedProperty}`),error:`${this.getDecoratedPath()} Property ${e.unevaluatedProperty} is not expected to be here`,path:this.instancePath}}}const $5=/\/[\w_-]+(\/\d+)?/g;function _5(r=[]){const e={children:{}};return r.forEach(t=>{const n=typeof t.instancePath<"u"?t.instancePath:t.dataPath,o=n===""?[""]:n.match($5);o&&o.reduce((s,a,l)=>(s.children[a]=s.children[a]||{children:{},errors:[]},l===o.length-1&&s.children[a].errors.push(t),s.children[a]),e)}),e}function L1(r,e,t){Xs(r).forEach(n=>{l5(n)&&(r.errors=[n],r.children={})}),Xs(r).some(c5)&&Object.keys(r.children).length>0&&delete r.errors,r.errors&&r.errors.length&&Xs(r).every(P1)&&d5(e)(r).filter(a5).some(Xs)&&delete e.children[t],Object.entries(r.children).forEach(([n,o])=>L1(o,r,n))}function j1(r,e){const t=Xs(r);if(t.length&&t.every(P1)){const n=[...new Set(zg([])(t.map(s=>s.params.allowedValues)))],o=t[0];return[new S5({...o,params:{allowedValues:n}},e)]}return zg(t.reduce((n,o)=>{switch(o.keyword){case"additionalProperties":return n.concat(new p5(o,e));case"pattern":return n.concat(new x5(o,e));case"required":return n.concat(new C5(o,e));case"unevaluatedProperties":return n.concat(new E5(o,e));default:return n.concat(new m5(o,e))}},[]))(I1(r).map(n=>j1(n,e)))}function N5(r,e){const t=_5(r||[]);return L1(t),j1(t,e)}function A5(r,e,t,n={}){const{colorize:o=!0,format:s="cli",indent:a=null,json:l=null}=n,c=l||JSON.stringify(e,null,a),d=n5(c),u=p=>p.print().join(`
211
211
  `),h=p=>p.getError(),f=N5(t,{colorize:o,data:e,schema:r,jsonAst:d,jsonRaw:c});return s==="cli"?f.map(u).join(`
212
212
 
213
- `):f.map(h)}function Qs(r,e){return typeof e=="string"?[{start:{line:1,column:1,offset:0},error:e,path:""}]:A5(r,null,e,{format:"js",indent:2,colorize:!1}).map(t=>(t.error=t.error.trim(),t))}function O5(r){try{return A1(r),{valid:!0}}catch(e){return{valid:!1,errors:Qs(r,e.message)}}}class Ff{constructor(){Yr(this,"version"),Yr(this,"ajvValidators",{}),Yr(this,"externalRefs",{}),Yr(this,"errors"),Yr(this,"specificationVersion"),Yr(this,"specificationType"),Yr(this,"specification")}resolveReferences(e){return A1(e.find(t=>t.isEntrypoint===!0).specification)}async validate(e){var t;const n=e.find(s=>s.isEntrypoint),o=n==null?void 0:n.specification;this.specification=o,(t=this.specification)!=null&&t.info&&!this.specification.info.version&&(this.specification.info.version="0.0.1");try{if(o==null)return{valid:!1,errors:Qs(n,Iu.EMPTY_OR_INVALID)};Object.keys(this.externalRefs).length>0&&(o[gM]=this.externalRefs);const{version:s,specificationType:a,specificationVersion:l}=N1(o);if(this.version=s,this.specificationVersion=l,this.specificationType=a,!s)return{valid:!1,errors:Qs(n,Iu.OPENAPI_VERSION_NOT_SUPPORTED)};const c=await this.getAjvValidator(s);return c(o)?O5(n.specification):c.errors&&c.errors.length>0?{valid:!1,errors:Qs(n,c.errors)}:{valid:!1}}catch(s){return{valid:!1,errors:Qs(n,s.message??s)}}}async getAjvValidator(e){if(this.ajvValidators[e])return this.ajvValidators[e];const t=await $N(Object.assign({"../../../schemas/v2.0/schema.json":()=>Promise.resolve().then(()=>require("./schema-BQQoKgNw-CyFt8nZw.cjs")),"../../../schemas/v3.0/schema.json":()=>Promise.resolve().then(()=>require("./schema-BjykgtPd-C_N_PTsi.cjs")),"../../../schemas/v3.1/schema.json":()=>Promise.resolve().then(()=>require("./schema-ZROhtp0X-DL6m5HXA.cjs"))}),`../../../schemas/v${e}/schema.json`),n=mM[t.$schema],o=new n({strict:!1});return wB(o),e==="3.1"&&o.addFormat("media-range",!0),this.ajvValidators[e]=o.compile(t)}}Yr(Ff,"supportedVersions",Bb);function T5(){return{load:B5}}function B5(r){const e=$1(r);return{get:()=>e,details:()=>Dc(e),filter:t=>Yi(e,t),upgrade:()=>F1(e),validate:()=>qf(e),resolve:()=>Mc(e),toJson:()=>Xi(e),toYaml:()=>Qi(e)}}function F1(r){const e=PD(r);return{get:()=>e,details:()=>Dc(e),filter:t=>Yi(e,t),validate:()=>qf(e),resolve:()=>Mc(e),toJson:()=>Xi(e),toYaml:()=>Qi(e)}}async function qf(r){return{...await ID(r),filter:e=>Yi(r,e),get:()=>r,details:()=>Dc(r),resolve:()=>Mc(r),toJson:()=>Xi(r),toYaml:()=>Qi(r)}}async function Mc(r){return{...await ND(r),filter:e=>Yi(r,e),toJson:()=>Xi(r),toYaml:()=>Qi(r)}}function Yi(r,e){const t=yM(r,e);return{get:()=>t,details:()=>Dc(t),filter:()=>Yi(t,e),upgrade:()=>F1(t),validate:()=>qf(t),resolve:()=>Mc(t),toJson:()=>Xi(t),toYaml:()=>Qi(t)}}function Dc(r){return N1(r)}function Xi(r){return AD(r)}function Qi(r){return OD(r)}const q1=r=>new Promise(async(e,t)=>{var n;try{if(!r)return e(Ra(Un()));const{schema:o,errors:s}=await T5().load(r).resolve();return s!=null&&s.length&&console.warn(`Please open an issue on https://github.com/scalar/scalar
213
+ `):f.map(h)}function Qs(r,e){return typeof e=="string"?[{start:{line:1,column:1,offset:0},error:e,path:""}]:A5(r,null,e,{format:"js",indent:2,colorize:!1}).map(t=>(t.error=t.error.trim(),t))}function O5(r){try{return A1(r),{valid:!0}}catch(e){return{valid:!1,errors:Qs(r,e.message)}}}class qf{constructor(){Yr(this,"version"),Yr(this,"ajvValidators",{}),Yr(this,"externalRefs",{}),Yr(this,"errors"),Yr(this,"specificationVersion"),Yr(this,"specificationType"),Yr(this,"specification")}resolveReferences(e){return A1(e.find(t=>t.isEntrypoint===!0).specification)}async validate(e){var t;const n=e.find(s=>s.isEntrypoint),o=n==null?void 0:n.specification;this.specification=o,(t=this.specification)!=null&&t.info&&!this.specification.info.version&&(this.specification.info.version="0.0.1");try{if(o==null)return{valid:!1,errors:Qs(n,Mu.EMPTY_OR_INVALID)};Object.keys(this.externalRefs).length>0&&(o[gM]=this.externalRefs);const{version:s,specificationType:a,specificationVersion:l}=N1(o);if(this.version=s,this.specificationVersion=l,this.specificationType=a,!s)return{valid:!1,errors:Qs(n,Mu.OPENAPI_VERSION_NOT_SUPPORTED)};const c=await this.getAjvValidator(s);return c(o)?O5(n.specification):c.errors&&c.errors.length>0?{valid:!1,errors:Qs(n,c.errors)}:{valid:!1}}catch(s){return{valid:!1,errors:Qs(n,s.message??s)}}}async getAjvValidator(e){if(this.ajvValidators[e])return this.ajvValidators[e];const t=await $N(Object.assign({"../../../schemas/v2.0/schema.json":()=>Promise.resolve().then(()=>require("./schema-BQQoKgNw-CyFt8nZw.cjs")),"../../../schemas/v3.0/schema.json":()=>Promise.resolve().then(()=>require("./schema-BjykgtPd-C_N_PTsi.cjs")),"../../../schemas/v3.1/schema.json":()=>Promise.resolve().then(()=>require("./schema-ZROhtp0X-DL6m5HXA.cjs"))}),`../../../schemas/v${e}/schema.json`),n=mM[t.$schema],o=new n({strict:!1});return wB(o),e==="3.1"&&o.addFormat("media-range",!0),this.ajvValidators[e]=o.compile(t)}}Yr(qf,"supportedVersions",Bb);function T5(){return{load:B5}}function B5(r){const e=$1(r);return{get:()=>e,details:()=>Vc(e),filter:t=>Yi(e,t),upgrade:()=>F1(e),validate:()=>zf(e),resolve:()=>Dc(e),toJson:()=>Xi(e),toYaml:()=>Qi(e)}}function F1(r){const e=PD(r);return{get:()=>e,details:()=>Vc(e),filter:t=>Yi(e,t),validate:()=>zf(e),resolve:()=>Dc(e),toJson:()=>Xi(e),toYaml:()=>Qi(e)}}async function zf(r){return{...await ID(r),filter:e=>Yi(r,e),get:()=>r,details:()=>Vc(r),resolve:()=>Dc(r),toJson:()=>Xi(r),toYaml:()=>Qi(r)}}async function Dc(r){return{...await ND(r),filter:e=>Yi(r,e),toJson:()=>Xi(r),toYaml:()=>Qi(r)}}function Yi(r,e){const t=yM(r,e);return{get:()=>t,details:()=>Vc(t),filter:()=>Yi(t,e),upgrade:()=>F1(t),validate:()=>zf(t),resolve:()=>Dc(t),toJson:()=>Xi(t),toYaml:()=>Qi(t)}}function Vc(r){return N1(r)}function Xi(r){return AD(r)}function Qi(r){return OD(r)}const q1=r=>new Promise(async(e,t)=>{var n;try{if(!r)return e(Ra(Un()));const{schema:o,errors:s}=await T5().load(r).resolve();return s!=null&&s.length&&console.warn(`Please open an issue on https://github.com/scalar/scalar
214
214
  `,`Scalar OpenAPI Parser Warning:
215
- `,s),o===void 0?(t(((n=s==null?void 0:s[0])==null?void 0:n.error)??"Failed to parse the OpenAPI file."),e(Ra(Un()))):e(Ra(o))}catch(o){t(o)}return e(Ra(Un()))}),Ra=r=>{let e={};r&&typeof r=="object"?e=structuredClone(r):e=Un(),e.tags||(e.tags=[]),e.paths||(e.paths={});const t={};return Object.keys(e.webhooks??{}).forEach(o=>{var s;Object.keys(((s=e.webhooks)==null?void 0:s[o])??{}).forEach(a=>{var c,d,u;const l=(c=e.webhooks)==null?void 0:c[o][a];(l==null?void 0:l["x-internal"])!==!0&&(t[o]===void 0&&(t[o]={}),t[o][a]={httpVerb:a,path:o,operationId:(l==null?void 0:l.operationId)||o,name:(l==null?void 0:l.summary)||o||"",description:(l==null?void 0:l.description)||"",pathParameters:(u=(d=e.paths)==null?void 0:d[o])==null?void 0:u.parameters,information:{...l}})})}),Object.keys(e.paths).forEach(o=>{Object.keys(e.paths[o]).filter(a=>oh.includes(a.toUpperCase())).forEach(a=>{var d,u,h,f,p,y;const l=e.paths[o][a];if(l===void 0||l["x-internal"]===!0)return;const c={httpVerb:a,path:o,operationId:l.operationId||o,name:l.summary||o||"",description:l.description||"",information:{...l},pathParameters:(u=(d=e.paths)==null?void 0:d[o])==null?void 0:u.parameters};if(!l.tags||l.tags.length===0){(h=e.tags)!=null&&h.find(m=>m.name==="default")||(f=e.tags)==null||f.push({name:"default",description:"",operations:[]});const g=(p=e.tags)==null?void 0:p.findIndex(m=>m.name==="default");g>=0&&((y=e.tags[g])==null||y.operations.push(c))}else l.tags.forEach(g=>{var b,w,S;const m=(b=e.tags)==null?void 0:b.findIndex(x=>x.name===g);m===-1&&((w=e.tags)==null||w.push({name:g,description:""}));const v=m!==-1?m:e.tags.length-1;typeof((S=e.tags[v])==null?void 0:S.operations)>"u"&&(e.tags[v].operations=[]),e.tags[v].operations.push(c)})})}),{...e,webhooks:t}},Vc=Symbol(),zf=Symbol(),Ti=async r=>{var e;(e=document.getElementById(r))==null||e.scrollIntoView()},wr=r=>new Promise(e=>setTimeout(e,r)),P5=Symbol("downloadSpec"),Hf=Xe.useEventBus(P5);function z1(r,e){const t=m0(r),n=t?new Blob([r],{type:"application/json"}):new Blob([r],{type:"application/x-yaml"}),o=URL.createObjectURL(n),s=t?".json":".yaml",a="spec"+s,l=e?e+s:a,c=document.createElement("a");c.href=o,c.download=l,c.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{window.URL.revokeObjectURL(o),c.remove()},100)}function H1(r,e=1){const t=new RegExp(`^(?=#{${e}} )`,"m");return r.split(t).map(n=>n.trim()).filter(Boolean)}const ws=()=>{const{toast:r}=Eh();return{copyToClipboard:t=>{navigator.clipboard.writeText(t).then(()=>{r("Copied to the clipboard","info")})}}},Jr=i.ref(!1);function I5(r){var o;const e=()=>{var a,l;const s=typeof window<"u"?(a=window.localStorage)==null?void 0:a.getItem("isDark"):null;return typeof s=="string"?!!JSON.parse(s):!!(typeof window<"u"&&((l=window==null?void 0:window.matchMedia("(prefers-color-scheme: dark)"))!=null&&l.matches))},t=()=>{var s;Jr.value=!Jr.value,typeof window<"u"&&((s=window==null?void 0:window.localStorage)==null||s.setItem("isDark",JSON.stringify(Jr.value)))};function n(s){var a;Jr.value=s,typeof window<"u"&&((a=window==null?void 0:window.localStorage)==null||a.setItem("isDark",JSON.stringify(Jr.value)))}return Jr.value=(typeof window>"u"?null:JSON.parse(((o=window.localStorage)==null?void 0:o.getItem("isDark"))||"null"))??r??e(),i.watch(Jr,s=>{typeof document>"u"||(document.body.classList.toggle("dark-mode",s),document.body.classList.toggle("light-mode",!s))},{immediate:!0}),{isDark:Jr,toggleDarkMode:t,setDarkMode:n}}const Ug="https://api.scalar.com/request-proxy",La="https://proxy.scalar.com",M5="http://localhost:5051";function D5(r){i.watch(()=>r,()=>{var e;r.proxy===Ug?(console.warn(`[DEPRECATED] Warning: configuration.proxy points to our old proxy (${Ug}).`),console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${La}) instead.`),r.proxy=La,console.warn(`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${La}). Read more: https://github.com/scalar/scalar`)):(e=r.proxy)!=null&&e.length&&r.proxy!==La&&r.proxy!==M5&&(console.warn(`[DEPRECATED] Warning: configuration.proxy points to a custom proxy (${r==null?void 0:r.proxy}).`),console.warn("[DEPRECATED] Action Required: You need to use our new proxy (written in Go). Read more: https://github.com/scalar/scalar/tree/main/examples/proxy-server"))},{immediate:!0})}const Uf=i.ref(ts.hash??""),Dl=i.ref(),V5=i.ref(!1),R5=r=>r.slug?`description/${r.slug}`:"",U1=r=>{var t;if(!Dl.value)return"";const e=new RegExp("^"+((t=Dl.value)==null?void 0:t.basePath)+"/?");return decodeURIComponent(r.replace(e,""))},L5=(r,e)=>{if(!r)return"webhooks";const t=Pi.slug(r),n=encodeURIComponent(t);return`webhook/${e}/${n}`},j5=r=>{if(!r)return"models";const e=Pi.slug(r);return`model/${encodeURIComponent(e)}`},F5=(r,e)=>`${K1(e)}/${r.httpVerb}${r.path}`,K1=({name:r})=>{const e=Pi.slug(r);return`tag/${encodeURIComponent(e)}`},q5=(r=Uf.value)=>{var n;const e=(n=r.match(/(tag\/[^/]+)/))==null?void 0:n[0],t=r.startsWith("model")?"models":"";return e??t},z5=()=>{Uf.value=Dl.value?U1(window.location.pathname):decodeURIComponent(window.location.hash.replace(/^#/,""))},ct=()=>({hash:Uf,getWebhookId:L5,getModelId:j5,getHeadingId:R5,getOperationId:F5,getPathRoutingId:U1,getSectionId:q5,getTagId:K1,isIntersectionEnabled:V5,pathRouting:Dl,updateHash:z5});function Kf(r){return{parameterMap:i.computed(()=>{var o;const t=((o=r.operation.information)==null?void 0:o.parameters)??[],n={path:[],query:[],header:[],body:[],formData:[]};return r.operation.pathParameters&&r.operation.pathParameters.forEach(s=>{s.in==="path"?n.path.push(s):s.in==="query"?n.query.push(s):s.in==="header"?n.header.push(s):s.in==="body"?n.body.push(s):s.in==="formData"&&n.formData.push(s)}),t&&t.forEach(s=>{s.in==="path"?n.path.push(s):s.in==="query"?n.query.push(s):s.in==="header"?n.header.push(s):s.in==="body"?n.body.push(s):s.in==="formData"&&n.formData.push(s)}),n})}}const H5=async({url:r,content:e},t)=>{if(r)return Gv(r)?await bp(r,t):await bp(r);const n=typeof e=="function"?e():e;if(typeof n=="string")return n;if(typeof n=="object")return fi(n)};function W1({specConfig:r,proxy:e}){const t=i.ref(""),n=i.reactive(Un()),o=i.ref(null);function s(a){return a?q1(a).then(l=>{o.value=null,Object.assign(n,{servers:[],...l})}).catch(l=>{o.value=l.toString()}):Object.assign(n,Un())}return i.watch(()=>i.toValue(r),async a=>{var l;if(a){const c=(l=await H5(a,i.toValue(e)))==null?void 0:l.trim();typeof c=="string"&&(t.value=c)}},{immediate:!0,deep:!0}),i.watch(t,()=>{s(t.value)}),{rawSpec:t,parsedSpec:n,specErrors:o}}function Wf(r){return{responses:i.computed(()=>{if(!r.information)return[];const{responses:t}=r.information,n=[];return t&&Object.keys(t).forEach(o=>{n.push({name:o,description:t[o].description})}),n})}}const{getHeadingId:Kg,getModelId:Wg,getOperationId:Gg,getSectionId:U5,getTagId:G1,getWebhookId:xd,hash:qu}=ct(),Je=i.ref(void 0);function K5(r){return Je.value=r}const J1=i.ref(!1),Vl=i.reactive(ts["useSidebarContent-collapsedSidebarItems"]??{});function W5(r){Vl[r]=!Vl[r]}function Cd(r,e){Vl[r]=e}const Rl=i.ref([]),G5=async r=>{const e=await Ei(r),t=rc(e);return e.filter(n=>n.depth===t||n.depth===t+1)},Y1=i.computed(()=>{var h,f,p,y,g,m,v,b,w,S;const{state:r}=jl(),e={},{openApi:{globalSecurity:t}}=rh(),n=[];let o=null;Rl.value.forEach(x=>{var k;x.depth===rc(Rl.value)?(o={id:Kg(x),title:x.value,show:!r.showApiClient,children:[]},n.push(o)):o&&((k=o.children)==null||k.push({id:Kg(x),title:x.value,show:!r.showApiClient}))});const s=(f=(h=Je.value)==null?void 0:h.tags)==null?void 0:f[0],l=s&&(x=>(x==null?void 0:x.length)!==1||x[0].name!=="default"||x[0].description!=="")((p=Je.value)==null?void 0:p.tags)?(g=(y=Je.value)==null?void 0:y.tags)==null?void 0:g.filter(x=>{var k;return((k=x.operations)==null?void 0:k.length)>0}).map(x=>{var k;return{id:G1(x),title:x.name,displayTitle:x["x-displayName"]??x.name,show:!0,children:(k=x.operations)==null?void 0:k.map(C=>{var M;const N=Gg(C,x),P=C.name??C.path;return e[N]=P,{id:N,title:P,httpVerb:C.httpVerb,deprecated:((M=C.information)==null?void 0:M.deprecated)??!1,show:!0,select:()=>{r.showApiClient&&$l(C,t)}}})}}):(m=s==null?void 0:s.operations)==null?void 0:m.map(x=>{var N;const k=Gg(x,s),C=x.name??x.path;return e[k]=C,{id:k,title:C,httpVerb:x.httpVerb,deprecated:((N=x.information)==null?void 0:N.deprecated)??!1,show:!0,select:()=>{r.showApiClient&&$l(x,t)}}}),c=Ph(Je.value)&&!J1.value?[{id:Wg(),title:"Models",show:!r.showApiClient,children:Object.keys(Jt(Je.value)??{}).map(x=>{var C;const k=Wg(x);return e[k]=x,{id:k,title:((C=Jt(Je.value))==null?void 0:C[x]).title??x,show:!r.showApiClient}})}]:[],d=(v=Je.value)!=null&&v["x-tagGroups"]?(w=(b=Je.value)==null?void 0:b["x-tagGroups"])==null?void 0:w.map(x=>{const k=[];return x.tags.map(N=>{if(N==="models"&&c.length>0)k.push(c[0]);else{const P=l==null?void 0:l.find(M=>M.title===N);P&&k.push(P)}}),{id:x.name,title:x.name,children:k,show:!0,isGroup:!0}}):void 0,u=Wv(Je.value)?[{id:xd(),title:"Webhook",show:!r.showApiClient,children:Object.keys(((S=Je.value)==null?void 0:S.webhooks)??{}).map(x=>{var C,N;const k=xd(x);return e[k]=x,Object.keys(((N=(C=Je.value)==null?void 0:C.webhooks)==null?void 0:N[x])??{}).map(P=>{var M,j,I;return{id:xd(x,P),title:(I=(j=(M=Je.value)==null?void 0:M.webhooks)==null?void 0:j[x][P])==null?void 0:I.name,httpVerb:P,show:!r.showApiClient}})}).flat()}]:[];return{entries:[...n,...d??l??[],...d?[]:u,...d?[]:c],titles:e}}),J5=i.ref(!1),Y5=i.computed(()=>{var r,e;return((e=(r=Y1.value)==null?void 0:r.titles)==null?void 0:e[qu.value])??""});function tr(r){return r!=null&&r.parsedSpec&&(Je.value=r.parsedSpec,i.watch(()=>{var e,t;return(t=(e=Je.value)==null?void 0:e.tags)==null?void 0:t.length},()=>{var e,t;if(qu.value){const n=U5(qu.value);n&&Cd(n,!0)}else{const n=(t=(e=Je.value)==null?void 0:e.tags)==null?void 0:t[0];n&&Cd(G1(n),!0)}}),i.watch(()=>{var e,t;return(t=(e=Je.value)==null?void 0:e.info)==null?void 0:t.description},async()=>{var t,n;const e=(n=(t=Je.value)==null?void 0:t.info)==null?void 0:n.description;return e?Rl.value=await G5(e):Rl.value=[]})),{breadcrumb:Y5,items:Y1,isSidebarOpen:J5,collapsedSidebarItems:Vl,toggleCollapsedSidebarItem:W5,setCollapsedSidebarItem:Cd,hideModels:J1,setParsedSpec:K5}}const X5=i.defineComponent({__name:"SidebarHttpBadge",props:{active:{type:Boolean},method:{}},setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(oo),{class:i.normalizeClass(["sidebar-heading-type",{"sidebar-heading-type-active":e.active}]),method:e.method,property:"--method-color",short:""},null,8,["class","method"]))}}),X1=U(X5,[["__scopeId","data-v-9e6d2bc7"]]),Q5=["id"],Z5={key:0,class:"sidebar-heading-chevron"},eV=["href"],tV={class:"sidebar-heading-link-title"},rV={key:1,class:"sidebar-heading-link-method"},nV={key:1,class:"action-menu"},oV=i.defineComponent({__name:"SidebarElement",props:{id:{},item:{},isActive:{type:Boolean},hasChildren:{type:Boolean},open:{type:Boolean}},emits:["toggleOpen"],setup(r,{emit:e}){const t=r,n=e,{hash:o,isIntersectionEnabled:s,pathRouting:a}=ct(),l=async()=>{var u,h;t.hasChildren&&n("toggleOpen"),(h=(u=t.item)==null?void 0:u.select)==null||h.call(u),t.open&&(s.value=!1,await wr(100),s.value=!0)},c=()=>{if(a.value)return a.value.basePath+"/"+t.item.id;{const u=new URL(window.location.href);return u.hash=t.item.id,`${u.pathname}${u.search}${u.hash}`}},d=async u=>{var h,f;if(a.value){u.preventDefault(),t.hasChildren&&n("toggleOpen"),(f=(h=t.item)==null?void 0:h.select)==null||f.call(h),n("toggleOpen"),s.value=!1,o.value=t.item.id;const p=new URL(window.location.href);p.pathname=a.value.basePath+"/"+t.item.id,window.history.pushState({},"",p),Ti(t.item.id),await wr(100),s.value=!0}};return(u,h)=>{var f,p;return i.openBlock(),i.createElementBlock("li",{id:u.id,class:"sidebar-group-item"},[i.createElementVNode("div",{class:i.normalizeClass(["sidebar-heading",{"sidebar-group-item__folder":u.hasChildren,active_page:u.isActive,deprecated:u.item.deprecated??!1}]),onClick:l},[u.hasChildren?(i.openBlock(),i.createElementBlock("p",Z5,[i.createVNode(i.unref(ji),{class:"toggle-nested-icon",icon:u.open?"ChevronDown":"ChevronRight",label:"Toggle group",size:"xs",onClick:i.withModifiers(l,["stop"])},null,8,["icon"]),i.createTextVNode("   ")])):i.createCommentVNode("",!0),i.createElementVNode("a",{class:"sidebar-heading-link",href:c(),onClick:d},[(p=(f=u.item)==null?void 0:f.icon)!=null&&p.src?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,class:"sidebar-icon",icon:u.item.icon.src},null,8,["icon"])):i.createCommentVNode("",!0),i.createElementVNode("p",tV,i.toDisplayString(u.item.title),1),u.item.httpVerb&&!u.hasChildren?(i.openBlock(),i.createElementBlock("p",rV,[i.createTextVNode("   "),i.createVNode(X1,{active:u.isActive,method:u.item.httpVerb},null,8,["active","method"])])):i.createCommentVNode("",!0)],8,eV)],2),u.open?i.renderSlot(u.$slots,"default",{key:0},void 0,!0):i.createCommentVNode("",!0),u.$slots["action-menu"]?(i.openBlock(),i.createElementBlock("div",nV,[i.renderSlot(u.$slots,"action-menu",{},void 0,!0)])):i.createCommentVNode("",!0)],8,Q5)}}}),ja=U(oV,[["__scopeId","data-v-4ed1078c"]]),sV=i.defineComponent({__name:"SidebarGroup",props:{level:{}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("ul",{class:"sidebar-group sidebar-indent-nested",style:i.normalizeStyle({"--scalar-sidebar-level":e.level})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),Ed=U(sV,[["__scopeId","data-v-39c84840"]]),iV={class:"sidebar"},aV={class:"sidebar-group-title"},lV=-160,cV=i.defineComponent({__name:"Sidebar",props:{parsedSpec:{}},setup(r){const e=r,{hash:t,isIntersectionEnabled:n}=ct(),{items:o,toggleCollapsedSidebarItem:s,collapsedSidebarItems:a}=tr({parsedSpec:e.parsedSpec}),l=i.ref(null),c=i.ref(!0);i.watch(t,u=>{!n.value||c.value||typeof window>"u"||d(u)});const d=u=>{var p,y,g,m;const h=document.getElementById(`sidebar-${u}`);if(!h||!l.value)return;let f=lV;h.getAttribute("data-sidebar-type")==="heading"?f+=h.offsetTop+((p=h.getElementsByClassName("sidebar-heading"))==null?void 0:p[0]).offsetHeight:f+=h.offsetTop+(((y=h.parentElement)==null?void 0:y.offsetTop)??0)+(((m=(g=h.parentElement)==null?void 0:g.parentElement)==null?void 0:m.offsetTop)??0),l.value.scrollTo({top:f,behavior:"smooth"})};return i.onMounted(()=>{setTimeout(()=>d(t.value),500),c.value=!1}),(u,h)=>(i.openBlock(),i.createElementBlock("div",iV,[i.renderSlot(u.$slots,"sidebar-start",{},void 0,!0),i.createElementVNode("div",{ref_key:"scrollerEl",ref:l,class:"sidebar-pages custom-scroll custom-scroll-self-contain-overflow"},[i.createVNode(Ed,{level:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o).entries,f=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:f.id},[f.isGroup?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("li",aV,i.toDisplayString(f.displayTitle??f.title),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.children,p=>(i.openBlock(),i.createBlock(ja,{key:p.id,id:`sidebar-${p.id}`,"data-sidebar-type":"heading",hasChildren:p.children&&p.children.length>0,isActive:i.unref(t)===p.id,item:{id:p.id,title:p.displayTitle??p.title,select:p.select,httpVerb:p.httpVerb,deprecated:p.deprecated??!1},open:i.unref(a)[p.id]??!1,onToggleOpen:async()=>{c.value=!0,i.unref(s)(p.id),await i.unref(wr)(100),c.value=!1}},{default:i.withCtx(()=>{var y;return[p.children&&((y=p.children)==null?void 0:y.length)>0?(i.openBlock(),i.createBlock(Ed,{key:0,level:1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.children,g=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:g.id},[f.show?(i.openBlock(),i.createBlock(ja,{key:0,id:`sidebar-${g.id}`,isActive:i.unref(t)===g.id,item:{id:g.id,title:g.displayTitle??g.title,select:g.select,httpVerb:g.httpVerb,deprecated:g.deprecated??!1}},null,8,["id","isActive","item"])):i.createCommentVNode("",!0)],64))),128))]),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","hasChildren","isActive","item","open","onToggleOpen"]))),128))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[f.show?(i.openBlock(),i.createBlock(ja,{key:0,id:`sidebar-${f.id}`,"data-sidebar-type":"heading",hasChildren:f.children&&f.children.length>0,isActive:i.unref(t)===f.id,item:{id:f.id,title:f.displayTitle??f.title,select:f.select,httpVerb:f.httpVerb,deprecated:f.deprecated??!1},open:i.unref(a)[f.id]??!1,onToggleOpen:async()=>{c.value=!0,i.unref(s)(f.id),await i.unref(wr)(100),c.value=!1}},{default:i.withCtx(()=>{var p;return[f.children&&((p=f.children)==null?void 0:p.length)>0?(i.openBlock(),i.createBlock(Ed,{key:0,level:1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.children,y=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:y.id},[f.show?(i.openBlock(),i.createBlock(ja,{key:0,id:`sidebar-${y.id}`,isActive:i.unref(t)===y.id,item:{id:y.id,title:y.displayTitle??y.title,select:y.select,httpVerb:y.httpVerb,deprecated:y.deprecated??!1}},null,8,["id","isActive","item"])):i.createCommentVNode("",!0)],64))),128))]),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","hasChildren","isActive","item","open","onToggleOpen"])):i.createCommentVNode("",!0)],64))],64))),128))]),_:1})],512),i.renderSlot(u.$slots,"sidebar-end",{},void 0,!0)]))}}),Gf=U(cV,[["__scopeId","data-v-e68ba74a"]]),dV={key:0,class:"api-client-drawer"},uV={class:"api-client-container"},hV={class:"scalar-api-client-height"},fV={class:"scalar-api-client-states"},pV={class:"t-doc__sidebar"},mV=i.defineComponent({__name:"ApiClientModal",props:{parsedSpec:{},overloadShow:{type:Boolean},proxyUrl:{},theme:{}},emits:["toggleDarkMode"],setup(r){const e=i.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-5LEUeUWq.cjs")).then(a=>a.ApiClient)),{hideApiClient:t,state:n}=jl(),o=Xe.useMediaQuery("(max-width: 1000px)"),s=i.ref(!1);return(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(n).showApiClient||a.overloadShow?(i.openBlock(),i.createElementBlock("div",dV,[i.createElementVNode("div",uV,[i.renderSlot(a.$slots,"header",{},void 0,!0),i.createElementVNode("div",hV,[i.createVNode(i.unref(e),{proxyUrl:a.proxyUrl,showSideBar:s.value,theme:a.theme??"none",withDefaultFonts:!1,onEscapeKeyPress:i.unref(t),onToggleSidebar:l[2]||(l[2]=c=>s.value=!s.value)},{"address-bar-controls":i.withCtx(()=>[i.createElementVNode("div",fV,[i.createElementVNode("button",{class:"scalar-api-client-states-button scalar-api-client-states-button__endpoints",type:"button",onClick:l[0]||(l[0]=c=>s.value=!s.value)},[i.createVNode(i.unref(Me),{icon:s.value?"SideBarClosed":"SideBarOpen",size:"sm"},null,8,["icon"])]),i.createElementVNode("button",{class:"scalar-api-client-states-button",type:"button",onClick:l[1]||(l[1]=(...c)=>i.unref(t)&&i.unref(t)(...c))},[i.createVNode(i.unref(Me),{icon:"Close",size:"sm"})])])]),sidebar:i.withCtx(()=>[i.createElementVNode("div",pV,[i.withDirectives(i.createVNode(i.unref(Gf),{parsedSpec:a.parsedSpec},{"sidebar-start":i.withCtx(()=>[i.renderSlot(a.$slots,"sidebar-start",{},void 0,!0)]),_:3},8,["parsedSpec"]),[[i.vShow,!i.unref(o)]])])]),_:3},8,["proxyUrl","showSideBar","theme","onEscapeKeyPress"])])])])):i.createCommentVNode("",!0),i.unref(n).showApiClient?(i.openBlock(),i.createElementBlock("div",{key:1,class:"api-client-drawer-exit",onClick:l[3]||(l[3]=(...c)=>i.unref(t)&&i.unref(t)(...c))})):i.createCommentVNode("",!0)],64))}}),Q1=U(mV,[["__scopeId","data-v-206ad1a1"]]);function Z1(r){var e;return((e=zo.value.find(t=>t.key===r.targetKey))==null?void 0:e.title)??r.targetKey}function ew(r){var e,t;return((t=(e=zo.value.find(n=>n.key===r.targetKey))==null?void 0:e.clients.find(n=>n.key===r.clientKey))==null?void 0:t.title)??r.clientKey}const gV=i.computed(()=>Z1(ro)),yV=i.computed(()=>ew(ro));function tw(r,e){return e.value===!0?[]:r.flatMap(t=>{var n;return typeof e.value!="object"?[]:Array.isArray(e.value)?(t.clients=t.clients.filter(o=>!e.value.includes(o.key)),[t]):e.value[t.key]===!0?[]:(Array.isArray(e.value[t.key])&&(t.clients=t.clients.filter(o=>!e.value[t.key].includes(o.key))),(n=t==null?void 0:t.clients)!=null&&n.length?[t]:[])})}const zo=i.computed(()=>{var e;const r=e0.availableTargets();return(e=r.find(t=>t.key==="node"))==null||e.clients.unshift({description:"An HTTP/1.1 client, written from scratch for Node.js.",key:"undici",link:"https://github.com/nodejs/undici",title:"undici"}),tw(r,zu)}),Jg={node:["unirest"]},zu=i.ref({...Jg===!0?{}:Jg}),Jf=()=>{var e,t,n,o;return zo.value.find(s=>s.key==="shell"&&s.clients.find(a=>a.key==="curl"))?{targetKey:"shell",clientKey:"curl"}:{targetKey:(e=zo.value[0])==null?void 0:e.key,clientKey:(o=(n=(t=zo.value[0])==null?void 0:t.clients)==null?void 0:n[0])==null?void 0:o.key}},ro=i.reactive(Jf());function vV(){nc(ro,Jf())}const bV=r=>{Object.assign(ro,{...ro,...r})},ks=()=>({httpClient:i.readonly(ro),resetState:vV,setHttpClient:bV,excludedClients:i.readonly(zu),setExcludedClients:r=>{zu.value=r,nc(ro,Jf())},availableTargets:zo,getClientTitle:ew,getTargetTitle:Z1,httpTargetTitle:gV,httpClientTitle:yV}),wV={key:0},kV={class:"authentication-header"},SV={class:"selector"},xV={key:0,class:"authentication-content"},CV=i.defineComponent({__name:"Authentication",props:{parsedSpec:{},proxy:{}},setup(r){const e=r,{authentication:t,setAuthentication:n}=ns(),o=i.computed(()=>{var a,l,c;if(!t.preferredSecurityScheme)return!1;const s=(c=(l=(a=e.parsedSpec)==null?void 0:a.components)==null?void 0:l.securitySchemes)==null?void 0:c[t.preferredSecurityScheme];return!!s&&"type"in s&&!!s.type});return i.watch(()=>{var s,a;return(a=(s=e.parsedSpec)==null?void 0:s.components)==null?void 0:a.securitySchemes},()=>{var s,a;n({securitySchemes:(a=(s=e.parsedSpec)==null?void 0:s.components)==null?void 0:a.securitySchemes})},{deep:!0,immediate:!0}),i.onServerPrefetch(async()=>{const s=i.useSSRContext();await wr(1),s.payload.data["useGlobalStore-authentication"]=t}),(s,a)=>{var l,c,d,u,h;return i.unref(Kv)(s.parsedSpec)?(i.openBlock(),i.createElementBlock("div",wV,[i.createElementVNode("div",kV,[i.createElementVNode("div",SV,[i.createVNode(i.unref(Hv),{value:(c=(l=s.parsedSpec)==null?void 0:l.components)==null?void 0:c.securitySchemes},null,8,["value"])])]),o.value?(i.openBlock(),i.createElementBlock("div",xV,[i.unref(t).preferredSecurityScheme?(i.openBlock(),i.createBlock(i.unref(zv),{key:0,proxy:s.proxy,value:(h=(u=(d=s.parsedSpec)==null?void 0:d.components)==null?void 0:u.securitySchemes)==null?void 0:h[i.unref(t).preferredSecurityScheme]},null,8,["proxy","value"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)}}}),EV=U(CV,[["__scopeId","data-v-adb00e96"]]),$V=["innerHTML"],_V=i.defineComponent({__name:"MarkdownRenderer",props:{value:{},withImages:{type:Boolean,default:!1}},setup(r){const e=r,t=i.ref(""),n=e.withImages?[]:["img","picture"],o={...la.defaultSchema,tagNames:[...(la.defaultSchema.tagNames||[]).filter(s=>!n.includes(s)),"abbr"],attributes:{...la.defaultSchema.attributes,abbr:["title"]}};return i.watch(()=>e.value,async()=>{const s=await Zg.unified().use(Qg).use(zw).use(Hw,{allowDangerousHtml:!0}).use(Fw).use(la,o).use(jw,{detect:!0}).use(Rw,{target:"_blank"}).use(Lw).use(qw).process(e.value);t.value=String(s.value)},{immediate:!0}),i.onServerPrefetch(async()=>await wr(1)),(s,a)=>(i.openBlock(),i.createElementBlock("div",{class:"markdown",innerHTML:t.value},null,8,$V))}}),wt=U(_V,[["__scopeId","data-v-5a5f5321"]]),NV=["title","innerHTML"],AV=i.defineComponent({__name:"ServerItem",props:{value:{},variables:{}},setup(r){const e=r,{copyToClipboard:t}=ws(),n=i.computed(()=>{var l;const a=(((l=e.value)==null?void 0:l.url)??"").replace(/(<([^>]+)>)/gi,"");return Ch(a,c=>{var u;const d=(u=e.variables)==null?void 0:u.find(h=>h.name===c);return`<span class="base-url-variable">${((d==null?void 0:d.value)??"")!==""?d==null?void 0:d.value:`{${c}}`}</span>`})}),o=i.computed(()=>n.value.replace(/(<([^>]+)>)/gi,""));return(s,a)=>s.value?(i.openBlock(),i.createElementBlock("a",{key:0,class:"base-url",title:s.value.description,onClick:a[0]||(a[0]=l=>i.unref(t)(o.value)),innerHTML:n.value},null,8,NV)):i.createCommentVNode("",!0)}}),OV=U(AV,[["__scopeId","data-v-41c016dc"]]),TV={key:0},BV=["for"],PV=["id","value","onInput"],IV=["value"],MV={class:"input-value"},DV=["id","value","onInput"],VV=i.defineComponent({__name:"ServerVariables",props:{value:{}},setup(r){const{server:e,setServer:t}=no(),n=(s,a)=>{const l=a.target.value,c=[...e.variables],d=c.findIndex(u=>u.name===s);c[d].value=l,t({variables:c})},o=s=>{const a=e.variables.findIndex(l=>l.name===s);return e.variables[a].value??""};return(s,a)=>s.value?(i.openBlock(),i.createElementBlock("div",TV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,l=>(i.openBlock(),i.createElementBlock("div",{key:l.name,class:"input"},[i.createElementVNode("label",{for:`variable-${l.name}`},[i.createElementVNode("code",null,i.toDisplayString(l.name),1)],8,BV),l.enum?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("select",{id:`variable-${l.name}`,value:o(l.name),onInput:c=>n(l.name,c)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.enum,c=>(i.openBlock(),i.createElementBlock("option",{key:c,value:c},i.toDisplayString(c),9,IV))),128))],40,PV),i.createElementVNode("div",MV,i.toDisplayString(l.default),1)],64)):(i.openBlock(),i.createElementBlock("input",{key:1,id:`variable-${l.name}`,autocomplete:"off",placeholder:"value",spellcheck:"false",type:"text",value:o(l.name),onInput:c=>n(l.name,c)},null,40,DV))]))),128))])):i.createCommentVNode("",!0)}}),RV=U(VV,[["__scopeId","data-v-2e5f4fe1"]]),LV=r=>(i.pushScopeId("data-v-1634f7d3"),r=r(),i.popScopeId(),r),jV={key:0},FV=LV(()=>i.createElementVNode("span",{class:"scalar-card-serverlist-title"},"Base URL",-1)),qV={class:"scalar-card-serverlist"},zV={class:"scalar-card-serverlist-container"},HV={class:"server-item"},UV={class:"server-selector"},KV=["value"],WV=["value"],GV={key:0,muted:""},JV={class:"description"},YV=i.defineComponent({__name:"BaseUrl",setup(r){const{server:e,setServer:t}=no(),n=i.ref(0);return i.watch([n,()=>e.servers],()=>{var l,c,d;if(!e.servers.length)return;const o=((l=e.servers[n.value])==null?void 0:l.variables)??{},s=o?Object.keys(o).map(u=>{var h;return{name:u,value:((h=o[u].default)==null?void 0:h.toString())??""}}):[];vv((c=e.servers[n.value])==null?void 0:c.url).filter(u=>!o[u]).forEach(u=>{s.push({name:u,value:""})}),t({selectedServer:n.value,description:(d=e.servers[n.value])==null?void 0:d.description,variables:s})},{immediate:!0,deep:!0}),(o,s)=>i.unref(e).servers.length>0?(i.openBlock(),i.createElementBlock("div",jV,[FV,i.createElementVNode("div",qV,[i.createElementVNode("div",zV,[i.createElementVNode("div",HV,[i.createElementVNode("div",UV,[i.unref(e).servers.length>1?(i.openBlock(),i.createElementBlock("select",{key:0,value:n.value,onInput:s[0]||(s[0]=a=>n.value=parseInt(a.target.value,10))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(e).servers,(a,l)=>(i.openBlock(),i.createElementBlock("option",{key:l,value:l},i.toDisplayString(a.url),9,WV))),128))],40,KV)):i.createCommentVNode("",!0),i.createVNode(OV,{value:i.unref(e).servers[n.value],variables:i.unref(e).variables},null,8,["value","variables"]),i.unref(e).servers.length>1?(i.openBlock(),i.createBlock(i.unref(Me),{key:1,icon:"ChevronDown"})):i.createCommentVNode("",!0)])]),i.createVNode(RV,{value:i.unref(e).variables},null,8,["value"])])]),i.unref(e).description?(i.openBlock(),i.createElementBlock("div",GV,[i.createElementVNode("div",JV,[i.createVNode(i.unref(wt),{value:i.unref(e).description},null,8,["value"])])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)}}),XV=U(YV,[["__scopeId","data-v-1634f7d3"]]),QV=r=>(i.pushScopeId("data-v-09827b05"),r=r(),i.popScopeId(),r),ZV=["onClick"],eR=["value"],tR=["label"],rR=["value"],nR={class:"client-libraries-icon__more"},oR={key:1,class:"client-libraries-icon",height:"50",viewBox:"0 0 50 50",width:"50",xmlns:"http://www.w3.org/2000/svg"},sR=QV(()=>i.createElementVNode("g",{fill:"currentColor","fill-rule":"nonzero"},[i.createElementVNode("path",{d:"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0"})],-1)),iR=[sR],aR={key:0},lR=i.defineComponent({__name:"ClientSelector",setup(r){const{httpClient:e,setHttpClient:t,availableTargets:n,getClientTitle:o,getTargetTitle:s}=ks(),a=i.ref(),l=[{targetKey:"shell",clientKey:"curl"},{targetKey:"ruby",clientKey:"native"},{targetKey:"node",clientKey:"undici"},{targetKey:"php",clientKey:"guzzle"},{targetKey:"python",clientKey:"python3"}].filter(h=>n.value.find(f=>f.key===h.targetKey&&f.clients.find(p=>p.key===h.clientKey))),c=h=>`programming-language-${h}`,d=h=>h.targetKey===e.targetKey&&h.clientKey===e.clientKey,u=h=>l.some(f=>f.targetKey===h.targetKey&&f.clientKey===h.clientKey);return(h,f)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"containerRef",ref:a,class:"client-libraries-content"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(l),p=>(i.openBlock(),i.createElementBlock("div",{key:p.clientKey,class:i.normalizeClass(["client-libraries rendered-code-sdks",{"client-libraries__active":d(p)}]),onClick:()=>i.unref(t)(p)},[i.createElementVNode("div",{class:i.normalizeClass(`client-libraries-icon__${p.targetKey}`)},[i.createVNode(i.unref(Me),{class:"client-libraries-icon",icon:c(p.targetKey)},null,8,["icon"])],2),i.createElementVNode("span",null,i.toDisplayString(i.unref(s)(p)),1)],10,ZV))),128)),i.createElementVNode("div",{class:i.normalizeClass(["client-libraries client-libraries__select",{"client-libraries__active":i.unref(e)&&!u(i.unref(e))}])},[i.createElementVNode("select",{class:"language-select",value:JSON.stringify(i.unref(e)),onInput:f[0]||(f[0]=p=>i.unref(t)(JSON.parse(p.target.value)))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(n),p=>(i.openBlock(),i.createElementBlock("optgroup",{key:p.key,label:p.title},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.clients,y=>(i.openBlock(),i.createElementBlock("option",{key:y.key,value:JSON.stringify({targetKey:p.key,clientKey:y.key})},i.toDisplayString(i.unref(o)({targetKey:p.key,clientKey:y.key})),9,rR))),128))],8,tR))),128))],40,eR),i.createElementVNode("div",nR,[i.unref(e)&&!u(i.unref(e))?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(`client-libraries-icon__${i.unref(e).targetKey}`)},[i.createVNode(i.unref(Me),{class:"client-libraries-icon",icon:c(i.unref(e).targetKey)},null,8,["icon"])],2)):(i.openBlock(),i.createElementBlock("svg",oR,iR))]),i.unref(n).length?(i.openBlock(),i.createElementBlock("span",aR,"More")):i.createCommentVNode("",!0)],2)],512))}}),cR=U(lR,[["__scopeId","data-v-09827b05"]]),dR=r=>(i.pushScopeId("data-v-301043da"),r=r(),i.popScopeId(),r),uR=dR(()=>i.createElementVNode("div",{class:"client-libraries-heading"},"Client Libraries",-1)),hR={class:"selected-client card-footer",muted:""},fR=i.defineComponent({__name:"ClientLibraries",setup(r){const{availableTargets:e,httpTargetTitle:t,httpClientTitle:n}=ks();return(o,s)=>(i.openBlock(),i.createElementBlock("div",null,[i.unref(e).length?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[uR,i.createElementVNode("div",null,[i.createVNode(cR)]),i.createElementVNode("div",hR,i.toDisplayString(i.unref(n))+" "+i.toDisplayString(i.unref(t)),1)],64)):i.createCommentVNode("",!0)]))}}),pR=U(fR,[["__scopeId","data-v-301043da"]]),mR={},gR={class:"badge"};function yR(r,e){return i.openBlock(),i.createElementBlock("div",gR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Bi=U(mR,[["render",yR],["__scopeId","data-v-190574ac"]]),Yf=i.defineComponent({__name:"IntersectionObserver",props:{id:{},is:{}},emits:["intersecting"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(),s=l=>{const c=l.offsetHeight;return`${c/2}px 0px ${c/2}px 0px`},a=l=>l.offsetHeight<window.innerHeight?.8:.5;return i.onMounted(()=>{if(o.value){const l={rootMargin:s(o.value),threshold:a(o.value)};Xe.useIntersectionObserver(o,([{isIntersecting:c}])=>{c&&t.id&&n("intersecting")},l)}}),(l,c)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(l.is??"div"),{id:l.id,ref_key:"intersectionObserverRef",ref:o},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["id"]))}}),vR=i.defineComponent({__name:"Section",props:{id:{},label:{}},setup(r){const e=r,{getSectionId:t,hash:n,isIntersectionEnabled:o,pathRouting:s}=ct(),{setCollapsedSidebarItem:a}=tr();function l(){var u;if(!e.label||!o.value)return;const c=new URL(window.location.href),d=e.id??"";s.value?c.pathname=s.value.basePath+"/"+d:c.hash=d,n.value=d,window.history.replaceState({},"",c),(u=e.id)!=null&&u.startsWith("model")&&a(t(e.id),!0)}return(c,d)=>(i.openBlock(),i.createBlock(Yf,{is:"section",id:c.id,class:"section",onIntersecting:l},{default:i.withCtx(()=>[i.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["id"]))}}),Ss=U(vR,[["__scopeId","data-v-0494f9f3"]]),bR={class:"section-accordion-button-content"},wR={key:0,class:"section-accordion-button-actions"},kR={key:0,class:"section-accordion-description"},SR={class:"section-accordion-content-card"},xR=i.defineComponent({__name:"SectionAccordion",props:{id:{},transparent:{type:Boolean}},setup(r){const e=i.ref(),t=Xe.useElementHover(e);return(n,o)=>(i.openBlock(),i.createBlock(Yf,{id:n.id,class:"section-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(Le.Disclosure),{as:"section",class:i.normalizeClass(["section-accordion",{"section-accordion-transparent":n.transparent}])},{default:i.withCtx(({open:s})=>[i.createVNode(i.unref(Le.DisclosureButton),{ref_key:"button",ref:e,class:"section-accordion-button"},{default:i.withCtx(()=>[i.createElementVNode("div",bR,[i.renderSlot(n.$slots,"title",{},void 0,!0)]),n.$slots.actions?(i.openBlock(),i.createElementBlock("div",wR,[i.renderSlot(n.$slots,"actions",{active:i.unref(t)||s},void 0,!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(Me),{class:"section-accordion-chevron",icon:s?"ChevronDown":"ChevronRight"},null,8,["icon"])]),_:2},1536),i.createVNode(i.unref(Le.DisclosurePanel),{class:"section-accordion-content"},{default:i.withCtx(()=>[n.$slots.description?(i.openBlock(),i.createElementBlock("div",kR,[i.renderSlot(n.$slots,"description",{},void 0,!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",SR,[i.renderSlot(n.$slots,"default",{},void 0,!0)])]),_:3})]),_:3},8,["class"])]),_:3},8,["id"]))}}),rw=U(xR,[["__scopeId","data-v-07cabcb0"]]),CR={},ER={class:"section-column"};function $R(r,e){return i.openBlock(),i.createElementBlock("div",ER,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const es=U(CR,[["render",$R],["__scopeId","data-v-d64e7382"]]),_R={},NR={class:"section-columns"};function AR(r,e){return i.openBlock(),i.createElementBlock("div",NR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Xf=U(_R,[["render",AR],["__scopeId","data-v-8b9602bf"]]),OR={},TR={class:"section-container"};function BR(r,e){return i.openBlock(),i.createElementBlock("div",TR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Zi=U(OR,[["render",BR],["__scopeId","data-v-34b26958"]]),PR={class:"section-accordion-wrapper"},IR={class:"section-accordion-title"},MR=i.defineComponent({__name:"SectionContainerAccordion",setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",PR,[i.createVNode(i.unref(Le.Disclosure),{as:"div",class:"section-accordion",defaultOpen:""},{default:i.withCtx(({open:n})=>[i.createVNode(i.unref(Le.DisclosureButton),{class:"section-accordion-button"},{default:i.withCtx(()=>[i.createVNode(i.unref(Me),{class:"section-accordion-chevron",icon:n?"ChevronDown":"ChevronRight"},null,8,["icon"]),i.createElementVNode("div",IR,[i.renderSlot(e.$slots,"title",{},void 0,!0)])]),_:2},1024),i.createVNode(i.unref(Le.DisclosurePanel),{class:"section-accordion-content"},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})]))}}),nw=U(MR,[["__scopeId","data-v-2049975e"]]),DR=i.defineComponent({__name:"LoadingSkeleton",props:{lines:{default:1}},setup(r){return(e,t)=>(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList([...Array(e.lines).keys()],n=>(i.openBlock(),i.createElementBlock("div",{key:n,class:i.normalizeClass(["loading",{"single-line":e.lines===1}])},null,2))),128))}}),ow=U(DR,[["__scopeId","data-v-c90b2c46"]]),VR={class:"section-content"},RR=i.defineComponent({__name:"SectionContent",props:{loading:{type:Boolean,default:!1}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",VR,[e.loading?(i.openBlock(),i.createBlock(ow,{key:1,lines:8})):i.renderSlot(e.$slots,"default",{key:0},void 0,!0)]))}}),xs=U(RR,[["__scopeId","data-v-9735459e"]]),LR=i.defineComponent({__name:"SectionHeader",props:{loading:{type:Boolean,default:!1},tight:{type:Boolean,default:!1},level:{default:1}},setup(r){return(e,t)=>e.loading?(i.openBlock(),i.createBlock(ow,{key:0})):(i.openBlock(),i.createBlock(i.resolveDynamicComponent(`h${e.level}`),{key:1,class:i.normalizeClass(["section-header",{tight:e.tight}])},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),bn=U(LR,[["__scopeId","data-v-3bd1b9f0"]]),jR={key:0,class:"introduction-description"},FR=i.defineComponent({__name:"Description",props:{value:{}},setup(r){const e=r,n=`components-Content-Introduction-Description-sections${Wu(e.value)}`,o=Xe.computedAsync(async()=>{if(!e.value)return[];const u=await Ei(e.value),h=rc(u);return await Promise.all(H1(e.value,h).map(async f=>({heading:(await Ei(f))[0],content:f})))},ts[n]??[]),{getHeadingId:s,hash:a,isIntersectionEnabled:l,pathRouting:c}=ct();function d(u=""){if(!l.value)return;const h=new URL(window.location.href);c.value?h.pathname=c.value.basePath+"/"+u:h.hash=u,a.value=u,window.history.replaceState({},"",h)}return i.onServerPrefetch(async()=>{const u=i.useSSRContext();await wr(1),u.payload.data[n]=o.value}),(u,h)=>u.value?(i.openBlock(),i.createElementBlock("div",jR,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o),(f,p)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:p},[f.heading?(i.openBlock(),i.createBlock(Yf,{key:0,id:i.unref(s)(f.heading),class:"introduction-description-heading",onIntersecting:()=>d(i.unref(s)(f.heading))},{default:i.withCtx(()=>[i.createVNode(i.unref(wt),{value:f.content,withImages:""},null,8,["value"])]),_:2},1032,["id","onIntersecting"])):(i.openBlock(),i.createBlock(i.unref(wt),{key:1,value:f.content,withImages:""},null,8,["value"]))],64))),128))])):i.createCommentVNode("",!0)}}),qR=U(FR,[["__scopeId","data-v-5e475391"]]),zR={class:"download"},HR={class:"download-cta"},UR=i.defineComponent({__name:"DownloadSpec",props:{specTitle:{}},setup(r){const e=r,t=i.inject(zf),n=()=>{Hf.emit({id:"",specTitle:e.specTitle})};return(o,s)=>{var a;return i.openBlock(),i.createElementBlock("div",zR,[i.createElementVNode("div",HR,[(a=i.unref(t))!=null&&a()?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("button",{key:0,class:"download-button",type:"button",onClick:n}," Download OpenAPI Spec "))])])}}}),KR=U(UR,[["__scopeId","data-v-810904a4"]]),WR={class:"badges"},GR={class:"sticky-cards"},JR=i.defineComponent({__name:"Introduction",props:{info:{},parsedSpec:{}},setup(r){const e=r,t=new Pi,n=i.computed(()=>e.parsedSpec.openapi??e.parsedSpec.swagger??""),o=i.computed(()=>t.slug(e.info.title??""));return(s,a)=>(i.openBlock(),i.createBlock(i.unref(Zi),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),{class:"introduction-section"},{default:i.withCtx(()=>[i.createVNode(i.unref(xs),{loading:!s.info.description&&!s.info.title},{default:i.withCtx(()=>[i.createVNode(i.unref(Xf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(es),null,{default:i.withCtx(()=>[i.createElementVNode("div",WR,[s.info.version?(i.openBlock(),i.createBlock(i.unref(Bi),{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.info.version),1)]),_:1})):i.createCommentVNode("",!0),n.value?(i.openBlock(),i.createBlock(i.unref(Bi),{key:1},{default:i.withCtx(()=>[i.createTextVNode(" OAS "+i.toDisplayString(n.value),1)]),_:1})):i.createCommentVNode("",!0)]),i.createVNode(i.unref(bn),{level:1,loading:!s.info.title,tight:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.info.title),1)]),_:1},8,["loading"]),i.createVNode(KR,{specTitle:o.value},null,8,["specTitle"]),i.createVNode(qR,{value:s.info.description},null,8,["value"])]),_:1}),s.$slots.aside?(i.openBlock(),i.createBlock(i.unref(es),{key:0},{default:i.withCtx(()=>[i.createElementVNode("div",GR,[i.renderSlot(s.$slots,"aside",{},void 0,!0)])]),_:3})):i.createCommentVNode("",!0)]),_:3})]),_:3},8,["loading"]),i.renderSlot(s.$slots,"after",{},void 0,!0)]),_:3})]),_:3}))}}),YR=U(JR,[["__scopeId","data-v-30c2e131"]]),XR=Symbol(),Hu=Xe.useEventBus(XR),Ll=i.defineComponent({__name:"Lazy",props:{id:{},isLazy:{type:Boolean,default:!0},lazyTimeout:{default:0}},setup(r){const e=r,t=(o=()=>{})=>{typeof window>"u"||("requestIdleCallback"in window?setTimeout(()=>window.requestIdleCallback(o),e.lazyTimeout):setTimeout(()=>i.nextTick(o),e.lazyTimeout??300))},n=i.ref(!e.isLazy);return e.isLazy?t(()=>{n.value=!0,e.id&&i.nextTick(()=>Hu.emit({id:e.id}))}):e.id&&i.nextTick(()=>Hu.emit({id:e.id})),(o,s)=>n.value?i.renderSlot(o.$slots,"default",{key:0}):i.createCommentVNode("",!0)}}),QR={key:0,class:"screenreader-only"},ZR=i.defineComponent({__name:"ScreenReader",props:{if:{type:Boolean,default:!0}},setup(r){return(e,t)=>e.$props.if?(i.openBlock(),i.createElementBlock("span",QR,[i.renderSlot(e.$slots,"default",{},void 0,!0)])):i.renderSlot(e.$slots,"default",{key:1},void 0,!0)}}),sw=U(ZR,[["__scopeId","data-v-681ebf2c"]]),e3=r=>(i.pushScopeId("data-v-d9801d4e"),r=r(),i.popScopeId(),r),t3={class:"label"},r3={class:"anchor"},n3=e3(()=>i.createElementVNode("span",null,"​",-1)),o3=i.defineComponent({__name:"Anchor",props:{id:{}},setup(r){const{copyToClipboard:e}=ws(),t=n=>{const o=new URL(window.location.href);return o.hash=n,o.toString()};return(n,o)=>(i.openBlock(),i.createElementBlock("span",t3,[i.renderSlot(n.$slots,"default",{},void 0,!0),i.createElementVNode("span",r3,[n3,i.createElementVNode("button",{class:"anchor-copy",type:"button",onClick:o[0]||(o[0]=i.withModifiers(s=>i.unref(e)(t(n.id)),["stop"]))},[i.createTextVNode(" # "),i.createVNode(sw,null,{default:i.withCtx(()=>[i.createTextVNode('Copy link to "'),i.renderSlot(n.$slots,"default",{},void 0,!0),i.createTextVNode('"')]),_:3})])])]))}}),wn=U(o3,[["__scopeId","data-v-d9801d4e"]]),s3={},i3={class:"scalar-card"};function a3(r,e){return i.openBlock(),i.createElementBlock("div",i3,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const ea=U(s3,[["render",a3],["__scopeId","data-v-dcabb131"]]),l3=i.defineComponent({__name:"CardContent",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["scalar-card-content",{"scalar-card--muted":e.muted,"scalar-card--contrast":e.contrast,"scalar-card--frameless":e.frameless,"scalar-card--transparent":e.transparent,"scalar-card--borderless":e.borderless}])},[i.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),lo=U(l3,[["__scopeId","data-v-5312c2e0"]]),c3={class:"scalar-card-header-slots"},d3={class:"scalar-card-header-slot scalar-card-header-title"},u3={class:"scalar-card-header-slot scalar-card-header-actions"},h3=i.defineComponent({__name:"CardHeader",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createBlock(lo,i.mergeProps(e,{class:"scalar-card-header"}),{default:i.withCtx(()=>[i.createElementVNode("div",c3,[i.createElementVNode("div",d3,[i.renderSlot(t.$slots,"default",{},void 0,!0)]),i.createElementVNode("div",u3,[i.renderSlot(t.$slots,"actions",{},void 0,!0)])])]),_:3},16))}}),ta=U(h3,[["__scopeId","data-v-bbd0c20a"]]),f3=i.defineComponent({__name:"CardFooter",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createBlock(lo,i.normalizeProps(i.guardReactiveProps(e)),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16))}}),Rc=U(f3,[["__scopeId","data-v-918ab8d6"]]),p3=i.defineComponent({__name:"CardTabHeader",emits:["change"],setup(r,{emit:e}){const t=e,n=o=>{t("change",o)};return(o,s)=>(i.openBlock(),i.createBlock(ta,{class:"scalar-card-header-tabs"},{actions:i.withCtx(()=>[i.renderSlot(o.$slots,"actions",{},void 0,!0)]),default:i.withCtx(()=>[i.createVNode(i.unref(Le.TabGroup),{onChange:n},{default:i.withCtx(()=>[i.createVNode(i.unref(Le.TabList),{class:"tab-list custom-scroll"},{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3})]),_:3})]),_:3}))}}),iw=U(p3,[["__scopeId","data-v-6a91b57c"]]),m3=i.defineComponent({__name:"CardTab",setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(Le.Tab),{as:"template"},{default:i.withCtx(({selected:n})=>[i.createElementVNode("button",{class:i.normalizeClass({tab:!0,"tab-selected":n}),type:"button"},[i.createElementVNode("span",null,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],2)]),_:3}))}}),aw=U(m3,[["__scopeId","data-v-f373ecc2"]]),g3=["value"],y3=["label"],v3=["value"],b3=["value"],Qf=i.defineComponent({__name:"TextSelect",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["text-select",e.options.length===1?"text-select--single-option":""])},[i.createElementVNode("span",null,[i.renderSlot(e.$slots,"default")]),i.createElementVNode("select",{value:e.modelValue,onInput:t[0]||(t[0]=n=>e.$emit("update:modelValue",n.target.value))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,n=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:n.value},[n.options?(i.openBlock(),i.createElementBlock("optgroup",{key:0,label:n.label},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.options,o=>(i.openBlock(),i.createElementBlock("option",{key:o.value,value:o.value},i.toDisplayString(o.label),9,v3))),128))],8,y3)):(i.openBlock(),i.createElementBlock("option",{key:n.value,value:n.value},i.toDisplayString(n.label),9,b3))],64))),128))],40,g3)],2))}}),w3={class:"request-header"},k3=i.defineComponent({__name:"CustomRequestExamples",props:{operation:{},examples:{}},setup(r){const e=r,t=i.ref(0),n=i.computed(()=>({C:"c","C#":"csharp",Go:"go",HTML:"html",Java:"java",JavaScript:"javascript",Kotlin:"kotlin","Objective-C":"objc",PowerShell:"powershell",Python:"python",Ruby:"ruby",Shell:"shell",Swift:"swift",TypeScript:"javascript",cURL:"shell"})[e.examples[t.value].lang]??e.examples[t.value].lang),o=i.computed(()=>e.examples[t.value]);i.watch(e.examples,()=>{e.examples[t.value]==="undefined"&&(t.value=0)});const{copyToClipboard:s}=ws();return(a,l)=>(i.openBlock(),i.createBlock(i.unref(ea),{class:"dark-mode"},{default:i.withCtx(()=>[i.createVNode(i.unref(ta),{muted:""},{actions:i.withCtx(()=>[i.createVNode(Qf,{class:"request-client-picker",modelValue:t.value,options:a.examples.map((c,d)=>({value:d.toString(),label:c.label})),"onUpdate:modelValue":l[0]||(l[0]=c=>(t.value=parseInt(c),10))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.value.label),1)]),_:1},8,["modelValue","options"]),i.createElementVNode("button",{class:"copy-button",type:"button",onClick:l[1]||(l[1]=c=>i.unref(s)(o.value.source.trim()))},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px"})])]),default:i.withCtx(()=>[i.createElementVNode("div",w3,[i.createVNode(i.unref(oo),{class:"request-method",method:a.operation.httpVerb},null,8,["method"]),i.renderSlot(a.$slots,"header",{},void 0,!0)])]),_:3}),i.createVNode(i.unref(lo),{borderless:"",class:"request-editor-section custom-scroll",frameless:""},{default:i.withCtx(()=>[i.createVNode(i.unref(Nr),{content:o.value.source.trim(),lang:n.value,lineNumbers:""},null,8,["content","lang"])]),_:1}),a.$slots.footer?(i.openBlock(),i.createBlock(i.unref(Rc),{key:0,class:"scalar-card-footer",contrast:""},{default:i.withCtx(()=>[i.renderSlot(a.$slots,"footer",{},void 0,!0)]),_:3})):i.createCommentVNode("",!0)]),_:3}))}}),S3=U(k3,[["__scopeId","data-v-18ba624d"]]),x3={class:"schema-type"},C3=["title"],E3=i.defineComponent({__name:"SchemaHeading",props:{value:{},name:{}},setup(r){return(e,t)=>{var n,o,s,a,l,c;return i.openBlock(),i.createElementBlock("span",x3,[i.createElementVNode("span",{class:"schema-type-icon",title:typeof e.value.type=="string"?e.value.type:Array.isArray(e.value.type)?e.value.type.join(" | "):"unkown type"},[e.value.type==="object"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(" {} ")],64)):i.createCommentVNode("",!0),e.value.type==="array"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" [] ")],64)):i.createCommentVNode("",!0),e.value.enum?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(" enum ")],64)):i.createCommentVNode("",!0)],8,C3),(o=(n=e.value)==null?void 0:n.xml)!=null&&o.name&&((a=(s=e.value)==null?void 0:s.xml)==null?void 0:a.name)!=="##default"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(" <"+i.toDisplayString((c=(l=e.value)==null?void 0:l.xml)==null?void 0:c.name)+" /> ",1)],64)):e.name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(e.name),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(e.value.type),1)],64))])}}}),lw=U(E3,[["__scopeId","data-v-6c5c3c96"]]),$3={key:0,class:"property-detail-prefix"},_3={key:1,class:"property-detail-value"},N3={key:2,class:"property-detail-value"},A3=i.defineComponent({__name:"SchemaPropertyDetail",props:{truncate:{type:Boolean},code:{type:Boolean}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["property-detail",{"property-detail-truncate":e.truncate}])},[e.$slots.prefix?(i.openBlock(),i.createElementBlock("div",$3,[i.renderSlot(e.$slots,"prefix",{},void 0,!0),i.createTextVNode("  ")])):i.createCommentVNode("",!0),e.code?(i.openBlock(),i.createElementBlock("code",_3,[i.renderSlot(e.$slots,"default",{},void 0,!0)])):(i.openBlock(),i.createElementBlock("span",N3,[i.renderSlot(e.$slots,"default",{},void 0,!0)]))],2))}}),Bt=U(A3,[["__scopeId","data-v-16d94ef5"]]),O3={class:"property-heading"},T3={key:0,class:"property-name"},B3={key:1,class:"property-additional"},P3={key:2,class:"property-deprecated"},I3={key:3,class:"property-required"},M3={key:4,class:"property-const"},D3={key:5,class:"property-details"},V3={key:6,class:"property-write-only"},R3={key:7,class:"property-read-only"},L3=i.defineComponent({__name:"SchemaPropertyHeading",props:{value:{},enum:{type:Boolean},required:{type:Boolean,default:!1},additional:{type:Boolean}},setup(r){const e=["oneOf","anyOf","allOf","not"];return(t,n)=>{var o,s,a,l,c,d,u;return i.openBlock(),i.createElementBlock("div",O3,[t.$slots.name?(i.openBlock(),i.createElementBlock("div",T3,[i.renderSlot(t.$slots,"name",{},void 0,!0)])):i.createCommentVNode("",!0),t.additional?(i.openBlock(),i.createElementBlock("div",B3,[(o=t.value)!=null&&o["x-additionalPropertiesName"]?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(t.value["x-additionalPropertiesName"]),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" additional properties ")],64))])):i.createCommentVNode("",!0),(s=t.value)!=null&&s.deprecated?(i.openBlock(),i.createElementBlock("div",P3,[i.createVNode(i.unref(Bi),null,{default:i.withCtx(()=>[i.createTextVNode("deprecated")]),_:1})])):i.createCommentVNode("",!0),t.required?(i.openBlock(),i.createElementBlock("div",I3," required ")):i.createCommentVNode("",!0),(a=t.value)!=null&&a.const||(l=t.value)!=null&&l.enum&&t.value.enum.length===1?(i.openBlock(),i.createElementBlock("div",M3,[i.createVNode(Bt,{truncate:""},{prefix:i.withCtx(()=>[i.createTextVNode("const:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.const??t.value.enum[0]),1)]),_:1})])):(c=t.value)!=null&&c.type?(i.openBlock(),i.createElementBlock("div",D3,[t.additional?(i.openBlock(),i.createBlock(Bt,{key:0},{prefix:i.withCtx(()=>[i.createTextVNode("key:")]),default:i.withCtx(()=>[i.createTextVNode(" string ")]),_:1})):i.createCommentVNode("",!0),i.createVNode(Bt,null,i.createSlots({default:i.withCtx(()=>{var h,f,p;return[(f=(h=t.value)==null?void 0:h.items)!=null&&f.type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(t.value.type)+" "+i.toDisplayString(t.value.items.type)+"[] ",1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(Array.isArray(t.value.type)?t.value.type.join(" | "):t.value.type)+" "+i.toDisplayString((p=t.value)!=null&&p.nullable?" | nullable":""),1)],64)),t.value.minItems||t.value.maxItems?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(t.value.minItems)+"…"+i.toDisplayString(t.value.maxItems),1)],64)):i.createCommentVNode("",!0)]}),_:2},[t.additional?{name:"prefix",fn:i.withCtx(()=>[i.createTextVNode("value:")]),key:"0"}:void 0]),1024),t.value.minLength?(i.openBlock(),i.createBlock(Bt,{key:1},{prefix:i.withCtx(()=>[i.createTextVNode("min:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.minLength),1)]),_:1})):i.createCommentVNode("",!0),t.value.maxLength?(i.openBlock(),i.createBlock(Bt,{key:2},{prefix:i.withCtx(()=>[i.createTextVNode("max:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.maxLength),1)]),_:1})):i.createCommentVNode("",!0),t.value.uniqueItems?(i.openBlock(),i.createBlock(Bt,{key:3},{default:i.withCtx(()=>[i.createTextVNode(" unique! ")]),_:1})):i.createCommentVNode("",!0),t.value.format?(i.openBlock(),i.createBlock(Bt,{key:4},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.value.format),1)]),_:1})):i.createCommentVNode("",!0),t.value.minimum?(i.openBlock(),i.createBlock(Bt,{key:5},{prefix:i.withCtx(()=>[i.createTextVNode("min:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.minimum),1)]),_:1})):i.createCommentVNode("",!0),t.value.maximum?(i.openBlock(),i.createBlock(Bt,{key:6},{prefix:i.withCtx(()=>[i.createTextVNode("max:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.maximum),1)]),_:1})):i.createCommentVNode("",!0),t.value.pattern?(i.openBlock(),i.createBlock(Bt,{key:7,code:"",truncate:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.value.pattern),1)]),_:1})):i.createCommentVNode("",!0),t.$props.enum?(i.openBlock(),i.createBlock(Bt,{key:8},{default:i.withCtx(()=>[i.createTextVNode("enum")]),_:1})):i.createCommentVNode("",!0),t.value.default?(i.openBlock(),i.createBlock(Bt,{key:9,truncate:""},{prefix:i.withCtx(()=>[i.createTextVNode("default:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.default),1)]),_:1})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(d=t.value)!=null&&d.writeOnly?(i.openBlock(),i.createElementBlock("div",V3," write-only ")):(u=t.value)!=null&&u.readOnly?(i.openBlock(),i.createElementBlock("div",R3," read-only ")):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.filter(h=>{var f,p,y;return((f=t.value)==null?void 0:f[h])||((y=(p=t.value)==null?void 0:p.items)==null?void 0:y[h])}),h=>(i.openBlock(),i.createBlock(i.unref(Bi),{key:h},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(h),1)]),_:2},1024))),128))])}}}),j3=U(L3,[["__scopeId","data-v-c1c21610"]]),F3=r=>(i.pushScopeId("data-v-9c7a15fe"),r=r(),i.popScopeId(),r),q3={key:0,class:"property-description"},z3={key:1,class:"property-description"},H3={key:2,class:"property-example custom-scroll"},U3=F3(()=>i.createElementVNode("span",{class:"property-example-label"},"Example",-1)),K3={class:"property-example-value"},W3={key:3,class:"property-enum"},G3={key:0,class:"property-list"},J3={class:"property-heading"},Y3={class:"property-name"},X3={class:"property-description"},Q3={key:1,class:"property-enum-values"},Z3={key:4,class:"children"},eL={key:0,class:"children"},tL={key:0,class:"property-rule"},rL={key:1,class:"property-rule"},nL=i.defineComponent({__name:"SchemaProperty",props:{value:{},level:{default:0},name:{},required:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},description:{},additional:{type:Boolean}},setup(r){const e={integer:{_default:"Integer numbers.",int32:"Signed 32-bit integers (commonly used integer type).",int64:"Signed 64-bit integers (long type)."},string:{date:"full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21","date-time":"the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z",password:"a hint to UIs to mask the input",byte:"base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",binary:"binary data, used to describe files"}},t=function(a,l){return l!=null&&l.properties||l!=null&&l.additionalProperties?null:a||(l==null?void 0:l.description)||null},n=function(a){return!a||!e[a.type]?null:e[a.type][a.format||"_default"]},o=function(a){var l;return(a==null?void 0:a.enum)||((l=a==null?void 0:a.items)==null?void 0:l.enum)||[]},s=["oneOf","anyOf","allOf","not"];return(a,l)=>{var c,d,u,h,f,p,y,g,m,v,b;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["property",[`property--level-${a.level}`,{"property--compact":a.compact,"property--deprecated":(c=a.value)==null?void 0:c.deprecated}]])},[i.createVNode(j3,{additional:a.additional,enum:o(a.value).length>1,required:a.required,value:a.value},i.createSlots({_:2},[a.name?{name:"name",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.name),1)]),key:"0"}:void 0]),1032,["additional","enum","required","value"]),t(a.description,a.value)?(i.openBlock(),i.createElementBlock("div",q3,[i.createVNode(i.unref(wt),{value:t(a.description,a.value)},null,8,["value"])])):n(a.value)?(i.openBlock(),i.createElementBlock("div",z3,[i.createVNode(i.unref(wt),{value:n(a.value)||""},null,8,["value"])])):i.createCommentVNode("",!0),(d=a.value)!=null&&d.example||(h=(u=a.value)==null?void 0:u.items)!=null&&h.example?(i.openBlock(),i.createElementBlock("div",H3,[U3,i.createElementVNode("code",K3,i.toDisplayString(a.value.example||((f=a.value)==null?void 0:f.items.example)),1)])):i.createCommentVNode("",!0),((p=o(a.value))==null?void 0:p.length)>1?(i.openBlock(),i.createElementBlock("div",W3,[(y=a.value)!=null&&y["x-enumDescriptions"]?(i.openBlock(),i.createElementBlock("div",G3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o(a.value),w=>(i.openBlock(),i.createElementBlock("div",{key:w,class:"property"},[i.createElementVNode("div",J3,[i.createElementVNode("div",Y3,i.toDisplayString(w),1)]),i.createElementVNode("div",X3,[i.createVNode(i.unref(wt),{value:a.value["x-enumDescriptions"][w]},null,8,["value"])])]))),128))])):(i.openBlock(),i.createElementBlock("ul",Q3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o(a.value),w=>(i.openBlock(),i.createElementBlock("li",{key:w,class:"property-enum-value"},i.toDisplayString(w),1))),128))]))])):i.createCommentVNode("",!0),((g=a.value)==null?void 0:g.type)==="object"&&((m=a.value)!=null&&m.properties||(v=a.value)!=null&&v.additionalProperties)?(i.openBlock(),i.createElementBlock("div",Z3,[i.createVNode(qn,{compact:a.compact,level:a.level+1,value:a.value},null,8,["compact","level","value"])])):i.createCommentVNode("",!0),(b=a.value)!=null&&b.items?(i.openBlock(),i.createElementBlock(i.Fragment,{key:5},[["object"].includes(a.value.items.type)?(i.openBlock(),i.createElementBlock("div",eL,[i.createVNode(qn,{compact:a.compact,level:a.level+1,value:a.value.items},null,8,["compact","level","value"])])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(s,w=>{var S,x,k;return i.openBlock(),i.createElementBlock(i.Fragment,{key:w},[(S=a.value)!=null&&S[w]?(i.openBlock(),i.createElementBlock("div",tL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value[w],(C,N)=>(i.openBlock(),i.createBlock(qn,{key:N,compact:a.compact,level:a.level+1,value:C},null,8,["compact","level","value"]))),128))])):i.createCommentVNode("",!0),(k=(x=a.value)==null?void 0:x.items)!=null&&k[w]&&a.level<3?(i.openBlock(),i.createElementBlock("div",rL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value.items[w],(C,N)=>(i.openBlock(),i.createBlock(qn,{key:N,compact:a.compact,level:a.level+1,value:C},null,8,["compact","level","value"]))),128))])):i.createCommentVNode("",!0)],64)}),64))],2)}}}),Fn=U(nL,[["__scopeId","data-v-9c7a15fe"]]),oL=r=>(i.pushScopeId("data-v-7f5d0941"),r=r(),i.popScopeId(),r),sL={key:0,class:"schema-card-description"},iL=oL(()=>i.createElementVNode("polygon",{"fill-rule":"nonzero",points:"14 8 8 8 8 14 6 14 6 8 0 8 0 6 6 6 6 0 8 0 8 6 14 6"},null,-1)),aL=[iL],lL=i.defineComponent({__name:"Schema",props:{value:{},level:{default:0},name:{},compact:{type:Boolean},noncollapsible:{type:Boolean}},setup(r){const e=r,t=i.computed(()=>!(e.noncollapsible||e.level===0)),n=o=>e.noncollapsible&&o.stopPropagation();return(o,s)=>typeof o.value=="object"&&Object.keys(o.value).length?(i.openBlock(),i.createBlock(i.unref(Le.Disclosure),{key:0,defaultOpen:o.noncollapsible},{default:i.withCtx(({open:a})=>{var l;return[i.createElementVNode("div",{class:i.normalizeClass(["schema-card",[`schema-card--level-${o.level}`,{"schema-card--compact":o.compact,"schema-card--open":a}]])},[(l=o.value)!=null&&l.description?(i.openBlock(),i.createElementBlock("div",sL,[i.createVNode(i.unref(wt),{value:o.value.description},null,8,["value"])])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["schema-properties",{"schema-properties-open":a}])},[i.withDirectives(i.createVNode(i.unref(Le.DisclosureButton),{as:o.noncollapsible?"div":"button",class:i.normalizeClass(["schema-card-title",{"schema-card-title--compact":o.compact}]),style:i.normalizeStyle({top:`calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${o.level}))`}),onClickCapture:n},{default:i.withCtx(()=>{var c,d,u;return[o.compact?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:i.normalizeClass(["schema-card-title-icon",{"schema-card-title-icon--open":a}]),fill:"currentColor",height:"14",viewBox:"0 0 14 14",width:"14",xmlns:"http://www.w3.org/2000/svg"},aL,2)):i.createCommentVNode("",!0),a?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" Hide "+i.toDisplayString(((c=o.value)==null?void 0:c.title)??"Child Attributes"),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(" Show "+i.toDisplayString(((d=o.value)==null?void 0:d.title)??"Child Attributes"),1)],64))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[t.value?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,class:i.normalizeClass(["schema-card-title-icon",{"schema-card-title-icon--open":a}]),icon:"ChevronRight",size:"md"},null,8,["class"])):i.createCommentVNode("",!0),i.createVNode(lw,{name:((u=o.value)==null?void 0:u.title)??o.name,value:o.value},null,8,["name","value"])],64))]}),_:2},1032,["as","class","style"]),[[i.vShow,!(o.noncollapsible&&o.compact)]]),i.createVNode(i.unref(Le.DisclosurePanel),{static:o.noncollapsible},{default:i.withCtx(()=>{var c;return[o.value.properties||o.value.additionalProperties?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[o.value.properties?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(Object.keys((c=o.value)==null?void 0:c.properties),d=>{var u;return i.openBlock(),i.createBlock(Fn,{key:d,compact:o.compact,level:o.level,name:d,required:o.value.required&&o.value.required.length&&o.value.required.includes(d),value:(u=o.value.properties)==null?void 0:u[d]},null,8,["compact","level","name","required","value"])}),128)):i.createCommentVNode("",!0),o.value.additionalProperties?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[o.value.additionalProperties===!0||Object.keys(o.value.additionalProperties).length===0||!o.value.additionalProperties.type?(i.openBlock(),i.createBlock(Fn,{key:0,additional:"",compact:o.compact,level:o.level,noncollapsible:"",value:{type:"any",...o.value.additionalProperties}},null,8,["compact","level","value"])):(i.openBlock(),i.createBlock(Fn,{key:1,additional:"",compact:o.compact,level:o.level,noncollapsible:"",value:o.value.additionalProperties},null,8,["compact","level","value"]))],64)):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(Fn,{key:1,compact:o.compact,level:o.level,name:o.value.name,value:o.value},null,8,["compact","level","name","value"]))]}),_:1},8,["static"])],2)],2)]}),_:1},8,["defaultOpen"])):i.createCommentVNode("",!0)}}),qn=U(lL,[["__scopeId","data-v-7f5d0941"]]),cL={class:"parameter-item"},dL={class:"parameter-item-container"},uL=i.defineComponent({__name:"ParameterItem",props:{parameter:{},showChildren:{type:Boolean,default:!1}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("li",cL,[i.createElementVNode("div",dL,[i.createVNode(i.unref(Fn),{compact:"",description:e.parameter.description,level:0,name:e.parameter.name,noncollapsible:e.showChildren,required:e.parameter.required,value:e.parameter.schema},null,8,["description","name","noncollapsible","required","value"])])]))}}),hL=U(uL,[["__scopeId","data-v-f70ee55c"]]),fL={key:0,class:"parameters"},pL={class:"parameters-title"},mL={class:"parameter-list"},gL=i.defineComponent({__name:"Parameters",props:{parameters:{},showChildren:{type:Boolean,default:!1}},setup(r){return(e,t)=>{var n;return(n=e.parameters)!=null&&n.length?(i.openBlock(),i.createElementBlock("div",fL,[i.createElementVNode("div",pL,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("ul",mL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.parameters,o=>(i.openBlock(),i.createBlock(hL,{key:o.name,parameter:o,showChildren:e.showChildren},null,8,["parameter","showChildren"]))),128))])])):i.createCommentVNode("",!0)}}}),Kt=U(gL,[["__scopeId","data-v-45fca787"]]),yL={key:0},vL={class:"request-body-title"},bL=["value"],wL={key:0,class:"request-body-description"},kL={key:0,class:"request-body-schema"},SL=i.defineComponent({__name:"RequestBody",props:{requestBody:{}},setup(r){var o;const e=r,t=i.computed(()=>{var s;return(s=e.requestBody)!=null&&s.content?Object.keys(e.requestBody.content):[]}),n=i.ref("application/json");return(o=e.requestBody)!=null&&o.content&&t.value.length>0&&(n.value=t.value[0]),(s,a)=>{var l,c,d,u;return e!=null&&e.requestBody?(i.openBlock(),i.createElementBlock("div",yL,[i.createElementVNode("div",vL,[i.renderSlot(s.$slots,"title",{},void 0,!0),i.createElementVNode("div",{class:i.normalizeClass(["request-body-title-select",{"request-body-title-no-select":t.value.length<=1}])},[i.createElementVNode("span",null,i.toDisplayString(n.value),1),e!=null&&e.requestBody&&t.value.length>1?i.withDirectives((i.openBlock(),i.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=h=>n.value=h)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((l=e.requestBody)==null?void 0:l.content,(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,value:f},i.toDisplayString(f),9,bL))),128))],512)),[[i.vModelSelect,n.value]]):i.createCommentVNode("",!0)],2),e!=null&&e.requestBody.description?(i.openBlock(),i.createElementBlock("div",wL,[i.createVNode(i.unref(wt),{value:e.requestBody.description},null,8,["value"])])):i.createCommentVNode("",!0)]),(c=e==null?void 0:e.requestBody.content)!=null&&c[n.value]?(i.openBlock(),i.createElementBlock("div",kL,[i.createVNode(i.unref(qn),{compact:"",noncollapsible:"",value:(u=(d=e==null?void 0:e.requestBody.content)==null?void 0:d[n.value])==null?void 0:u.schema},null,8,["value"])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)}}}),Zf=U(SL,[["__scopeId","data-v-e095eb63"]]),xL={class:"endpoint-details"},CL={class:"endpoint-description"},EL=i.defineComponent({__name:"EndpointDetails",props:{operation:{}},setup(r){const e=r,{parameterMap:t}=Kf(e),{responses:n}=Wf(e.operation);return(o,s)=>{var a,l;return i.openBlock(),i.createElementBlock("div",xL,[i.createElementVNode("div",CL,[i.createVNode(i.unref(wt),{value:o.operation.description,withImages:""},null,8,["value"])]),i.createVNode(Kt,{parameters:i.unref(t).path},{title:i.withCtx(()=>[i.createTextVNode("Path Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{parameters:i.unref(t).query},{title:i.withCtx(()=>[i.createTextVNode("Query Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{parameters:i.unref(t).header},{title:i.withCtx(()=>[i.createTextVNode("Headers")]),_:1},8,["parameters"]),i.createVNode(Kt,{parameters:i.unref(t).body,showChildren:""},{title:i.withCtx(()=>[i.createTextVNode("Body Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{parameters:i.unref(t).formData},{title:i.withCtx(()=>[i.createTextVNode("Form Data")]),_:1},8,["parameters"]),(a=o.operation.information)!=null&&a.requestBody?(i.openBlock(),i.createBlock(Zf,{key:0,requestBody:(l=o.operation.information)==null?void 0:l.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Body")]),_:1},8,["requestBody"])):i.createCommentVNode("",!0),i.createVNode(Kt,{parameters:i.unref(n)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])])}}}),$L={key:0},_L=i.defineComponent({__name:"EndpointPath",props:{path:{},deprecated:{type:Boolean}},setup(r){const e=r,t=o=>o.startsWith("{")&&o.endsWith("}"),n=i.computed(()=>e.path.split(/({[^}]+})/));return(o,s)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["endpoint-path",{deprecated:o.deprecated}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:l},[t(a)?(i.openBlock(),i.createElementBlock("em",$L,i.toDisplayString(a),1)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(a),1)],64))],64))),128))],2))}}),Uu=U(_L,[["__scopeId","data-v-a4eadd9b"]]);function ra(r){return r.reduce((e,t)=>(e[t.name]=t.value,e),{})}function NL(r){return/\s|-/.test(r)}function kr(r,e=0){let t=[],n=" ".repeat(e),o=" ".repeat(e+2);for(const[s,a]of Object.entries(r)){let l=NL(s)?`'${s}'`:s;if(Array.isArray(a)){const c=a.map(d=>typeof d=="string"?`'${d}'`:d&&typeof d=="object"?kr(d,e+2):d).join(`, ${o}`);t.push(`${o}${l}: [${c}]`)}else if(a&&typeof a=="object")t.push(`${o}${l}: ${kr(a,e+2)}`);else if(typeof a=="string"){let c=`${a}`;if(a.startsWith("JSON.stringify")){const d=a.split(`
215
+ `,s),o===void 0?(t(((n=s==null?void 0:s[0])==null?void 0:n.error)??"Failed to parse the OpenAPI file."),e(Ra(Un()))):e(Ra(o))}catch(o){t(o)}return e(Ra(Un()))}),Ra=r=>{let e={};r&&typeof r=="object"?e=structuredClone(r):e=Un(),e.tags||(e.tags=[]),e.paths||(e.paths={});const t={};return Object.keys(e.webhooks??{}).forEach(o=>{var s;Object.keys(((s=e.webhooks)==null?void 0:s[o])??{}).forEach(a=>{var c,d,u;const l=(c=e.webhooks)==null?void 0:c[o][a];(l==null?void 0:l["x-internal"])!==!0&&(t[o]===void 0&&(t[o]={}),t[o][a]={httpVerb:a,path:o,operationId:(l==null?void 0:l.operationId)||o,name:(l==null?void 0:l.summary)||o||"",description:(l==null?void 0:l.description)||"",pathParameters:(u=(d=e.paths)==null?void 0:d[o])==null?void 0:u.parameters,information:{...l}})})}),Object.keys(e.paths).forEach(o=>{Object.keys(e.paths[o]).filter(a=>sh.includes(a.toUpperCase())).forEach(a=>{var d,u,h,f,p,y;const l=e.paths[o][a];if(l===void 0||l["x-internal"]===!0)return;const c={httpVerb:a,path:o,operationId:l.operationId||o,name:l.summary||o||"",description:l.description||"",information:{...l},pathParameters:(u=(d=e.paths)==null?void 0:d[o])==null?void 0:u.parameters};if(!l.tags||l.tags.length===0){(h=e.tags)!=null&&h.find(m=>m.name==="default")||(f=e.tags)==null||f.push({name:"default",description:"",operations:[]});const g=(p=e.tags)==null?void 0:p.findIndex(m=>m.name==="default");g>=0&&((y=e.tags[g])==null||y.operations.push(c))}else l.tags.forEach(g=>{var b,w,S;const m=(b=e.tags)==null?void 0:b.findIndex(x=>x.name===g);m===-1&&((w=e.tags)==null||w.push({name:g,description:""}));const v=m!==-1?m:e.tags.length-1;typeof((S=e.tags[v])==null?void 0:S.operations)>"u"&&(e.tags[v].operations=[]),e.tags[v].operations.push(c)})})}),{...e,webhooks:t}},Rc=Symbol(),Hf=Symbol(),Ti=async r=>{var e;(e=document.getElementById(r))==null||e.scrollIntoView()},wr=r=>new Promise(e=>setTimeout(e,r)),P5=Symbol("downloadSpec"),Uf=Xe.useEventBus(P5);function z1(r,e){const t=m0(r),n=t?new Blob([r],{type:"application/json"}):new Blob([r],{type:"application/x-yaml"}),o=URL.createObjectURL(n),s=t?".json":".yaml",a="spec"+s,l=e?e+s:a,c=document.createElement("a");c.href=o,c.download=l,c.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{window.URL.revokeObjectURL(o),c.remove()},100)}function H1(r,e=1){const t=new RegExp(`^(?=#{${e}} )`,"m");return r.split(t).map(n=>n.trim()).filter(Boolean)}const ws=()=>{const{toast:r}=$h();return{copyToClipboard:t=>{navigator.clipboard.writeText(t).then(()=>{r("Copied to the clipboard","info")})}}},Jr=i.ref(!1);function I5(r){var o;const e=()=>{var a,l;const s=typeof window<"u"?(a=window.localStorage)==null?void 0:a.getItem("isDark"):null;return typeof s=="string"?!!JSON.parse(s):!!(typeof window<"u"&&((l=window==null?void 0:window.matchMedia("(prefers-color-scheme: dark)"))!=null&&l.matches))},t=()=>{var s;Jr.value=!Jr.value,typeof window<"u"&&((s=window==null?void 0:window.localStorage)==null||s.setItem("isDark",JSON.stringify(Jr.value)))};function n(s){var a;Jr.value=s,typeof window<"u"&&((a=window==null?void 0:window.localStorage)==null||a.setItem("isDark",JSON.stringify(Jr.value)))}return Jr.value=(typeof window>"u"?null:JSON.parse(((o=window.localStorage)==null?void 0:o.getItem("isDark"))||"null"))??r??e(),i.watch(Jr,s=>{typeof document>"u"||(document.body.classList.toggle("dark-mode",s),document.body.classList.toggle("light-mode",!s))},{immediate:!0}),{isDark:Jr,toggleDarkMode:t,setDarkMode:n}}const Ug="https://api.scalar.com/request-proxy",La="https://proxy.scalar.com",M5="http://localhost:5051";function D5(r){i.watch(()=>r,()=>{var e;r.proxy===Ug?(console.warn(`[DEPRECATED] Warning: configuration.proxy points to our old proxy (${Ug}).`),console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${La}) instead.`),r.proxy=La,console.warn(`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${La}). Read more: https://github.com/scalar/scalar`)):(e=r.proxy)!=null&&e.length&&r.proxy!==La&&r.proxy!==M5&&(console.warn(`[DEPRECATED] Warning: configuration.proxy points to a custom proxy (${r==null?void 0:r.proxy}).`),console.warn("[DEPRECATED] Action Required: You need to use our new proxy (written in Go). Read more: https://github.com/scalar/scalar/tree/main/examples/proxy-server"))},{immediate:!0})}const Dl=i.ref(ts.hash??""),Vl=i.ref(),V5=i.ref(!1),R5=r=>r.slug?`description/${r.slug}`:"",U1=r=>{var t;if(!Vl.value)return"";const e=new RegExp("^"+((t=Vl.value)==null?void 0:t.basePath)+"/?");return decodeURIComponent(r.replace(e,""))},L5=(r,e)=>{if(!r)return"webhooks";const t=Pi.slug(r),n=encodeURIComponent(t);return`webhook/${e}/${n}`},j5=r=>{if(!r)return"models";const e=Pi.slug(r);return`model/${encodeURIComponent(e)}`},F5=(r,e)=>`${K1(e)}/${r.httpVerb}${r.path}`,K1=({name:r})=>{const e=Pi.slug(r);return`tag/${encodeURIComponent(e)}`},q5=(r=Dl.value)=>{var o;console.log("hashStr",Dl.value);const e=(o=r.match(/(tag\/[^/]+)/))==null?void 0:o[0],t=r.startsWith("model")?"models":"",n=r.startsWith("webhook")?"webhooks":"";return e||t||n},z5=()=>{Dl.value=Vl.value?U1(window.location.pathname):decodeURIComponent(window.location.hash.replace(/^#/,""))},ct=()=>({hash:Dl,getWebhookId:L5,getModelId:j5,getHeadingId:R5,getOperationId:F5,getPathRoutingId:U1,getSectionId:q5,getTagId:K1,isIntersectionEnabled:V5,pathRouting:Vl,updateHash:z5});function Kf(r){return{parameterMap:i.computed(()=>{var o;const t=((o=r.operation.information)==null?void 0:o.parameters)??[],n={path:[],query:[],header:[],body:[],formData:[]};return r.operation.pathParameters&&r.operation.pathParameters.forEach(s=>{s.in==="path"?n.path.push(s):s.in==="query"?n.query.push(s):s.in==="header"?n.header.push(s):s.in==="body"?n.body.push(s):s.in==="formData"&&n.formData.push(s)}),t&&t.forEach(s=>{s.in==="path"?n.path.push(s):s.in==="query"?n.query.push(s):s.in==="header"?n.header.push(s):s.in==="body"?n.body.push(s):s.in==="formData"&&n.formData.push(s)}),n})}}const H5=async({url:r,content:e},t)=>{if(r)return Gv(r)?await bp(r,t):await bp(r);const n=typeof e=="function"?e():e;if(typeof n=="string")return n;if(typeof n=="object")return fi(n)};function W1({specConfig:r,proxy:e}){const t=i.ref(""),n=i.reactive(Un()),o=i.ref(null);function s(a){return a?q1(a).then(l=>{o.value=null,Object.assign(n,{servers:[],...l})}).catch(l=>{o.value=l.toString()}):Object.assign(n,Un())}return i.watch(()=>i.toValue(r),async a=>{var l;if(a){const c=(l=await H5(a,i.toValue(e)))==null?void 0:l.trim();typeof c=="string"&&(t.value=c)}},{immediate:!0,deep:!0}),i.watch(t,()=>{s(t.value)}),{rawSpec:t,parsedSpec:n,specErrors:o}}function Wf(r){return{responses:i.computed(()=>{if(!r.information)return[];const{responses:t}=r.information,n=[];return t&&Object.keys(t).forEach(o=>{n.push({name:o,description:t[o].description})}),n})}}const{getHeadingId:Kg,getModelId:Wg,getOperationId:Gg,getSectionId:U5,getTagId:G1,getWebhookId:Cd,hash:zu}=ct(),Je=i.ref(void 0);function K5(r){return Je.value=r}const J1=i.ref(!1),Rl=i.reactive(ts["useSidebarContent-collapsedSidebarItems"]??{});function W5(r){Rl[r]=!Rl[r]}function Ed(r,e){Rl[r]=e}const Ll=i.ref([]),G5=async r=>{const e=await Ei(r),t=nc(e);return e.filter(n=>n.depth===t||n.depth===t+1)},Y1=i.computed(()=>{var h,f,p,y,g,m,v,b,w,S;const{state:r}=Fl(),e={},{openApi:{globalSecurity:t}}=nh(),n=[];let o=null;Ll.value.forEach(x=>{var k;x.depth===nc(Ll.value)?(o={id:Kg(x),title:x.value,show:!r.showApiClient,children:[]},n.push(o)):o&&((k=o.children)==null||k.push({id:Kg(x),title:x.value,show:!r.showApiClient}))});const s=(f=(h=Je.value)==null?void 0:h.tags)==null?void 0:f[0],l=s&&(x=>(x==null?void 0:x.length)!==1||x[0].name!=="default"||x[0].description!=="")((p=Je.value)==null?void 0:p.tags)?(g=(y=Je.value)==null?void 0:y.tags)==null?void 0:g.filter(x=>{var k;return((k=x.operations)==null?void 0:k.length)>0}).map(x=>{var k;return{id:G1(x),title:x.name,displayTitle:x["x-displayName"]??x.name,show:!0,children:(k=x.operations)==null?void 0:k.map(C=>{var M;const N=Gg(C,x),P=C.name??C.path;return e[N]=P,{id:N,title:P,httpVerb:C.httpVerb,deprecated:((M=C.information)==null?void 0:M.deprecated)??!1,show:!0,select:()=>{r.showApiClient&&$l(C,t)}}})}}):(m=s==null?void 0:s.operations)==null?void 0:m.map(x=>{var N;const k=Gg(x,s),C=x.name??x.path;return e[k]=C,{id:k,title:C,httpVerb:x.httpVerb,deprecated:((N=x.information)==null?void 0:N.deprecated)??!1,show:!0,select:()=>{r.showApiClient&&$l(x,t)}}}),c=Ih(Je.value)&&!J1.value?[{id:Wg(),title:"Models",show:!r.showApiClient,children:Object.keys(Jt(Je.value)??{}).map(x=>{var C;const k=Wg(x);return e[k]=x,{id:k,title:((C=Jt(Je.value))==null?void 0:C[x]).title??x,show:!r.showApiClient}})}]:[],d=(v=Je.value)!=null&&v["x-tagGroups"]?(w=(b=Je.value)==null?void 0:b["x-tagGroups"])==null?void 0:w.map(x=>{const k=[];return x.tags.map(N=>{if(N==="models"&&c.length>0)k.push(c[0]);else{const P=l==null?void 0:l.find(M=>M.title===N);P&&k.push(P)}}),{id:x.name,title:x.name,children:k,show:!0,isGroup:!0}}):void 0,u=Wv(Je.value)?[{id:Cd(),title:"Webhook",show:!r.showApiClient,children:Object.keys(((S=Je.value)==null?void 0:S.webhooks)??{}).map(x=>{var C,N;const k=Cd(x);return e[k]=x,Object.keys(((N=(C=Je.value)==null?void 0:C.webhooks)==null?void 0:N[x])??{}).map(P=>{var M,j,I;return{id:Cd(x,P),title:(I=(j=(M=Je.value)==null?void 0:M.webhooks)==null?void 0:j[x][P])==null?void 0:I.name,httpVerb:P,show:!r.showApiClient}})}).flat()}]:[];return{entries:[...n,...d??l??[],...d?[]:u,...d?[]:c],titles:e}}),J5=i.ref(!1),Y5=i.computed(()=>{var r,e;return((e=(r=Y1.value)==null?void 0:r.titles)==null?void 0:e[zu.value])??""});function tr(r){return r!=null&&r.parsedSpec&&(Je.value=r.parsedSpec,i.watch(()=>{var e,t;return(t=(e=Je.value)==null?void 0:e.tags)==null?void 0:t.length},()=>{var e,t;if(zu.value){const n=U5(zu.value);n&&Ed(n,!0)}else{const n=(t=(e=Je.value)==null?void 0:e.tags)==null?void 0:t[0];n&&Ed(G1(n),!0)}}),i.watch(()=>{var e,t;return(t=(e=Je.value)==null?void 0:e.info)==null?void 0:t.description},async()=>{var t,n;const e=(n=(t=Je.value)==null?void 0:t.info)==null?void 0:n.description;return e?Ll.value=await G5(e):Ll.value=[]})),{breadcrumb:Y5,items:Y1,isSidebarOpen:J5,collapsedSidebarItems:Rl,toggleCollapsedSidebarItem:W5,setCollapsedSidebarItem:Ed,hideModels:J1,setParsedSpec:K5}}const X5=i.defineComponent({__name:"SidebarHttpBadge",props:{active:{type:Boolean},method:{}},setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(oo),{class:i.normalizeClass(["sidebar-heading-type",{"sidebar-heading-type-active":e.active}]),method:e.method,property:"--method-color",short:""},null,8,["class","method"]))}}),X1=U(X5,[["__scopeId","data-v-9e6d2bc7"]]),Q5=["id"],Z5={key:0,class:"sidebar-heading-chevron"},eV=["href"],tV={class:"sidebar-heading-link-title"},rV={key:1,class:"sidebar-heading-link-method"},nV={key:1,class:"action-menu"},oV=i.defineComponent({__name:"SidebarElement",props:{id:{},item:{},isActive:{type:Boolean},hasChildren:{type:Boolean},open:{type:Boolean}},emits:["toggleOpen"],setup(r,{emit:e}){const t=r,n=e,{hash:o,isIntersectionEnabled:s,pathRouting:a}=ct(),l=async()=>{var u,h;t.hasChildren&&n("toggleOpen"),(h=(u=t.item)==null?void 0:u.select)==null||h.call(u),t.open&&(s.value=!1,await wr(100),s.value=!0)},c=()=>{if(a.value)return a.value.basePath+"/"+t.item.id;{const u=new URL(window.location.href);return u.hash=t.item.id,`${u.pathname}${u.search}${u.hash}`}},d=async u=>{var h,f;if(a.value){u.preventDefault(),t.hasChildren&&n("toggleOpen"),(f=(h=t.item)==null?void 0:h.select)==null||f.call(h),n("toggleOpen"),s.value=!1,o.value=t.item.id;const p=new URL(window.location.href);p.pathname=a.value.basePath+"/"+t.item.id,window.history.pushState({},"",p),Ti(t.item.id),await wr(100),s.value=!0}};return(u,h)=>{var f,p;return i.openBlock(),i.createElementBlock("li",{id:u.id,class:"sidebar-group-item"},[i.createElementVNode("div",{class:i.normalizeClass(["sidebar-heading",{"sidebar-group-item__folder":u.hasChildren,active_page:u.isActive,deprecated:u.item.deprecated??!1}]),onClick:l},[u.hasChildren?(i.openBlock(),i.createElementBlock("p",Z5,[i.createVNode(i.unref(ji),{class:"toggle-nested-icon",icon:u.open?"ChevronDown":"ChevronRight",label:"Toggle group",size:"xs",onClick:i.withModifiers(l,["stop"])},null,8,["icon"]),i.createTextVNode("   ")])):i.createCommentVNode("",!0),i.createElementVNode("a",{class:"sidebar-heading-link",href:c(),onClick:d},[(p=(f=u.item)==null?void 0:f.icon)!=null&&p.src?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,class:"sidebar-icon",icon:u.item.icon.src},null,8,["icon"])):i.createCommentVNode("",!0),i.createElementVNode("p",tV,i.toDisplayString(u.item.title),1),u.item.httpVerb&&!u.hasChildren?(i.openBlock(),i.createElementBlock("p",rV,[i.createTextVNode("   "),i.createVNode(X1,{active:u.isActive,method:u.item.httpVerb},null,8,["active","method"])])):i.createCommentVNode("",!0)],8,eV)],2),u.open?i.renderSlot(u.$slots,"default",{key:0},void 0,!0):i.createCommentVNode("",!0),u.$slots["action-menu"]?(i.openBlock(),i.createElementBlock("div",nV,[i.renderSlot(u.$slots,"action-menu",{},void 0,!0)])):i.createCommentVNode("",!0)],8,Q5)}}}),ja=U(oV,[["__scopeId","data-v-4ed1078c"]]),sV=i.defineComponent({__name:"SidebarGroup",props:{level:{}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("ul",{class:"sidebar-group sidebar-indent-nested",style:i.normalizeStyle({"--scalar-sidebar-level":e.level})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),$d=U(sV,[["__scopeId","data-v-39c84840"]]),iV={class:"sidebar"},aV={class:"sidebar-group-title"},lV=-160,cV=i.defineComponent({__name:"Sidebar",props:{parsedSpec:{}},setup(r){const e=r,{hash:t,isIntersectionEnabled:n}=ct(),{items:o,toggleCollapsedSidebarItem:s,collapsedSidebarItems:a}=tr({parsedSpec:e.parsedSpec}),l=i.ref(null),c=i.ref(!0);i.watch(t,u=>{!n.value||c.value||typeof window>"u"||d(u)});const d=u=>{var p,y,g,m;const h=document.getElementById(`sidebar-${u}`);if(!h||!l.value)return;let f=lV;h.getAttribute("data-sidebar-type")==="heading"?f+=h.offsetTop+((p=h.getElementsByClassName("sidebar-heading"))==null?void 0:p[0]).offsetHeight:f+=h.offsetTop+(((y=h.parentElement)==null?void 0:y.offsetTop)??0)+(((m=(g=h.parentElement)==null?void 0:g.parentElement)==null?void 0:m.offsetTop)??0),l.value.scrollTo({top:f,behavior:"smooth"})};return i.onMounted(()=>{setTimeout(()=>d(t.value),500),c.value=!1}),(u,h)=>(i.openBlock(),i.createElementBlock("div",iV,[i.renderSlot(u.$slots,"sidebar-start",{},void 0,!0),i.createElementVNode("div",{ref_key:"scrollerEl",ref:l,class:"sidebar-pages custom-scroll custom-scroll-self-contain-overflow"},[i.createVNode($d,{level:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o).entries,f=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:f.id},[f.isGroup?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("li",aV,i.toDisplayString(f.displayTitle??f.title),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.children,p=>(i.openBlock(),i.createBlock(ja,{key:p.id,id:`sidebar-${p.id}`,"data-sidebar-type":"heading",hasChildren:p.children&&p.children.length>0,isActive:i.unref(t)===p.id,item:{id:p.id,title:p.displayTitle??p.title,select:p.select,httpVerb:p.httpVerb,deprecated:p.deprecated??!1},open:i.unref(a)[p.id]??!1,onToggleOpen:async()=>{c.value=!0,i.unref(s)(p.id),await i.unref(wr)(100),c.value=!1}},{default:i.withCtx(()=>{var y;return[p.children&&((y=p.children)==null?void 0:y.length)>0?(i.openBlock(),i.createBlock($d,{key:0,level:1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.children,g=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:g.id},[f.show?(i.openBlock(),i.createBlock(ja,{key:0,id:`sidebar-${g.id}`,isActive:i.unref(t)===g.id,item:{id:g.id,title:g.displayTitle??g.title,select:g.select,httpVerb:g.httpVerb,deprecated:g.deprecated??!1}},null,8,["id","isActive","item"])):i.createCommentVNode("",!0)],64))),128))]),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","hasChildren","isActive","item","open","onToggleOpen"]))),128))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[f.show?(i.openBlock(),i.createBlock(ja,{key:0,id:`sidebar-${f.id}`,"data-sidebar-type":"heading",hasChildren:f.children&&f.children.length>0,isActive:i.unref(t)===f.id,item:{id:f.id,title:f.displayTitle??f.title,select:f.select,httpVerb:f.httpVerb,deprecated:f.deprecated??!1},open:i.unref(a)[f.id]??!1,onToggleOpen:async()=>{c.value=!0,i.unref(s)(f.id),await i.unref(wr)(100),c.value=!1}},{default:i.withCtx(()=>{var p;return[f.children&&((p=f.children)==null?void 0:p.length)>0?(i.openBlock(),i.createBlock($d,{key:0,level:1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.children,y=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:y.id},[f.show?(i.openBlock(),i.createBlock(ja,{key:0,id:`sidebar-${y.id}`,isActive:i.unref(t)===y.id,item:{id:y.id,title:y.displayTitle??y.title,select:y.select,httpVerb:y.httpVerb,deprecated:y.deprecated??!1}},null,8,["id","isActive","item"])):i.createCommentVNode("",!0)],64))),128))]),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","hasChildren","isActive","item","open","onToggleOpen"])):i.createCommentVNode("",!0)],64))],64))),128))]),_:1})],512),i.renderSlot(u.$slots,"sidebar-end",{},void 0,!0)]))}}),Gf=U(cV,[["__scopeId","data-v-e68ba74a"]]),dV={key:0,class:"api-client-drawer"},uV={class:"api-client-container"},hV={class:"scalar-api-client-height"},fV={class:"scalar-api-client-states"},pV={class:"t-doc__sidebar"},mV=i.defineComponent({__name:"ApiClientModal",props:{parsedSpec:{},overloadShow:{type:Boolean},proxyUrl:{},theme:{}},emits:["toggleDarkMode"],setup(r){const e=i.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-2RHVMUuR.cjs")).then(a=>a.ApiClient)),{hideApiClient:t,state:n}=Fl(),o=Xe.useMediaQuery("(max-width: 1000px)"),s=i.ref(!1);return(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(n).showApiClient||a.overloadShow?(i.openBlock(),i.createElementBlock("div",dV,[i.createElementVNode("div",uV,[i.renderSlot(a.$slots,"header",{},void 0,!0),i.createElementVNode("div",hV,[i.createVNode(i.unref(e),{proxyUrl:a.proxyUrl,showSideBar:s.value,theme:a.theme??"none",withDefaultFonts:!1,onEscapeKeyPress:i.unref(t),onToggleSidebar:l[2]||(l[2]=c=>s.value=!s.value)},{"address-bar-controls":i.withCtx(()=>[i.createElementVNode("div",fV,[i.createElementVNode("button",{class:"scalar-api-client-states-button scalar-api-client-states-button__endpoints",type:"button",onClick:l[0]||(l[0]=c=>s.value=!s.value)},[i.createVNode(i.unref(Me),{icon:s.value?"SideBarClosed":"SideBarOpen",size:"sm"},null,8,["icon"])]),i.createElementVNode("button",{class:"scalar-api-client-states-button",type:"button",onClick:l[1]||(l[1]=(...c)=>i.unref(t)&&i.unref(t)(...c))},[i.createVNode(i.unref(Me),{icon:"Close",size:"sm"})])])]),sidebar:i.withCtx(()=>[i.createElementVNode("div",pV,[i.withDirectives(i.createVNode(i.unref(Gf),{parsedSpec:a.parsedSpec},{"sidebar-start":i.withCtx(()=>[i.renderSlot(a.$slots,"sidebar-start",{},void 0,!0)]),_:3},8,["parsedSpec"]),[[i.vShow,!i.unref(o)]])])]),_:3},8,["proxyUrl","showSideBar","theme","onEscapeKeyPress"])])])])):i.createCommentVNode("",!0),i.unref(n).showApiClient?(i.openBlock(),i.createElementBlock("div",{key:1,class:"api-client-drawer-exit",onClick:l[3]||(l[3]=(...c)=>i.unref(t)&&i.unref(t)(...c))})):i.createCommentVNode("",!0)],64))}}),Q1=U(mV,[["__scopeId","data-v-206ad1a1"]]);function Z1(r){var e;return((e=zo.value.find(t=>t.key===r.targetKey))==null?void 0:e.title)??r.targetKey}function ew(r){var e,t;return((t=(e=zo.value.find(n=>n.key===r.targetKey))==null?void 0:e.clients.find(n=>n.key===r.clientKey))==null?void 0:t.title)??r.clientKey}const gV=i.computed(()=>Z1(ro)),yV=i.computed(()=>ew(ro));function tw(r,e){return e.value===!0?[]:r.flatMap(t=>{var n;return typeof e.value!="object"?[]:Array.isArray(e.value)?(t.clients=t.clients.filter(o=>!e.value.includes(o.key)),[t]):e.value[t.key]===!0?[]:(Array.isArray(e.value[t.key])&&(t.clients=t.clients.filter(o=>!e.value[t.key].includes(o.key))),(n=t==null?void 0:t.clients)!=null&&n.length?[t]:[])})}const zo=i.computed(()=>{var e;const r=e0.availableTargets();return(e=r.find(t=>t.key==="node"))==null||e.clients.unshift({description:"An HTTP/1.1 client, written from scratch for Node.js.",key:"undici",link:"https://github.com/nodejs/undici",title:"undici"}),tw(r,Hu)}),Jg={node:["unirest"]},Hu=i.ref({...Jg===!0?{}:Jg}),Jf=()=>{var e,t,n,o;return zo.value.find(s=>s.key==="shell"&&s.clients.find(a=>a.key==="curl"))?{targetKey:"shell",clientKey:"curl"}:{targetKey:(e=zo.value[0])==null?void 0:e.key,clientKey:(o=(n=(t=zo.value[0])==null?void 0:t.clients)==null?void 0:n[0])==null?void 0:o.key}},ro=i.reactive(Jf());function vV(){oc(ro,Jf())}const bV=r=>{Object.assign(ro,{...ro,...r})},ks=()=>({httpClient:i.readonly(ro),resetState:vV,setHttpClient:bV,excludedClients:i.readonly(Hu),setExcludedClients:r=>{Hu.value=r,oc(ro,Jf())},availableTargets:zo,getClientTitle:ew,getTargetTitle:Z1,httpTargetTitle:gV,httpClientTitle:yV}),wV={key:0},kV={class:"authentication-header"},SV={class:"selector"},xV={key:0,class:"authentication-content"},CV=i.defineComponent({__name:"Authentication",props:{parsedSpec:{},proxy:{}},setup(r){const e=r,{authentication:t,setAuthentication:n}=ns(),o=i.computed(()=>{var a,l,c;if(!t.preferredSecurityScheme)return!1;const s=(c=(l=(a=e.parsedSpec)==null?void 0:a.components)==null?void 0:l.securitySchemes)==null?void 0:c[t.preferredSecurityScheme];return!!s&&"type"in s&&!!s.type});return i.watch(()=>{var s,a;return(a=(s=e.parsedSpec)==null?void 0:s.components)==null?void 0:a.securitySchemes},()=>{var s,a;n({securitySchemes:(a=(s=e.parsedSpec)==null?void 0:s.components)==null?void 0:a.securitySchemes})},{deep:!0,immediate:!0}),i.onServerPrefetch(async()=>{const s=i.useSSRContext();await wr(1),s.payload.data["useGlobalStore-authentication"]=t}),(s,a)=>{var l,c,d,u,h;return i.unref(Kv)(s.parsedSpec)?(i.openBlock(),i.createElementBlock("div",wV,[i.createElementVNode("div",kV,[i.createElementVNode("div",SV,[i.createVNode(i.unref(Hv),{value:(c=(l=s.parsedSpec)==null?void 0:l.components)==null?void 0:c.securitySchemes},null,8,["value"])])]),o.value?(i.openBlock(),i.createElementBlock("div",xV,[i.unref(t).preferredSecurityScheme?(i.openBlock(),i.createBlock(i.unref(zv),{key:0,proxy:s.proxy,value:(h=(u=(d=s.parsedSpec)==null?void 0:d.components)==null?void 0:u.securitySchemes)==null?void 0:h[i.unref(t).preferredSecurityScheme]},null,8,["proxy","value"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)}}}),EV=U(CV,[["__scopeId","data-v-adb00e96"]]),$V=["innerHTML"],_V=i.defineComponent({__name:"MarkdownRenderer",props:{value:{},withImages:{type:Boolean,default:!1}},setup(r){const e=r,t=i.ref(""),n=e.withImages?[]:["img","picture"],o={...la.defaultSchema,tagNames:[...(la.defaultSchema.tagNames||[]).filter(s=>!n.includes(s)),"abbr"],attributes:{...la.defaultSchema.attributes,abbr:["title"]}};return i.watch(()=>e.value,async()=>{const s=await Zg.unified().use(Qg).use(zw).use(Hw,{allowDangerousHtml:!0}).use(Fw).use(la,o).use(jw,{detect:!0}).use(Rw,{target:"_blank"}).use(Lw).use(qw).process(e.value);t.value=String(s.value)},{immediate:!0}),i.onServerPrefetch(async()=>await wr(1)),(s,a)=>(i.openBlock(),i.createElementBlock("div",{class:"markdown",innerHTML:t.value},null,8,$V))}}),wt=U(_V,[["__scopeId","data-v-5a5f5321"]]),NV=["title","innerHTML"],AV=i.defineComponent({__name:"ServerItem",props:{value:{},variables:{}},setup(r){const e=r,{copyToClipboard:t}=ws(),n=i.computed(()=>{var l;const a=(((l=e.value)==null?void 0:l.url)??"").replace(/(<([^>]+)>)/gi,"");return Eh(a,c=>{var u;const d=(u=e.variables)==null?void 0:u.find(h=>h.name===c);return`<span class="base-url-variable">${((d==null?void 0:d.value)??"")!==""?d==null?void 0:d.value:`{${c}}`}</span>`})}),o=i.computed(()=>n.value.replace(/(<([^>]+)>)/gi,""));return(s,a)=>s.value?(i.openBlock(),i.createElementBlock("a",{key:0,class:"base-url",title:s.value.description,onClick:a[0]||(a[0]=l=>i.unref(t)(o.value)),innerHTML:n.value},null,8,NV)):i.createCommentVNode("",!0)}}),OV=U(AV,[["__scopeId","data-v-41c016dc"]]),TV={key:0},BV=["for"],PV=["id","value","onInput"],IV=["value"],MV={class:"input-value"},DV=["id","value","onInput"],VV=i.defineComponent({__name:"ServerVariables",props:{value:{}},setup(r){const{server:e,setServer:t}=no(),n=(s,a)=>{const l=a.target.value,c=[...e.variables],d=c.findIndex(u=>u.name===s);c[d].value=l,t({variables:c})},o=s=>{const a=e.variables.findIndex(l=>l.name===s);return e.variables[a].value??""};return(s,a)=>s.value?(i.openBlock(),i.createElementBlock("div",TV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,l=>(i.openBlock(),i.createElementBlock("div",{key:l.name,class:"input"},[i.createElementVNode("label",{for:`variable-${l.name}`},[i.createElementVNode("code",null,i.toDisplayString(l.name),1)],8,BV),l.enum?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("select",{id:`variable-${l.name}`,value:o(l.name),onInput:c=>n(l.name,c)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.enum,c=>(i.openBlock(),i.createElementBlock("option",{key:c,value:c},i.toDisplayString(c),9,IV))),128))],40,PV),i.createElementVNode("div",MV,i.toDisplayString(l.default),1)],64)):(i.openBlock(),i.createElementBlock("input",{key:1,id:`variable-${l.name}`,autocomplete:"off",placeholder:"value",spellcheck:"false",type:"text",value:o(l.name),onInput:c=>n(l.name,c)},null,40,DV))]))),128))])):i.createCommentVNode("",!0)}}),RV=U(VV,[["__scopeId","data-v-2e5f4fe1"]]),LV=r=>(i.pushScopeId("data-v-1634f7d3"),r=r(),i.popScopeId(),r),jV={key:0},FV=LV(()=>i.createElementVNode("span",{class:"scalar-card-serverlist-title"},"Base URL",-1)),qV={class:"scalar-card-serverlist"},zV={class:"scalar-card-serverlist-container"},HV={class:"server-item"},UV={class:"server-selector"},KV=["value"],WV=["value"],GV={key:0,muted:""},JV={class:"description"},YV=i.defineComponent({__name:"BaseUrl",setup(r){const{server:e,setServer:t}=no(),n=i.ref(0);return i.watch([n,()=>e.servers],()=>{var l,c,d;if(!e.servers.length)return;const o=((l=e.servers[n.value])==null?void 0:l.variables)??{},s=o?Object.keys(o).map(u=>{var h;return{name:u,value:((h=o[u].default)==null?void 0:h.toString())??""}}):[];vv((c=e.servers[n.value])==null?void 0:c.url).filter(u=>!o[u]).forEach(u=>{s.push({name:u,value:""})}),t({selectedServer:n.value,description:(d=e.servers[n.value])==null?void 0:d.description,variables:s})},{immediate:!0,deep:!0}),(o,s)=>i.unref(e).servers.length>0?(i.openBlock(),i.createElementBlock("div",jV,[FV,i.createElementVNode("div",qV,[i.createElementVNode("div",zV,[i.createElementVNode("div",HV,[i.createElementVNode("div",UV,[i.unref(e).servers.length>1?(i.openBlock(),i.createElementBlock("select",{key:0,value:n.value,onInput:s[0]||(s[0]=a=>n.value=parseInt(a.target.value,10))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(e).servers,(a,l)=>(i.openBlock(),i.createElementBlock("option",{key:l,value:l},i.toDisplayString(a.url),9,WV))),128))],40,KV)):i.createCommentVNode("",!0),i.createVNode(OV,{value:i.unref(e).servers[n.value],variables:i.unref(e).variables},null,8,["value","variables"]),i.unref(e).servers.length>1?(i.openBlock(),i.createBlock(i.unref(Me),{key:1,icon:"ChevronDown"})):i.createCommentVNode("",!0)])]),i.createVNode(RV,{value:i.unref(e).variables},null,8,["value"])])]),i.unref(e).description?(i.openBlock(),i.createElementBlock("div",GV,[i.createElementVNode("div",JV,[i.createVNode(i.unref(wt),{value:i.unref(e).description},null,8,["value"])])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)}}),XV=U(YV,[["__scopeId","data-v-1634f7d3"]]),QV=r=>(i.pushScopeId("data-v-09827b05"),r=r(),i.popScopeId(),r),ZV=["onClick"],eR=["value"],tR=["label"],rR=["value"],nR={class:"client-libraries-icon__more"},oR={key:1,class:"client-libraries-icon",height:"50",viewBox:"0 0 50 50",width:"50",xmlns:"http://www.w3.org/2000/svg"},sR=QV(()=>i.createElementVNode("g",{fill:"currentColor","fill-rule":"nonzero"},[i.createElementVNode("path",{d:"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0"})],-1)),iR=[sR],aR={key:0},lR=i.defineComponent({__name:"ClientSelector",setup(r){const{httpClient:e,setHttpClient:t,availableTargets:n,getClientTitle:o,getTargetTitle:s}=ks(),a=i.ref(),l=[{targetKey:"shell",clientKey:"curl"},{targetKey:"ruby",clientKey:"native"},{targetKey:"node",clientKey:"undici"},{targetKey:"php",clientKey:"guzzle"},{targetKey:"python",clientKey:"python3"}].filter(h=>n.value.find(f=>f.key===h.targetKey&&f.clients.find(p=>p.key===h.clientKey))),c=h=>`programming-language-${h}`,d=h=>h.targetKey===e.targetKey&&h.clientKey===e.clientKey,u=h=>l.some(f=>f.targetKey===h.targetKey&&f.clientKey===h.clientKey);return(h,f)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"containerRef",ref:a,class:"client-libraries-content"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(l),p=>(i.openBlock(),i.createElementBlock("div",{key:p.clientKey,class:i.normalizeClass(["client-libraries rendered-code-sdks",{"client-libraries__active":d(p)}]),onClick:()=>i.unref(t)(p)},[i.createElementVNode("div",{class:i.normalizeClass(`client-libraries-icon__${p.targetKey}`)},[i.createVNode(i.unref(Me),{class:"client-libraries-icon",icon:c(p.targetKey)},null,8,["icon"])],2),i.createElementVNode("span",null,i.toDisplayString(i.unref(s)(p)),1)],10,ZV))),128)),i.createElementVNode("div",{class:i.normalizeClass(["client-libraries client-libraries__select",{"client-libraries__active":i.unref(e)&&!u(i.unref(e))}])},[i.createElementVNode("select",{class:"language-select",value:JSON.stringify(i.unref(e)),onInput:f[0]||(f[0]=p=>i.unref(t)(JSON.parse(p.target.value)))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(n),p=>(i.openBlock(),i.createElementBlock("optgroup",{key:p.key,label:p.title},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.clients,y=>(i.openBlock(),i.createElementBlock("option",{key:y.key,value:JSON.stringify({targetKey:p.key,clientKey:y.key})},i.toDisplayString(i.unref(o)({targetKey:p.key,clientKey:y.key})),9,rR))),128))],8,tR))),128))],40,eR),i.createElementVNode("div",nR,[i.unref(e)&&!u(i.unref(e))?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(`client-libraries-icon__${i.unref(e).targetKey}`)},[i.createVNode(i.unref(Me),{class:"client-libraries-icon",icon:c(i.unref(e).targetKey)},null,8,["icon"])],2)):(i.openBlock(),i.createElementBlock("svg",oR,iR))]),i.unref(n).length?(i.openBlock(),i.createElementBlock("span",aR,"More")):i.createCommentVNode("",!0)],2)],512))}}),cR=U(lR,[["__scopeId","data-v-09827b05"]]),dR=r=>(i.pushScopeId("data-v-301043da"),r=r(),i.popScopeId(),r),uR=dR(()=>i.createElementVNode("div",{class:"client-libraries-heading"},"Client Libraries",-1)),hR={class:"selected-client card-footer",muted:""},fR=i.defineComponent({__name:"ClientLibraries",setup(r){const{availableTargets:e,httpTargetTitle:t,httpClientTitle:n}=ks();return(o,s)=>(i.openBlock(),i.createElementBlock("div",null,[i.unref(e).length?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[uR,i.createElementVNode("div",null,[i.createVNode(cR)]),i.createElementVNode("div",hR,i.toDisplayString(i.unref(n))+" "+i.toDisplayString(i.unref(t)),1)],64)):i.createCommentVNode("",!0)]))}}),pR=U(fR,[["__scopeId","data-v-301043da"]]),mR={},gR={class:"badge"};function yR(r,e){return i.openBlock(),i.createElementBlock("div",gR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Bi=U(mR,[["render",yR],["__scopeId","data-v-190574ac"]]),Yf=i.defineComponent({__name:"IntersectionObserver",props:{id:{},is:{}},emits:["intersecting"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(),s=l=>{const c=l.offsetHeight;return`${c/2}px 0px ${c/2}px 0px`},a=l=>l.offsetHeight<window.innerHeight?.8:.5;return i.onMounted(()=>{if(o.value){const l={rootMargin:s(o.value),threshold:a(o.value)};Xe.useIntersectionObserver(o,([{isIntersecting:c}])=>{c&&t.id&&n("intersecting")},l)}}),(l,c)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(l.is??"div"),{id:l.id,ref_key:"intersectionObserverRef",ref:o},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["id"]))}}),vR=i.defineComponent({__name:"Section",props:{id:{},label:{}},setup(r){const e=r,{getSectionId:t,hash:n,isIntersectionEnabled:o,pathRouting:s}=ct(),{setCollapsedSidebarItem:a}=tr();function l(){var u,h;if(!e.label||!o.value)return;const c=new URL(window.location.href),d=e.id??"";s.value?c.pathname=s.value.basePath+"/"+d:c.hash=d,n.value=d,window.history.replaceState({},"",c),((u=e.id)!=null&&u.startsWith("model")||(h=e.id)!=null&&h.startsWith("webhook"))&&a(t(e.id),!0)}return(c,d)=>(i.openBlock(),i.createBlock(Yf,{is:"section",id:c.id,class:"section",onIntersecting:l},{default:i.withCtx(()=>[i.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["id"]))}}),Ss=U(vR,[["__scopeId","data-v-a09c928d"]]),bR={class:"section-accordion-button-content"},wR={key:0,class:"section-accordion-button-actions"},kR={key:0,class:"section-accordion-description"},SR={class:"section-accordion-content-card"},xR=i.defineComponent({__name:"SectionAccordion",props:{id:{},transparent:{type:Boolean}},setup(r){const e=i.ref(),t=Xe.useElementHover(e);return(n,o)=>(i.openBlock(),i.createBlock(Yf,{id:n.id,class:"section-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(Le.Disclosure),{as:"section",class:i.normalizeClass(["section-accordion",{"section-accordion-transparent":n.transparent}])},{default:i.withCtx(({open:s})=>[i.createVNode(i.unref(Le.DisclosureButton),{ref_key:"button",ref:e,class:"section-accordion-button"},{default:i.withCtx(()=>[i.createElementVNode("div",bR,[i.renderSlot(n.$slots,"title",{},void 0,!0)]),n.$slots.actions?(i.openBlock(),i.createElementBlock("div",wR,[i.renderSlot(n.$slots,"actions",{active:i.unref(t)||s},void 0,!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(Me),{class:"section-accordion-chevron",icon:s?"ChevronDown":"ChevronRight"},null,8,["icon"])]),_:2},1536),i.createVNode(i.unref(Le.DisclosurePanel),{class:"section-accordion-content"},{default:i.withCtx(()=>[n.$slots.description?(i.openBlock(),i.createElementBlock("div",kR,[i.renderSlot(n.$slots,"description",{},void 0,!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",SR,[i.renderSlot(n.$slots,"default",{},void 0,!0)])]),_:3})]),_:3},8,["class"])]),_:3},8,["id"]))}}),rw=U(xR,[["__scopeId","data-v-07cabcb0"]]),CR={},ER={class:"section-column"};function $R(r,e){return i.openBlock(),i.createElementBlock("div",ER,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const es=U(CR,[["render",$R],["__scopeId","data-v-d64e7382"]]),_R={},NR={class:"section-columns"};function AR(r,e){return i.openBlock(),i.createElementBlock("div",NR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Xf=U(_R,[["render",AR],["__scopeId","data-v-8b9602bf"]]),OR={},TR={class:"section-container"};function BR(r,e){return i.openBlock(),i.createElementBlock("div",TR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Zi=U(OR,[["render",BR],["__scopeId","data-v-34b26958"]]),PR={class:"section-accordion-wrapper"},IR={class:"section-accordion-title"},MR=i.defineComponent({__name:"SectionContainerAccordion",setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",PR,[i.createVNode(i.unref(Le.Disclosure),{as:"div",class:"section-accordion",defaultOpen:""},{default:i.withCtx(({open:n})=>[i.createVNode(i.unref(Le.DisclosureButton),{class:"section-accordion-button"},{default:i.withCtx(()=>[i.createVNode(i.unref(Me),{class:"section-accordion-chevron",icon:n?"ChevronDown":"ChevronRight"},null,8,["icon"]),i.createElementVNode("div",IR,[i.renderSlot(e.$slots,"title",{},void 0,!0)])]),_:2},1024),i.createVNode(i.unref(Le.DisclosurePanel),{class:"section-accordion-content"},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})]))}}),nw=U(MR,[["__scopeId","data-v-2049975e"]]),DR=i.defineComponent({__name:"LoadingSkeleton",props:{lines:{default:1}},setup(r){return(e,t)=>(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList([...Array(e.lines).keys()],n=>(i.openBlock(),i.createElementBlock("div",{key:n,class:i.normalizeClass(["loading",{"single-line":e.lines===1}])},null,2))),128))}}),ow=U(DR,[["__scopeId","data-v-c90b2c46"]]),VR={class:"section-content"},RR=i.defineComponent({__name:"SectionContent",props:{loading:{type:Boolean,default:!1}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",VR,[e.loading?(i.openBlock(),i.createBlock(ow,{key:1,lines:8})):i.renderSlot(e.$slots,"default",{key:0},void 0,!0)]))}}),xs=U(RR,[["__scopeId","data-v-9735459e"]]),LR=i.defineComponent({__name:"SectionHeader",props:{loading:{type:Boolean,default:!1},tight:{type:Boolean,default:!1},level:{default:1}},setup(r){return(e,t)=>e.loading?(i.openBlock(),i.createBlock(ow,{key:0})):(i.openBlock(),i.createBlock(i.resolveDynamicComponent(`h${e.level}`),{key:1,class:i.normalizeClass(["section-header",{tight:e.tight}])},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),bn=U(LR,[["__scopeId","data-v-3bd1b9f0"]]),jR={key:0,class:"introduction-description"},FR=i.defineComponent({__name:"Description",props:{value:{}},setup(r){const e=r,n=`components-Content-Introduction-Description-sections${Gu(e.value)}`,o=Xe.computedAsync(async()=>{if(!e.value)return[];const u=await Ei(e.value),h=nc(u);return await Promise.all(H1(e.value,h).map(async f=>({heading:(await Ei(f))[0],content:f})))},ts[n]??[]),{getHeadingId:s,hash:a,isIntersectionEnabled:l,pathRouting:c}=ct();function d(u=""){if(!l.value)return;const h=new URL(window.location.href);c.value?h.pathname=c.value.basePath+"/"+u:h.hash=u,a.value=u,window.history.replaceState({},"",h)}return i.onServerPrefetch(async()=>{const u=i.useSSRContext();await wr(1),u.payload.data[n]=o.value}),(u,h)=>u.value?(i.openBlock(),i.createElementBlock("div",jR,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o),(f,p)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:p},[f.heading?(i.openBlock(),i.createBlock(Yf,{key:0,id:i.unref(s)(f.heading),class:"introduction-description-heading",onIntersecting:()=>d(i.unref(s)(f.heading))},{default:i.withCtx(()=>[i.createVNode(i.unref(wt),{value:f.content,withImages:""},null,8,["value"])]),_:2},1032,["id","onIntersecting"])):(i.openBlock(),i.createBlock(i.unref(wt),{key:1,value:f.content,withImages:""},null,8,["value"]))],64))),128))])):i.createCommentVNode("",!0)}}),qR=U(FR,[["__scopeId","data-v-5e475391"]]),zR={class:"download"},HR={class:"download-cta"},UR=i.defineComponent({__name:"DownloadSpec",props:{specTitle:{}},setup(r){const e=r,t=i.inject(Hf),n=()=>{Uf.emit({id:"",specTitle:e.specTitle})};return(o,s)=>{var a;return i.openBlock(),i.createElementBlock("div",zR,[i.createElementVNode("div",HR,[(a=i.unref(t))!=null&&a()?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("button",{key:0,class:"download-button",type:"button",onClick:n}," Download OpenAPI Spec "))])])}}}),KR=U(UR,[["__scopeId","data-v-810904a4"]]),WR={class:"badges"},GR={class:"sticky-cards"},JR=i.defineComponent({__name:"Introduction",props:{info:{},parsedSpec:{}},setup(r){const e=r,t=new Pi,n=i.computed(()=>e.parsedSpec.openapi??e.parsedSpec.swagger??""),o=i.computed(()=>t.slug(e.info.title??""));return(s,a)=>(i.openBlock(),i.createBlock(i.unref(Zi),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),{class:"introduction-section"},{default:i.withCtx(()=>[i.createVNode(i.unref(xs),{loading:!s.info.description&&!s.info.title},{default:i.withCtx(()=>[i.createVNode(i.unref(Xf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(es),null,{default:i.withCtx(()=>[i.createElementVNode("div",WR,[s.info.version?(i.openBlock(),i.createBlock(i.unref(Bi),{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.info.version),1)]),_:1})):i.createCommentVNode("",!0),n.value?(i.openBlock(),i.createBlock(i.unref(Bi),{key:1},{default:i.withCtx(()=>[i.createTextVNode(" OAS "+i.toDisplayString(n.value),1)]),_:1})):i.createCommentVNode("",!0)]),i.createVNode(i.unref(bn),{level:1,loading:!s.info.title,tight:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.info.title),1)]),_:1},8,["loading"]),i.createVNode(KR,{specTitle:o.value},null,8,["specTitle"]),i.createVNode(qR,{value:s.info.description},null,8,["value"])]),_:1}),s.$slots.aside?(i.openBlock(),i.createBlock(i.unref(es),{key:0},{default:i.withCtx(()=>[i.createElementVNode("div",GR,[i.renderSlot(s.$slots,"aside",{},void 0,!0)])]),_:3})):i.createCommentVNode("",!0)]),_:3})]),_:3},8,["loading"]),i.renderSlot(s.$slots,"after",{},void 0,!0)]),_:3})]),_:3}))}}),YR=U(JR,[["__scopeId","data-v-30c2e131"]]),XR=Symbol(),Uu=Xe.useEventBus(XR),jl=i.defineComponent({__name:"Lazy",props:{id:{},isLazy:{type:Boolean,default:!0},lazyTimeout:{default:0}},setup(r){const e=r,t=(o=()=>{})=>{typeof window>"u"||("requestIdleCallback"in window?setTimeout(()=>window.requestIdleCallback(o),e.lazyTimeout):setTimeout(()=>i.nextTick(o),e.lazyTimeout??300))},n=i.ref(!e.isLazy);return e.isLazy?t(()=>{n.value=!0,e.id&&i.nextTick(()=>Uu.emit({id:e.id}))}):e.id&&i.nextTick(()=>Uu.emit({id:e.id})),(o,s)=>n.value?i.renderSlot(o.$slots,"default",{key:0}):i.createCommentVNode("",!0)}}),QR={key:0,class:"screenreader-only"},ZR=i.defineComponent({__name:"ScreenReader",props:{if:{type:Boolean,default:!0}},setup(r){return(e,t)=>e.$props.if?(i.openBlock(),i.createElementBlock("span",QR,[i.renderSlot(e.$slots,"default",{},void 0,!0)])):i.renderSlot(e.$slots,"default",{key:1},void 0,!0)}}),sw=U(ZR,[["__scopeId","data-v-681ebf2c"]]),e3=r=>(i.pushScopeId("data-v-d9801d4e"),r=r(),i.popScopeId(),r),t3={class:"label"},r3={class:"anchor"},n3=e3(()=>i.createElementVNode("span",null,"​",-1)),o3=i.defineComponent({__name:"Anchor",props:{id:{}},setup(r){const{copyToClipboard:e}=ws(),t=n=>{const o=new URL(window.location.href);return o.hash=n,o.toString()};return(n,o)=>(i.openBlock(),i.createElementBlock("span",t3,[i.renderSlot(n.$slots,"default",{},void 0,!0),i.createElementVNode("span",r3,[n3,i.createElementVNode("button",{class:"anchor-copy",type:"button",onClick:o[0]||(o[0]=i.withModifiers(s=>i.unref(e)(t(n.id)),["stop"]))},[i.createTextVNode(" # "),i.createVNode(sw,null,{default:i.withCtx(()=>[i.createTextVNode('Copy link to "'),i.renderSlot(n.$slots,"default",{},void 0,!0),i.createTextVNode('"')]),_:3})])])]))}}),wn=U(o3,[["__scopeId","data-v-d9801d4e"]]),s3={},i3={class:"scalar-card"};function a3(r,e){return i.openBlock(),i.createElementBlock("div",i3,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const ea=U(s3,[["render",a3],["__scopeId","data-v-dcabb131"]]),l3=i.defineComponent({__name:"CardContent",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["scalar-card-content",{"scalar-card--muted":e.muted,"scalar-card--contrast":e.contrast,"scalar-card--frameless":e.frameless,"scalar-card--transparent":e.transparent,"scalar-card--borderless":e.borderless}])},[i.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),lo=U(l3,[["__scopeId","data-v-5312c2e0"]]),c3={class:"scalar-card-header-slots"},d3={class:"scalar-card-header-slot scalar-card-header-title"},u3={class:"scalar-card-header-slot scalar-card-header-actions"},h3=i.defineComponent({__name:"CardHeader",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createBlock(lo,i.mergeProps(e,{class:"scalar-card-header"}),{default:i.withCtx(()=>[i.createElementVNode("div",c3,[i.createElementVNode("div",d3,[i.renderSlot(t.$slots,"default",{},void 0,!0)]),i.createElementVNode("div",u3,[i.renderSlot(t.$slots,"actions",{},void 0,!0)])])]),_:3},16))}}),ta=U(h3,[["__scopeId","data-v-bbd0c20a"]]),f3=i.defineComponent({__name:"CardFooter",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createBlock(lo,i.normalizeProps(i.guardReactiveProps(e)),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16))}}),Lc=U(f3,[["__scopeId","data-v-918ab8d6"]]),p3=i.defineComponent({__name:"CardTabHeader",emits:["change"],setup(r,{emit:e}){const t=e,n=o=>{t("change",o)};return(o,s)=>(i.openBlock(),i.createBlock(ta,{class:"scalar-card-header-tabs"},{actions:i.withCtx(()=>[i.renderSlot(o.$slots,"actions",{},void 0,!0)]),default:i.withCtx(()=>[i.createVNode(i.unref(Le.TabGroup),{onChange:n},{default:i.withCtx(()=>[i.createVNode(i.unref(Le.TabList),{class:"tab-list custom-scroll"},{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3})]),_:3})]),_:3}))}}),iw=U(p3,[["__scopeId","data-v-6a91b57c"]]),m3=i.defineComponent({__name:"CardTab",setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(Le.Tab),{as:"template"},{default:i.withCtx(({selected:n})=>[i.createElementVNode("button",{class:i.normalizeClass({tab:!0,"tab-selected":n}),type:"button"},[i.createElementVNode("span",null,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],2)]),_:3}))}}),aw=U(m3,[["__scopeId","data-v-f373ecc2"]]),g3=["value"],y3=["label"],v3=["value"],b3=["value"],Qf=i.defineComponent({__name:"TextSelect",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["text-select",e.options.length===1?"text-select--single-option":""])},[i.createElementVNode("span",null,[i.renderSlot(e.$slots,"default")]),i.createElementVNode("select",{value:e.modelValue,onInput:t[0]||(t[0]=n=>e.$emit("update:modelValue",n.target.value))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,n=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:n.value},[n.options?(i.openBlock(),i.createElementBlock("optgroup",{key:0,label:n.label},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.options,o=>(i.openBlock(),i.createElementBlock("option",{key:o.value,value:o.value},i.toDisplayString(o.label),9,v3))),128))],8,y3)):(i.openBlock(),i.createElementBlock("option",{key:n.value,value:n.value},i.toDisplayString(n.label),9,b3))],64))),128))],40,g3)],2))}}),w3={class:"request-header"},k3=i.defineComponent({__name:"CustomRequestExamples",props:{operation:{},examples:{}},setup(r){const e=r,t=i.ref(0),n=i.computed(()=>({C:"c","C#":"csharp",Go:"go",HTML:"html",Java:"java",JavaScript:"javascript",Kotlin:"kotlin","Objective-C":"objc",PowerShell:"powershell",Python:"python",Ruby:"ruby",Shell:"shell",Swift:"swift",TypeScript:"javascript",cURL:"shell"})[e.examples[t.value].lang]??e.examples[t.value].lang),o=i.computed(()=>e.examples[t.value]);i.watch(e.examples,()=>{e.examples[t.value]==="undefined"&&(t.value=0)});const{copyToClipboard:s}=ws();return(a,l)=>(i.openBlock(),i.createBlock(i.unref(ea),{class:"dark-mode"},{default:i.withCtx(()=>[i.createVNode(i.unref(ta),{muted:""},{actions:i.withCtx(()=>[i.createVNode(Qf,{class:"request-client-picker",modelValue:t.value,options:a.examples.map((c,d)=>({value:d.toString(),label:c.label})),"onUpdate:modelValue":l[0]||(l[0]=c=>(t.value=parseInt(c),10))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.value.label),1)]),_:1},8,["modelValue","options"]),i.createElementVNode("button",{class:"copy-button",type:"button",onClick:l[1]||(l[1]=c=>i.unref(s)(o.value.source.trim()))},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px"})])]),default:i.withCtx(()=>[i.createElementVNode("div",w3,[i.createVNode(i.unref(oo),{class:"request-method",method:a.operation.httpVerb},null,8,["method"]),i.renderSlot(a.$slots,"header",{},void 0,!0)])]),_:3}),i.createVNode(i.unref(lo),{borderless:"",class:"request-editor-section custom-scroll",frameless:""},{default:i.withCtx(()=>[i.createVNode(i.unref(Nr),{content:o.value.source.trim(),lang:n.value,lineNumbers:""},null,8,["content","lang"])]),_:1}),a.$slots.footer?(i.openBlock(),i.createBlock(i.unref(Lc),{key:0,class:"scalar-card-footer",contrast:""},{default:i.withCtx(()=>[i.renderSlot(a.$slots,"footer",{},void 0,!0)]),_:3})):i.createCommentVNode("",!0)]),_:3}))}}),S3=U(k3,[["__scopeId","data-v-18ba624d"]]),x3={class:"schema-type"},C3=["title"],E3=i.defineComponent({__name:"SchemaHeading",props:{value:{},name:{}},setup(r){return(e,t)=>{var n,o,s,a,l,c;return i.openBlock(),i.createElementBlock("span",x3,[i.createElementVNode("span",{class:"schema-type-icon",title:typeof e.value.type=="string"?e.value.type:Array.isArray(e.value.type)?e.value.type.join(" | "):"unkown type"},[e.value.type==="object"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(" {} ")],64)):i.createCommentVNode("",!0),e.value.type==="array"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" [] ")],64)):i.createCommentVNode("",!0),e.value.enum?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(" enum ")],64)):i.createCommentVNode("",!0)],8,C3),(o=(n=e.value)==null?void 0:n.xml)!=null&&o.name&&((a=(s=e.value)==null?void 0:s.xml)==null?void 0:a.name)!=="##default"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(" <"+i.toDisplayString((c=(l=e.value)==null?void 0:l.xml)==null?void 0:c.name)+" /> ",1)],64)):e.name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(e.name),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(e.value.type),1)],64))])}}}),lw=U(E3,[["__scopeId","data-v-6c5c3c96"]]),$3={key:0,class:"property-detail-prefix"},_3={key:1,class:"property-detail-value"},N3={key:2,class:"property-detail-value"},A3=i.defineComponent({__name:"SchemaPropertyDetail",props:{truncate:{type:Boolean},code:{type:Boolean}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["property-detail",{"property-detail-truncate":e.truncate}])},[e.$slots.prefix?(i.openBlock(),i.createElementBlock("div",$3,[i.renderSlot(e.$slots,"prefix",{},void 0,!0),i.createTextVNode("  ")])):i.createCommentVNode("",!0),e.code?(i.openBlock(),i.createElementBlock("code",_3,[i.renderSlot(e.$slots,"default",{},void 0,!0)])):(i.openBlock(),i.createElementBlock("span",N3,[i.renderSlot(e.$slots,"default",{},void 0,!0)]))],2))}}),Bt=U(A3,[["__scopeId","data-v-16d94ef5"]]),O3={class:"property-heading"},T3={key:0,class:"property-name"},B3={key:1,class:"property-additional"},P3={key:2,class:"property-deprecated"},I3={key:3,class:"property-required"},M3={key:4,class:"property-const"},D3={key:5,class:"property-details"},V3={key:6,class:"property-write-only"},R3={key:7,class:"property-read-only"},L3=i.defineComponent({__name:"SchemaPropertyHeading",props:{value:{},enum:{type:Boolean},required:{type:Boolean,default:!1},additional:{type:Boolean}},setup(r){const e=["oneOf","anyOf","allOf","not"];return(t,n)=>{var o,s,a,l,c,d,u;return i.openBlock(),i.createElementBlock("div",O3,[t.$slots.name?(i.openBlock(),i.createElementBlock("div",T3,[i.renderSlot(t.$slots,"name",{},void 0,!0)])):i.createCommentVNode("",!0),t.additional?(i.openBlock(),i.createElementBlock("div",B3,[(o=t.value)!=null&&o["x-additionalPropertiesName"]?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(t.value["x-additionalPropertiesName"]),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" additional properties ")],64))])):i.createCommentVNode("",!0),(s=t.value)!=null&&s.deprecated?(i.openBlock(),i.createElementBlock("div",P3,[i.createVNode(i.unref(Bi),null,{default:i.withCtx(()=>[i.createTextVNode("deprecated")]),_:1})])):i.createCommentVNode("",!0),t.required?(i.openBlock(),i.createElementBlock("div",I3," required ")):i.createCommentVNode("",!0),(a=t.value)!=null&&a.const||(l=t.value)!=null&&l.enum&&t.value.enum.length===1?(i.openBlock(),i.createElementBlock("div",M3,[i.createVNode(Bt,{truncate:""},{prefix:i.withCtx(()=>[i.createTextVNode("const:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.const??t.value.enum[0]),1)]),_:1})])):(c=t.value)!=null&&c.type?(i.openBlock(),i.createElementBlock("div",D3,[t.additional?(i.openBlock(),i.createBlock(Bt,{key:0},{prefix:i.withCtx(()=>[i.createTextVNode("key:")]),default:i.withCtx(()=>[i.createTextVNode(" string ")]),_:1})):i.createCommentVNode("",!0),i.createVNode(Bt,null,i.createSlots({default:i.withCtx(()=>{var h,f,p;return[(f=(h=t.value)==null?void 0:h.items)!=null&&f.type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(t.value.type)+" "+i.toDisplayString(t.value.items.type)+"[] ",1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(Array.isArray(t.value.type)?t.value.type.join(" | "):t.value.type)+" "+i.toDisplayString((p=t.value)!=null&&p.nullable?" | nullable":""),1)],64)),t.value.minItems||t.value.maxItems?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(t.value.minItems)+"…"+i.toDisplayString(t.value.maxItems),1)],64)):i.createCommentVNode("",!0)]}),_:2},[t.additional?{name:"prefix",fn:i.withCtx(()=>[i.createTextVNode("value:")]),key:"0"}:void 0]),1024),t.value.minLength?(i.openBlock(),i.createBlock(Bt,{key:1},{prefix:i.withCtx(()=>[i.createTextVNode("min:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.minLength),1)]),_:1})):i.createCommentVNode("",!0),t.value.maxLength?(i.openBlock(),i.createBlock(Bt,{key:2},{prefix:i.withCtx(()=>[i.createTextVNode("max:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.maxLength),1)]),_:1})):i.createCommentVNode("",!0),t.value.uniqueItems?(i.openBlock(),i.createBlock(Bt,{key:3},{default:i.withCtx(()=>[i.createTextVNode(" unique! ")]),_:1})):i.createCommentVNode("",!0),t.value.format?(i.openBlock(),i.createBlock(Bt,{key:4},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.value.format),1)]),_:1})):i.createCommentVNode("",!0),t.value.minimum?(i.openBlock(),i.createBlock(Bt,{key:5},{prefix:i.withCtx(()=>[i.createTextVNode("min:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.minimum),1)]),_:1})):i.createCommentVNode("",!0),t.value.maximum?(i.openBlock(),i.createBlock(Bt,{key:6},{prefix:i.withCtx(()=>[i.createTextVNode("max:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.maximum),1)]),_:1})):i.createCommentVNode("",!0),t.value.pattern?(i.openBlock(),i.createBlock(Bt,{key:7,code:"",truncate:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.value.pattern),1)]),_:1})):i.createCommentVNode("",!0),t.$props.enum?(i.openBlock(),i.createBlock(Bt,{key:8},{default:i.withCtx(()=>[i.createTextVNode("enum")]),_:1})):i.createCommentVNode("",!0),t.value.default?(i.openBlock(),i.createBlock(Bt,{key:9,truncate:""},{prefix:i.withCtx(()=>[i.createTextVNode("default:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.default),1)]),_:1})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(d=t.value)!=null&&d.writeOnly?(i.openBlock(),i.createElementBlock("div",V3," write-only ")):(u=t.value)!=null&&u.readOnly?(i.openBlock(),i.createElementBlock("div",R3," read-only ")):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.filter(h=>{var f,p,y;return((f=t.value)==null?void 0:f[h])||((y=(p=t.value)==null?void 0:p.items)==null?void 0:y[h])}),h=>(i.openBlock(),i.createBlock(i.unref(Bi),{key:h},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(h),1)]),_:2},1024))),128))])}}}),j3=U(L3,[["__scopeId","data-v-c1c21610"]]),F3=r=>(i.pushScopeId("data-v-9c7a15fe"),r=r(),i.popScopeId(),r),q3={key:0,class:"property-description"},z3={key:1,class:"property-description"},H3={key:2,class:"property-example custom-scroll"},U3=F3(()=>i.createElementVNode("span",{class:"property-example-label"},"Example",-1)),K3={class:"property-example-value"},W3={key:3,class:"property-enum"},G3={key:0,class:"property-list"},J3={class:"property-heading"},Y3={class:"property-name"},X3={class:"property-description"},Q3={key:1,class:"property-enum-values"},Z3={key:4,class:"children"},eL={key:0,class:"children"},tL={key:0,class:"property-rule"},rL={key:1,class:"property-rule"},nL=i.defineComponent({__name:"SchemaProperty",props:{value:{},level:{default:0},name:{},required:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},description:{},additional:{type:Boolean}},setup(r){const e={integer:{_default:"Integer numbers.",int32:"Signed 32-bit integers (commonly used integer type).",int64:"Signed 64-bit integers (long type)."},string:{date:"full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21","date-time":"the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z",password:"a hint to UIs to mask the input",byte:"base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",binary:"binary data, used to describe files"}},t=function(a,l){return l!=null&&l.properties||l!=null&&l.additionalProperties?null:a||(l==null?void 0:l.description)||null},n=function(a){return!a||!e[a.type]?null:e[a.type][a.format||"_default"]},o=function(a){var l;return(a==null?void 0:a.enum)||((l=a==null?void 0:a.items)==null?void 0:l.enum)||[]},s=["oneOf","anyOf","allOf","not"];return(a,l)=>{var c,d,u,h,f,p,y,g,m,v,b;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["property",[`property--level-${a.level}`,{"property--compact":a.compact,"property--deprecated":(c=a.value)==null?void 0:c.deprecated}]])},[i.createVNode(j3,{additional:a.additional,enum:o(a.value).length>1,required:a.required,value:a.value},i.createSlots({_:2},[a.name?{name:"name",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.name),1)]),key:"0"}:void 0]),1032,["additional","enum","required","value"]),t(a.description,a.value)?(i.openBlock(),i.createElementBlock("div",q3,[i.createVNode(i.unref(wt),{value:t(a.description,a.value)},null,8,["value"])])):n(a.value)?(i.openBlock(),i.createElementBlock("div",z3,[i.createVNode(i.unref(wt),{value:n(a.value)||""},null,8,["value"])])):i.createCommentVNode("",!0),(d=a.value)!=null&&d.example||(h=(u=a.value)==null?void 0:u.items)!=null&&h.example?(i.openBlock(),i.createElementBlock("div",H3,[U3,i.createElementVNode("code",K3,i.toDisplayString(a.value.example||((f=a.value)==null?void 0:f.items.example)),1)])):i.createCommentVNode("",!0),((p=o(a.value))==null?void 0:p.length)>1?(i.openBlock(),i.createElementBlock("div",W3,[(y=a.value)!=null&&y["x-enumDescriptions"]?(i.openBlock(),i.createElementBlock("div",G3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o(a.value),w=>(i.openBlock(),i.createElementBlock("div",{key:w,class:"property"},[i.createElementVNode("div",J3,[i.createElementVNode("div",Y3,i.toDisplayString(w),1)]),i.createElementVNode("div",X3,[i.createVNode(i.unref(wt),{value:a.value["x-enumDescriptions"][w]},null,8,["value"])])]))),128))])):(i.openBlock(),i.createElementBlock("ul",Q3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o(a.value),w=>(i.openBlock(),i.createElementBlock("li",{key:w,class:"property-enum-value"},i.toDisplayString(w),1))),128))]))])):i.createCommentVNode("",!0),((g=a.value)==null?void 0:g.type)==="object"&&((m=a.value)!=null&&m.properties||(v=a.value)!=null&&v.additionalProperties)?(i.openBlock(),i.createElementBlock("div",Z3,[i.createVNode(qn,{compact:a.compact,level:a.level+1,value:a.value},null,8,["compact","level","value"])])):i.createCommentVNode("",!0),(b=a.value)!=null&&b.items?(i.openBlock(),i.createElementBlock(i.Fragment,{key:5},[["object"].includes(a.value.items.type)?(i.openBlock(),i.createElementBlock("div",eL,[i.createVNode(qn,{compact:a.compact,level:a.level+1,value:a.value.items},null,8,["compact","level","value"])])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(s,w=>{var S,x,k;return i.openBlock(),i.createElementBlock(i.Fragment,{key:w},[(S=a.value)!=null&&S[w]?(i.openBlock(),i.createElementBlock("div",tL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value[w],(C,N)=>(i.openBlock(),i.createBlock(qn,{key:N,compact:a.compact,level:a.level+1,value:C},null,8,["compact","level","value"]))),128))])):i.createCommentVNode("",!0),(k=(x=a.value)==null?void 0:x.items)!=null&&k[w]&&a.level<3?(i.openBlock(),i.createElementBlock("div",rL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value.items[w],(C,N)=>(i.openBlock(),i.createBlock(qn,{key:N,compact:a.compact,level:a.level+1,value:C},null,8,["compact","level","value"]))),128))])):i.createCommentVNode("",!0)],64)}),64))],2)}}}),Fn=U(nL,[["__scopeId","data-v-9c7a15fe"]]),oL=r=>(i.pushScopeId("data-v-7f5d0941"),r=r(),i.popScopeId(),r),sL={key:0,class:"schema-card-description"},iL=oL(()=>i.createElementVNode("polygon",{"fill-rule":"nonzero",points:"14 8 8 8 8 14 6 14 6 8 0 8 0 6 6 6 6 0 8 0 8 6 14 6"},null,-1)),aL=[iL],lL=i.defineComponent({__name:"Schema",props:{value:{},level:{default:0},name:{},compact:{type:Boolean},noncollapsible:{type:Boolean}},setup(r){const e=r,t=i.computed(()=>!(e.noncollapsible||e.level===0)),n=o=>e.noncollapsible&&o.stopPropagation();return(o,s)=>typeof o.value=="object"&&Object.keys(o.value).length?(i.openBlock(),i.createBlock(i.unref(Le.Disclosure),{key:0,defaultOpen:o.noncollapsible},{default:i.withCtx(({open:a})=>{var l;return[i.createElementVNode("div",{class:i.normalizeClass(["schema-card",[`schema-card--level-${o.level}`,{"schema-card--compact":o.compact,"schema-card--open":a}]])},[(l=o.value)!=null&&l.description?(i.openBlock(),i.createElementBlock("div",sL,[i.createVNode(i.unref(wt),{value:o.value.description},null,8,["value"])])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["schema-properties",{"schema-properties-open":a}])},[i.withDirectives(i.createVNode(i.unref(Le.DisclosureButton),{as:o.noncollapsible?"div":"button",class:i.normalizeClass(["schema-card-title",{"schema-card-title--compact":o.compact}]),style:i.normalizeStyle({top:`calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${o.level}))`}),onClickCapture:n},{default:i.withCtx(()=>{var c,d,u;return[o.compact?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:i.normalizeClass(["schema-card-title-icon",{"schema-card-title-icon--open":a}]),fill:"currentColor",height:"14",viewBox:"0 0 14 14",width:"14",xmlns:"http://www.w3.org/2000/svg"},aL,2)):i.createCommentVNode("",!0),a?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" Hide "+i.toDisplayString(((c=o.value)==null?void 0:c.title)??"Child Attributes"),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(" Show "+i.toDisplayString(((d=o.value)==null?void 0:d.title)??"Child Attributes"),1)],64))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[t.value?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,class:i.normalizeClass(["schema-card-title-icon",{"schema-card-title-icon--open":a}]),icon:"ChevronRight",size:"md"},null,8,["class"])):i.createCommentVNode("",!0),i.createVNode(lw,{name:((u=o.value)==null?void 0:u.title)??o.name,value:o.value},null,8,["name","value"])],64))]}),_:2},1032,["as","class","style"]),[[i.vShow,!(o.noncollapsible&&o.compact)]]),i.createVNode(i.unref(Le.DisclosurePanel),{static:o.noncollapsible},{default:i.withCtx(()=>{var c;return[o.value.properties||o.value.additionalProperties?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[o.value.properties?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(Object.keys((c=o.value)==null?void 0:c.properties),d=>{var u;return i.openBlock(),i.createBlock(Fn,{key:d,compact:o.compact,level:o.level,name:d,required:o.value.required&&o.value.required.length&&o.value.required.includes(d),value:(u=o.value.properties)==null?void 0:u[d]},null,8,["compact","level","name","required","value"])}),128)):i.createCommentVNode("",!0),o.value.additionalProperties?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[o.value.additionalProperties===!0||Object.keys(o.value.additionalProperties).length===0||!o.value.additionalProperties.type?(i.openBlock(),i.createBlock(Fn,{key:0,additional:"",compact:o.compact,level:o.level,noncollapsible:"",value:{type:"any",...o.value.additionalProperties}},null,8,["compact","level","value"])):(i.openBlock(),i.createBlock(Fn,{key:1,additional:"",compact:o.compact,level:o.level,noncollapsible:"",value:o.value.additionalProperties},null,8,["compact","level","value"]))],64)):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(Fn,{key:1,compact:o.compact,level:o.level,name:o.value.name,value:o.value},null,8,["compact","level","name","value"]))]}),_:1},8,["static"])],2)],2)]}),_:1},8,["defaultOpen"])):i.createCommentVNode("",!0)}}),qn=U(lL,[["__scopeId","data-v-7f5d0941"]]),cL={class:"parameter-item"},dL={class:"parameter-item-container"},uL=i.defineComponent({__name:"ParameterItem",props:{parameter:{},showChildren:{type:Boolean,default:!1}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("li",cL,[i.createElementVNode("div",dL,[i.createVNode(i.unref(Fn),{compact:"",description:e.parameter.description,level:0,name:e.parameter.name,noncollapsible:e.showChildren,required:e.parameter.required,value:e.parameter.schema},null,8,["description","name","noncollapsible","required","value"])])]))}}),hL=U(uL,[["__scopeId","data-v-f70ee55c"]]),fL={key:0,class:"parameters"},pL={class:"parameters-title"},mL={class:"parameter-list"},gL=i.defineComponent({__name:"Parameters",props:{parameters:{},showChildren:{type:Boolean,default:!1}},setup(r){return(e,t)=>{var n;return(n=e.parameters)!=null&&n.length?(i.openBlock(),i.createElementBlock("div",fL,[i.createElementVNode("div",pL,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("ul",mL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.parameters,o=>(i.openBlock(),i.createBlock(hL,{key:o.name,parameter:o,showChildren:e.showChildren},null,8,["parameter","showChildren"]))),128))])])):i.createCommentVNode("",!0)}}}),Kt=U(gL,[["__scopeId","data-v-45fca787"]]),yL={key:0},vL={class:"request-body-title"},bL=["value"],wL={key:0,class:"request-body-description"},kL={key:0,class:"request-body-schema"},SL=i.defineComponent({__name:"RequestBody",props:{requestBody:{}},setup(r){var o;const e=r,t=i.computed(()=>{var s;return(s=e.requestBody)!=null&&s.content?Object.keys(e.requestBody.content):[]}),n=i.ref("application/json");return(o=e.requestBody)!=null&&o.content&&t.value.length>0&&(n.value=t.value[0]),(s,a)=>{var l,c,d,u;return e!=null&&e.requestBody?(i.openBlock(),i.createElementBlock("div",yL,[i.createElementVNode("div",vL,[i.renderSlot(s.$slots,"title",{},void 0,!0),i.createElementVNode("div",{class:i.normalizeClass(["request-body-title-select",{"request-body-title-no-select":t.value.length<=1}])},[i.createElementVNode("span",null,i.toDisplayString(n.value),1),e!=null&&e.requestBody&&t.value.length>1?i.withDirectives((i.openBlock(),i.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=h=>n.value=h)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((l=e.requestBody)==null?void 0:l.content,(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,value:f},i.toDisplayString(f),9,bL))),128))],512)),[[i.vModelSelect,n.value]]):i.createCommentVNode("",!0)],2),e!=null&&e.requestBody.description?(i.openBlock(),i.createElementBlock("div",wL,[i.createVNode(i.unref(wt),{value:e.requestBody.description},null,8,["value"])])):i.createCommentVNode("",!0)]),(c=e==null?void 0:e.requestBody.content)!=null&&c[n.value]?(i.openBlock(),i.createElementBlock("div",kL,[i.createVNode(i.unref(qn),{compact:"",noncollapsible:"",value:(u=(d=e==null?void 0:e.requestBody.content)==null?void 0:d[n.value])==null?void 0:u.schema},null,8,["value"])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)}}}),Zf=U(SL,[["__scopeId","data-v-e095eb63"]]),xL={class:"endpoint-details"},CL={class:"endpoint-description"},EL=i.defineComponent({__name:"EndpointDetails",props:{operation:{}},setup(r){const e=r,{parameterMap:t}=Kf(e),{responses:n}=Wf(e.operation);return(o,s)=>{var a,l;return i.openBlock(),i.createElementBlock("div",xL,[i.createElementVNode("div",CL,[i.createVNode(i.unref(wt),{value:o.operation.description,withImages:""},null,8,["value"])]),i.createVNode(Kt,{parameters:i.unref(t).path},{title:i.withCtx(()=>[i.createTextVNode("Path Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{parameters:i.unref(t).query},{title:i.withCtx(()=>[i.createTextVNode("Query Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{parameters:i.unref(t).header},{title:i.withCtx(()=>[i.createTextVNode("Headers")]),_:1},8,["parameters"]),i.createVNode(Kt,{parameters:i.unref(t).body,showChildren:""},{title:i.withCtx(()=>[i.createTextVNode("Body Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{parameters:i.unref(t).formData},{title:i.withCtx(()=>[i.createTextVNode("Form Data")]),_:1},8,["parameters"]),(a=o.operation.information)!=null&&a.requestBody?(i.openBlock(),i.createBlock(Zf,{key:0,requestBody:(l=o.operation.information)==null?void 0:l.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Body")]),_:1},8,["requestBody"])):i.createCommentVNode("",!0),i.createVNode(Kt,{parameters:i.unref(n)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])])}}}),$L={key:0},_L=i.defineComponent({__name:"EndpointPath",props:{path:{},deprecated:{type:Boolean}},setup(r){const e=r,t=o=>o.startsWith("{")&&o.endsWith("}"),n=i.computed(()=>e.path.split(/({[^}]+})/));return(o,s)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["endpoint-path",{deprecated:o.deprecated}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:l},[t(a)?(i.openBlock(),i.createElementBlock("em",$L,i.toDisplayString(a),1)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(a),1)],64))],64))),128))],2))}}),Ku=U(_L,[["__scopeId","data-v-a4eadd9b"]]);function ra(r){return r.reduce((e,t)=>(e[t.name]=t.value,e),{})}function NL(r){return/\s|-/.test(r)}function kr(r,e=0){let t=[],n=" ".repeat(e),o=" ".repeat(e+2);for(const[s,a]of Object.entries(r)){let l=NL(s)?`'${s}'`:s;if(Array.isArray(a)){const c=a.map(d=>typeof d=="string"?`'${d}'`:d&&typeof d=="object"?kr(d,e+2):d).join(`, ${o}`);t.push(`${o}${l}: [${c}]`)}else if(a&&typeof a=="object")t.push(`${o}${l}: ${kr(a,e+2)}`);else if(typeof a=="string"){let c=`${a}`;if(a.startsWith("JSON.stringify")){const d=a.split(`
216
216
  `);d.length>1&&(c=d.map((u,h)=>h===0?u:`${o}${u}`).join(`
217
217
  `))}else c=`'${a}'`;t.push(`${o}${l}: ${c}`)}else t.push(`${o}${l}: ${a}`)}return`{
218
218
  ${t.join(`,
219
219
  `)}
220
220
  ${n}}`}function AL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${kr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"node",client:"undici",code:`import { request } from 'undici'
221
221
 
222
- const { statusCode, body } = await request('${n.url}${a}'${l})`}}function OL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${kr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"node",client:"fetch",code:`fetch('${n.url}${a}'${l})`}}function TL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${kr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"js",client:"fetch",code:`fetch('${n.url}${a}'${l})`}}function BL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0);s.size&&(o.query={},s.forEach((l,c)=>{o.query[c]=l})),(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(l=>{o.headers[l.name]=l.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(l=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${l.name}=${l.value}`:`${l.name}=${l.value}`})),Object.keys(o).forEach(l=>{o[l]===void 0&&delete o[l]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=JSON.parse(o.body)));const a=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"js",client:"ofetch",code:`ofetch('${n.url}'${a})`}}function PL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0);s.size&&(o.query={},s.forEach((l,c)=>{o.query[c]=l})),(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(l=>{o.headers[l.name]=l.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(l=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${l.name}=${l.value}`:`${l.name}=${l.value}`})),Object.keys(o).forEach(l=>{o[l]===void 0&&delete o[l]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=JSON.parse(o.body)));const a=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"node",client:"ofetch",code:`ofetch('${n.url}'${a})`}}function Yg(){const r=[AL,OL,TL,BL,PL];return{get(e,t,n){const o=this.findPlugin(e,t);if(o)return o(n)},print(e,t,n){var o;return(o=this.get(e,t,n))==null?void 0:o.code},targets(){return r.map(e=>e().target).filter((e,t,n)=>n.indexOf(e)===t)},clients(){return r.map(e=>e().client)},plugins(){return r.map(e=>{const t=e();return{target:t.target,client:t.client}})},findPlugin(e,t){return r.find(n=>{const o=n();return o.target===e&&o.client===t})},hasPlugin(e,t){return!!this.findPlugin(e,t)}}}const IL=i.defineComponent({__name:"ExamplePicker",props:{examples:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(Object.keys(t.examples)[0]);function s(l){l&&(o.value=l)}i.watch(()=>t.examples,()=>{s(Object.keys(t.examples)[0])},{immediate:!0}),i.watch(o,()=>{o.value&&n("update:modelValue",o.value)},{immediate:!0});function a(l){if(!l)return"Select an example";const c=t.examples[l];return(c==null?void 0:c.summary)??l}return(l,c)=>(i.openBlock(),i.createBlock(Qf,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=d=>o.value=d),class:"example-selector",options:Object.keys(l.examples).map(d=>({label:a(d),value:d}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a(o.value)),1)]),_:1},8,["modelValue","options"]))}}),cw=U(IL,[["__scopeId","data-v-652a7e14"]]),ML={class:"request-header"},DL={class:"code-snippet"},VL={key:0,class:"request-card-footer-addon"},RL=i.defineComponent({__name:"ExampleRequest",props:{operation:{}},setup(r){const e=r,n=`components-Content-Operation-Example-Request${Wu(e.operation.path+e.operation.httpVerb+e.operation.operationId)}`,o=i.ref(ts[n]??""),s=i.ref(),{copyToClipboard:a}=ws(),{httpClient:l,setHttpClient:c,availableTargets:d,httpTargetTitle:u,httpClientTitle:h}=ks(),{server:f}=no(),{authentication:p}=ns(),y=i.computed(()=>{var v,b,w,S,x,k,C;return((S=(w=(b=(v=e.operation.information)==null?void 0:v.requestBody)==null?void 0:b.content)==null?void 0:w["application/json"])==null?void 0:S.examples)&&Object.keys((C=(k=(x=e.operation.information)==null?void 0:x.requestBody)==null?void 0:k.content)==null?void 0:C["application/json"].examples).length>1}),g=i.inject(Vc),m=async()=>{var b;const v=g0({url:xi(f)},Od(e.operation,{replaceVariables:!0},s.value),Sh(p,((b=e.operation.information)==null?void 0:b.security)??(g==null?void 0:g())));try{return Yg().hasPlugin(l.targetKey.replace("javascript","js"),l.clientKey)?Yg().print(l.targetKey.replace("javascript","js"),l.clientKey,v)??"":await new e0.HTTPSnippet(v).convert(l.targetKey,l.clientKey)}catch(w){return console.error("[ExampleRequest]",w),""}};return i.watch([()=>l,()=>f,()=>p,()=>s],async()=>{o.value=await m()},{deep:!0,immediate:!0}),i.onServerPrefetch(async()=>{const v=i.useSSRContext();await wr(1),v.payload.data[n]=o.value}),i.computed(()=>Bh({serverState:f,authenticationState:p,operation:e.operation,globalSecurity:g==null?void 0:g()})),(v,b)=>(i.openBlock(),i.createBlock(i.unref(ea),{class:"dark-mode"},{default:i.withCtx(()=>[i.createVNode(i.unref(ta),{muted:""},{actions:i.withCtx(()=>[i.createVNode(Qf,{class:"request-client-picker",modelValue:JSON.stringify(i.unref(l)),options:i.unref(d).map(w=>({value:w.key,label:w.title,options:w.clients.map(S=>({value:JSON.stringify({targetKey:w.key,clientKey:S.key}),label:S.title}))})),"onUpdate:modelValue":b[0]||(b[0]=w=>i.unref(c)(JSON.parse(w)))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(u))+" "+i.toDisplayString(i.unref(h)),1)]),_:1},8,["modelValue","options"]),i.createElementVNode("button",{class:"copy-button",type:"button",onClick:b[1]||(b[1]=w=>i.unref(a)(o.value))},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px"})])]),default:i.withCtx(()=>[i.createElementVNode("div",ML,[i.createVNode(i.unref(oo),{as:"span",class:"request-method",method:v.operation.httpVerb},null,8,["method"]),i.renderSlot(v.$slots,"header",{},void 0,!0)])]),_:3}),i.createVNode(i.unref(lo),{borderless:"",class:"request-editor-section custom-scroll",frameless:""},{default:i.withCtx(()=>[i.createElementVNode("div",DL,[i.createVNode(i.unref(Nr),{content:o.value,hideCredentials:i.unref(bv)(i.unref(p)),lang:i.unref(l).targetKey,lineNumbers:""},null,8,["content","hideCredentials","lang"])])]),_:1}),y.value||v.$slots.footer?(i.openBlock(),i.createBlock(i.unref(Rc),{key:0,class:"request-card-footer",contrast:""},{default:i.withCtx(()=>{var w,S,x,k;return[y.value?(i.openBlock(),i.createElementBlock("div",VL,[i.createVNode(cw,{class:"request-example-selector",examples:((k=(x=(S=(w=v.operation.information)==null?void 0:w.requestBody)==null?void 0:S.content)==null?void 0:x["application/json"])==null?void 0:k.examples)??[],"onUpdate:modelValue":b[2]||(b[2]=C=>s.value=C)},null,8,["examples"])])):i.createCommentVNode("",!0),i.renderSlot(v.$slots,"footer",{},void 0,!0)]}),_:3})):i.createCommentVNode("",!0)]),_:3}))}}),dw=U(RL,[["__scopeId","data-v-23a139ed"]]),LL={key:0},jL={key:1},FL={key:0,class:"rule"},qL={class:"rule-title"},zL={class:"rule-items"},HL={key:2,class:"empty-state"},UL=i.defineComponent({__name:"ExampleResponse",props:{response:{}},setup(r){const e=["oneOf","anyOf","not"],t=n=>n.reduce((o,s)=>({...o,...s}),{});return(n,o)=>{var s,a,l,c,d,u,h;return(s=n.response)!=null&&s.example?(i.openBlock(),i.createElementBlock("div",LL,[i.createVNode(i.unref(Nr),{content:i.unref(fi)((a=n.response)==null?void 0:a.example),lang:"json"},null,8,["content"])])):(l=n.response)!=null&&l.schema?(i.openBlock(),i.createElementBlock("div",jL,[(c=n.response)!=null&&c.schema.type?(i.openBlock(),i.createBlock(i.unref(Nr),{key:0,content:i.unref(fi)(i.unref(Ue)((d=n.response)==null?void 0:d.schema,{emptyString:"…",mode:"read"})),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(e,f=>{var p,y,g,m,v,b;return i.openBlock(),i.createElementBlock(i.Fragment,{key:f},[(p=n.response)!=null&&p.schema[f]&&(((y=n.response)==null?void 0:y.schema[f].length)>1||f==="not")?(i.openBlock(),i.createElementBlock("div",FL,[i.createElementVNode("div",qL,i.toDisplayString(f),1),i.createElementVNode("ol",zL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((g=n.response)==null?void 0:g.schema[f],(w,S)=>(i.openBlock(),i.createElementBlock("li",{key:S,class:"rule-item"},[i.createVNode(i.unref(Nr),{content:i.unref(Ue)(w,{emptyString:"…",mode:"read"}),lang:"json"},null,8,["content"])]))),128))])])):(m=n.response)!=null&&m.schema[f]&&((v=n.response)==null?void 0:v.schema[f].length)===1?(i.openBlock(),i.createBlock(i.unref(Nr),{key:1,content:i.unref(Ue)((b=n.response)==null?void 0:b.schema[f][0],{emptyString:"…",mode:"read"}),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0)],64)}),64)),(u=n.response)!=null&&u.schema.allOf?(i.openBlock(),i.createBlock(i.unref(Nr),{key:1,content:t((h=n.response)==null?void 0:h.schema.allOf.map(f=>i.unref(Ue)(f,{emptyString:"…",mode:"read"}))),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",HL," No Body "))}}}),Xg=U(UL,[["__scopeId","data-v-800e8c7d"]]),KL=r=>(i.pushScopeId("data-v-314905de"),r=r(),i.popScopeId(),r),WL={key:1,class:"scalar-card-checkbox"},GL=KL(()=>i.createElementVNode("span",{class:"scalar-card-checkbox-checkmark"},null,-1)),JL={class:"scalar-card-container custom-scroll"},YL={key:1,class:"response-description"},XL=i.defineComponent({__name:"PathResponses",props:{operation:{}},setup(r){const e=r,{copyToClipboard:t}=ws(),n=i.ref(),o=i.computed(()=>{var f,p;return Object.keys(((p=(f=e==null?void 0:e.operation)==null?void 0:f.information)==null?void 0:p.responses)??{}).sort(y=>y==="default"?-1:0)}),s=i.computed(()=>!!c.value.examples),a=i.ref(0),l=i.computed(()=>{var p,y;const f=o.value[a.value];return(y=(p=e.operation.information)==null?void 0:p.responses)==null?void 0:y[f]}),c=i.computed(()=>{var p;const f=v0((p=l.value)==null?void 0:p.content);return(f==null?void 0:f["application/json"])??(f==null?void 0:f["text/plain"])??l.value}),d=i.computed(()=>({...c.value,example:s.value&&n.value?c.value.examples[n.value].value??c.value.examples[n.value]:c.value.example})),u=f=>{a.value=f},h=i.ref(!1);return(f,p)=>o.value.length?(i.openBlock(),i.createBlock(i.unref(ea),{key:0},{default:i.withCtx(()=>{var y;return[i.createVNode(i.unref(iw),{muted:"",x:"as",onChange:u},{actions:i.withCtx(()=>{var g,m;return[(g=c.value)!=null&&g.example?(i.openBlock(),i.createElementBlock("button",{key:0,class:"code-copy",type:"button",onClick:p[0]||(p[0]=()=>{var v;return i.unref(t)((v=c.value)==null?void 0:v.example)})},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px",x:"asd"})])):i.createCommentVNode("",!0),(m=c.value)!=null&&m.schema?(i.openBlock(),i.createElementBlock("label",WL,[i.createTextVNode(" Show Schema "),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":p[1]||(p[1]=v=>h.value=v),class:"scalar-card-checkbox-input",type:"checkbox"},null,512),[[i.vModelCheckbox,h.value]]),GL])):i.createCommentVNode("",!0)]}),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,g=>(i.openBlock(),i.createBlock(i.unref(aw),{key:g},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g),1)]),_:2},1024))),128))]),_:1}),i.createElementVNode("div",JL,[i.createVNode(i.unref(lo),{muted:""},{default:i.withCtx(()=>{var g;return[(g=c.value)!=null&&g.schema?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[h.value&&d.value?(i.openBlock(),i.createBlock(i.unref(Nr),{key:0,content:d.value,lang:"json"},null,8,["content"])):(i.openBlock(),i.createBlock(Xg,{key:1,response:d.value},null,8,["response"]))],64)):(i.openBlock(),i.createBlock(Xg,{key:1,response:d.value},null,8,["response"]))]}),_:1})]),(y=l.value)!=null&&y.description||s.value?(i.openBlock(),i.createBlock(i.unref(Rc),{key:0,class:"response-card-footer",muted:""},{default:i.withCtx(()=>{var g,m;return[s.value?(i.openBlock(),i.createBlock(cw,{key:0,class:"response-example-selector",examples:(g=c.value)==null?void 0:g.examples,"onUpdate:modelValue":p[2]||(p[2]=v=>n.value=v)},null,8,["examples"])):(m=l.value)!=null&&m.description?(i.openBlock(),i.createElementBlock("div",YL,[i.createVNode(i.unref(wt),{class:"markdown",value:l.value.description},null,8,["value"])])):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)}}),uw=U(XL,[["__scopeId","data-v-314905de"]]),QL=r=>(i.pushScopeId("data-v-f44e2b65"),r=r(),i.popScopeId(),r),ZL=QL(()=>i.createElementVNode("span",null,"Test Request",-1)),ej=i.defineComponent({__name:"TryRequestButton",props:{operation:{}},setup(r){const e=i.inject(Vc);return(t,n)=>(i.openBlock(),i.createBlock(i.unref(oo),{as:"button",class:"show-api-client-button",method:t.operation.httpVerb,type:"button",onClick:n[0]||(n[0]=i.withModifiers(o=>{var s;return i.unref($l)(t.operation,(s=i.unref(e))==null?void 0:s())},["stop"]))},{default:i.withCtx(()=>[i.createVNode(i.unref(Me),{icon:"PaperAirplane"}),ZL]),_:1},8,["method"]))}}),Ku=U(ej,[["__scopeId","data-v-f44e2b65"]]),tj={class:"examples"},rj=i.defineComponent({__name:"Operation",props:{id:{},operation:{}},setup(r){const e=r,{availableTargets:t}=ks(),n=i.computed(()=>{var s;const o=["x-custom-examples","x-codeSamples","x-code-samples"];for(const a of o)if((s=e.operation.information)!=null&&s[a])return e.operation.information[a];return null});return(o,s)=>(i.openBlock(),i.createBlock(i.unref(Ss),{id:o.id,label:o.operation.name},{default:i.withCtx(()=>[i.createVNode(i.unref(xs),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Xf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(es),null,{default:i.withCtx(()=>{var a,l;return[(a=o.operation.information)!=null&&a.deprecated?(i.openBlock(),i.createBlock(i.unref(Bi),{key:0},{default:i.withCtx(()=>[i.createTextVNode(" Deprecated ")]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass((l=o.operation.information)!=null&&l.deprecated?"deprecated":"")},[i.createVNode(i.unref(bn),{level:3},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:o.id??""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.operation.name),1)]),_:1},8,["id"])]),_:1})],2),i.createVNode(EL,{operation:o.operation},null,8,["operation"])]}),_:1}),i.createVNode(i.unref(es),null,{default:i.withCtx(()=>[i.createElementVNode("div",tj,[n.value?(i.openBlock(),i.createBlock(S3,{key:0,examples:n.value,operation:o.operation},{header:i.withCtx(()=>{var a;return[i.createVNode(Uu,{class:"example-path",deprecated:(a=o.operation.information)==null?void 0:a.deprecated,path:o.operation.path},null,8,["deprecated","path"])]}),footer:i.withCtx(()=>[i.createVNode(Ku,{operation:o.operation},null,8,["operation"])]),_:1},8,["examples","operation"])):i.unref(t).length?(i.openBlock(),i.createBlock(dw,{key:1,operation:o.operation},{header:i.withCtx(()=>{var a;return[i.createVNode(Uu,{class:"example-path",deprecated:(a=o.operation.information)==null?void 0:a.deprecated,path:o.operation.path},null,8,["deprecated","path"])]}),footer:i.withCtx(()=>[i.createVNode(Ku,{operation:o.operation},null,8,["operation"])]),_:1},8,["operation"])):i.createCommentVNode("",!0),i.createVNode(i.unref(uw),{operation:o.operation,style:{"margin-top":"12px"}},null,8,["operation"])])]),_:1})]),_:1})]),_:1})]),_:1},8,["id","label"]))}}),hw=U(rj,[["__scopeId","data-v-c4d55ce0"]]),nj={class:"endpoint-details-card"},oj=i.defineComponent({__name:"EndpointDetailsCard",props:{operation:{}},setup(r){const e=r,{parameterMap:t}=Kf(e),{responses:n}=Wf(e.operation);return(o,s)=>{var a;return i.openBlock(),i.createElementBlock("div",nj,[i.createVNode(Kt,{class:"endpoint-details-card-item",parameters:i.unref(t).path},{title:i.withCtx(()=>[i.createTextVNode("Path Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{class:"endpoint-details-card-item",parameters:i.unref(t).query},{title:i.withCtx(()=>[i.createTextVNode("Query Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{class:"endpoint-details-card-item",parameters:i.unref(t).header},{title:i.withCtx(()=>[i.createTextVNode("Headers")]),_:1},8,["parameters"]),i.createVNode(Zf,{class:"endpoint-details-card-item",requestBody:(a=o.operation.information)==null?void 0:a.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Body")]),_:1},8,["requestBody"]),i.createVNode(Kt,{class:"endpoint-details-card-item",parameters:i.unref(n)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])])}}}),sj=U(oj,[["__scopeId","data-v-f94bee14"]]),ij={class:"endpoint-header"},aj={class:"endpoint-details"},lj={class:"endpoint-label"},cj={class:"endpoint-label-path"},dj={class:"endpoint-label-name"},uj={class:"endpoint-content"},hj=i.defineComponent({__name:"OperationAccordion",props:{id:{},operation:{}},setup(r){const{copyToClipboard:e}=ws();return(t,n)=>(i.openBlock(),i.createBlock(i.unref(rw),{id:t.id,class:"reference-endpoint",transparent:""},i.createSlots({title:i.withCtx(()=>[i.createElementVNode("h3",ij,[i.createElementVNode("div",aj,[i.createVNode(i.unref(oo),{class:"endpoint-type",method:t.operation.httpVerb,short:""},null,8,["method"]),i.createVNode(i.unref(wn),{id:t.id??"",class:"endpoint-anchor"},{default:i.withCtx(()=>{var o;return[i.createElementVNode("div",lj,[i.createElementVNode("div",cj,[i.createVNode(Uu,{deprecated:(o=t.operation.information)==null?void 0:o.deprecated,path:t.operation.path},null,8,["deprecated","path"])]),i.createElementVNode("div",dj,i.toDisplayString(t.operation.name),1)])]}),_:1},8,["id"])])])]),actions:i.withCtx(({active:o})=>[o?(i.openBlock(),i.createBlock(Ku,{key:0,operation:t.operation},null,8,["operation"])):(i.openBlock(),i.createBlock(i.unref(Me),{key:1,class:"endpoint-try-hint",icon:"PaperAirplane"})),i.createVNode(i.unref(ji),{class:"endpoint-copy",icon:"Clipboard",label:"Copy endpoint URL",size:"xs",variant:"ghost",onClick:n[0]||(n[0]=i.withModifiers(s=>i.unref(e)(t.operation.path),["stop"]))})]),default:i.withCtx(()=>[i.createElementVNode("div",uj,[i.createVNode(sj,{operation:t.operation},null,8,["operation"]),i.createVNode(i.unref(uw),{operation:t.operation},null,8,["operation"]),i.createVNode(dw,{operation:t.operation},null,8,["operation"])])]),_:2},[t.operation.description?{name:"description",fn:i.withCtx(()=>[i.createVNode(i.unref(wt),{value:t.operation.description,withImages:""},null,8,["value"])]),key:"0"}:void 0]),1032,["id"]))}}),fj=U(hj,[["__scopeId","data-v-f61893df"]]),pj=i.defineComponent({__name:"ShowMoreButton",props:{id:{}},setup(r){const{setCollapsedSidebarItem:e}=tr();return(t,n)=>(i.openBlock(),i.createElementBlock("button",{class:"show-more",type:"button",onClick:n[0]||(n[0]=o=>i.unref(e)(t.id,!0))},[i.createTextVNode(" Show More "),i.createVNode(i.unref(Me),{class:"show-more-icon",icon:"ChevronDown"})]))}}),fw=U(pj,[["__scopeId","data-v-60a9fbab"]]),mj={class:"endpoints"},gj=["onClick"],yj=i.defineComponent({__name:"Endpoints",props:{id:{},tag:{}},emits:["observeAndNavigate"],setup(r,{emit:e}){const t=r,n=e,{getOperationId:o,getTagId:s}=ct(),{setCollapsedSidebarItem:a}=tr(),l=d=>{n("observeAndNavigate",d)};async function c(d){l(o(d,t.tag)),a(s(t.tag),!0)}return(d,u)=>(i.openBlock(),i.createBlock(i.unref(Ss),{id:d.id,label:d.tag.name.toUpperCase()},{default:i.withCtx(()=>[i.createVNode(i.unref(xs),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Xf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(es),null,{default:i.withCtx(()=>[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(s)(d.tag)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(d.tag["x-displayName"]??d.tag.name),1)]),_:1},8,["id"])]),_:1}),i.createVNode(i.unref(wt),{value:d.tag.description,withImages:""},null,8,["value"])]),_:1}),i.createVNode(i.unref(es),null,{default:i.withCtx(()=>{var h;return[((h=d.tag.operations)==null?void 0:h.length)>0?(i.openBlock(),i.createBlock(i.unref(ea),{key:0,class:"scalar-card-sticky"},{default:i.withCtx(()=>[i.createVNode(i.unref(ta),{muted:""},{default:i.withCtx(()=>[i.createTextVNode("Endpoints")]),_:1}),i.createVNode(i.unref(lo),{class:"custom-scroll",muted:""},{default:i.withCtx(()=>[i.createElementVNode("div",mj,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.tag.operations,f=>(i.openBlock(),i.createElementBlock("a",{key:i.unref(o)(f,d.tag),class:"endpoint",onClick:p=>c(f)},[i.createVNode(i.unref(oo),{method:f.httpVerb},null,8,["method"]),i.createElementVNode("span",null,i.toDisplayString(f.path),1)],8,gj))),128))])]),_:1})]),_:1})):i.createCommentVNode("",!0)]}),_:1})]),_:1})]),_:1})]),_:1},8,["id","label"]))}}),vj=U(yj,[["__scopeId","data-v-b209ef2d"]]),bj=(r,e)=>{Xe.useMutationObserver(r,e,{childList:!0,subtree:!0})},wj=i.defineComponent({__name:"Tag",props:{id:{},tag:{},spec:{}},setup(r){const e=r,t=i.ref(null),{collapsedSidebarItems:n}=tr(),{getTagId:o}=ct(),s=d=>{var u;return((u=e.spec.tags)==null?void 0:u.length)!==1||(d==null?void 0:d.name)!=="default"||(d==null?void 0:d.description)!==""},a=d=>{window.location.href=`#${d}`},l=d=>{bj(t,(u,h)=>{u.forEach(f=>{Array.from(f.addedNodes).some(y=>y instanceof HTMLElement&&y.id===d)&&(a(d),h.disconnect())})})},c=d=>{document.getElementById(d)?a(d):l(d)};return(d,u)=>(i.openBlock(),i.createBlock(i.unref(Zi),{ref_key:"sectionContainerRef",ref:t,class:"tag-section-container"},{default:i.withCtx(()=>{var h;return[s(d.tag)?(i.openBlock(),i.createBlock(vj,{key:0,id:d.id,tag:d.tag,onObserveAndNavigate:c},null,8,["id","tag"])):i.createCommentVNode("",!0),!i.unref(n)[i.unref(o)(d.tag)]&&((h=d.tag.operations)==null?void 0:h.length)>1?(i.openBlock(),i.createBlock(fw,{key:1,id:d.id??""},null,8,["id"])):i.renderSlot(d.$slots,"default",{key:2},void 0,!0)]}),_:3},512))}}),pw=U(wj,[["__scopeId","data-v-7fef7ce7"]]),kj=i.defineComponent({__name:"TagAccordion",props:{tag:{},spec:{}},setup(r){const{getTagId:e}=ct();return(t,n)=>(i.openBlock(),i.createBlock(i.unref(nw),{class:"tag-section"},{title:i.withCtx(()=>[i.createVNode(i.unref(bn),{class:"tag-name",level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(e)(t.tag)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.tag.name),1)]),_:1},8,["id"])]),_:1}),i.createVNode(i.unref(wt),{class:"tag-description",value:t.tag.description,withImages:""},null,8,["value"])]),default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}}),Sj=U(kj,[["__scopeId","data-v-f11e3b56"]]),xj=i.defineComponent({__name:"Loading",props:{layout:{default:"default"},parsedSpec:{}},setup(r){const e=r,t=i.ref(!1),n=i.ref([]),o=i.ref([]),{getModelId:s,getSectionId:a,getTagId:l,hash:c,isIntersectionEnabled:d}=ct(),u=i.ref(e.layout!=="accordion"&&c.value);i.watch(()=>{var f;return(f=e.parsedSpec.tags)==null?void 0:f.length},f=>{var y,g;if(!c.value||typeof f!="number"||!e.parsedSpec.tags)return;const p=a();if(p.startsWith("tag")){let m=0;const v=((y=e.parsedSpec.tags)==null?void 0:y.findIndex(S=>l(S)===p))??0,b=c.value.match(/tag\/([^/]+)\/([^/]+)\/(.+)/);if((b==null?void 0:b.length)===4){const S=b[2],x="/"+b[3];m=(g=e.parsedSpec.tags[v])==null?void 0:g.operations.findIndex(({httpVerb:k,path:C})=>S===k&&x===C)}const w=e.parsedSpec.tags[v];if(!w)return;w.name!=="default"&&(t.value=p!==c.value&&p.startsWith("tag")),n.value.push({...w,lazyOperations:w.operations.slice(m,m+2)})}else if(c.value.startsWith("model")){const m=Object.keys(Jt(e.parsedSpec)??{}),[,v]=c.value.toLowerCase().split("/"),b=c.value==="models"?0:m.findIndex(w=>w.toLowerCase()===v);if(b===-1)return;o.value=m.slice(b,b+3)}else Ti(c.value),setTimeout(()=>d.value=!0,1e3)},{immediate:!0});const h=Hu.on(({id:f})=>{const p=c.value;!p||f!==p||(h(),setTimeout(()=>{typeof window<"u"&&Ti(p),u.value=!1,setTimeout(()=>d.value=!0,1e3)},300))});return i.onMounted(()=>{c.value||setTimeout(()=>d.value=!0,1e3)}),(f,p)=>i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["references-loading",{"references-loading-hidden-tag":t.value,"references-loading-top-spacer":n.value.length}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,y=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:y.id},[y.operations&&y.operations.length>0?(i.openBlock(),i.createBlock(i.unref(pw),{key:0,spec:f.parsedSpec,tag:y},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.lazyOperations,g=>(i.openBlock(),i.createBlock(i.unref(hw),{key:`${g.httpVerb}-${g.operationId}`,operation:g,tag:y},null,8,["operation","tag"]))),128))]),_:2},1032,["spec","tag"])):i.createCommentVNode("",!0)],64))),128)),o.value.length?(i.openBlock(),i.createBlock(i.unref(Zi),{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,y=>(i.openBlock(),i.createBlock(i.unref(Ss),{key:y,label:y},{default:i.withCtx(()=>{var g;return[(g=i.unref(Jt)(f.parsedSpec))!=null&&g[y]?(i.openBlock(),i.createBlock(i.unref(xs),{key:0},{default:i.withCtx(()=>{var m;return[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(s)(y)},{default:i.withCtx(()=>{var v;return[i.createTextVNode(i.toDisplayString(((v=i.unref(Jt)(f.parsedSpec))==null?void 0:v[y]).title??y),1)]}),_:2},1032,["id"])]),_:2},1024),i.createVNode(i.unref(qn),{name:y,noncollapsible:"",value:(m=i.unref(Jt)(f.parsedSpec))==null?void 0:m[y]},null,8,["name","value"])]}),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["label"]))),128))]),_:1})):i.createCommentVNode("",!0)],2)),[[i.vShow,u.value]])}}),Cj=r=>(i.pushScopeId("data-v-f19478dd"),r=r(),i.popScopeId(),r),Ej=Cj(()=>i.createElementVNode("div",{id:"models"},null,-1)),$j=i.defineComponent({__name:"Models",props:{schemas:{}},setup(r){const e=r,{collapsedSidebarItems:t}=tr(),{getModelId:n}=ct(),o=i.computed(()=>Object.keys(e.schemas??{}).length<=3||t[n()]),s=i.computed(()=>{const a=Object.keys(e.schemas??{});return o.value?a:a.slice(0,3)});return(a,l)=>a.schemas?(i.openBlock(),i.createBlock(i.unref(Zi),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(Ll),{id:"models",isLazy:!1},{default:i.withCtx(()=>[Ej]),_:1}),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(c,d)=>(i.openBlock(),i.createBlock(i.unref(Ll),{id:i.unref(n)(c),key:c,isLazy:""},{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),{id:i.unref(n)(c),label:c},{default:i.withCtx(()=>[a.schemas[c]?(i.openBlock(),i.createBlock(i.unref(xs),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(n)(c)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.schemas[c].title??c),1)]),_:2},1032,["id"])]),_:2},1024),i.createVNode(i.unref(qn),{name:c,noncollapsible:"",value:a.schemas[c]},null,8,["name","value"]),!o.value&&d===s.value.length-1?(i.openBlock(),i.createBlock(fw,{key:0,id:i.unref(n)(),class:"something-special"},null,8,["id"])):i.createCommentVNode("",!0)]),_:2},1024)):i.createCommentVNode("",!0)]),_:2},1032,["id","label"])]),_:2},1032,["id"]))),128))]),_:1})):i.createCommentVNode("",!0)}}),_j=U($j,[["__scopeId","data-v-f19478dd"]]),Nj={key:0,class:"properties"},Aj={key:1},Oj=i.defineComponent({__name:"ModelsAccordion",props:{schemas:{}},setup(r){const e=r,t=i.computed(()=>e.schemas?Object.entries(e.schemas).map(([o,s])=>({name:o,schema:s})):[]),{getModelId:n}=ct();return(o,s)=>e.schemas?(i.openBlock(),i.createBlock(i.unref(nw),{key:0,class:"reference-models"},{title:i.withCtx(()=>[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createTextVNode("Models")]),_:1})]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.value,({name:a,schema:l})=>(i.openBlock(),i.createBlock(i.unref(rw),{id:i.unref(n)(a),key:a,label:a},{title:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(n)(a),class:"reference-models-anchor"},{default:i.withCtx(()=>[i.createVNode(i.unref(lw),{class:"reference-models-label",name:a,value:l},null,8,["name","value"])]),_:2},1032,["id"])]),default:i.withCtx(()=>[l!=null&&l.properties?(i.openBlock(),i.createElementBlock("div",Nj,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.entries(l.properties),([c,d])=>(i.openBlock(),i.createBlock(i.unref(Fn),{key:c,name:c,required:l.required&&!!l.required.length&&l.required.includes(c),value:d},null,8,["name","required","value"]))),128))])):(i.openBlock(),i.createElementBlock("div",Aj,[i.createVNode(i.unref(Fn),{value:l},null,8,["value"])]))]),_:2},1032,["id","label"]))),128))]),_:1})):i.createCommentVNode("",!0)}}),Tj=U(Oj,[["__scopeId","data-v-2399f144"]]),Bj=i.defineComponent({__name:"Webhook",props:{webhook:{}},setup(r){const e=r,{responses:t}=Wf(e.webhook);return(n,o)=>{var s;return n.webhook?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(Zf,{requestBody:(s=n.webhook.information)==null?void 0:s.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Payload")]),_:1},8,["requestBody"]),i.createVNode(Kt,{parameters:i.unref(t)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])],64)):i.createCommentVNode("",!0)}}}),Pj=i.defineComponent({__name:"Webhooks",props:{webhooks:{}},setup(r){const e=r,t=i.computed(()=>Object.keys(e.webhooks??{})),{getWebhookId:n}=ct();return(o,s)=>t.value.length?(i.openBlock(),i.createBlock(i.unref(Zi),{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.value,a=>{var l;return i.openBlock(),i.createElementBlock(i.Fragment,{key:a},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.keys((l=o.webhooks)==null?void 0:l[a]),c=>(i.openBlock(),i.createBlock(i.unref(Ss),{id:i.unref(n)(a,c),key:c,label:a},{default:i.withCtx(()=>{var d;return[(d=o.webhooks)!=null&&d[a]?(i.openBlock(),i.createBlock(i.unref(xs),{key:0},{default:i.withCtx(()=>{var u,h;return[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(n)(a,c)},{default:i.withCtx(()=>{var f;return[i.createTextVNode(i.toDisplayString((f=o.webhooks[a][c])==null?void 0:f.name),1)]}),_:2},1032,["id"])]),_:2},1024),(u=o.webhooks[a][c])!=null&&u.description?(i.openBlock(),i.createBlock(i.unref(wt),{key:0,value:(h=o.webhooks[a][c])==null?void 0:h.description,withImages:""},null,8,["value"])):i.createCommentVNode("",!0),i.createVNode(Bj,{webhook:o.webhooks[a][c]},null,8,["webhook"])]}),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","label"]))),128))],64)}),128))]),_:1})):i.createCommentVNode("",!0)}}),Ij=i.createStaticVNode('<div class="section-flare" data-v-055e26bb><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div></div>',1),Mj={class:"narrow-references-container"},Dj=i.defineComponent({__name:"Content",props:{parsedSpec:{},layout:{},baseServerURL:{},proxy:{}},setup(r){const e=r,{getOperationId:t,getTagId:n,hash:o}=ct(),{setServer:s}=no(),{hideModels:a,collapsedSidebarItems:l}=tr(),c=p=>{if(p.url.match(/^(?!(https?|file):\/\/|{).+/)){let y=e.baseServerURL??window.location.origin;y=y.replace(/\/$/,"");const g=p.url.startsWith("/")?p.url:`/${p.url}`;p.url=`${y}${g}`.replace(/\/$/,"")}return p};i.watch(()=>e.parsedSpec,p=>{var g,m;let y=[{url:typeof window<"u"?window.location.origin:"/"}];p.servers&&p.servers.length>0?y=p.servers:e.parsedSpec.host&&(y=[{url:`${((g=e.parsedSpec.schemes)==null?void 0:g[0])??"http"}://${e.parsedSpec.host}${((m=e.parsedSpec)==null?void 0:m.basePath)??""}`}]),(e.baseServerURL||typeof window<"u")&&(y=y.map(c)),s({servers:y})},{deep:!0,immediate:!0});const d=i.computed(()=>e.layout==="accordion"?Sj:pw),u=i.computed(()=>e.layout==="accordion"?fj:hw),h=i.computed(()=>e.layout==="accordion"?"after":"aside"),f=e.layout!=="accordion"&&!o.value.startsWith("model");return(p,y)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[Ij,i.createElementVNode("div",Mj,[i.renderSlot(p.$slots,"start",{},void 0,!0),i.createVNode(i.unref(xj),{layout:p.layout,parsedSpec:p.parsedSpec},null,8,["layout","parsedSpec"]),p.parsedSpec.info.title||p.parsedSpec.info.description?(i.openBlock(),i.createBlock(i.unref(YR),{key:0,info:p.parsedSpec.info,parsedSpec:p.parsedSpec},{[h.value]:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["introduction-card",{"introduction-card-row":p.layout==="accordion"}])},[i.createVNode(i.unref(XV)),i.createVNode(i.unref(EV),{parsedSpec:p.parsedSpec,proxy:p.proxy},null,8,["parsedSpec","proxy"]),i.createVNode(i.unref(pR))],2)]),_:2},1032,["info","parsedSpec"])):i.renderSlot(p.$slots,"empty-state",{key:1},void 0,!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.parsedSpec.tags,g=>(i.openBlock(),i.createBlock(i.unref(Ll),{id:i.unref(n)(g),key:i.unref(n)(g),isLazy:i.unref(f)&&!i.unref(l)[i.unref(n)(g)]},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(d.value),{id:i.unref(n)(g),spec:p.parsedSpec,tag:g},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.operations,(m,v)=>(i.openBlock(),i.createBlock(i.unref(Ll),{id:i.unref(t)(m,g),key:`${m.httpVerb}-${m.operationId}`,isLazy:v>0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.value),{id:i.unref(t)(m,g),operation:m,tag:g},null,8,["id","operation","tag"]))]),_:2},1032,["id","isLazy"]))),128))]),_:2},1032,["id","spec","tag"]))]),_:2},1032,["id","isLazy"]))),128)),p.parsedSpec.webhooks?(i.openBlock(),i.createBlock(i.unref(Pj),{key:2,webhooks:p.parsedSpec.webhooks},null,8,["webhooks"])):i.createCommentVNode("",!0),i.unref(Ph)(p.parsedSpec)&&!i.unref(a)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[p.layout==="accordion"?(i.openBlock(),i.createBlock(i.unref(Tj),{key:0,schemas:i.unref(Jt)(p.parsedSpec)},null,8,["schemas"])):(i.openBlock(),i.createBlock(i.unref(_j),{key:1,schemas:i.unref(Jt)(p.parsedSpec)},null,8,["schemas"]))],64)):i.createCommentVNode("",!0),i.renderSlot(p.$slots,"end",{},void 0,!0)])],64))}}),mw=U(Dj,[["__scopeId","data-v-055e26bb"]]),Vj=r=>(i.pushScopeId("data-v-391b4e37"),r=r(),i.popScopeId(),r),Rj={class:"start custom-scroll"},Lj={class:"start-copy"},jj=i.createStaticVNode('<div class="start-logo" data-v-391b4e37><svg height="36" viewBox="0 0 36 36" width="36" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><path d="M18 0a18 18 0 1 1 0 36 18 18 0 0 1 0-36Zm11.2 6.5c-3.3-3.3-11.1-1-17.4 5.3-6.2 6.3-8.6 14-5.3 17.4 3.3 3.3 11 .9 17.3-5.4 6.3-6.2 8.7-14 5.4-17.3ZM17.6 12a6.3 6.3 0 1 1 0 12.7 6.3 6.3 0 0 1 0-12.7Z" fill="currentColor" fill-rule="evenodd" data-v-391b4e37></path></svg></div><h1 class="start-h1" data-v-391b4e37>Swagger Editor</h1><p class="start-p" data-v-391b4e37> Welcome to the Scalar API References + Swagger Editor, a Free &amp; Open-Source tool that takes your Swagger/OAS file and generates Beautiful API references. </p>',3),Fj={class:"start-cta"},qj={class:"start-row"},zj=i.createStaticVNode('<div class="start-section start-section-integrations" data-v-391b4e37><div class="start-h2" data-v-391b4e37>INTEGRATIONS</div><a class="start-item" href="https://github.com/scalar/scalar/tree/main/packages/fastify-api-reference#readme" target="_blank" data-v-391b4e37><svg fill="currentColor" height="16" viewBox="0 0 19 16" width="19" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><path d="m18.2 3.1.8-2V.9l-4.7 1.3C15.2 1 15 0 15 0s-2.5 1.6-4.3 1.5c-2 0-3.6.8-4 1-1.8 1.2-2.5 3.3-3.2 3.8L0 8.9 2.3 8l-2 2.5c.2.3 1.2 1.6 2.1 1.3l.4-.1 1.6.5-.7-1 .2-.2.9.3-.1-.8.9.3-.1-.8.3-.1 1-3.5 3.7-2.6-.3.7A4 4 0 0 1 8 7l-.6.2c-.5.5-.7.7-.8 2.5a2 2 0 0 1 1 0c1.6.4 2.2 2.3 1.7 2.9l-.7.6H8v.6h-.7v.5l-.2.2c-.7 0-1.4-.6-1.4-.6 0 .5.4 1.3.4 1.3s1.7 1.1 2.7.7c1-.4.7-2.3 2.8-3.2l3.3-.9.8-2.2-1.7.5v-2l2.5-.6.9-2.2-3.4.9v-2l4.2-1.1Z" fill="currentColor" fill-rule="nonzero" data-v-391b4e37></path></svg><span data-v-391b4e37>Fastify</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#from-a-cdn" target="_blank" data-v-391b4e37><svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g data-v-391b4e37><path d="M22.5 1.5h-21A1.5 1.5 0 0 0 0 3v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 6V3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3A1.25 1.25 0 1 1 4.5 5.75 1.25 1.25 0 0 1 3.25 4.5ZM8.5 5.75A1.25 1.25 0 1 1 9.75 4.5 1.25 1.25 0 0 1 8.5 5.75Z" fill="currentColor" data-v-391b4e37></path><path d="M22.5 9h-21A1.5 1.5 0 0 0 0 10.5v3A1.5 1.5 0 0 0 1.5 15h21a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 22.5 9ZM3.25 12a1.25 1.25 0 1 1 1.25 1.25A1.25 1.25 0 0 1 3.25 12Zm5.25 1.25A1.25 1.25 0 1 1 9.75 12a1.25 1.25 0 0 1-1.25 1.25Z" fill="currentColor" data-v-391b4e37></path><path d="M22.5 16.5h-21A1.5 1.5 0 0 0 0 18v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 21v-3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3a1.25 1.25 0 1 1 1.25 1.25 1.25 1.25 0 0 1-1.25-1.25Zm5.25 1.25a1.25 1.25 0 1 1 1.25-1.25 1.25 1.25 0 0 1-1.25 1.25Z" fill="currentColor" data-v-391b4e37></path></g></svg><span data-v-391b4e37>CDN</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#with-vuejs" target="_blank" data-v-391b4e37><svg height="170" viewBox="0 0 196.3 170" width="196.3" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g fill="currentColor" fill-rule="nonzero" data-v-391b4e37><polygon points="39.23 0 0 0 2.9450761 5.1010782 98.16 170.02 196.32 0 157.06 0 98.16 102.01 42.175701 5.0991171" data-v-391b4e37></polygon><polygon points="75.5 2.009956e-14 0 2.009956e-14 2.94 5.1 78.44871 5.1 98.16 39.26 117.87937 5.1 193.38 5.1 196.325 0 120.82 7.8065636e-15 114.97322 2.009956e-14 98.16 29.037153 81.35 2.009956e-14" data-v-391b4e37></polygon></g></svg><span data-v-391b4e37>Vue</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#with-react" target="_blank" data-v-391b4e37><svg height="23.3" viewBox="0 0 22 23.3" width="22" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g fill="none" fill-rule="evenodd" data-v-391b4e37><circle cx="11" cy="11.6" fill="currentColor" fill-rule="nonzero" r="2" data-v-391b4e37></circle><g stroke="currentColor" data-v-391b4e37><ellipse cx="11" cy="11.6" rx="11" ry="4.2" data-v-391b4e37></ellipse><ellipse cx="11" cy="11.6" rx="11" ry="4.2" transform="rotate(60 11 11.6)" data-v-391b4e37></ellipse><ellipse cx="11" cy="11.6" rx="11" ry="4.2" transform="rotate(120 11 11.6)" data-v-391b4e37></ellipse></g></g></svg><span data-v-391b4e37>React</span></a></div>',1),Hj={class:"start-section start-section-colors"},Uj=Vj(()=>i.createElementVNode("p",{class:"start-h2"},"THEMING",-1)),Kj=["onClick"],Wj=i.createStaticVNode('<p class="start-h1" data-v-391b4e37>Features</p><ul class="start-ul" data-v-391b4e37><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Customize</p> Bring your typography &amp; color palettes, or use our themes! </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Testing</p> A deeply integrated Rest API Client (Also Free &amp; Open-Source) </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Search</p> Fully integrated Search (Using fuse.js) </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Hosting</p> Free subdomain hosting on https://apidocumentation.com </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>OpenAPI &amp; Swagger</p> Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0 </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Code Samples</p> Code samples to show off your API in most popular languages </li></ul>',2),Gj=i.defineComponent({__name:"GettingStarted",props:{theme:{}},emits:["changeTheme","loadSwaggerFile","linkSwaggerFile","updateContent"],setup(r,{emit:e}){const t=e,n=["default","alternate","moon","purple","solarized","bluePlanet","saturn","kepler","mars","deepSpace"];async function o(){const s=await fetch("https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.yaml");t("updateContent",await s.text())}return(s,a)=>(i.openBlock(),i.createElementBlock("div",Rj,[i.createElementVNode("div",Lj,[jj,i.createElementVNode("div",Fj,[i.createVNode(i.unref(wu),{fullWidth:"",onClick:o},{default:i.withCtx(()=>[i.createTextVNode(" Show Example ")]),_:1}),i.createVNode(i.unref(wu),{fullWidth:"",variant:"outlined",onClick:a[0]||(a[0]=l=>s.$emit("loadSwaggerFile"))},{default:i.withCtx(()=>[i.createTextVNode(" Upload File ")]),_:1})])]),i.createElementVNode("div",qj,[zj,i.createElementVNode("div",Hj,[Uj,(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,l=>i.createElementVNode("div",{key:l,class:i.normalizeClass(["start-item",{"start-item-active":l===s.theme}]),onClick:c=>s.$emit("changeTheme",{id:l,label:i.unref(mp)[l]})},i.toDisplayString(i.unref(mp)[l]),11,Kj)),64))])]),Wj]))}}),gw=U(Gj,[["__scopeId","data-v-391b4e37"]]),Jj={class:"references-header"},Yj={key:0,class:"references-navigation t-doc__sidebar"},Xj={class:"references-navigation-list"},Qj={class:"references-editor"},Zj={class:"references-editor-textarea"},e4={class:"references-rendered"},t4={key:0,class:"references-footer"},r4=i.defineComponent({inheritAttrs:!1,__name:"ApiReferenceLayout",props:{configuration:{},parsedSpec:{},rawSpec:{}},emits:["changeTheme","updateContent","loadSwaggerFile","linkSwaggerFile","toggleDarkMode"],setup(r){const e=r,t=Xe.useMediaQuery("(min-width: 1150px)"),n=i.ref("100dvh"),o=i.ref(null);Xe.useResizeObserver(o,k=>{n.value=k[0].contentRect.height+"px"});const{breadcrumb:s,collapsedSidebarItems:a,isSidebarOpen:l,setCollapsedSidebarItem:c,hideModels:d,setParsedSpec:u}=tr(),{getPathRoutingId:h,getSectionId:f,getTagId:p,hash:y,isIntersectionEnabled:g,pathRouting:m,updateHash:v}=ct();m.value=e.configuration.pathRouting,i.onBeforeMount(()=>v());const b=async k=>{var C;g.value=!1,v(),k?Ti(k):(C=o.value)==null||C.scrollTo(0,0),await wr(100),g.value=!0};i.onMounted(()=>{Hf.on(({specTitle:k})=>{z1(e.rawSpec,k)}),window.onhashchange=()=>b(decodeURIComponent(window.location.hash.replace(/^#/,""))),window.onpopstate=()=>m.value&&b(h(window.location.pathname))});const w=i.computed(()=>t.value||!e.configuration.isEditable),S=Xe.useDebounceFn(k=>{if((k.target.scrollTop??0)<50){const N=e.configuration.pathRouting?e.configuration.pathRouting.basePath:window.location.pathname;window.history.replaceState({},"",N+window.location.search),y.value=""}}),x=i.computed(()=>({breadcrumb:s.value,spec:e.parsedSpec}));return i.watch(()=>e.parsedSpec,u,{deep:!0}),i.onServerPrefetch(()=>{var C,N;const k=i.useSSRContext();if(k&&((C=k.payload).data||(C.data=$d()),e.configuration.pathRouting)){const P=h(k.url);y.value=P,k.payload.data.hash=P;for(const M in a)Object.hasOwn(a,M)&&delete a[M];if(P)c(f(P),!0);else{const M=(N=e.parsedSpec.tags)==null?void 0:N[0];M&&c(p(M),!0)}k.payload.data["useSidebarContent-collapsedSidebarItems"]=a}}),Le.provideUseId(()=>{var P;const k=i.getCurrentInstance(),C="scalar-instance-id";if(!k)return C;let N=k.uid;return typeof window>"u"?(k.attrs||(k.attrs={}),k.attrs[C]=N):(P=k.vnode.el)!=null&&P.getAttribute&&(N=k.vnode.el.getAttribute(C)),`${C}-${N}`}),i.provide(Vc,()=>e.parsedSpec.security),i.provide(zf,()=>e.configuration.hideDownloadButton),d.value=e.configuration.hideModels??!1,D5(e.configuration),(k,C)=>{var N,P;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(i.unref(r0),{id:(N=k.configuration)==null?void 0:N.theme,withDefaultFonts:(P=k.configuration)==null?void 0:P.withDefaultFonts},null,8,["id","withDefaultFonts"]),i.createVNode(i.unref(o0),null,{default:i.withCtx(({styles:M})=>[i.createVNode(i.unref(uk),null,{default:i.withCtx(({styles:j})=>{var I,X;return[i.createElementVNode("div",{ref_key:"documentEl",ref:o,class:i.normalizeClass(["scalar-api-reference references-layout",[{"references-editable":k.configuration.isEditable,"references-sidebar":k.configuration.showSidebar,"references-sidebar-mobile-open":i.unref(l),"references-classic":k.configuration.layout==="classic"},M,j,k.$attrs.class]]),style:i.normalizeStyle({"--full-height":n.value}),onScrollPassive:C[4]||(C[4]=(...W)=>i.unref(S)&&i.unref(S)(...W))},[i.createElementVNode("div",Jj,[i.renderSlot(k.$slots,"header",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),k.configuration.showSidebar?(i.openBlock(),i.createElementBlock("aside",Yj,[i.createElementVNode("div",Xj,[i.createVNode(i.unref(Gf),{parsedSpec:k.parsedSpec},{"sidebar-start":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),"sidebar-end":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:3},8,["parsedSpec"])])])):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("div",Qj,[i.createElementVNode("div",Zj,[i.renderSlot(k.$slots,"editor",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)])],512),[[i.vShow,k.configuration.isEditable]]),w.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",e4,[i.createVNode(i.unref(mw),{baseServerURL:k.configuration.baseServerURL,layout:k.configuration.layout==="classic"?"accordion":"default",parsedSpec:k.parsedSpec,proxy:k.configuration.proxy},i.createSlots({start:i.withCtx(()=>[i.renderSlot(k.$slots,"content-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),end:i.withCtx(()=>[i.renderSlot(k.$slots,"content-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:2},[(I=k.configuration)!=null&&I.isEditable?{name:"empty-state",fn:i.withCtx(()=>{var W;return[i.createVNode(gw,{theme:((W=k.configuration)==null?void 0:W.theme)||"default",onChangeTheme:C[0]||(C[0]=te=>k.$emit("changeTheme",te)),onLinkSwaggerFile:C[1]||(C[1]=te=>k.$emit("linkSwaggerFile")),onLoadSwaggerFile:C[2]||(C[2]=te=>k.$emit("loadSwaggerFile")),onUpdateContent:C[3]||(C[3]=te=>k.$emit("updateContent",te))},null,8,["theme"])]}),key:"0"}:void 0]),1032,["baseServerURL","layout","parsedSpec","proxy"])]),k.$slots.footer?(i.openBlock(),i.createElementBlock("div",t4,[i.renderSlot(k.$slots,"footer",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),i.createVNode(Q1,{parsedSpec:k.parsedSpec,proxyUrl:(X=k.configuration)==null?void 0:X.proxy},{"sidebar-start":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),"sidebar-end":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:3},8,["parsedSpec","proxyUrl"])],38)]}),_:2},1024)]),_:3}),i.createVNode(i.unref(UE))],64)}}}),ep=U(r4,[["__scopeId","data-v-34f73cf2"]]),n4={},o4={class:"references-classic-header-container"},s4={class:"references-classic-header"};function i4(r,e){return i.openBlock(),i.createElementBlock("div",o4,[i.createElementVNode("div",s4,[i.renderSlot(r.$slots,"default",{},void 0,!0),i.renderSlot(r.$slots,"dark-mode-toggle",{},void 0,!0)])])}const a4=U(n4,[["render",i4],["__scopeId","data-v-a860f78f"]]),l4=r=>(i.pushScopeId("data-v-559a0a79"),r=r(),i.popScopeId(),r),c4={class:"darklight-reference"},d4={key:0},u4={key:1},h4=l4(()=>i.createElementVNode("a",{class:"darklight-reference-promo",href:"https://www.scalar.com",target:"_blank"}," Powered by scalar.com ",-1)),f4=i.defineComponent({__name:"DarkModeToggle",props:{isDarkMode:{type:Boolean}},emits:["toggleDarkMode"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",c4,[i.createElementVNode("button",{class:"darklight",type:"button",onClick:t[0]||(t[0]=n=>e.$emit("toggleDarkMode"))},[i.createVNode(i.unref(Me),{icon:"LightDarkModeToggle"}),e.isDarkMode?(i.openBlock(),i.createElementBlock("span",d4,"Light Mode")):(i.openBlock(),i.createElementBlock("span",u4,"Dark Mode"))]),h4]))}}),yw=U(f4,[["__scopeId","data-v-559a0a79"]]),p4=i.defineComponent({__name:"DarkModeIconToggle",props:{isDarkMode:{type:Boolean}},emits:["toggleDarkMode"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("button",{class:"darklight",type:"button",onClick:t[0]||(t[0]=n=>e.$emit("toggleDarkMode"))},[i.createVNode(i.unref(Me),{icon:e.isDarkMode?"DarkMode":"LightMode"},null,8,["icon"]),i.createVNode(sw,null,{default:i.withCtx(()=>[i.createTextVNode(" Switch to "+i.toDisplayString(e.isDarkMode?"Light":"Dark")+" Mode ",1)]),_:1})]))}}),vw=U(p4,[["__scopeId","data-v-8f61ca56"]]);function m4(r,e){let t=r;const n=e.required&&e.required.includes(r);return t+=n?" REQUIRED ":" optional ",e.properties[r]&&(t+=e.properties[r].type,e.properties[r].description&&(t+=" "+e.properties[r].description)),t}function g4(r){var n;const e=["Body"],t=(n=r==null?void 0:r.schema)==null?void 0:n.properties;return t&&Object.keys(t).forEach(o=>{if(!r.schema)return;e.push(m4(o,r.schema));const s=t[o];s.type==="object"&&!!s.properties&&s.properties&&Object.keys(s.properties).forEach(l=>{var c,d;e.push(`${l} ${(d=(c=s.properties)==null?void 0:c[l])==null?void 0:d.type}`)})}),e}function y4(r){var e,t,n;try{const o=(n=(t=(e=r==null?void 0:r.information)==null?void 0:e.requestBody)==null?void 0:t.content)==null?void 0:n["application/json"];if(!o)throw new Error("Body not found");return g4(o)}catch{return!1}}const v4=r=>(i.pushScopeId("data-v-3445e6c6"),r=r(),i.popScopeId(),r),b4=v4(()=>i.createElementVNode("div",{class:"ref-search-meta"},[i.createElementVNode("span",null,"↑↓ Navigate"),i.createElementVNode("span",null,"⏎ Select")],-1)),w4=i.defineComponent({__name:"SearchModal",props:{parsedSpec:{},modalState:{}},setup(r){const e=r,t=i.toRef(e,"parsedSpec"),n={heading:"DocsPage",model:"JsonObject",req:"Terminal",tag:"CodeFolder",webhook:"Terminal"},o=Xe.useMagicKeys(),s=i.ref([]),a=i.ref([]),l=i.ref(0),c=i.ref(""),d=i.ref(null),u=new Uw(s.value,{keys:["title","description","body"]}),h=()=>{l.value=0,a.value=u.search(c.value)},f=i.computed(()=>S.value[l.value]),{getHeadingId:p,getWebhookId:y,getModelId:g,getOperationId:m,getTagId:v}=ct();i.watch(()=>e.modalState.open,N=>{N&&(c.value="",l.value=0,a.value=[])});const{setCollapsedSidebarItem:b,hideModels:w}=tr();i.watch(t.value,async()=>{var W,te,me,ke,Se;if(s.value=[],!((te=(W=e.parsedSpec)==null?void 0:W.tags)!=null&&te.length)&&!((me=e.parsedSpec)!=null&&me.webhooks)){u.setCollection([]);return}const N=[],P=await Ei(((ke=e.parsedSpec.info)==null?void 0:ke.description)??"");P.length&&(P.forEach(se=>{N.push({type:"heading",title:`Info > ${se.value}`,description:"",href:`#${p(se)}`,tag:se.slug,body:""})}),s.value=s.value.concat(N)),(Se=e.parsedSpec.tags)==null||Se.forEach(se=>{const q={title:se["x-displayName"]??se.name,href:`#${v(se)}`,description:se.description,type:"tag",tag:se.name,body:""};s.value.push(q),se.operations&&se.operations.forEach(T=>{const{parameterMap:V}=Kf({operation:T}),D=y4(T)||V.value;let E=null;typeof D!="boolean"&&(E=D);const A={type:"req",title:T.name??T.path,href:`#${m(T,se)}`,operationId:T.operationId,description:T.description??"",httpVerb:T.httpVerb,path:T.path,tag:se.name,operation:T};E&&(A.body=E),s.value.push(A)})});const M=e.parsedSpec.webhooks,j=[];M&&Object.keys(M).forEach(se=>{Object.keys(M[se]).forEach(T=>{var V;j.push({type:"webhook",title:`Webhook: ${(V=M[se][T])==null?void 0:V.name}`,href:`#${y(se,T)}`,description:se,httpVerb:T,tag:se,body:""})}),s.value=s.value.concat(j)});const I=w.value?{}:Jt(e.parsedSpec),X=[];I&&(Object.keys(I).forEach(se=>{X.push({type:"model",title:"Model",href:`#${g(se)}`,description:I[se].title??se,tag:se,body:""})}),s.value=s.value.concat(X)),u.setCollection(s.value)},{immediate:!0}),Xe.whenever(o.enter,()=>{e.modalState.open&&window&&(k(f.value),window.location.hash=f.value.item.href,e.modalState.hide())}),Xe.whenever(o.ArrowDown,()=>{var N;e.modalState.open&&window&&(l.value<S.value.length-1?l.value++:l.value=0,(N=document.getElementById(f.value.item.href))==null||N.scrollIntoView({behavior:"smooth",block:"center"}))}),Xe.whenever(o.ArrowUp,()=>{var N;e.modalState.open&&window&&(l.value>0?l.value--:l.value=S.value.length-1,(N=document.getElementById(f.value.item.href))==null||N.scrollIntoView({behavior:"smooth",block:"center"}))});const S=i.computed(()=>c.value.length===0?s.value.map(N=>({item:N})):a.value),x=/#(tag\/[^/]*)/,k=N=>{let P="models";const M=N.item.href.match(x);M!=null&&M.length&&M.length>1&&(P=M[1]),b(P,!0),e.modalState.hide()};function C(N){const P=new URL(window.location.href);return P.hash=N,P.toString()}return(N,P)=>(i.openBlock(),i.createBlock(i.unref(pv),{state:N.modalState,variant:"search"},{default:i.withCtx(()=>[i.createElementVNode("div",{ref_key:"searchModalRef",ref:d,class:"ref-search-container"},[i.createVNode(i.unref(D_),{modelValue:c.value,"onUpdate:modelValue":P[0]||(P[0]=M=>c.value=M),onInput:h},null,8,["modelValue"])],512),i.createVNode(i.unref(R_),{class:"ref-search-results custom-scroll",noResults:!S.value.length},{query:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(S.value,(M,j)=>(i.openBlock(),i.createBlock(i.unref(K_),{id:M.item.href,key:M.refIndex,active:l.value===j,href:C(M.item.href),icon:n[M.item.type],onClick:I=>k(M),onFocus:I=>l.value=j},i.createSlots({default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.title)+" ",1)]),_:2},[(M.item.httpVerb||M.item.path)&&M.item.path!==M.item.title?{name:"description",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.path),1)]),key:"0"}:M.item.description?{name:"description",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.description),1)]),key:"1"}:void 0,M.item.type==="req"?{name:"addon",fn:i.withCtx(()=>[i.createVNode(X1,{method:M.item.httpVerb??"get"},null,8,["method"])]),key:"2"}:void 0]),1032,["id","active","href","icon","onClick","onFocus"]))),128))]),_:1},8,["noResults"]),b4]),_:1},8,["state"]))}}),bw=U(w4,[["__scopeId","data-v-3445e6c6"]]),k4=r=>(i.pushScopeId("data-v-edb0a931"),r=r(),i.popScopeId(),r),S4={class:"sidebar-search-input"},x4=k4(()=>i.createElementVNode("span",{class:"sidebar-search-placeholder"},"Search",-1)),C4={class:"sidebar-search-shortcut"},E4={class:"sidebar-search-key"},$4=i.defineComponent({__name:"SearchButton",props:{spec:{},searchHotKey:{default:"k"}},setup(r){const e=r,t=mv(),n=Xe.useMagicKeys({passive:!1,onEventFired(o){!Qa()&&o.ctrlKey&&o.key===e.searchHotKey&&(o.preventDefault(),o.stopPropagation())}});return Xe.whenever(n[`${Qa()?"meta":"control"}_${e.searchHotKey}`],()=>t.open?t.hide():t.show()),(o,s)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("button",{class:i.normalizeClass(["sidebar-search",o.$attrs.class]),type:"button",onClick:s[0]||(s[0]=(...a)=>i.unref(t).show&&i.unref(t).show(...a))},[i.createVNode(i.unref(Me),{class:"search-icon",icon:"Search",size:"sm"}),i.createElementVNode("div",S4,[x4,i.createElementVNode("span",C4,[i.createElementVNode("span",E4,i.toDisplayString(i.unref(Qa)()?"⌘":"⌃")+i.toDisplayString(o.searchHotKey),1)])])],2),i.createVNode(bw,{modalState:i.unref(t),parsedSpec:o.spec},null,8,["modalState","parsedSpec"])],64))}}),tp=U($4,[["__scopeId","data-v-edb0a931"]]),_4=i.defineComponent({__name:"ClassicLayout",props:{configuration:{},parsedSpec:{},rawSpec:{},isDark:{type:Boolean}},emits:["toggleDarkMode"],setup(r){const e=r,t=i.computed(()=>({...e.configuration,showSidebar:!1}));return(n,o)=>(i.openBlock(),i.createBlock(ep,{configuration:t.value,parsedSpec:n.parsedSpec,rawSpec:n.rawSpec},{"content-start":i.withCtx(({spec:s})=>[i.createVNode(a4,null,{"dark-mode-toggle":i.withCtx(()=>[i.createVNode(i.unref(vw),{isDarkMode:n.isDark,onToggleDarkMode:o[0]||(o[0]=a=>n.$emit("toggleDarkMode"))},null,8,["isDarkMode"])]),default:i.withCtx(()=>[i.createVNode(tp,{class:"t-doc__sidebar",searchHotKey:t.value.searchHotKey,spec:s},null,8,["searchHotKey","spec"])]),_:2},1024)]),"content-end":i.withCtx(()=>[i.renderSlot(n.$slots,"footer")]),_:3},8,["configuration","parsedSpec","rawSpec"]))}}),N4={class:"references-mobile-header t-doc__header"},A4={class:"references-mobile-breadcrumbs"},O4={class:"references-mobile-header-actions"},T4=i.defineComponent({__name:"MobileHeader",props:{open:{type:Boolean}},emits:["update:open"],setup(r){const{breadcrumb:e}=tr();return(t,n)=>(i.openBlock(),i.createElementBlock("div",N4,[i.createVNode(i.unref(ji),{icon:t.open?"Close":"Menu",label:t.open?"Close Menu":"Open Menu",size:"md",onClick:n[0]||(n[0]=o=>t.$emit("update:open",!t.open))},null,8,["icon","label"]),i.createElementVNode("span",A4,i.toDisplayString(i.unref(e)),1),i.createElementVNode("div",O4,[i.renderSlot(t.$slots,"actions",{},void 0,!0)])]))}}),B4=U(T4,[["__scopeId","data-v-0242e3de"]]),P4={class:"scalar-api-references-standalone-search"},I4=i.defineComponent({__name:"ModernLayout",props:{configuration:{},parsedSpec:{},rawSpec:{},isDark:{type:Boolean}},emits:["toggleDarkMode"],setup(r){const e=r,t=Xe.useMediaQuery("(max-width: 1000px)"),{isSidebarOpen:n}=tr();i.watch(t,(s,a)=>{s&&!a&&(n.value=!1)});const{hash:o}=ct();return i.watch(o,(s,a)=>{s&&s!==a&&(n.value=!1)}),(s,a)=>(i.openBlock(),i.createBlock(ep,{class:i.normalizeClass({"scalar-api-references-standalone-mobile":s.configuration.showSidebar}),configuration:s.configuration,parsedSpec:s.parsedSpec,rawSpec:s.rawSpec},{header:i.withCtx(()=>[e.configuration.showSidebar?(i.openBlock(),i.createBlock(B4,{key:0,open:i.unref(n),"onUpdate:open":a[0]||(a[0]=l=>i.isRef(n)?n.value=l:null)},null,8,["open"])):i.createCommentVNode("",!0)]),"sidebar-start":i.withCtx(({spec:l})=>{var c;return[i.createElementVNode("div",P4,[i.createVNode(tp,{searchHotKey:(c=e.configuration)==null?void 0:c.searchHotKey,spec:l},null,8,["searchHotKey","spec"])])]}),"sidebar-end":i.withCtx(()=>[i.createVNode(i.unref(yw),{isDarkMode:s.isDark,onToggleDarkMode:a[1]||(a[1]=l=>s.$emit("toggleDarkMode"))},null,8,["isDarkMode"])]),"content-end":i.withCtx(()=>[i.renderSlot(s.$slots,"footer",{},void 0,!0)]),_:3},8,["class","configuration","parsedSpec","rawSpec"]))}}),ww=U(I4,[["__scopeId","data-v-333fecad"]]),M4={modern:ww,classic:_4},kw=i.defineComponent({__name:"ApiReference",props:{configuration:{}},emits:["updateContent"],setup(r){var h,f;const e=r,{toggleDarkMode:t,isDark:n}=I5((h=e.configuration)==null?void 0:h.darkMode);i.watch(()=>{var p;return(p=e.configuration)==null?void 0:p.darkMode},p=>{p!==n.value&&t()});const o=i.computed(()=>{var p,y;if((p=e.configuration)!=null&&p.customCss)return fk((y=e.configuration)==null?void 0:y.customCss)});i.watch(o,()=>console.log(o.value));const s=i.computed(()=>{var p;return{spec:{content:void 0,url:void 0,...(p=e.configuration)==null?void 0:p.spec},proxy:void 0,theme:"default",showSidebar:!0,isEditable:!1,...e.configuration,customCss:o.value}});(f=s.value)!=null&&f.metaData&&(pp.createHead(),pp.useSeoMeta(s.value.metaData));function a(p,y){i.watch(()=>{var g;return(g=s.value)==null?void 0:g[p]},g=>{typeof g<"u"&&y(g)},{immediate:!0})}const{setAuthentication:l}=ns();a("authentication",l);const{setExcludedClients:c}=ks();a("hiddenClients",c);const{parsedSpec:d,rawSpec:u}=W1({proxy:i.toRef(()=>{var p;return((p=e.configuration)==null?void 0:p.proxy)||""}),specConfig:i.toRef(()=>{var p;return((p=e.configuration)==null?void 0:p.spec)||{}})});return(p,y)=>{var g,m;return i.openBlock(),i.createElementBlock(i.Fragment,null,[(g=s.value)!=null&&g.customCss?(i.openBlock(),i.createBlock(i.resolveDynamicComponent("style"),{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.value.customCss),1)]),_:1})):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(M4)[((m=s.value)==null?void 0:m.layout)||"modern"]),{configuration:s.value,isDark:i.unref(n),parsedSpec:i.unref(d),rawSpec:i.unref(u),onToggleDarkMode:y[0]||(y[0]=()=>i.unref(t)()),onUpdateContent:y[1]||(y[1]=v=>p.$emit("updateContent",v))},{footer:i.withCtx(()=>[i.renderSlot(p.$slots,"footer")]),_:3},40,["configuration","isDark","parsedSpec","rawSpec"]))],64)}}});function D4(r,e,t=!0){const n=i.reactive(e),o=i.createApp(kw,{configuration:n});function s(a=r){if(!a){console.warn("Invalid HTML element provided. Cannot mount Scalar References");return}o.mount(a)}return t&&s(),{updateConfig(a,l=!0){l?Object.assign(n,a):nc(n,a)},updateSpec(a){n.spec=a},mount:s,unmount:()=>o.unmount()}}exports.Annotation=so;exports.ApiClientModal=Q1;exports.ApiReferenceLayout=ep;exports.Card=ea;exports.CardContent=lo;exports.CardFooter=Rc;exports.CardHeader=ta;exports.CardTab=aw;exports.CardTabHeader=iw;exports.Content=mw;exports.DarkModeIconToggle=vw;exports.DarkModeToggle=yw;exports.Decoration=Be;exports.DefaultBufferLength=Hy;exports.EditorSelection=Y;exports.EditorView=ue;exports.Et=Nr;exports.Facet=Z;exports.FlowModal=pv;exports.GLOBAL_SECURITY_SYMBOL=Vc;exports.GettingStarted=gw;exports.HIDE_DOWNLOAD_BUTTON_SYMBOL=zf;exports.LRLanguage=wl;exports.LanguageSupport=nC;exports.ModernLayout=ww;exports.NodeProp=fe;exports.NodeSet=gh;exports.NodeType=mt;exports.NodeWeakMap=R2;exports.Parser=Gy;exports.Prec=Kl;exports.RangeSet=be;exports.RangeValue=Wn;exports.SearchButton=tp;exports.SearchModal=bw;exports.SecurityScheme=zv;exports.SecuritySchemeSelector=Hv;exports.Sidebar=Gf;exports.StateEffect=We;exports.StateField=qr;exports.Text=we;exports.Transaction=rt;exports.Tree=He;exports.ViewPlugin=Rt;exports.WidgetType=os;exports.Y=Me;exports._export_sfc=U;exports._sfc_main=r0;exports._sfc_main$1=oo;exports._sfc_main$2=kw;exports.bracketMatching=NC;exports.bracketMatchingHandle=fv;exports.clickGeneratedParameter=jC;exports.codePointAt=Mo;exports.codePointSize=ul;exports.combineConfig=Gl;exports.concatenateUrlAndPath=gv;exports.continuedIndent=pC;exports.countColumn=lh;exports.createEmptyAuthenticationState=b0;exports.createEmptyOpenApiState=k0;exports.createEmptyServerState=E0;exports.createEmptySpecification=Un;exports.createPlaceholderRequest=S0;exports.createScalarReferences=D4;exports.customTheme=MC;exports.deepMerge=Uv;exports.defaultHighlightStyle=kC;exports.defineLanguageFacet=Zy;exports.delimitedIndent=hC;exports.downloadSpecBus=Hf;exports.downloadSpecFile=z1;exports.encodeStringAsBase64=yv;exports.filterHiddenClients=tw;exports.findVariables=vv;exports.flatIndent=fC;exports.foldInside=vC;exports.foldNodeProp=yC;exports.fromCodePoint=hS;exports.getApiClientRequest=Bh;exports.getBase64Token=xh;exports.getHeadingsFromMarkdown=Ei;exports.getIndentUnit=rv;exports.getLowestHeadingLevel=rc;exports.getModels=Jt;exports.getRequestFromAuthentication=Sh;exports.getSecretCredentialsFromAuthentication=bv;exports.getTooltip=C2;exports.getUrlFromServerState=xi;exports.getVariableNames=mN;exports.hasModels=Ph;exports.hasSecuritySchemes=Kv;exports.hasWebhooks=Wv;exports.highlightSpecialChars=p2;exports.indentNodeProp=sv;exports.indentOnInput=gC;exports.indentString=nv;exports.indentUnit=wh;exports.isJsonString=m0;exports.isMacOS=Qa;exports.isRequestMethod=Bd;exports.isValidUrl=Gv;exports.keymap=Ly;exports.kt=wu;exports.lineNumbers=T2;exports.logException=Br;exports.mapFromObject=gN;exports.mergeAllObjects=yN;exports.normalizeMimeType=y0;exports.objectMerge=nc;exports.openClientFor=$l;exports.parse=q1;exports.parseMixed=j2;exports.redirectToProxy=wv;exports.replaceVariables=Ch;exports.requestMethodAbbreviations=_0;exports.requestMethodColors=$0;exports.scrollToId=Ti;exports.showTooltip=qy;exports.sleep=wr;exports.splitMarkdownInSections=H1;exports.styleTags=Yy;exports.sublanguageProp=ev;exports.syntaxHighlighting=cv;exports.syntaxTree=mn;exports.tags=F;exports.useApiClientStore=jl;exports.useAuthenticationStore=ns;exports.useHttpClientStore=ks;exports.useModal=mv;exports.useOpenApiStore=rh;exports.useReactiveSpec=W1;exports.useRequestStore=C0;exports.useServerStore=no;exports.validRequestMethods=oh;exports.variables=DC;
222
+ const { statusCode, body } = await request('${n.url}${a}'${l})`}}function OL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${kr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"node",client:"fetch",code:`fetch('${n.url}${a}'${l})`}}function TL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${kr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"js",client:"fetch",code:`fetch('${n.url}${a}'${l})`}}function BL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0);s.size&&(o.query={},s.forEach((l,c)=>{o.query[c]=l})),(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(l=>{o.headers[l.name]=l.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(l=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${l.name}=${l.value}`:`${l.name}=${l.value}`})),Object.keys(o).forEach(l=>{o[l]===void 0&&delete o[l]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=JSON.parse(o.body)));const a=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"js",client:"ofetch",code:`ofetch('${n.url}'${a})`}}function PL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?ra(n.queryString):void 0);s.size&&(o.query={},s.forEach((l,c)=>{o.query[c]=l})),(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(l=>{o.headers[l.name]=l.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(l=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${l.name}=${l.value}`:`${l.name}=${l.value}`})),Object.keys(o).forEach(l=>{o[l]===void 0&&delete o[l]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=JSON.parse(o.body)));const a=Object.keys(o).length?`, ${kr(o)}`:"";return{target:"node",client:"ofetch",code:`ofetch('${n.url}'${a})`}}function Yg(){const r=[AL,OL,TL,BL,PL];return{get(e,t,n){const o=this.findPlugin(e,t);if(o)return o(n)},print(e,t,n){var o;return(o=this.get(e,t,n))==null?void 0:o.code},targets(){return r.map(e=>e().target).filter((e,t,n)=>n.indexOf(e)===t)},clients(){return r.map(e=>e().client)},plugins(){return r.map(e=>{const t=e();return{target:t.target,client:t.client}})},findPlugin(e,t){return r.find(n=>{const o=n();return o.target===e&&o.client===t})},hasPlugin(e,t){return!!this.findPlugin(e,t)}}}const IL=i.defineComponent({__name:"ExamplePicker",props:{examples:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(Object.keys(t.examples)[0]);function s(l){l&&(o.value=l)}i.watch(()=>t.examples,()=>{s(Object.keys(t.examples)[0])},{immediate:!0}),i.watch(o,()=>{o.value&&n("update:modelValue",o.value)},{immediate:!0});function a(l){if(!l)return"Select an example";const c=t.examples[l];return(c==null?void 0:c.summary)??l}return(l,c)=>(i.openBlock(),i.createBlock(Qf,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=d=>o.value=d),class:"example-selector",options:Object.keys(l.examples).map(d=>({label:a(d),value:d}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a(o.value)),1)]),_:1},8,["modelValue","options"]))}}),cw=U(IL,[["__scopeId","data-v-652a7e14"]]),ML={class:"request-header"},DL={class:"code-snippet"},VL={key:0,class:"request-card-footer-addon"},RL=i.defineComponent({__name:"ExampleRequest",props:{operation:{}},setup(r){const e=r,n=`components-Content-Operation-Example-Request${Gu(e.operation.path+e.operation.httpVerb+e.operation.operationId)}`,o=i.ref(ts[n]??""),s=i.ref(),{copyToClipboard:a}=ws(),{httpClient:l,setHttpClient:c,availableTargets:d,httpTargetTitle:u,httpClientTitle:h}=ks(),{server:f}=no(),{authentication:p}=ns(),y=i.computed(()=>{var v,b,w,S,x,k,C;return((S=(w=(b=(v=e.operation.information)==null?void 0:v.requestBody)==null?void 0:b.content)==null?void 0:w["application/json"])==null?void 0:S.examples)&&Object.keys((C=(k=(x=e.operation.information)==null?void 0:x.requestBody)==null?void 0:k.content)==null?void 0:C["application/json"].examples).length>1}),g=i.inject(Rc),m=async()=>{var b;const v=g0({url:xi(f)},Td(e.operation,{replaceVariables:!0},s.value),xh(p,((b=e.operation.information)==null?void 0:b.security)??(g==null?void 0:g())));try{return Yg().hasPlugin(l.targetKey.replace("javascript","js"),l.clientKey)?Yg().print(l.targetKey.replace("javascript","js"),l.clientKey,v)??"":await new e0.HTTPSnippet(v).convert(l.targetKey,l.clientKey)}catch(w){return console.error("[ExampleRequest]",w),""}};return i.watch([()=>l,()=>f,()=>p,()=>s],async()=>{o.value=await m()},{deep:!0,immediate:!0}),i.onServerPrefetch(async()=>{const v=i.useSSRContext();await wr(1),v.payload.data[n]=o.value}),i.computed(()=>Ph({serverState:f,authenticationState:p,operation:e.operation,globalSecurity:g==null?void 0:g()})),(v,b)=>(i.openBlock(),i.createBlock(i.unref(ea),{class:"dark-mode"},{default:i.withCtx(()=>[i.createVNode(i.unref(ta),{muted:""},{actions:i.withCtx(()=>[i.createVNode(Qf,{class:"request-client-picker",modelValue:JSON.stringify(i.unref(l)),options:i.unref(d).map(w=>({value:w.key,label:w.title,options:w.clients.map(S=>({value:JSON.stringify({targetKey:w.key,clientKey:S.key}),label:S.title}))})),"onUpdate:modelValue":b[0]||(b[0]=w=>i.unref(c)(JSON.parse(w)))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(u))+" "+i.toDisplayString(i.unref(h)),1)]),_:1},8,["modelValue","options"]),i.createElementVNode("button",{class:"copy-button",type:"button",onClick:b[1]||(b[1]=w=>i.unref(a)(o.value))},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px"})])]),default:i.withCtx(()=>[i.createElementVNode("div",ML,[i.createVNode(i.unref(oo),{as:"span",class:"request-method",method:v.operation.httpVerb},null,8,["method"]),i.renderSlot(v.$slots,"header",{},void 0,!0)])]),_:3}),i.createVNode(i.unref(lo),{borderless:"",class:"request-editor-section custom-scroll",frameless:""},{default:i.withCtx(()=>[i.createElementVNode("div",DL,[i.createVNode(i.unref(Nr),{content:o.value,hideCredentials:i.unref(bv)(i.unref(p)),lang:i.unref(l).targetKey,lineNumbers:""},null,8,["content","hideCredentials","lang"])])]),_:1}),y.value||v.$slots.footer?(i.openBlock(),i.createBlock(i.unref(Lc),{key:0,class:"request-card-footer",contrast:""},{default:i.withCtx(()=>{var w,S,x,k;return[y.value?(i.openBlock(),i.createElementBlock("div",VL,[i.createVNode(cw,{class:"request-example-selector",examples:((k=(x=(S=(w=v.operation.information)==null?void 0:w.requestBody)==null?void 0:S.content)==null?void 0:x["application/json"])==null?void 0:k.examples)??[],"onUpdate:modelValue":b[2]||(b[2]=C=>s.value=C)},null,8,["examples"])])):i.createCommentVNode("",!0),i.renderSlot(v.$slots,"footer",{},void 0,!0)]}),_:3})):i.createCommentVNode("",!0)]),_:3}))}}),dw=U(RL,[["__scopeId","data-v-23a139ed"]]),LL={key:0},jL={key:1},FL={key:0,class:"rule"},qL={class:"rule-title"},zL={class:"rule-items"},HL={key:2,class:"empty-state"},UL=i.defineComponent({__name:"ExampleResponse",props:{response:{}},setup(r){const e=["oneOf","anyOf","not"],t=n=>n.reduce((o,s)=>({...o,...s}),{});return(n,o)=>{var s,a,l,c,d,u,h;return(s=n.response)!=null&&s.example?(i.openBlock(),i.createElementBlock("div",LL,[i.createVNode(i.unref(Nr),{content:i.unref(fi)((a=n.response)==null?void 0:a.example),lang:"json"},null,8,["content"])])):(l=n.response)!=null&&l.schema?(i.openBlock(),i.createElementBlock("div",jL,[(c=n.response)!=null&&c.schema.type?(i.openBlock(),i.createBlock(i.unref(Nr),{key:0,content:i.unref(fi)(i.unref(Ue)((d=n.response)==null?void 0:d.schema,{emptyString:"…",mode:"read"})),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(e,f=>{var p,y,g,m,v,b;return i.openBlock(),i.createElementBlock(i.Fragment,{key:f},[(p=n.response)!=null&&p.schema[f]&&(((y=n.response)==null?void 0:y.schema[f].length)>1||f==="not")?(i.openBlock(),i.createElementBlock("div",FL,[i.createElementVNode("div",qL,i.toDisplayString(f),1),i.createElementVNode("ol",zL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((g=n.response)==null?void 0:g.schema[f],(w,S)=>(i.openBlock(),i.createElementBlock("li",{key:S,class:"rule-item"},[i.createVNode(i.unref(Nr),{content:i.unref(Ue)(w,{emptyString:"…",mode:"read"}),lang:"json"},null,8,["content"])]))),128))])])):(m=n.response)!=null&&m.schema[f]&&((v=n.response)==null?void 0:v.schema[f].length)===1?(i.openBlock(),i.createBlock(i.unref(Nr),{key:1,content:i.unref(Ue)((b=n.response)==null?void 0:b.schema[f][0],{emptyString:"…",mode:"read"}),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0)],64)}),64)),(u=n.response)!=null&&u.schema.allOf?(i.openBlock(),i.createBlock(i.unref(Nr),{key:1,content:t((h=n.response)==null?void 0:h.schema.allOf.map(f=>i.unref(Ue)(f,{emptyString:"…",mode:"read"}))),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",HL," No Body "))}}}),Xg=U(UL,[["__scopeId","data-v-800e8c7d"]]),KL=r=>(i.pushScopeId("data-v-314905de"),r=r(),i.popScopeId(),r),WL={key:1,class:"scalar-card-checkbox"},GL=KL(()=>i.createElementVNode("span",{class:"scalar-card-checkbox-checkmark"},null,-1)),JL={class:"scalar-card-container custom-scroll"},YL={key:1,class:"response-description"},XL=i.defineComponent({__name:"PathResponses",props:{operation:{}},setup(r){const e=r,{copyToClipboard:t}=ws(),n=i.ref(),o=i.computed(()=>{var f,p;return Object.keys(((p=(f=e==null?void 0:e.operation)==null?void 0:f.information)==null?void 0:p.responses)??{}).sort(y=>y==="default"?-1:0)}),s=i.computed(()=>!!c.value.examples),a=i.ref(0),l=i.computed(()=>{var p,y;const f=o.value[a.value];return(y=(p=e.operation.information)==null?void 0:p.responses)==null?void 0:y[f]}),c=i.computed(()=>{var p;const f=v0((p=l.value)==null?void 0:p.content);return(f==null?void 0:f["application/json"])??(f==null?void 0:f["text/plain"])??l.value}),d=i.computed(()=>({...c.value,example:s.value&&n.value?c.value.examples[n.value].value??c.value.examples[n.value]:c.value.example})),u=f=>{a.value=f},h=i.ref(!1);return(f,p)=>o.value.length?(i.openBlock(),i.createBlock(i.unref(ea),{key:0},{default:i.withCtx(()=>{var y;return[i.createVNode(i.unref(iw),{muted:"",x:"as",onChange:u},{actions:i.withCtx(()=>{var g,m;return[(g=c.value)!=null&&g.example?(i.openBlock(),i.createElementBlock("button",{key:0,class:"code-copy",type:"button",onClick:p[0]||(p[0]=()=>{var v;return i.unref(t)((v=c.value)==null?void 0:v.example)})},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px",x:"asd"})])):i.createCommentVNode("",!0),(m=c.value)!=null&&m.schema?(i.openBlock(),i.createElementBlock("label",WL,[i.createTextVNode(" Show Schema "),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":p[1]||(p[1]=v=>h.value=v),class:"scalar-card-checkbox-input",type:"checkbox"},null,512),[[i.vModelCheckbox,h.value]]),GL])):i.createCommentVNode("",!0)]}),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,g=>(i.openBlock(),i.createBlock(i.unref(aw),{key:g},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g),1)]),_:2},1024))),128))]),_:1}),i.createElementVNode("div",JL,[i.createVNode(i.unref(lo),{muted:""},{default:i.withCtx(()=>{var g;return[(g=c.value)!=null&&g.schema?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[h.value&&d.value?(i.openBlock(),i.createBlock(i.unref(Nr),{key:0,content:d.value,lang:"json"},null,8,["content"])):(i.openBlock(),i.createBlock(Xg,{key:1,response:d.value},null,8,["response"]))],64)):(i.openBlock(),i.createBlock(Xg,{key:1,response:d.value},null,8,["response"]))]}),_:1})]),(y=l.value)!=null&&y.description||s.value?(i.openBlock(),i.createBlock(i.unref(Lc),{key:0,class:"response-card-footer",muted:""},{default:i.withCtx(()=>{var g,m;return[s.value?(i.openBlock(),i.createBlock(cw,{key:0,class:"response-example-selector",examples:(g=c.value)==null?void 0:g.examples,"onUpdate:modelValue":p[2]||(p[2]=v=>n.value=v)},null,8,["examples"])):(m=l.value)!=null&&m.description?(i.openBlock(),i.createElementBlock("div",YL,[i.createVNode(i.unref(wt),{class:"markdown",value:l.value.description},null,8,["value"])])):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)}}),uw=U(XL,[["__scopeId","data-v-314905de"]]),QL=r=>(i.pushScopeId("data-v-f44e2b65"),r=r(),i.popScopeId(),r),ZL=QL(()=>i.createElementVNode("span",null,"Test Request",-1)),ej=i.defineComponent({__name:"TryRequestButton",props:{operation:{}},setup(r){const e=i.inject(Rc);return(t,n)=>(i.openBlock(),i.createBlock(i.unref(oo),{as:"button",class:"show-api-client-button",method:t.operation.httpVerb,type:"button",onClick:n[0]||(n[0]=i.withModifiers(o=>{var s;return i.unref($l)(t.operation,(s=i.unref(e))==null?void 0:s())},["stop"]))},{default:i.withCtx(()=>[i.createVNode(i.unref(Me),{icon:"PaperAirplane"}),ZL]),_:1},8,["method"]))}}),Wu=U(ej,[["__scopeId","data-v-f44e2b65"]]),tj={class:"examples"},rj=i.defineComponent({__name:"Operation",props:{id:{},operation:{}},setup(r){const e=r,{availableTargets:t}=ks(),n=i.computed(()=>{var s;const o=["x-custom-examples","x-codeSamples","x-code-samples"];for(const a of o)if((s=e.operation.information)!=null&&s[a])return e.operation.information[a];return null});return(o,s)=>(i.openBlock(),i.createBlock(i.unref(Ss),{id:o.id,label:o.operation.name},{default:i.withCtx(()=>[i.createVNode(i.unref(xs),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Xf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(es),null,{default:i.withCtx(()=>{var a,l;return[(a=o.operation.information)!=null&&a.deprecated?(i.openBlock(),i.createBlock(i.unref(Bi),{key:0},{default:i.withCtx(()=>[i.createTextVNode(" Deprecated ")]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass((l=o.operation.information)!=null&&l.deprecated?"deprecated":"")},[i.createVNode(i.unref(bn),{level:3},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:o.id??""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.operation.name),1)]),_:1},8,["id"])]),_:1})],2),i.createVNode(EL,{operation:o.operation},null,8,["operation"])]}),_:1}),i.createVNode(i.unref(es),null,{default:i.withCtx(()=>[i.createElementVNode("div",tj,[n.value?(i.openBlock(),i.createBlock(S3,{key:0,examples:n.value,operation:o.operation},{header:i.withCtx(()=>{var a;return[i.createVNode(Ku,{class:"example-path",deprecated:(a=o.operation.information)==null?void 0:a.deprecated,path:o.operation.path},null,8,["deprecated","path"])]}),footer:i.withCtx(()=>[i.createVNode(Wu,{operation:o.operation},null,8,["operation"])]),_:1},8,["examples","operation"])):i.unref(t).length?(i.openBlock(),i.createBlock(dw,{key:1,operation:o.operation},{header:i.withCtx(()=>{var a;return[i.createVNode(Ku,{class:"example-path",deprecated:(a=o.operation.information)==null?void 0:a.deprecated,path:o.operation.path},null,8,["deprecated","path"])]}),footer:i.withCtx(()=>[i.createVNode(Wu,{operation:o.operation},null,8,["operation"])]),_:1},8,["operation"])):i.createCommentVNode("",!0),i.createVNode(i.unref(uw),{operation:o.operation,style:{"margin-top":"12px"}},null,8,["operation"])])]),_:1})]),_:1})]),_:1})]),_:1},8,["id","label"]))}}),hw=U(rj,[["__scopeId","data-v-c4d55ce0"]]),nj={class:"endpoint-details-card"},oj=i.defineComponent({__name:"EndpointDetailsCard",props:{operation:{}},setup(r){const e=r,{parameterMap:t}=Kf(e),{responses:n}=Wf(e.operation);return(o,s)=>{var a;return i.openBlock(),i.createElementBlock("div",nj,[i.createVNode(Kt,{class:"endpoint-details-card-item",parameters:i.unref(t).path},{title:i.withCtx(()=>[i.createTextVNode("Path Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{class:"endpoint-details-card-item",parameters:i.unref(t).query},{title:i.withCtx(()=>[i.createTextVNode("Query Parameters")]),_:1},8,["parameters"]),i.createVNode(Kt,{class:"endpoint-details-card-item",parameters:i.unref(t).header},{title:i.withCtx(()=>[i.createTextVNode("Headers")]),_:1},8,["parameters"]),i.createVNode(Zf,{class:"endpoint-details-card-item",requestBody:(a=o.operation.information)==null?void 0:a.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Body")]),_:1},8,["requestBody"]),i.createVNode(Kt,{class:"endpoint-details-card-item",parameters:i.unref(n)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])])}}}),sj=U(oj,[["__scopeId","data-v-f94bee14"]]),ij={class:"endpoint-header"},aj={class:"endpoint-details"},lj={class:"endpoint-label"},cj={class:"endpoint-label-path"},dj={class:"endpoint-label-name"},uj={class:"endpoint-content"},hj=i.defineComponent({__name:"OperationAccordion",props:{id:{},operation:{}},setup(r){const{copyToClipboard:e}=ws();return(t,n)=>(i.openBlock(),i.createBlock(i.unref(rw),{id:t.id,class:"reference-endpoint",transparent:""},i.createSlots({title:i.withCtx(()=>[i.createElementVNode("h3",ij,[i.createElementVNode("div",aj,[i.createVNode(i.unref(oo),{class:"endpoint-type",method:t.operation.httpVerb,short:""},null,8,["method"]),i.createVNode(i.unref(wn),{id:t.id??"",class:"endpoint-anchor"},{default:i.withCtx(()=>{var o;return[i.createElementVNode("div",lj,[i.createElementVNode("div",cj,[i.createVNode(Ku,{deprecated:(o=t.operation.information)==null?void 0:o.deprecated,path:t.operation.path},null,8,["deprecated","path"])]),i.createElementVNode("div",dj,i.toDisplayString(t.operation.name),1)])]}),_:1},8,["id"])])])]),actions:i.withCtx(({active:o})=>[o?(i.openBlock(),i.createBlock(Wu,{key:0,operation:t.operation},null,8,["operation"])):(i.openBlock(),i.createBlock(i.unref(Me),{key:1,class:"endpoint-try-hint",icon:"PaperAirplane"})),i.createVNode(i.unref(ji),{class:"endpoint-copy",icon:"Clipboard",label:"Copy endpoint URL",size:"xs",variant:"ghost",onClick:n[0]||(n[0]=i.withModifiers(s=>i.unref(e)(t.operation.path),["stop"]))})]),default:i.withCtx(()=>[i.createElementVNode("div",uj,[i.createVNode(sj,{operation:t.operation},null,8,["operation"]),i.createVNode(i.unref(uw),{operation:t.operation},null,8,["operation"]),i.createVNode(dw,{operation:t.operation},null,8,["operation"])])]),_:2},[t.operation.description?{name:"description",fn:i.withCtx(()=>[i.createVNode(i.unref(wt),{value:t.operation.description,withImages:""},null,8,["value"])]),key:"0"}:void 0]),1032,["id"]))}}),fj=U(hj,[["__scopeId","data-v-f61893df"]]),pj=i.defineComponent({__name:"ShowMoreButton",props:{id:{}},setup(r){const{setCollapsedSidebarItem:e}=tr();return(t,n)=>(i.openBlock(),i.createElementBlock("button",{class:"show-more",type:"button",onClick:n[0]||(n[0]=o=>i.unref(e)(t.id,!0))},[i.createTextVNode(" Show More "),i.createVNode(i.unref(Me),{class:"show-more-icon",icon:"ChevronDown"})]))}}),fw=U(pj,[["__scopeId","data-v-60a9fbab"]]),mj={class:"endpoints"},gj=["onClick"],yj=i.defineComponent({__name:"Endpoints",props:{id:{},tag:{}},emits:["observeAndNavigate"],setup(r,{emit:e}){const t=r,n=e,{getOperationId:o,getTagId:s}=ct(),{setCollapsedSidebarItem:a}=tr(),l=d=>{n("observeAndNavigate",d)};async function c(d){l(o(d,t.tag)),a(s(t.tag),!0)}return(d,u)=>(i.openBlock(),i.createBlock(i.unref(Ss),{id:d.id,label:d.tag.name.toUpperCase()},{default:i.withCtx(()=>[i.createVNode(i.unref(xs),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Xf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(es),null,{default:i.withCtx(()=>[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(s)(d.tag)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(d.tag["x-displayName"]??d.tag.name),1)]),_:1},8,["id"])]),_:1}),i.createVNode(i.unref(wt),{value:d.tag.description,withImages:""},null,8,["value"])]),_:1}),i.createVNode(i.unref(es),null,{default:i.withCtx(()=>{var h;return[((h=d.tag.operations)==null?void 0:h.length)>0?(i.openBlock(),i.createBlock(i.unref(ea),{key:0,class:"scalar-card-sticky"},{default:i.withCtx(()=>[i.createVNode(i.unref(ta),{muted:""},{default:i.withCtx(()=>[i.createTextVNode("Endpoints")]),_:1}),i.createVNode(i.unref(lo),{class:"custom-scroll",muted:""},{default:i.withCtx(()=>[i.createElementVNode("div",mj,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.tag.operations,f=>(i.openBlock(),i.createElementBlock("a",{key:i.unref(o)(f,d.tag),class:"endpoint",onClick:p=>c(f)},[i.createVNode(i.unref(oo),{method:f.httpVerb},null,8,["method"]),i.createElementVNode("span",null,i.toDisplayString(f.path),1)],8,gj))),128))])]),_:1})]),_:1})):i.createCommentVNode("",!0)]}),_:1})]),_:1})]),_:1})]),_:1},8,["id","label"]))}}),vj=U(yj,[["__scopeId","data-v-b209ef2d"]]),bj=(r,e)=>{Xe.useMutationObserver(r,e,{childList:!0,subtree:!0})},wj=i.defineComponent({__name:"Tag",props:{id:{},tag:{},spec:{}},setup(r){const e=r,t=i.ref(null),{collapsedSidebarItems:n}=tr(),{getTagId:o}=ct(),s=d=>{var u;return((u=e.spec.tags)==null?void 0:u.length)!==1||(d==null?void 0:d.name)!=="default"||(d==null?void 0:d.description)!==""},a=d=>{window.location.href=`#${d}`},l=d=>{bj(t,(u,h)=>{u.forEach(f=>{Array.from(f.addedNodes).some(y=>y instanceof HTMLElement&&y.id===d)&&(a(d),h.disconnect())})})},c=d=>{document.getElementById(d)?a(d):l(d)};return(d,u)=>(i.openBlock(),i.createBlock(i.unref(Zi),{ref_key:"sectionContainerRef",ref:t,class:"tag-section-container"},{default:i.withCtx(()=>{var h;return[s(d.tag)?(i.openBlock(),i.createBlock(vj,{key:0,id:d.id,tag:d.tag,onObserveAndNavigate:c},null,8,["id","tag"])):i.createCommentVNode("",!0),!i.unref(n)[i.unref(o)(d.tag)]&&((h=d.tag.operations)==null?void 0:h.length)>1?(i.openBlock(),i.createBlock(fw,{key:1,id:d.id??""},null,8,["id"])):i.renderSlot(d.$slots,"default",{key:2},void 0,!0)]}),_:3},512))}}),pw=U(wj,[["__scopeId","data-v-7fef7ce7"]]),kj=i.defineComponent({__name:"TagAccordion",props:{tag:{},spec:{}},setup(r){const{getTagId:e}=ct();return(t,n)=>(i.openBlock(),i.createBlock(i.unref(nw),{class:"tag-section"},{title:i.withCtx(()=>[i.createVNode(i.unref(bn),{class:"tag-name",level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(e)(t.tag)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.tag.name),1)]),_:1},8,["id"])]),_:1}),i.createVNode(i.unref(wt),{class:"tag-description",value:t.tag.description,withImages:""},null,8,["value"])]),default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}}),Sj=U(kj,[["__scopeId","data-v-f11e3b56"]]),xj=i.defineComponent({__name:"Loading",props:{layout:{default:"default"},parsedSpec:{}},setup(r){const e=r,t=i.ref(!1),n=i.ref([]),o=i.ref([]),{getModelId:s,getSectionId:a,getTagId:l,hash:c,isIntersectionEnabled:d}=ct(),u=i.ref(e.layout!=="accordion"&&c.value);i.watch(()=>{var f;return(f=e.parsedSpec.tags)==null?void 0:f.length},f=>{var y,g;if(!c.value||typeof f!="number"||!e.parsedSpec.tags)return;const p=a();if(p.startsWith("tag")){let m=0;const v=((y=e.parsedSpec.tags)==null?void 0:y.findIndex(S=>l(S)===p))??0,b=c.value.match(/tag\/([^/]+)\/([^/]+)\/(.+)/);if((b==null?void 0:b.length)===4){const S=b[2],x="/"+b[3];m=(g=e.parsedSpec.tags[v])==null?void 0:g.operations.findIndex(({httpVerb:k,path:C})=>S===k&&x===C)}const w=e.parsedSpec.tags[v];if(!w)return;w.name!=="default"&&(t.value=p!==c.value&&p.startsWith("tag")),n.value.push({...w,lazyOperations:w.operations.slice(m,m+2)})}else if(c.value.startsWith("model")){const m=Object.keys(Jt(e.parsedSpec)??{}),[,v]=c.value.toLowerCase().split("/"),b=c.value==="models"?0:m.findIndex(w=>w.toLowerCase()===v);if(b===-1)return;o.value=m.slice(b,b+3)}else Ti(c.value),setTimeout(()=>d.value=!0,1e3)},{immediate:!0});const h=Uu.on(({id:f})=>{const p=c.value;!p||f!==p||(h(),setTimeout(()=>{typeof window<"u"&&Ti(p),u.value=!1,setTimeout(()=>d.value=!0,1e3)},300))});return i.onMounted(()=>{c.value||setTimeout(()=>d.value=!0,1e3)}),(f,p)=>i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["references-loading",{"references-loading-hidden-tag":t.value,"references-loading-top-spacer":n.value.length}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,y=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:y.id},[y.operations&&y.operations.length>0?(i.openBlock(),i.createBlock(i.unref(pw),{key:0,spec:f.parsedSpec,tag:y},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.lazyOperations,g=>(i.openBlock(),i.createBlock(i.unref(hw),{key:`${g.httpVerb}-${g.operationId}`,operation:g,tag:y},null,8,["operation","tag"]))),128))]),_:2},1032,["spec","tag"])):i.createCommentVNode("",!0)],64))),128)),o.value.length?(i.openBlock(),i.createBlock(i.unref(Zi),{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,y=>(i.openBlock(),i.createBlock(i.unref(Ss),{key:y,label:y},{default:i.withCtx(()=>{var g;return[(g=i.unref(Jt)(f.parsedSpec))!=null&&g[y]?(i.openBlock(),i.createBlock(i.unref(xs),{key:0},{default:i.withCtx(()=>{var m;return[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(s)(y)},{default:i.withCtx(()=>{var v;return[i.createTextVNode(i.toDisplayString(((v=i.unref(Jt)(f.parsedSpec))==null?void 0:v[y]).title??y),1)]}),_:2},1032,["id"])]),_:2},1024),i.createVNode(i.unref(qn),{name:y,noncollapsible:"",value:(m=i.unref(Jt)(f.parsedSpec))==null?void 0:m[y]},null,8,["name","value"])]}),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["label"]))),128))]),_:1})):i.createCommentVNode("",!0)],2)),[[i.vShow,u.value]])}}),Cj=r=>(i.pushScopeId("data-v-f19478dd"),r=r(),i.popScopeId(),r),Ej=Cj(()=>i.createElementVNode("div",{id:"models"},null,-1)),$j=i.defineComponent({__name:"Models",props:{schemas:{}},setup(r){const e=r,{collapsedSidebarItems:t}=tr(),{getModelId:n}=ct(),o=i.computed(()=>Object.keys(e.schemas??{}).length<=3||t[n()]),s=i.computed(()=>{const a=Object.keys(e.schemas??{});return o.value?a:a.slice(0,3)});return(a,l)=>a.schemas?(i.openBlock(),i.createBlock(i.unref(Zi),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(jl),{id:"models",isLazy:!1},{default:i.withCtx(()=>[Ej]),_:1}),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(c,d)=>(i.openBlock(),i.createBlock(i.unref(jl),{id:i.unref(n)(c),key:c,isLazy:""},{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),{id:i.unref(n)(c),label:c},{default:i.withCtx(()=>[a.schemas[c]?(i.openBlock(),i.createBlock(i.unref(xs),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(n)(c)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.schemas[c].title??c),1)]),_:2},1032,["id"])]),_:2},1024),i.createVNode(i.unref(qn),{name:c,noncollapsible:"",value:a.schemas[c]},null,8,["name","value"]),!o.value&&d===s.value.length-1?(i.openBlock(),i.createBlock(fw,{key:0,id:i.unref(n)(),class:"something-special"},null,8,["id"])):i.createCommentVNode("",!0)]),_:2},1024)):i.createCommentVNode("",!0)]),_:2},1032,["id","label"])]),_:2},1032,["id"]))),128))]),_:1})):i.createCommentVNode("",!0)}}),_j=U($j,[["__scopeId","data-v-f19478dd"]]),Nj={key:0,class:"properties"},Aj={key:1},Oj=i.defineComponent({__name:"ModelsAccordion",props:{schemas:{}},setup(r){const e=r,t=i.computed(()=>e.schemas?Object.entries(e.schemas).map(([o,s])=>({name:o,schema:s})):[]),{getModelId:n}=ct();return(o,s)=>e.schemas?(i.openBlock(),i.createBlock(i.unref(nw),{key:0,class:"reference-models"},{title:i.withCtx(()=>[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createTextVNode("Models")]),_:1})]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.value,({name:a,schema:l})=>(i.openBlock(),i.createBlock(i.unref(rw),{id:i.unref(n)(a),key:a,label:a},{title:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(n)(a),class:"reference-models-anchor"},{default:i.withCtx(()=>[i.createVNode(i.unref(lw),{class:"reference-models-label",name:a,value:l},null,8,["name","value"])]),_:2},1032,["id"])]),default:i.withCtx(()=>[l!=null&&l.properties?(i.openBlock(),i.createElementBlock("div",Nj,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.entries(l.properties),([c,d])=>(i.openBlock(),i.createBlock(i.unref(Fn),{key:c,name:c,required:l.required&&!!l.required.length&&l.required.includes(c),value:d},null,8,["name","required","value"]))),128))])):(i.openBlock(),i.createElementBlock("div",Aj,[i.createVNode(i.unref(Fn),{value:l},null,8,["value"])]))]),_:2},1032,["id","label"]))),128))]),_:1})):i.createCommentVNode("",!0)}}),Tj=U(Oj,[["__scopeId","data-v-2399f144"]]),Bj=i.defineComponent({__name:"Webhook",props:{webhook:{}},setup(r){const e=r,{responses:t}=Wf(e.webhook);return(n,o)=>{var s;return n.webhook?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(Zf,{requestBody:(s=n.webhook.information)==null?void 0:s.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Payload")]),_:1},8,["requestBody"]),i.createVNode(Kt,{parameters:i.unref(t)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])],64)):i.createCommentVNode("",!0)}}}),Pj=i.defineComponent({__name:"Webhooks",props:{webhooks:{}},setup(r){const e=r,t=i.computed(()=>Object.keys(e.webhooks??{})),{getWebhookId:n}=ct();return(o,s)=>t.value.length?(i.openBlock(),i.createBlock(i.unref(Zi),{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.value,a=>{var l;return i.openBlock(),i.createElementBlock(i.Fragment,{key:a},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.keys((l=o.webhooks)==null?void 0:l[a]),c=>(i.openBlock(),i.createBlock(i.unref(Ss),{id:i.unref(n)(a,c),key:c,label:a},{default:i.withCtx(()=>{var d;return[(d=o.webhooks)!=null&&d[a]?(i.openBlock(),i.createBlock(i.unref(xs),{key:0},{default:i.withCtx(()=>{var u,h;return[i.createVNode(i.unref(bn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{id:i.unref(n)(a,c)},{default:i.withCtx(()=>{var f;return[i.createTextVNode(i.toDisplayString((f=o.webhooks[a][c])==null?void 0:f.name),1)]}),_:2},1032,["id"])]),_:2},1024),(u=o.webhooks[a][c])!=null&&u.description?(i.openBlock(),i.createBlock(i.unref(wt),{key:0,value:(h=o.webhooks[a][c])==null?void 0:h.description,withImages:""},null,8,["value"])):i.createCommentVNode("",!0),i.createVNode(Bj,{webhook:o.webhooks[a][c]},null,8,["webhook"])]}),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","label"]))),128))],64)}),128))]),_:1})):i.createCommentVNode("",!0)}}),Ij=i.createStaticVNode('<div class="section-flare" data-v-055e26bb><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div><div class="section-flare-item" data-v-055e26bb></div></div>',1),Mj={class:"narrow-references-container"},Dj=i.defineComponent({__name:"Content",props:{parsedSpec:{},layout:{},baseServerURL:{},proxy:{}},setup(r){const e=r,{getOperationId:t,getTagId:n,hash:o}=ct(),{setServer:s}=no(),{hideModels:a,collapsedSidebarItems:l}=tr(),c=p=>{if(p.url.match(/^(?!(https?|file):\/\/|{).+/)){let y=e.baseServerURL??window.location.origin;y=y.replace(/\/$/,"");const g=p.url.startsWith("/")?p.url:`/${p.url}`;p.url=`${y}${g}`.replace(/\/$/,"")}return p};i.watch(()=>e.parsedSpec,p=>{var g,m;let y=[{url:typeof window<"u"?window.location.origin:"/"}];p.servers&&p.servers.length>0?y=p.servers:e.parsedSpec.host&&(y=[{url:`${((g=e.parsedSpec.schemes)==null?void 0:g[0])??"http"}://${e.parsedSpec.host}${((m=e.parsedSpec)==null?void 0:m.basePath)??""}`}]),(e.baseServerURL||typeof window<"u")&&(y=y.map(c)),s({servers:y})},{deep:!0,immediate:!0});const d=i.computed(()=>e.layout==="accordion"?Sj:pw),u=i.computed(()=>e.layout==="accordion"?fj:hw),h=i.computed(()=>e.layout==="accordion"?"after":"aside"),f=e.layout!=="accordion"&&!o.value.startsWith("model");return(p,y)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[Ij,i.createElementVNode("div",Mj,[i.renderSlot(p.$slots,"start",{},void 0,!0),i.createVNode(i.unref(xj),{layout:p.layout,parsedSpec:p.parsedSpec},null,8,["layout","parsedSpec"]),p.parsedSpec.info.title||p.parsedSpec.info.description?(i.openBlock(),i.createBlock(i.unref(YR),{key:0,info:p.parsedSpec.info,parsedSpec:p.parsedSpec},{[h.value]:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["introduction-card",{"introduction-card-row":p.layout==="accordion"}])},[i.createVNode(i.unref(XV)),i.createVNode(i.unref(EV),{parsedSpec:p.parsedSpec,proxy:p.proxy},null,8,["parsedSpec","proxy"]),i.createVNode(i.unref(pR))],2)]),_:2},1032,["info","parsedSpec"])):i.renderSlot(p.$slots,"empty-state",{key:1},void 0,!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.parsedSpec.tags,g=>(i.openBlock(),i.createBlock(i.unref(jl),{id:i.unref(n)(g),key:i.unref(n)(g),isLazy:i.unref(f)&&!i.unref(l)[i.unref(n)(g)]},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(d.value),{id:i.unref(n)(g),spec:p.parsedSpec,tag:g},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.operations,(m,v)=>(i.openBlock(),i.createBlock(i.unref(jl),{id:i.unref(t)(m,g),key:`${m.httpVerb}-${m.operationId}`,isLazy:v>0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.value),{id:i.unref(t)(m,g),operation:m,tag:g},null,8,["id","operation","tag"]))]),_:2},1032,["id","isLazy"]))),128))]),_:2},1032,["id","spec","tag"]))]),_:2},1032,["id","isLazy"]))),128)),p.parsedSpec.webhooks?(i.openBlock(),i.createBlock(i.unref(Pj),{key:2,webhooks:p.parsedSpec.webhooks},null,8,["webhooks"])):i.createCommentVNode("",!0),i.unref(Ih)(p.parsedSpec)&&!i.unref(a)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[p.layout==="accordion"?(i.openBlock(),i.createBlock(i.unref(Tj),{key:0,schemas:i.unref(Jt)(p.parsedSpec)},null,8,["schemas"])):(i.openBlock(),i.createBlock(i.unref(_j),{key:1,schemas:i.unref(Jt)(p.parsedSpec)},null,8,["schemas"]))],64)):i.createCommentVNode("",!0),i.renderSlot(p.$slots,"end",{},void 0,!0)])],64))}}),mw=U(Dj,[["__scopeId","data-v-055e26bb"]]),Vj=r=>(i.pushScopeId("data-v-391b4e37"),r=r(),i.popScopeId(),r),Rj={class:"start custom-scroll"},Lj={class:"start-copy"},jj=i.createStaticVNode('<div class="start-logo" data-v-391b4e37><svg height="36" viewBox="0 0 36 36" width="36" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><path d="M18 0a18 18 0 1 1 0 36 18 18 0 0 1 0-36Zm11.2 6.5c-3.3-3.3-11.1-1-17.4 5.3-6.2 6.3-8.6 14-5.3 17.4 3.3 3.3 11 .9 17.3-5.4 6.3-6.2 8.7-14 5.4-17.3ZM17.6 12a6.3 6.3 0 1 1 0 12.7 6.3 6.3 0 0 1 0-12.7Z" fill="currentColor" fill-rule="evenodd" data-v-391b4e37></path></svg></div><h1 class="start-h1" data-v-391b4e37>Swagger Editor</h1><p class="start-p" data-v-391b4e37> Welcome to the Scalar API References + Swagger Editor, a Free &amp; Open-Source tool that takes your Swagger/OAS file and generates Beautiful API references. </p>',3),Fj={class:"start-cta"},qj={class:"start-row"},zj=i.createStaticVNode('<div class="start-section start-section-integrations" data-v-391b4e37><div class="start-h2" data-v-391b4e37>INTEGRATIONS</div><a class="start-item" href="https://github.com/scalar/scalar/tree/main/packages/fastify-api-reference#readme" target="_blank" data-v-391b4e37><svg fill="currentColor" height="16" viewBox="0 0 19 16" width="19" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><path d="m18.2 3.1.8-2V.9l-4.7 1.3C15.2 1 15 0 15 0s-2.5 1.6-4.3 1.5c-2 0-3.6.8-4 1-1.8 1.2-2.5 3.3-3.2 3.8L0 8.9 2.3 8l-2 2.5c.2.3 1.2 1.6 2.1 1.3l.4-.1 1.6.5-.7-1 .2-.2.9.3-.1-.8.9.3-.1-.8.3-.1 1-3.5 3.7-2.6-.3.7A4 4 0 0 1 8 7l-.6.2c-.5.5-.7.7-.8 2.5a2 2 0 0 1 1 0c1.6.4 2.2 2.3 1.7 2.9l-.7.6H8v.6h-.7v.5l-.2.2c-.7 0-1.4-.6-1.4-.6 0 .5.4 1.3.4 1.3s1.7 1.1 2.7.7c1-.4.7-2.3 2.8-3.2l3.3-.9.8-2.2-1.7.5v-2l2.5-.6.9-2.2-3.4.9v-2l4.2-1.1Z" fill="currentColor" fill-rule="nonzero" data-v-391b4e37></path></svg><span data-v-391b4e37>Fastify</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#from-a-cdn" target="_blank" data-v-391b4e37><svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g data-v-391b4e37><path d="M22.5 1.5h-21A1.5 1.5 0 0 0 0 3v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 6V3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3A1.25 1.25 0 1 1 4.5 5.75 1.25 1.25 0 0 1 3.25 4.5ZM8.5 5.75A1.25 1.25 0 1 1 9.75 4.5 1.25 1.25 0 0 1 8.5 5.75Z" fill="currentColor" data-v-391b4e37></path><path d="M22.5 9h-21A1.5 1.5 0 0 0 0 10.5v3A1.5 1.5 0 0 0 1.5 15h21a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 22.5 9ZM3.25 12a1.25 1.25 0 1 1 1.25 1.25A1.25 1.25 0 0 1 3.25 12Zm5.25 1.25A1.25 1.25 0 1 1 9.75 12a1.25 1.25 0 0 1-1.25 1.25Z" fill="currentColor" data-v-391b4e37></path><path d="M22.5 16.5h-21A1.5 1.5 0 0 0 0 18v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 21v-3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3a1.25 1.25 0 1 1 1.25 1.25 1.25 1.25 0 0 1-1.25-1.25Zm5.25 1.25a1.25 1.25 0 1 1 1.25-1.25 1.25 1.25 0 0 1-1.25 1.25Z" fill="currentColor" data-v-391b4e37></path></g></svg><span data-v-391b4e37>CDN</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#with-vuejs" target="_blank" data-v-391b4e37><svg height="170" viewBox="0 0 196.3 170" width="196.3" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g fill="currentColor" fill-rule="nonzero" data-v-391b4e37><polygon points="39.23 0 0 0 2.9450761 5.1010782 98.16 170.02 196.32 0 157.06 0 98.16 102.01 42.175701 5.0991171" data-v-391b4e37></polygon><polygon points="75.5 2.009956e-14 0 2.009956e-14 2.94 5.1 78.44871 5.1 98.16 39.26 117.87937 5.1 193.38 5.1 196.325 0 120.82 7.8065636e-15 114.97322 2.009956e-14 98.16 29.037153 81.35 2.009956e-14" data-v-391b4e37></polygon></g></svg><span data-v-391b4e37>Vue</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#with-react" target="_blank" data-v-391b4e37><svg height="23.3" viewBox="0 0 22 23.3" width="22" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g fill="none" fill-rule="evenodd" data-v-391b4e37><circle cx="11" cy="11.6" fill="currentColor" fill-rule="nonzero" r="2" data-v-391b4e37></circle><g stroke="currentColor" data-v-391b4e37><ellipse cx="11" cy="11.6" rx="11" ry="4.2" data-v-391b4e37></ellipse><ellipse cx="11" cy="11.6" rx="11" ry="4.2" transform="rotate(60 11 11.6)" data-v-391b4e37></ellipse><ellipse cx="11" cy="11.6" rx="11" ry="4.2" transform="rotate(120 11 11.6)" data-v-391b4e37></ellipse></g></g></svg><span data-v-391b4e37>React</span></a></div>',1),Hj={class:"start-section start-section-colors"},Uj=Vj(()=>i.createElementVNode("p",{class:"start-h2"},"THEMING",-1)),Kj=["onClick"],Wj=i.createStaticVNode('<p class="start-h1" data-v-391b4e37>Features</p><ul class="start-ul" data-v-391b4e37><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Customize</p> Bring your typography &amp; color palettes, or use our themes! </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Testing</p> A deeply integrated Rest API Client (Also Free &amp; Open-Source) </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Search</p> Fully integrated Search (Using fuse.js) </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Hosting</p> Free subdomain hosting on https://apidocumentation.com </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>OpenAPI &amp; Swagger</p> Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0 </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Code Samples</p> Code samples to show off your API in most popular languages </li></ul>',2),Gj=i.defineComponent({__name:"GettingStarted",props:{theme:{}},emits:["changeTheme","loadSwaggerFile","linkSwaggerFile","updateContent"],setup(r,{emit:e}){const t=e,n=["default","alternate","moon","purple","solarized","bluePlanet","saturn","kepler","mars","deepSpace"];async function o(){const s=await fetch("https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.yaml");t("updateContent",await s.text())}return(s,a)=>(i.openBlock(),i.createElementBlock("div",Rj,[i.createElementVNode("div",Lj,[jj,i.createElementVNode("div",Fj,[i.createVNode(i.unref(ku),{fullWidth:"",onClick:o},{default:i.withCtx(()=>[i.createTextVNode(" Show Example ")]),_:1}),i.createVNode(i.unref(ku),{fullWidth:"",variant:"outlined",onClick:a[0]||(a[0]=l=>s.$emit("loadSwaggerFile"))},{default:i.withCtx(()=>[i.createTextVNode(" Upload File ")]),_:1})])]),i.createElementVNode("div",qj,[zj,i.createElementVNode("div",Hj,[Uj,(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,l=>i.createElementVNode("div",{key:l,class:i.normalizeClass(["start-item",{"start-item-active":l===s.theme}]),onClick:c=>s.$emit("changeTheme",{id:l,label:i.unref(mp)[l]})},i.toDisplayString(i.unref(mp)[l]),11,Kj)),64))])]),Wj]))}}),gw=U(Gj,[["__scopeId","data-v-391b4e37"]]),Jj={class:"references-header"},Yj={key:0,class:"references-navigation t-doc__sidebar"},Xj={class:"references-navigation-list"},Qj={class:"references-editor"},Zj={class:"references-editor-textarea"},e4={class:"references-rendered"},t4={key:0,class:"references-footer"},r4=i.defineComponent({inheritAttrs:!1,__name:"ApiReferenceLayout",props:{configuration:{},parsedSpec:{},rawSpec:{}},emits:["changeTheme","updateContent","loadSwaggerFile","linkSwaggerFile","toggleDarkMode"],setup(r){const e=r,t=Xe.useMediaQuery("(min-width: 1150px)"),n=i.ref("100dvh"),o=i.ref(null);Xe.useResizeObserver(o,k=>{n.value=k[0].contentRect.height+"px"});const{breadcrumb:s,collapsedSidebarItems:a,isSidebarOpen:l,setCollapsedSidebarItem:c,hideModels:d,setParsedSpec:u}=tr(),{getPathRoutingId:h,getSectionId:f,getTagId:p,hash:y,isIntersectionEnabled:g,pathRouting:m,updateHash:v}=ct();m.value=e.configuration.pathRouting,i.onBeforeMount(()=>v());const b=async k=>{var C;g.value=!1,v(),k?Ti(k):(C=o.value)==null||C.scrollTo(0,0),await wr(100),g.value=!0};i.onMounted(()=>{Uf.on(({specTitle:k})=>{z1(e.rawSpec,k)}),window.onhashchange=()=>b(decodeURIComponent(window.location.hash.replace(/^#/,""))),window.onpopstate=()=>m.value&&b(h(window.location.pathname))});const w=i.computed(()=>t.value||!e.configuration.isEditable),S=Xe.useDebounceFn(k=>{if((k.target.scrollTop??0)<50){const N=e.configuration.pathRouting?e.configuration.pathRouting.basePath:window.location.pathname;window.history.replaceState({},"",N+window.location.search),y.value=""}}),x=i.computed(()=>({breadcrumb:s.value,spec:e.parsedSpec}));return i.watch(()=>e.parsedSpec,u,{deep:!0}),i.onServerPrefetch(()=>{var C,N;const k=i.useSSRContext();if(k&&((C=k.payload).data||(C.data=_d()),e.configuration.pathRouting)){const P=h(k.url);y.value=P,k.payload.data.hash=P;for(const M in a)Object.hasOwn(a,M)&&delete a[M];if(P)c(f(P),!0);else{const M=(N=e.parsedSpec.tags)==null?void 0:N[0];M&&c(p(M),!0)}k.payload.data["useSidebarContent-collapsedSidebarItems"]=a}}),Le.provideUseId(()=>{var P;const k=i.getCurrentInstance(),C="scalar-instance-id";if(!k)return C;let N=k.uid;return typeof window>"u"?(k.attrs||(k.attrs={}),k.attrs[C]=N):(P=k.vnode.el)!=null&&P.getAttribute&&(N=k.vnode.el.getAttribute(C)),`${C}-${N}`}),i.provide(Rc,()=>e.parsedSpec.security),i.provide(Hf,()=>e.configuration.hideDownloadButton),d.value=e.configuration.hideModels??!1,D5(e.configuration),(k,C)=>{var N,P;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(i.unref(r0),{id:(N=k.configuration)==null?void 0:N.theme,withDefaultFonts:(P=k.configuration)==null?void 0:P.withDefaultFonts},null,8,["id","withDefaultFonts"]),i.createVNode(i.unref(o0),null,{default:i.withCtx(({styles:M})=>[i.createVNode(i.unref(uk),null,{default:i.withCtx(({styles:j})=>{var I,X;return[i.createElementVNode("div",{ref_key:"documentEl",ref:o,class:i.normalizeClass(["scalar-api-reference references-layout",[{"references-editable":k.configuration.isEditable,"references-sidebar":k.configuration.showSidebar,"references-sidebar-mobile-open":i.unref(l),"references-classic":k.configuration.layout==="classic"},M,j,k.$attrs.class]]),style:i.normalizeStyle({"--full-height":n.value}),onScrollPassive:C[4]||(C[4]=(...W)=>i.unref(S)&&i.unref(S)(...W))},[i.createElementVNode("div",Jj,[i.renderSlot(k.$slots,"header",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),k.configuration.showSidebar?(i.openBlock(),i.createElementBlock("aside",Yj,[i.createElementVNode("div",Xj,[i.createVNode(i.unref(Gf),{parsedSpec:k.parsedSpec},{"sidebar-start":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),"sidebar-end":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:3},8,["parsedSpec"])])])):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("div",Qj,[i.createElementVNode("div",Zj,[i.renderSlot(k.$slots,"editor",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)])],512),[[i.vShow,k.configuration.isEditable]]),w.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",e4,[i.createVNode(i.unref(mw),{baseServerURL:k.configuration.baseServerURL,layout:k.configuration.layout==="classic"?"accordion":"default",parsedSpec:k.parsedSpec,proxy:k.configuration.proxy},i.createSlots({start:i.withCtx(()=>[i.renderSlot(k.$slots,"content-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),end:i.withCtx(()=>[i.renderSlot(k.$slots,"content-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:2},[(I=k.configuration)!=null&&I.isEditable?{name:"empty-state",fn:i.withCtx(()=>{var W;return[i.createVNode(gw,{theme:((W=k.configuration)==null?void 0:W.theme)||"default",onChangeTheme:C[0]||(C[0]=te=>k.$emit("changeTheme",te)),onLinkSwaggerFile:C[1]||(C[1]=te=>k.$emit("linkSwaggerFile")),onLoadSwaggerFile:C[2]||(C[2]=te=>k.$emit("loadSwaggerFile")),onUpdateContent:C[3]||(C[3]=te=>k.$emit("updateContent",te))},null,8,["theme"])]}),key:"0"}:void 0]),1032,["baseServerURL","layout","parsedSpec","proxy"])]),k.$slots.footer?(i.openBlock(),i.createElementBlock("div",t4,[i.renderSlot(k.$slots,"footer",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),i.createVNode(Q1,{parsedSpec:k.parsedSpec,proxyUrl:(X=k.configuration)==null?void 0:X.proxy},{"sidebar-start":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),"sidebar-end":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:3},8,["parsedSpec","proxyUrl"])],38)]}),_:2},1024)]),_:3}),i.createVNode(i.unref(UE))],64)}}}),ep=U(r4,[["__scopeId","data-v-34f73cf2"]]),n4={},o4={class:"references-classic-header-container"},s4={class:"references-classic-header"};function i4(r,e){return i.openBlock(),i.createElementBlock("div",o4,[i.createElementVNode("div",s4,[i.renderSlot(r.$slots,"default",{},void 0,!0),i.renderSlot(r.$slots,"dark-mode-toggle",{},void 0,!0)])])}const a4=U(n4,[["render",i4],["__scopeId","data-v-a860f78f"]]),l4=r=>(i.pushScopeId("data-v-559a0a79"),r=r(),i.popScopeId(),r),c4={class:"darklight-reference"},d4={key:0},u4={key:1},h4=l4(()=>i.createElementVNode("a",{class:"darklight-reference-promo",href:"https://www.scalar.com",target:"_blank"}," Powered by scalar.com ",-1)),f4=i.defineComponent({__name:"DarkModeToggle",props:{isDarkMode:{type:Boolean}},emits:["toggleDarkMode"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",c4,[i.createElementVNode("button",{class:"darklight",type:"button",onClick:t[0]||(t[0]=n=>e.$emit("toggleDarkMode"))},[i.createVNode(i.unref(Me),{icon:"LightDarkModeToggle"}),e.isDarkMode?(i.openBlock(),i.createElementBlock("span",d4,"Light Mode")):(i.openBlock(),i.createElementBlock("span",u4,"Dark Mode"))]),h4]))}}),yw=U(f4,[["__scopeId","data-v-559a0a79"]]),p4=i.defineComponent({__name:"DarkModeIconToggle",props:{isDarkMode:{type:Boolean}},emits:["toggleDarkMode"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("button",{class:"darklight",type:"button",onClick:t[0]||(t[0]=n=>e.$emit("toggleDarkMode"))},[i.createVNode(i.unref(Me),{icon:e.isDarkMode?"DarkMode":"LightMode"},null,8,["icon"]),i.createVNode(sw,null,{default:i.withCtx(()=>[i.createTextVNode(" Switch to "+i.toDisplayString(e.isDarkMode?"Light":"Dark")+" Mode ",1)]),_:1})]))}}),vw=U(p4,[["__scopeId","data-v-8f61ca56"]]);function m4(r,e){let t=r;const n=e.required&&e.required.includes(r);return t+=n?" REQUIRED ":" optional ",e.properties[r]&&(t+=e.properties[r].type,e.properties[r].description&&(t+=" "+e.properties[r].description)),t}function g4(r){var n;const e=["Body"],t=(n=r==null?void 0:r.schema)==null?void 0:n.properties;return t&&Object.keys(t).forEach(o=>{if(!r.schema)return;e.push(m4(o,r.schema));const s=t[o];s.type==="object"&&!!s.properties&&s.properties&&Object.keys(s.properties).forEach(l=>{var c,d;e.push(`${l} ${(d=(c=s.properties)==null?void 0:c[l])==null?void 0:d.type}`)})}),e}function y4(r){var e,t,n;try{const o=(n=(t=(e=r==null?void 0:r.information)==null?void 0:e.requestBody)==null?void 0:t.content)==null?void 0:n["application/json"];if(!o)throw new Error("Body not found");return g4(o)}catch{return!1}}const v4=r=>(i.pushScopeId("data-v-3445e6c6"),r=r(),i.popScopeId(),r),b4=v4(()=>i.createElementVNode("div",{class:"ref-search-meta"},[i.createElementVNode("span",null,"↑↓ Navigate"),i.createElementVNode("span",null,"⏎ Select")],-1)),w4=i.defineComponent({__name:"SearchModal",props:{parsedSpec:{},modalState:{}},setup(r){const e=r,t=i.toRef(e,"parsedSpec"),n={heading:"DocsPage",model:"JsonObject",req:"Terminal",tag:"CodeFolder",webhook:"Terminal"},o=Xe.useMagicKeys(),s=i.ref([]),a=i.ref([]),l=i.ref(0),c=i.ref(""),d=i.ref(null),u=new Uw(s.value,{keys:["title","description","body"]}),h=()=>{l.value=0,a.value=u.search(c.value)},f=i.computed(()=>S.value[l.value]),{getHeadingId:p,getWebhookId:y,getModelId:g,getOperationId:m,getTagId:v}=ct();i.watch(()=>e.modalState.open,N=>{N&&(c.value="",l.value=0,a.value=[])});const{setCollapsedSidebarItem:b,hideModels:w}=tr();i.watch(t.value,async()=>{var W,te,me,ke,Se;if(s.value=[],!((te=(W=e.parsedSpec)==null?void 0:W.tags)!=null&&te.length)&&!((me=e.parsedSpec)!=null&&me.webhooks)){u.setCollection([]);return}const N=[],P=await Ei(((ke=e.parsedSpec.info)==null?void 0:ke.description)??"");P.length&&(P.forEach(se=>{N.push({type:"heading",title:`Info > ${se.value}`,description:"",href:`#${p(se)}`,tag:se.slug,body:""})}),s.value=s.value.concat(N)),(Se=e.parsedSpec.tags)==null||Se.forEach(se=>{const q={title:se["x-displayName"]??se.name,href:`#${v(se)}`,description:se.description,type:"tag",tag:se.name,body:""};s.value.push(q),se.operations&&se.operations.forEach(T=>{const{parameterMap:V}=Kf({operation:T}),D=y4(T)||V.value;let E=null;typeof D!="boolean"&&(E=D);const A={type:"req",title:T.name??T.path,href:`#${m(T,se)}`,operationId:T.operationId,description:T.description??"",httpVerb:T.httpVerb,path:T.path,tag:se.name,operation:T};E&&(A.body=E),s.value.push(A)})});const M=e.parsedSpec.webhooks,j=[];M&&Object.keys(M).forEach(se=>{Object.keys(M[se]).forEach(T=>{var V;j.push({type:"webhook",title:`Webhook: ${(V=M[se][T])==null?void 0:V.name}`,href:`#${y(se,T)}`,description:se,httpVerb:T,tag:se,body:""})}),s.value=s.value.concat(j)});const I=w.value?{}:Jt(e.parsedSpec),X=[];I&&(Object.keys(I).forEach(se=>{X.push({type:"model",title:"Model",href:`#${g(se)}`,description:I[se].title??se,tag:se,body:""})}),s.value=s.value.concat(X)),u.setCollection(s.value)},{immediate:!0}),Xe.whenever(o.enter,()=>{e.modalState.open&&window&&(k(f.value),window.location.hash=f.value.item.href,e.modalState.hide())}),Xe.whenever(o.ArrowDown,()=>{var N;e.modalState.open&&window&&(l.value<S.value.length-1?l.value++:l.value=0,(N=document.getElementById(f.value.item.href))==null||N.scrollIntoView({behavior:"smooth",block:"center"}))}),Xe.whenever(o.ArrowUp,()=>{var N;e.modalState.open&&window&&(l.value>0?l.value--:l.value=S.value.length-1,(N=document.getElementById(f.value.item.href))==null||N.scrollIntoView({behavior:"smooth",block:"center"}))});const S=i.computed(()=>c.value.length===0?s.value.map(N=>({item:N})):a.value),x=/#(tag\/[^/]*)/,k=N=>{let P="models";const M=N.item.href.match(x);M!=null&&M.length&&M.length>1&&(P=M[1]),b(P,!0),e.modalState.hide()};function C(N){const P=new URL(window.location.href);return P.hash=N,P.toString()}return(N,P)=>(i.openBlock(),i.createBlock(i.unref(pv),{state:N.modalState,variant:"search"},{default:i.withCtx(()=>[i.createElementVNode("div",{ref_key:"searchModalRef",ref:d,class:"ref-search-container"},[i.createVNode(i.unref(D_),{modelValue:c.value,"onUpdate:modelValue":P[0]||(P[0]=M=>c.value=M),onInput:h},null,8,["modelValue"])],512),i.createVNode(i.unref(R_),{class:"ref-search-results custom-scroll",noResults:!S.value.length},{query:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(S.value,(M,j)=>(i.openBlock(),i.createBlock(i.unref(K_),{id:M.item.href,key:M.refIndex,active:l.value===j,href:C(M.item.href),icon:n[M.item.type],onClick:I=>k(M),onFocus:I=>l.value=j},i.createSlots({default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.title)+" ",1)]),_:2},[(M.item.httpVerb||M.item.path)&&M.item.path!==M.item.title?{name:"description",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.path),1)]),key:"0"}:M.item.description?{name:"description",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.description),1)]),key:"1"}:void 0,M.item.type==="req"?{name:"addon",fn:i.withCtx(()=>[i.createVNode(X1,{method:M.item.httpVerb??"get"},null,8,["method"])]),key:"2"}:void 0]),1032,["id","active","href","icon","onClick","onFocus"]))),128))]),_:1},8,["noResults"]),b4]),_:1},8,["state"]))}}),bw=U(w4,[["__scopeId","data-v-3445e6c6"]]),k4=r=>(i.pushScopeId("data-v-edb0a931"),r=r(),i.popScopeId(),r),S4={class:"sidebar-search-input"},x4=k4(()=>i.createElementVNode("span",{class:"sidebar-search-placeholder"},"Search",-1)),C4={class:"sidebar-search-shortcut"},E4={class:"sidebar-search-key"},$4=i.defineComponent({__name:"SearchButton",props:{spec:{},searchHotKey:{default:"k"}},setup(r){const e=r,t=mv(),n=Xe.useMagicKeys({passive:!1,onEventFired(o){!Qa()&&o.ctrlKey&&o.key===e.searchHotKey&&(o.preventDefault(),o.stopPropagation())}});return Xe.whenever(n[`${Qa()?"meta":"control"}_${e.searchHotKey}`],()=>t.open?t.hide():t.show()),(o,s)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("button",{class:i.normalizeClass(["sidebar-search",o.$attrs.class]),type:"button",onClick:s[0]||(s[0]=(...a)=>i.unref(t).show&&i.unref(t).show(...a))},[i.createVNode(i.unref(Me),{class:"search-icon",icon:"Search",size:"sm"}),i.createElementVNode("div",S4,[x4,i.createElementVNode("span",C4,[i.createElementVNode("span",E4,i.toDisplayString(i.unref(Qa)()?"⌘":"⌃")+i.toDisplayString(o.searchHotKey),1)])])],2),i.createVNode(bw,{modalState:i.unref(t),parsedSpec:o.spec},null,8,["modalState","parsedSpec"])],64))}}),tp=U($4,[["__scopeId","data-v-edb0a931"]]),_4=i.defineComponent({__name:"ClassicLayout",props:{configuration:{},parsedSpec:{},rawSpec:{},isDark:{type:Boolean}},emits:["toggleDarkMode"],setup(r){const e=r,t=i.computed(()=>({...e.configuration,showSidebar:!1}));return(n,o)=>(i.openBlock(),i.createBlock(ep,{configuration:t.value,parsedSpec:n.parsedSpec,rawSpec:n.rawSpec},{"content-start":i.withCtx(({spec:s})=>[i.createVNode(a4,null,{"dark-mode-toggle":i.withCtx(()=>[i.createVNode(i.unref(vw),{isDarkMode:n.isDark,onToggleDarkMode:o[0]||(o[0]=a=>n.$emit("toggleDarkMode"))},null,8,["isDarkMode"])]),default:i.withCtx(()=>[i.createVNode(tp,{class:"t-doc__sidebar",searchHotKey:t.value.searchHotKey,spec:s},null,8,["searchHotKey","spec"])]),_:2},1024)]),"content-end":i.withCtx(()=>[i.renderSlot(n.$slots,"footer")]),_:3},8,["configuration","parsedSpec","rawSpec"]))}}),N4={class:"references-mobile-header t-doc__header"},A4={class:"references-mobile-breadcrumbs"},O4={class:"references-mobile-header-actions"},T4=i.defineComponent({__name:"MobileHeader",props:{open:{type:Boolean}},emits:["update:open"],setup(r){const{breadcrumb:e}=tr();return(t,n)=>(i.openBlock(),i.createElementBlock("div",N4,[i.createVNode(i.unref(ji),{icon:t.open?"Close":"Menu",label:t.open?"Close Menu":"Open Menu",size:"md",onClick:n[0]||(n[0]=o=>t.$emit("update:open",!t.open))},null,8,["icon","label"]),i.createElementVNode("span",A4,i.toDisplayString(i.unref(e)),1),i.createElementVNode("div",O4,[i.renderSlot(t.$slots,"actions",{},void 0,!0)])]))}}),B4=U(T4,[["__scopeId","data-v-0242e3de"]]),P4={class:"scalar-api-references-standalone-search"},I4=i.defineComponent({__name:"ModernLayout",props:{configuration:{},parsedSpec:{},rawSpec:{},isDark:{type:Boolean}},emits:["toggleDarkMode"],setup(r){const e=r,t=Xe.useMediaQuery("(max-width: 1000px)"),{isSidebarOpen:n}=tr();i.watch(t,(s,a)=>{s&&!a&&(n.value=!1)});const{hash:o}=ct();return i.watch(o,(s,a)=>{s&&s!==a&&(n.value=!1)}),(s,a)=>(i.openBlock(),i.createBlock(ep,{class:i.normalizeClass({"scalar-api-references-standalone-mobile":s.configuration.showSidebar}),configuration:s.configuration,parsedSpec:s.parsedSpec,rawSpec:s.rawSpec},{header:i.withCtx(()=>[e.configuration.showSidebar?(i.openBlock(),i.createBlock(B4,{key:0,open:i.unref(n),"onUpdate:open":a[0]||(a[0]=l=>i.isRef(n)?n.value=l:null)},null,8,["open"])):i.createCommentVNode("",!0)]),"sidebar-start":i.withCtx(({spec:l})=>{var c;return[i.createElementVNode("div",P4,[i.createVNode(tp,{searchHotKey:(c=e.configuration)==null?void 0:c.searchHotKey,spec:l},null,8,["searchHotKey","spec"])])]}),"sidebar-end":i.withCtx(()=>[i.createVNode(i.unref(yw),{isDarkMode:s.isDark,onToggleDarkMode:a[1]||(a[1]=l=>s.$emit("toggleDarkMode"))},null,8,["isDarkMode"])]),"content-end":i.withCtx(()=>[i.renderSlot(s.$slots,"footer",{},void 0,!0)]),_:3},8,["class","configuration","parsedSpec","rawSpec"]))}}),ww=U(I4,[["__scopeId","data-v-333fecad"]]),M4={modern:ww,classic:_4},kw=i.defineComponent({__name:"ApiReference",props:{configuration:{}},emits:["updateContent"],setup(r){var h,f;const e=r,{toggleDarkMode:t,isDark:n}=I5((h=e.configuration)==null?void 0:h.darkMode);i.watch(()=>{var p;return(p=e.configuration)==null?void 0:p.darkMode},p=>{p!==n.value&&t()});const o=i.computed(()=>{var p,y;if((p=e.configuration)!=null&&p.customCss)return fk((y=e.configuration)==null?void 0:y.customCss)});i.watch(o,()=>console.log(o.value));const s=i.computed(()=>{var p;return{spec:{content:void 0,url:void 0,...(p=e.configuration)==null?void 0:p.spec},proxy:void 0,theme:"default",showSidebar:!0,isEditable:!1,...e.configuration,customCss:o.value}});(f=s.value)!=null&&f.metaData&&(pp.createHead(),pp.useSeoMeta(s.value.metaData));function a(p,y){i.watch(()=>{var g;return(g=s.value)==null?void 0:g[p]},g=>{typeof g<"u"&&y(g)},{immediate:!0})}const{setAuthentication:l}=ns();a("authentication",l);const{setExcludedClients:c}=ks();a("hiddenClients",c);const{parsedSpec:d,rawSpec:u}=W1({proxy:i.toRef(()=>{var p;return((p=e.configuration)==null?void 0:p.proxy)||""}),specConfig:i.toRef(()=>{var p;return((p=e.configuration)==null?void 0:p.spec)||{}})});return(p,y)=>{var g,m;return i.openBlock(),i.createElementBlock(i.Fragment,null,[(g=s.value)!=null&&g.customCss?(i.openBlock(),i.createBlock(i.resolveDynamicComponent("style"),{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.value.customCss),1)]),_:1})):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(M4)[((m=s.value)==null?void 0:m.layout)||"modern"]),{configuration:s.value,isDark:i.unref(n),parsedSpec:i.unref(d),rawSpec:i.unref(u),onToggleDarkMode:y[0]||(y[0]=()=>i.unref(t)()),onUpdateContent:y[1]||(y[1]=v=>p.$emit("updateContent",v))},{footer:i.withCtx(()=>[i.renderSlot(p.$slots,"footer")]),_:3},40,["configuration","isDark","parsedSpec","rawSpec"]))],64)}}});function D4(r,e,t=!0){const n=i.reactive(e),o=i.createApp(kw,{configuration:n});function s(a=r){if(!a){console.warn("Invalid HTML element provided. Cannot mount Scalar References");return}o.mount(a)}return t&&s(),{updateConfig(a,l=!0){l?Object.assign(n,a):oc(n,a)},updateSpec(a){n.spec=a},mount:s,unmount:()=>o.unmount()}}exports.Annotation=so;exports.ApiClientModal=Q1;exports.ApiReferenceLayout=ep;exports.Card=ea;exports.CardContent=lo;exports.CardFooter=Lc;exports.CardHeader=ta;exports.CardTab=aw;exports.CardTabHeader=iw;exports.Content=mw;exports.DarkModeIconToggle=vw;exports.DarkModeToggle=yw;exports.Decoration=Be;exports.DefaultBufferLength=Hy;exports.EditorSelection=Y;exports.EditorView=ue;exports.Et=Nr;exports.Facet=Z;exports.FlowModal=pv;exports.GLOBAL_SECURITY_SYMBOL=Rc;exports.GettingStarted=gw;exports.HIDE_DOWNLOAD_BUTTON_SYMBOL=Hf;exports.LRLanguage=wl;exports.LanguageSupport=nC;exports.ModernLayout=ww;exports.NodeProp=fe;exports.NodeSet=yh;exports.NodeType=mt;exports.NodeWeakMap=R2;exports.Parser=Gy;exports.Prec=Wl;exports.RangeSet=be;exports.RangeValue=Wn;exports.SearchButton=tp;exports.SearchModal=bw;exports.SecurityScheme=zv;exports.SecuritySchemeSelector=Hv;exports.Sidebar=Gf;exports.StateEffect=We;exports.StateField=qr;exports.Text=we;exports.Transaction=rt;exports.Tree=He;exports.ViewPlugin=Rt;exports.WidgetType=os;exports.Y=Me;exports._export_sfc=U;exports._sfc_main=r0;exports._sfc_main$1=oo;exports._sfc_main$2=kw;exports.bracketMatching=NC;exports.bracketMatchingHandle=fv;exports.clickGeneratedParameter=jC;exports.codePointAt=Mo;exports.codePointSize=ul;exports.combineConfig=Jl;exports.concatenateUrlAndPath=gv;exports.continuedIndent=pC;exports.countColumn=ch;exports.createEmptyAuthenticationState=b0;exports.createEmptyOpenApiState=k0;exports.createEmptyServerState=E0;exports.createEmptySpecification=Un;exports.createPlaceholderRequest=S0;exports.createScalarReferences=D4;exports.customTheme=MC;exports.deepMerge=Uv;exports.defaultHighlightStyle=kC;exports.defineLanguageFacet=Zy;exports.delimitedIndent=hC;exports.downloadSpecBus=Uf;exports.downloadSpecFile=z1;exports.encodeStringAsBase64=yv;exports.filterHiddenClients=tw;exports.findVariables=vv;exports.flatIndent=fC;exports.foldInside=vC;exports.foldNodeProp=yC;exports.fromCodePoint=hS;exports.getApiClientRequest=Ph;exports.getBase64Token=Ch;exports.getHeadingsFromMarkdown=Ei;exports.getIndentUnit=rv;exports.getLowestHeadingLevel=nc;exports.getModels=Jt;exports.getRequestFromAuthentication=xh;exports.getSecretCredentialsFromAuthentication=bv;exports.getTooltip=C2;exports.getUrlFromServerState=xi;exports.getVariableNames=mN;exports.hasModels=Ih;exports.hasSecuritySchemes=Kv;exports.hasWebhooks=Wv;exports.highlightSpecialChars=p2;exports.indentNodeProp=sv;exports.indentOnInput=gC;exports.indentString=nv;exports.indentUnit=kh;exports.isJsonString=m0;exports.isMacOS=Qa;exports.isRequestMethod=Pd;exports.isValidUrl=Gv;exports.keymap=Ly;exports.kt=ku;exports.lineNumbers=T2;exports.logException=Br;exports.mapFromObject=gN;exports.mergeAllObjects=yN;exports.normalizeMimeType=y0;exports.objectMerge=oc;exports.openClientFor=$l;exports.parse=q1;exports.parseMixed=j2;exports.redirectToProxy=wv;exports.replaceVariables=Eh;exports.requestMethodAbbreviations=_0;exports.requestMethodColors=$0;exports.scrollToId=Ti;exports.showTooltip=qy;exports.sleep=wr;exports.splitMarkdownInSections=H1;exports.styleTags=Yy;exports.sublanguageProp=ev;exports.syntaxHighlighting=cv;exports.syntaxTree=mn;exports.tags=F;exports.useApiClientStore=Fl;exports.useAuthenticationStore=ns;exports.useHttpClientStore=ks;exports.useModal=mv;exports.useOpenApiStore=nh;exports.useReactiveSpec=W1;exports.useRequestStore=C0;exports.useServerStore=no;exports.validRequestMethods=sh;exports.variables=DC;